clean
This commit is contained in:
@@ -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 : ""
|
||||
|
||||
Reference in New Issue
Block a user