{"type":"begin","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tool_view.py"}}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tool_view.py"},"lines":{"text":"from comate_cli.terminal_agent.models import TodoItemState, ToolRunState\n"},"line_number":31,"absolute_offset":696,"submatches":[{"match":{"text":"ToolRunState"},"start":60,"end":72}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tool_view.py"},"lines":{"text":"    \"\"\"Tool state tracker for loading layer + in-message mutable tool lines.\"\"\"\n"},"line_number":551,"absolute_offset":19793,"submatches":[{"match":{"text":"state"},"start":12,"end":17}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tool_view.py"},"lines":{"text":"        self._state_by_id: dict[str, ToolRunState] = {}\n"},"line_number":558,"absolute_offset":19976,"submatches":[{"match":{"text":"state"},"start":14,"end":19},{"match":{"text":"ToolRunState"},"start":37,"end":49}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tool_view.py"},"lines":{"text":"        self._state_by_id.clear()\n"},"line_number":566,"absolute_offset":20306,"submatches":[{"match":{"text":"state"},"start":14,"end":19}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tool_view.py"},"lines":{"text":"    def _task_title(state: ToolRunState) -> str:\n"},"line_number":570,"absolute_offset":20396,"submatches":[{"match":{"text":"state"},"start":20,"end":25},{"match":{"text":"ToolRunState"},"start":27,"end":39}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tool_view.py"},"lines":{"text":"        if state.task_desc and state.task_desc != state.subagent_name:\n"},"line_number":571,"absolute_offset":20445,"submatches":[{"match":{"text":"state"},"start":11,"end":16},{"match":{"text":"state"},"start":31,"end":36},{"match":{"text":"state"},"start":50,"end":55}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tool_view.py"},"lines":{"text":"            return f\"{state.subagent_name}({state.task_desc})\"\n"},"line_number":572,"absolute_offset":20516,"submatches":[{"match":{"text":"state"},"start":22,"end":27},{"match":{"text":"state"},"start":44,"end":49}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tool_view.py"},"lines":{"text":"        return state.subagent_name or \"Agent\"\n"},"line_number":573,"absolute_offset":20579,"submatches":[{"match":{"text":"state"},"start":15,"end":20}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tool_view.py"},"lines":{"text":"    def _running_states(self, *, only_tasks: bool = False) -> list[ToolRunState]:\n"},"line_number":575,"absolute_offset":20626,"submatches":[{"match":{"text":"state"},"start":17,"end":22},{"match":{"text":"ToolRunState"},"start":67,"end":79}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tool_view.py"},"lines":{"text":"        states = [state for state in self._state_by_id.values() if state.status == \"running\"]\n"},"line_number":576,"absolute_offset":20708,"submatches":[{"match":{"text":"state"},"start":8,"end":13},{"match":{"text":"state"},"start":18,"end":23},{"match":{"text":"state"},"start":28,"end":33},{"match":{"text":"state"},"start":43,"end":48},{"match":{"text":"state"},"start":67,"end":72}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tool_view.py"},"lines":{"text":"            return [state for state in states if state.is_task]\n"},"line_number":578,"absolute_offset":20825,"submatches":[{"match":{"text":"state"},"start":20,"end":25},{"match":{"text":"state"},"start":30,"end":35},{"match":{"text":"state"},"start":39,"end":44},{"match":{"text":"state"},"start":49,"end":54}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tool_view.py"},"lines":{"text":"        return states\n"},"line_number":579,"absolute_offset":20889,"submatches":[{"match":{"text":"state"},"start":15,"end":20}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tool_view.py"},"lines":{"text":"    def _running_line(self, state: ToolRunState, pulse: str, now: float) -> str:\n"},"line_number":581,"absolute_offset":20912,"submatches":[{"match":{"text":"state"},"start":28,"end":33},{"match":{"text":"ToolRunState"},"start":35,"end":47}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tool_view.py"},"lines":{"text":"        elapsed = _format_duration(now - state.started_at_monotonic)\n"},"line_number":582,"absolute_offset":20993,"submatches":[{"match":{"text":"state"},"start":41,"end":46}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tool_view.py"},"lines":{"text":"        if state.is_task:\n"},"line_number":583,"absolute_offset":21062,"submatches":[{"match":{"text":"state"},"start":11,"end":16}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tool_view.py"},"lines":{"text":"            token_text = self._task_token_text(state)\n"},"line_number":584,"absolute_offset":21088,"submatches":[{"match":{"text":"state"},"start":47,"end":52}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tool_view.py"},"lines":{"text":"            return f\"{pulse} {self._task_title(state)} {BULLET_OPERATOR} 运行中 {BULLET_OPERATOR} {elapsed} {BULLET_OPERATOR} {token_text}\"\n"},"line_number":585,"absolute_offset":21142,"submatches":[{"match":{"text":"state"},"start":47,"end":52}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tool_view.py"},"lines":{"text":"            f\" {state.args_summary}\" if state.args_summary and state.args_summary != \"hidden\" else \"\"\n"},"line_number":588,"absolute_offset":21313,"submatches":[{"match":{"text":"state"},"start":16,"end":21},{"match":{"text":"state"},"start":40,"end":45},{"match":{"text":"state"},"start":63,"end":68}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tool_view.py"},"lines":{"text":"        return f\"{pulse} {state.tool_name}{summary_suffix} {BULLET_OPERATOR} 运行中 {BULLET_OPERATOR} {elapsed}\"\n"},"line_number":590,"absolute_offset":21425,"submatches":[{"match":{"text":"state"},"start":26,"end":31}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tool_view.py"},"lines":{"text":"        return any(state.status == \"running\" and state.is_task for state in self._state_by_id.values())\n"},"line_number":602,"absolute_offset":21898,"submatches":[{"match":{"text":"state"},"start":19,"end":24},{"match":{"text":"state"},"start":49,"end":54},{"match":{"text":"state"},"start":67,"end":72},{"match":{"text":"state"},"start":82,"end":87}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tool_view.py"},"lines":{"text":"            state.subagent_source_prefix\n"},"line_number":611,"absolute_offset":22203,"submatches":[{"match":{"text":"state"},"start":12,"end":17}]}}
{"type":"end","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tool_view.py"},"binary_offset":null,"stats":{"elapsed":{"secs":0,"nanos":108100,"human":"0.000108s"},"searches":1,"searches_with_match":1,"bytes_searched":22244,"bytes_printed":7947,"matched_lines":21,"matches":40}}}
{"data":{"elapsed_total":{"human":"0.001181s","nanos":1181125,"secs":0},"stats":{"bytes_printed":7947,"bytes_searched":22244,"elapsed":{"human":"0.000108s","nanos":108100,"secs":0},"matched_lines":21,"matches":40,"searches":1,"searches_with_match":1}},"type":"summary"}
