feat(tools): stream shell_run output live into the TUI
This commit is contained in:
@@ -19,6 +19,15 @@ type Tool interface {
|
||||
Execute(ctx context.Context, args json.RawMessage) (string, error)
|
||||
}
|
||||
|
||||
// StreamingTool is optionally implemented by tools that can report partial
|
||||
// output while they execute. emit receives chunks of the tool's output as
|
||||
// they are produced; the returned string is still the complete result that
|
||||
// gets sent back to the model.
|
||||
type StreamingTool interface {
|
||||
Tool
|
||||
ExecuteStream(ctx context.Context, args json.RawMessage, emit func(string) error) (string, error)
|
||||
}
|
||||
|
||||
// MutatingTool is optionally implemented by tools that modify external state.
|
||||
// It is used by the agent to determine whether tool calls can run in parallel.
|
||||
type MutatingTool interface {
|
||||
|
||||
Reference in New Issue
Block a user