logancyang_obsidian-copilot/src
Michael Ryan 87ee9d0d56
fix(rename): Add automatic file renaming to match generated topic titles (#2240)
* 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.
2026-03-16 04:34:14 -07:00
..
cache Clean up dead code and update readme for privacy disclosure (#2071) 2025-12-15 20:50:46 -08:00
commands fix: Quick Ask/Command panel positioning overhaul (#2278) 2026-03-13 21:50:01 -07:00
components fix(agent): improve inline citations, query dedup, and answer source priority (#2300) 2026-03-14 23:41:31 -07:00
context Audit context envelope, tag alignment, artifact dedup, and logging (#2164) 2026-02-07 21:18:25 -08:00
contexts feat: New Setting UI. (#955) 2025-01-13 22:32:20 -08:00
core fix(rename): Add automatic file renaming to match generated topic titles (#2240) 2026-03-16 04:34:14 -07:00
editor fix: Quick Ask/Command panel positioning overhaul (#2278) 2026-03-13 21:50:01 -07:00
hooks feat: drag relevant notes and sources into editor to insert wikilinks (#2288) 2026-03-13 11:56:55 -07:00
imageProcessing Improve custom command (#1942) 2025-10-20 17:52:50 -07:00
integration_tests Implement modular context compaction architecture (#2159) 2026-02-06 21:52:33 -08:00
lib Add tw prefix to tailwind (#1497) 2025-05-31 22:30:54 -07:00
LLMProviders fix(tools): daily note template workflow for past/future dates (#2304) 2026-03-15 23:30:05 -07:00
memory Add CRUD to Saved Memory (#1929) 2025-10-22 23:33:35 -07:00
mentions feat: add Firecrawl and Supadata self-host support for web search and YouTube (#2196) 2026-02-19 20:44:39 -08:00
miyo Add license auth header to Miyo requests (#2260) 2026-03-05 07:37:51 +09:00
search feat: add custom Miyo server URL setting for remote deployments (#2229) 2026-03-03 11:29:43 +09:00
services fix: support both classic and modern YouTube transcript panel DOM structures (#2286) 2026-03-12 20:59:56 -07:00
settings feat(openrouter): enable prompt caching via cache_control (#2279) 2026-03-14 17:18:01 -07:00
state feat: implement auto-compact context with map-reduce summarization (#2106) 2026-01-13 22:15:24 -08:00
styles fix(agent): improve inline citations, query dedup, and answer source priority (#2300) 2026-03-14 23:41:31 -07:00
system-prompts fix(ui): improve system prompt template syntax hints (#2235) (#2245) 2026-03-02 21:58:29 -08:00
tests feat: Add project new context loading ui. (#1695) 2025-08-08 09:59:00 -07:00
tools fix(tools): daily note template workflow for past/future dates (#2304) 2026-03-15 23:30:05 -07:00
types Address quick ask (#2146) 2026-02-03 20:04:10 -08:00
utils feat: unify Azure OpenAI and Azure Foundry into single Azure provider (#2291) 2026-03-14 16:41:14 -07:00
aiParams.ts fix: command UI improvements, LaTeX rendering, and Ollama numCtx config (#2276) 2026-03-10 23:29:17 -07:00
chainFactory.ts feat: Improve error handling architecture across chain runners. (#1931) 2025-10-23 17:00:23 -07:00
chainUtils.ts fix: defense-in-depth overrides to prevent tiktoken CDN timeout in Plus mode (#2283) 2026-03-13 21:48:13 -07:00
chatUtils.toolMarkers.test.ts Implement modular context compaction architecture (#2159) 2026-02-06 21:52:33 -08:00
chatUtils.ts Implement modular context compaction architecture (#2159) 2026-02-06 21:52:33 -08:00
composerUtils.ts Squash preview (#1502) 2025-05-30 20:06:25 -07:00
constants.ts feat(tools): add base:create command and .base active note support (#2303) 2026-03-15 17:08:14 -07:00
context.ts Listen to active note changes (#1015) 2025-01-06 23:23:56 -08:00
contextProcessor.dataview.test.ts Support dataview result in active note (#1918) 2025-10-12 19:05:55 -07:00
contextProcessor.embeds.test.ts Support embedded note (#1995) 2025-10-31 13:45:11 -07:00
contextProcessor.selectedText.test.ts Address quick ask (#2146) 2026-02-03 20:04:10 -08:00
contextProcessor.ts feat(tools): add base:create command and .base active note support (#2303) 2026-03-15 17:08:14 -07:00
encryptionService.test.ts fix: replacing Node's Buffer with npm's buffer package. (#1306) 2025-03-02 19:04:05 -08:00
encryptionService.ts feat: add GitHub Copilot integration with improved robustness (#2110) 2026-01-14 15:01:47 -08:00
error.ts feat: add confirmation dialog before clearing Miyo index (#2211) 2026-03-03 11:11:13 +09:00
errorFormat.ts Implement log file (#1804) 2025-09-10 22:34:57 -07:00
langchainStream.test.ts Improve new user onboarding by removing notice on missing api key (#2063) 2025-12-11 13:44:21 -08:00
langchainStream.ts feat: Improve error handling architecture across chain runners. (#1931) 2025-10-23 17:00:23 -07:00
logFileManager.ts Update log file (#2014) 2025-11-08 23:02:55 -08:00
logger.ts feat: add search explanation table in log (#1805) 2025-09-11 01:05:34 -07:00
main.ts fix(tools): replace cachedRead with vault.read in agent/tool paths (#2274) 2026-03-10 14:53:54 -07:00
noteUtils.ts Throttle number of links returned (#998) 2025-01-02 18:18:56 -08:00
plusUtils.ts Rename enableMiyoSearch to enableMiyo and scope Miyo to Plus/agent chains (#2201) 2026-02-21 21:27:54 -08:00
rateLimiter.ts Add configurable batch size, update rps (#1240) 2025-02-11 22:20:30 -08:00
types.ts Add Editor "Quick Ask" Floating Panel + Persistent Selection Highlights (#2139) 2026-02-03 17:37:33 -08:00
utils.cleanMessageForCopy.test.ts Fix insert/replace at cursor including agent reasoning blocks (#2174) 2026-02-10 19:54:52 -08:00
utils.test.ts feat: Add comprehensive system prompt management system. (#1969) 2026-01-13 21:38:17 -08:00
utils.ts feat(tools): add base:create command and .base active note support (#2303) 2026-03-15 17:08:14 -07:00