refactor(core): remove shell description input (#32823)

This commit is contained in:
Aiden Cline
2026-06-22 21:18:06 -05:00
committed by GitHub
parent 7d1d72dfa9
commit 1707b5addd
27 changed files with 124 additions and 161 deletions
+2 -10
View File
@@ -263,7 +263,7 @@ const parse = Effect.fn("ShellTool.parse")(function* (command: string, ps: boole
const ask = Effect.fn("ShellTool.ask")(function* (
ctx: Tool.Context,
scan: Scan,
input: { command: string; description: string },
input: { command: string },
) {
if (scan.dirs.size > 0) {
const directories = Array.from(scan.dirs)
@@ -277,7 +277,6 @@ const ask = Effect.fn("ShellTool.ask")(function* (
always: globs,
metadata: {
command: input.command,
description: input.description,
directories,
patterns: globs,
},
@@ -291,7 +290,6 @@ const ask = Effect.fn("ShellTool.ask")(function* (
always: Array.from(scan.always),
metadata: {
command: input.command,
description: input.description,
},
})
})
@@ -438,7 +436,6 @@ export const ShellTool = Tool.define(
cwd: string
env: NodeJS.ProcessEnv
timeout: number
description: string
},
ctx: Tool.Context,
) {
@@ -482,7 +479,6 @@ export const ShellTool = Tool.define(
yield* ctx.metadata({
metadata: {
output: "",
description: input.description,
},
})
@@ -523,7 +519,6 @@ export const ShellTool = Tool.define(
ctx.metadata({
metadata: {
output: last,
description: input.description,
},
}),
),
@@ -534,7 +529,6 @@ export const ShellTool = Tool.define(
return ctx.metadata({
metadata: {
output: last,
description: input.description,
},
})
}),
@@ -593,11 +587,10 @@ export const ShellTool = Tool.define(
output += "\n\n<shell_metadata>\n" + meta.join("\n") + "\n</shell_metadata>"
}
return {
title: input.description,
title: input.command,
metadata: {
output: last || preview(output),
exit: code,
description: input.description,
truncated: cut,
...(cut && file ? { outputPath: file } : {}),
},
@@ -646,7 +639,6 @@ export const ShellTool = Tool.define(
cwd,
env: yield* shellEnv(ctx, cwd),
timeout,
description: params.description,
},
ctx,
)