mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-05-17 21:12:06 +00:00
Two issues surfaced during a directionless multi-round audit of the /diff feature: 1. `countUntrackedLines` reads at most `UNTRACKED_READ_CAP_BYTES` (1 MB) per file, so a 10 MB new log was silently reported as `+~20k` when the real count is ~10×. The helper now `fstat`s the file and returns a `truncated: true` flag when size exceeds the read window; `/diff` surfaces it as `(new, partial)` so the `+N` isn't read as exact. 2. Line-count aggregation was coupled to the per-file display cap: when tracked changes filled the `MAX_FILES` slot, untracked line counts beyond the remaining slots were dropped from `stats.linesAdded` entirely (header under-reported additions). Decoupled: we now read up to `MAX_FILES` untracked files for their line counts regardless of display slots, and only restrict the visible rows to `remainingSlots`. Added regression tests for both: a 1.5 MB new file asserts `truncated: true` and a lower-bound line count, and a `MAX_FILES`-saturated tracked set + 5 untracked files asserts that untracked additions still appear in the header totals even though none of them get displayed. |
||
|---|---|---|
| .. | ||
| installation | ||
| tests | ||
| build.js | ||
| build_package.js | ||
| build_sandbox.js | ||
| build_vscode_companion.js | ||
| check-build-status.js | ||
| check-i18n.ts | ||
| check-lockfile.js | ||
| clean.js | ||
| copy_bundle_assets.js | ||
| copy_files.js | ||
| create_alias.sh | ||
| dev.js | ||
| esbuild-shims.js | ||
| generate-git-commit-info.js | ||
| generate-settings-schema.ts | ||
| get-release-version.js | ||
| lint.js | ||
| local_telemetry.js | ||
| pre-commit.js | ||
| prepare-package.js | ||
| sandbox_command.js | ||
| start.js | ||
| telemetry.js | ||
| telemetry_gcp.js | ||
| telemetry_utils.js | ||
| test-windows-paths.js | ||
| unused-keys-only-in-locales.json | ||
| version.js | ||