Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 2 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,19 +213,9 @@ Toggle density from the command palette or set in config:

---

### AskQuestion Tool (Experimental)
### AskQuestion Tool

Enable the AI to pause and ask structured questions via a wizard UI. Available in both TUI and web app.

Enable in `opencode.json`:

```jsonc
{
"experimental": {
"askquestion_tool": true,
},
}
```
The AI can pause and ask structured questions via a wizard UI. Available in both TUI and web app. This tool is enabled by default.

Features:
- Wizard-style multi-question dialogs with single/multi-select options
Expand Down
1 change: 0 additions & 1 deletion packages/opencode/src/config/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -977,7 +977,6 @@ export namespace Config {
chatMaxRetries: z.number().optional().describe("Number of retries for chat completions on failure"),
disable_paste_summary: z.boolean().optional(),
batch_tool: z.boolean().optional().describe("Enable the batch tool"),
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: Run ./script/generate.ts to regenerate the SDK - the auto-generated file packages/sdk/js/src/v2/gen/types.gen.ts still contains the askquestion_tool field that was removed here

Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/opencode/src/config/config.ts
Line: 979:979

Comment:
**style:** Run `./script/generate.ts` to regenerate the SDK - the auto-generated file `packages/sdk/js/src/v2/gen/types.gen.ts` still contains the `askquestion_tool` field that was removed here

How can I resolve this? If you propose a fix, please make it concise.

askquestion_tool: z.boolean().optional().describe("Enable the askquestion tool for LLM to ask clarifying questions"),
openTelemetry: z
.boolean()
.optional()
Expand Down
2 changes: 1 addition & 1 deletion packages/opencode/src/tool/registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export namespace ToolRegistry {
SkillTool,
...(Flag.OPENCODE_EXPERIMENTAL_LSP_TOOL ? [LspTool] : []),
...(config.experimental?.batch_tool === true ? [BatchTool] : []),
...(config.experimental?.askquestion_tool === true ? [AskQuestionTool] : []),
AskQuestionTool,
...custom,
]
}
Expand Down
4 changes: 0 additions & 4 deletions packages/sdk/js/src/v2/gen/types.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1824,10 +1824,6 @@ export type Config = {
* Enable the batch tool
*/
batch_tool?: boolean
/**
* Enable the askquestion tool for LLM to ask clarifying questions
*/
askquestion_tool?: boolean
/**
* Enable OpenTelemetry spans for AI SDK calls (using the 'experimental_telemetry' flag)
*/
Expand Down
12 changes: 3 additions & 9 deletions script/sync/fork-features.json
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,7 @@
"title": "AskQuestion tool for user input",
"author": "iljod",
"status": "open",
"description": "Interactive tool that allows AI to pause and solicit structured feedback via TUI/web wizard with single/multi-select and confirm dialogs. Fixes race conditions from PR 5563. Disabled by default - enable with experimental.askquestion_tool config. v1.1.4 improvements: callID validation, fallback scan detection for delayed messages, getMetadata/findInParts helpers.",
"experimentalConfig": "askquestion_tool",
"description": "Interactive tool that allows AI to pause and solicit structured feedback via TUI/web wizard with single/multi-select and confirm dialogs. Fixes race conditions from PR 5563. Enabled by default. v1.1.4 improvements: callID validation, fallback scan detection for delayed messages, getMetadata/findInParts helpers.",
"files": [
"packages/opencode/src/askquestion/index.ts",
"packages/opencode/src/tool/askquestion.ts",
Expand Down Expand Up @@ -235,15 +234,10 @@
"description": "API endpoints for askquestion respond and cancel",
"markers": ["/askquestion/respond", "/askquestion/cancel", "AskQuestion.respond", "AskQuestion.cancel"]
},
{
"file": "packages/opencode/src/config/config.ts",
"description": "Experimental config flag to enable askquestion tool",
"markers": ["askquestion_tool: z.boolean().optional()"]
},
{
"file": "packages/opencode/src/tool/registry.ts",
"description": "Conditional tool registration based on experimental config",
"markers": ["config.experimental?.askquestion_tool === true ? [AskQuestionTool]"]
"description": "AskQuestionTool registration (enabled by default)",
"markers": ["AskQuestionTool"]
},
{
"file": "packages/app/src/components/askquestion-wizard.tsx",
Expand Down