From fdeee664ee4074382e8548e17d129e26ef373f33 Mon Sep 17 00:00:00 2001 From: Dominik Jain Date: Fri, 5 Dec 2025 01:36:30 +0100 Subject: [PATCH] Remove obsolete enums for contexts and modes --- src/serena/config/context_mode.py | 33 ------------------------------- 1 file changed, 33 deletions(-) diff --git a/src/serena/config/context_mode.py b/src/serena/config/context_mode.py index 083ebbb4..dfff0937 100644 --- a/src/serena/config/context_mode.py +++ b/src/serena/config/context_mode.py @@ -4,7 +4,6 @@ Context and Mode configuration loader import os from dataclasses import dataclass, field -from enum import Enum from pathlib import Path from typing import TYPE_CHECKING, Self @@ -224,35 +223,3 @@ class SerenaAgentContext(ToolInclusionDefinition, ToStringMixin): print(f"{self.name}:\n {self.description}") if self.excluded_tools: print(" excluded tools:\n " + ", ".join(sorted(self.excluded_tools))) - - -class RegisteredContext(Enum): - """A registered context.""" - - IDE_ASSISTANT = "ide-assistant" - """For Serena running within an assistant that already has basic tools, like Claude Code, Cline, Cursor, etc.""" - DESKTOP_APP = "desktop-app" - """For Serena running within Claude Desktop or a similar app which does not have built-in tools for code editing.""" - AGENT = "agent" - """For Serena running as a standalone agent, e.g. through agno.""" - - def load(self) -> SerenaAgentContext: - """Load the context.""" - return SerenaAgentContext.from_name(self.value) - - -class RegisteredMode(Enum): - """A registered mode.""" - - INTERACTIVE = "interactive" - """Interactive mode, for multi-turn interactions.""" - EDITING = "editing" - """Editing tools are activated.""" - PLANNING = "planning" - """Editing tools are deactivated.""" - ONE_SHOT = "one-shot" - """Non-interactive mode, where the goal is to finish a task autonomously.""" - - def load(self) -> SerenaAgentMode: - """Load the mode.""" - return SerenaAgentMode.from_name(self.value)