Skip to content

Featrue remove execute tool calls stream#1

Merged
lloydzhou merged 2 commits intomainfrom
featrue-remove-execute_tool_calls_stream
Apr 15, 2026
Merged

Featrue remove execute tool calls stream#1
lloydzhou merged 2 commits intomainfrom
featrue-remove-execute_tool_calls_stream

Conversation

@lloydzhou
Copy link
Copy Markdown
Owner

No description provided.

…ool_calls_stream

- Move tool execution from post-stream execute_tool_calls_stream() into
  the TOOL_CALL case inside the stream parsing loop
- Replace conv_add_tool_results + build_tool_results_content_json with
  per-tool conv_add_single_tool_result calls
- Replace session_log_tool_results with inline collection via
  tool_conv_results variable
- Simplify case $stop to only handle fatal stop reasons (error/max_tokens/length)
- All other stop reasons handled uniformly in post-case if/else block
- Update ARCHITECTURE.md: remove stale execute_tool_calls() references

Net: +53/-109 lines, 46/46 tests pass
- Bash: replace conv_add_single_tool_result loop with batch conv_add_tool_results call
- Go: inline tool dispatch into SSE callback, remove executeToolCalls (~48 lines)
- Rust: inline tool dispatch into SSE callback, remove execute_tool_calls (~56 lines)
- Align stop-reason logic across all three: fatal stops (error/max_tokens/length)
  exit immediately before conv write; interrupt check guards persistence;
  compact after conv write; continue loop only for tool_use/tool_calls
- Add ARCHITECTURE.port-alignment.md documenting completed alignment state
- All three versions compile/check successfully
- Zero stale references to removed functions in source code
@lloydzhou lloydzhou merged commit 0afb2c7 into main Apr 15, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant