Skip to content

Commit 437f83d

Browse files
authored
fix(chat): cli crashes when tool_uses is none (#1092)
1 parent 9ae9239 commit 437f83d

File tree

1 file changed

+2
-2
lines changed
  • crates/q_cli/src/cli/chat

1 file changed

+2
-2
lines changed

crates/q_cli/src/cli/chat/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -475,10 +475,10 @@ where
475475
tool_uses,
476476
pending_tool_index,
477477
} => {
478-
let tool_uses_clone = tool_uses.clone().unwrap();
478+
let tool_uses_clone = tool_uses.clone();
479479
tokio::select! {
480480
res = self.handle_input(input, tool_uses, pending_tool_index) => res,
481-
Some(_) = ctrl_c_stream.recv() => Err(ChatError::Interrupted { tool_uses: Some(tool_uses_clone) })
481+
Some(_) = ctrl_c_stream.recv() => Err(ChatError::Interrupted { tool_uses: tool_uses_clone })
482482
}
483483
},
484484
ChatState::ExecuteTools(tool_uses) => {

0 commit comments

Comments
 (0)