* chore(lint): enforce no-global-app via no-restricted-globals; fix all violations
Flip on `no-restricted-globals` with an `app` entry (error) for production
`src/**/*.{ts,tsx}`, exempting test files (they consume the `window.app` mock).
Sweep the whole codebase to 0 violations by threading `app` explicitly:
useApp() in React, this.app / this.chainManager.app in classes, params in plain
modules, a seed pattern for no-arg getInstance() singletons, setters for eager
module-level singletons, and factory functions for app-using built-in tools.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* test(agent): pass full mock app to initializeBuiltinTools
The initializer's app branch dereferences app.vault.getRoot() via
registerFileTreeTool, so passing the bare vault crashed setup before any
tools registered. Pass the full mock app instead.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore: translate Chinese comments to English and apply formatting
- Translate all Chinese comments in replaceGuard.ts to English for consistency
- Apply Prettier formatting to 33 files
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* test: add unit tests for Quick Ask core modules
Add comprehensive tests for:
- replaceGuard.ts: validation logic, error messages, MapPos and Highlight strategies
- persistentHighlight.ts: CM6 state field, range mapping, show/hide behavior
- quickCommandPrompts.ts: placeholder appending logic
64 new test cases covering edge cases like:
- Leaf/editor/file change detection
- Document bounds validation
- Content change detection
- Range mapping through document changes
- Case-insensitive placeholder detection
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* feat: Add Web Viewer bridge for referencing open web tabs in chat.
* refactor: Simplify markdown image extraction parser。
* fix: Prevent web selection from auto-reappearing after removal or new chat.
* fix: Suppress active web tab when web selection exists.
* feat: Add YouTube transcript extraction for Web Viewer tabs.
* feat: Built-in slash prompts for web clippers.
* feat: Improve web selection tracking and simplify context settings
- Merge context settings: combine note/web active content and selection settings
- Add auto-clear for web selection badge when deselected on page
- Make note and web selections mutually exclusive
- Show website favicon in web selection badge
- Add migration logic and tests for settings