Repository navigation
feat(plugin): add interactive question() tool-context method with prefilled answers - #43059
SaeedAqamiri wants to merge 2 commits into
Conversation
…filled answers Add a question() method to ToolContext that presents the same modal as the question tool and resolves with the selected labels (rejects on dismiss), bridged to Question.Service in the registry. QuestionInfo gains an optional default that pre-fills the custom answer textarea for review/edit workflows (app + v1/v2 schema + generated sdk types).
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
— AI code review (automated) |
|
- session-question-dock: prefill proposed content at most once per tab via a latch (clearing the field or toggling customOn can no longer re-insert the proposal), and bail when question().custom === false so a hidden field is not silently marked as an active answer. - plugin/tool.ts: document that answers resolve in input order (callers zip by index) and that multiple:true yields all selected labels. - registry.test.ts: unit test pinning the exact QuestionService.ask payload the plugin question() bridge forwards, for both with- and without-callID contexts.
ce73ae3 to
c4f7827
Compare
|
Automated PR Cleanup Thank you for contributing to opencode. Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions. This PR was closed because it matched the following cleanup criteria:
PRs created within the last month are not affected by this cleanup. If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate. Thanks again for taking the time to contribute. |
|
Still active. The automated review feedback is addressed: the custom-field prefill now latches once per tab (clearing the field no longer re-inserts the proposal) and bails when |
Issue for this PR
Closes #43068 (notebook memory feature) — the interactive
question()review/edit helper powers the notebooknotes_commitapproval UX (a proposed summary, editable by the user, per note).Type of change
What does this PR do?
Adds
question()to the pluginToolContext: presents the same modal as thequestiontool and resolves with the selected labels per question, in order, rejecting when the user dismisses the modal. Bridged toQuestion.Servicein the registry.QuestionInfogains an optionaldefaultthat pre-fills the custom answer textarea, enabling review/edit workflows. The app question dock pre-fills fromdefault; v1 + v2 schema and generated sdk types carry the field.How did you verify your code works?
bun typecheckgreen.defaultpre-fill is additive to the existing question dock.Screenshots / recordings
N/A — no visual change beyond the pre-filled textarea in an existing modal.
Checklist