feat(core): wire up the new ContextManager and AgentChatHistory#25409
feat(core): wire up the new ContextManager and AgentChatHistory#25409joshualitt merged 19 commits intomainfrom
Conversation
|
Size Change: +84.9 kB (+0.25%) Total Size: 33.9 MB
ℹ️ View Unchanged
|
074ad4a to
b2e0030
Compare
b2e0030 to
935f721
Compare
4f32efe to
69507db
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 introduces significant architectural improvements to the context management system. By transitioning to a more robust event-driven approach with the new ContextManager and AgentChatHistory, the system gains better control over chat history lifecycles. Additionally, it adds testing capabilities through a new stress test profile and improves the precision of token estimation, ensuring more reliable context management behavior. 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 an experimental stressTestProfile to the context management system, enabling more aggressive testing of garbage collection and distillation. Key refactorings include the introduction of ContextGraphBuilder for incremental graph updates, the AgentChatHistory class for managing chat history, and a centralized initializeContextManager utility. Additionally, ContextTokenCalculator now utilizes a WeakMap cache for improved performance. A review comment suggests optimizing the node insertion logic in ContextWorkingBuffer to prevent potential stack overflow issues with large arrays.
3598fe0 to
6d7aa49
Compare
d750bd8 to
7cf8a1d
Compare
ef066f6 to
bc4d308
Compare
c1624f1 to
038c42e
Compare
…replacing history logic This fixes ContextManager incorrectly parsing empty streaming tool args while preserving original GeminiChat streaming behavior.
ea46a7a to
21ff0f0
Compare
21ff0f0 to
95bacfa
Compare
5d69f06 to
03ace11
Compare
fixes #25408