MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / useFolder

Function useFolder

graph-ui/src/projects/AddProjectIndexDialog.tsx:192–197  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

190 const nameDuplicate = entries.find(entry => entry.name.toLowerCase() === name.trim().toLowerCase());
191 const duplicate = folderDuplicate ?? nameDuplicate;
192 const useFolder = (): void => {
193 if (!level || browsing || browseError || !level.path || !samePath(pathInput.trim(), level.path)) return;
194 setSelectedPath(level.path);
195 setName(normalizedName(projectNameFor(level.path)).slice(0, 200).replace(/-+$/, ''));
196 setSubmitError(''); setStep('confirm');
197 };
198 const start = async (): Promise<void> => {
199 const projectName = name.trim();
200 if (submitPending.current || !selectedPath || !validName(projectName) || duplicate || listStatus !== 'ready' || jobRef.current?.status === 'indexing') return;

Callers

nothing calls this directly

Calls 3

projectNameForFunction · 0.90
samePathFunction · 0.85
normalizedNameFunction · 0.85

Tested by

no test coverage detected