Skip to content

admin chat: render accept_pay / decline_pay / counter_pay tool chips#186

Merged
jeffdafoe merged 1 commit into
mainfrom
home/admin-render-pay-deliberation-tools
May 6, 2026
Merged

admin chat: render accept_pay / decline_pay / counter_pay tool chips#186
jeffdafoe merged 1 commit into
mainfrom
home/admin-render-pay-deliberation-tools

Conversation

@jeffdafoe
Copy link
Copy Markdown
Owner

Summary

Companion to salem-engine ZBBS-127. Adds ToolCallDisplay rendering for the three new pay-deliberation tools so the admin chat log shows the recipient's spoken decline / counter inline, matching the existing pay / consume / attend_to conventions.

Render shapes

```
[accept_pay]
[decline_pay] "I'd rather not sell at that price."
[counter_pay] 5c — "Make it five and we have a deal."
```

The reason / message strings are also broadcast as synthetic `npc_spoke` events by the engine — these chips just give the admin a per-row anchor to correlate the deliberation chat row with the speech bubble in the talk log.

Test plan

  • `npm run build:admin` succeeds, bundle contains `accept_pay` / `decline_pay` / `counter_pay` / `inputReason` / `counterPayLabel`
  • After engine ZBBS-127 deploy, walk Jefferey into the Tavern at underpayment — confirm chip + speech render together cleanly

— Home

🤖 Generated with Claude Code

Companion to salem-engine ZBBS-127 (held-transaction LLM tick on
pay). The engine's pay-deliberation path emits three new tools as
part of the recipient's deliberation reply:

- accept_pay — no args, the tool itself is the meaning
- decline_pay(reason) — recipient's spoken refusal
- counter_pay(new_amount, message) — recipient's spoken counter

These already write to chat_message_texts via the deliberation's
chat/send call, but ToolCallDisplay's v-else fallback rendered them
as bare [accept_pay] / [decline_pay] / [counter_pay] chips with
the input dropped — so the admin couldn't see what the recipient
said without clicking into the detail dialog and reading raw JSON.

Render shapes mirror the existing pay tool conventions:

  [accept_pay]
  [decline_pay] "I'd rather not sell at that price."
  [counter_pay] 5c — "Make it five and we have a deal."

The reason / message strings are also broadcast as synthetic
npc_spoke events by the engine, so they appear in the room's speech
bubbles too — the admin chip just lets reviewers correlate the
deliberation row with the speech bubble at a glance.

— Home

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@jeffdafoe jeffdafoe merged commit ac91bc7 into main May 6, 2026
6 checks passed
@jeffdafoe jeffdafoe deleted the home/admin-render-pay-deliberation-tools branch May 6, 2026 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant