MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / parseHeadlessGoalCreate

Function parseHeadlessGoalCreate

apps/kimi-code/src/cli/goal-prompt.ts:51–58  ·  view source on GitHub ↗
(prompt: string)

Source from the content-addressed store, hash-verified

49 * through to normal prompt handling.
50 */
51export function parseHeadlessGoalCreate(prompt: string): HeadlessGoalCreate | undefined {
52 const trimmed = prompt.trim();
53 if (!GOAL_PREFIX.test(trimmed)) return undefined;
54 const args = trimmed.replace(/^\/goal/, '').trim();
55 const parsed = parseGoalCommand(args);
56 if (parsed.kind !== 'create') return undefined;
57 return { objective: parsed.objective, replace: parsed.replace };
58}
59
60export interface GoalSummary {
61 readonly type: 'goal.summary';

Callers 2

runPromptFunction · 0.90

Calls 1

parseGoalCommandFunction · 0.85

Tested by

no test coverage detected