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

Function submit

graph-ui/src/components/StatsTab.tsx:231–243  ·  view source on GitHub ↗
(path = currentPath)

Source from the content-addressed store, hash-verified

229 useEffect(() => { setActiveIndex(0); }, [filter, currentPath]);
230
231 const submit = async (path = currentPath) => {
232 if (!path) return;
233 setSubmitting(true); setError(null);
234 try {
235 const body: { root_path: string; project_name?: string } = { root_path: path };
236 if (projectName.trim()) body.project_name = projectName.trim();
237 const res = await fetch("/api/index", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify(body) });
238 const data = await res.json();
239 if (!res.ok) throw new Error(data.error ?? "Failed");
240 onCreated(); onClose();
241 } catch (e) { setError(e instanceof Error ? e.message : "Failed"); }
242 finally { setSubmitting(false); }
243 };
244
245 const onFilterKeyDown = (e: React.KeyboardEvent<HTMLInputElement>) => {
246 if (e.key === "ArrowDown") {

Callers 2

onFilterKeyDownFunction · 0.85
CreateIndexModalFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected