fix(snapshot): write info/exclude on repo init to skip large dirs (closes #697)#700
Open
merchloubna70-dot wants to merge 4 commits intoHmbown:mainfrom
Open
Conversation
All system prompts were English-only, causing DeepSeek V4 to reason and respond in English even when users wrote in Chinese or other languages. Add a Language Mirror section to base.md and base.txt that instructs the model to detect the user's primary language and use it for both reasoning (thinking tokens) and the final reply.
base.txt is not referenced via include_str! in prompts.rs. Only base.md is loaded (BASE_PROMPT). Remove the redundant change to base.txt as noted by Gemini Code Assist review.
…wn#600) Implemented using `deepseek exec --model deepseek-v4-flash`. 🐋
) On first launch in large workspaces (node_modules, Rust target/, etc.) the `git add -A` inside the pre-turn snapshot could take 10+ seconds, causing the initial response to lag. Write a baseline info/exclude file into the snapshot repo during open_or_init so those directories are skipped. The user's own .gitignore is still honoured on top. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
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.
Root cause
On first launch in a workspace with large build-artifact directories
(
node_modules, Rusttarget/,.next, etc.), the snapshot system'sgit add -Ahas to walk and hash every file — including those largetrees. With no
.gitignoreor an incomplete one, this takes 10+seconds, blocking the first response.
The snapshot runs inside
spawn_blockingso the async runtime is notstalled, but on many systems the blocking-thread-pool I/O pressure is
enough to delay the API client's first byte.
Fix
Write a baseline
info/excludefile into the snapshot git repo duringopen_or_init. This is git's per-repo exclude mechanism (equivalent toa repo-local
.gitignorethat doesn't live in the work tree). The user'sown workspace
.gitignorecontinues to be respected on top.Directories excluded by default:
node_modules,target,.build,dist,build,__pycache__,.next,.nuxt,vendor,venv,.venv,.tox,.cache.Testing
Before:
git add -Aon a 50k-filenode_modulesworkspace — ~12s.After: same workspace with the exclude in place — ~0.2s (only source
files are indexed).
🤖 Generated with Claude Code