feat: upstream backports + context cascade + repo metadata#20
Merged
Conversation
…ions When conversation history is near the context window limit and dominated by tool call/response cycles, findCompressSplitPoint would return a near-zero split point because it only considered non-functionResponse user messages as valid split points. This caused /compress to send almost no history to the compression API (e.g. 29 tokens), producing a useless summary that inflated token count instead of reducing it. Changes: - Track tool completion boundaries (positions after functionResponse) as fallback split points in findCompressSplitPoint - Add user-with-functionResponse to the compress-everything safety check - Use Math.max of primary and fallback split points for better coverage - Add minimum content guard (5% threshold) to prevent futile API calls - Add 4 new test cases covering tool-heavy conversation scenarios Fixes QwenLM#2647
…heavy conversations - Strip trailing orphaned funcCall (force=true) before split point calculation, so normal compression logic runs cleanly on the remaining history instead of requiring ad-hoc special-casing - Remove redundant lastToolCompletionSplitPoint machinery: after fixing the i+2 index bug, lastSplitPoint already subsumes it, making Math.max redundant - Add MIN_COMPRESSION_FRACTION constant (0.05) to guard against futile API calls when historyToCompress is too small relative to total history - Add tests for orphaned funcCall handling (force=true compresses, force=false NOOP) - Add test for MIN_COMPRESSION_FRACTION guard Fixes QwenLM#2647
The previous version (1.1.0) has a native-level bug on macOS where each PTY spawn leaks one /dev/ptmx file descriptor that is never closed. Over a long session with hundreds of shell commands, this exhausts the system-wide PTY pool (kern.tty.ptmx_max = 511), breaking other programs like tmux and new terminal windows. Root cause: microsoft/node-pty#882 Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
…mprovements in KeypressProvider
The error handler in hookRunner cleared the timeout but did not remove the abort signal listener, unlike the close handler. When spawn fails (e.g. executable not found), only the error event fires — the close event is not guaranteed — so the abort listener leaked on the signal.
- Add new npm extension installation channel via scoped packages (@scope/name) - Implement npm.ts module with registry resolution, authentication, and download logic - Support version pinning, dist-tags (latest, beta), and custom registries - Handle private registry auth via NPM_TOKEN env var and .npmrc _authToken entries - Update CLI install command with --registry flag for npm extensions - Add comprehensive tests for npm package parsing and registry operations - Update documentation for releasing and installing from npm registries - Integrate npm updates into extension manager and update checking flow This enables teams using npm for package distribution to publish Qwen Code extensions through their existing infrastructure, with full support for private registries and access control. Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Restore lsp field to CliArgs interface (removed by hooks cleanup cherry-pick) - Add lsp: undefined to auth handler and gemini test fixtures - Resolve client.ts conflict: keep both endTurnSpan and cache-safe param saving - Fix speculationToolGate: ToolNames.TODO_WRITE → ToolNames.TASK_LIST - mcp-tool: replace getStringifiedResultForDisplay with getDisplayFromParts, remove unused allowlist field and truncateTextParts method Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- ideCommand.test: remove install subcommand tests (no longer in ideCommand) - constants.test: update DISPLAY_HOOK_EVENTS length from 12→15 (3 new hook events) - Footer.test: mock VoiceMicButton to avoid UIActionsProvider dep, add voice state fields to mock UIState, update snapshots - client.test: add getDisableAllHooks mock for hooks cleanup change Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- constants.test: replace hardcoded count with Object.values(HookEventName).length so the test stays correct when the enum grows - ideCommand.test: remove unused getIdeInstaller mock from vi.mock block Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- coreToolScheduler.test + nonInteractiveToolExecutor.test: add getDisableAllHooks mock to all mock configs (hooks cleanup change) - mcp-tool.ts: restore output truncation via truncateParts helper using existing truncateToolOutput utility - mcp-tool.ts: gate auto-reconnect on isConnectionError check so generic errors (Invalid parameters) don't trigger reconnect - extension/npm.ts: fix CodeQL alerts — use replaceAll for '/' encoding in scoped package names Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add file.on('error') handler to write stream in downloadNpmTarball so
stream errors during res.pipe() properly reject the Promise instead of
hanging forever
- Fix name.replace('/', '%2f') → replaceAll in downloadFromNpmRegistry
(line 285 was missed in previous commit; line 374 already correct)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
IDE integration is no longer supported. Voice integration section covers: - audio backend requirements (sox/arecord) per OS - protoLabs hosted STT endpoint option - self-hosted faster-whisper-server option - settings.json config and /voice commands Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
No protoLabs-hosted voice service — self-hosted only. Also removes the unused HOSTED_STT_ENDPOINT export. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Instead of loading all context files found (PROTO.md + AGENTS.md + QWEN.md + CLAUDE.md) at every directory in the walk, now stops at the first filename found per location. Global (~/.proto/, ~/.claude/) and each workspace directory independently cascade through the priority list: PROTO.md > AGENTS.md > QWEN.md > CLAUDE.md. Prevents context flooding when multiple compat aliases co-exist. Also updates repository/homepage metadata to protoLabsAI/protoCLI and protolabs.sh across root, cli, and sdk-typescript package.json files. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
WalkthroughThe PR updates package metadata across multiple configurations to reflect a branding/ownership change from QwenLM to protoLabsAI, replaces IDE integration documentation with voice integration guidance, removes an exported STT endpoint constant, and refactors memory discovery cascade logic to stop after finding the first matching context file per directory level. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Code Coverage Summary
CLI Package - Full Text ReportCore Package - Full Text ReportFor detailed HTML reports, please see the 'coverage-reports-22.x-ubuntu-latest' artifact from the main CI run. |
1 task
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.
Summary
Test plan
/voice statusworks🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
/voicetoggle commandDocumentation
Chores