Commit Graph

87 Commits

Author SHA1 Message Date
Jarrod Whelan 09a6667c35 refactor(cli): address nuanced snapshot rendering scenarios through layout and padding refinements
- Refined height calculation logic in ToolGroupMessage to ensure consistent spacing between compact and standard tools.
- Adjusted padding and margins in StickyHeader, ToolConfirmationQueue, ShellToolMessage, and ToolMessage for visual alignment.
- Updated TOOL_RESULT_STANDARD_RESERVED_LINE_COUNT to account for internal layout changes.
- Improved ToolResultDisplay height handling in alternate buffer mode.
- Updated test snapshots to reflect layout and spacing corrections.

refactor(cli): cleanup and simplify UI components

- Reduced UI refresh delay in AppContainer.tsx for a more responsive user experience.
- Reorder imports and hook definitions within AppContainer.tsx to reduce diff 'noise'.

refactor(cli): enhance compact output robustness and visual regression testing

Addressing automated review feedback to improve code maintainability and layout stability.

1. Robust File Extension Parsing:
- Introduced getFileExtension utility in packages/cli/src/ui/utils/fileUtils.ts using node:path for reliable extension extraction.
- Updated DenseToolMessage and DiffRenderer to use the new utility, replacing fragile string splitting.

2. Visual Regression Coverage:
- Added SVG snapshot tests to DenseToolMessage.test.tsx to verify semantic color rendering and layout integrity in compact mode.

fix(cli): resolve dense tool output code quality issues

- Replaced manual string truncation with Ink's `wrap="truncate-end"` to adhere to UI guidelines.
- Added `isReadManyFilesResult` type guard to `packages/core/src/tools/tools.ts` to improve typing for structured tool results.
- Fixed an incomplete test case in `DenseToolMessage.test.tsx` to properly simulate expansion via context instead of missing mouse events.
2026-03-26 10:37:26 -07:00
Jarrod Whelan 7cd7d67e7d feat(ui): implement compact tool output and structured tool results
This commit introduces the compactToolOutput feature to optimize terminal vertical space usage for common, high-volume tools.

1. Compact Tool Output UI:
- Added DenseToolMessage component for rendering compact, single-line tool summaries.
- Updated ToolGroupMessage to detect contiguous compact tools and render them with stitched borders for a streamlined look.
- Added Ctrl+O shortcut in AppContainer to toggle full expansion of tool results from the last turn.
- Implemented useGeminiStream border logic to correctly render borders around dense sections.

2. Core Tool Structured Results:
- grep: Updated to return GrepResult with matches, file paths, and line numbers instead of a raw formatted string.
- ls (list_directory): Updated to return ListDirectoryResult with an array of files.
- read_many_files: Updated to return ReadManyFilesResult with read files, skipped files, and reasons.
- Modified ToolResultDisplay and isStructuredToolResult type guards to support these new structured interfaces.

3. User Settings & Documentation:
- Added compactToolOutput to the UI settings schema (default: true).
- Updated configuration docs and schema to reflect the new setting.
- Adjusted compact subview line limits (COMPACT_TOOL_SUBVIEW_MAX_LINES).
2026-03-26 10:37:21 -07:00
Jarrod Whelan a9e2f44207 refactor(cli,core): foundational layout, identity management, and type safety
This commit establishes the structural foundation and required infrastructure to support the upcoming compact tool output changes. It includes identity management improvements, layout fixes, and type-safety enhancements that stand independently.

1. Identity & History Management:
- useHistoryManager: Ensure strictly increasing IDs for history items, even with identical timestamps.
- acpClient: Introduced callIdCounter to prevent callId collisions during rapid execution.
- MainContent: Implemented negative ID logic for pending items to ensure stable React keys and prevent collisions.
- historyUtils: New file containing extracted history logic (isToolExecuting, getAllToolCalls) hoisted from AppContainer.

2. UI Infrastructure & Layout:
- test-utils/render: Modernized renderWithProviders and removed legacy props.
- AskUserDialog: Fixed layout, scroll visibility, and alignment issues.
- toolLayoutUtils: Increased TOOL_RESULT_STANDARD_RESERVED_LINE_COUNT for better spacing.
- ShellToolMessage/ToolGroupMessage: Updated line-count expectations and snapshots to align with layout changes.

3. IDE & Diffing Improvements:
- ToolActionsContext: Refactored IdeClient initialization to fix a race condition and potential memory leak.
- edit/diffOptions: Improved accuracy of diff stat derivation, ensuring "full content" stats are available for the model.
- coreToolScheduler: Automatically derive diff stats from patches if missing.
- state-manager: Ensure diffStat preservation for rejected tool calls.

4. Type Safety & Constants:
- types/tools: Added foundational types like DiffStat, FileDiff, and StructuredToolResult.
- Type Guards: Added guards for isFileDiff, isTodoList, isAnsiOutput, and hasSummary.
- CodeColorizer: Added function overloads to gracefully handle null language detection.
- tool-names: Introduced DISPLAY_NAME constants for consistent tool labeling.

This commit passes all workspace tests and builds successfully. Feature-specific logic for compact output is excluded.
2026-03-26 10:17:43 -07:00
Alisa 71a9131709 chore(tools): add toJSON to tools and invocations to reduce logging verbosity (#22899) 2026-03-24 23:08:29 +00:00
Gal Zahavi 36e6445dba feat(sandbox): dynamic macOS sandbox expansion and worktree support (#23301) 2026-03-24 04:48:13 +00:00
Jarrod Whelan 89ca78837e refactor(cli,core): foundational layout, identity management, and type safety (#23286) 2026-03-24 01:49:51 +00:00
Sri Pasumarthi 84caf00cd4 fix: ACP: separate conversational text from execute tool command title (#23179) 2026-03-24 00:39:15 +00:00
Tommaso Sciortino 37857ab956 fix(core): properly support allowRedirect in policy engine (#23579) 2026-03-23 20:32:50 +00:00
Christian Gunderman d1dc4902fd fix(hooks): support 'ask' decision for BeforeTool hooks (#21146) 2026-03-21 03:52:39 +00:00
anj-s b8719bcd47 feat: add 'blocked' status to tasks and todos (#22735) 2026-03-17 23:24:26 +00:00
AK 695bcaea0d feat(core): add foundation for subagent tool isolation (#22708) 2026-03-17 03:54:33 +00:00
Adam Weidman 605432ea70 refactor(core): replace positional execute params with ExecuteOptions bag (#22674) 2026-03-16 21:50:24 +00:00
Abhi 1d2585dba6 fix(core): explicitly pass messageBus to policy engine for MCP tool saves (#22255) 2026-03-13 01:31:13 +00:00
Abhi cd7dced951 feat(core): implement model-driven parallel tool scheduler (#21933) 2026-03-12 17:03:44 +00:00
Adam Weidman 10ab958378 refactor(core): extract ExecutionLifecycleService for tool backgrounding (#21717) 2026-03-12 04:03:54 +00:00
Spencer a220874281 feat(policy): support auto-add to policy by default and scoped persistence (#20361) 2026-03-10 17:01:41 +00:00
Christian Gunderman 7ca3a33f8b Subagent activity UX. (#17570) 2026-03-02 21:04:31 +00:00
Abhi 28c9a907de feat(core): introduce Kind.Agent for sub-agent classification (#20369) 2026-02-26 01:04:20 +00:00
Jerop Kipruto 15f6c8b8da feat(policy): Propagate Tool Annotations for MCP Servers (#20083) 2026-02-24 14:20:11 +00:00
Steven Robertson b0ceb74462 feat: implement AfterTool tail tool calls (#18486) 2026-02-24 03:57:00 +00:00
Yuki Okita 05bc0399f3 feat(cli): allow expanding full details of MCP tool on approval (#19916) 2026-02-24 01:45:05 +00:00
Sri Pasumarthi 3966f3c053 feat: Map tool kinds to explicit ACP.ToolKind values and update test … (#19547) 2026-02-23 18:22:05 +00:00
joshualitt 6351352e54 feat(core): Implement parallel FC for read only tools. (#18791) 2026-02-20 00:38:22 +00:00
Abhijit Balaji 3408542a66 fix(core): prevent duplicate tool approval entries in auto-saved.toml (#19487)
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2026-02-19 20:03:52 +00:00
Christian Gunderman fd65416a2f Disallow unsafe type assertions (#18688) 2026-02-10 00:10:15 +00:00
Aishanee Shah 3fb1937247 refactor(core): model-dependent tool definitions (#18563) 2026-02-09 20:46:23 +00:00
Jerop Kipruto ed26ea49e9 feat(plan): add core logic and exit_plan_mode tool definition (#18110) 2026-02-03 03:30:03 +00:00
Jerop Kipruto 71308caf05 feat(plan): refactor ToolConfirmationPayload to union type (#17980) 2026-01-30 19:51:45 +00:00
Jerop Kipruto 62346875e4 feat(plan): reuse standard tool confirmation for AskUser tool (#17864)
Co-authored-by: jacob314 <jacob314@gmail.com>
2026-01-30 18:32:21 +00:00
Gal Zahavi b611f9a519 feat: Implement background shell commands (#14849) 2026-01-30 17:53:09 +00:00
Jerop Kipruto 50985d38c4 feat(plan): add 'communicate' tool kind (#17341) 2026-01-22 21:38:15 +00:00
Spencer 5d68d8cda5 fix(core): Resolve AbortSignal MaxListenersExceededWarning (#5950) (#16735) 2026-01-22 20:16:00 +00:00
N. Taylor Mullen ec7413456e feat(core): improve shell redirection transparency and security (#16486) 2026-01-20 04:07:28 +00:00
N. Taylor Mullen 1681ae1842 refactor(cli): unify shell confirmation dialogs (#16828) 2026-01-16 23:06:52 +00:00
Abhi a3234fb534 prefactor: add rootCommands as array so it can be used for policy parsing (#16640) 2026-01-14 18:50:28 +00:00
Adib234 57012ae5b3 Core data structure updates for Rewind functionality (#15714) 2026-01-07 17:10:22 +00:00
Abhi 12c7c9cc42 feat(core,cli): enforce mandatory MessageBus injection (Phase 3 Hard Migration) (#15776) 2026-01-04 22:11:43 +00:00
Abhi 37be162435 fix(core): enable granular shell command allowlisting in policy engine (#15601) 2025-12-26 23:48:44 +00:00
Maple! 56b050422d chore(core): fix comment typo (#15558) 2025-12-26 04:31:43 +00:00
Allen Hutchison 5f298c17d7 feat: Persistent "Always Allow" policies with granular shell & MCP support (#14737)
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2025-12-12 21:45:39 +00:00
Christian Gunderman 025e450ac2 Disallow floating promises. (#14605) 2025-12-06 00:12:49 +00:00
Megha Bansal 11a0a9b911 Increase code coverage for core packages (#12872) 2025-11-12 04:06:43 +00:00
Allen Hutchison f5bd474e51 fix(core): prevent server name spoofing in policy engine (#12511) 2025-11-05 18:10:23 +00:00
Shardul Natu 236334d015 feat(telemetry): Add extension name to ToolCallEvent telemetry (#12343)
Co-authored-by: Shnatu <snatu@google.com>
2025-10-31 13:50:22 +00:00
Allen Hutchison 5d61adf804 feat: Add message bus setting guard for tool confirmation (#12169) 2025-10-28 17:18:34 +00:00
Allen Hutchison f934f01881 fix(tools): ReadFile no longer shows confirmation when message bus is off (#12003) 2025-10-24 23:22:02 +00:00
Allen Hutchison b188a51c32 feat(core): Introduce message bus for tool execution confirmation (#11544)
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2025-10-24 20:04:40 +00:00
christine betts c6a59896f3 Add extensions logging (#11261) 2025-10-21 20:55:16 +00:00
Allen Hutchison bf80263bd6 feat: Implement message bus and policy engine (#11523)
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2025-10-21 18:45:33 +00:00
Tommaso Sciortino 9a4211b610 Improve rendering of ToDo lists. (#11315) 2025-10-16 23:06:43 +00:00