Skip to content

fix: add to note editor not opening#15

Merged
MrSibe merged 5 commits intomainfrom
fix/add-to-note-editor-not-opening
Dec 22, 2025
Merged

fix: add to note editor not opening#15
MrSibe merged 5 commits intomainfrom
fix/add-to-note-editor-not-opening

Conversation

@MrSibe
Copy link
Owner

@MrSibe MrSibe commented Dec 22, 2025

No description provided.

Fixed a state synchronization issue where the note editor would not
automatically open when clicking the 'add to note' button in chat.

Root cause:
- MessageItem.tsx was using useNoteStore() to create notes
- NotePanel.tsx was using useItemStore() to read isEditing state
- The two independent stores were not synchronized

Changes:
- Updated MessageItem.tsx to use useItemStore instead of useNoteStore
- Enhanced itemStore.ts with derived notes state for compatibility
- Updated SourcePanel.tsx to use useItemStore for consistency
- Added loadNotes() method to itemStore for API compatibility

The editor will now automatically open when creating notes from chat.
- Add buildProviderOptions method to AISDKProvider for provider-specific options
- Pass dimensions parameter via providerOptions in embed/embedMany calls
- Set default dimensions to 1024 in KnowledgeService for consistent vector size
- Support OpenAI text-embedding-3 models with custom dimensions
- Implement whitelist mechanism for providers that support dimensions parameter
- Try OpenAI-compatible format (/v1/models) first for better compatibility
- Fallback to native Ollama format (/api/tags) if OpenAI format fails
- Add detailed logging for debugging API format selection
- Improve baseUrl handling to support both /api and /v1 endpoints
- Add platform detection in MindMapPage component
- Add left padding for macOS window controls (64px)
- Add right padding for Windows window controls (128px)
- Prevent download and layout toggle buttons from being obscured by window controls
- Align with main window's platform-specific layout handling
- Add deriveNotes helper function to centralize derivation logic
- Update notes array in updateNote to reflect content changes
- Update notes array in deleteItem to reflect item removal
- Fixes issue where edited notes don't appear in knowledge base import list
@MrSibe MrSibe self-assigned this Dec 22, 2025
@MrSibe MrSibe added the bug Something isn't working label Dec 22, 2025
@MrSibe MrSibe merged commit f506c5b into main Dec 22, 2025
@MrSibe MrSibe deleted the fix/add-to-note-editor-not-opening branch December 22, 2025 04:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Dimension mismatch (1536 vs 1024) when using OpenAI text-embedding-3-small the knowledge base does not work

1 participant