- Simplify export data by removing filesRead stat, keep only written files count and paths
- Restore lines-related statistics (linesAdded and linesRemoved)
- Update HTML display to show only file operation stats instead of total files count
- Change 'Written' label to 'Files modified'
- Remove distinction between requestId and sessionId, always display sessionId
- Remove Session ID and Export Time from Header (already shown in MetadataSidebar)
- Display Project field with raw value and support multiline display
- Fix filesWritten calculation to count unique files instead of operations
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Fix four accuracy bugs in export metadata/sidebar feature:
1. File read counting: Now properly counts read_file operations by checking
functionResponse.name and args.absolute_path, instead of relying on
resultDisplay which returns string for reads.
2. Unique file tracking: Uses full file path from args.file_path or
args.absolute_path instead of basename-only fileName, preventing
collision between same-named files in different directories.
3. TaskTool token aggregation: Includes tokens from TaskTool executionSummary
in total token count, fixing under-reporting when subagents are used.
4. Context window display: Removes hardcoded '128k' fallback in HTML sidebar,
now only displays context usage when contextWindowSize is actually defined.
Also fixes lint errors (Array<T> type annotations) and applies formatting.
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Close stdout in addition to stdin to prevent hanging writes during shutdown
- Add shuttingDown guard to ensure cleanup runs only once
Made-with: Cursor
The ACP process was ignoring SIGTERM because signal handlers registered
elsewhere in the CLI startup path (e.g., stdin raw mode restoration)
override Node.js's default exit behavior. This caused the process to
remain alive after the IDE sends SIGTERM, leading to zombie connections
and exit code 143 errors in JetBrains IntelliJ IDEA.
Add explicit SIGTERM/SIGINT handlers in runAcpAgent() that destroy
stdin, which closes the ndjson stream and resolves connection.closed,
allowing the process to exit gracefully.
Made-with: Cursor
- Add cachedContentTokenCount tracking in uiTelemetry service
- Collect cached_content_token_count from streaming usage metadata
- Use cached tokens instead of estimated overhead when available
- Fix messages token calculation to avoid 'messages = 0' issue
This improves context window display accuracy when using providers
that support prefix caching (e.g., DashScope).
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Added candidatesTokens prop to LoadingIndicator for displaying token counts.
- Updated formatting to show elapsed time and token counts inline.
- Refactored tests to validate new token display functionality and formatting changes.
- Introduced formatTokenCount utility for consistent token count representation.
This improves user feedback during loading states by providing clearer information on token usage.
Remove unused outputFile property from AgentToolResultEvent and its
associated test case. This property is not needed for agent tool
result handling.
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Add helper functions for better code organization (createPrintableKey,
getCompleteCsiSequenceLength, parsePlainTextPrefix)
- Drop unsupported Kitty CSI-u keys without blocking subsequent input
- Recover plain text that arrives in same chunk after unsupported CSI-u keys
- Add comprehensive tests for edge cases (CAPS_LOCK, event metadata variants)
Improves robustness of Kitty keyboard protocol parsing by gracefully
handling unsupported key codes and ensuring plain text input is not lost.
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Add needsUtf8Bom() to detect when UTF-8 BOM is needed based on file
extension and system code page
- PowerShell 5.1 on non-UTF-8 Windows systems (e.g. GBK) requires BOM
to read scripts correctly
- Remove default UTF8 encoding; undefined now triggers auto-detection
- Add tests for needsUtf8Bom() covering Windows/non-Windows scenarios
This ensures PowerShell scripts are written with UTF-8 BOM on systems
that need it, fixing character encoding issues for non-ASCII content.
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>