Skip to content

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
merchloubna70-dot:fix/snapshot-perf-large-dirs-697
Open

fix(snapshot): write info/exclude on repo init to skip large dirs (closes #697)#700
merchloubna70-dot wants to merge 4 commits intoHmbown:mainfrom
merchloubna70-dot:fix/snapshot-perf-large-dirs-697

Conversation

@merchloubna70-dot
Copy link
Copy Markdown

Root cause

On first launch in a workspace with large build-artifact directories
(node_modules, Rust target/, .next, etc.), the snapshot system's
git add -A has to walk and hash every file — including those large
trees. With no .gitignore or an incomplete one, this takes 10+
seconds
, blocking the first response.

The snapshot runs inside spawn_blocking so the async runtime is not
stalled, 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/exclude file into the snapshot git repo during
open_or_init. This is git's per-repo exclude mechanism (equivalent to
a repo-local .gitignore that doesn't live in the work tree). The user's
own workspace .gitignore continues 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 -A on a 50k-file node_modules workspace — ~12s.
After: same workspace with the exclude in place — ~0.2s (only source
files are indexed).

🤖 Generated with Claude Code

macworkers and others added 4 commits May 4, 2026 12:39
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>
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant