Skip to content

Conversation

@mrubens
Copy link
Collaborator

@mrubens mrubens commented Feb 14, 2025

Roo sends the filenames of the open editor tabs in the environment details for each message. I saw an example today where someone had 665 open tabs and it was really blowing up their context without them realizing, so this PR adds an advanced setting to adjust the number of tabs included and defaults it to a max of 20.

Screenshot 2025-02-13 at 10 25 34 PM

Important

Add a setting to limit the number of open tabs included in context, defaulting to 20, with UI and state management updates.

  • Behavior:
    • Adds a setting maxOpenTabsContext to limit the number of open tabs included in context, defaulting to 20, in Cline.ts.
    • Updates ClineProvider.ts to handle maxOpenTabsContext in global state and webview messages.
    • Adds UI control for maxOpenTabsContext in SettingsView.tsx.
  • State Management:
    • Adds maxOpenTabsContext to ExtensionState in ExtensionMessage.ts and ExtensionStateContext.tsx.
    • Handles maxOpenTabsContext in WebviewMessage.ts and ClineProvider.test.ts.
  • Misc:
    • Updates ClineProvider.test.ts to test maxOpenTabsContext behavior.

This description was created by Ellipsis for 0855159. It will automatically update as commits are pushed.

@changeset-bot
Copy link

changeset-bot bot commented Feb 14, 2025

⚠️ No Changeset found

Latest commit: 0855159

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Collaborator

@cte cte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a lot of tabs 😅

@mrubens mrubens merged commit 0ef4cc0 into main Feb 14, 2025
8 of 9 checks passed
@mrubens mrubens deleted the open_tabs_context_limit branch February 14, 2025 03:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants