Files
Void-Homelab/public/views/sentinel.js
root c2569cad76 feat(chat): add Send button to agent composers (mobile fix)
Soft keyboards have no reliable Enter-to-send, so chat was unsendable on
mobile browsers. Add an optional themed Send button wired through
wireAgentChat (Enter-to-send kept for desktop), applied to the Companion
rail, Yerin, and Little Blue composers. Blackflame-styled, flex-row layout.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-05 08:25:05 +10:00

27 lines
1.4 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// #/sentinel — Yerin's global, read-only security view. Uses the shared
// agent_chat panel pointed at /api/security/yerin (no draft cards).
import { el, mount } from '../dom.js';
import { wireAgentChat } from '../components/agent_chat.js';
const YERIN_LABELS = {
audit_log: '🗒️ reading the audit trail', agent_inventory: '👁️ reviewing agents',
pending_review: '⏳ checking the approval queue', resource_exposure: '🛡️ checking exposure',
token_audit: '🔑 auditing tokens'
};
export async function render(main) {
const log = el('div', { class: 'rail-log sentinel-log' });
const input = el('textarea', { class: 'rail-input', rows: 1, placeholder: 'Ask Yerin about the Voids security…' });
const sendBtn = el('button', { class: 'rail-send', type: 'button', title: 'Send', 'aria-label': 'Send' }, '➤');
mount(main, el('div', { class: 'yerin-view' },
el('h1', { class: 'view-h1' }, '◆ Yerin'),
el('p', { class: 'view-sub' }, 'Sage of the Endless Sword — read-only security & observability. She watches, reports, and warns; she never acts.'),
el('div', { class: 'sentinel-chat' }, log, el('div', { class: 'rail-inputwrap' }, input, sendBtn))));
const chat = wireAgentChat({
logEl: log, inputEl: input, sendBtnEl: sendBtn,
historyUrl: '/api/security/yerin', turnUrl: '/api/security/yerin/turn',
agentName: 'Yerin', showDrafts: false, toolLabels: YERIN_LABELS
});
await chat.load();
}