mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-27 17:56:25 +02:00
- Updated the new chat routes to include handling for mentioned document IDs, allowing users to reference specific documents in their chat. - Modified the NewChatRequest schema to accommodate optional document IDs. - Implemented document mention formatting in the chat streaming service for improved context. - Enhanced the frontend to manage document mentions, including a new atom for state management and UI updates for document selection. - Refactored the DocumentsDataTable component for better integration with the new mention functionality.
10 lines
273 B
TypeScript
10 lines
273 B
TypeScript
"use client";
|
|
|
|
import { atom } from "jotai";
|
|
|
|
/**
|
|
* Atom to store the IDs of documents mentioned in the current chat composer.
|
|
* This is used to pass document context to the backend when sending a message.
|
|
*/
|
|
export const mentionedDocumentIdsAtom = atom<number[]>([]);
|
|
|