Skip to content

Conversation

@jinliyl
Copy link
Member

@jinliyl jinliyl commented Feb 10, 2026

No description provided.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @jinliyl, 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 a series of enhancements and refactorings primarily focused on improving the memory management and summarization capabilities of the remefs agent. Key changes include a significant overhaul of the system prompts to guide the agent in handling daily and long-term memories, standardizing API base URL parameters across the codebase, and refining the conversation compaction and summarization logic. The update also provides more granular control over ReMeFs initialization and streamlines tool management, aiming for a more robust and configurable memory system.

Highlights

  • Enhanced Memory Management Prompts: Significant updates were made to the agent's system prompts in fs_cli.yaml and fs_summarizer.yaml to provide clearer instructions for daily notes, long-term memory (MEMORY.md), and memory recall, including a new Chinese version of the prompts.
  • Refactored API Base URL Parameters: API base URL parameters were standardized across Application, ServiceContext, and ReMeFs classes, renaming llm_api_base and embedding_api_base to llm_base_url and embedding_base_url for consistency.
  • Improved Conversation Summarization Logic: The FsCli and FsCompactor were modified to streamline the compaction process, including an earlier call to reset and direct return of the summary content without additional formatting.
  • Dynamic Tool Initialization in ReMeFs: ReMeFs now dynamically initializes its file system tools within the summary and chat_with_remy methods, removing the static fs_tools attribute and allowing for more flexible tool configurations.
  • Removed snippet_max_chars Configuration: The snippet_max_chars setting has been removed from memory store configurations and related code, indicating that full text snippets will now be returned in search results.
  • Expanded ReMeFs Initialization Parameters: The ReMeFs constructor now accepts a wider range of configuration parameters, allowing for more granular control over LLM, embedding model, memory store, token counter, and file watcher settings.
  • Updated Command Handling: The commands attribute in ReMeFs has been converted from a list to a dictionary, providing descriptions for each command.
  • Refined FsSummarizer Prompting: The FsSummarizer now uses a user_message_default prompt that includes the full conversation context and provides a detailed execution flow for extracting and storing persistent memories, with explicit instructions for handling existing files and merging information.
Changelog
  • reme/agent/chat/fs_cli.py
    • Formatted summarizer.call arguments for readability.
    • Adjusted compact method logic to call reset earlier and remove summary_message creation.
    • Added a compact call at the beginning of the execute method.
  • reme/agent/chat/fs_cli.yaml
    • Updated system_prompt structure, adding workspace_dir and reordering sections.
    • Revised "Memory System" instructions for daily notes and long-term memory (MEMORY.md).
    • Added read_tool to "Recall Tools" section.
    • Moved "Previous Conversation Summary" section to the end of the prompt.
    • Added a complete system_prompt_zh (Chinese version) with equivalent content.
  • reme/agent/fs/fs_compactor.py
    • Removed verbose docstring from execute method.
    • Changed "Turn Context" prefix to "History Summary".
    • Removed prompt_format call, returning raw summary content directly.
  • reme/agent/fs/fs_summarizer.py
    • Imported format_messages utility.
    • Updated user_message_v2 to user_message_default and included conversation in the prompt formatting.
  • reme/agent/fs/fs_summarizer.yaml
    • Renamed user_message_v2 to user_message_default.
    • Completely revised user_message_default prompt to include conversation context, detailed execution flow, update principles, and an example for information merging.
    • Added a complete user_message_default_zh (Chinese version) with equivalent content.
  • reme/config/fs.yaml
    • Switched the default LLM model from qwen3-30b-a3b-instruct-2507 to qwen3-30b-a3b-thinking-2507.
    • Removed snippet_max_chars configuration from memory_stores.
  • reme/core/application.py
    • Renamed llm_api_base to llm_base_url and embedding_api_base to embedding_base_url in __init__ and create method signatures and their usage.
  • reme/core/context/service_context.py
    • Renamed llm_api_base to llm_base_url and embedding_api_base to embedding_base_url in __init__ method signature and _update_env calls.
  • reme/core/memory_store/base_memory_store.py
    • Removed snippet_max_chars parameter from __init__ and removed it as a class attribute.
  • reme/core/memory_store/sqlite_memory_store.py
    • Modified vector_search and keyword_search to return the full text as snippet instead of truncating based on snippet_max_chars.
  • reme/core/schema/service_config.py
    • Removed snippet_max_chars field from MemoryStoreConfig.
  • reme/reme.py
    • Renamed llm_api_base to llm_base_url and embedding_api_base to embedding_base_url in __init__ method signature and its docstring.
  • reme/reme_fs.py
    • Removed imports for BaseTool, FindTool, and GrepTool.
    • Expanded __init__ parameters to include detailed configurations for working directory, LLM, embedding models, memory store, token counter, and file watchers.
    • Initialized working_path and memory_path directories.
    • Dynamically configured default_llm_config, default_embedding_model_config, default_memory_store_config, default_token_counter_config, and default_file_watcher_config based on new __init__ parameters.
    • Removed the static self.fs_tools attribute.
    • Converted self.commands from a list to a dictionary with command descriptions.
    • Updated compact method signature to accept language and kwargs, and passed them to FsCompactor.
    • Updated summary method signature to accept language and kwargs, and explicitly defined the list of tools passed to FsSummarizer.
    • Updated chat_with_remy method signature to accept language and kwargs, and explicitly defined the list of tools passed to FsCli.
    • Modified /compact command handling in chat_with_remy to explicitly set force_compact=True.
  • tests/test_fs_compactor.py
    • Updated conversation content in create_long_conversation and create_realistic_personal_conversation to use Chinese text.
  • tests/test_fs_file_watch_integration.py
    • Removed snippet_max_chars from default_memory_store_config in test_file_watch_integration.
  • tests/test_fs_memory_search.py
    • Removed snippet_max_chars from default_memory_store_config in multiple test functions.
  • tests/test_fs_summary.py
    • Refactored test functions to use Chinese messages and include time_created for messages.
    • Added helper functions delete_memory_file and check_memory_file for memory file management.
    • Introduced new test scenarios: test_summary_first_write, test_summary_complementary_info, and test_summary_conflicting_info to validate memory handling.
  • tests/test_memory_store.py
    • Removed SQLITE_SNIPPET_MAX_CHARS from TestConfig.
    • Removed snippet_max_chars parameter from create_memory_store function.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@jinliyl jinliyl merged commit 410c1b9 into main Feb 10, 2026
3 checks passed
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a significant refactoring, primarily focused on improving the programmatic configuration of ReMeFs and enhancing localization support. Key changes include renaming llm_api_base to llm_base_url for clarity, removing the snippet_max_chars feature to return full chunk text from searches, and adding Chinese language prompts. The reme_fs.py file has been substantially updated to allow for more granular control over component configurations and tool provisioning for agents, which is a great improvement in modularity. Additionally, a logic bug in the compact method has been fixed, and the test suites, particularly for the summary functionality, have been significantly improved. I've found one area for improvement regarding redundant file watching paths.

Comment on lines +95 to +97
str(working_path / "MEMORY.md"),
str(working_path / "memory.md"),
str(memory_path),
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The default watch_paths includes both MEMORY.md and memory.md. The agent's system prompt in reme/agent/chat/fs_cli.yaml consistently refers to MEMORY.md as the canonical long-term memory file. Including memory.md in the default watch paths is redundant and could lead to confusion or unexpected behavior if a user accidentally creates both files. To enforce consistency and simplify the configuration, it would be better to only watch the canonical filename MEMORY.md.

Suggested change
str(working_path / "MEMORY.md"),
str(working_path / "memory.md"),
str(memory_path),
str(working_path / "MEMORY.md"),
str(memory_path),

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.

1 participant