- Add --session-id flag to CLI for specifying custom session ID
- Add sessionId option to SDK QueryOptions
- Implement UUID validation for session IDs
- Pass session ID from SDK to CLI via --session-id argument
- Add integration tests for session-id functionality
- Update unit tests for ProcessTransport
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Add JSON Schema generation for settings.json files to provide IntelliSense
and validation support in VS Code. The schema is automatically generated
from the internal SETTINGS_SCHEMA definition during the build process.
- Add generate-settings-schema.ts script to convert TypeScript schema to JSON Schema
- Add jsonValidation contribution to vscode-ide-companion package.json
- Include schemas directory in .vscodeignore for packaging
- Integrate schema generation into build process
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Added AskUserQuestionDialog component for handling user questions in CLI.
- Integrated AskUserQuestionTool into the core toolset, allowing for dynamic user input during execution.
- Enhanced ToolConfirmationMessage to utilize the new AskUserQuestionDialog for 'ask_user_question' type confirmations.
- Updated core configuration to register the AskUserQuestionTool.
- Implemented validation and execution logic for user questions, including multi-select options.
- Added comprehensive tests for AskUserQuestionTool to ensure functionality and validation rules.
- Updated tool names and display names to include AskUserQuestion.
Add handling for printable CSI-u keys (including space) to ensure they
behave like regular character input. This allows downstream text inputs
to receive the literal character when using Kitty protocol.
- Parse CSI-u space as space key with literal sequence
- Parse CSI-u printable letters as literal input
- Handle keyCode range 32-0x10ffff (excluding 127 DEL)
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Move AbortController creation inside while(true) loop to create a new
instance per round. This prevents listeners from accumulating across
multiple rounds which was causing maxListener warnings.
Key changes:
- Create roundAbortController at the start of each loop iteration
- Track current round's controller with currentRoundAbortController
- External abort signal propagates to current round's controller in real-time
- Cleanup external listener and clear reference in finally block
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Replace hardcoded Colors.* with theme.* in AuthDialog and ApiKeyInput
- Fix selectedIndex reset when going back from API-KEY sub-view to main view
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Consolidate Escape key behavior to improve UX and prevent conflicts:
- Move Escape handling from useGeminiStream to AppContainer
- Input with content: double-press to clear, then single-press to cancel
- Empty input: single-press immediately cancels ongoing request
- Preserve embeddedShellFocused check to allow shell's own escape handling
- Update tests to use cancelOngoingRequest directly instead of simulating keypress
Fixes inconsistent escape behavior between input clearing and request cancellation.
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Use fixed 60s delay matching DashScope per-minute quota window
- Increase max retries from 3 to 10 to align with Claude Code behavior
- Remove unused isTPMThrottlingError, isGLMRateLimitError, isRateLimitThrottlingError functions
- Simplify getRateLimitRetryInfo to only extract reason, delay is now caller's responsibility
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Add Ajv2020 validator to support draft-2020-12 schemas used by playwright-mcp
- Auto-select validator based on $schema field
- Gracefully skip validation when schema compilation fails
- Add comprehensive tests for JSON Schema version support
Reference: gemini-cli implementation pattern
Add a .catch() handler to the promise before advancing timers to prevent
Node.js from reporting an unhandled rejection when maxAttempts is exhausted
during the TPM throttling retry test.
- Changed default value from false to true in settingsSchema.ts
- This aligns the schema with the actual code behavior (?? true fallback)
- Matches documentation and test expectations
- Resolves inconsistency reported in issue #1764Fixes#1764
In container environments like code-server where host.docker.internal may
not be configured, the IDE client would fail to connect. This change makes
getIdeServerHost() async and adds a DNS lookup to verify the hostname is
actually resolvable before using it, falling back to 127.0.0.1 if not.
Co-authored-by: Cursor <cursoragent@cursor.com>
- Add plan mode enforcement in Session.runTool to block write tools
- Align ACP behavior with CoreToolScheduler plan mode logic
- Add test case to verify write tools are blocked in plan mode
- Fixes#1806
- 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
- Move TPM throttling check before shouldRetryOnError to ensure TPM errors
without standard HTTP status codes are still retried
- Add comprehensive unit tests for edge cases:
- TPM error without status property
- Nested TPM error object without top-level status
- Consecutive TPM throttling errors
- Max attempts exhaustion for TPM errors
- Remove redundant error checking logic in isTPMThrottlingError function
- Reuse isStructuredError and isApiError utilities from quotaErrorDetection module
- Clean up duplicate import statements