Added mode and context templates

This commit is contained in:
Michael Panchenko authored and Michael Panchenko committed 2025-07-17 10:59:15 +02:00
1 parent e596319492
commit 0d4263e91d
3 files changed
+9 -1

No files matched your search

+1 -1
View File
@@ -97,7 +97,7 @@ class SerenaAgentMode(ToolInclusionDefinition, ToStringMixin):
@classmethod
def list_registered_mode_names(cls, include_user_modes: bool = True) -> list[str]:
"""Names of all registered modes (from the corresponding YAML files in the serena repo)."""
modes = [f.stem for f in Path(SERENAS_OWN_MODE_YAMLS_DIR).glob("*.yml")]
modes = [f.stem for f in Path(SERENAS_OWN_MODE_YAMLS_DIR).glob("*.yml") if f != "mode.template.yml"]
if include_user_modes:
modes += [f.stem for f in Path(USER_MODE_YAMLS_DIR).glob("*.yml")]
return sorted(set(modes))
@@ -0,0 +1,4 @@
# See Serena's documentation for more details on concept of contexts.
description: Description of the context, not used in the code.
prompt: Prompt that will form part of the system prompt/initial instructions for agents started in this context.
excluded_tools: []
@@ -0,0 +1,4 @@
# See Serena's documentation for more details on concept of modes.
description: Description of the mode, not used in the code.
prompt: Prompt that will form part of the message sent to the model when activating this mode.
excluded_tools: []