feat: refactor bash tool with shell-aware prompts for bash, pwsh+powershell, and cmd (#20039)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { PlanExitTool } from "./plan"
|
||||
import { Session } from "@/session/session"
|
||||
import { QuestionTool } from "./question"
|
||||
import { BashTool } from "./bash"
|
||||
import { ShellTool } from "./shell"
|
||||
import { EditTool } from "./edit"
|
||||
import { GlobTool } from "./glob"
|
||||
import { GrepTool } from "./grep"
|
||||
@@ -106,7 +106,7 @@ export const layer: Layer.Layer<
|
||||
const plan = yield* PlanExitTool
|
||||
const webfetch = yield* WebFetchTool
|
||||
const websearch = yield* WebSearchTool
|
||||
const bash = yield* BashTool
|
||||
const shell = yield* ShellTool
|
||||
const globtool = yield* GlobTool
|
||||
const writetool = yield* WriteTool
|
||||
const edit = yield* EditTool
|
||||
@@ -195,7 +195,7 @@ export const layer: Layer.Layer<
|
||||
|
||||
const tool = yield* Effect.all({
|
||||
invalid: Tool.init(invalid),
|
||||
bash: Tool.init(bash),
|
||||
shell: Tool.init(shell),
|
||||
read: Tool.init(read),
|
||||
glob: Tool.init(globtool),
|
||||
grep: Tool.init(greptool),
|
||||
@@ -217,7 +217,7 @@ export const layer: Layer.Layer<
|
||||
builtin: [
|
||||
tool.invalid,
|
||||
...(questionEnabled ? [tool.question] : []),
|
||||
tool.bash,
|
||||
tool.shell,
|
||||
tool.read,
|
||||
tool.glob,
|
||||
tool.grep,
|
||||
|
||||
Reference in New Issue
Block a user