2.1.0 (#317)
Co-authored-by: Quentin Torroba <quentin.torroba@mistral.ai> Co-authored-by: Michel Thomazo <michel.thomazo@mistral.ai> Co-authored-by: Clément Drouin <clement.drouin@mistral.ai> Co-authored-by: Vincent Guilloux <vincent.guilloux@mistral.ai> Co-authored-by: Clément Siriex <clement.sirieix@mistral.ai> Co-authored-by: Kim-Adeline Miguel <kimadeline.miguel@mistral.ai> Co-authored-by: Nicolas Karolak <nicolas@karolak.fr>
This commit is contained in:
parent
9809cfc831
commit
51fecc67d9
176 changed files with 8652 additions and 4451 deletions
|
|
@ -24,6 +24,7 @@ from acp.helpers import ContentBlock, SessionUpdate
|
|||
from acp.schema import (
|
||||
AgentCapabilities,
|
||||
AgentMessageChunk,
|
||||
AgentThoughtChunk,
|
||||
AllowedOutcome,
|
||||
AuthenticateResponse,
|
||||
AuthMethod,
|
||||
|
|
@ -73,6 +74,7 @@ from vibe.core.types import (
|
|||
AsyncApprovalCallback,
|
||||
CompactEndEvent,
|
||||
CompactStartEvent,
|
||||
ReasoningEvent,
|
||||
ToolCallEvent,
|
||||
ToolResultEvent,
|
||||
ToolStreamEvent,
|
||||
|
|
@ -173,7 +175,7 @@ class VibeAcpAgentLoop(AcpAgent):
|
|||
async def new_session(
|
||||
self,
|
||||
cwd: str,
|
||||
mcp_servers: list[HttpMcpServer | SseMcpServer | McpServerStdio],
|
||||
mcp_servers: list[HttpMcpServer | SseMcpServer | McpServerStdio] | None = None,
|
||||
**kwargs: Any,
|
||||
) -> NewSessionResponse:
|
||||
load_dotenv_values()
|
||||
|
|
@ -295,8 +297,8 @@ class VibeAcpAgentLoop(AcpAgent):
|
|||
async def load_session(
|
||||
self,
|
||||
cwd: str,
|
||||
mcp_servers: list[HttpMcpServer | SseMcpServer | McpServerStdio],
|
||||
session_id: str,
|
||||
mcp_servers: list[HttpMcpServer | SseMcpServer | McpServerStdio] | None = None,
|
||||
**kwargs: Any,
|
||||
) -> LoadSessionResponse | None:
|
||||
raise NotImplementedError()
|
||||
|
|
@ -464,6 +466,13 @@ class VibeAcpAgentLoop(AcpAgent):
|
|||
field_meta={"messageId": event.message_id},
|
||||
)
|
||||
|
||||
elif isinstance(event, ReasoningEvent):
|
||||
yield AgentThoughtChunk(
|
||||
session_update="agent_thought_chunk",
|
||||
content=TextContentBlock(type="text", text=event.content),
|
||||
field_meta={"messageId": event.message_id},
|
||||
)
|
||||
|
||||
elif isinstance(event, ToolCallEvent):
|
||||
if issubclass(event.tool_class, BaseAcpTool):
|
||||
event.tool_class.update_tool_state(
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ class Bash(CoreBashTool, BaseAcpTool[AcpBashState]):
|
|||
max_bytes = self.config.max_output_bytes
|
||||
|
||||
try:
|
||||
terminal_handle = await client.create_terminal(
|
||||
terminal = await client.create_terminal(
|
||||
session_id=session_id,
|
||||
command=args.command,
|
||||
cwd=str(Path.cwd()),
|
||||
|
|
@ -49,7 +49,7 @@ class Bash(CoreBashTool, BaseAcpTool[AcpBashState]):
|
|||
except Exception as e:
|
||||
raise ToolError(f"Failed to create terminal: {e!r}") from e
|
||||
|
||||
terminal_id = terminal_handle.id
|
||||
terminal_id = terminal.terminal_id
|
||||
|
||||
await self._send_in_progress_session_update([
|
||||
TerminalToolCallContent(type="terminal", terminal_id=terminal_id)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue