aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/client/views/nodes/chatbot/tools/CanvasDocsTool.ts19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/client/views/nodes/chatbot/tools/CanvasDocsTool.ts b/src/client/views/nodes/chatbot/tools/CanvasDocsTool.ts
index 090b9f5c9..cd4d223ec 100644
--- a/src/client/views/nodes/chatbot/tools/CanvasDocsTool.ts
+++ b/src/client/views/nodes/chatbot/tools/CanvasDocsTool.ts
@@ -238,6 +238,25 @@ export class CanvasDocsTool extends BaseTool<typeof parameterRules> {
return false;
}
+ // Skip dashboard/tab container documents - they shouldn't be exposed to canvas tool
+ if (doc._type_collection === 'docking') {
+ console.log(`[CanvasDocsTool] Skipped document from ${source}: docking collection (dashboard/tab) ${doc.title || docId}`);
+ return false;
+ }
+
+ // Skip generic collection containers without specific types
+ if (doc.type === 'collection' && !doc._type_collection) {
+ console.log(`[CanvasDocsTool] Skipped document from ${source}: generic collection container ${doc.title || docId}`);
+ return false;
+ }
+
+ // Skip documents with titles that indicate they are UI infrastructure (tabs, chats, dashboards)
+ const title = doc.title || '';
+ if (title.startsWith('Untitled Tab') || title.startsWith('Untitled Chat') || title.startsWith('Dashboard ')) {
+ console.log(`[CanvasDocsTool] Skipped document from ${source}: UI infrastructure document "${title}"`);
+ return false;
+ }
+
canvasDocs.push(doc);
console.log(`[CanvasDocsTool] Added document from ${source}: ${doc.title || 'Untitled'} (${doc.type || 'unknown'})`);
return true;