Rex DEV ce15c30d2b
fix(formatting): always show plan regardless of verbosity (#81)
* fix(formatting): wire rawInput + display* fields through both adapters

- Add rawInput, displaySummary, displayTitle, displayKind to Discord
  adapter tool call/update meta construction (were missing after reset)
- Add displaySummary, displayTitle, displayKind to Telegram adapter
  (rawInput was already present)
- Update existing tests to pass "high" for full-detail assertions
  (default changed to "medium" which returns compact output)

Entire-Checkpoint: e0737b6c7432

* fix(formatting): preserve display* on tool edit, cleanup duplication

- Store displaySummary/displayTitle/displayKind in ToolCallState
  so they survive from tool_call to tool_call_update edit
- Merge with ?? fallback: update fields take precedence over stored
- Telegram formatToolUpdate delegates to formatToolCall (like Discord)
- Remove unused STATUS_ICONS/KIND_ICONS imports from platform formatters

Entire-Checkpoint: 5afc4b23e3ed

* fix(formatting): always show plan regardless of verbosity level

Plan messages were hidden when displayVerbosity was set to "low".
Removed "plan" from HIDDEN_ON_LOW set and added low verbosity
handling in Discord/Telegram formatPlan to show summary count.

Entire-Checkpoint: 25f61b05a8f3

* fix(telegram): handle low verbosity in PlanCard formatPlanCard

PlanCard uses its own formatPlanCard() instead of the shared
formatPlan() from formatting.ts. The low verbosity case was
missing, causing it to fall through to high detail mode.

Entire-Checkpoint: ad8701fddbdc

* fix(formatting): plan always shows full entries regardless of verbosity

Remove verbosity branching from formatPlan — plan always renders
the full entry list with status icons. Previously low/medium showed
only a summary count. Also fix Telegram PlanCard formatPlanCard
which had the same issue.

Entire-Checkpoint: ec946aa88fa1

* docs: add consolidated tool card design spec

Entire-Checkpoint: 41ede6b49d70

* docs: update tool card spec with review decisions (v2)

Entire-Checkpoint: c49386e3cfc2

* docs: update tool card verbosity tiers — full list on all levels (v3)

Entire-Checkpoint: 075290d470e5

* docs: viewer links shown on all verbosity levels (v4)

Entire-Checkpoint: cbc26f5db2c4

* docs: add grep to noise filter rules

Entire-Checkpoint: 2b8dbb47e518

* docs: add consolidated tool card implementation plan

Entire-Checkpoint: 2baf2ed990bc

* feat(formatting): add grep to noise filter, change glob to hide

Entire-Checkpoint: 5d880ff51b85

* feat: add ToolCardState for consolidated tool card

Entire-Checkpoint: 31469436e6e5

* feat(discord): add renderToolCard formatter

Entire-Checkpoint: 1c21fec9dc31

* feat(telegram): add renderToolCard formatter

Add renderToolCard() to Telegram formatting that renders tool card snapshots
as HTML (bold headers, escaped labels, anchor viewer links, plan section,
usage footer). Add corresponding tests covering all output behaviors.

Entire-Checkpoint: 643c26444277

* feat(discord): wire ToolCard into ActivityTracker

Entire-Checkpoint: 018413b14f8d

* feat(telegram): wire ToolCard into ActivityTracker

Entire-Checkpoint: 22d59ca7c6f5

* refactor: delete deprecated platform ToolCallTrackers

Entire-Checkpoint: c5c4b3ac6239

* docs: update message format reference for consolidated tool card

Entire-Checkpoint: f211f739e728

* fix(tool-card): guard empty render, fix falsy usage check, make destroy terminal

- Skip send/edit when renderToolCard returns empty string (prevents API
  errors for sessions that end with no tool calls)
- Fix tokensUsed check from falsy to != null in both Discord and Telegram
  renderToolCard so tokensUsed=0 is not silently hidden
- Set finalized=true in ToolCardState.destroy() to make it terminal and
  prevent post-destroy mutations

Entire-Checkpoint: de056e6643c9

* fix(tool-card): put viewer links on new line for better readability

Entire-Checkpoint: 4ce2b139ecbd

* fix(tool-card): always show usage stats, use formatUsage with verbosity

- sendUsage() no longer skips when no tool content — standalone usage
  message is sent for text-only responses
- renderToolCard uses formatUsage() so progress bar and cost appear
  according to verbosity (high verbosity shows progress bar + %)
- Separator line only rendered when there are tool entries above it
- Update test to assert standalone usage message behavior

Entire-Checkpoint: b55f5bc768c0

* fix(telegram): edit thinking message instead of sending new ones

Entire-Checkpoint: 4f47ffddcdb4

* fix(formatting): recognize Terminal tool name, show command in summary

Entire-Checkpoint: 1c66813043ae

* fix(formatting): show play icon for Terminal tool with no command

Entire-Checkpoint: 46c93d01eee8

---------

Co-authored-by: Leo Agent <bigbearman078@mgail.com>
2026-03-27 18:30:31 +07:00
..