Class: PendingSubagentDecorator
- Inherits:
-
PendingMessageDecorator
- Object
- Draper::Decorator
- ApplicationDecorator
- PendingMessageDecorator
- PendingSubagentDecorator
- Defined in:
- app/decorators/pending_subagent_decorator.rb
Overview
Decorates a subagent PendingMessage — a sub-agent’s reply that landed on the parent’s mailbox via SubagentMessageRouter. Promotes into a phantom from_<nickname> tool_call/tool_response pair, but while pending it surfaces as a labeled inbound delivery so the user sees which sub-agent is talking to her.
Hidden in basic (matches the promoted tool pair, which is hidden in basic). Visible from verbose with a [from <nickname>] badge.
Instance Method Summary collapse
-
#render_basic ⇒ nil
Sub-agent deliveries are hidden in basic mode.
-
#render_debug ⇒ Hash
Full sub-agent delivery payload.
-
#render_melete ⇒ String
Melete transcript line.
-
#render_mneme ⇒ String
Mneme transcript line.
-
#render_verbose ⇒ Hash
Dimmed sub-agent delivery payload.
Methods inherited from PendingMessageDecorator
Instance Method Details
#render_basic ⇒ nil
Returns sub-agent deliveries are hidden in basic mode.
13 14 15 |
# File 'app/decorators/pending_subagent_decorator.rb', line 13 def render_basic nil end |
#render_debug ⇒ Hash
Returns full sub-agent delivery payload.
28 29 30 31 32 33 34 35 |
# File 'app/decorators/pending_subagent_decorator.rb', line 28 def render_debug { role: :pending_subagent, source: source_name, content: content, status: "pending" } end |
#render_melete ⇒ String
Returns Melete transcript line.
38 39 40 |
# File 'app/decorators/pending_subagent_decorator.rb', line 38 def render_melete "Sub-agent #{source_name} (pending): #{truncate_middle(content)}" end |
#render_mneme ⇒ String
Returns Mneme transcript line.
43 44 45 |
# File 'app/decorators/pending_subagent_decorator.rb', line 43 def render_mneme "Sub-agent #{source_name} (pending): #{truncate_middle(content)}" end |
#render_verbose ⇒ Hash
Returns dimmed sub-agent delivery payload.
18 19 20 21 22 23 24 25 |
# File 'app/decorators/pending_subagent_decorator.rb', line 18 def render_verbose { role: :pending_subagent, source: source_name, content: truncate_lines(content, max_lines: 3), status: "pending" } end |