MCPcopy Create free account
hub / github.com/ZenNotes/zennotes / buildTemplateDestinationPrompt

Function buildTemplateDestinationPrompt

packages/app-core/src/lib/move-note.ts:129–144  ·  view source on GitHub ↗
(
  templateName: string,
  initialPath: string,
  folders: FolderEntry[]
)

Source from the content-addressed store, hash-verified

127 * suggestions (the folders you see in the sidebar) to quickly pick a folder.
128 */
129export function buildTemplateDestinationPrompt(
130 templateName: string,
131 initialPath: string,
132 folders: FolderEntry[]
133): PromptOptions {
134 return {
135 title: `Create "${templateName}" in…`,
136 description: 'Press Enter to create at the vault root, or type / pick a folder like Work/Research.',
137 initialValue: normalizeMoveTarget(initialPath),
138 placeholder: 'Vault root — type a folder to change',
139 okLabel: 'Create',
140 allowEmptySubmit: true,
141 suggestions: buildNotesFolderSuggestions(folders),
142 suggestionsHint: 'Empty = vault root · ↑↓ pick a folder · Enter create'
143 }
144}
145
146export function buildMoveNotePrompt(
147 note: Pick<NoteMeta, 'title' | 'path'>,

Callers 1

store.tsFile · 0.90

Calls 2

normalizeMoveTargetFunction · 0.85

Tested by

no test coverage detected