This commit is contained in:
LukeParkerDev
2026-04-24 07:39:19 +10:00
parent 3e30068907
commit 6d66973fd5
10 changed files with 232 additions and 116 deletions
+1 -1
View File
@@ -409,7 +409,7 @@ export const RunCommand = cmd({
async function execute(sdk: OpencodeClient) {
function tool(part: ToolPart) {
try {
if (ShellToolID.has(part.tool)) return shell(props<typeof ShellTool>(part))
if (ShellToolID.normalize(part.tool) === ShellToolID.id) return shell(props<typeof ShellTool>(part))
if (part.tool === "glob") return glob(props<typeof GlobTool>(part))
if (part.tool === "grep") return grep(props<typeof GrepTool>(part))
if (part.tool === "read") return read(props<typeof ReadTool>(part))
@@ -1541,7 +1541,7 @@ function ToolPart(props: { last: boolean; part: ToolPart; message: AssistantMess
return (
<Show when={!shouldHide()}>
<Switch>
<Match when={ShellToolID.has(props.part.tool)}>
<Match when={ShellToolID.normalize(props.part.tool) === ShellToolID.id}>
<Shell {...toolprops} />
</Match>
<Match when={props.part.tool === "glob"}>
@@ -288,7 +288,7 @@ export function PermissionPrompt(props: { request: PermissionRequest }) {
}
}
if (ShellToolID.has(permission)) {
if (ShellToolID.normalize(permission) === ShellToolID.id) {
const title =
typeof data.description === "string" && data.description ? data.description : "Shell command"
const command = typeof data.command === "string" ? data.command : ""