From 8ff34d5335093c4ff85473227f39b3e83133d999 Mon Sep 17 00:00:00 2001 From: sharkiecodes Date: Tue, 22 Jul 2025 13:44:08 -0400 Subject: Completed agent functionality - recognition of all documents on canvas --- .../nodes/chatbot/chatboxcomponents/ChatBox.tsx | 29 ++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) (limited to 'src/client/views/nodes/chatbot/chatboxcomponents/ChatBox.tsx') diff --git a/src/client/views/nodes/chatbot/chatboxcomponents/ChatBox.tsx b/src/client/views/nodes/chatbot/chatboxcomponents/ChatBox.tsx index 732c4d637..195e85412 100644 --- a/src/client/views/nodes/chatbot/chatboxcomponents/ChatBox.tsx +++ b/src/client/views/nodes/chatbot/chatboxcomponents/ChatBox.tsx @@ -49,6 +49,8 @@ import { AgentDocumentManager } from '../utils/AgentDocumentManager'; import { AiOutlineSend } from 'react-icons/ai'; import { SnappingManager } from '../../../../util/SnappingManager'; import { Button, Size, Type } from '@dash/components'; +import { MdLink, MdViewModule } from 'react-icons/md'; +import { Tooltip } from '@mui/material'; dotenv.config(); @@ -105,6 +107,12 @@ export class ChatBox extends ViewBoxAnnotatableComponent() { this._inputValue = input; }); + @action + toggleCanvasMode = () => { + const newMode = !this.docManager.getCanvasMode(); + this.docManager.setCanvasMode(newMode); + }; + /** * Constructor initializes the component, sets up OpenAI, vector store, and agent instances, * and observes changes in the chat history to save the state in dataDoc. @@ -1438,8 +1446,25 @@ export class ChatBox extends ViewBoxAnnotatableComponent() { )}

{this.userName()}'s AI Assistant

-
- {this.renderFontSizeIcon()} +
+ + {this.docManager.getCanvasMode() + ? "Click to limit scope to linked documents" + : "Click to expand scope to all documents on canvas" + } +
+ } placement="bottom"> +
+ {this.docManager.getCanvasMode() ? : } +
+ +
+ {this.renderFontSizeIcon()} +
{this._isFontSizeModalOpen && (
-- cgit v1.2.3-70-g09d2