remove opencode_ prefixes from tool names. unfortunately this will break
publish / publish (push) Has been cancelled

all old sessions and share links. we'll be more backwards compatible in
the future once we're more stable.
This commit is contained in:
Dax Raad
2025-06-19 09:59:12 -04:00
parent 8c6e559179
commit b7319a304f
18 changed files with 59 additions and 59 deletions
+2 -2
View File
@@ -274,7 +274,7 @@ export namespace Provider {
const cfg = await Config.get()
const provider = await list()
.then((val) => Object.values(val))
.then((x) => x.find((p) => !cfg.provider || cfg.provider === p.info.id))
.then((x) => x.find((p) => !cfg.provider || Object.keys(cfg.provider).includes(p.info.id)))
if (!provider) throw new Error("no providers found")
const [model] = sort(Object.values(provider.info.models))
if (!model) throw new Error("no models found")
@@ -304,7 +304,7 @@ export namespace Provider {
]
const TOOL_MAPPING: Record<string, Tool.Info[]> = {
anthropic: TOOLS.filter((t) => t.id !== "opencode.patch"),
anthropic: TOOLS.filter((t) => t.id !== "patch"),
openai: TOOLS.map((t) => ({
...t,
parameters: optionalToNullable(t.parameters),