@tangle-network/ui 11.51.1 → 11.51.3
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/CHANGELOG.md +12 -0
- package/README.md +4 -0
- package/dist/chat/speaker.d.ts +3 -42
- package/dist/chat/speaker.js +1 -42
- package/dist/hooks/use-auto-scroll.d.ts +1 -4
- package/dist/hooks/use-auto-scroll.js +7 -41
- package/dist/hooks/use-event-stream.d.ts +15 -0
- package/dist/hooks/use-event-stream.js +71 -0
- package/dist/hooks/use-follow-tail.d.ts +14 -0
- package/dist/hooks/use-follow-tail.js +69 -0
- package/dist/hooks/use-sse-stream.js +36 -33
- package/dist/hooks.d.ts +3 -1
- package/dist/hooks.js +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +3 -1
- package/package.json +3 -2
- package/src/chat/message-author.test.tsx +0 -17
- package/src/chat/speaker.tsx +2 -65
- package/src/hooks/index.ts +3 -0
- package/src/hooks/use-auto-scroll.ts +9 -58
- package/src/hooks/use-event-stream.ts +71 -0
- package/src/hooks/use-follow-tail.ts +32 -0
- package/src/hooks/use-sse-stream.ts +24 -55
- package/src/chat/chat-container.synthetic.test.tsx +0 -171
- package/src/chat/chat-container.test.tsx +0 -189
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @tangle-network/ui
|
|
2
2
|
|
|
3
|
+
## 11.51.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Share the native event-stream lifecycle and measured-content following between existing UI chat hooks and retained-run consumers; preserve buffered-stream retries, authenticated host transports and existing exports.
|
|
8
|
+
|
|
9
|
+
## 11.51.2
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- d8990b5: Re-export canonical server-safe speaker grouping from AgentInterface; preserve every UI chat name. Record the adopted GTM heading reduction in the owning drift baseline.
|
|
14
|
+
|
|
3
15
|
## 11.51.1
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -26,6 +26,10 @@ export function App() {
|
|
|
26
26
|
}
|
|
27
27
|
```
|
|
28
28
|
|
|
29
|
+
`partitionBySpeaker` and the speaker types in `/chat` re-export the canonical
|
|
30
|
+
`@tangle-network/agent-interface/speaker` contract. Server consumers import that
|
|
31
|
+
entry directly; `SpeakerHeader` remains the UI renderer.
|
|
32
|
+
|
|
29
33
|
## Styling
|
|
30
34
|
|
|
31
35
|
This package ships no CSS. Its components are Tailwind v4 class names in source, and the build emits JavaScript only, so two pieces of consumer setup carry real weight.
|
package/dist/chat/speaker.d.ts
CHANGED
|
@@ -1,45 +1,5 @@
|
|
|
1
1
|
import { HTMLAttributes } from "react";
|
|
2
|
-
|
|
3
|
-
export type SpeakerState = "answering" | "done" | "failed";
|
|
4
|
-
/**
|
|
5
|
-
* A responder of a turn addressed to several agents. In the turn's parts it is
|
|
6
|
-
* a `{ type: "speaker", id, name, handle?, state? }` part written before the
|
|
7
|
-
* responder's answer.
|
|
8
|
-
*/
|
|
9
|
-
export interface Speaker {
|
|
10
|
-
/** The agent's stable id. It keys the avatar's tone and a live part's `speaker` tag. */
|
|
11
|
-
id: string;
|
|
12
|
-
name: string;
|
|
13
|
-
/** What a person types after `@` to address the agent. */
|
|
14
|
-
handle?: string;
|
|
15
|
-
/** Set once the responder ended; absent while it answers and on rows written before responders reported an end. */
|
|
16
|
-
state?: SpeakerState;
|
|
17
|
-
}
|
|
18
|
-
export type SpeakerPart = Speaker & {
|
|
19
|
-
type: "speaker";
|
|
20
|
-
};
|
|
21
|
-
/** One responder's share of a turn: its speaker part and the parts it wrote. */
|
|
22
|
-
export interface SpeakerSection<T> {
|
|
23
|
-
/** The latest speaker part for this responder; null for the parts no speaker owns. */
|
|
24
|
-
speaker: (T & SpeakerPart) | null;
|
|
25
|
-
parts: T[];
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Splits one assistant turn's parts by the agent that wrote them.
|
|
29
|
-
*
|
|
30
|
-
* A stored row holds a speaker part before each responder's answer, so a part
|
|
31
|
-
* belongs to the speaker part before it. A live stream announces every
|
|
32
|
-
* responder first and then interleaves their output, so a part names its owner
|
|
33
|
-
* in `speaker` (the responder's id), which wins over position. A later speaker
|
|
34
|
-
* part with an id already seen replaces that responder's speaker part, which is
|
|
35
|
-
* how its end state arrives, and never opens a second section.
|
|
36
|
-
*
|
|
37
|
-
* Sections keep the order speakers were first announced. Parts no speaker owns
|
|
38
|
-
* come first, in a section whose `speaker` is null; a turn without speaker
|
|
39
|
-
* parts is that one section. No part is dropped, copied or reordered within its
|
|
40
|
-
* section.
|
|
41
|
-
*/
|
|
42
|
-
export declare function partitionBySpeaker<T extends object>(parts: readonly T[]): SpeakerSection<T>[];
|
|
2
|
+
import { Speaker, Speaker as Speaker$1, SpeakerPart, SpeakerSection, SpeakerState, partitionBySpeaker } from "@tangle-network/agent-interface/speaker";
|
|
43
3
|
export interface SpeakerHeaderProps extends Omit<HTMLAttributes<HTMLDivElement>, "children"> {
|
|
44
4
|
speaker: Speaker;
|
|
45
5
|
/** The turn is still running, so a responder that has not reported an end is answering. */
|
|
@@ -54,4 +14,5 @@ export interface SpeakerHeaderProps extends Omit<HTMLAttributes<HTMLDivElement>,
|
|
|
54
14
|
* failed glyph with the word, both from `RunStatusIcon`, and a finished one
|
|
55
15
|
* nothing, as a settled run row does. `data-speaker-state` carries all three.
|
|
56
16
|
*/
|
|
57
|
-
export declare function SpeakerHeader({ speaker, live, ...props }: SpeakerHeaderProps): import("react").JSX.Element;
|
|
17
|
+
export declare function SpeakerHeader({ speaker, live, ...props }: SpeakerHeaderProps): import("react").JSX.Element;
|
|
18
|
+
export { type Speaker$1 as Speaker, type SpeakerPart, type SpeakerSection, type SpeakerState, partitionBySpeaker };
|
package/dist/chat/speaker.js
CHANGED
|
@@ -1,49 +1,8 @@
|
|
|
1
1
|
import { RunStatusIcon } from "../run/status-meta.js";
|
|
2
2
|
import { MessageAuthor } from "./message-author.js";
|
|
3
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import { partitionBySpeaker } from "@tangle-network/agent-interface/speaker";
|
|
4
5
|
// src/chat/speaker.tsx
|
|
5
|
-
function isSpeakerPart(part) {
|
|
6
|
-
const record = part;
|
|
7
|
-
return !!record && record.type === "speaker" && typeof record.id === "string" && typeof record.name === "string";
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Splits one assistant turn's parts by the agent that wrote them.
|
|
11
|
-
*
|
|
12
|
-
* A stored row holds a speaker part before each responder's answer, so a part
|
|
13
|
-
* belongs to the speaker part before it. A live stream announces every
|
|
14
|
-
* responder first and then interleaves their output, so a part names its owner
|
|
15
|
-
* in `speaker` (the responder's id), which wins over position. A later speaker
|
|
16
|
-
* part with an id already seen replaces that responder's speaker part, which is
|
|
17
|
-
* how its end state arrives, and never opens a second section.
|
|
18
|
-
*
|
|
19
|
-
* Sections keep the order speakers were first announced. Parts no speaker owns
|
|
20
|
-
* come first, in a section whose `speaker` is null; a turn without speaker
|
|
21
|
-
* parts is that one section. No part is dropped, copied or reordered within its
|
|
22
|
-
* section.
|
|
23
|
-
*/
|
|
24
|
-
function partitionBySpeaker(parts) {
|
|
25
|
-
const sections = /* @__PURE__ */ new Map();
|
|
26
|
-
const unowned = [];
|
|
27
|
-
let current;
|
|
28
|
-
for (const part of parts) {
|
|
29
|
-
if (isSpeakerPart(part)) {
|
|
30
|
-
current = sections.get(part.id);
|
|
31
|
-
if (current) current.speaker = part;
|
|
32
|
-
else sections.set(part.id, current = {
|
|
33
|
-
speaker: part,
|
|
34
|
-
parts: []
|
|
35
|
-
});
|
|
36
|
-
continue;
|
|
37
|
-
}
|
|
38
|
-
const tag = part.speaker;
|
|
39
|
-
((typeof tag === "string" ? sections.get(tag) : current)?.parts ?? unowned).push(part);
|
|
40
|
-
}
|
|
41
|
-
const owned = [...sections.values()];
|
|
42
|
-
return unowned.length > 0 || owned.length === 0 ? [{
|
|
43
|
-
speaker: null,
|
|
44
|
-
parts: unowned
|
|
45
|
-
}, ...owned] : owned;
|
|
46
|
-
}
|
|
47
6
|
/**
|
|
48
7
|
* The line above one responder's answer: the author line every participant
|
|
49
8
|
* gets, then the handle a person types to address the agent, then its state.
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import { RefObject } from "react";
|
|
2
|
-
/**
|
|
3
|
-
* Scroll-to-bottom behaviour: sticks to the bottom while streaming,
|
|
4
|
-
* pauses when user scrolls up, resumes when user scrolls back down.
|
|
5
|
-
*/
|
|
2
|
+
/** Existing chat contract, backed by the shared measured-content following lifecycle. */
|
|
6
3
|
export declare function useAutoScroll(containerRef: RefObject<HTMLElement | null>, deps?: unknown[]): {
|
|
7
4
|
isAtBottom: boolean;
|
|
8
5
|
scrollToBottom: () => void;
|
|
@@ -1,47 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useFollowTail } from "./use-follow-tail.js";
|
|
2
|
+
import { useCallback, useMemo } from "react";
|
|
2
3
|
// src/hooks/use-auto-scroll.ts
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Scroll-to-bottom behaviour: sticks to the bottom while streaming,
|
|
6
|
-
* pauses when user scrolls up, resumes when user scrolls back down.
|
|
7
|
-
*/
|
|
4
|
+
/** Existing chat contract, backed by the shared measured-content following lifecycle. */
|
|
8
5
|
function useAutoScroll(containerRef, deps = []) {
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const checkBottom = useCallback(() => {
|
|
12
|
-
const el = containerRef.current;
|
|
13
|
-
if (!el) return true;
|
|
14
|
-
return el.scrollHeight - el.scrollTop - el.clientHeight < BOTTOM_THRESHOLD;
|
|
15
|
-
}, [containerRef]);
|
|
16
|
-
useEffect(() => {
|
|
17
|
-
const el = containerRef.current;
|
|
18
|
-
if (!el) return;
|
|
19
|
-
const onScroll = () => {
|
|
20
|
-
const atBottom = checkBottom();
|
|
21
|
-
setIsAtBottom(atBottom);
|
|
22
|
-
userScrolledUp.current = !atBottom;
|
|
23
|
-
};
|
|
24
|
-
el.addEventListener("scroll", onScroll, { passive: true });
|
|
25
|
-
return () => el.removeEventListener("scroll", onScroll);
|
|
26
|
-
}, [containerRef, checkBottom]);
|
|
27
|
-
useEffect(() => {
|
|
28
|
-
if (userScrolledUp.current) return;
|
|
29
|
-
const el = containerRef.current;
|
|
30
|
-
if (!el) return;
|
|
31
|
-
el.scrollTop = el.scrollHeight;
|
|
32
|
-
}, deps);
|
|
6
|
+
const content = useMemo(() => ({}), deps);
|
|
7
|
+
const { atBottom, jump } = useFollowTail(containerRef, { content });
|
|
33
8
|
return {
|
|
34
|
-
isAtBottom,
|
|
35
|
-
scrollToBottom: useCallback(() =>
|
|
36
|
-
const el = containerRef.current;
|
|
37
|
-
if (!el) return;
|
|
38
|
-
userScrolledUp.current = false;
|
|
39
|
-
el.scrollTo({
|
|
40
|
-
top: el.scrollHeight,
|
|
41
|
-
behavior: "smooth"
|
|
42
|
-
});
|
|
43
|
-
setIsAtBottom(true);
|
|
44
|
-
}, [containerRef])
|
|
9
|
+
isAtBottom: atBottom,
|
|
10
|
+
scrollToBottom: useCallback(() => jump("smooth"), [jump])
|
|
45
11
|
};
|
|
46
12
|
}
|
|
47
13
|
export { useAutoScroll };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** Authenticated hosts own reconnects and session lifecycle; native streams use this lifecycle. */
|
|
2
|
+
export interface EventStreamSource {
|
|
3
|
+
addEventListener(type: string, listener: (event: MessageEvent<string>) => void): void;
|
|
4
|
+
close(): void;
|
|
5
|
+
}
|
|
6
|
+
export type EventStreamOpener = (url: string, onLiveChange?: (live: boolean) => void) => EventStreamSource;
|
|
7
|
+
export interface EventStreamHandlers {
|
|
8
|
+
events: Readonly<Record<string, (event: MessageEvent<string>) => void>>;
|
|
9
|
+
opener?: EventStreamOpener;
|
|
10
|
+
after?: () => number;
|
|
11
|
+
onStart?: () => void;
|
|
12
|
+
onLiveChange?: (live: boolean) => void;
|
|
13
|
+
}
|
|
14
|
+
/** Producer-owned named events; host transports keep their authenticated reconnect lifecycle. */
|
|
15
|
+
export declare function useEventStream(url: string | undefined, handlers: EventStreamHandlers): void;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useEffect, useRef } from "react";
|
|
3
|
+
// src/hooks/use-event-stream.ts
|
|
4
|
+
/** The sole native EventSource lifecycle, shared by buffered and producer-owned streams. */
|
|
5
|
+
function openNativeStream(url, handlers) {
|
|
6
|
+
let stopped = false, source, retry, attempt = 0;
|
|
7
|
+
handlers.onStart?.();
|
|
8
|
+
const open = () => {
|
|
9
|
+
handlers.onConnecting?.(attempt);
|
|
10
|
+
const target = new URL(typeof url === "function" ? url() : url, globalThis.location?.href), after = handlers.after?.();
|
|
11
|
+
if (after !== void 0 && after > 0) target.searchParams.set("after", String(after));
|
|
12
|
+
let connection;
|
|
13
|
+
const live = (value) => {
|
|
14
|
+
if (!stopped && (!connection || source === connection)) handlers.onLiveChange?.(value);
|
|
15
|
+
};
|
|
16
|
+
connection = handlers.opener ? handlers.opener(target.toString(), live) : new EventSource(target.toString());
|
|
17
|
+
source = connection;
|
|
18
|
+
for (const name of /* @__PURE__ */ new Set([...Object.keys(handlers.events), ...handlers.terminalEvent ? [handlers.terminalEvent] : []])) connection.addEventListener(name, (event) => {
|
|
19
|
+
if (stopped || source !== connection) return;
|
|
20
|
+
if (name === handlers.terminalEvent) {
|
|
21
|
+
stopped = true;
|
|
22
|
+
clearTimeout(retry);
|
|
23
|
+
connection.close();
|
|
24
|
+
}
|
|
25
|
+
handlers.events[name]?.(event);
|
|
26
|
+
});
|
|
27
|
+
if (!handlers.opener) {
|
|
28
|
+
const native = connection;
|
|
29
|
+
native.onopen = () => {
|
|
30
|
+
attempt = 0;
|
|
31
|
+
live(true);
|
|
32
|
+
};
|
|
33
|
+
native.onerror = () => {
|
|
34
|
+
connection.close();
|
|
35
|
+
if (stopped || source !== connection) return;
|
|
36
|
+
live(false);
|
|
37
|
+
const delay = handlers.retryDelay ? handlers.retryDelay(attempt++) : 1e3;
|
|
38
|
+
if (delay !== void 0) retry = setTimeout(open, delay);
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
open();
|
|
43
|
+
return { close: () => {
|
|
44
|
+
stopped = true;
|
|
45
|
+
clearTimeout(retry);
|
|
46
|
+
source?.close();
|
|
47
|
+
} };
|
|
48
|
+
}
|
|
49
|
+
/** Producer-owned named events; host transports keep their authenticated reconnect lifecycle. */
|
|
50
|
+
function useEventStream(url, handlers) {
|
|
51
|
+
const latest = useRef(handlers);
|
|
52
|
+
latest.current = handlers;
|
|
53
|
+
const names = Object.keys(handlers.events).sort().join(",");
|
|
54
|
+
useEffect(() => {
|
|
55
|
+
if (!url || !handlers.opener && typeof EventSource === "undefined") return;
|
|
56
|
+
const connection = openNativeStream(url, {
|
|
57
|
+
opener: handlers.opener,
|
|
58
|
+
events: Object.fromEntries(Object.keys(handlers.events).map((name) => [name, (event) => latest.current.events[name]?.(event)])),
|
|
59
|
+
after: () => latest.current.after?.() ?? 0,
|
|
60
|
+
onStart: () => latest.current.onStart?.(),
|
|
61
|
+
onLiveChange: (live) => latest.current.onLiveChange?.(live),
|
|
62
|
+
terminalEvent: "end"
|
|
63
|
+
});
|
|
64
|
+
return () => connection.close();
|
|
65
|
+
}, [
|
|
66
|
+
url,
|
|
67
|
+
handlers.opener,
|
|
68
|
+
names
|
|
69
|
+
]);
|
|
70
|
+
}
|
|
71
|
+
export { openNativeStream, useEventStream };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { RefObject } from "react";
|
|
2
|
+
/** Keeps the bottom through measured content growth, until the reader deliberately scrolls away. */
|
|
3
|
+
export declare function useFollowTail(scroller: RefObject<HTMLElement | null>, { identity, content, follow, target, thresholdPx }: {
|
|
4
|
+
identity?: unknown;
|
|
5
|
+
content?: unknown;
|
|
6
|
+
follow?: boolean;
|
|
7
|
+
target?: unknown;
|
|
8
|
+
thresholdPx?: number;
|
|
9
|
+
}): {
|
|
10
|
+
following: RefObject<boolean>;
|
|
11
|
+
unseen: boolean;
|
|
12
|
+
jump: (behavior?: ScrollBehavior) => void;
|
|
13
|
+
atBottom: boolean;
|
|
14
|
+
};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useCallback, useLayoutEffect, useRef, useState } from "react";
|
|
3
|
+
// src/hooks/use-follow-tail.ts
|
|
4
|
+
/** Keeps the bottom through measured content growth, until the reader deliberately scrolls away. */
|
|
5
|
+
function useFollowTail(scroller, { identity, content, follow = true, target, thresholdPx = 40 }) {
|
|
6
|
+
const following = useRef(false), latest = useRef({
|
|
7
|
+
follow,
|
|
8
|
+
target,
|
|
9
|
+
thresholdPx
|
|
10
|
+
});
|
|
11
|
+
latest.current = {
|
|
12
|
+
follow,
|
|
13
|
+
target,
|
|
14
|
+
thresholdPx
|
|
15
|
+
};
|
|
16
|
+
const [unseen, setUnseen] = useState(false), [atBottom, setAtBottom] = useState(true);
|
|
17
|
+
const jump = useCallback((behavior = "auto") => {
|
|
18
|
+
const node = scroller.current;
|
|
19
|
+
following.current = latest.current.follow;
|
|
20
|
+
setUnseen(false);
|
|
21
|
+
setAtBottom(true);
|
|
22
|
+
if (node) node.scrollTo({
|
|
23
|
+
top: node.scrollHeight,
|
|
24
|
+
behavior
|
|
25
|
+
});
|
|
26
|
+
}, [scroller]);
|
|
27
|
+
useLayoutEffect(() => {
|
|
28
|
+
following.current = latest.current.follow && !latest.current.target;
|
|
29
|
+
setUnseen(false);
|
|
30
|
+
if (scroller.current && !latest.current.target) scroller.current.scrollTop = following.current ? scroller.current.scrollHeight : 0;
|
|
31
|
+
}, [identity]);
|
|
32
|
+
useLayoutEffect(() => {
|
|
33
|
+
if (!follow) following.current = false;
|
|
34
|
+
}, [follow]);
|
|
35
|
+
useLayoutEffect(() => {
|
|
36
|
+
const node = scroller.current;
|
|
37
|
+
if (!node) return;
|
|
38
|
+
const track = () => {
|
|
39
|
+
const near = node.scrollHeight - node.scrollTop - node.clientHeight < latest.current.thresholdPx;
|
|
40
|
+
following.current = latest.current.follow && near;
|
|
41
|
+
setAtBottom(near);
|
|
42
|
+
if (near) setUnseen(false);
|
|
43
|
+
};
|
|
44
|
+
node.addEventListener("scroll", track, { passive: true });
|
|
45
|
+
const pin = () => {
|
|
46
|
+
if (following.current) node.scrollTop = node.scrollHeight;
|
|
47
|
+
};
|
|
48
|
+
if (!following.current) setUnseen(true);
|
|
49
|
+
pin();
|
|
50
|
+
const observer = new ResizeObserver(pin);
|
|
51
|
+
observer.observe(node);
|
|
52
|
+
for (const child of node.children) observer.observe(child);
|
|
53
|
+
return () => {
|
|
54
|
+
observer.disconnect();
|
|
55
|
+
node.removeEventListener("scroll", track);
|
|
56
|
+
};
|
|
57
|
+
}, [
|
|
58
|
+
content,
|
|
59
|
+
follow,
|
|
60
|
+
identity
|
|
61
|
+
]);
|
|
62
|
+
return {
|
|
63
|
+
following,
|
|
64
|
+
unseen,
|
|
65
|
+
jump,
|
|
66
|
+
atBottom
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
export { useFollowTail };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { openNativeStream } from "./use-event-stream.js";
|
|
2
3
|
import * as React from "react";
|
|
3
4
|
// src/hooks/use-sse-stream.ts
|
|
4
5
|
/**
|
|
@@ -151,43 +152,45 @@ function useSSEStream(options) {
|
|
|
151
152
|
}
|
|
152
153
|
});
|
|
153
154
|
} else {
|
|
154
|
-
const
|
|
155
|
-
|
|
156
|
-
es.onopen = () => {
|
|
157
|
-
setState("connected");
|
|
158
|
-
retryCountRef.current = 0;
|
|
159
|
-
};
|
|
160
|
-
es.onerror = () => {
|
|
161
|
-
const err = /* @__PURE__ */ new Error("EventSource connection error");
|
|
162
|
-
setError(err);
|
|
163
|
-
onError?.(err);
|
|
164
|
-
if (autoReconnect && enabled && retryCountRef.current < maxRetries) {
|
|
165
|
-
setState("reconnecting");
|
|
166
|
-
es.close();
|
|
167
|
-
const delay = reconnectDelay * 2 ** retryCountRef.current;
|
|
168
|
-
reconnectTimeoutRef.current = setTimeout(() => {
|
|
169
|
-
retryCountRef.current += 1;
|
|
170
|
-
connect();
|
|
171
|
-
}, Math.min(delay, 3e4));
|
|
172
|
-
} else setState("error");
|
|
173
|
-
};
|
|
174
|
-
const types = eventTypes || ["message"];
|
|
175
|
-
for (const type of types) es.addEventListener(type, (e) => {
|
|
155
|
+
const events = Object.fromEntries((eventTypes ?? ["message"]).map((type) => [type, (event) => {
|
|
156
|
+
let data;
|
|
176
157
|
try {
|
|
177
|
-
|
|
178
|
-
handleEvent(type, data, e.lastEventId);
|
|
158
|
+
data = JSON.parse(event.data);
|
|
179
159
|
} catch {
|
|
180
|
-
|
|
160
|
+
data = event.data;
|
|
181
161
|
}
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
162
|
+
handleEvent(type, data, event.lastEventId);
|
|
163
|
+
}]));
|
|
164
|
+
eventSourceRef.current = openNativeStream(() => {
|
|
165
|
+
const target = new URL(url, window.location.origin);
|
|
166
|
+
if (lastEventIdRef.current) target.searchParams.set("lastEventId", lastEventIdRef.current);
|
|
167
|
+
return target.toString();
|
|
168
|
+
}, {
|
|
169
|
+
events,
|
|
170
|
+
onConnecting: (attempt) => {
|
|
171
|
+
retryCountRef.current = attempt;
|
|
172
|
+
setState("connecting");
|
|
173
|
+
setError(null);
|
|
174
|
+
},
|
|
175
|
+
onLiveChange: (live) => {
|
|
176
|
+
if (live) {
|
|
177
|
+
setState("connected");
|
|
178
|
+
retryCountRef.current = 0;
|
|
179
|
+
return;
|
|
180
|
+
}
|
|
181
|
+
const error = /* @__PURE__ */ new Error("EventSource connection error");
|
|
182
|
+
setError(error);
|
|
183
|
+
onError?.(error);
|
|
184
|
+
},
|
|
185
|
+
retryDelay: (attempt) => {
|
|
186
|
+
if (!autoReconnect || !enabled || attempt >= maxRetries) {
|
|
187
|
+
setState("error");
|
|
188
|
+
return;
|
|
189
|
+
}
|
|
190
|
+
setState("reconnecting");
|
|
191
|
+
return Math.min(reconnectDelay * 2 ** attempt, 3e4);
|
|
189
192
|
}
|
|
190
|
-
};
|
|
193
|
+
});
|
|
191
194
|
}
|
|
192
195
|
}, [
|
|
193
196
|
url,
|
package/dist/hooks.d.ts
CHANGED
|
@@ -8,4 +8,6 @@ import { AuthUser, UseAuthOptions, UseAuthResult, createAuthFetcher, useApiKey,
|
|
|
8
8
|
import { AppendUserMessageOptions, ApplySdkEventOptions, BeginAssistantMessageOptions, CompleteAssistantMessageOptions, SdkSessionAttachment, SdkSessionEvent, SdkSessionSeed, UseSdkSessionOptions, UseSdkSessionReturn, useSdkSession } from "./hooks/use-sdk-session.js";
|
|
9
9
|
import { RealtimeSessionOptions, RealtimeSessionRegistry, RealtimeSessionRegistryProps, RealtimeSessionState, RealtimeSessionTarget, useRealtimeSession } from "./hooks/use-realtime-session.js";
|
|
10
10
|
import { AgentStreamEvent, AutomationStreamEvent, BotStreamEvent, ConnectionState, SSEEvent, TaskStreamEvent, TerminalStreamEvent, UseSSEStreamOptions, UseSSEStreamResult, useSSEStream } from "./hooks/use-sse-stream.js";
|
|
11
|
-
|
|
11
|
+
import { EventStreamHandlers, EventStreamOpener, EventStreamSource, useEventStream } from "./hooks/use-event-stream.js";
|
|
12
|
+
import { useFollowTail } from "./hooks/use-follow-tail.js";
|
|
13
|
+
export { AgentStreamEvent, AppendUserMessageOptions, ApplySdkEventOptions, AuthUser, AutomationStreamEvent, BeginAssistantMessageOptions, BotStreamEvent, CompleteAssistantMessageOptions, ConnectionState, type EventStreamHandlers, type EventStreamOpener, type EventStreamSource, RealtimeSessionOptions, RealtimeSessionRegistry, RealtimeSessionRegistryProps, RealtimeSessionState, RealtimeSessionTarget, SSEEvent, SdkSessionAttachment, SdkSessionEvent, SdkSessionSeed, TaskStreamEvent, TerminalStreamEvent, UseAuthOptions, UseAuthResult, UseRunGroupsOptions, UseSSEStreamOptions, UseSSEStreamResult, UseSdkSessionOptions, UseSdkSessionReturn, UseToolCallStreamReturn, createAuthFetcher, useApiKey, useAuth, useAutoScroll, useDropdownMenu, useEventStream, useFollowTail, useLiveTime, useRealtimeSession, useRunCollapseState, useRunGroups, useSSEStream, useSdkSession, useToolCallStream };
|
package/dist/hooks.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { useRunGroups } from "./hooks/use-run-groups.js";
|
|
2
2
|
import { useRunCollapseState } from "./hooks/use-run-collapse-state.js";
|
|
3
|
+
import { useFollowTail } from "./hooks/use-follow-tail.js";
|
|
3
4
|
import { useAutoScroll } from "./hooks/use-auto-scroll.js";
|
|
4
5
|
import { useDropdownMenu } from "./hooks/use-dropdown-menu.js";
|
|
5
6
|
import { useLiveTime } from "./hooks/use-live-time.js";
|
|
@@ -7,5 +8,6 @@ import { useToolCallStream } from "./hooks/use-tool-call-stream.js";
|
|
|
7
8
|
import { createAuthFetcher, useApiKey, useAuth } from "./hooks/use-auth.js";
|
|
8
9
|
import { RealtimeSessionRegistry, useRealtimeSession } from "./hooks/use-realtime-session.js";
|
|
9
10
|
import { useSdkSession } from "./hooks/use-sdk-session.js";
|
|
11
|
+
import { useEventStream } from "./hooks/use-event-stream.js";
|
|
10
12
|
import { useSSEStream } from "./hooks/use-sse-stream.js";
|
|
11
|
-
export { RealtimeSessionRegistry, createAuthFetcher, useApiKey, useAuth, useAutoScroll, useDropdownMenu, useLiveTime, useRealtimeSession, useRunCollapseState, useRunGroups, useSSEStream, useSdkSession, useToolCallStream };
|
|
13
|
+
export { RealtimeSessionRegistry, createAuthFetcher, useApiKey, useAuth, useAutoScroll, useDropdownMenu, useEventStream, useFollowTail, useLiveTime, useRealtimeSession, useRunCollapseState, useRunGroups, useSSEStream, useSdkSession, useToolCallStream };
|
package/dist/index.d.ts
CHANGED
|
@@ -49,6 +49,8 @@ import { AppendUserMessageOptions, ApplySdkEventOptions, BeginAssistantMessageOp
|
|
|
49
49
|
import { ActiveProjectActivity, ActiveSessionActivityOptions, ActiveSessionConnectionOptions, ActiveSessionConnectionState, ActiveSessionReconnectState, ActiveSessionRecord, ActiveSessionStatus, ActiveSessionTransportMode, ActiveSessionsState, RegisterActiveSessionOptions, SessionProjectKey, activeSessionsAtom, bumpActiveSessionActivity, getActiveSession, getAllActiveSessions, getAllProjectActivity, getSessionsByActivity, getSessionsForNavbar, getSessionsForProject, getTotalRunningSessionCount, hasBackgroundRunningSessions, registerActiveSession, resetActiveSessions, setActiveSessionAttention, setActiveSessionConnection, setActiveSessionError, setActiveSessionRunning, setForegroundActiveSession, unregisterActiveSession, updateActiveSessionMeta, useActiveSession, useActiveSessions, useActiveSessionsState, useHasBackgroundRunningSessions, useNavbarSessions, useProjectActivity, useProjectSessions, useSessionsByActivity, useTotalRunningSessions } from "./stores/active-sessions-store.js";
|
|
50
50
|
import { RealtimeSessionOptions, RealtimeSessionRegistry, RealtimeSessionRegistryProps, RealtimeSessionState, RealtimeSessionTarget, useRealtimeSession } from "./hooks/use-realtime-session.js";
|
|
51
51
|
import { AgentStreamEvent, AutomationStreamEvent, BotStreamEvent, ConnectionState, SSEEvent, TaskStreamEvent, TerminalStreamEvent, UseSSEStreamOptions, UseSSEStreamResult, useSSEStream } from "./hooks/use-sse-stream.js";
|
|
52
|
+
import { EventStreamHandlers, EventStreamOpener, EventStreamSource, useEventStream } from "./hooks/use-event-stream.js";
|
|
53
|
+
import { useFollowTail } from "./hooks/use-follow-tail.js";
|
|
52
54
|
import "./hooks.js";
|
|
53
55
|
import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CardTitleProps } from "./primitives/card.js";
|
|
54
56
|
import { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger } from "./primitives/dialog.js";
|
|
@@ -145,4 +147,4 @@ import { QuestionPreview, QuestionPreviewProps } from "./tool-previews/question-
|
|
|
145
147
|
import { DiffPreview, DiffPreviewProps } from "./tool-previews/diff-preview.js";
|
|
146
148
|
import { RedactedDocSegment, RedactedDocument, RedactedDocumentData, RedactedDocumentProps, RevealResult } from "./redaction/redacted-document.js";
|
|
147
149
|
import "./redaction.js";
|
|
148
|
-
export { ActiveProjectActivity, ActiveSessionActivityOptions, ActiveSessionConnectionOptions, ActiveSessionConnectionState, ActiveSessionReconnectState, ActiveSessionRecord, ActiveSessionStatus, ActiveSessionTransportMode, ActiveSessionsState, AgentBranding, AgentStreamEvent, AgentTimeline, type AgentTimelineArtifactItem, AgentTimelineColumn, type AgentTimelineCustomItem, type AgentTimelineFoldItem, type AgentTimelineItem, type AgentTimelineMessageItem, type AgentTimelineProps, type AgentTimelineStatusItem, AgentTimelineStep, type AgentTimelineStepKind, type AgentTimelineStepProps, type AgentTimelineTone, type AgentTimelineToolGroupItem, type AgentTimelineToolItem, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, type AlertProps, AlertTitle, type AlertTone, ApiSchema, type ApiSchemaProps, AppendUserMessageOptions, ApplySdkEventOptions, ApprovalCard, type ApprovalCardProps, type ApprovalDiffFile, ApprovalDiffSummary, type ApprovalPlanStep, ArtifactPane, type ArtifactPaneProps, AuthHeader, type AuthHeaderProps, AuthUser, AutomationStreamEvent, Avatar, AvatarFallback, AvatarImage, type AvatarProps, Badge, type BadgeProps, BeginAssistantMessageOptions, BotStreamEvent, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, type ButtonProps, CATEGORY_TONES, CSV_PREVIEW_ROW_LIMIT, Calendar, type CalendarDate, type CalendarProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, type CardTitleProps, type CategoryTone, type ChartReferenceLine, ChatAuthor, ChatContainer, type ChatContainerProps, ChatMessage, type ChatMessageProps, Checkbox, Chip, type ChipProps, CodeBlock, type CodeBlockProps, Collapsible, CollapsibleContent, CollapsibleTrigger, CommandPreview, type CommandPreviewProps, CompleteAssistantMessageOptions, ComplianceBadge, type ComplianceBadgeProps, type ComplianceProduct, type ComplianceStatus, ConnectionState, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, CopyButton, type CopyButtonProps, CustomToolRenderer, DatePicker, type DatePickerProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DiffPreview, type DiffPreviewProps, DisplayVariant, DropZone, type DropZoneProps, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, type EmptyStateProps, ExpandedToolDetail, type ExpandedToolDetailProps, type FeedSegment, Field, type FieldProps, FileArtifactPane, type FileArtifactPaneProps, FileCard, type FileCardProps, type FileDetails, type FileFormat, FileList, type FileListItem, type FileListProps, type FileNode, FilePreview, type FilePreviewKind, type FilePreviewProps, type FileTabData, FileTabs, type FileTabsProps, FileTree, type FileTreeProps, type FileTreeVisibilityOptions, type FileUploader, FilterField, type FilterFieldProps, FinalTextPart, GitHubLoginButton, type GitHubLoginButtonProps, GlobResultsPreview, type GlobResultsPreviewProps, GrepResultsPreview, type GrepResultsPreviewProps, GroupedMessage, Heading, type HeadingProps, type HeadingVariant, HelpText, type HelpTextProps, HoverCard, HoverCardContent, HoverCardDescription, HoverCardHeader, HoverCardTitle, HoverCardTrigger, IconTile, type IconTileProps, InlineCode, type InlineCodeProps, InlineThinkingItem, type InlineThinkingItemProps, InlineToolItem, type InlineToolItemProps, Input, type InputProps, Label, LiveDuration, LoginLayout, type LoginLayoutProps, Logo, type LogoProps, Markdown, type MarkdownLinkChip, type MarkdownLinkChipResolver, type MarkdownProps, MessageAuthor, type MessageAuthorProps, MessageList, type MessageListProps, type MessageRole, MessageRun, MessageUser, Metric, MetricChart, type MetricChartProps, type MetricProps, MetricStrip, type MetricStripProps, OPENUI_NODE_JSON_SCHEMA, OPENUI_NODE_TYPES, type OpenUIAction, type OpenUIActionsNode, OpenUIArtifactRenderer, type OpenUIArtifactRendererProps, type OpenUIBadgeNode, type OpenUICardNode, type OpenUICodeNode, type OpenUIComponentNode, type OpenUIGridNode, type OpenUIHeadingNode, type OpenUIKeyValueNode, type OpenUIMarkdownNode, type OpenUIPrimitive, type OpenUISchemaIssue, type OpenUISchemaValidation, type OpenUISeparatorNode, type OpenUIStackNode, type OpenUIStatNode, type OpenUITableNode, type OpenUITextNode, PageHeader, type PageHeaderProps, PageShell, type PageShellProps, Pagination, type PaginationProps, PdfViewer, type PdfViewerConfig, type PdfViewerProps, type PeriodDelta, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger, Progress, QuestionPreview, type QuestionPreviewProps, RadioGroup, RadioGroupItem, RealtimeSessionOptions, RealtimeSessionRegistry, RealtimeSessionRegistryProps, RealtimeSessionState, RealtimeSessionTarget, ReasoningPart, type RedactedDocSegment, RedactedDocument, type RedactedDocumentData, type RedactedDocumentProps, RegisterActiveSessionOptions, type RevealResult, RichFileTree, type RichFileTreeGitEntry, type RichFileTreeGitStatus, type RichFileTreeProps, type RichFileTreeThemeVars, Run, RunGroup, type RunGroupProps, type RunPhase, RunPhaseList, RunRowShell, type RunRowShellProps, type RunRowStatus, RunRowStatusDot, RunStats, type RunStatus, RunStatusIcon, type RunStatusIconProps, SSEEvent, SdkSessionAttachment, SdkSessionEvent, SdkSessionSeed, SegmentedControl, type SegmentedControlOption, type SegmentedControlProps, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, type SeriesExtent, type SeriesPoint, type SeriesPointInput, type SeriesScale, SeriesSparkline, type SeriesSparklineProps, SessionMessage, SessionPart, SessionProjectKey, type SessionUser, SettingsList, type SettingsListAction, type SettingsListColumns, SettingsListItem, type SettingsListItemProps, type SettingsListMenuItem, type SettingsListProps, SettingsNote, type SettingsNoteProps, SettingsRow, type SettingsRowLayout, type SettingsRowProps, SettingsSection, type SettingsSectionProps, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, SidebarDropZone, type SidebarDropZoneProps, Skeleton, SkeletonCard, SkeletonTable, Slider, type Speaker, SpeakerHeader, type SpeakerHeaderProps, type SpeakerPart, type SpeakerSection, type SpeakerState, StatCard, type StatCardProps, type StatusMeta, StatusPill, type StatusPillProps, type StatusTone, Switch, TONE_CLASSES, TOOL_CATEGORY_ICONS, TRANSCRIPT_TEXT, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, type TableProps, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Tag, type TagProps, TangleKnot, TaskList, type TaskListItem, type TaskListProps, type TaskStatus, TaskStreamEvent, TerminalCursor, TerminalDisplay, TerminalInput, TerminalLine, TerminalStreamEvent, TextPart, TextShimmer, type TextShimmerProps, Textarea, type TextareaProps, ThemeToggle, ThinkingIndicator, type ThinkingIndicatorProps, TimeSelect, type TimeSelectProps, type Toast, ToastContainer, ToastProvider, type Tone, type ToneClasses, type ToolCallData, ToolCallFeed, type ToolCallFeedProps, type ToolCallStatus, type ToolCallType, ToolCategory, ToolDisplayMetadata, ToolPart, ToolState, ToolStatus, ToolTime, Toolbar, type ToolbarProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type UploadFile, UploadProgress, type UploadProgressProps, UseAuthOptions, UseAuthResult, UseRunGroupsOptions, UseSSEStreamOptions, UseSSEStreamResult, UseSdkSessionOptions, UseSdkSessionReturn, UseToolCallStreamReturn, UserMenu, type UserMenuProps, UserMessage, type UserMessageProps, WebSearchPreview, type WebSearchPreviewProps, Wizard, type WizardProps, WizardStep, type WizardStepProps, WriteFilePreview, type WriteFilePreviewProps, activeSessionsAtom, addMessage, addParts, agentTimelineStepKind, badgeVariants, bumpActiveSessionActivity, buttonVariants, clearChat, cn, codeBlockGrammar, configurePdfViewer, copyText, createAuthFetcher, detectFileFormat, fenceInfo, fieldMessageId, fileExtension, filterFileTree, findUnsupportedOpenUINode, focusField, focusFieldInvalid, focusFieldWithin, focusRing, focusRingInset, foldSummary, formatBytes, formatCalendarDate, formatDuration, formatUptime, getActiveSession, getAllActiveSessions, getAllProjectActivity, getCodeLanguage, getFormatLabel, getSanitizedMarkdownHeadingIdFromRawFragment, getSessionsByActivity, getSessionsForNavbar, getSessionsForProject, getSyntaxLanguage, getToolCategory, getToolDisplayMetadata, getToolErrorText, getTotalRunningSessionCount, hasBackgroundRunningSessions, initialsOf, isStreamingAtom, isViewerMessage, ixControl, ixControlAfter, ixControlSoft, ixField, ixRow, ixSelected, ixTabUnderline, localToday, messagesAtom, normalizeSeries, numericColumns, parseCalendarDate, parseCsv, parseToolEvent, partMapAtom, partitionBySpeaker, periodDelta, plainTextFromMarkdown, registerActiveSession, resetActiveSessions, resolveFilePreviewKind, runStatus, seriesAreaPath, seriesExtent, seriesLinePath, seriesMean, seriesScale, setActiveSessionAttention, setActiveSessionConnection, setActiveSessionError, setActiveSessionRunning, setForegroundActiveSession, showsTaskPriority, statusMeta, tableCsv, taskProgress, taskStatus, timeAgo, toneFor, truncateText, unregisterActiveSession, updateActiveSessionMeta, updatePart, useActiveSession, useActiveSessions, useActiveSessionsState, useApiKey, useAuth, useAutoScroll, useDropdownMenu, useHasBackgroundRunningSessions, useLiveTime, useNavbarSessions, useProjectActivity, useProjectSessions, useRealtimeSession, useRunCollapseState, useRunGroups, useSSEStream, useSdkSession, useSessionsByActivity, useTheme, useToast, useToolCallStream, useTotalRunningSessions, validateOpenUIJsonArtifact, validateOpenUIJsonNode };
|
|
150
|
+
export { ActiveProjectActivity, ActiveSessionActivityOptions, ActiveSessionConnectionOptions, ActiveSessionConnectionState, ActiveSessionReconnectState, ActiveSessionRecord, ActiveSessionStatus, ActiveSessionTransportMode, ActiveSessionsState, AgentBranding, AgentStreamEvent, AgentTimeline, type AgentTimelineArtifactItem, AgentTimelineColumn, type AgentTimelineCustomItem, type AgentTimelineFoldItem, type AgentTimelineItem, type AgentTimelineMessageItem, type AgentTimelineProps, type AgentTimelineStatusItem, AgentTimelineStep, type AgentTimelineStepKind, type AgentTimelineStepProps, type AgentTimelineTone, type AgentTimelineToolGroupItem, type AgentTimelineToolItem, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, type AlertProps, AlertTitle, type AlertTone, ApiSchema, type ApiSchemaProps, AppendUserMessageOptions, ApplySdkEventOptions, ApprovalCard, type ApprovalCardProps, type ApprovalDiffFile, ApprovalDiffSummary, type ApprovalPlanStep, ArtifactPane, type ArtifactPaneProps, AuthHeader, type AuthHeaderProps, AuthUser, AutomationStreamEvent, Avatar, AvatarFallback, AvatarImage, type AvatarProps, Badge, type BadgeProps, BeginAssistantMessageOptions, BotStreamEvent, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, type ButtonProps, CATEGORY_TONES, CSV_PREVIEW_ROW_LIMIT, Calendar, type CalendarDate, type CalendarProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, type CardTitleProps, type CategoryTone, type ChartReferenceLine, ChatAuthor, ChatContainer, type ChatContainerProps, ChatMessage, type ChatMessageProps, Checkbox, Chip, type ChipProps, CodeBlock, type CodeBlockProps, Collapsible, CollapsibleContent, CollapsibleTrigger, CommandPreview, type CommandPreviewProps, CompleteAssistantMessageOptions, ComplianceBadge, type ComplianceBadgeProps, type ComplianceProduct, type ComplianceStatus, ConnectionState, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, CopyButton, type CopyButtonProps, CustomToolRenderer, DatePicker, type DatePickerProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DiffPreview, type DiffPreviewProps, DisplayVariant, DropZone, type DropZoneProps, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, type EmptyStateProps, type EventStreamHandlers, type EventStreamOpener, type EventStreamSource, ExpandedToolDetail, type ExpandedToolDetailProps, type FeedSegment, Field, type FieldProps, FileArtifactPane, type FileArtifactPaneProps, FileCard, type FileCardProps, type FileDetails, type FileFormat, FileList, type FileListItem, type FileListProps, type FileNode, FilePreview, type FilePreviewKind, type FilePreviewProps, type FileTabData, FileTabs, type FileTabsProps, FileTree, type FileTreeProps, type FileTreeVisibilityOptions, type FileUploader, FilterField, type FilterFieldProps, FinalTextPart, GitHubLoginButton, type GitHubLoginButtonProps, GlobResultsPreview, type GlobResultsPreviewProps, GrepResultsPreview, type GrepResultsPreviewProps, GroupedMessage, Heading, type HeadingProps, type HeadingVariant, HelpText, type HelpTextProps, HoverCard, HoverCardContent, HoverCardDescription, HoverCardHeader, HoverCardTitle, HoverCardTrigger, IconTile, type IconTileProps, InlineCode, type InlineCodeProps, InlineThinkingItem, type InlineThinkingItemProps, InlineToolItem, type InlineToolItemProps, Input, type InputProps, Label, LiveDuration, LoginLayout, type LoginLayoutProps, Logo, type LogoProps, Markdown, type MarkdownLinkChip, type MarkdownLinkChipResolver, type MarkdownProps, MessageAuthor, type MessageAuthorProps, MessageList, type MessageListProps, type MessageRole, MessageRun, MessageUser, Metric, MetricChart, type MetricChartProps, type MetricProps, MetricStrip, type MetricStripProps, OPENUI_NODE_JSON_SCHEMA, OPENUI_NODE_TYPES, type OpenUIAction, type OpenUIActionsNode, OpenUIArtifactRenderer, type OpenUIArtifactRendererProps, type OpenUIBadgeNode, type OpenUICardNode, type OpenUICodeNode, type OpenUIComponentNode, type OpenUIGridNode, type OpenUIHeadingNode, type OpenUIKeyValueNode, type OpenUIMarkdownNode, type OpenUIPrimitive, type OpenUISchemaIssue, type OpenUISchemaValidation, type OpenUISeparatorNode, type OpenUIStackNode, type OpenUIStatNode, type OpenUITableNode, type OpenUITextNode, PageHeader, type PageHeaderProps, PageShell, type PageShellProps, Pagination, type PaginationProps, PdfViewer, type PdfViewerConfig, type PdfViewerProps, type PeriodDelta, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger, Progress, QuestionPreview, type QuestionPreviewProps, RadioGroup, RadioGroupItem, RealtimeSessionOptions, RealtimeSessionRegistry, RealtimeSessionRegistryProps, RealtimeSessionState, RealtimeSessionTarget, ReasoningPart, type RedactedDocSegment, RedactedDocument, type RedactedDocumentData, type RedactedDocumentProps, RegisterActiveSessionOptions, type RevealResult, RichFileTree, type RichFileTreeGitEntry, type RichFileTreeGitStatus, type RichFileTreeProps, type RichFileTreeThemeVars, Run, RunGroup, type RunGroupProps, type RunPhase, RunPhaseList, RunRowShell, type RunRowShellProps, type RunRowStatus, RunRowStatusDot, RunStats, type RunStatus, RunStatusIcon, type RunStatusIconProps, SSEEvent, SdkSessionAttachment, SdkSessionEvent, SdkSessionSeed, SegmentedControl, type SegmentedControlOption, type SegmentedControlProps, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, type SeriesExtent, type SeriesPoint, type SeriesPointInput, type SeriesScale, SeriesSparkline, type SeriesSparklineProps, SessionMessage, SessionPart, SessionProjectKey, type SessionUser, SettingsList, type SettingsListAction, type SettingsListColumns, SettingsListItem, type SettingsListItemProps, type SettingsListMenuItem, type SettingsListProps, SettingsNote, type SettingsNoteProps, SettingsRow, type SettingsRowLayout, type SettingsRowProps, SettingsSection, type SettingsSectionProps, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, SidebarDropZone, type SidebarDropZoneProps, Skeleton, SkeletonCard, SkeletonTable, Slider, type Speaker, SpeakerHeader, type SpeakerHeaderProps, type SpeakerPart, type SpeakerSection, type SpeakerState, StatCard, type StatCardProps, type StatusMeta, StatusPill, type StatusPillProps, type StatusTone, Switch, TONE_CLASSES, TOOL_CATEGORY_ICONS, TRANSCRIPT_TEXT, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, type TableProps, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Tag, type TagProps, TangleKnot, TaskList, type TaskListItem, type TaskListProps, type TaskStatus, TaskStreamEvent, TerminalCursor, TerminalDisplay, TerminalInput, TerminalLine, TerminalStreamEvent, TextPart, TextShimmer, type TextShimmerProps, Textarea, type TextareaProps, ThemeToggle, ThinkingIndicator, type ThinkingIndicatorProps, TimeSelect, type TimeSelectProps, type Toast, ToastContainer, ToastProvider, type Tone, type ToneClasses, type ToolCallData, ToolCallFeed, type ToolCallFeedProps, type ToolCallStatus, type ToolCallType, ToolCategory, ToolDisplayMetadata, ToolPart, ToolState, ToolStatus, ToolTime, Toolbar, type ToolbarProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type UploadFile, UploadProgress, type UploadProgressProps, UseAuthOptions, UseAuthResult, UseRunGroupsOptions, UseSSEStreamOptions, UseSSEStreamResult, UseSdkSessionOptions, UseSdkSessionReturn, UseToolCallStreamReturn, UserMenu, type UserMenuProps, UserMessage, type UserMessageProps, WebSearchPreview, type WebSearchPreviewProps, Wizard, type WizardProps, WizardStep, type WizardStepProps, WriteFilePreview, type WriteFilePreviewProps, activeSessionsAtom, addMessage, addParts, agentTimelineStepKind, badgeVariants, bumpActiveSessionActivity, buttonVariants, clearChat, cn, codeBlockGrammar, configurePdfViewer, copyText, createAuthFetcher, detectFileFormat, fenceInfo, fieldMessageId, fileExtension, filterFileTree, findUnsupportedOpenUINode, focusField, focusFieldInvalid, focusFieldWithin, focusRing, focusRingInset, foldSummary, formatBytes, formatCalendarDate, formatDuration, formatUptime, getActiveSession, getAllActiveSessions, getAllProjectActivity, getCodeLanguage, getFormatLabel, getSanitizedMarkdownHeadingIdFromRawFragment, getSessionsByActivity, getSessionsForNavbar, getSessionsForProject, getSyntaxLanguage, getToolCategory, getToolDisplayMetadata, getToolErrorText, getTotalRunningSessionCount, hasBackgroundRunningSessions, initialsOf, isStreamingAtom, isViewerMessage, ixControl, ixControlAfter, ixControlSoft, ixField, ixRow, ixSelected, ixTabUnderline, localToday, messagesAtom, normalizeSeries, numericColumns, parseCalendarDate, parseCsv, parseToolEvent, partMapAtom, partitionBySpeaker, periodDelta, plainTextFromMarkdown, registerActiveSession, resetActiveSessions, resolveFilePreviewKind, runStatus, seriesAreaPath, seriesExtent, seriesLinePath, seriesMean, seriesScale, setActiveSessionAttention, setActiveSessionConnection, setActiveSessionError, setActiveSessionRunning, setForegroundActiveSession, showsTaskPriority, statusMeta, tableCsv, taskProgress, taskStatus, timeAgo, toneFor, truncateText, unregisterActiveSession, updateActiveSessionMeta, updatePart, useActiveSession, useActiveSessions, useActiveSessionsState, useApiKey, useAuth, useAutoScroll, useDropdownMenu, useEventStream, useFollowTail, useHasBackgroundRunningSessions, useLiveTime, useNavbarSessions, useProjectActivity, useProjectSessions, useRealtimeSession, useRunCollapseState, useRunGroups, useSSEStream, useSdkSession, useSessionsByActivity, useTheme, useToast, useToolCallStream, useTotalRunningSessions, validateOpenUIJsonArtifact, validateOpenUIJsonNode };
|
package/dist/index.js
CHANGED
|
@@ -69,6 +69,7 @@ import { Logo, TangleKnot } from "./primitives.js";
|
|
|
69
69
|
import { TOOL_CATEGORY_ICONS, getToolCategory, getToolDisplayMetadata, getToolErrorText } from "./utils/tool-display.js";
|
|
70
70
|
import { useRunGroups } from "./hooks/use-run-groups.js";
|
|
71
71
|
import { useRunCollapseState } from "./hooks/use-run-collapse-state.js";
|
|
72
|
+
import { useFollowTail } from "./hooks/use-follow-tail.js";
|
|
72
73
|
import { useAutoScroll } from "./hooks/use-auto-scroll.js";
|
|
73
74
|
import { formatBytes, formatDuration, formatUptime, plainTextFromMarkdown, truncateText } from "./utils/format.js";
|
|
74
75
|
import { CommandPreview } from "./tool-previews/command-preview.js";
|
|
@@ -124,9 +125,10 @@ import { createAuthFetcher, useApiKey, useAuth } from "./hooks/use-auth.js";
|
|
|
124
125
|
import { activeSessionsAtom, bumpActiveSessionActivity, getActiveSession, getAllActiveSessions, getAllProjectActivity, getSessionsByActivity, getSessionsForNavbar, getSessionsForProject, getTotalRunningSessionCount, hasBackgroundRunningSessions, registerActiveSession, resetActiveSessions, setActiveSessionAttention, setActiveSessionConnection, setActiveSessionError, setActiveSessionRunning, setForegroundActiveSession, unregisterActiveSession, updateActiveSessionMeta, useActiveSession, useActiveSessions, useActiveSessionsState, useHasBackgroundRunningSessions, useNavbarSessions, useProjectActivity, useProjectSessions, useSessionsByActivity, useTotalRunningSessions } from "./stores/active-sessions-store.js";
|
|
125
126
|
import { RealtimeSessionRegistry, useRealtimeSession } from "./hooks/use-realtime-session.js";
|
|
126
127
|
import { useSdkSession } from "./hooks/use-sdk-session.js";
|
|
128
|
+
import { useEventStream } from "./hooks/use-event-stream.js";
|
|
127
129
|
import { useSSEStream } from "./hooks/use-sse-stream.js";
|
|
128
130
|
import { addMessage, addParts, clearChat, isStreamingAtom, messagesAtom, partMapAtom, updatePart } from "./stores/chat-store.js";
|
|
129
131
|
import { copyText } from "./utils/copy-text.js";
|
|
130
132
|
import { timeAgo } from "./utils/time-ago.js";
|
|
131
133
|
import { RedactedDocument } from "./redaction/redacted-document.js";
|
|
132
|
-
export { AgentTimeline, AgentTimelineColumn, AgentTimelineStep, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, ApiSchema, ApprovalCard, ApprovalDiffSummary, ArtifactPane, AuthHeader, Avatar, AvatarFallback, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, CATEGORY_TONES, CSV_PREVIEW_ROW_LIMIT, Calendar, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, ChatContainer, ChatMessage, Checkbox, Chip, CodeBlock, Collapsible, CollapsibleContent, CollapsibleTrigger, CommandPreview, ComplianceBadge, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, CopyButton, DatePicker, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DiffPreview, DropZone, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, ExpandedToolDetail, Field, FileArtifactPane, FileCard, FileList, FilePreview, FileTabs, FileTree, FilterField, GitHubLoginButton, GlobResultsPreview, GrepResultsPreview, Heading, HelpText, HoverCard, HoverCardContent, HoverCardDescription, HoverCardHeader, HoverCardTitle, HoverCardTrigger, IconTile, InlineCode, InlineThinkingItem, InlineToolItem, Input, Label, LiveDuration, LoginLayout, Logo, Markdown, MessageAuthor, MessageList, Metric, MetricChart, MetricStrip, OPENUI_NODE_JSON_SCHEMA, OPENUI_NODE_TYPES, OpenUIArtifactRenderer, PageHeader, PageShell, Pagination, PdfViewer, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger, Progress, QuestionPreview, RadioGroup, RadioGroupItem, RealtimeSessionRegistry, RedactedDocument, RichFileTree, RunGroup, RunPhaseList, RunRowShell, RunRowStatusDot, RunStatusIcon, SegmentedControl, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, SeriesSparkline, SettingsList, SettingsListItem, SettingsNote, SettingsRow, SettingsSection, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, SidebarDropZone, Skeleton, SkeletonCard, SkeletonTable, Slider, SpeakerHeader, StatCard, StatusPill, Switch, TONE_CLASSES, TOOL_CATEGORY_ICONS, TRANSCRIPT_TEXT, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Tag, TangleKnot, TaskList, TerminalCursor, TerminalDisplay, TerminalInput, TerminalLine, TextShimmer, Textarea, ThemeToggle, ThinkingIndicator, TimeSelect, ToastContainer, ToastProvider, ToolCallFeed, Toolbar, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, UploadProgress, UserMenu, UserMessage, WebSearchPreview, Wizard, WizardStep, WriteFilePreview, activeSessionsAtom, addMessage, addParts, agentTimelineStepKind, badgeVariants, bumpActiveSessionActivity, buttonVariants, clearChat, cn, codeBlockGrammar, configurePdfViewer, copyText, createAuthFetcher, detectFileFormat, fenceInfo, fieldMessageId, fileExtension, filterFileTree, findUnsupportedOpenUINode, focusField, focusFieldInvalid, focusFieldWithin, focusRing, focusRingInset, foldSummary, formatBytes, formatCalendarDate, formatDuration, formatUptime, getActiveSession, getAllActiveSessions, getAllProjectActivity, getCodeLanguage, getFormatLabel, getSanitizedMarkdownHeadingIdFromRawFragment, getSessionsByActivity, getSessionsForNavbar, getSessionsForProject, getSyntaxLanguage, getToolCategory, getToolDisplayMetadata, getToolErrorText, getTotalRunningSessionCount, hasBackgroundRunningSessions, initialsOf, isStreamingAtom, isViewerMessage, ixControl, ixControlAfter, ixControlSoft, ixField, ixRow, ixSelected, ixTabUnderline, localToday, messagesAtom, normalizeSeries, numericColumns, parseCalendarDate, parseCsv, parseToolEvent, partMapAtom, partitionBySpeaker, periodDelta, plainTextFromMarkdown, registerActiveSession, resetActiveSessions, resolveFilePreviewKind, runStatus, seriesAreaPath, seriesExtent, seriesLinePath, seriesMean, seriesScale, setActiveSessionAttention, setActiveSessionConnection, setActiveSessionError, setActiveSessionRunning, setForegroundActiveSession, showsTaskPriority, statusMeta, tableCsv, taskProgress, taskStatus, timeAgo, toneFor, truncateText, unregisterActiveSession, updateActiveSessionMeta, updatePart, useActiveSession, useActiveSessions, useActiveSessionsState, useApiKey, useAuth, useAutoScroll, useDropdownMenu, useHasBackgroundRunningSessions, useLiveTime, useNavbarSessions, useProjectActivity, useProjectSessions, useRealtimeSession, useRunCollapseState, useRunGroups, useSSEStream, useSdkSession, useSessionsByActivity, useTheme, useToast, useToolCallStream, useTotalRunningSessions, validateOpenUIJsonArtifact, validateOpenUIJsonNode };
|
|
134
|
+
export { AgentTimeline, AgentTimelineColumn, AgentTimelineStep, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, ApiSchema, ApprovalCard, ApprovalDiffSummary, ArtifactPane, AuthHeader, Avatar, AvatarFallback, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, CATEGORY_TONES, CSV_PREVIEW_ROW_LIMIT, Calendar, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, ChatContainer, ChatMessage, Checkbox, Chip, CodeBlock, Collapsible, CollapsibleContent, CollapsibleTrigger, CommandPreview, ComplianceBadge, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, CopyButton, DatePicker, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DiffPreview, DropZone, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, ExpandedToolDetail, Field, FileArtifactPane, FileCard, FileList, FilePreview, FileTabs, FileTree, FilterField, GitHubLoginButton, GlobResultsPreview, GrepResultsPreview, Heading, HelpText, HoverCard, HoverCardContent, HoverCardDescription, HoverCardHeader, HoverCardTitle, HoverCardTrigger, IconTile, InlineCode, InlineThinkingItem, InlineToolItem, Input, Label, LiveDuration, LoginLayout, Logo, Markdown, MessageAuthor, MessageList, Metric, MetricChart, MetricStrip, OPENUI_NODE_JSON_SCHEMA, OPENUI_NODE_TYPES, OpenUIArtifactRenderer, PageHeader, PageShell, Pagination, PdfViewer, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger, Progress, QuestionPreview, RadioGroup, RadioGroupItem, RealtimeSessionRegistry, RedactedDocument, RichFileTree, RunGroup, RunPhaseList, RunRowShell, RunRowStatusDot, RunStatusIcon, SegmentedControl, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, SeriesSparkline, SettingsList, SettingsListItem, SettingsNote, SettingsRow, SettingsSection, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, SidebarDropZone, Skeleton, SkeletonCard, SkeletonTable, Slider, SpeakerHeader, StatCard, StatusPill, Switch, TONE_CLASSES, TOOL_CATEGORY_ICONS, TRANSCRIPT_TEXT, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Tag, TangleKnot, TaskList, TerminalCursor, TerminalDisplay, TerminalInput, TerminalLine, TextShimmer, Textarea, ThemeToggle, ThinkingIndicator, TimeSelect, ToastContainer, ToastProvider, ToolCallFeed, Toolbar, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, UploadProgress, UserMenu, UserMessage, WebSearchPreview, Wizard, WizardStep, WriteFilePreview, activeSessionsAtom, addMessage, addParts, agentTimelineStepKind, badgeVariants, bumpActiveSessionActivity, buttonVariants, clearChat, cn, codeBlockGrammar, configurePdfViewer, copyText, createAuthFetcher, detectFileFormat, fenceInfo, fieldMessageId, fileExtension, filterFileTree, findUnsupportedOpenUINode, focusField, focusFieldInvalid, focusFieldWithin, focusRing, focusRingInset, foldSummary, formatBytes, formatCalendarDate, formatDuration, formatUptime, getActiveSession, getAllActiveSessions, getAllProjectActivity, getCodeLanguage, getFormatLabel, getSanitizedMarkdownHeadingIdFromRawFragment, getSessionsByActivity, getSessionsForNavbar, getSessionsForProject, getSyntaxLanguage, getToolCategory, getToolDisplayMetadata, getToolErrorText, getTotalRunningSessionCount, hasBackgroundRunningSessions, initialsOf, isStreamingAtom, isViewerMessage, ixControl, ixControlAfter, ixControlSoft, ixField, ixRow, ixSelected, ixTabUnderline, localToday, messagesAtom, normalizeSeries, numericColumns, parseCalendarDate, parseCsv, parseToolEvent, partMapAtom, partitionBySpeaker, periodDelta, plainTextFromMarkdown, registerActiveSession, resetActiveSessions, resolveFilePreviewKind, runStatus, seriesAreaPath, seriesExtent, seriesLinePath, seriesMean, seriesScale, setActiveSessionAttention, setActiveSessionConnection, setActiveSessionError, setActiveSessionRunning, setForegroundActiveSession, showsTaskPriority, statusMeta, tableCsv, taskProgress, taskStatus, timeAgo, toneFor, truncateText, unregisterActiveSession, updateActiveSessionMeta, updatePart, useActiveSession, useActiveSessions, useActiveSessionsState, useApiKey, useAuth, useAutoScroll, useDropdownMenu, useEventStream, useFollowTail, useHasBackgroundRunningSessions, useLiveTime, useNavbarSessions, useProjectActivity, useProjectSessions, useRealtimeSession, useRunCollapseState, useRunGroups, useSSEStream, useSdkSession, useSessionsByActivity, useTheme, useToast, useToolCallStream, useTotalRunningSessions, validateOpenUIJsonArtifact, validateOpenUIJsonNode };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tangle-network/ui",
|
|
3
|
-
"version": "11.51.
|
|
3
|
+
"version": "11.51.3",
|
|
4
4
|
"description": "Generic React UI components for Tangle products — primitives, chat, run, files, editor, markdown.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -149,6 +149,7 @@
|
|
|
149
149
|
"@radix-ui/react-switch": "^1.4.1",
|
|
150
150
|
"@radix-ui/react-tabs": "^1.2.1",
|
|
151
151
|
"@radix-ui/react-tooltip": "^1.4.1",
|
|
152
|
+
"@tangle-network/agent-interface": "^5.10.3",
|
|
152
153
|
"class-variance-authority": "^0.7.1",
|
|
153
154
|
"clsx": "^2.1.1",
|
|
154
155
|
"github-slugger": "^2.0.0",
|
|
@@ -166,7 +167,7 @@
|
|
|
166
167
|
"peerDependencies": {
|
|
167
168
|
"@hocuspocus/provider": ">=2.15.0 <5.0.0",
|
|
168
169
|
"@nanostores/react": ">=0.8.4 <3.0.0",
|
|
169
|
-
"@tangle-network/brand": "^1.31.
|
|
170
|
+
"@tangle-network/brand": "^1.31.2",
|
|
170
171
|
"@tiptap/core": ">=3.20.4 <4.0.0",
|
|
171
172
|
"@tiptap/extension-collaboration": ">=3.20.4 <4.0.0",
|
|
172
173
|
"@tiptap/extension-collaboration-caret": ">=3.7.0 <4.0.0",
|