Skip to content

feat(reactions): add tool_display config for tool call visibility#658

Merged
thepagent merged 1 commit intomainfrom
feat/tool-display-config
Apr 30, 2026
Merged

feat(reactions): add tool_display config for tool call visibility#658
thepagent merged 1 commit intomainfrom
feat/tool-display-config

Conversation

@chaodu-agent
Copy link
Copy Markdown
Collaborator

@chaodu-agent chaodu-agent commented Apr 30, 2026

Summary

Add a tool_display configuration option under [reactions] to control how tool calls are rendered in chat messages.

Closes #216
Supersedes #263, #296

Discord Discussion URL: https://discord.com/channels/1486155598964719616/1499505047845736458

Three modes

Mode Behavior Example
full Show complete tool title (original behavior) ✅ Running: curl -s "https://..." | python3 ...
compact Show only a count summary (default) ✅ 3 · 🔧 1 tool(s)
none Hide tool lines entirely (only final response shown)

Config example

[reactions]
tool_display = "compact"   # full | compact | none

Helm values

reactions:
  toolDisplay: "compact"   # full | compact | none

Changes

  • src/config.rs: Add ToolDisplay enum (Full/Compact/None, default Compact) with serde deserialization, add tool_display field to ReactionsConfig
  • src/adapter.rs: Update compose_display() to accept ToolDisplay parameter — Compact always renders a count summary line, Full retains per-entry display with threshold-based collapse, None hides tool lines entirely. Add 4 unit tests.
  • charts/openab/templates/configmap.yaml: Add toolDisplay to [reactions] section with enum validation (full/compact/none)
  • charts/openab/values.yaml: Add toolDisplay documentation to all reactions sections

Context

Testing

  • rustfmt --edition 2021 --check passes on modified files
  • cargo test — all 185 tests pass, including 4 new compose_display tests covering Full, Compact (count summary + running count), and None modes
  • Helm template syntax follows existing allowBotMessages validation pattern

@chaodu-agent chaodu-agent requested a review from thepagent as a code owner April 30, 2026 20:23
@github-actions github-actions Bot added the pending-screening PR awaiting automated screening label Apr 30, 2026
@chaodu-agent chaodu-agent force-pushed the feat/tool-display-config branch 4 times, most recently from ac2150a to 8c953e5 Compare April 30, 2026 21:00
Add a `tool_display` configuration option under `[reactions]` to control
how tool calls are rendered in chat messages.

Three modes:
- `full`: show complete tool title including arguments (original behavior)
- `compact`: show only a count summary, e.g. `✅ 3 · 🔧 1 tool(s)` (default)
- `none`: hide tool lines entirely, only show final response

Config example:
  [reactions]
  tool_display = "compact"   # full | compact | none

Changes:
- src/config.rs: add ToolDisplay enum (Full/Compact/None, default Compact)
  with serde deserialization, add tool_display field to ReactionsConfig
- src/adapter.rs: update compose_display() — Compact always renders a count
  summary line, Full retains per-entry display with threshold-based collapse,
  None hides tool lines entirely. Add 4 unit tests covering all three modes.
- charts/openab: add toolDisplay to configmap.yaml [reactions] with enum
  validation, add documentation to values.yaml

Closes #216
Supersedes #263, #296
@chaodu-agent chaodu-agent force-pushed the feat/tool-display-config branch from 8c953e5 to e83c378 Compare April 30, 2026 21:05
@thepagent thepagent merged commit d4421a6 into main Apr 30, 2026
11 checks passed
thepagent pushed a commit that referenced this pull request Apr 30, 2026
* fix(reactions): restore tool_display default to full (BC fix)

PR #658 changed the default from full to compact, which is a breaking
change for existing deployments — users who never set tool_display
would silently get different behavior after upgrading.

Restore the original default (full) so upgrades are non-breaking.
Users who want compact can opt in explicitly.

Ref: #658

* docs: update config-reference and tool-display to reflect full as default

Addresses review feedback from 擺渡法師 — these two docs still
referenced compact as the default after the config.rs change.

- docs/config-reference.md: update default column to "full"
- docs/tool-display.md: reorder modes (full first), fix examples,
  replace "Default changed" note with accurate description

* test: add regression guard for ToolDisplay default

Ensures ToolDisplay::default() == Full so any future change to the
default will break CI and require explicit acknowledgment.

Suggested-by: 擺渡法師

---------

Co-authored-by: chaodu-agent <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pending-screening PR awaiting automated screening

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: add tool_display config to control tool call visibility in Discord

2 participants