feat: include bash timeout
This commit is contained in:
@@ -9,10 +9,16 @@ export const bashRenderer: ToolRenderer = {
|
|||||||
if (!state) return undefined
|
if (!state) return undefined
|
||||||
const { input } = readToolStatePayload(state)
|
const { input } = readToolStatePayload(state)
|
||||||
const name = getToolName("bash")
|
const name = getToolName("bash")
|
||||||
if (typeof input.description === "string" && input.description.length > 0) {
|
const description = typeof input.description === "string" && input.description.length > 0 ? input.description : ""
|
||||||
return `${name} ${input.description}`
|
const timeout = typeof input.timeout === "number" && input.timeout > 0 ? input.timeout : undefined
|
||||||
|
|
||||||
|
const baseTitle = description ? `${name} ${description}` : name
|
||||||
|
if (!timeout) {
|
||||||
|
return baseTitle
|
||||||
}
|
}
|
||||||
return name
|
|
||||||
|
const timeoutLabel = `${timeout}ms`
|
||||||
|
return `${baseTitle} · Timeout: ${timeoutLabel}`
|
||||||
},
|
},
|
||||||
renderBody({ toolState, renderMarkdown }) {
|
renderBody({ toolState, renderMarkdown }) {
|
||||||
const state = toolState()
|
const state = toolState()
|
||||||
|
|||||||
Reference in New Issue
Block a user