Problem Statement
Suggestions (Source Correction / Entity Addition) can currently only be created by the AI's correctionTool (packages/ai/src/tools/correction.ts), which the model invokes at its own discretion when it infers a correction intent during chat. There is no user-facing entry point to explicitly propose a correction or addition. If the model doesn't pick up the intent, the user's input is lost.
Proposed Solution
Add user-initiated Suggestion creation from an assistant message:
- Frontend: actions on the assistant message (same footer area as the other message actions in
apps/frontend/components/chat/ProjectChat.tsx) — e.g. "This is wrong" → Source Correction, "Something is missing" → Entity Addition. The action opens a small form pre-filled with the relevant claim; the user refines the text and submits.
- API: an endpoint to create a user-authored Suggestion of the given kind, scoped to the Project's graph, in
apps/api.
- The submitted Suggestion appears in the existing review flow (Settings → Suggestions), where it is Applied or Dismissed as today.
Most of the backend is already in place — the suggestions table, the Apply/Dismiss logic, and the review UI all exist. This issue is primarily the chat entry point plus a create endpoint.
Acceptance Criteria
Scope / Notes
Frontend + backend. Ties in with the message-feedback control (#458) and the Suggestion review UX (#462). Labeled needs-triage — the exact UX and whether to ship it still needs to be discussed before implementation.
Problem Statement
Suggestions (Source Correction / Entity Addition) can currently only be created by the AI's
correctionTool(packages/ai/src/tools/correction.ts), which the model invokes at its own discretion when it infers a correction intent during chat. There is no user-facing entry point to explicitly propose a correction or addition. If the model doesn't pick up the intent, the user's input is lost.Proposed Solution
Add user-initiated Suggestion creation from an assistant message:
apps/frontend/components/chat/ProjectChat.tsx) — e.g. "This is wrong" → Source Correction, "Something is missing" → Entity Addition. The action opens a small form pre-filled with the relevant claim; the user refines the text and submits.apps/api.Most of the backend is already in place — the suggestions table, the Apply/Dismiss logic, and the review UI all exist. This issue is primarily the chat entry point plus a create endpoint.
Acceptance Criteria
Scope / Notes
Frontend + backend. Ties in with the message-feedback control (#458) and the Suggestion review UX (#462). Labeled
needs-triage— the exact UX and whether to ship it still needs to be discussed before implementation.