mirror of
https://github.com/NeuralNomadsAI/CodeNomad.git
synced 2026-08-27 01:02:01 +00:00
feat: include bash timeout
This commit is contained in:
parent
d4281f1d9c
commit
cd8948770d
1 changed files with 9 additions and 3 deletions
|
|
@ -9,10 +9,16 @@ export const bashRenderer: ToolRenderer = {
|
|||
if (!state) return undefined
|
||||
const { input } = readToolStatePayload(state)
|
||||
const name = getToolName("bash")
|
||||
if (typeof input.description === "string" && input.description.length > 0) {
|
||||
return `${name} ${input.description}`
|
||||
const description = typeof input.description === "string" && input.description.length > 0 ? 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 }) {
|
||||
const state = toolState()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue