浏览代码

review cleanup

Aiden Cline 3 月之前
父节点
当前提交
ac3d0cb5a3
共有 2 个文件被更改,包括 3 次插入2 次删除
  1. 1 1
      packages/opencode/src/cli/cmd/tui/routes/session/index.tsx
  2. 2 1
      packages/opencode/src/tool/registry.ts

+ 1 - 1
packages/opencode/src/cli/cmd/tui/routes/session/index.tsx

@@ -39,7 +39,7 @@ import { TodoWriteTool } from "@/tool/todo"
 import type { GrepTool } from "@/tool/grep"
 import type { ListTool } from "@/tool/ls"
 import type { EditTool } from "@/tool/edit"
-import type { ApplyPatchTool } from "@/tool/apply_patch.ts"
+import type { ApplyPatchTool } from "@/tool/apply_patch"
 import type { WebFetchTool } from "@/tool/webfetch"
 import type { TaskTool } from "@/tool/task"
 import type { QuestionTool } from "@/tool/question"

+ 2 - 1
packages/opencode/src/tool/registry.ts

@@ -138,7 +138,8 @@ export namespace ToolRegistry {
           }
 
           // use apply tool in same format as codex
-          const usePatch = model.modelID.includes("gpt-5") && !model.modelID.includes("oss")
+          const usePatch =
+            model.modelID.includes("gpt-") && !model.modelID.includes("oss") && !model.modelID.includes("gpt-4")
           if (t.id === "apply_patch") return usePatch
           if (t.id === "edit" || t.id === "write") return !usePatch