mirror of
https://github.com/logancyang/obsidian-copilot.git
synced 2026-07-22 07:50:24 +00:00
* fix(rename): Add automatic file renaming to match generated topic titles Adds automatic file renaming so that notes reflect the finalized AI-generated topic in their filename. I believe this restores previously expected behavior. Refs #2005 * Fix chat file renaming to respect original project and hidden directories - Pass captured project context to generateFileName for async rename, ensuring the filename uses the project active at save time rather than global current-project state. - Add fallback for hidden-directory files when reading epoch for rename, using the vault adapter if metadataCache is missing, so AI-generated topic renaming works for hidden folders. Fix #2240 * fix: honor explicit null project context in async chat renaming Refactor ChatPersistenceManager to distinguish between 'undefined' project (fallback to global) and 'null' project (explicitly no project). This prevents a race condition where non-project chats were incorrectly moved into project directories upon async file renaming. Key changes: - Updated 'generateFileName' to use strict undefined checking for project fallback. - Reordered method signatures for 'generateFileName', 'generateTopicAsyncIfNeeded', and 'renameFileToMatchTopic' to prioritize the project context. - Verified all internal call sites have been updated to match the new signatures. - Confirmed fix via unit tests and local compilation. |
||
|---|---|---|
| .. | ||
| ChatManager.test.ts | ||
| ChatManager.ts | ||
| ChatPersistenceManager.test.ts | ||
| ChatPersistenceManager.ts | ||
| ContextCompactor.ts | ||
| ContextManager.l2Promotion.test.ts | ||
| ContextManager.parseSegments.test.ts | ||
| ContextManager.ts | ||
| MessageLifecycle.test.ts | ||
| MessageLifecycle.xmltags.test.ts | ||
| MessageRepository.test.ts | ||
| MessageRepository.ts | ||