mirror of
https://github.com/supermemoryai/supermemory.git
synced 2026-09-06 08:16:03 +00:00
Add a 'Save to [space name]' button in the ChatSidebar component:
- saveState useState to track idle/saving/saved states
- useEffect to reset saveState to idle when new assistant messages arrive
- handleSaveToSpace callback that POSTs to /chat/save-as-document endpoint
- Save button rendered in chatToolbarActions, visible only when messages
exist and not in auto-space mode
The button shows contextual text: 'Save to {space}', 'Saving...', or
'Saved to space' based on the current save state.
|
||
|---|---|---|
| .. | ||
| input | ||
| message | ||
| chat-empty-state.tsx | ||
| chat-graph-context-rail.tsx | ||
| home-chat-composer.tsx | ||
| index.tsx | ||
| model-selector.tsx | ||