fix: small tools details
This commit is contained in:
parent
6274c37a7f
commit
100ff72bbe
3 changed files with 8 additions and 6 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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}
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue