mirror of
https://github.com/logancyang/obsidian-copilot.git
synced 2026-07-22 07:50:24 +00:00
* fix(vault): respect user trash preference via FileManager.trashFile (W7/9) Eighth of nine workspaces splitting #2397. Intentional behavior change: file deletions now honor the user's Settings -> Files and links -> Deleted files preference (system trash / .trash / permanent), instead of unconditionally calling vault.delete(file, true). - src/utils/vaultAdapterUtils.ts: add trashFile(app, file) helper that casts past the missing app.fileManager.trashFile typedef. createSyntheticTFile now uses Object.create(TFile.prototype) so instanceof TFile returns true. - src/projects/ProjectFileManager.ts: constructor takes App instead of Vault; all vault.delete(file, true) -> trashFile(app, file). Project create rollback now trashes partial files (was permanent- delete before). - src/projects/projectRegister.ts: constructor takes App. - src/projects/projectMigration.ts: rollbackCreatedFile(app, ...), ensureProjectsMigratedIfNeeded(app), all delete sites use trashFile. - src/main.ts: deleteChatHistory uses trashFile; ProjectRegister constructed with this.app. - src/system-prompts/systemPromptManager.ts: prompt delete via trashFile. - src/commands/customCommandManager.ts: command delete via trashFile. - src/LLMProviders/projectManager.ts, src/components/Chat.tsx, src/components/chat-components/ProjectList.tsx: pass app (not vault) to ProjectFileManager.getInstance. - __mocks__/obsidian.js: app.fileManager.trashFile jest mock. - Tests updated to expect trashFile + App constructor arg. W0, W1, and #2402 already merged. Behavior change requires manual verification (test plan section 1 + 6). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * chore(manifest): bump minAppVersion to 1.4.0 FileManager.trashFile (used by the vault deletion helper introduced in W7/9) requires Obsidian 1.4+. Bumping minAppVersion ensures the plugin store only offers this and future releases to compatible app versions; users on older Obsidian builds stay on their current Copilot version instead of receiving an update that would crash on delete. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
13 lines
414 B
JSON
13 lines
414 B
JSON
{
|
|
"id": "copilot",
|
|
"name": "Copilot",
|
|
"version": "3.2.8",
|
|
"minAppVersion": "1.4.0",
|
|
"description": "Your AI Copilot: Chat with Your Second Brain, Learn Faster, Work Smarter.",
|
|
"author": "Logan Yang",
|
|
"authorUrl": "https://twitter.com/logancyang",
|
|
"fundingUrl": {
|
|
"Buy Me a Coffee": "https://www.buymeacoffee.com/logancyang",
|
|
"GitHub Sponsor": "https://github.com/sponsors/logancyang"
|
|
}
|
|
}
|