mirror of
https://github.com/anomalyco/opencode.git
synced 2026-04-24 06:45:22 +00:00
fix
This commit is contained in:
@@ -74,6 +74,13 @@ function fallback(part: ToolPart) {
|
||||
})
|
||||
}
|
||||
|
||||
function errored(part: ToolPart) {
|
||||
inline({
|
||||
icon: "✗",
|
||||
title: `${part.tool} failed`,
|
||||
})
|
||||
}
|
||||
|
||||
function glob(info: ToolProps<typeof GlobTool>) {
|
||||
const root = info.input.path ?? ""
|
||||
const title = `Glob "${info.input.pattern}"`
|
||||
@@ -458,10 +465,12 @@ export const RunCommand = cmd({
|
||||
|
||||
if (part.type === "tool" && (part.state.status === "completed" || part.state.status === "error")) {
|
||||
if (emit("tool_use", { part })) continue
|
||||
tool(part)
|
||||
if (part.state.status === "error") {
|
||||
UI.error(part.state.error)
|
||||
if (part.state.status === "completed") {
|
||||
tool(part)
|
||||
continue
|
||||
}
|
||||
errored(part)
|
||||
UI.error(part.state.error)
|
||||
}
|
||||
|
||||
if (
|
||||
|
||||
Reference in New Issue
Block a user