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

Function readRepoInput

graph-ui/src/settings/model-catalog.ts:190–202  ·  view source on GitHub ↗
(value: string)

Source from the content-addressed store, hash-verified

188 * Kommandozeile scheitert, und laesst ihn den Fehler dort suchen.
189 */
190export function readRepoInput(value: string): RepoReading {
191 const trimmed = value.trim();
192 if (trimmed.length === 0) {
193 return { ok: false, repo: '', quant: '', problem: 'empty' };
194 }
195 if (!HF_REPO_PATTERN.test(trimmed)) {
196 return { ok: false, repo: '', quant: '', problem: 'shape' };
197 }
198 const colon = trimmed.indexOf(':');
199 return colon === -1
200 ? { ok: true, repo: trimmed, quant: '', problem: '' }
201 : { ok: true, repo: trimmed.slice(0, colon), quant: trimmed.slice(colon + 1), problem: '' };
202}
203
204/**
205 * Der fertige Aufruf, mit dem der Leser ein Modell holt.

Callers 2

SettingsPanelFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected