feat: global config toggle & LaTeX rendering optimization#253
Open
Sophomoresty wants to merge 8 commits intoYishenTu:mainfrom
Open
feat: global config toggle & LaTeX rendering optimization#253Sophomoresty wants to merge 8 commits intoYishenTu:mainfrom
Sophomoresty wants to merge 8 commits intoYishenTu:mainfrom
Conversation
## Global Config Integration - Skills: prioritize ~/.claude/skills/ over vault config - MCP: prioritize ~/.claude/mcp.json over vault config - Settings: already handled by SDK (loadUserClaudeSettings) - Agents: already supported global ~/.claude/agents/ - Hooks: already handled by SDK via settings.json This ensures Claudian uses the same configuration as Claude Code CLI. ## Streaming Performance Optimization - During streaming: display plain text (no markdown/MathJax) - At stream end: render full markdown with LaTeX - Eliminates expensive re-renders during chunk accumulation - Fixes issue with interrupted/invalidated streams ## Files Modified - src/core/storage/McpStorage.ts: add global config support - src/core/storage/SkillStorage.ts: prioritize global skills - src/core/storage/StorageService.ts: pass preferGlobal option - src/core/types/settings.ts: add 'vault' and 'global' sources - src/features/chat/controllers/StreamController.ts: streaming optimization - src/features/chat/rendering/MessageRenderer.ts: related changes
When enabled, Claudian uses the same working directory as Claude Code CLI (user's home directory). This merges conversation history between both tools. Settings: - useCCWorkingDirectory (default: true) - UI toggle in Advanced settings section - Translations for all supported languages
- SessionStorage now loads sessions from ~/.claude/projects/{dir}/
- Directory determined by useCCWorkingDirectory setting
- Merges CC and Claudian conversation history
Use (app.vault.adapter as any).basePath instead of getPath()
- Skills: ~/.claude/skills/ - MCP: ~/.claude/mcp.json - Working directory: vault path (not changed)
## New Feature: Global Claude Code Config Toggle - Added useGlobalCcConfig setting (default: false for backward compatibility) - When enabled: skills and MCP servers load from ~/.claude/ - When disabled: load from vault (isolated per vault) - Settings UI toggle in Safety section - Translations for English and Chinese ## Existing Features Included in PR 1. **LaTeX Rendering Optimization**: - Plain text during streaming, full markdown + MathJax at end - Eliminates visual flickering and performance issues 2. **Global Config Support** (from earlier commits): - SkillStorage supports ~/.claude/skills/ - McpStorage supports ~/.claude/mcp.json - Dynamic reconfiguration via updateGlobalConfig() ## Files Modified - src/core/types/settings.ts - Add useGlobalCcConfig setting - src/core/storage/StorageService.ts - Dynamic config switching - src/features/settings/ClaudianSettings.ts - Settings UI toggle - src/i18n/locales/en.json - English translations - src/i18n/locales/zh-CN.json - Chinese translations ## Backward Compatibility Default is false (vault-only), maintaining existing behavior. Users must opt-in to use global config.
Owner
|
we already have global skills/plugins/agents in Claudian, and option to turn off global plugins. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds two improvements:
Global Claude Code Config Toggle: Users can now optionally use their global Claude Code config (~/.claude/) for skills and MCP servers instead of vault-specific config. This provides better integration with Claude Code CLI for users who want to share skills and MCP servers across all vaults.
LaTeX Rendering Optimization: Improved streaming performance by rendering LaTeX/MathJax expressions only at the end of streaming instead of on each chunk. This eliminates visual flickering and improves performance during long responses with mathematical content.
New Feature: Use Global Claude Code Config
Location: Settings → Safety section
Default:
false(vault-only, maintaining backward compatibility)When enabled (true)
~/.claude/skills/~/.claude/mcp.jsonWhen disabled (false)
{vault}/.claude/skills/{vault}/.claude/mcp.jsonBenefits
LaTeX Rendering Optimization
Problem
Previously, every chunk of streamed text triggered a full re-render with MathJax processing the entire accumulated content. This caused:
Solution
The streaming controller now:
Benefits
Testing
Files Modified
src/core/types/settings.ts- AddeduseGlobalCcConfigsettingsrc/core/storage/StorageService.ts- Dynamic config switching withupdateGlobalConfig()src/core/storage/SkillStorage.ts- Support for global skills directorysrc/core/storage/McpStorage.ts- Support for global MCP configsrc/features/settings/ClaudianSettings.ts- Settings UI togglesrc/features/chat/controllers/StreamController.ts- LaTeX rendering optimizationsrc/i18n/locales/en.json,src/i18n/locales/zh-CN.json- TranslationsScreenshots
Settings Toggle
(Would add screenshot here - shows the toggle in Settings > Safety section)
LaTeX Rendering