runToolCall executes one tool call off the UI goroutine. parent is the per-turn root: Ctrl+C aborts the tool mid-run, and the toolResultMsg carries that ctx so Update can drop it if the turn has moved on. No outer timeout: bash owns its model-set per-call timeout (capped at 3600s by the schema), wr
(parent context.Context, call chmctx.ToolCall)
| 55 | // by the schema), write_file/edit_file are filesystem-fast. An outer cap would |
| 56 | // silently override the model's bash timeout: a 30-min build dying at 3 min. |
| 57 | func runToolCall(parent context.Context, call chmctx.ToolCall) tea.Cmd { |
| 58 | return func() tea.Msg { |
| 59 | return toolResultMsg{Msg: tools.Execute(parent, call), turnCtx: parent} |
| 60 | } |
| 61 | } |
| 62 | |
| 63 | // errorMessage maps a stream error into a one-line TUI hint, same format across |
| 64 | // all profiles. |