From 9c7ddca0782a1d8dd1a8ff35759321b867a2b175 Mon Sep 17 00:00:00 2001 From: sharkiecodes Date: Wed, 23 Jul 2025 15:46:00 -0400 Subject: agent can give a list of docs on your canvas --- src/client/views/nodes/chatbot/tools/CanvasDocsTool.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/client/views/nodes/chatbot/tools/CanvasDocsTool.ts b/src/client/views/nodes/chatbot/tools/CanvasDocsTool.ts index cd4d223ec..25b17e5c9 100644 --- a/src/client/views/nodes/chatbot/tools/CanvasDocsTool.ts +++ b/src/client/views/nodes/chatbot/tools/CanvasDocsTool.ts @@ -6,7 +6,6 @@ import { DocumentView } from '../../DocumentView'; import { Doc } from '../../../../../fields/Doc'; import { v4 as uuidv4 } from 'uuid'; import { Id } from '../../../../../fields/FieldSymbols'; -import { DocumentType } from '../../../../documents/DocumentTypes'; const parameterRules = [ { @@ -37,7 +36,7 @@ const parameterRules = [ const toolInfo: ToolInfo = { name: 'canvasDocs', - description: 'Access and analyze all documents currently visible on the canvas/workspace. This tool provides broader document recognition beyond just linked documents, allowing the agent to work with any document in the current view. Useful for comprehensive document analysis, finding related content, and understanding the full context of the workspace.', + description: 'Access and analyze all documents currently visible on the canvas/workspace. This tool provides broader document recognition beyond just linked documents, allowing the agent to work with any document in the current view. IMPORTANT: Always call this tool when the user asks about documents, even if you have previous results, as documents may have been added, removed, or modified since your last check. Useful for comprehensive document analysis, finding related content, and understanding the full context of the workspace.', parameterRules, citationRules: 'Cite documents by their title and type when referencing canvas documents.', }; @@ -325,7 +324,7 @@ export class CanvasDocsTool extends BaseTool { { type: 'text', text: ` -Found ${canvasDocs.length} documents on the canvas: +Found ${canvasDocs.length} documents on the canvas (checked at ${new Date().toLocaleTimeString()}): ${documentSummaries.map(doc => `• ${doc.title} (${doc.type}) - ID: ${doc.id} - Position: (${doc.x}, ${doc.y}) - Size: ${doc.width}x${doc.height}` -- cgit v1.2.3-70-g09d2