feat: add setting to disable automatic context tracking#230
feat: add setting to disable automatic context tracking#230shaunbuswell wants to merge 4 commits into
Conversation
- Add disableAutoContext setting to config types - Add isAutoContextDisabled() method to ConfigManager - Check setting before running auto-context in events.ts - Add checkbox in Settings UI under AI Integration 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Changed "When enabled" to "When checked" to avoid confusion since the checkbox disables the feature when checked.
…e is disabled Updates the context usage display to reflect when automatic context tracking is disabled in settings, providing clearer feedback to users. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
The node_modules symlink was being tracked in git, which caused CI failures as pnpm couldn't create the node_modules directory. ENOTDIR error fix: node_modules should never be committed to git.
|
Are you sure this uses quota? |
From everything I've seen, yes. If you look at main/src/events.ts around line 472, it triggers /context via claudeManager.continuePanel() as a follow-up run, rather than passively parsing metadata from the previous response. That means:
The token cost is probably small, but non-zero, and the additional run also introduces noticeable latency because Crystal waits for /context to complete before updating the UI. My concern isn’t really costs but that this always runs, cannot currently be disabled and adds a second model invocation (of same main model chosen) per user interaction. What I've actually done, if it's of interest, is :
I've not bombarded you with 2 & 3 in case 1 wasn't of use. But if you see value, I'll add those PRs too. |
|
After reviewing this further, I think there is an issue that needs looking into. I've raised #233 regarding this. |
Summary
Adds a user setting to disable Crystal's automatic context tracking feature, which runs
/contextafter every Claude response.Problem
Crystal automatically runs
/contextafter each Claude response to track context usage. This:Solution
This PR adds a checkbox in Settings → AI Integration to disable automatic context tracking.
Changes
disableAutoContextsetting to config typesTesting
/contextdelay[auto-context-debug] Auto-context disabled in settings - skippingFuture Phases (separate PRs)
Screenshots
When disabled, the UI shows "auto-context disabled" instead of potentially incorrect token counts.
Fixes the delay issue reported when using Crystal with custom builds.