tweak: (opencode run): adjust tool call rendering, reduce number of "Unknowns" (#1012)

This commit is contained in:
Aiden Cline 2025-07-15 11:22:57 -05:00 committed by GitHub
parent f707fb3f8d
commit bbeb579d3a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -124,7 +124,9 @@ export const RunCommand = cmd({
if (part.type === "tool" && part.state.status === "completed") {
const [tool, color] = TOOL[part.tool] ?? [part.tool, UI.Style.TEXT_INFO_BOLD]
printEvent(color, tool, part.state.title || "Unknown")
const title =
part.state.title || Object.keys(part.state.input).length > 0 ? JSON.stringify(part.state.input) : "Unknown"
printEvent(color, tool, title)
}
if (part.type === "text") {