mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-17 18:35:19 +02:00
feat: implement unsaved changes handling in editor and sidebar
- Introduced global state management for unsaved changes and pending navigation using Jotai atoms. - Updated the editor component to sync local unsaved changes with global state and handle navigation prompts. - Enhanced sidebar functionality to check for unsaved changes before navigating to a new note. - Added cleanup logic for global state on component unmount to prevent stale data.
This commit is contained in:
parent
ee46a43afc
commit
b53b19170e
4 changed files with 108 additions and 7 deletions
|
|
@ -14,7 +14,7 @@ export const chatSummary = z.object({
|
|||
});
|
||||
|
||||
export const chatDetails = chatSummary.extend({
|
||||
initial_connectors: z.array(z.string()),
|
||||
initial_connectors: z.array(z.string()).nullable().optional(),
|
||||
messages: z.array(z.any()),
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue