feat: use tool calls for answer extraction
This commit is contained in:
+3
-2
@@ -207,7 +207,7 @@ This document defines the stable external behavior. It does not explain internal
|
||||
- on the review tab, `Submit` and `Cancel` preview notes only for answered questions
|
||||
- on the review tab, `Elaborate` preview expands to all question notes and all option notes, including notes on unselected options
|
||||
- transcript-friendly call and result rendering
|
||||
- `/answer` command to extract a raw-JSON `AskParams` form from the latest completed assistant message and open the ask UI
|
||||
- `/answer` command to convert the latest completed assistant message into an `AskParams` form through a synthetic `ask_user` tool call and open the ask UI
|
||||
- `/answer` extraction may use an internal `freeform: true` option for open-ended questions with no explicit choices; these render as user-input-only questions with the label `Type your answer:`, no numbered option row, and no selection caret; this marker is not part of the public `ask_user` tool contract
|
||||
- `/answer:again` command to replay the latest `/answer`-extracted form on the current branch
|
||||
- `/ask:replay` command to replay the latest real `ask_user` form on the current branch
|
||||
@@ -286,7 +286,8 @@ See [`remote-events.md`](remote-events.md) for payload shapes, examples, and a l
|
||||
|
||||
- valid `ask_user` payloads are persisted as branch custom entries before the UI opens, so `/ask:replay` can reopen them after cancel, `/resume`, or `/tree`
|
||||
- `/answer` scans the current branch for the latest assistant message; if that message did not finish with `stop`, extraction is refused
|
||||
- `/answer` expects the extractor to return raw JSON only; JSON parse failures are retried according to `answer.extractionRetries`, then reported to the user without opening the ask UI
|
||||
- `/answer` sends the preceding user message as context with the latest assistant text and asks the extractor for one synthetic `ask_user` tool call
|
||||
- missing or invalid tool calls are retried according to `answer.extractionRetries`; raw or fenced JSON text remains supported as a last-resort fallback
|
||||
- `{ "questions": [] }` from extraction means no questions were found and is not treated as an invalid ask payload
|
||||
- command-flow cancellation closes with a notification and does not send a message to the agent
|
||||
- submitted or elaborated command-flow results are sent back with user-message semantics
|
||||
|
||||
Reference in New Issue
Block a user