diff --git a/src/toad/acp/status.py b/src/toad/acp/status.py index 8e935f4eb..e8813ca81 100644 --- a/src/toad/acp/status.py +++ b/src/toad/acp/status.py @@ -1,7 +1,6 @@ """Specification-spelled reasons and statuses own toolkit independent facts.""" from agent_comms.declared_family import DeclaredFamily from agent_comms.mro_dispatch import MroDispatch, handles -from agent_comms.native_tools import NativeTool from agent_comms.transcript_events import ToolTranscript, ToolStartTranscript, ToolEndTranscript from dataclasses import dataclass from acp.schema import ToolCall @@ -50,17 +49,18 @@ def from_transcript(cls, events: tuple[ToolTranscript, ...]): borrow the final ACP state, including an end without its earlier start. """ first = events[0] - call = ToolCall(tool_call_id=first.tool_call_id, title='', status='completed') + call = ToolCall(tool_call_id=first.tool_call_id, title=first.title, + kind=first.kind, status='completed') consumer = cls(call) for event in events: consumer.dispatch_sync(event) - start = NativeTool.start(first.tool_call_id, first.tool_name, call.raw_input or {}) - call.title = start.title - call.kind = start.kind return cls.from_acp(call) @handles(ToolStartTranscript) def recorded_start(self, event: ToolStartTranscript): + self.call.status = 'in_progress' + self.call.title = event.title + self.call.kind = event.kind self.call.raw_input = event.raw_input @handles(ToolEndTranscript) diff --git a/src/toad/tool_output.py b/src/toad/tool_output.py index 0154c4aa7..1fdbe4c30 100644 --- a/src/toad/tool_output.py +++ b/src/toad/tool_output.py @@ -372,7 +372,7 @@ def view(self) -> ToolCall: @staticmethod def capture_parts(tool_call: schema.ToolCall, *, content=None) -> tuple[ToolOutputPart, ...]: """Pure ACP interpretation, shared by live ingress and saved workers.""" - raw_input = tool_call.raw_input or {} + raw_input = tool_call.raw_input path = ( raw_input.get("path") or raw_input.get("file_path") or raw_input.get("filePath") if isinstance(raw_input, dict) else None