GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(acp): add opt-in flag for question tool (#13562) · sujee/opencode@9d3c81a

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • .opencode/agent
    • translator.md
  • packages/opencode/src
    • acp
      • README.md
    • flag
      • flag.ts
    • tool
      • registry.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎.opencode/agent/translator.md‎

Copy file name to clipboardExpand all lines: .opencode/agent/translator.md
+1Lines changed: 1 addition & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -599,6 +599,7 @@ OPENCODE_EXPERIMENTAL_MARKDOWN
599599
OPENCODE_EXPERIMENTAL_OUTPUT_TOKEN_MAX
600600
OPENCODE_EXPERIMENTAL_OXFMT
601601
OPENCODE_EXPERIMENTAL_PLAN_MODE
602+
OPENCODE_ENABLE_QUESTION_TOOL
602603
OPENCODE_FAKE_VCS
603604
OPENCODE_GIT_BASH_PATH
604605
OPENCODE_MODEL
Collapse file

‎packages/opencode/src/acp/README.md‎

Copy file name to clipboardExpand all lines: packages/opencode/src/acp/README.md
+10Lines changed: 10 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,16 @@ opencode acp
4444
opencode acp --cwd /path/to/project
4545
```
4646

47+
### Question Tool Opt-In
48+
49+
ACP excludes `QuestionTool` by default.
50+
51+
```bash
52+
OPENCODE_ENABLE_QUESTION_TOOL=1 opencode acp
53+
```
54+
55+
Enable this only for ACP clients that support interactive question prompts.
56+
4757
### Programmatic
4858

4959
```typescript
Collapse file

‎packages/opencode/src/flag/flag.ts‎

Copy file name to clipboardExpand all lines: packages/opencode/src/flag/flag.ts
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ export namespace Flag {
3030
export declare const OPENCODE_CLIENT: string
3131
export const OPENCODE_SERVER_PASSWORD = process.env["OPENCODE_SERVER_PASSWORD"]
3232
export const OPENCODE_SERVER_USERNAME = process.env["OPENCODE_SERVER_USERNAME"]
33+
export const OPENCODE_ENABLE_QUESTION_TOOL = truthy("OPENCODE_ENABLE_QUESTION_TOOL")
3334

3435
// Experimental
3536
export const OPENCODE_EXPERIMENTAL = truthy("OPENCODE_EXPERIMENTAL")
Collapse file

‎packages/opencode/src/tool/registry.ts‎

Copy file name to clipboardExpand all lines: packages/opencode/src/tool/registry.ts
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,11 @@ export namespace ToolRegistry {
9494
async function all(): Promise<Tool.Info[]> {
9595
const custom = await state().then((x) => x.custom)
9696
const config = await Config.get()
97+
const question = ["app", "cli", "desktop"].includes(Flag.OPENCODE_CLIENT) || Flag.OPENCODE_ENABLE_QUESTION_TOOL
9798

9899
return [
99100
InvalidTool,
100-
...(["app", "cli", "desktop"].includes(Flag.OPENCODE_CLIENT) ? [QuestionTool] : []),
101+
...(question ? [QuestionTool] : []),
101102
BashTool,
102103
ReadTool,
103104
GlobTool,

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.