{"type":"begin","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/custom_slash_commands.py"}}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/custom_slash_commands.py"},"lines":{"text":"        arg_tokens = shlex.split(normalized_args) if normalized_args else []\n"},"line_number":204,"absolute_offset":6607,"submatches":[{"match":{"text":"token"},"start":12,"end":17}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/custom_slash_commands.py"},"lines":{"text":"        arg_tokens=arg_tokens,\n"},"line_number":211,"absolute_offset":6941,"submatches":[{"match":{"text":"token"},"start":12,"end":17},{"match":{"text":"token"},"start":23,"end":28}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/custom_slash_commands.py"},"lines":{"text":"    arg_tokens: list[str],\n"},"line_number":250,"absolute_offset":8102,"submatches":[{"match":{"text":"token"},"start":8,"end":13}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/custom_slash_commands.py"},"lines":{"text":"            if index >= len(arg_tokens):\n"},"line_number":263,"absolute_offset":8466,"submatches":[{"match":{"text":"token"},"start":32,"end":37}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/custom_slash_commands.py"},"lines":{"text":"            return arg_tokens[index]\n"},"line_number":268,"absolute_offset":8705,"submatches":[{"match":{"text":"token"},"start":23,"end":28}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/custom_slash_commands.py"},"lines":{"text":"            if index < 0 or index >= len(arg_tokens):\n"},"line_number":272,"absolute_offset":8834,"submatches":[{"match":{"text":"token"},"start":45,"end":50}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/custom_slash_commands.py"},"lines":{"text":"            return arg_tokens[index]\n"},"line_number":276,"absolute_offset":9040,"submatches":[{"match":{"text":"token"},"start":23,"end":28}]}}
{"type":"end","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/custom_slash_commands.py"},"binary_offset":null,"stats":{"elapsed":{"secs":0,"nanos":73994,"human":"0.000074s"},"searches":1,"searches_with_match":1,"bytes_searched":15793,"bytes_printed":2370,"matched_lines":7,"matches":8}}}
{"type":"begin","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/error_display.py"}}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/error_display.py"},"lines":{"text":"            return \"⚠️ Invalid or expired API key\", \"Check api_key in .agent/settings.json\"\n"},"line_number":23,"absolute_offset":740,"submatches":[{"match":{"text":"api_key"},"start":63,"end":70}]}}
{"type":"end","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/error_display.py"},"binary_offset":null,"stats":{"elapsed":{"secs":0,"nanos":15646,"human":"0.000016s"},"searches":1,"searches_with_match":1,"bytes_searched":1782,"bytes_printed":496,"matched_lines":1,"matches":1}}}
{"type":"begin","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui.py"}}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui.py"},"lines":{"text":"        self._active_paste_token: str | None = None\n"},"line_number":213,"absolute_offset":7511,"submatches":[{"match":{"text":"token"},"start":27,"end":32}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui.py"},"lines":{"text":"        self._paste_payload_by_token: dict[str, str] = {}\n"},"line_number":214,"absolute_offset":7563,"submatches":[{"match":{"text":"token"},"start":31,"end":36}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui.py"},"lines":{"text":"        self._paste_token_seq = 0\n"},"line_number":215,"absolute_offset":7621,"submatches":[{"match":{"text":"token"},"start":20,"end":25}]}}
{"type":"end","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui.py"},"binary_offset":null,"stats":{"elapsed":{"secs":0,"nanos":86865,"human":"0.000087s"},"searches":1,"searches_with_match":1,"bytes_searched":47864,"bytes_printed":1020,"matched_lines":3,"matches":3}}}
{"type":"begin","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tips.py"}}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tips.py"},"lines":{"text":"    \"/compact to manually compress context and free up token space\",\n"},"line_number":6,"absolute_offset":149,"submatches":[{"match":{"text":"token"},"start":55,"end":60}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tips.py"},"lines":{"text":"    \"/context to view current token usage and remaining context\",\n"},"line_number":10,"absolute_offset":412,"submatches":[{"match":{"text":"token"},"start":30,"end":35}]}}
{"type":"end","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tips.py"},"binary_offset":null,"stats":{"elapsed":{"secs":0,"nanos":38978,"human":"0.000039s"},"searches":1,"searches_with_match":1,"bytes_searched":727,"bytes_printed":763,"matched_lines":2,"matches":2}}}
{"type":"begin","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/preflight.py"}}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/preflight.py"},"lines":{"text":"    api_key: str | None = None\n"},"line_number":95,"absolute_offset":2822,"submatches":[{"match":{"text":"api_key"},"start":4,"end":11}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/preflight.py"},"lines":{"text":"        field_name=\"llm_levels_api_key\",\n"},"line_number":270,"absolute_offset":7955,"submatches":[{"match":{"text":"api_key"},"start":31,"end":38}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/preflight.py"},"lines":{"text":"    llm_levels_api_key = dict(\n"},"line_number":396,"absolute_offset":12895,"submatches":[{"match":{"text":"api_key"},"start":15,"end":22}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/preflight.py"},"lines":{"text":"        merged.get(\"llm_levels_api_key\") if isinstance(merged.get(\"llm_levels_api_key\"), dict) else {}\n"},"line_number":397,"absolute_offset":12926,"submatches":[{"match":{"text":"api_key"},"start":31,"end":38},{"match":{"text":"api_key"},"start":78,"end":85}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/preflight.py"},"lines":{"text":"        if draft.api_key:\n"},"line_number":407,"absolute_offset":13303,"submatches":[{"match":{"text":"api_key"},"start":17,"end":24}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/preflight.py"},"lines":{"text":"            llm_levels_api_key[level] = draft.api_key\n"},"line_number":408,"absolute_offset":13329,"submatches":[{"match":{"text":"api_key"},"start":23,"end":30},{"match":{"text":"api_key"},"start":46,"end":53}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/preflight.py"},"lines":{"text":"            llm_levels_api_key.pop(level, None)\n"},"line_number":410,"absolute_offset":13397,"submatches":[{"match":{"text":"api_key"},"start":23,"end":30}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/preflight.py"},"lines":{"text":"    if llm_levels_api_key:\n"},"line_number":418,"absolute_offset":13631,"submatches":[{"match":{"text":"api_key"},"start":18,"end":25}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/preflight.py"},"lines":{"text":"        merged[\"llm_levels_api_key\"] = llm_levels_api_key\n"},"line_number":419,"absolute_offset":13658,"submatches":[{"match":{"text":"api_key"},"start":27,"end":34},{"match":{"text":"api_key"},"start":50,"end":57}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/preflight.py"},"lines":{"text":"        merged.pop(\"llm_levels_api_key\", None)\n"},"line_number":421,"absolute_offset":13726,"submatches":[{"match":{"text":"api_key"},"start":31,"end":38}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/preflight.py"},"lines":{"text":"        secret: bool,\n"},"line_number":700,"absolute_offset":23191,"submatches":[{"match":{"text":"secret"},"start":8,"end":14}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/preflight.py"},"lines":{"text":"            password=secret,\n"},"line_number":708,"absolute_offset":23417,"submatches":[{"match":{"text":"password"},"start":12,"end":20},{"match":{"text":"secret"},"start":21,"end":27}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/preflight.py"},"lines":{"text":"                api_key=current.api_key,\n"},"line_number":812,"absolute_offset":27105,"submatches":[{"match":{"text":"api_key"},"start":16,"end":23},{"match":{"text":"api_key"},"start":32,"end":39}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/preflight.py"},"lines":{"text":"                secret=False,\n"},"line_number":877,"absolute_offset":29566,"submatches":[{"match":{"text":"secret"},"start":16,"end":22}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/preflight.py"},"lines":{"text":"            secret=False,\n"},"line_number":897,"absolute_offset":30291,"submatches":[{"match":{"text":"secret"},"start":12,"end":18}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/preflight.py"},"lines":{"text":"                api_key=current.api_key,\n"},"line_number":912,"absolute_offset":30942,"submatches":[{"match":{"text":"api_key"},"start":16,"end":23},{"match":{"text":"api_key"},"start":32,"end":39}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/preflight.py"},"lines":{"text":"            secret=False,\n"},"line_number":924,"absolute_offset":31372,"submatches":[{"match":{"text":"secret"},"start":12,"end":18}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/preflight.py"},"lines":{"text":"            api_key=current.api_key,\n"},"line_number":939,"absolute_offset":32009,"submatches":[{"match":{"text":"api_key"},"start":12,"end":19},{"match":{"text":"api_key"},"start":28,"end":35}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/preflight.py"},"lines":{"text":"            secret=False,\n"},"line_number":978,"absolute_offset":33504,"submatches":[{"match":{"text":"secret"},"start":12,"end":18}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/preflight.py"},"lines":{"text":"            on_submit=lambda text, _provider=provider: self._on_api_key_submitted(_provider, text),\n"},"line_number":980,"absolute_offset":33561,"submatches":[{"match":{"text":"api_key"},"start":64,"end":71}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/preflight.py"},"lines":{"text":"    def _on_api_key_submitted(self, provider: str, key: str) -> None:\n"},"line_number":984,"absolute_offset":33715,"submatches":[{"match":{"text":"api_key"},"start":12,"end":19}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/preflight.py"},"lines":{"text":"                api_key=self._provider_to_key.get(entry.provider),\n"},"line_number":997,"absolute_offset":34268,"submatches":[{"match":{"text":"api_key"},"start":16,"end":23}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/preflight.py"},"lines":{"text":"    llm_levels_api_key: dict[str, str] = {}\n"},"line_number":1061,"absolute_offset":36468,"submatches":[{"match":{"text":"api_key"},"start":15,"end":22}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/preflight.py"},"lines":{"text":"        if entry.api_key:\n"},"line_number":1067,"absolute_offset":36716,"submatches":[{"match":{"text":"api_key"},"start":17,"end":24}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/preflight.py"},"lines":{"text":"            llm_levels_api_key[level] = \"***\"\n"},"line_number":1068,"absolute_offset":36742,"submatches":[{"match":{"text":"api_key"},"start":23,"end":30}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/preflight.py"},"lines":{"text":"    if llm_levels_api_key:\n"},"line_number":1073,"absolute_offset":36946,"submatches":[{"match":{"text":"api_key"},"start":18,"end":25}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/preflight.py"},"lines":{"text":"        payload[\"llm_levels_api_key\"] = llm_levels_api_key\n"},"line_number":1074,"absolute_offset":36973,"submatches":[{"match":{"text":"api_key"},"start":28,"end":35},{"match":{"text":"api_key"},"start":51,"end":58}]}}
{"type":"end","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/preflight.py"},"binary_offset":null,"stats":{"elapsed":{"secs":0,"nanos":172835,"human":"0.000173s"},"searches":1,"searches_with_match":1,"bytes_searched":37051,"bytes_printed":8709,"matched_lines":27,"matches":35}}}
{"type":"begin","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/app.py"}}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/app.py"},"lines":{"text":"    total_prompt_tokens = int(getattr(usage, \"total_prompt_tokens\", 0) or 0)\n"},"line_number":203,"absolute_offset":6534,"submatches":[{"match":{"text":"token"},"start":17,"end":22},{"match":{"text":"token"},"start":59,"end":64}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/app.py"},"lines":{"text":"    total_prompt_cached_tokens = int(\n"},"line_number":204,"absolute_offset":6611,"submatches":[{"match":{"text":"token"},"start":24,"end":29}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/app.py"},"lines":{"text":"        getattr(usage, \"total_prompt_cached_tokens\", 0) or 0\n"},"line_number":205,"absolute_offset":6649,"submatches":[{"match":{"text":"token"},"start":44,"end":49}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/app.py"},"lines":{"text":"    total_completion_tokens = int(getattr(usage, \"total_completion_tokens\", 0) or 0)\n"},"line_number":207,"absolute_offset":6716,"submatches":[{"match":{"text":"token"},"start":21,"end":26},{"match":{"text":"token"},"start":67,"end":72}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/app.py"},"lines":{"text":"    total_reasoning_tokens = int(getattr(usage, \"total_reasoning_tokens\", 0) or 0)\n"},"line_number":208,"absolute_offset":6801,"submatches":[{"match":{"text":"token"},"start":20,"end":25},{"match":{"text":"token"},"start":65,"end":70}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/app.py"},"lines":{"text":"    input_tokens = max(total_prompt_tokens - total_prompt_cached_tokens, 0)\n"},"line_number":210,"absolute_offset":6885,"submatches":[{"match":{"text":"token"},"start":10,"end":15},{"match":{"text":"token"},"start":36,"end":41},{"match":{"text":"token"},"start":65,"end":70}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/app.py"},"lines":{"text":"    total_tokens = input_tokens + total_completion_tokens\n"},"line_number":211,"absolute_offset":6961,"submatches":[{"match":{"text":"token"},"start":10,"end":15},{"match":{"text":"token"},"start":25,"end":30},{"match":{"text":"token"},"start":51,"end":56}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/app.py"},"lines":{"text":"    reasoning_part = f\" (reasoning {total_reasoning_tokens:,})\" if total_reasoning_tokens > 0 else \"\"\n"},"line_number":213,"absolute_offset":7020,"submatches":[{"match":{"text":"token"},"start":52,"end":57},{"match":{"text":"token"},"start":83,"end":88}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/app.py"},"lines":{"text":"        f\"Token usage: total={total_tokens:,} \"\n"},"line_number":215,"absolute_offset":7135,"submatches":[{"match":{"text":"token"},"start":36,"end":41}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/app.py"},"lines":{"text":"        f\"input={input_tokens:,} (+ {total_prompt_cached_tokens:,} cached) \"\n"},"line_number":216,"absolute_offset":7183,"submatches":[{"match":{"text":"token"},"start":23,"end":28},{"match":{"text":"token"},"start":57,"end":62}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/app.py"},"lines":{"text":"        f\"output={total_completion_tokens:,}{reasoning_part}\"\n"},"line_number":217,"absolute_offset":7260,"submatches":[{"match":{"text":"token"},"start":35,"end":40}]}}
{"type":"end","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/app.py"},"binary_offset":null,"stats":{"elapsed":{"secs":0,"nanos":69558,"human":"0.000070s"},"searches":1,"searches_with_match":1,"bytes_searched":11559,"bytes_printed":4084,"matched_lines":11,"matches":20}}}
{"type":"begin","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/models.py"}}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/models.py"},"lines":{"text":"        metadata: 额外元数据（如工具名、耗时、token 数等）\n"},"line_number":30,"absolute_offset":927,"submatches":[{"match":{"text":"token"},"start":60,"end":65}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/models.py"},"lines":{"text":"    baseline_source_tokens: int = 0\n"},"line_number":72,"absolute_offset":2286,"submatches":[{"match":{"text":"token"},"start":20,"end":25}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/models.py"},"lines":{"text":"    task_tokens: int = 0\n"},"line_number":73,"absolute_offset":2322,"submatches":[{"match":{"text":"token"},"start":9,"end":14}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/models.py"},"lines":{"text":"    last_progress_tokens: int = 0\n"},"line_number":75,"absolute_offset":2388,"submatches":[{"match":{"text":"token"},"start":18,"end":23}]}}
{"type":"end","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/models.py"},"binary_offset":null,"stats":{"elapsed":{"secs":0,"nanos":24635,"human":"0.000025s"},"searches":1,"searches_with_match":1,"bytes_searched":2711,"bytes_printed":1306,"matched_lines":4,"matches":4}}}
{"type":"begin","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/slash_commands.py"}}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/slash_commands.py"},"lines":{"text":"        description=\"Show token usage summary\",\n"},"line_number":79,"absolute_offset":1942,"submatches":[{"match":{"text":"token"},"start":26,"end":31}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/slash_commands.py"},"lines":{"text":"        token = text[last_space + 1 :]\n"},"line_number":154,"absolute_offset":4347,"submatches":[{"match":{"text":"token"},"start":8,"end":13}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/slash_commands.py"},"lines":{"text":"        if not token.startswith(\"/\"):\n"},"line_number":158,"absolute_offset":4492,"submatches":[{"match":{"text":"token"},"start":15,"end":20}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/slash_commands.py"},"lines":{"text":"        typed = token[1:]\n"},"line_number":161,"absolute_offset":4550,"submatches":[{"match":{"text":"token"},"start":16,"end":21}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/slash_commands.py"},"lines":{"text":"                    start_position=-len(token),\n"},"line_number":183,"absolute_offset":5350,"submatches":[{"match":{"text":"token"},"start":40,"end":45}]}}
{"type":"end","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/slash_commands.py"},"binary_offset":null,"stats":{"elapsed":{"secs":0,"nanos":33108,"human":"0.000033s"},"searches":1,"searches_with_match":1,"bytes_searched":6463,"bytes_printed":1643,"matched_lines":5,"matches":5}}}
{"type":"begin","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/logging_adapter.py"}}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/logging_adapter.py"},"lines":{"text":"        # 特殊处理：token count fallback\n"},"line_number":61,"absolute_offset":1951,"submatches":[{"match":{"text":"token"},"start":25,"end":30}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/logging_adapter.py"},"lines":{"text":"        if \"token count failed\" in msg.lower() and \"fallback\" in msg.lower():\n"},"line_number":62,"absolute_offset":1997,"submatches":[{"match":{"text":"token"},"start":12,"end":17}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/logging_adapter.py"},"lines":{"text":"        # 对于 token count，使用固定 key\n"},"line_number":90,"absolute_offset":2971,"submatches":[{"match":{"text":"token"},"start":17,"end":22}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/logging_adapter.py"},"lines":{"text":"        if \"token count failed\" in msg.lower():\n"},"line_number":91,"absolute_offset":3019,"submatches":[{"match":{"text":"token"},"start":12,"end":17}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/logging_adapter.py"},"lines":{"text":"            return \"token_count_fallback\"\n"},"line_number":92,"absolute_offset":3067,"submatches":[{"match":{"text":"token"},"start":20,"end":25}]}}
{"type":"end","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/logging_adapter.py"},"binary_offset":null,"stats":{"elapsed":{"secs":0,"nanos":34297,"human":"0.000034s"},"searches":1,"searches_with_match":1,"bytes_searched":7830,"bytes_printed":1713,"matched_lines":5,"matches":5}}}
{"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":"def _format_tokens(token_count: int) -> str:\n"},"line_number":185,"absolute_offset":5596,"submatches":[{"match":{"text":"token"},"start":12,"end":17},{"match":{"text":"token"},"start":19,"end":24}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tool_view.py"},"lines":{"text":"    tokens = max(int(token_count), 0)\n"},"line_number":186,"absolute_offset":5641,"submatches":[{"match":{"text":"token"},"start":4,"end":9},{"match":{"text":"token"},"start":21,"end":26}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tool_view.py"},"lines":{"text":"    if tokens < 1_000:\n"},"line_number":187,"absolute_offset":5679,"submatches":[{"match":{"text":"token"},"start":7,"end":12}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tool_view.py"},"lines":{"text":"        return f\"{tokens} tok\"\n"},"line_number":188,"absolute_offset":5702,"submatches":[{"match":{"text":"token"},"start":18,"end":23}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tool_view.py"},"lines":{"text":"    if tokens < 1_000_000:\n"},"line_number":189,"absolute_offset":5733,"submatches":[{"match":{"text":"token"},"start":7,"end":12}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tool_view.py"},"lines":{"text":"        compact = f\"{tokens / 1_000:.1f}\".rstrip(\"0\").rstrip(\".\")\n"},"line_number":190,"absolute_offset":5760,"submatches":[{"match":{"text":"token"},"start":21,"end":26}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tool_view.py"},"lines":{"text":"    compact = f\"{tokens / 1_000_000:.1f}\".rstrip(\"0\").rstrip(\".\")\n"},"line_number":192,"absolute_offset":5859,"submatches":[{"match":{"text":"token"},"start":17,"end":22}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tool_view.py"},"lines":{"text":"        self._latest_total_tokens = 0\n"},"line_number":403,"absolute_offset":14246,"submatches":[{"match":{"text":"token"},"start":27,"end":32}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tool_view.py"},"lines":{"text":"        self._latest_tokens_by_source_prefix: dict[str, int] = {}\n"},"line_number":404,"absolute_offset":14284,"submatches":[{"match":{"text":"token"},"start":21,"end":26}]}}
{"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":426,"absolute_offset":15227,"submatches":[{"match":{"text":"token"},"start":12,"end":17},{"match":{"text":"token"},"start":36,"end":41}]}}
{"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)} · 运行中 · {elapsed} · {token_text}\"\n"},"line_number":427,"absolute_offset":15281,"submatches":[{"match":{"text":"token"},"start":85,"end":90}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tool_view.py"},"lines":{"text":"    def set_task_source_baseline(self, tool_call_id: str, source_total_tokens: int) -> None:\n"},"line_number":458,"absolute_offset":16463,"submatches":[{"match":{"text":"token"},"start":71,"end":76}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tool_view.py"},"lines":{"text":"        normalized = max(int(source_total_tokens), 0)\n"},"line_number":463,"absolute_offset":16711,"submatches":[{"match":{"text":"token"},"start":42,"end":47}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tool_view.py"},"lines":{"text":"        state.baseline_source_tokens = normalized\n"},"line_number":464,"absolute_offset":16765,"submatches":[{"match":{"text":"token"},"start":30,"end":35}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tool_view.py"},"lines":{"text":"        state.task_tokens = 0\n"},"line_number":465,"absolute_offset":16815,"submatches":[{"match":{"text":"token"},"start":19,"end":24}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tool_view.py"},"lines":{"text":"        state.last_progress_tokens = 0\n"},"line_number":466,"absolute_offset":16845,"submatches":[{"match":{"text":"token"},"start":28,"end":33}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tool_view.py"},"lines":{"text":"        self._latest_tokens_by_source_prefix[state.subagent_source_prefix] = normalized\n"},"line_number":467,"absolute_offset":16884,"submatches":[{"match":{"text":"token"},"start":21,"end":26}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tool_view.py"},"lines":{"text":"        tokens: int | None = None,\n"},"line_number":473,"absolute_offset":17055,"submatches":[{"match":{"text":"token"},"start":8,"end":13}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tool_view.py"},"lines":{"text":"        if tokens is not None:\n"},"line_number":480,"absolute_offset":17265,"submatches":[{"match":{"text":"token"},"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":"            normalized_tokens = max(int(tokens), 0)\n"},"line_number":481,"absolute_offset":17296,"submatches":[{"match":{"text":"token"},"start":23,"end":28},{"match":{"text":"token"},"start":40,"end":45}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tool_view.py"},"lines":{"text":"            state.task_tokens = normalized_tokens\n"},"line_number":482,"absolute_offset":17348,"submatches":[{"match":{"text":"token"},"start":23,"end":28},{"match":{"text":"token"},"start":43,"end":48}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tool_view.py"},"lines":{"text":"            state.last_progress_tokens = normalized_tokens\n"},"line_number":483,"absolute_offset":17398,"submatches":[{"match":{"text":"token"},"start":32,"end":37},{"match":{"text":"token"},"start":52,"end":57}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tool_view.py"},"lines":{"text":"    def _task_token_text(self, state: ToolRunState) -> str:\n"},"line_number":489,"absolute_offset":17643,"submatches":[{"match":{"text":"token"},"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":"            return _format_tokens(state.task_tokens)\n"},"line_number":491,"absolute_offset":17744,"submatches":[{"match":{"text":"token"},"start":27,"end":32},{"match":{"text":"token"},"start":45,"end":50}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tool_view.py"},"lines":{"text":"        return _format_tokens(self._latest_total_tokens)\n"},"line_number":492,"absolute_offset":17797,"submatches":[{"match":{"text":"token"},"start":23,"end":28},{"match":{"text":"token"},"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":"    def update_usage_tokens(\n"},"line_number":494,"absolute_offset":17855,"submatches":[{"match":{"text":"token"},"start":21,"end":26}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tool_view.py"},"lines":{"text":"        total_tokens: int,\n"},"line_number":496,"absolute_offset":17898,"submatches":[{"match":{"text":"token"},"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":"        self._latest_total_tokens = max(int(total_tokens), 0)\n"},"line_number":499,"absolute_offset":17993,"submatches":[{"match":{"text":"token"},"start":27,"end":32},{"match":{"text":"token"},"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":"            for source_prefix, source_tokens in source_totals.items():\n"},"line_number":501,"absolute_offset":18081,"submatches":[{"match":{"text":"token"},"start":38,"end":43}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tool_view.py"},"lines":{"text":"                self._latest_tokens_by_source_prefix[source_prefix] = max(int(source_tokens), 0)\n"},"line_number":502,"absolute_offset":18152,"submatches":[{"match":{"text":"token"},"start":29,"end":34},{"match":{"text":"token"},"start":85,"end":90}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tool_view.py"},"lines":{"text":"            current_total = self._latest_tokens_by_source_prefix.get(state.subagent_source_prefix)\n"},"line_number":507,"absolute_offset":18423,"submatches":[{"match":{"text":"token"},"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":"            task_tokens = max(current_total - state.baseline_source_tokens, 0)\n"},"line_number":510,"absolute_offset":18585,"submatches":[{"match":{"text":"token"},"start":17,"end":22},{"match":{"text":"token"},"start":68,"end":73}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tool_view.py"},"lines":{"text":"            state.task_tokens = task_tokens\n"},"line_number":511,"absolute_offset":18664,"submatches":[{"match":{"text":"token"},"start":23,"end":28},{"match":{"text":"token"},"start":37,"end":42}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tool_view.py"},"lines":{"text":"            state.last_progress_tokens = task_tokens\n"},"line_number":512,"absolute_offset":18708,"submatches":[{"match":{"text":"token"},"start":32,"end":37},{"match":{"text":"token"},"start":46,"end":51}]}}
{"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":527,"absolute_offset":19335,"submatches":[{"match":{"text":"token"},"start":16,"end":21},{"match":{"text":"token"},"start":40,"end":45}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tool_view.py"},"lines":{"text":"                    f\"⏹ {self._task_title(state)} · 已中断 · {elapsed} · {token_text}\",\n"},"line_number":530,"absolute_offset":19465,"submatches":[{"match":{"text":"token"},"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":"        baseline_source_tokens = 0\n"},"line_number":564,"absolute_offset":20769,"submatches":[{"match":{"text":"token"},"start":24,"end":29}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tool_view.py"},"lines":{"text":"            baseline_source_tokens = self._latest_tokens_by_source_prefix.get(subagent_source_prefix, 0)\n"},"line_number":568,"absolute_offset":20997,"submatches":[{"match":{"text":"token"},"start":28,"end":33},{"match":{"text":"token"},"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":"            baseline_source_tokens=baseline_source_tokens,\n"},"line_number":581,"absolute_offset":21519,"submatches":[{"match":{"text":"token"},"start":28,"end":33},{"match":{"text":"token"},"start":51,"end":56}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tool_view.py"},"lines":{"text":"            task_tokens=0,\n"},"line_number":582,"absolute_offset":21578,"submatches":[{"match":{"text":"token"},"start":17,"end":22}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tool_view.py"},"lines":{"text":"            last_progress_tokens=0 if is_task else self._latest_total_tokens,\n"},"line_number":584,"absolute_offset":21646,"submatches":[{"match":{"text":"token"},"start":26,"end":31},{"match":{"text":"token"},"start":70,"end":75}]}}
{"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":611,"absolute_offset":22643,"submatches":[{"match":{"text":"token"},"start":12,"end":17},{"match":{"text":"token"},"start":36,"end":41}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tool_view.py"},"lines":{"text":"                    f\"{TOOL_ERROR_PREFIX} {self._task_title(state)} · 失败 · {elapsed} · {token_text}\",\n"},"line_number":615,"absolute_offset":22794,"submatches":[{"match":{"text":"token"},"start":95,"end":100}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tool_view.py"},"lines":{"text":"                f\"{TOOL_SUCCESS_PREFIX} {self._task_title(state)} · 完成 · {elapsed} · {token_text}\",\n"},"line_number":621,"absolute_offset":23046,"submatches":[{"match":{"text":"token"},"start":93,"end":98}]}}
{"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":201563,"human":"0.000202s"},"searches":1,"searches_with_match":1,"bytes_searched":24811,"bytes_printed":14889,"matched_lines":44,"matches":62}}}
{"type":"begin","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"}}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"def _format_tokens(token_count: int) -> str:\n"},"line_number":62,"absolute_offset":1586,"submatches":[{"match":{"text":"token"},"start":12,"end":17},{"match":{"text":"token"},"start":19,"end":24}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"    tokens = max(int(token_count), 0)\n"},"line_number":63,"absolute_offset":1631,"submatches":[{"match":{"text":"token"},"start":4,"end":9},{"match":{"text":"token"},"start":21,"end":26}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"    if tokens < 1_000:\n"},"line_number":64,"absolute_offset":1669,"submatches":[{"match":{"text":"token"},"start":7,"end":12}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"        return f\"{tokens} tok\"\n"},"line_number":65,"absolute_offset":1692,"submatches":[{"match":{"text":"token"},"start":18,"end":23}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"    compact = f\"{tokens / 1_000:.1f}\".rstrip(\"0\").rstrip(\".\")\n"},"line_number":66,"absolute_offset":1723,"submatches":[{"match":{"text":"token"},"start":17,"end":22}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"    progress_tokens: int = 0\n"},"line_number":148,"absolute_offset":4260,"submatches":[{"match":{"text":"token"},"start":13,"end":18}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"                tokens_suffix = (\n"},"line_number":331,"absolute_offset":11017,"submatches":[{"match":{"text":"token"},"start":16,"end":21}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"                    f\" · {_format_tokens(state.progress_tokens)}\"\n"},"line_number":332,"absolute_offset":11051,"submatches":[{"match":{"text":"token"},"start":35,"end":40},{"match":{"text":"token"},"start":57,"end":62}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"                    if state.progress_tokens > 0\n"},"line_number":333,"absolute_offset":11118,"submatches":[{"match":{"text":"token"},"start":38,"end":43}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"                tokens_suffix = (\n"},"line_number":349,"absolute_offset":11740,"submatches":[{"match":{"text":"token"},"start":16,"end":21}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"                    f\" · {_format_tokens(state.progress_tokens)}\"\n"},"line_number":350,"absolute_offset":11774,"submatches":[{"match":{"text":"token"},"start":35,"end":40},{"match":{"text":"token"},"start":57,"end":62}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"                    if state.progress_tokens > 0\n"},"line_number":351,"absolute_offset":11841,"submatches":[{"match":{"text":"token"},"start":38,"end":43}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"                entries.append((0, f\"{title} · {elapsed}{tool_count_suffix}{tokens_suffix}\"))\n"},"line_number":360,"absolute_offset":12323,"submatches":[{"match":{"text":"token"},"start":77,"end":82}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"            tokens_suffix = (\n"},"line_number":503,"absolute_offset":18280,"submatches":[{"match":{"text":"token"},"start":12,"end":17}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"                f\" · {_format_tokens(state.progress_tokens)}\"\n"},"line_number":504,"absolute_offset":18310,"submatches":[{"match":{"text":"token"},"start":31,"end":36},{"match":{"text":"token"},"start":53,"end":58}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"                if state.progress_tokens > 0\n"},"line_number":505,"absolute_offset":18373,"submatches":[{"match":{"text":"token"},"start":34,"end":39}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"            base = f\"{task_title}{tool_count_suffix}{tokens_suffix}\"\n"},"line_number":508,"absolute_offset":18456,"submatches":[{"match":{"text":"token"},"start":53,"end":58}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"                current_tokens=tokens,\n"},"line_number":750,"absolute_offset":28150,"submatches":[{"match":{"text":"token"},"start":24,"end":29},{"match":{"text":"token"},"start":31,"end":36}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"                tokens_before=tokens_before,\n"},"line_number":756,"absolute_offset":28364,"submatches":[{"match":{"text":"token"},"start":16,"end":21},{"match":{"text":"token"},"start":30,"end":35}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"                tokens_after=tokens_after,\n"},"line_number":757,"absolute_offset":28409,"submatches":[{"match":{"text":"token"},"start":16,"end":21},{"match":{"text":"token"},"start":29,"end":34}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"                pct = int(tokens / threshold * 100) if threshold > 0 else 0\n"},"line_number":759,"absolute_offset":28467,"submatches":[{"match":{"text":"token"},"start":26,"end":31}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"                            f\"{tokens_before:,} → {tokens_after:,} tokens \"\n"},"line_number":764,"absolute_offset":28721,"submatches":[{"match":{"text":"token"},"start":31,"end":36},{"match":{"text":"token"},"start":53,"end":58},{"match":{"text":"token"},"start":69,"end":74}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"                            f\"(check {tokens:,}/{threshold:,}, {pct}%)\"\n"},"line_number":765,"absolute_offset":28799,"submatches":[{"match":{"text":"token"},"start":38,"end":43}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"                            f\"kept {tokens_after:,} tokens \"\n"},"line_number":773,"absolute_offset":29146,"submatches":[{"match":{"text":"token"},"start":36,"end":41},{"match":{"text":"token"},"start":52,"end":57}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"                            f\"(check {tokens:,}/{threshold:,}, {pct}%, reason={reason})\"\n"},"line_number":774,"absolute_offset":29207,"submatches":[{"match":{"text":"token"},"start":38,"end":43}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"                            f\"{tokens:,}/{threshold:,} tokens ({pct}%), reason={reason}\"\n"},"line_number":782,"absolute_offset":29557,"submatches":[{"match":{"text":"token"},"start":31,"end":36},{"match":{"text":"token"},"start":55,"end":60}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"                delta_prompt_tokens=_,\n"},"line_number":815,"absolute_offset":31476,"submatches":[{"match":{"text":"token"},"start":29,"end":34}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"                delta_prompt_cached_tokens=_,\n"},"line_number":816,"absolute_offset":31515,"submatches":[{"match":{"text":"token"},"start":36,"end":41}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"                delta_completion_tokens=_,\n"},"line_number":817,"absolute_offset":31561,"submatches":[{"match":{"text":"token"},"start":33,"end":38}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"                delta_total_tokens=_,\n"},"line_number":818,"absolute_offset":31604,"submatches":[{"match":{"text":"token"},"start":28,"end":33}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"                tokens=tokens,\n"},"line_number":829,"absolute_offset":32023,"submatches":[{"match":{"text":"token"},"start":16,"end":21},{"match":{"text":"token"},"start":23,"end":28}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"                    if tokens is not None:\n"},"line_number":833,"absolute_offset":32169,"submatches":[{"match":{"text":"token"},"start":23,"end":28}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"                        state.progress_tokens = max(int(tokens), 0)\n"},"line_number":834,"absolute_offset":32212,"submatches":[{"match":{"text":"token"},"start":39,"end":44},{"match":{"text":"token"},"start":56,"end":61}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"                    has_activity = bool(tokens and int(tokens) > 0) or bool(\n"},"line_number":844,"absolute_offset":32917,"submatches":[{"match":{"text":"token"},"start":40,"end":45},{"match":{"text":"token"},"start":55,"end":60}]}}
{"type":"end","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"binary_offset":null,"stats":{"elapsed":{"secs":0,"nanos":169539,"human":"0.000170s"},"searches":1,"searches_with_match":1,"bytes_searched":38212,"bytes_printed":11571,"matched_lines":34,"matches":49}}}
{"type":"begin","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui_parts/input_behavior.py"}}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui_parts/input_behavior.py"},"lines":{"text":"    def _next_paste_token(self) -> str:\n"},"line_number":165,"absolute_offset":5709,"submatches":[{"match":{"text":"token"},"start":20,"end":25}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui_parts/input_behavior.py"},"lines":{"text":"        self._paste_token_seq += 1\n"},"line_number":166,"absolute_offset":5749,"submatches":[{"match":{"text":"token"},"start":20,"end":25}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui_parts/input_behavior.py"},"lines":{"text":"        return f\"paste_{self._paste_token_seq}\"\n"},"line_number":167,"absolute_offset":5784,"submatches":[{"match":{"text":"token"},"start":36,"end":41}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui_parts/input_behavior.py"},"lines":{"text":"        self._active_paste_token = None\n"},"line_number":170,"absolute_offset":5875,"submatches":[{"match":{"text":"token"},"start":27,"end":32}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui_parts/input_behavior.py"},"lines":{"text":"        self._paste_payload_by_token.clear()\n"},"line_number":172,"absolute_offset":5959,"submatches":[{"match":{"text":"token"},"start":31,"end":36}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui_parts/input_behavior.py"},"lines":{"text":"        token = self._active_paste_token\n"},"line_number":206,"absolute_offset":7092,"submatches":[{"match":{"text":"token"},"start":8,"end":13},{"match":{"text":"token"},"start":35,"end":40}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui_parts/input_behavior.py"},"lines":{"text":"        if token is not None and placeholder is not None and placeholder in raw_text:\n"},"line_number":208,"absolute_offset":7184,"submatches":[{"match":{"text":"token"},"start":11,"end":16}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui_parts/input_behavior.py"},"lines":{"text":"            payload = self._paste_payload_by_token.get(token)\n"},"line_number":209,"absolute_offset":7270,"submatches":[{"match":{"text":"token"},"start":45,"end":50},{"match":{"text":"token"},"start":55,"end":60}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui_parts/input_behavior.py"},"lines":{"text":"        if self._active_paste_token is not None and placeholder and placeholder in text:\n"},"line_number":228,"absolute_offset":8005,"submatches":[{"match":{"text":"token"},"start":30,"end":35}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui_parts/input_behavior.py"},"lines":{"text":"            self._active_paste_token is not None\n"},"line_number":232,"absolute_offset":8133,"submatches":[{"match":{"text":"token"},"start":31,"end":36}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui_parts/input_behavior.py"},"lines":{"text":"        token = self._next_paste_token()\n"},"line_number":245,"absolute_offset":8583,"submatches":[{"match":{"text":"token"},"start":8,"end":13},{"match":{"text":"token"},"start":33,"end":38}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui_parts/input_behavior.py"},"lines":{"text":"        self._active_paste_token = token\n"},"line_number":246,"absolute_offset":8624,"submatches":[{"match":{"text":"token"},"start":27,"end":32},{"match":{"text":"token"},"start":35,"end":40}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui_parts/input_behavior.py"},"lines":{"text":"        self._paste_payload_by_token[token] = inserted_text\n"},"line_number":247,"absolute_offset":8665,"submatches":[{"match":{"text":"token"},"start":31,"end":36},{"match":{"text":"token"},"start":37,"end":42}]}}
{"type":"end","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui_parts/input_behavior.py"},"binary_offset":null,"stats":{"elapsed":{"secs":0,"nanos":94112,"human":"0.000094s"},"searches":1,"searches_with_match":1,"bytes_searched":13526,"bytes_printed":4582,"matched_lines":13,"matches":18}}}
{"type":"begin","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui_parts/commands.py"}}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui_parts/commands.py"},"lines":{"text":"                f\"/compact 完成: {result.tokens_before:,} → {result.tokens_after:,} tokens\",\n"},"line_number":772,"absolute_offset":26014,"submatches":[{"match":{"text":"token"},"start":43,"end":48},{"match":{"text":"token"},"start":72,"end":77},{"match":{"text":"token"},"start":88,"end":93}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui_parts/commands.py"},"lines":{"text":"        prompt_new_tokens = max(\n"},"line_number":1225,"absolute_offset":42390,"submatches":[{"match":{"text":"token"},"start":19,"end":24}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui_parts/commands.py"},"lines":{"text":"            usage.total_prompt_tokens - usage.total_prompt_cached_tokens,\n"},"line_number":1226,"absolute_offset":42423,"submatches":[{"match":{"text":"token"},"start":31,"end":36},{"match":{"text":"token"},"start":66,"end":71}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui_parts/commands.py"},"lines":{"text":"        total_tokens = prompt_new_tokens + usage.total_completion_tokens\n"},"line_number":1229,"absolute_offset":42522,"submatches":[{"match":{"text":"token"},"start":14,"end":19},{"match":{"text":"token"},"start":34,"end":39},{"match":{"text":"token"},"start":66,"end":71}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui_parts/commands.py"},"lines":{"text":"            f\"- total: {total_tokens:,}\",\n"},"line_number":1233,"absolute_offset":42641,"submatches":[{"match":{"text":"token"},"start":30,"end":35}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui_parts/commands.py"},"lines":{"text":"            f\"- prompt: {usage.total_prompt_tokens:,}\",\n"},"line_number":1235,"absolute_offset":42730,"submatches":[{"match":{"text":"token"},"start":44,"end":49}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui_parts/commands.py"},"lines":{"text":"            f\"- prompt_cached: {usage.total_prompt_cached_tokens:,}\",\n"},"line_number":1236,"absolute_offset":42786,"submatches":[{"match":{"text":"token"},"start":58,"end":63}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui_parts/commands.py"},"lines":{"text":"            f\"- prompt_new: {prompt_new_tokens:,}\",\n"},"line_number":1237,"absolute_offset":42856,"submatches":[{"match":{"text":"token"},"start":40,"end":45}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui_parts/commands.py"},"lines":{"text":"            f\"- completion: {usage.total_completion_tokens:,}\",\n"},"line_number":1238,"absolute_offset":42908,"submatches":[{"match":{"text":"token"},"start":52,"end":57}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui_parts/commands.py"},"lines":{"text":"        next_step_estimated_tokens = int(getattr(info, \"next_step_estimated_tokens\", 0) or 0)\n"},"line_number":1254,"absolute_offset":43565,"submatches":[{"match":{"text":"token"},"start":28,"end":33},{"match":{"text":"token"},"start":76,"end":81}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui_parts/commands.py"},"lines":{"text":"        last_step_reported_tokens = int(getattr(info, \"last_step_reported_tokens\", 0) or 0)\n"},"line_number":1255,"absolute_offset":43659,"submatches":[{"match":{"text":"token"},"start":27,"end":32},{"match":{"text":"token"},"start":74,"end":79}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui_parts/commands.py"},"lines":{"text":"        ir_used_tokens = int(getattr(info, \"used_tokens\", 0) or 0)\n"},"line_number":1256,"absolute_offset":43751,"submatches":[{"match":{"text":"token"},"start":16,"end":21},{"match":{"text":"token"},"start":49,"end":54}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui_parts/commands.py"},"lines":{"text":"                min((next_step_estimated_tokens / context_limit) * 100.0, 100.0),\n"},"line_number":1264,"absolute_offset":44019,"submatches":[{"match":{"text":"token"},"start":41,"end":46}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui_parts/commands.py"},"lines":{"text":"            if last_step_reported_tokens > 0:\n"},"line_number":1267,"absolute_offset":44192,"submatches":[{"match":{"text":"token"},"start":34,"end":39}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui_parts/commands.py"},"lines":{"text":"                    min((last_step_reported_tokens / context_limit) * 100.0, 100.0),\n"},"line_number":1270,"absolute_offset":44306,"submatches":[{"match":{"text":"token"},"start":44,"end":49}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui_parts/commands.py"},"lines":{"text":"            f\"(est={next_step_estimated_tokens:,}, limit={context_limit:,}; includes buffer)\"\n"},"line_number":1276,"absolute_offset":44534,"submatches":[{"match":{"text":"token"},"start":40,"end":45}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui_parts/commands.py"},"lines":{"text":"        if last_step_reported_tokens > 0:\n"},"line_number":1278,"absolute_offset":44638,"submatches":[{"match":{"text":"token"},"start":30,"end":35}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui_parts/commands.py"},"lines":{"text":"                f\"(actual={last_step_reported_tokens:,})\"\n"},"line_number":1281,"absolute_offset":44780,"submatches":[{"match":{"text":"token"},"start":46,"end":51}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui_parts/commands.py"},"lines":{"text":"            lines.append(f\"- next_step_estimated_tokens: {next_step_estimated_tokens:,}\")\n"},"line_number":1288,"absolute_offset":44998,"submatches":[{"match":{"text":"token"},"start":49,"end":54},{"match":{"text":"token"},"start":78,"end":83}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui_parts/commands.py"},"lines":{"text":"            lines.append(f\"- last_step_reported_tokens: {last_step_reported_tokens:,}\")\n"},"line_number":1289,"absolute_offset":45088,"submatches":[{"match":{"text":"token"},"start":48,"end":53},{"match":{"text":"token"},"start":76,"end":81}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui_parts/commands.py"},"lines":{"text":"            lines.append(f\"- ir_used_tokens: {ir_used_tokens:,}\")\n"},"line_number":1290,"absolute_offset":45176,"submatches":[{"match":{"text":"token"},"start":37,"end":42},{"match":{"text":"token"},"start":54,"end":59}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui_parts/commands.py"},"lines":{"text":"            lines.append(f\"- delta_ir_vs_actual: {ir_used_tokens - last_step_reported_tokens:+,}\")\n"},"line_number":1291,"absolute_offset":45242,"submatches":[{"match":{"text":"token"},"start":58,"end":63},{"match":{"text":"token"},"start":86,"end":91}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui_parts/commands.py"},"lines":{"text":"        token_cost = getattr(getattr(self._session, \"_agent\", None), \"_token_cost\", None)\n"},"line_number":1298,"absolute_offset":45608,"submatches":[{"match":{"text":"token"},"start":8,"end":13},{"match":{"text":"token"},"start":71,"end":76}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui_parts/commands.py"},"lines":{"text":"        usage_history = getattr(token_cost, \"usage_history\", None)\n"},"line_number":1299,"absolute_offset":45698,"submatches":[{"match":{"text":"token"},"start":32,"end":37}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui_parts/commands.py"},"lines":{"text":"        output_tokens = int(getattr(usage, \"completion_tokens\", 0) or 0)\n"},"line_number":1308,"absolute_offset":46023,"submatches":[{"match":{"text":"token"},"start":15,"end":20},{"match":{"text":"token"},"start":55,"end":60}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui_parts/commands.py"},"lines":{"text":"        cache_read_tokens = int(getattr(usage, \"prompt_cached_tokens\", 0) or 0)\n"},"line_number":1309,"absolute_offset":46096,"submatches":[{"match":{"text":"token"},"start":19,"end":24},{"match":{"text":"token"},"start":62,"end":67}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui_parts/commands.py"},"lines":{"text":"        cache_creation_tokens = int(getattr(usage, \"prompt_cache_creation_tokens\", 0) or 0)\n"},"line_number":1310,"absolute_offset":46176,"submatches":[{"match":{"text":"token"},"start":23,"end":28},{"match":{"text":"token"},"start":74,"end":79}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui_parts/commands.py"},"lines":{"text":"        prompt_tokens = int(getattr(usage, \"prompt_tokens\", 0) or 0)\n"},"line_number":1311,"absolute_offset":46268,"submatches":[{"match":{"text":"token"},"start":15,"end":20},{"match":{"text":"token"},"start":51,"end":56}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui_parts/commands.py"},"lines":{"text":"        input_tokens = max(prompt_tokens - cache_read_tokens - cache_creation_tokens, 0)\n"},"line_number":1312,"absolute_offset":46337,"submatches":[{"match":{"text":"token"},"start":14,"end":19},{"match":{"text":"token"},"start":34,"end":39},{"match":{"text":"token"},"start":54,"end":59},{"match":{"text":"token"},"start":78,"end":83}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui_parts/commands.py"},"lines":{"text":"                f\"I={input_tokens:,} (derived), \"\n"},"line_number":1317,"absolute_offset":46502,"submatches":[{"match":{"text":"token"},"start":27,"end":32}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui_parts/commands.py"},"lines":{"text":"                f\"R={cache_read_tokens:,}, \"\n"},"line_number":1318,"absolute_offset":46552,"submatches":[{"match":{"text":"token"},"start":32,"end":37}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui_parts/commands.py"},"lines":{"text":"                f\"W={cache_creation_tokens:,}, \"\n"},"line_number":1319,"absolute_offset":46597,"submatches":[{"match":{"text":"token"},"start":36,"end":41}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui_parts/commands.py"},"lines":{"text":"                f\"O={output_tokens:,}\"\n"},"line_number":1320,"absolute_offset":46646,"submatches":[{"match":{"text":"token"},"start":28,"end":33}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui_parts/commands.py"},"lines":{"text":"        prefix_total = cache_read_tokens + cache_creation_tokens\n"},"line_number":1324,"absolute_offset":46710,"submatches":[{"match":{"text":"token"},"start":34,"end":39},{"match":{"text":"token"},"start":58,"end":63}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui_parts/commands.py"},"lines":{"text":"            cache_hit_ratio = (cache_read_tokens / prefix_total) * 100.0\n"},"line_number":1326,"absolute_offset":46804,"submatches":[{"match":{"text":"token"},"start":42,"end":47}]}}
{"type":"end","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui_parts/commands.py"},"binary_offset":null,"stats":{"elapsed":{"secs":0,"nanos":219754,"human":"0.000220s"},"searches":1,"searches_with_match":1,"bytes_searched":47051,"bytes_printed":12968,"matched_lines":35,"matches":56}}}
{"data":{"elapsed_total":{"human":"0.010681s","nanos":10680597,"secs":0},"stats":{"bytes_printed":66114,"bytes_searched":255380,"elapsed":{"human":"0.001235s","nanos":1234884,"secs":0},"matched_lines":191,"matches":268,"searches":13,"searches_with_match":13}},"type":"summary"}
