fix: small tools details

This commit is contained in:
Nate 2025-08-24 22:45:29 -07:00
parent 6274c37a7f
commit 100ff72bbe
3 changed files with 8 additions and 6 deletions

View file

@ -57,10 +57,11 @@ export async function streamChatResponseWithInterruption(
}
// Always create a new assistant message for each tool call
const toolCallId = `tool_${Date.now()}`;
const toolCallState: ToolCallState = {
toolCallId: `tool_${Date.now()}`,
toolCallId: toolCallId,
toolCall: {
id: `tool_${Date.now()}`,
id: toolCallId,
type: "function",
function: {
name: toolName,

View file

@ -115,7 +115,7 @@ export const ToolPermissionSelector: React.FC<ToolPermissionSelectorProps> = ({
</Text>
{/* Show preview of what the tool will do */}
<Box marginTop={1}>
<Box>
<ToolPreview
toolName={toolName}
toolArgs={toolArgs}

View file

@ -36,10 +36,11 @@ export function createStreamCallbacks(
const newHistory = [...prev];
// Always create a new assistant message for each tool call
const toolCallId = `tool_${Date.now()}`;
const toolCallState: ToolCallState = {
toolCallId: `tool_${Date.now()}`,
toolCallId: toolCallId,
toolCall: {
id: `tool_${Date.now()}`,
id: toolCallId,
type: "function",
function: {
name: toolName,
@ -55,7 +56,7 @@ export function createStreamCallbacks(
role: "assistant",
content: "",
toolCalls: [{
id: toolCallState.toolCallId,
id: toolCallId,
type: "function",
function: {
name: toolName,