mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-05 05:42:39 +02:00
feat: various UI fixes, prompt optimizations, and allowing duplicate docs
- Updated `content_hash` in the `Document` model to remove global uniqueness, allowing identical content across different paths. - Enhanced `_create_document` function to handle path uniqueness and prevent session-poisoning from `IntegrityError`. - Added detailed comments for clarity on the changes and their implications. - Introduced new citation handling in the editor for improved user experience with citation jumps. - Updated package dependencies in the frontend for better functionality.
This commit is contained in:
parent
e6433f78c4
commit
b9a66cb417
26 changed files with 1540 additions and 852 deletions
|
|
@ -0,0 +1,19 @@
|
|||
import { atom } from "jotai";
|
||||
|
||||
/**
|
||||
* Cross-component handoff for citation jumps. Set by `InlineCitation` when a
|
||||
* numeric chunk badge is clicked (after the document has been resolved); read
|
||||
* by `DocumentTabContent` once the matching document tab mounts so it can
|
||||
* scroll to and softly highlight the cited chunk inside the rendered markdown.
|
||||
*
|
||||
* Cleared by `DocumentTabContent` only after a terminal state — exact /
|
||||
* approximate / miss — has been reached, so that an escalation refetch (2MB
|
||||
* preview → 16MB) keeps the pending intent alive across the re-render.
|
||||
*/
|
||||
export interface PendingChunkHighlight {
|
||||
documentId: number;
|
||||
chunkId: number;
|
||||
chunkText: string;
|
||||
}
|
||||
|
||||
export const pendingChunkHighlightAtom = atom<PendingChunkHighlight | null>(null);
|
||||
Loading…
Add table
Add a link
Reference in a new issue