Commit Graph

964 Commits

Author SHA1 Message Date
Jarrod Whelan 7d786f5f58 test(cli): refine settings and tool action mocks to resolve test rig regressions
This update addresses incomplete settings store contracts and default state mismatches that caused snapshot runtime errors and verification failures in compact tool output tests.

1. Settings Mock Completeness:
- Updated `createMockSettings` in `mockConfig.ts` to include required functional methods (`subscribe`, `getSnapshot`, `setValue`) to satisfy React's `useSyncExternalStore` contract. This resolves "store.getSnapshot is not a function" errors in snapshot tests.

2. Tool Actions Provider Configuration:
- Modified `renderWithProviders` to accept a `toolActions` options object, allowing individual tests to inject specific tool expansion states.
- Changed the default mock for `isExpanded` from `true` to `false` to align with the application's default behavior (collapsed outputs) in alternate buffer mode.

3. Test Refactoring:
- Refactored `ToolGroupMessage.compact.test.tsx` to use the standardized `createMockSettings` utility rather than a manual generic object, ensuring proper context evaluation during rendering.
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
Jacob Richman a86935b6de fix(cli): allow ask question dialog to take full window height (#23693) 2026-03-25 23:26:34 +00:00
nirali 8595b07f6d fix(cli): show helpful guidance when no skills are available (#23785) 2026-03-25 22:06:44 +00:00
christine betts 3ada29fb51 feat(core,ui): Add experiment-gated support for gemini flash 3.1 lite (#23794) 2026-03-25 20:28:49 +00:00
Prasanna Pal fd0893c346 fix(ui): prevent escape key from cancelling requests in shell mode (#21245) 2026-03-25 20:25:13 +00:00
Keith Guerin fe92a43e31 fix(ui): cleanup estimated string length hacks in composer (#23694) 2026-03-25 19:15:08 +00:00
matt korwel bbdd8457df fix(cli): stabilize copy mode to prevent flickering and cursor resets (#22584)
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2026-03-24 23:16:48 +00:00
Tommaso Sciortino 1f07efb5d8 fix(cli): only show updating spinner when auto-update is in progress (#23709) 2026-03-24 15:43:03 -07:00
Adam Weidman 91d756f391 fix(core): improve remote agent streaming UI and UX (#23633) 2026-03-24 15:34:04 +00:00
Sehoon Shon 893c7d3880 feat(ui): allow immediate user input during startup (#23661) 2026-03-24 13:33:17 +00:00
Adib234 dcedc42979 fix(plan): sandbox path resolution in Plan Mode to prevent hallucinations (#22737)
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2026-03-24 13:19: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 271908dc94 feat(ui): implement refreshed UX for Composer layout (#21212)
Co-authored-by: Keith Guerin <keithguerin@gmail.com>
2026-03-24 02:30:48 +00:00
Abhi a1f9af3fa7 fix(core): accurately reflect subagent tool failure in UI (#23187) 2026-03-24 01:56:00 +00:00
Jarrod Whelan 89ca78837e refactor(cli,core): foundational layout, identity management, and type safety (#23286) 2026-03-24 01:49:51 +00:00
Dev Randalpura 139ef0d5bd fix(ui): make tool confirmations take up entire terminal height (#22366)
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2026-03-23 19:42:30 +00:00
ruomeng 5a65610fa6 fix(plan): reserve minimum height for selection list in AskUserDialog (#23280) 2026-03-23 18:27:08 +00:00
Keith Guerin 447a854ad9 feat(cli): implement full "GEMINI CLI" logo for logged-out state (#22412) 2026-03-23 18:05:00 +00:00
Abhi d0ebc81c28 test(cli): force generic terminal in tests to fix snapshot failures (#23499) 2026-03-23 14:50:25 +00:00
Jack Wotherspoon c67817f1a9 fix(cli): resolve flicker at boundaries of list in BaseSelectionList (#23298) 2026-03-23 03:10:47 +00:00
Christian Gunderman 8f391585ab Disallow and suppress misused spread operator. (#23294) 2026-03-21 05:21:53 +00:00
Abhi e7b6326cfa fix(cli): add Esc instruction to HooksDialog footer (#23258) 2026-03-21 04:29:09 +00:00
Christian Gunderman d1dc4902fd fix(hooks): support 'ask' decision for BeforeTool hooks (#21146) 2026-03-21 03:52:39 +00:00
Tommaso Sciortino 6c78eb7a39 test(cli): refactor tests for async render utilities (#23252) 2026-03-20 20:08:29 +00:00
kevinjwang1 86a3a913b5 Fix schema for ModelChains (#23284) 2026-03-20 19:50:15 +00:00
kevinjwang1 7a65c1e91d Add support for linking in the extension registry (#23153) 2026-03-20 15:08:34 +00:00
Jerop Kipruto 5a3c7154df feat(worktree): add Git worktree support for isolated parallel sessions (#22973) 2026-03-20 14:10:51 +00:00
kevinjwang1 06a7873c51 Add ModelChain support to ModelConfigService and make ModelDialog dynamic (#22914) 2026-03-19 22:22:26 +00:00
Jacob Richman 524b1e39a5 Fix logging and virtual list. (#23080) 2026-03-19 17:50:49 +00:00
Tommaso Sciortino 23264ced9a refactor(cli): integrate real config loading into async test utils (#23040) 2026-03-19 17:05:33 +00:00
Dev Randalpura 34f271504a fix(ui): fix flickering on small terminal heights (#21416)
Co-authored-by: Jacob Richman <jacob314@gmail.com>
2026-03-18 21:28:21 +00:00
ruomeng 94e6bf8591 fix(cli): resolve duplicate footer on tool cancel via ESC (#21743) (#21781) 2026-03-18 20:27:38 +00:00
Keith Guerin 4dcca1ca10 feat(ui): format multi-line banner warnings with a bold title (#22955)
Co-authored-by: Sehoon Shon <sshon@google.com>
2026-03-18 18:39:12 +00:00
Tommaso Sciortino a5a461c234 test(cli): simplify createMockSettings calls (#22952) 2026-03-18 18:12:44 +00:00
Tommaso Sciortino d7dfcf7f99 refactor(cli): simplify keypress and mouse providers and update tests (#22853) 2026-03-18 16:38:56 +00:00
Abhi 4ecb4bb24b refactor(ui): extract SessionBrowser search and navigation components (#22377) 2026-03-18 04:44:01 +00:00
Abhi be7c7bb83d fix(cli): resolve subagent grouping and UI state persistence (#22252) 2026-03-18 03:11:20 +00:00
N. Taylor Mullen e2658ccda8 refactor(cli): remove extra newlines in ShellToolMessage.tsx (#22868)
Co-authored-by: Spencer <spencertang@google.com>
2026-03-17 23:48:16 +00:00
anj-s b8719bcd47 feat: add 'blocked' status to tasks and todos (#22735) 2026-03-17 23:24:26 +00:00
Jomak-x 1f3f7247b1 fix(cli): clean up stale pasted placeholder metadata after word/line deletions (#20375)
Co-authored-by: ruomeng <ruomeng@google.com>
2026-03-17 20:16:26 +00:00
Adib234 77a874cf65 feat(plan): add 'All the above' option to multi-select AskUser questions (#22365)
Co-authored-by: jacob314 <jacob314@gmail.com>
2026-03-17 19:17:34 +00:00
Sehoon Shon b211f30d95 fix(cli): override j/k navigation in settings dialog to fix search input conflict (#22800) 2026-03-17 19:08:45 +00:00
AK 695bcaea0d feat(core): add foundation for subagent tool isolation (#22708) 2026-03-17 03:54:33 +00:00
Abhi d43ec6c8f3 feat: enable subagents (#22386) 2026-03-16 18:40:12 +00:00
Sehoon Shon 48130ebd25 Guard pro model usage (#22665) 2026-03-16 17:44:25 +00:00
Sri Pasumarthi e3df87cf1a fix: Adjust ToolGroupMessage filtering to hide Confirming and show Canceled tool calls. (#22230) 2026-03-16 15:50:11 +00:00
kevinjwang1 0bf7ea60c5 Add ModelDefinitions to ModelConfigService (#22302) 2026-03-14 21:45:21 +00:00
Gal Zahavi b49fc8122d feat(security): add disableAlwaysAllow setting to disable auto-approvals (#21941) 2026-03-13 23:02:09 +00:00