Skip to content

Add manual trigger button for context condensing #3671

@canrobins13

Description

@canrobins13

What problem does this proposed feature solve?

Currently the autoCondenseContext experimental feature triggers context condensing when the context window is almost full, but there's no way to manually condense the context window earlier on. This could be used for cost-saving or for avoiding context poisoning or irrelevant information distracting the model.

Describe the proposed solution in detail

Add a button in the task bar which triggers a context condense. In the future we could add something like a slash command.

Technical considerations or implementation details (optional)

The main thing to watch out for here is that we don't want to allow races with other operations (e.g. if the task is executing or the user sends a message during the condense). We would also want the context window size to update in the UI immediately; under the current implementation, this only happens after the next API request.
I have a very simple draft PR here which doesn't address the above two issues #3623

Describe alternatives considered (if any)

We could instead allow users to configure the threshold at which the condense operation is run. I think this makes sense as an additional feature

Additional Context & Mockups

No response

Proposal Checklist

  • I have searched existing Issues and Discussions to ensure this proposal is not a duplicate.
  • This proposal is for a specific, actionable change intended for implementation (not a general idea).
  • I understand that this proposal requires review and approval before any development work begins.

Are you interested in implementing this feature if approved?

  • Yes, I would like to contribute to implementing this feature.

Metadata

Metadata

Assignees

No one assigned

    Labels

    EnhancementNew feature or requestIssue - Needs ScopingValid, but needs effort estimate or design input before work can start.feature requestFeature request, not a bug

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions