Skip to content

Commit e7e4fcb

Browse files
committed
fix: remove checks for the same mode
1 parent 1e3626e commit e7e4fcb

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

ee/hogai/tools/switch_mode.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,6 @@
4444
Successfully switched to {{{new_mode}}} mode. You now have access to this mode's specialized tools.
4545
""".strip()
4646

47-
SWITCH_MODE_ALREADY_IN_MODE_PROMPT = """
48-
You are already in {{{new_mode}}} mode. No switch needed – proceed with using the available tools.
49-
""".strip()
5047

5148
SWITCH_MODE_FAILURE_PROMPT = """
5249
Failed to switch to {{{new_mode}}} mode. This mode does not exist. Available modes: {{{available_modes}}}.
@@ -113,13 +110,6 @@ class SwitchModeTool(MaxTool):
113110
async def _arun_impl(self, new_mode: str) -> tuple[str, AgentMode | None]:
114111
from ee.hogai.mode_registry import MODE_REGISTRY
115112

116-
if (
117-
not self._state.agent_mode and new_mode == AgentMode.PRODUCT_ANALYTICS
118-
) or self._state.agent_mode == new_mode:
119-
return format_prompt_string(SWITCH_MODE_ALREADY_IN_MODE_PROMPT, new_mode=new_mode), cast(
120-
AgentMode, new_mode
121-
)
122-
123113
if new_mode not in MODE_REGISTRY:
124114
available = ", ".join(MODE_REGISTRY.keys())
125115
return (

0 commit comments

Comments
 (0)