@xenosystem/agent-conversation 0.1.44 → 0.1.45
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/dist/components/agent/AgentView.d.ts.map +1 -1
- package/dist/components/agent/AgentView.js +1 -1
- package/dist/components/agent/AgentView.js.map +1 -1
- package/dist/components/agent/transcript/ThreadScrubber.d.ts +10 -6
- package/dist/components/agent/transcript/ThreadScrubber.d.ts.map +1 -1
- package/dist/components/agent/transcript/ThreadScrubber.js +17 -7
- package/dist/components/agent/transcript/ThreadScrubber.js.map +1 -1
- package/package.json +5 -5
- package/src/transcript.css +19 -19
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The thread scrubber — a map of the conversation on its right edge.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
* tick
|
|
6
|
-
*
|
|
7
|
-
*
|
|
4
|
+
* ONE compact column, fixed height, centred on the right edge — never spread over the pane. One
|
|
5
|
+
* rectangular tick per message (a longer one for the person's, a short one for the reply), evenly
|
|
6
|
+
* spaced: the gap is 10 px and closes toward 4 px only when the thread is long enough to need it,
|
|
7
|
+
* so the column keeps its height. The tick under the viewport is white, ▲/▼ at the ends; hover a
|
|
8
|
+
* tick for who said it and its first line, click to go there. It appears once the thread scrolls
|
|
9
|
+
* in earnest (1.25 viewports) and widens on hover. Keys work without the rail: `Alt+↑ / Alt+↓` step between the person's
|
|
8
10
|
* turns, `Alt+Home / Alt+End` go to the first and last.
|
|
9
11
|
*
|
|
10
12
|
* Benchmarked 2026-09-18: Grok ships this natively; ChatGPT and Gemini leave a hole that a whole
|
|
@@ -35,11 +37,13 @@ export interface ThreadScrubberProps {
|
|
|
35
37
|
elementFor?: (id: string, scroller: HTMLElement) => HTMLElement | null;
|
|
36
38
|
/** Show once the thread is this many viewports tall (default 1.25 — as soon as it scrolls in earnest). */
|
|
37
39
|
minViewports?: number;
|
|
38
|
-
/**
|
|
40
|
+
/** The column's height in px (default 360; capped to the pane). */
|
|
41
|
+
height?: number;
|
|
42
|
+
/** Inline styles for the rail's box (e.g. `right` when the pane carries a side inset). */
|
|
39
43
|
style?: React.CSSProperties;
|
|
40
44
|
className?: string;
|
|
41
45
|
}
|
|
42
46
|
/** The first non-empty line of a message, trimmed for the card. */
|
|
43
47
|
export declare function firstLineOf(text: string, max?: number): string;
|
|
44
|
-
export declare function ThreadScrubber({ turns, scrollerRef, elementFor, minViewports, style, className }: ThreadScrubberProps): import("react").JSX.Element | null;
|
|
48
|
+
export declare function ThreadScrubber({ turns, scrollerRef, elementFor, minViewports, height, style, className }: ThreadScrubberProps): import("react").JSX.Element | null;
|
|
45
49
|
//# sourceMappingURL=ThreadScrubber.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThreadScrubber.d.ts","sourceRoot":"","sources":["../../../../src/components/agent/transcript/ThreadScrubber.tsx"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"ThreadScrubber.d.ts","sourceRoot":"","sources":["../../../../src/components/agent/transcript/ThreadScrubber.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAAsE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAE1G,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,GAAG,WAAW,CAAA;IAC1B,uDAAuD;IACvD,KAAK,EAAE,MAAM,CAAA;IACb,2DAA2D;IAC3D,SAAS,EAAE,MAAM,CAAA;IACjB,uEAAuE;IACvE,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB;AAED,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,YAAY,EAAE,CAAA;IACrB,gDAAgD;IAChD,WAAW,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAA;IAC1C,2FAA2F;IAC3F,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,KAAK,WAAW,GAAG,IAAI,CAAA;IACtE,0GAA0G;IAC1G,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,mEAAmE;IACnE,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,0FAA0F;IAC1F,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAKD,mEAAmE;AACnE,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,SAAK,GAAG,MAAM,CAG1D;AAQD,wBAAgB,cAAc,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,UAA8B,EAAE,YAAmB,EAAE,MAAY,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,mBAAmB,sCA8G9J"}
|
|
@@ -2,10 +2,12 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
/**
|
|
3
3
|
* The thread scrubber — a map of the conversation on its right edge.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
* tick
|
|
7
|
-
*
|
|
8
|
-
*
|
|
5
|
+
* ONE compact column, fixed height, centred on the right edge — never spread over the pane. One
|
|
6
|
+
* rectangular tick per message (a longer one for the person's, a short one for the reply), evenly
|
|
7
|
+
* spaced: the gap is 10 px and closes toward 4 px only when the thread is long enough to need it,
|
|
8
|
+
* so the column keeps its height. The tick under the viewport is white, ▲/▼ at the ends; hover a
|
|
9
|
+
* tick for who said it and its first line, click to go there. It appears once the thread scrolls
|
|
10
|
+
* in earnest (1.25 viewports) and widens on hover. Keys work without the rail: `Alt+↑ / Alt+↓` step between the person's
|
|
9
11
|
* turns, `Alt+Home / Alt+End` go to the first and last.
|
|
10
12
|
*
|
|
11
13
|
* Benchmarked 2026-09-18: Grok ships this natively; ChatGPT and Gemini leave a hole that a whole
|
|
@@ -24,7 +26,12 @@ export function firstLineOf(text, max = 90) {
|
|
|
24
26
|
const line = (text || '').split(/\r?\n/).map((part) => part.replace(/^[#>*\-\s`]+/, '').trim()).find(Boolean) || '';
|
|
25
27
|
return line.length > max ? `${line.slice(0, max - 1).trimEnd()}…` : line;
|
|
26
28
|
}
|
|
27
|
-
|
|
29
|
+
const TICK_PX = 2;
|
|
30
|
+
const ENDS_PX = 32;
|
|
31
|
+
const PAD_PX = 8;
|
|
32
|
+
const GAP_MAX = 10;
|
|
33
|
+
const GAP_MIN = 4;
|
|
34
|
+
export function ThreadScrubber({ turns, scrollerRef, elementFor = defaultElementFor, minViewports = 1.25, height = 360, style, className }) {
|
|
28
35
|
const [tall, setTall] = useState(false);
|
|
29
36
|
const [current, setCurrent] = useState(null);
|
|
30
37
|
const [hover, setHover] = useState(null);
|
|
@@ -121,7 +128,10 @@ export function ThreadScrubber({ turns, scrollerRef, elementFor = defaultElement
|
|
|
121
128
|
if (!tall || turns.length < 2)
|
|
122
129
|
return null;
|
|
123
130
|
const hovered = hover ? turns.find((turn) => turn.id === hover) : null;
|
|
124
|
-
|
|
131
|
+
// the gap adapts so the column keeps its height: 10 px, down to 4 px on a very long thread
|
|
132
|
+
const gap = Math.max(GAP_MIN, Math.min(GAP_MAX, (height - ENDS_PX - PAD_PX - turns.length * TICK_PX) / Math.max(1, turns.length - 1)));
|
|
133
|
+
const railStyle = { ...style, '--xa-scrub-h': `${height}px`, '--xa-scrub-gap': `${gap}px` };
|
|
134
|
+
return (_jsxs("div", { className: `xa-scrub${className ? ` ${className}` : ''}`, style: railStyle, "data-scrubber": true, onMouseLeave: () => setHover(null), children: [_jsx("button", { type: "button", className: "xa-scrub-end", "aria-label": "Previous turn (Alt+\u2191)", onClick: () => step(-1), children: _jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.4", strokeLinecap: "square", "aria-hidden": "true", children: _jsx("path", { d: "M6 15l6-6 6 6" }) }) }), _jsx("div", { className: "xa-scrub-ticks", role: "listbox", "aria-label": "Conversation map", "aria-activedescendant": current ? `xa-tick-${current}` : undefined, children: turns.map((turn) => (_jsx("button", { type: "button", id: `xa-tick-${turn.id}`, role: "option", "aria-selected": turn.id === current, "aria-label": `${turn.label}: ${turn.firstLine}`, className: `xa-tick xa-tick-${turn.role}${turn.id === current ? ' xa-cur' : ''}${turn.marked ? ' xa-mark' : ''}`, "data-tick": turn.id, onMouseEnter: () => setHover(turn.id), onFocus: () => setHover(turn.id), onClick: () => goTo(turn.id) }, turn.id))) }), _jsx("button", { type: "button", className: "xa-scrub-end", "aria-label": "Next turn (Alt+\u2193)", onClick: () => step(1), children: _jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.4", strokeLinecap: "square", "aria-hidden": "true", children: _jsx("path", { d: "M6 9l6 6 6-6" }) }) }), hovered && (_jsxs("div", { className: "xa-scrub-card", role: "tooltip", style: { top: tickTop(hovered.id) }, children: [_jsx("span", { className: "xa-scrub-who", children: hovered.label }), _jsx("span", { className: "xa-scrub-line", children: hovered.firstLine || '…' })] }))] }));
|
|
125
135
|
}
|
|
126
136
|
/** The card sits beside the hovered tick — read from the DOM at render, which is where the tick is. */
|
|
127
137
|
function tickTop(id) {
|
|
@@ -132,6 +142,6 @@ function tickTop(id) {
|
|
|
132
142
|
if (!tick || !rail)
|
|
133
143
|
return undefined;
|
|
134
144
|
const top = tick.getBoundingClientRect().top - rail.getBoundingClientRect().top;
|
|
135
|
-
return Math.max(0, Math.min(top - 18, rail.clientHeight -
|
|
145
|
+
return Math.max(0, Math.min(top - 18, rail.clientHeight - 60));
|
|
136
146
|
}
|
|
137
147
|
//# sourceMappingURL=ThreadScrubber.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThreadScrubber.js","sourceRoot":"","sources":["../../../../src/components/agent/transcript/ThreadScrubber.tsx"],"names":[],"mappings":";AAAA
|
|
1
|
+
{"version":3,"file":"ThreadScrubber.js","sourceRoot":"","sources":["../../../../src/components/agent/transcript/ThreadScrubber.tsx"],"names":[],"mappings":";AAAA;;;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CAAC,GAAG,GAAG,IAAI,CAAC,qBAAqB,EAAE,CAAC,GAAG,CAAA;IAC/E,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,EAAE,EAAE,IAAI,CAAC,YAAY,GAAG,EAAE,CAAC,CAAC,CAAA;AAChE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xenosystem/agent-conversation",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.45",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"description": "The XENO Agent conversation surface: the transcript, the composer, and the logic behind them.",
|
|
6
6
|
"type": "module",
|
|
@@ -43,10 +43,10 @@
|
|
|
43
43
|
"react-markdown": "^10.1.0",
|
|
44
44
|
"remark-gfm": "^4.0.1",
|
|
45
45
|
"zustand": "^5.0.2",
|
|
46
|
-
"@xenosystem/agent-interface-client": "0.1.
|
|
47
|
-
"@xenosystem/agent-interface-contract": "0.1.
|
|
48
|
-
"@xenosystem/agent-interface-
|
|
49
|
-
"@xenosystem/agent-interface-
|
|
46
|
+
"@xenosystem/agent-interface-client": "0.1.45",
|
|
47
|
+
"@xenosystem/agent-interface-contract": "0.1.45",
|
|
48
|
+
"@xenosystem/agent-interface-hub-adapter": "0.1.45",
|
|
49
|
+
"@xenosystem/agent-interface-core": "0.1.45"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
52
|
"react": "^19.0.0",
|
package/src/transcript.css
CHANGED
|
@@ -513,34 +513,34 @@ img.xa-fav { padding: 1px; background: #fff; }
|
|
|
513
513
|
.xa-citecard-site { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--xa-t4); }
|
|
514
514
|
|
|
515
515
|
/* ── the thread scrubber: a map of the conversation on the right edge ─────────────────────
|
|
516
|
-
|
|
517
|
-
the
|
|
518
|
-
|
|
519
|
-
|
|
516
|
+
ONE compact column, fixed height, centred on the right edge — not spread over the pane. Ticks are
|
|
517
|
+
rectangles (never dots), the person's longer than the reply's, evenly spaced; the gap is set by
|
|
518
|
+
the component (10 px, closing to 4 px only on a very long thread) so the column keeps its height.
|
|
519
|
+
Marked ticks (a turn that did work) are lighter; the one under the viewport is white. The card is
|
|
520
|
+
the citation card's plate. Hidden while the thread does not scroll — the component decides. */
|
|
521
|
+
.xa-scrub { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); z-index: 6; display: flex; flex-direction: column; align-items: flex-end; width: 26px; height: var(--xa-scrub-h, 360px); max-height: calc(100% - 16px); opacity: 0.85; transition: opacity 160ms linear; }
|
|
520
522
|
.xa-scrub:hover, .xa-scrub:focus-within { opacity: 1; }
|
|
521
523
|
.xa-scrub-end { flex: none; width: 16px; height: 16px; margin-right: 1px; border-radius: 3px; color: var(--xa-t5); opacity: 0; transition: opacity 160ms linear, background 120ms linear, color 120ms linear; }
|
|
522
524
|
.xa-scrub:hover .xa-scrub-end, .xa-scrub:focus-within .xa-scrub-end { opacity: 1; }
|
|
523
525
|
.xa-scrub-end:hover { color: var(--xa-t2); background: var(--xa-wash-hover); }
|
|
524
526
|
.xa-scrub-end svg { width: 11px; height: 11px; }
|
|
525
|
-
.xa-scrub-ticks { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content:
|
|
526
|
-
|
|
527
|
-
.xa-
|
|
528
|
-
.xa-
|
|
529
|
-
.xa-
|
|
530
|
-
.xa-tick-
|
|
531
|
-
.xa-tick-assistant { width: 7px; opacity: 0.5; }
|
|
532
|
-
.xa-scrub:hover .xa-tick-user, .xa-scrub:focus-within .xa-tick-user { width: 18px; }
|
|
533
|
-
.xa-scrub:hover .xa-tick-assistant, .xa-scrub:focus-within .xa-tick-assistant { width: 11px; }
|
|
534
|
-
.xa-tick.xa-cur { background: var(--xa-t1); opacity: 1; height: 3px; }
|
|
527
|
+
.xa-scrub-ticks { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: center; gap: var(--xa-scrub-gap, 10px); width: 100%; overflow: hidden; padding: 4px 0; }
|
|
528
|
+
.xa-tick { position: relative; flex: none; align-self: flex-end; height: 2px; border-radius: 1px; background: var(--xa-t4); opacity: 0.9; transition: width 160ms var(--xa-ease), background 120ms linear, opacity 120ms linear; cursor: pointer; padding: 0; box-sizing: content-box; }
|
|
529
|
+
.xa-tick-user { width: 14px; }
|
|
530
|
+
.xa-tick-assistant { width: 8px; opacity: 0.5; }
|
|
531
|
+
.xa-scrub:hover .xa-tick-user, .xa-scrub:focus-within .xa-tick-user { width: 20px; }
|
|
532
|
+
.xa-scrub:hover .xa-tick-assistant, .xa-scrub:focus-within .xa-tick-assistant { width: 12px; }
|
|
535
533
|
.xa-tick.xa-mark { background: var(--xa-t2); opacity: 1; }
|
|
536
|
-
.xa-tick.xa-
|
|
537
|
-
.xa-tick:hover, .xa-tick:focus-visible { background: var(--xa-
|
|
534
|
+
.xa-tick.xa-cur { background: var(--xa-t1); opacity: 1; height: 3px; }
|
|
535
|
+
.xa-tick:hover, .xa-tick:focus-visible { background: var(--xa-t1); opacity: 1; outline: none; }
|
|
538
536
|
/* a bigger target than the tick itself */
|
|
539
|
-
.xa-tick::before { content: ''; position: absolute; right: 0;
|
|
540
|
-
.xa-
|
|
541
|
-
.xa-scrub-card { position: absolute; right: 26px; z-index: 40; display: flex; flex-direction: column; gap: 3px; width: 240px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--xa-line-tip); background: var(--xa-menu); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35); pointer-events: none; }
|
|
537
|
+
.xa-tick::before { content: ''; position: absolute; right: 0; top: -3px; width: 26px; height: 8px; }
|
|
538
|
+
.xa-scrub-card { position: absolute; right: 32px; z-index: 40; display: flex; flex-direction: column; gap: 3px; width: 250px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--xa-line-tip); background: var(--xa-menu); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35); pointer-events: none; }
|
|
542
539
|
.xa-scrub-who { font-size: 10.5px; color: var(--xa-t5); }
|
|
543
540
|
.xa-scrub-line { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 12px; line-height: 1.35; color: var(--xa-t1); }
|
|
541
|
+
/* the rail IS the scrollbar while it shows — Grok's move: two scroll affordances on one edge fight for the pointer */
|
|
542
|
+
.xa-app:has(> .xa-scrub) > .xa-transcript { scrollbar-width: none; }
|
|
543
|
+
.xa-app:has(> .xa-scrub) > .xa-transcript::-webkit-scrollbar { display: none; }
|
|
544
544
|
@media (prefers-reduced-motion: reduce) { .xa-tick, .xa-scrub, .xa-scrub-end { transition: none; } }
|
|
545
545
|
|
|
546
546
|
/* ── cards: A's card, Z's cadence — Cancel left, the way forward right ─── */
|