Add message intent classification (edit/info/help) before routing
Introduces a two-LLM-call pipeline: the first call classifies the user's message intent as "edit", "info", or "help". Edit messages proceed through the existing routing → edit → propose flow. Info messages get a generated response about site content from the manifest. Help messages get a templated capabilities overview. This handles open-ended questions like "What can I do?" or "What does my site have on it?" which previously had no path through the system. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -142,6 +142,13 @@ export const editJobPayloadSchema = z.discriminatedUnion('kind', [
|
||||
]);
|
||||
export type EditJobPayload = z.infer<typeof editJobPayloadSchema>;
|
||||
|
||||
// ── Classification output (first LLM call) ──
|
||||
export const classificationSchema = z.object({
|
||||
intent: z.enum(['edit', 'info', 'help']),
|
||||
reason: z.string(),
|
||||
});
|
||||
export type ClassificationOutput = z.infer<typeof classificationSchema>;
|
||||
|
||||
// ── Routing output (LLM structured output) ──
|
||||
export const routingOutputSchema = z.object({
|
||||
repo_relative_path: z.string(),
|
||||
|
||||
Reference in New Issue
Block a user