MCPcopy Create free account
hub / github.com/chhoumann/quickadd / addFolder

Method addFolder

src/quickAddSettingsTab.ts:507–517  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

505 );
506
507 const addFolder = (): void => {
508 // Store the canonical (normalized) form so "templates" and "templates/"
509 // can't both be added, and dedupe against the existing list.
510 const [folder] = normalizeTemplateFolderPaths([input.inputEl.value]);
511 input.inputEl.value = "";
512 if (!folder) return;
513 const paths = getPaths();
514 if (paths.includes(folder)) return;
515 setPaths([...paths, folder]);
516 renderList();
517 };
518
519 const onKeydown = (e: KeyboardEvent): void => {
520 if (e.key === "Enter") {

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected