feat(core): Land ContextCompressionService#24483
Conversation
🧠 Model Steering GuidanceThis PR modifies files that affect the model's behavior (prompts, tools, or instructions).
This is an automated guidance message triggered by steering logic signatures. |
|
Size Change: +1.04 kB (0%) Total Size: 34.6 MB
ℹ️ View Unchanged
|
788d705 to
12dfb33
Compare
2e32ca0 to
9cfdce6
Compare
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request integrates a new context compression service to improve the efficiency of the context management pipeline. It includes structural refactoring of existing context management classes, the addition of a new experimental generalist profile for better default settings, and a cleanup of configuration APIs to support more granular context control. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a new experimental generalistProfile and a ContextCompressionService to manage agent context more efficiently. The generalistProfile provides a set of default configurations for context management, while the ContextCompressionService uses an LLM to decide whether to provide full file content, snippets, or summaries in the conversation history. Several critical issues were identified in the new compression logic, including a bug in the enabled flag logic that prevents disabling the feature, incorrect iteration over file paths in the protection logic, and multiple instances of missing input sanitization which could lead to prompt injection.
8e16db8 to
dcbefb4
Compare
* Upstreams the ContextCompressionService from: thetomzohar#4 * Some minor tidying. * Refactor: Rename ContextManager to MemoryContextManager * Settings: Add experimental.generalistProfile to safely default context management hyperparameters
c384557 to
d3c4e71
Compare
|
✅ 55 tests passed successfully on gemini-3-flash-preview. 🧠 Model Steering GuidanceThis PR modifies files that affect the model's behavior (prompts, tools, or instructions).
This is an automated guidance message triggered by steering logic signatures. |
Part of the work for #24482, context compression will be integrated into the context management pipeline in a follow-up.