chore: kill unused tool (#23701)

This commit is contained in:
Aiden Cline
2026-04-21 11:31:20 -04:00
committed by GitHub
parent b5acc2203c
commit 2486621ca1
47 changed files with 60 additions and 196 deletions

View File

@@ -474,7 +474,7 @@ test("legacy tools config converts to permissions", async () => {
})
})
test("legacy tools config maps write/edit/patch/multiedit to edit permission", async () => {
test("legacy tools config maps write/edit/patch to edit permission", async () => {
await using tmp = await tmpdir({
config: {
agent: {

View File

@@ -1427,35 +1427,6 @@ test("migrates legacy patch tool to edit permission", async () => {
})
})
test("migrates legacy multiedit tool to edit permission", async () => {
await using tmp = await tmpdir({
init: async (dir) => {
await Filesystem.write(
path.join(dir, "opencode.json"),
JSON.stringify({
$schema: "https://opencode.ai/config.json",
agent: {
test: {
tools: {
multiedit: false,
},
},
},
}),
)
},
})
await Instance.provide({
directory: tmp.path,
fn: async () => {
const config = await load()
expect(config.agent?.["test"]?.permission).toEqual({
edit: "deny",
})
},
})
})
test("migrates mixed legacy tools config", async () => {
await using tmp = await tmpdir({
init: async (dir) => {

View File

@@ -422,9 +422,9 @@ test("disabled - disables tool when denied", () => {
expect(result.has("read")).toBe(false)
})
test("disabled - disables edit/write/apply_patch/multiedit when edit denied", () => {
test("disabled - disables edit/write/apply_patch when edit denied", () => {
const result = Permission.disabled(
["edit", "write", "apply_patch", "multiedit", "bash"],
["edit", "write", "apply_patch", "bash"],
[
{ permission: "*", pattern: "*", action: "allow" },
{ permission: "edit", pattern: "*", action: "deny" },
@@ -433,7 +433,6 @@ test("disabled - disables edit/write/apply_patch/multiedit when edit denied", ()
expect(result.has("edit")).toBe(true)
expect(result.has("write")).toBe(true)
expect(result.has("apply_patch")).toBe(true)
expect(result.has("multiedit")).toBe(true)
expect(result.has("bash")).toBe(false)
})