diff options
| author | Aiden Cline <[email protected]> | 2026-02-12 23:20:33 -0600 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-02-12 23:20:33 -0600 |
| commit | 98aeb60a7f0e00e251ff02c360829a3679d65717 (patch) | |
| tree | c27f3a4c774fddddb85caf25fc50a9411a6075bf | |
| parent | 1608565c808c9136bdc6930a356649bd9824cc69 (diff) | |
| download | opencode-98aeb60a7f0e00e251ff02c360829a3679d65717.tar.gz opencode-98aeb60a7f0e00e251ff02c360829a3679d65717.zip | |
fix: ensure @-ing a dir uses the read tool instead of dead list tool (#13428)
| -rw-r--r-- | packages/opencode/src/session/prompt.ts | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/packages/opencode/src/session/prompt.ts b/packages/opencode/src/session/prompt.ts index 99d44cd85..be813e823 100644 --- a/packages/opencode/src/session/prompt.ts +++ b/packages/opencode/src/session/prompt.ts @@ -26,7 +26,6 @@ import { ToolRegistry } from "../tool/registry" import { MCP } from "../mcp" import { LSP } from "../lsp" import { ReadTool } from "../tool/read" -import { ListTool } from "../tool/ls" import { FileTime } from "../file/time" import { Flag } from "../flag/flag" import { ulid } from "ulid" @@ -1198,7 +1197,7 @@ export namespace SessionPrompt { } if (part.mime === "application/x-directory") { - const args = { path: filepath } + const args = { filePath: filepath } const listCtx: Tool.Context = { sessionID: input.sessionID, abort: new AbortController().signal, @@ -1209,7 +1208,7 @@ export namespace SessionPrompt { metadata: async () => {}, ask: async () => {}, } - const result = await ListTool.init().then((t) => t.execute(args, listCtx)) + const result = await ReadTool.init().then((t) => t.execute(args, listCtx)) return [ { id: Identifier.ascending("part"), @@ -1217,7 +1216,7 @@ export namespace SessionPrompt { sessionID: input.sessionID, type: "text", synthetic: true, - text: `Called the list tool with the following input: ${JSON.stringify(args)}`, + text: `Called the Read tool with the following input: ${JSON.stringify(args)}`, }, { id: Identifier.ascending("part"), |
