@volter/teams 0.1.19 → 0.1.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/viewer/session-view-entry.mjs +25 -2
- package/viewer/session-view.css +1 -0
- package/viewer/session-view.mjs +28 -28
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@volter/teams",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.20",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Volter Teams, the neutral team plane: machine identity and daemon core, the local door and server link, admission from machine grants, product doors, and the Teams server's neutral routes (company RFC 0008).",
|
|
6
6
|
"license": "MIT",
|
|
@@ -8,6 +8,28 @@ import { Composer } from '@volter/supercode-ui/preact/composer';
|
|
|
8
8
|
import { EMPTY_UI_STATE, normalizeUiState } from '@volter/supercode-ui';
|
|
9
9
|
import { projectSubagentTranscript } from '@volter/supercode-ui/controller';
|
|
10
10
|
|
|
11
|
+
// A person's picture: the brand's person placeholder. An empty seed is its one standard anonymous face.
|
|
12
|
+
const personImage = (seed = '') => `https://brand.volter.ai/runner/svg?seed=${encodeURIComponent(seed)}&size=36&radius=18`;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Who wrote each user turn, from the message's own annotations (source_name / source_principal_id, recorded when a
|
|
16
|
+
* Room member typed it): their name and face, or, for anyone unnamed, the standard anonymous face. Never an agent mark.
|
|
17
|
+
*/
|
|
18
|
+
function withPeople(transcript, messages) {
|
|
19
|
+
const byTime = new Map();
|
|
20
|
+
for (const message of messages) {
|
|
21
|
+
if (message?.role !== 'user') continue;
|
|
22
|
+
const at = Date.parse(message.metadata?.timestamp ?? '');
|
|
23
|
+
if (Number.isFinite(at)) byTime.set(at, message.metadata);
|
|
24
|
+
}
|
|
25
|
+
return transcript.map((entry) => {
|
|
26
|
+
if (entry.role !== 'user') return entry;
|
|
27
|
+
const metadata = byTime.get(entry.ts) ?? {};
|
|
28
|
+
const name = metadata.source_name || null;
|
|
29
|
+
return { ...entry, actor: { name: name ?? 'Someone in the session', image: personImage(name ? (metadata.source_principal_id || name) : '') } };
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
|
|
11
33
|
const SOURCES = { 'claude-code': 'claude_code', codex: 'codex', gemini: 'gemini', goose: 'goose', grok: 'grok', opencode: 'opencode', pi: 'pi' };
|
|
12
34
|
|
|
13
35
|
/** A team session's captured messages as the harness SDK's normalized session, for supercode-ui's projection. */
|
|
@@ -40,10 +62,11 @@ export function mountSessionView(element, { onSend }) {
|
|
|
40
62
|
};
|
|
41
63
|
const draw = () => {
|
|
42
64
|
const { descriptor, messages, live, status, error, canSend, sending } = current;
|
|
43
|
-
const transcript = descriptor ? projectSubagentTranscript(normalizedSession(descriptor, messages), { prefix: descriptor.id, maxEntries: 500 }) : [];
|
|
65
|
+
const transcript = descriptor ? withPeople(projectSubagentTranscript(normalizedSession(descriptor, messages), { prefix: descriptor.id, maxEntries: 500 }), messages) : [];
|
|
44
66
|
const composerState = normalizeUiState({ ...EMPTY_UI_STATE, startup: 'ready', harness: descriptor?.harness ?? '', canSend: canSend && !sending, busy: sending, transcript });
|
|
45
67
|
render(h('div', { class: 'session-view' },
|
|
46
|
-
|
|
68
|
+
// The header says what this viewer may do: type into the session (a control token) or only read it.
|
|
69
|
+
h(TeamTranscript, { session: descriptor, transcript, live, status, error, adapter, labels: { readOnly: canSend ? 'Control' : 'Read-only' } }),
|
|
47
70
|
canSend ? h('div', { class: 'session-composer scui-root' }, h(Composer, { state: composerState, adapter })) : null,
|
|
48
71
|
), element);
|
|
49
72
|
};
|
package/viewer/session-view.css
CHANGED
|
@@ -379,6 +379,7 @@
|
|
|
379
379
|
.scui-message-actor { display:var(--scui-message-actor-display, none); grid-row:1 / span 9; grid-template-columns:var(--scui-message-actor-columns, auto auto); gap:calc(10px * var(--scui-scaling)); align-items:baseline; color:var(--scui-muted); font:var(--scui-text-xs) var(--scui-font-mono) }
|
|
380
380
|
.scui-message-actor-time { white-space:nowrap }
|
|
381
381
|
.scui-message-actor-name { display:inline-flex; align-items:center; gap:calc(8px * var(--scui-scaling)); color:var(--scui-fg); white-space:nowrap }
|
|
382
|
+
.scui-message-actor-image { width:18px; height:18px; border-radius:50%; flex:none; object-fit:cover }
|
|
382
383
|
.scui-message-actor-name::before { content:''; width:var(--scui-message-actor-dot, 0); height:var(--scui-message-actor-dot, 0); border-radius:50%; background:var(--scui-message-actor-dot-bg, var(--scui-muted)) }
|
|
383
384
|
.scui-message-actor-name[data-role="user"]::before { background:var(--scui-message-actor-user-dot-bg, var(--scui-fg)) }
|
|
384
385
|
/* Muted color, not opacity: opacity crushed the footer text below the 4.5:1 contrast floor (axe color-contrast).
|