Skip to content

Commit 0b4b7e0

Browse files
committed
minor fixes
1 parent d9a99e8 commit 0b4b7e0

File tree

5 files changed

+9
-7
lines changed

5 files changed

+9
-7
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,6 @@ TODO.md
3030

3131
*.log
3232

33-
/ref/
33+
/ref/
34+
35+
.cursor/

hud/datasets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ async def run_dataset(
143143
... )
144144
"""
145145
# Import here to avoid circular imports
146-
from mcp_use import MCPClient
146+
from hud.mcp.client import MCPClient
147147

148148
import hud
149149

hud/mcp/base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ async def run_conversation(self, prompt: str, max_steps: int = 10) -> AgentResul
448448
logger.error("Tool execution failed: %s", e)
449449
# Create error MCPToolResult
450450
error_result = MCPToolResult(
451-
content=[types.TextContent(text=str(e))], isError=True
451+
content=[types.TextContent(text=str(e), type="text")], isError=True
452452
)
453453
tool_results.append(error_result)
454454

@@ -535,7 +535,7 @@ async def _run_prompt(self, prompt: str, max_steps: int = 10) -> AgentResult:
535535
logger.error("Tool execution failed: %s", e)
536536
# Create error MCPToolResult
537537
error_result = MCPToolResult(
538-
content=[types.TextContent(text=str(e))], isError=True
538+
content=[types.TextContent(text=str(e), type="text")], isError=True
539539
)
540540
tool_results.append(error_result)
541541

hud/mcp/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from typing import Self
1414

1515
from mcp import types
16-
from mcp_use.session import MCPUseSession
16+
from mcp_use.session import MCPSession as MCPUseSession
1717

1818
logger = logging.getLogger(__name__)
1919

hud/mcp/openai.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def __init__(
9393
""" # noqa: E501
9494

9595
async def run(
96-
self, prompt_or_task: str | TaskConfig, max_steps: int = 10, conversation_mode: bool = False
96+
self, prompt_or_task: str | TaskConfig, max_steps: int = 10
9797
) -> dict[str, Any]:
9898
"""
9999
Run the agent with the given prompt or task.
@@ -106,7 +106,7 @@ async def run(
106106
self.pending_safety_checks = []
107107

108108
# Use base implementation
109-
return await super().run(prompt_or_task, max_steps, conversation_mode)
109+
return await super().run(prompt_or_task, max_steps)
110110

111111
async def create_initial_messages(self, prompt: str, screenshot: str | None) -> list[Any]:
112112
"""

0 commit comments

Comments
 (0)