|
15 | 15 |
|
16 | 16 | from ee.hogai.context.context import AssistantContextManager |
17 | 17 | from ee.hogai.graph.schema_generator.nodes import SchemaGenerationException |
18 | | -from ee.hogai.tools.legacy_create_and_query_insight import ( |
| 18 | +from ee.hogai.tools.create_and_query_insight import ( |
19 | 19 | INSIGHT_TOOL_FAILURE_SYSTEM_REMINDER_PROMPT, |
20 | | - LegacyCreateAndQueryInsightTool, |
| 20 | + CreateAndQueryInsightTool, |
21 | 21 | ) |
22 | 22 | from ee.hogai.utils.types import AssistantState |
23 | 23 | from ee.hogai.utils.types.base import NodePath |
@@ -45,7 +45,7 @@ def _create_tool( |
45 | 45 |
|
46 | 46 | context_manager = AssistantContextManager(team=self.team, user=self.user, config=config) |
47 | 47 |
|
48 | | - return LegacyCreateAndQueryInsightTool( |
| 48 | + return CreateAndQueryInsightTool( |
49 | 49 | team=self.team, |
50 | 50 | user=self.user, |
51 | 51 | state=state, |
@@ -240,14 +240,14 @@ async def test_is_editing_mode_classmethod(self): |
240 | 240 | configurable={"contextual_tools": {AssistantTool.CREATE_AND_QUERY_INSIGHT.value: {}}} |
241 | 241 | ) |
242 | 242 | context_manager_editing = AssistantContextManager(team=self.team, user=self.user, config=config_editing) |
243 | | - self.assertTrue(LegacyCreateAndQueryInsightTool.is_editing_mode(context_manager_editing)) |
| 243 | + self.assertTrue(CreateAndQueryInsightTool.is_editing_mode(context_manager_editing)) |
244 | 244 |
|
245 | 245 | # Test with editing mode disabled |
246 | 246 | config_not_editing = RunnableConfig(configurable={"contextual_tools": {}}) |
247 | 247 | context_manager_not_editing = AssistantContextManager(team=self.team, user=self.user, config=config_not_editing) |
248 | | - self.assertFalse(LegacyCreateAndQueryInsightTool.is_editing_mode(context_manager_not_editing)) |
| 248 | + self.assertFalse(CreateAndQueryInsightTool.is_editing_mode(context_manager_not_editing)) |
249 | 249 |
|
250 | 250 | # Test with other contextual tools but not create_and_query_insight |
251 | 251 | config_other = RunnableConfig(configurable={"contextual_tools": {"some_other_tool": {}}}) |
252 | 252 | context_manager_other = AssistantContextManager(team=self.team, user=self.user, config=config_other) |
253 | | - self.assertFalse(LegacyCreateAndQueryInsightTool.is_editing_mode(context_manager_other)) |
| 253 | + self.assertFalse(CreateAndQueryInsightTool.is_editing_mode(context_manager_other)) |
0 commit comments