Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 19 additions & 7 deletions src/tools/builder/core/build_loop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ struct ReasoningBundle {
ctx: ReasoningContext,
}

struct ToolCallPayload {
tool_calls: Vec<ToolCall>,
content: Option<String>,
}

fn is_completion_signal(lower: &str) -> bool {
COMPLETION_MARKERS
.iter()
Expand Down Expand Up @@ -231,18 +236,17 @@ impl LlmSoftwareBuilder {
inputs: &BuildLoopParams,
bundle: &mut ReasoningBundle,
state: &mut BuildLoopState,
tool_calls: Vec<ToolCall>,
content: Option<String>,
payload: ToolCallPayload,
) {
bundle
.ctx
.messages
.push(ChatMessage::assistant_with_tool_calls(
content,
tool_calls.clone(),
payload.content,
payload.tool_calls.clone(),
));

for tc in tool_calls {
for tc in payload.tool_calls {
state.logs.push(BuildLog {
timestamp: Utc::now(),
phase: state.current_phase,
Expand Down Expand Up @@ -368,8 +372,16 @@ impl LlmSoftwareBuilder {
content,
} => {
state.tools_executed = true;
self.handle_tool_calls(&inputs, &mut bundle, &mut state, tool_calls, content)
.await;
self.handle_tool_calls(
&inputs,
&mut bundle,
&mut state,
ToolCallPayload {
tool_calls,
content,
},
)
.await;
Comment on lines +375 to +384
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ New issue: Large Method
LlmSoftwareBuilder.execute_build_loop has 76 lines, threshold = 70

Suppress

}
}
}
Expand Down
Loading