You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: apps/web/client/src/app/project/[id]/_components/right-panel/chat-tab/chat-messages/message-content/tool-call-display.tsx
Copy file name to clipboardExpand all lines: apps/web/client/src/app/project/[id]/_components/right-panel/chat-tab/chat-messages/message-content/tool-call-simple.tsx
constimagesPrompt=`The user has attached ${images.length} image(s) to this message:\n${imageList}\n\nYou can:\n- Use the "view_image" tool to analyze the image content\n- Use the "upload_image" tool to save it to the project\n\nDetermine the appropriate action based on the user's request.`;
'Edit the contents of a file with fuzzy matching instead of search and replace. This should be used as a fallback when the search and replace tool fails. It calls another agent to do the actual editing.',
74
74
inputSchema: FUZZY_EDIT_FILE_TOOL_PARAMETERS,
75
75
});
76
+
77
+
exportconstVIEW_IMAGE_TOOL_NAME='view_image';
78
+
exportconstVIEW_IMAGE_TOOL_PARAMETERS=z.object({
79
+
image_reference: z
80
+
.string()
81
+
.describe(
82
+
'Reference to an image in the chat context (use the display name or index number)',
83
+
),
84
+
});
85
+
exportconstviewImageTool=tool({
86
+
description:
87
+
"Retrieves and views an image from the chat context for analysis. Use this tool when the user asks you to analyze, describe, or work with an image they've attached. The image data will be returned so you can see and analyze its contents. This does NOT save the image to the project.",
'Reference to an image in the chat context (use the display name or index number)',
97
+
),
98
+
destination_path: z
99
+
.string()
100
+
.optional()
101
+
.describe('Destination path within the project (default: "public/assets/images")'),
102
+
filename: z
103
+
.string()
104
+
.optional()
105
+
.describe('Custom filename (without extension). If not provided, a UUID will be generated'),
106
+
branchId: BRANCH_ID_SCHEMA,
107
+
});
108
+
exportconstuploadImageTool=tool({
109
+
description:
110
+
"Uploads an image from the chat context to the project's file system. Use this tool when the user asks you to save, add, or upload an image to their project. The image will be stored in the project's public directory and can be referenced in code. After uploading, you can use the file path in your code changes.",
0 commit comments