Skip to content

feat: display per-tool output filtering stats in chat and TUI #449

@bug-ops

Description

@bug-ops

Parent

Epic #446 (M26.1), depends on #442 (filter metrics)

Problem

Users and agents have no visibility into how much output was filtered per tool execution. Need to show raw lines, filtered lines, and final lines sent to LLM for every tool call.

Requirements

For each tool execution, display inline stats:

  • Total output lines (raw)
  • Lines filtered out
  • Final lines sent to LLM
  • Savings percentage

Should be visible in:

  • CLI chat output (after tool result)
  • TUI dashboard (per tool call in tool events panel)

Example

[shell] cargo test (342 lines -> 28 lines, 91.8% filtered)

Design

  • Extend ToolEvent or FilterResult to carry line counts
  • CLI channel: append stats line after tool output
  • TUI: show in tool events widget with color coding (green for high savings)

Acceptance Criteria

  • Per-tool-call line stats (raw, filtered, final) available after filtering
  • Stats displayed in CLI chat mode
  • Stats displayed in TUI tool events panel
  • Works for all tool types (shell, scrape, file, MCP)

Metadata

Metadata

Assignees

No one assigned

    Labels

    toolsTool execution and MCP integration

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions