Skip to content

Conversation

@daniel-lxs
Copy link
Member

@daniel-lxs daniel-lxs commented Nov 17, 2025

Adds a new maxGitStatusFiles setting to optionally include git repository status in the environment details section of the system prompt.

Key Features:

  • Configurable via slider in Context Management settings (0-50 files)
  • Disabled by default (maxGitStatusFiles = 0)
  • When enabled (> 0), always shows branch info (e.g., ## main...origin/main)
  • File entries (staged/unstaged/untracked) are limited by the maxFiles parameter
  • Full localization support for all 18 languages

Implementation:

  • New getGitStatus(cwd, maxFiles) utility in src/utils/git.ts
  • Integrated into getEnvironmentDetails() with conditional rendering
  • Slider positioned after workspace files slider in settings UI
  • Comprehensive test coverage (44 git tests, 20 environment tests)

Behavior:

  • 0 = Disabled (no git status included) - default
  • 1-50 = Enabled, showing branch header + up to N file entries

- Add getGitStatus() function that returns raw git status output
- Truncate git status to 20 lines to prevent context bloat
- Only show section headers (Visible Files, Open Tabs) when content exists
- Add comprehensive tests for git status functionality
- All tests passing (43 git tests, 15 environment tests)
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. Enhancement New feature or request labels Nov 17, 2025
@roomote
Copy link
Contributor

roomote bot commented Nov 17, 2025

Rooviewer Clock   Follow along on Roo Cloud

Re-reviewed changes since last review. No new issues found.

The latest commit adds configurable git status with proper defaults (disabled by default, maxGitStatusFiles=0). The implementation correctly handles the feature flag, passes the maxFiles parameter through the call chain, and includes comprehensive test coverage for all scenarios.

Previous reviews

Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues.

@daniel-lxs daniel-lxs moved this from Triage to PR [Needs Review] in Roo Code Roadmap Nov 17, 2025
- Add maxGitStatusFiles setting (0=disabled by default)
- Implement getGitStatus() with configurable file limit
- Add slider UI control in Context Management settings
- Positioned after workspace files slider, before concurrent reads
- Include localization for all 18 languages
- Branch info always shown when enabled (maxFiles > 0)
- Comprehensive test coverage (44 git tests, 20 env tests)
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Nov 17, 2025
@mrubens mrubens merged commit 3631a02 into main Nov 17, 2025
13 checks passed
@mrubens mrubens deleted the feat/add-git-status-to-environment-details branch November 17, 2025 19:10
@github-project-automation github-project-automation bot moved this from PR [Needs Review] to Done in Roo Code Roadmap Nov 17, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Nov 17, 2025
mini2s added a commit to zgsm-ai/costrict that referenced this pull request Nov 18, 2025
* fix: change Add to Context keybinding to avoid Redo conflict (RooCodeInc#8653)

Co-authored-by: Roo Code <[email protected]>

* feat: add Google Ads conversion tracking to reviewer page (RooCodeInc#8831)

* feat: add Google Ads conversion tracking to reviewer page

* fix: add asChild prop to first button to prevent invalid HTML nesting

---------

Co-authored-by: Roo Code <[email protected]>
Co-authored-by: daniel-lxs <[email protected]>

* Fix provider model loading race conditions (RooCodeInc#8836)

* Release v3.29.1 (RooCodeInc#8854)

chore: add changeset for v3.29.1

* Changeset version bump (RooCodeInc#8855)

* changeset version bump

* Update CHANGELOG for version 3.29.1 release

Updated version number and added release notes for 3.29.1.

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <[email protected]>

* Merge remote-tracking branch 'upstream/main' into roo-to-main

* Fix caching logic in Roo provider (