@@ -46,10 +46,10 @@ export enum SuggestionAction {
4646 // This overlap ensures that when a suggestion triggers a note creation callback,
4747 // the receiving features (e.g. note creation handlers, CKEditor mentions) can interpret
4848 // the action type consistently
49- CreateNoteIntoInbox = CreateNoteAction . CreateNoteIntoInbox ,
50- CreateNoteIntoPath = CreateNoteAction . CreateNoteIntoPath ,
51- CreateAndLinkNoteIntoInbox = CreateNoteAction . CreateAndLinkNoteIntoInbox ,
52- CreateAndLinkNoteIntoPath = CreateNoteAction . CreateAndLinkNoteIntoPath ,
49+ CreateNote = CreateNoteAction . CreateNote ,
50+ CreateChildNote = CreateNoteAction . CreateChildNote ,
51+ CreateAndLinkNote = CreateNoteAction . CreateAndLinkNote ,
52+ CreateAndLinkChildNote = CreateNoteAction . CreateAndLinkChildNote ,
5353
5454 SearchNotes = "search-notes" ,
5555 ExternalLink = "external-link" ,
@@ -182,16 +182,16 @@ async function autocompleteSource(
182182 case CreateMode . CreateOnly : {
183183 results = [
184184 {
185- action : SuggestionAction . CreateNoteIntoInbox ,
185+ action : SuggestionAction . CreateNote ,
186186 noteTitle : trimmedTerm ,
187187 parentNoteId : "inbox" ,
188- highlightedNotePathTitle : t ( "note_autocomplete.create-note-into-inbox " , { term : trimmedTerm } ) ,
188+ highlightedNotePathTitle : t ( "note_autocomplete.create-note" , { term : trimmedTerm } ) ,
189189 } ,
190190 {
191- action : SuggestionAction . CreateNoteIntoPath ,
191+ action : SuggestionAction . CreateChildNote ,
192192 noteTitle : trimmedTerm ,
193193 parentNoteId : activeNoteId || "root" ,
194- highlightedNotePathTitle : t ( "note_autocomplete.create-note-into-path " , { term : trimmedTerm } ) ,
194+ highlightedNotePathTitle : t ( "note_autocomplete.create-child-note " , { term : trimmedTerm } ) ,
195195 } ,
196196 ...results ,
197197 ] ;
@@ -201,16 +201,16 @@ async function autocompleteSource(
201201 case CreateMode . CreateAndLink : {
202202 results = [
203203 {
204- action : SuggestionAction . CreateAndLinkNoteIntoInbox ,
204+ action : SuggestionAction . CreateAndLinkNote ,
205205 noteTitle : trimmedTerm ,
206206 parentNoteId : "inbox" ,
207- highlightedNotePathTitle : t ( "note_autocomplete.create-and-link-note-into-inbox " , { term : trimmedTerm } ) ,
207+ highlightedNotePathTitle : t ( "note_autocomplete.create-and-link-note" , { term : trimmedTerm } ) ,
208208 } ,
209209 {
210- action : SuggestionAction . CreateAndLinkNoteIntoPath ,
210+ action : SuggestionAction . CreateAndLinkChildNote ,
211211 noteTitle : trimmedTerm ,
212212 parentNoteId : activeNoteId || "root" ,
213- highlightedNotePathTitle : t ( "note_autocomplete.create-and-link-note-into-path " , { term : trimmedTerm } ) ,
213+ highlightedNotePathTitle : t ( "note_autocomplete.create-and-link-child-note " , { term : trimmedTerm } ) ,
214214 } ,
215215 ...results ,
216216 ] ;
@@ -316,11 +316,11 @@ function renderNoteSuggestion(s: Suggestion): string {
316316 switch ( s . action ) {
317317 case SuggestionAction . SearchNotes :
318318 return "bx bx-search" ;
319- case SuggestionAction . CreateAndLinkNoteIntoInbox :
320- case SuggestionAction . CreateNoteIntoInbox :
319+ case SuggestionAction . CreateAndLinkNote :
320+ case SuggestionAction . CreateNote :
321321 return "bx bx-plus" ;
322- case SuggestionAction . CreateAndLinkNoteIntoPath :
323- case SuggestionAction . CreateNoteIntoPath :
322+ case SuggestionAction . CreateAndLinkChildNote :
323+ case SuggestionAction . CreateChildNote :
324324 return "bx bx-plus" ;
325325 case SuggestionAction . ExternalLink :
326326 return "bx bx-link-external" ;
@@ -477,7 +477,7 @@ function initNoteAutocomplete($el: JQuery<HTMLElement>, options?: Options) {
477477 }
478478
479479 // --- CREATE NOTE INTO INBOX ---
480- case SuggestionAction . CreateNoteIntoInbox : {
480+ case SuggestionAction . CreateNote : {
481481 const { note } = await noteCreateService . createNote (
482482 {
483483 target : "inbox" ,
@@ -495,7 +495,7 @@ function initNoteAutocomplete($el: JQuery<HTMLElement>, options?: Options) {
495495 break ;
496496 }
497497
498- case SuggestionAction . CreateAndLinkNoteIntoInbox : {
498+ case SuggestionAction . CreateAndLinkNote : {
499499 const { note } = await noteCreateService . createNote (
500500 {
501501 target : "inbox" ,
@@ -516,7 +516,7 @@ function initNoteAutocomplete($el: JQuery<HTMLElement>, options?: Options) {
516516 return ;
517517 }
518518
519- case SuggestionAction . CreateNoteIntoPath : {
519+ case SuggestionAction . CreateChildNote : {
520520 if ( ! suggestion . parentNoteId ) {
521521 console . warn ( "Missing parentNoteId for CreateNoteIntoPath" ) ;
522522 return ;
@@ -538,7 +538,7 @@ function initNoteAutocomplete($el: JQuery<HTMLElement>, options?: Options) {
538538 break ;
539539 }
540540
541- case SuggestionAction . CreateAndLinkNoteIntoPath : {
541+ case SuggestionAction . CreateAndLinkChildNote : {
542542 if ( ! suggestion . parentNoteId ) {
543543 console . warn ( "Missing parentNoteId for CreateNoteIntoPath" ) ;
544544 return ;
0 commit comments