MCPcopy Index your code
hub / github.com/docker/docker-agent / SetToolStatus

Method SetToolStatus

pkg/tui/components/transcript/transcript.go:128–136  ·  view source on GitHub ↗

SetToolStatus updates the status of the tool call with the given ID, reporting whether an entry was found. The view is recreated so no memoized rendering of the previous status can survive the update.

(callID string, status types.ToolStatus)

Source from the content-addressed store, hash-verified

126// reporting whether an entry was found. The view is recreated so no
127// memoized rendering of the previous status can survive the update.
128func (t *Transcript) SetToolStatus(callID string, status types.ToolStatus) (tea.Cmd, bool) {
129 for i := range slices.Backward(t.msgs) {
130 if t.msgs[i].Type != types.MessageTypeToolCall || t.msgs[i].ToolCall.ID != callID {
131 continue
132 }
133 return t.refreshToolView(i, status), true
134 }
135 return nil, false
136}
137
138// FinalizeToolCalls flips any tool entry still pending, running, or waiting
139// for confirmation to the given terminal status. Defensive: a stream error

Callers 2

TestSetToolStatusFunction · 0.80

Calls 1

refreshToolViewMethod · 0.95

Tested by 2

TestSetToolStatusFunction · 0.64