Support Caveman Mode#3264
Conversation
|
@BugBot run |
|
All contributors have signed the CLA ✍️ ✅ |
🔍 Dyadbot Code Review SummaryVerdict: 🤔 NOT SURE - Potential issues Reviewed by 3 independent agents: Correctness Expert, Code Health Expert, UX Wizard. Issues Summary
🟢 Low Priority Notes (5 items)
🚫 Dropped False Positives (5 items)
Generated by Dyadbot multi-agent code review |
|
@BugBot run |
|
recheck |
9c73e00 to
1b37650
Compare
|
@BugBot run |
1b37650 to
9e51464
Compare
|
@BugBot run |
9e51464 to
481da28
Compare
|
@BugBot run |
🔍 Dyadbot Code Review SummaryVerdict: ✅ YES - Ready to merge Reviewed by 3 independent agents: Correctness Expert, Code Health Expert, UX Wizard. Issues Summary
🟢 Low Priority Notes (5 items)
🚫 Dropped False Positives (6 items)
Generated by Dyadbot multi-agent code review |
481da28 to
acc93c0
Compare
|
@BugBot run |
🔍 Dyadbot Code Review SummaryVerdict: ✅ YES - Ready to merge Reviewed by 3 independent agents: Correctness Expert, Code Health Expert, UX Wizard. Issues Summary
🟢 Low Priority Notes (4 items)
🚫 Dropped False Positives (9 items)
Generated by Dyadbot multi-agent code review |
…ecial intent support
acc93c0 to
e87ce6f
Compare
|
@BugBot run |
🔍 Dyadbot Code Review SummaryVerdict: ✅ YES - Ready to merge Reviewed by 3 independent agents: Correctness Expert, Code Health Expert, UX Wizard. The latest commit addresses nearly all issues from prior reviews: CavemanModeSelector extracted to its own component, i18n support added, CavemanMode type centralized in schemas.ts, CAVEMAN_PROMPTS properly typed as Record, injection helper extracted to eliminate duplication, and special intents (security-review, summarize) now apply caveman mode. Issues SummaryNo new HIGH or MEDIUM issues found beyond what's already been commented on. 🟢 Low Priority Notes (5 items)
🚫 Dropped False Positives (7 items)
Generated by Dyadbot multi-agent code review |
🎭 Playwright Test Results❌ Some tests failed
Summary: 873 passed, 11 failed, 13 flaky, 276 skipped Failed Tests🍎 macOS
🪟 Windows
📋 Re-run Failing Tests (macOS)Copy and paste to re-run all failing spec files locally: npm run e2e \
e2e-tests/queued_message.spec.ts \
e2e-tests/visual_editing.spec.ts
|
wwwillchen
left a comment
There was a problem hiding this comment.
hi @nourzakhama2003 - thanks for this PR. i pulled it down and played with this feature and I'm on the fence about this one because i don't think it'll actually save that much costs. most of the costs is input tokens + reasoning tokens and the actual output tokens this will save is not a ton.
could we wait to get more feedback from users (e.g. thumbs up on the issue) before proceeding with this? thank you
hi @wwwillchen thanks for taking the time to review and test it! That makes total sense — if the cost savings are minimal compared to input/reasoning tokens, I understand holding off. Happy to keep this as a draft or close it for now, and revisit if there's clear user demand. Let me know if you'd prefer me to close the PR or keep it open as a reference implementation. Thanks again for the feedback. |
closes #3255
Summary
This PR implements Caveman Mode, a new user setting that allows for significant token savings and faster response times by compressing AI responses. The feature injects specific instructions into the system prompt to force the AI into more terse and concise communication styles.
Users can select from four levels in Settings > AI Settings:
Off: Standard responses (default).
Lite: ~25% compression; professional but brief.
Full: ~50% compression; very terse, sentence fragments allowed.
Ultra: ~75% compression; maximum token saving (caveman-style).
implementation
Core Logic
src/prompts/system_prompt.ts: Defined strictly typed instruction sets for Lite, Full, and Ultra modes. Introduced a centralized injectCavemanPrompt helper to handle consistent injection across all system prompt construction paths.
src/ipc/handlers/chat_stream_handlers.ts: Integrated the setting into main chat streams and expanded support to special prompts like /security-review and Summarize.
src/lib/schemas.ts & src/main/settings.ts: Added cavemanMode to the user settings schema and default state.
UI & UX
src/components/CavemanModeSelector.tsx [NEW]: Extracted the selector into a modular component for better maintainability.
src/pages/settings.tsx: Cleaned up the settings page by using the new dedicated component.
src/i18n/locales/en/settings.json: Added full localization support for labels and compression level descriptions.
src/lib/settingsSearchIndex.ts: Integrated the new setting into global search with keywords: terse, concise, brief.
Testing
npm run e2e -- caveman_mode.spec.ts