(prompt: string)
| 49 | * through to normal prompt handling. |
| 50 | */ |
| 51 | export 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 | |
| 60 | export interface GoalSummary { |
| 61 | readonly type: 'goal.summary'; |
no test coverage detected