diff --git a/src/services/index.ts b/src/services/index.ts index 78f3fcbe..aa0ca095 100644 --- a/src/services/index.ts +++ b/src/services/index.ts @@ -60,6 +60,8 @@ export class ChatService { async sendMessage( chat_id: string, message: string, + sourceWebsocketID: string, + workspaceUUID: string, contextTags?: ContextTag[] ): Promise { try { @@ -76,7 +78,9 @@ export class ChatService { body: JSON.stringify({ chat_id, message, - context_tags: contextTags + context_tags: contextTags, + sourceWebsocketID, + workspaceUUID }) }); diff --git a/src/store/chat.ts b/src/store/chat.ts index 4556ff24..d7da80cb 100644 --- a/src/store/chat.ts +++ b/src/store/chat.ts @@ -91,9 +91,17 @@ export class ChatHistoryStore implements ChatStore { async sendMessage( chat_id: string, message: string, + sourceWebsocketID: string, + workspaceUUID: string, contextTags?: ContextTag[] ): Promise { - const newMessage = await chatService.sendMessage(chat_id, message, contextTags); + const newMessage = await chatService.sendMessage( + chat_id, + message, + sourceWebsocketID, + workspaceUUID, + contextTags + ); if (newMessage) { this.addMessage(newMessage); } diff --git a/src/store/interface.ts b/src/store/interface.ts index 9cbb3e74..a260be2a 100644 --- a/src/store/interface.ts +++ b/src/store/interface.ts @@ -478,6 +478,7 @@ export interface ChatMessage { status: ChatStatus; source: ChatSource; sourceWebsocketID: string; + workspaceUUID: string; } export interface Chat {