- Add abort listener cleanup in Query.close() to prevent memory leak
- Add abort listener cleanup in ControlDispatcher.shutdown()
- Remove AbortController recreation in Session.handleInterrupt()
This fixes the MaxListenersExceededWarning that occurred when:
- Creating 11+ Query instances in SDK/non-interactive mode
- Multiple user interrupts (Ctrl+C) in interactive mode
- Intensive control request scenarios
- Automatically detect 'http' transport when commandOrUrl starts with http:// or https://
- Default to 'stdio' transport for non-URL commands
- Explicit --transport flag still takes precedence over auto-detection
- Update help text to indicate auto-detection capability
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Update the header info panel hint from '/auth to change' to '/model to change'
to better reflect that this command switches models rather than authentication.
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Add support for defining environment variables in settings.json files.
These variables are loaded with the lowest priority:
1. System/process environment variables (highest)
2. .env files
3. settings.env (lowest/fallback)
This allows users to configure default environment variables in their
user or workspace settings without conflicting with existing env vars
or .env file values.
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Remove duplicate useEffect that was causing suggestions visibility state
to diverge from the actual active completion. The original useEffect at
line 760 already correctly tracks activeCompletion.showSuggestions, which
dynamically selects the current active completion source (regular, reverse
search, or command search).
The removed useEffect used OR logic across all three completion sources,
which caused hasSuggestionsVisible in AppContainer to flip incorrectly
during command-search mode when background completion state changed.
This fix ensures Tab key blocking/unblocking happens at the correct times
on Windows.
Fixes#1728
When using @ to reference files/folders on Windows and pressing Tab for path completion, the Tab key was incorrectly triggering approval mode cycling instead of accepting the autocomplete suggestion.
This happened because Windows maps Tab to Shift+Tab functionality (due to Shift+Tab not working in some terminals), but this mapping didn't account for active autocomplete lists where Tab should be used for selection.
Changes:
- Add shouldBlockTab callback to useAutoAcceptIndicator hook to check if autocomplete is active
- Track autocomplete visibility state in AppContainer via hasSuggestionsVisible
- Add onSuggestionsVisibilityChange to UIActions interface
- Update InputPrompt to notify parent when suggestions visibility changes
- Update Composer to propagate suggestions visibility to AppContainer
- Add tests to verify Tab key behavior with and without autocomplete
Change all diagnostic/progress messages in sandbox.ts from
writeStdoutLine to writeStderrLine. This prevents integration
test failures in Docker where stdout buffering behavior differs
from the Console API.
Diagnostic messages like 'Checking for sandbox image' are
informational logs that should not interfere with program output
that tests or other tools may parse from stdout.
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Add placeholder mode for pastes >1000 chars OR >10 lines
- Show placeholder like '[Pasted Content 1500 chars]' instead of full content
- Store full content and expand on submit
- Support multiple placeholders with sequential IDs (#2, #3, etc.)
- Reuse freed IDs when placeholders are deleted
- Delete entire placeholder atomically on backspace
- Add 7 unit tests for placeholder functionality
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Restore plan update handling in collect.ts, formatting todo data as markdown checklist
- Skip todo_write tool_result processing in normalize.ts to avoid duplicates
- Add getMessageTimestamp() and getMessageUuid() methods to maintain message order
- Fix version parsing to support @latest tags
- Fix Windows spawn EINVAL error (CVE-2024-27980)
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>