Skip to content

Dashboard: wire up the agent sender-name override (PR #86 follow-up) #92

Description

@retog

Context

PR #86 (dashboard: model/cost/time on conversation messages) added an optional
agent override to _conv_add_message(...) in scripts/web-gateway.py:

def _conv_add_message(cid, role, text, *, ..., agent: str | None = None):
    # `agent` overrides the displayed sender name (e.g. "Coach") when
    # a relay answers on a subagent's behalf.

The parameter is plumbed through to storage/rendering, but no call-site sets
it yet
. All three current callers omit it:

  • scripts/web-gateway.py:1425 — assistant reply
  • scripts/web-gateway.py:2797 — user message
  • scripts/web-gateway.py:2945 — agent-pushed message

Not a bug

This degrades silently: with no producer, m.agent stays empty and the bubble
falls back to the default sender label exactly as before. The Coach example
from the PR description is therefore not yet reachable. Flagged in Aros's review
of #86 as deliberately staged for a follow-up, worth tracking so it isn't lost.

Follow-up

Thread the subagent/relay name through to the relevant call-site(s) so that when
a relay answers on a subagent's behalf, its name (e.g. Coach) is passed as
agent= and shown as the message sender. Primarily the agent-push path
(:2945, conversation-push.py / the internal messages endpoint) and any relay
that answers as a named subagent.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions