Agent Zero AI framework
Defer automatic chat naming until after responses
Alessandro01e9536c3538
diff --git a/plugins/_chat_naming/AGENTS.md b/plugins/_chat_naming/AGENTS.mdindex f56c45f12..8046ae97c 100644--- a/plugins/_chat_naming/AGENTS.md+++ b/plugins/_chat_naming/AGENTS.md@@ -7,7 +7,7 @@## Ownership- `helpers/naming.py` owns user-message selection, name generation, and persistence.-- `extensions/python/monologue_start/` owns configured automatic naming.+- `extensions/python/monologue_end/` owns configured automatic naming.- `api/chat_name.py` owns modal reads, generation, and manual saves.- `webui/` and `extensions/webui/sidebar-row-actions-menu/` own the standard rename modal and row-menu action.- `prompts/` owns the Utility Model naming instructions.@@ -16,6 +16,7 @@## Local Contracts- Automatic naming reads scoped plugin config through the active chat agent.+- Automatic naming runs after the monologue completes, so it cannot delay the Main Model.- Utility Model input contains the current name and user messages only; assistant work and tool results are excluded.- The complete naming prompt must remain within 70% of the effective Utility Model context window, preserving the newest user context when trimming is required.- `once` names only unnamed user chats from their first user message; `always` considers the latest user message plus recent user context.diff --git a/plugins/_chat_naming/README.md b/plugins/_chat_naming/README.mdindex 7082459d2..06f27cfde 100644--- a/plugins/_chat_naming/README.md+++ b/plugins/_chat_naming/README.md@@ -2,6 +2,6 @@Chat Naming adds a standard sidebar action for manually renaming chats and tasks. Its modal can ask the chat's configured Utility Model to suggest a concise name from recent user messages.-Automatic naming is configured per project and agent profile. It can name an unnamed chat once from its first user message, or refresh the name after every user message using recent user-only context.+Automatic naming is configured per project and agent profile. It runs after the response, so its Utility Model call never delays the Main Model. It can name an unnamed chat once from its first user message, or refresh the name after every user message using recent user-only context.Use `/rename New Chat Name` to rename the current chat directly, or `/rename auto` to generate and save a name with its configured Utility Model.diff --git a/plugins/_chat_naming/extensions/python/monologue_start/_60_rename_chat.py b/plugins/_chat_naming/extensions/python/monologue_end/_60_rename_chat.pysimilarity index 100%rename from plugins/_chat_naming/extensions/python/monologue_start/_60_rename_chat.pyrename to plugins/_chat_naming/extensions/python/monologue_end/_60_rename_chat.pydiff --git a/plugins/_chat_naming/tests/test_chat_naming.py b/plugins/_chat_naming/tests/test_chat_naming.pyindex dbb1cf7e4..61b0c60e9 100644--- a/plugins/_chat_naming/tests/test_chat_naming.py+++ b/plugins/_chat_naming/tests/test_chat_naming.py@@ -4,7 +4,7 @@ import pytestfrom agent import AgentContextTypefrom plugins._chat_naming.commands import rename_command-from plugins._chat_naming.extensions.python.monologue_start import _60_rename_chat as rename_chat+from plugins._chat_naming.extensions.python.monologue_end import _60_rename_chat as rename_chatfrom plugins._chat_naming.helpers import naming