@agents24/chat-react 0.5.47 → 0.5.49
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/README.md +31 -1
- package/dist/activity.d.ts +2 -0
- package/dist/{chunk-YRUYJFPJ.js → chunk-7EDOWQZW.js} +12 -5
- package/dist/chunk-7EDOWQZW.js.map +1 -0
- package/dist/index.cjs +12 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/registry/agents24-chat.json +16 -16
- package/dist/runtime/index.cjs +7 -1
- package/dist/runtime/index.cjs.map +1 -1
- package/dist/runtime/index.js +7 -1
- package/dist/runtime/index.js.map +1 -1
- package/dist/runtime/use-agent-chat-runtime.d.ts +7 -0
- package/dist/scaffold/app.d.ts +5 -3
- package/dist/scaffold/components/chat/chat-composer.d.ts +4 -2
- package/dist/scaffold/components/chat/chat-message.d.ts +3 -2
- package/dist/scaffold/components/chat/chat-shell.d.ts +3 -2
- package/dist/scaffold/components/chat/message-parts.d.ts +3 -2
- package/dist/scaffold/index.cjs +285 -384
- package/dist/scaffold/index.cjs.map +1 -1
- package/dist/scaffold/index.d.ts +1 -1
- package/dist/scaffold/index.js +268 -366
- package/dist/scaffold/index.js.map +1 -1
- package/dist/styles.css +44 -5
- package/dist/ui/agent-chat-composer.d.ts +4 -1
- package/dist/ui/agent-chat-message.d.ts +5 -2
- package/dist/ui/agent-response-timeline.d.ts +5 -2
- package/dist/ui/attachment-text.d.ts +14 -0
- package/dist/ui/bubble.d.ts +1 -1
- package/dist/ui/completed-tool-activity.d.ts +36 -0
- package/dist/ui/composer-attachments.d.ts +2 -0
- package/dist/ui/index.cjs +2489 -1453
- package/dist/ui/index.cjs.map +1 -1
- package/dist/ui/index.d.ts +6 -0
- package/dist/ui/index.js +2409 -1387
- package/dist/ui/index.js.map +1 -1
- package/dist/ui/message-response.d.ts +1 -1
- package/dist/ui/microphone-input.d.ts +24 -0
- package/dist/ui/pcm-capture.d.ts +14 -0
- package/dist/ui/realtime-dictation.d.ts +30 -0
- package/dist/ui/tool-sessions.d.ts +25 -3
- package/dist/ui/use-agent-chat-composer.d.ts +7 -2
- package/dist/ui/use-agent-chat-dictation.d.ts +65 -0
- package/dist/ui/voice-dictation.d.ts +32 -0
- package/package.json +5 -4
- package/scaffold/src/app.tsx +14 -4
- package/scaffold/src/chat.css +0 -1
- package/scaffold/src/components/chat/chat-composer.tsx +29 -25
- package/scaffold/src/components/chat/chat-message.tsx +4 -1
- package/scaffold/src/components/chat/chat-shell.tsx +8 -3
- package/scaffold/src/components/chat/external-link-dialog.tsx +30 -20
- package/scaffold/src/components/chat/message-parts.tsx +4 -1
- package/scaffold/src/index.tsx +1 -0
- package/dist/chunk-YRUYJFPJ.js.map +0 -1
package/dist/styles.css
CHANGED
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
--a24-accent-text: var(--primary-foreground, #fff);
|
|
12
12
|
--a24-danger: var(--destructive, #b42318);
|
|
13
13
|
--a24-focus: var(--ring, #71717a);
|
|
14
|
+
--a24-response-inset: 6px;
|
|
14
15
|
--a24-composer-radius: var(--radius-xl, .875rem);
|
|
15
16
|
--a24-composer-expanded-radius: var(--radius-xl, .875rem);
|
|
16
17
|
--a24-composer-shadow: 0 1px 2px rgb(0 0 0 / 6%), 0 1px 3px rgb(0 0 0 / 4%);
|
|
@@ -175,7 +176,8 @@
|
|
|
175
176
|
.a24-context-status__sr-only { border: 0; clip: rect(0, 0, 0, 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; white-space: nowrap; width: 1px; }
|
|
176
177
|
.a24-tool-disclosure { min-width: 0; width: 100%; }
|
|
177
178
|
.a24-tool-trigger-row { align-items: center; display: flex; gap: .35rem; min-width: 0; }
|
|
178
|
-
.a24-tool-trigger-row--
|
|
179
|
+
.a24-tool-trigger-row--node { padding-inline: 6px; }
|
|
180
|
+
.a24-tool-trigger-row--root { --a24-tool-border-offset: 2px; background: transparent; border: 1px solid color-mix(in srgb, var(--a24-border) 55%, var(--a24-background)); border-radius: 9999px; margin-inline-start: calc(-1 * var(--a24-tool-border-offset)); max-width: 100%; padding-block: .3rem; padding-inline: calc(var(--a24-response-inset) + var(--a24-tool-border-offset) - 1px) .5rem; width: fit-content; }
|
|
179
181
|
.a24-tool-trigger { align-items: center; appearance: none; background: transparent; border: 0; color: var(--a24-muted); display: flex; font: inherit; font-size: .875rem; gap: .35rem; line-height: 1.35; min-width: 0; padding: .125rem 0; text-align: start; }
|
|
180
182
|
button.a24-tool-trigger { border-radius: .5rem; cursor: pointer; transition: background-color 140ms ease, color 140ms ease; }
|
|
181
183
|
button.a24-tool-trigger:hover { color: var(--a24-text); }
|
|
@@ -188,13 +190,23 @@ button.a24-tool-trigger:focus-visible { outline: 2px solid var(--a24-focus); out
|
|
|
188
190
|
.a24-tool-trigger--error { color: var(--a24-danger); }
|
|
189
191
|
.a24-tool-orb { align-items: center; display: inline-flex; flex: 0 0 auto; height: 1.25rem; justify-content: center; width: 1.25rem; }
|
|
190
192
|
.a24-tool-orb canvas { display: block; }
|
|
193
|
+
.a24-tool-completed-icon { align-items: center; display: inline-flex; flex: 0 0 auto; height: 1.25rem; justify-content: center; width: 1.25rem; }
|
|
194
|
+
.a24-tool-completed-icon > svg { height: .875rem; width: .875rem; }
|
|
195
|
+
.a24-tool-summary-actions { display: flex; gap: .375rem; }
|
|
196
|
+
.a24-tool-summary-action { align-items: center; display: flex; gap: .35rem; min-width: 0; }
|
|
197
|
+
.a24-tool-summary-action__label { overflow: hidden; text-overflow: ellipsis; }
|
|
198
|
+
.a24-tool-trigger-row--root .a24-tool-orb { justify-content: flex-start; }
|
|
199
|
+
.a24-tool-trigger-row--root .a24-tool-completed-icon { justify-content: flex-start; width: 1rem; }
|
|
191
200
|
.a24-tool-trigger__label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
201
|
+
.a24-tool-trigger__status { flex: 0 1 auto; font-size: .75rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
192
202
|
.a24-tool-resource-action { appearance: none; background: transparent; border: 0; border-radius: .375rem; color: var(--a24-text); cursor: pointer; flex: 0 1 auto; font: inherit; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: .75rem; max-width: 16rem; min-width: 0; overflow: hidden; padding: .125rem .25rem; text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-overflow: ellipsis; text-underline-offset: .18em; white-space: nowrap; }
|
|
193
203
|
.a24-tool-resource-action:hover { background: var(--a24-surface-hover); text-decoration-color: currentColor; }
|
|
194
204
|
.a24-tool-resource-action:focus-visible { outline: 2px solid var(--a24-focus); outline-offset: 2px; }
|
|
195
205
|
.a24-tool-trigger__chevron { flex: 0 0 auto; height: .75rem; opacity: 0; transition: opacity 140ms ease; width: .75rem; }
|
|
196
206
|
.a24-tool-trigger:hover .a24-tool-trigger__chevron,
|
|
197
207
|
.a24-tool-trigger:focus-visible .a24-tool-trigger__chevron { opacity: .7; }
|
|
208
|
+
.a24-tool-trigger[aria-expanded="false"]:dir(rtl) > .a24-tool-trigger__chevron,
|
|
209
|
+
.a24-completed-work:not([open]) > .a24-completed-work__summary:dir(rtl) > svg { transform: scaleX(-1); }
|
|
198
210
|
.a24-tool-disclosure__content { color: var(--a24-muted); font-size: .875rem; margin-top: .25rem; padding-inline-start: 1rem; }
|
|
199
211
|
.a24-tool-list-frame { min-width: 0; position: relative; }
|
|
200
212
|
.a24-tool-list-frame::before,
|
|
@@ -204,7 +216,13 @@ button.a24-tool-trigger:focus-visible { outline: 2px solid var(--a24-focus); out
|
|
|
204
216
|
.a24-tool-list-frame[data-scroll-fade-top]::before,
|
|
205
217
|
.a24-tool-list-frame[data-scroll-fade-bottom]::after { opacity: 1; }
|
|
206
218
|
.a24-tool-list { max-height: 16rem; overscroll-behavior: contain; overflow-y: auto; padding-inline-end: .25rem; }
|
|
207
|
-
.a24-tool-list > [role="listitem"] + [role="listitem"] { margin-top: .25rem; }
|
|
219
|
+
.a24-tool-list-content > [role="listitem"] + [role="listitem"] { margin-top: .25rem; }
|
|
220
|
+
.a24-completed-work__summary { align-items: center; color: var(--a24-muted); cursor: pointer; display: inline-flex; font-size: .875rem; gap: .3rem; list-style: none; margin-inline-start: var(--a24-response-inset); }
|
|
221
|
+
.a24-completed-work__summary::-webkit-details-marker { display: none; }
|
|
222
|
+
.a24-completed-work__summary:hover { color: var(--a24-text); }
|
|
223
|
+
.a24-completed-work__summary svg { height: .875rem; width: .875rem; }
|
|
224
|
+
.a24-completed-work[open] > .a24-completed-work__summary svg { transform: rotate(90deg); }
|
|
225
|
+
.a24-completed-work__content { margin-block-start: .5rem; }
|
|
208
226
|
.a24-tool-detail { color: var(--a24-muted); font-size: .8125rem; overflow-wrap: anywhere; padding: .25rem 0; }
|
|
209
227
|
.a24-tool-detail--error,
|
|
210
228
|
.a24-child-tool--error { color: var(--a24-danger); }
|
|
@@ -229,7 +247,8 @@ button.a24-tool-trigger:focus-visible { outline: 2px solid var(--a24-focus); out
|
|
|
229
247
|
to { opacity: 0; transform: translateY(-75%); }
|
|
230
248
|
}
|
|
231
249
|
|
|
232
|
-
.a24-message-response { box-sizing: border-box; max-width: 100%; min-width: 0; padding-inline:
|
|
250
|
+
.a24-message-response { box-sizing: border-box; max-width: 100%; min-width: 0; padding-inline: var(--a24-response-inset); width: 100%; }
|
|
251
|
+
.a24-message-link-button { appearance: none; background: none; border: 0; color: inherit; cursor: pointer; font: inherit; padding: 0; text-align: start; text-decoration: underline; }
|
|
233
252
|
.a24-timeline-error { padding-inline: 6px; }
|
|
234
253
|
.a24-ask-user--resolved { padding-inline: 6px; }
|
|
235
254
|
.a24-chat-message { display: flex; flex-direction: column; min-width: 0; width: 100%; }
|
|
@@ -261,11 +280,11 @@ button.a24-tool-trigger:focus-visible { outline: 2px solid var(--a24-focus); out
|
|
|
261
280
|
.a24-chat-attachment-rows { align-self: flex-end; display: flex; flex-direction: column; gap: .375rem; max-width: 100%; min-width: 0; width: 100%; }
|
|
262
281
|
.a24-chat-attachments { align-self: stretch; justify-content: safe flex-end; max-width: 100%; scrollbar-width: none; width: 100%; }
|
|
263
282
|
.a24-chat-attachments[dir="rtl"] { justify-content: safe flex-start; }
|
|
264
|
-
.a24-chat-attachment { align-items: center; border-radius: var(--radius, .75rem); flex-wrap: nowrap; max-width: min(22rem, 100%); min-height: 2.
|
|
283
|
+
.a24-chat-attachment { display: flex; gap: .5rem; line-height: 1.25; align-items: center; border-radius: var(--radius, .75rem); flex-wrap: nowrap; max-width: min(22rem, 100%); min-height: 2.25rem; padding: .25rem .5rem !important; }
|
|
265
284
|
.a24-composer-attachment-row { padding: .5rem .375rem; }
|
|
266
285
|
.a24-composer-attachment-row .a24-chat-attachments { padding-top: 0; align-items: center; justify-content: flex-start; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; }
|
|
267
286
|
.a24-composer-attachment-row .a24-chat-attachment { flex-shrink: 0; }
|
|
268
|
-
.a24-chat-attachment-icon { border-radius:
|
|
287
|
+
.a24-chat-attachment-icon { border-radius: .375rem !important; overflow: hidden; height: 1.75rem; width: 1.75rem; }
|
|
269
288
|
.a24-chat-attachment-icon svg { display: block; height: 100%; width: 100%; }
|
|
270
289
|
.a24-chat-attachment-content { overflow: hidden; }
|
|
271
290
|
.a24-chat-image-attachment { border: 0; border-radius: var(--radius, .75rem); height: 6rem; min-width: 6rem; overflow: hidden; padding: 0 !important; width: 6rem; }
|
|
@@ -373,3 +392,23 @@ button.a24-tool-trigger:focus-visible { outline: 2px solid var(--a24-focus); out
|
|
|
373
392
|
transition-duration: .01ms !important;
|
|
374
393
|
}
|
|
375
394
|
}
|
|
395
|
+
|
|
396
|
+
/* Transcript UI is fully styled by the package, including portaled previews. */
|
|
397
|
+
.a24-message-attachments { display: flex; flex-direction: column; align-items: flex-end; gap: .375rem; min-width: 0; max-width: 100%; }
|
|
398
|
+
.a24-attachment-text { position: relative; align-self: flex-end; min-width: 0; max-width: 100%; }
|
|
399
|
+
.a24-attachment-text__source[data-outgoing] { position: absolute; inset-inline-end: 0; top: 0; pointer-events: none; }
|
|
400
|
+
.a24-attachment-text__transcript { position: relative; min-width: 0; }
|
|
401
|
+
.a24-attachment-text__transcript .a24-chat-message-content--user { max-width: 100%; }
|
|
402
|
+
.a24-chat-message-content--user { border-radius: .875rem; padding: .625rem .875rem; background: var(--a24-surface); color: var(--a24-text); white-space: pre-wrap; line-height: 1.5; overflow-wrap: anywhere; }
|
|
403
|
+
.a24-transcript-trigger { width: fit-content; max-width: 100%; border-radius: .625rem; outline: none; cursor: pointer; }
|
|
404
|
+
.a24-transcript-trigger:focus-visible { box-shadow: 0 0 0 2px var(--a24-border); }
|
|
405
|
+
.a24-transcript-preview { box-sizing: border-box; z-index: 100; width: max-content; max-width: min(20rem, calc(100vw - 2rem)); max-height: 12rem; overflow: auto; padding: .75rem .875rem; border: 1px solid var(--a24-border, #e5e5e5); border-radius: .875rem; background: var(--a24-background, #fff); color: var(--a24-text, #18181b); font: 400 .8125rem/1.5 var(--font-sans, sans-serif); outline: none; }
|
|
406
|
+
.a24-transcript-preview p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
|
|
407
|
+
.a24-dictation-pending { display: flex; align-items: center; gap: .5rem; min-height: 2.25rem; padding: .5rem .75rem; border-radius: .875rem; background: var(--a24-surface); color: var(--a24-text); font-size: .8125rem; line-height: 1.25; }
|
|
408
|
+
.a24-dictation-pending svg { flex-shrink: 0; color: var(--a24-muted); }
|
|
409
|
+
.a24-dictation-pending__status { color: var(--a24-muted); font-size: .75rem; }
|
|
410
|
+
.a24-microphone { position: relative; display: inline-flex; align-items: center; flex: none; }
|
|
411
|
+
.a24-microphone-menu { position: fixed; z-index: 60; display: flex; flex-direction: column; min-width: 11rem; padding: 4px; border-radius: 12px; background: var(--a24-background, #fff); color: var(--a24-text, #171717); box-shadow: 0 6px 24px rgb(0 0 0 / 14%); }
|
|
412
|
+
.a24-microphone-menu > button { display: flex; align-items: center; gap: 8px; white-space: nowrap; padding: 10px 12px; border: 0; border-radius: 8px; background: transparent; color: inherit; text-align: start; font: inherit; font-size: 14px; cursor: pointer; }
|
|
413
|
+
.a24-microphone-menu > button:hover, .a24-microphone-menu > button:focus-visible { background: var(--a24-surface-hover, #f3f3f3); outline: none; }
|
|
414
|
+
.a24-microphone-error { position: absolute; bottom: 100%; width: 15rem; font-size: 12px; color: var(--a24-danger, #b42318); }
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { RealtimeDictationOptions } from "./realtime-dictation";
|
|
1
2
|
import * as React from "react";
|
|
2
3
|
import type { AgentChatComposerFile } from "./composer-attachments";
|
|
3
4
|
import { type AgentChatComposerTextOptions } from "./use-agent-chat-composer";
|
|
@@ -5,6 +6,7 @@ import type { AgentChatInputContract } from "../runtime/input-contract";
|
|
|
5
6
|
import type { ContextWindow } from "@agents24/client/protocol";
|
|
6
7
|
export type { AgentChatComposerFile } from "./composer-attachments";
|
|
7
8
|
export type AgentChatComposerSubmit = {
|
|
9
|
+
dictationSessionId?: string;
|
|
8
10
|
text: string;
|
|
9
11
|
files: AgentChatComposerFile[];
|
|
10
12
|
attachmentIds?: string[];
|
|
@@ -14,6 +16,7 @@ export type AgentChatComposerHandle = {
|
|
|
14
16
|
setText(text: string, options?: AgentChatComposerTextOptions): boolean;
|
|
15
17
|
};
|
|
16
18
|
export type AgentChatComposerProps = {
|
|
19
|
+
realtimeDictation?: RealtimeDictationOptions;
|
|
17
20
|
/** Public draft controls for the default composer. */
|
|
18
21
|
ref?: React.Ref<AgentChatComposerHandle>;
|
|
19
22
|
inputContract?: AgentChatInputContract | null;
|
|
@@ -42,4 +45,4 @@ export type AgentChatComposerProps = {
|
|
|
42
45
|
} | null;
|
|
43
46
|
textareaRef?: React.Ref<HTMLTextAreaElement>;
|
|
44
47
|
};
|
|
45
|
-
export declare function AgentChatComposer({ ref, inputContract, recordingEnabled, contextWindow, accept, allowAttachments, className, disabled, forceExpanded, focusKey, scopeKey, inputToolbarContent, isRunning, isCancelling, onAttachmentCountChange, onStop, onSubmit, placeholder, restoredDraft, textareaRef, }: AgentChatComposerProps): import("react/jsx-runtime").JSX.Element;
|
|
48
|
+
export declare function AgentChatComposer({ ref, inputContract, recordingEnabled, contextWindow, accept, allowAttachments, className, disabled, forceExpanded, focusKey, scopeKey, inputToolbarContent, isRunning, isCancelling, onAttachmentCountChange, onStop, onSubmit, realtimeDictation, placeholder, restoredDraft, textareaRef, }: AgentChatComposerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -4,7 +4,8 @@ import * as React from "react";
|
|
|
4
4
|
import type { ChatHitlPart, ChatHitlResponse, ChatMessage } from "../types";
|
|
5
5
|
import { type ChatAttachmentContentResolver } from "./adapters";
|
|
6
6
|
import { type AgentChatMessageActionHandlers } from "./agent-chat-actions";
|
|
7
|
-
import { type AgentChatPartActionState, type AgentChatTimelineComponent } from "./agent-response-timeline";
|
|
7
|
+
import { type AgentChatPartActionState, type AgentChatTimelineComponent, type AgentResponseTimelineProps } from "./agent-response-timeline";
|
|
8
|
+
import type { AgentChatToolLabelMode } from "./tool-sessions";
|
|
8
9
|
export type AgentChatUserMessageContentProps = {
|
|
9
10
|
collapsedLines?: number;
|
|
10
11
|
collapseThreshold?: number | null;
|
|
@@ -22,12 +23,14 @@ export type AgentChatMessageProps = {
|
|
|
22
23
|
contentClassName?: string;
|
|
23
24
|
dir?: "ltr" | "rtl";
|
|
24
25
|
hitlLabels?: Partial<HitlSubmissionLabels>;
|
|
26
|
+
statusLabels?: AgentResponseTimelineProps["statusLabels"];
|
|
25
27
|
onHitlPaint?: (durationMs: number) => void;
|
|
26
28
|
getHitlActionState?: (part: ChatHitlPart) => AgentChatPartActionState | undefined;
|
|
27
29
|
message: ChatMessage;
|
|
28
30
|
nodeActivityMode?: "default" | "all" | "hidden";
|
|
29
31
|
onHitlAction?: (part: ChatHitlPart, response: ChatHitlResponse, options?: HitlSubmissionOptions) => void;
|
|
30
32
|
Timeline?: AgentChatTimelineComponent;
|
|
33
|
+
toolLabelMode?: AgentChatToolLabelMode;
|
|
31
34
|
renderAssistantContent?: (input: {
|
|
32
35
|
isStreaming: boolean;
|
|
33
36
|
message: ChatMessage;
|
|
@@ -49,4 +52,4 @@ export declare function AgentChatUserMessageActionRow({ children, className, }:
|
|
|
49
52
|
children: React.ReactNode;
|
|
50
53
|
className?: string;
|
|
51
54
|
}): import("react/jsx-runtime").JSX.Element;
|
|
52
|
-
export declare function AgentChatMessage({ actionHandlers, additionalActions, actions, actionsClassName, attachmentContentResolver, className, contentClassName, dir, getHitlActionState, hitlLabels, onHitlPaint, message, nodeActivityMode, onHitlAction, Timeline, renderAssistantContent, renderUserContent, showAssistantAttachments, streamingMessageId, userMessageCollapsedLines, userMessageContent, userMessageCollapseThreshold, userMessageShowLessLabel, userMessageShowMoreLabel, }: AgentChatMessageProps): import("react/jsx-runtime").JSX.Element;
|
|
55
|
+
export declare function AgentChatMessage({ actionHandlers, additionalActions, actions, actionsClassName, attachmentContentResolver, className, contentClassName, dir, getHitlActionState, hitlLabels, statusLabels, onHitlPaint, message, nodeActivityMode, onHitlAction, Timeline, toolLabelMode, renderAssistantContent, renderUserContent, showAssistantAttachments, streamingMessageId, userMessageCollapsedLines, userMessageContent, userMessageCollapseThreshold, userMessageShowLessLabel, userMessageShowMoreLabel, }: AgentChatMessageProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,9 +2,10 @@ import type { HitlSubmissionOptions } from "@agents24/react";
|
|
|
2
2
|
import { type HitlSubmissionLabels } from "./hitl-submission-status";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import type { ChatHitlPart, ChatHitlResponse, ChatMessage, ChatNodeActivityPart, ChatPart, ChatToolPart, ChatUiBlocksPart } from "../types";
|
|
5
|
+
import { type AgentChatStatusLabels } from "../activity";
|
|
5
6
|
import type { McpConnectRequiredStatus } from "./mcp-connect-required-card";
|
|
6
7
|
import { type MessageResponseProps } from "./message-response";
|
|
7
|
-
import { type AgentChatToolSlots, type AgentChatToolViewMode } from "./tool-sessions";
|
|
8
|
+
import { type AgentChatToolLabelMode, type AgentChatToolSlots, type AgentChatToolViewMode } from "./tool-sessions";
|
|
8
9
|
export type AgentChatPartActionState = {
|
|
9
10
|
status?: McpConnectRequiredStatus | string;
|
|
10
11
|
error?: string | null;
|
|
@@ -24,8 +25,10 @@ export type AgentResponseTimelineProps = {
|
|
|
24
25
|
parts?: readonly ChatPart[];
|
|
25
26
|
renderUiBlocks?: (part: ChatUiBlocksPart) => React.ReactNode;
|
|
26
27
|
responseProps?: Omit<MessageResponseProps, "children" | "streaming" | "streamingId">;
|
|
28
|
+
statusLabels?: Partial<AgentChatStatusLabels>;
|
|
27
29
|
toolSlots?: AgentChatToolSlots;
|
|
28
30
|
toolViewMode?: AgentChatToolViewMode;
|
|
31
|
+
toolLabelMode?: AgentChatToolLabelMode;
|
|
29
32
|
};
|
|
30
33
|
export type AgentChatTimelineSlotProps = Omit<AgentResponseTimelineProps, "parts"> & {
|
|
31
34
|
parts: readonly ChatPart[];
|
|
@@ -53,4 +56,4 @@ export type AgentChatPartProps = {
|
|
|
53
56
|
toolSlots?: AgentChatToolSlots;
|
|
54
57
|
};
|
|
55
58
|
export declare function AgentChatPart({ activeToolId, getHitlActionState, hitlLabels, onHitlPaint, isLoading, isTextStreaming, message, onHitlAction, part, responseProps, toolSlots, }: AgentChatPartProps): import("react/jsx-runtime").JSX.Element | null;
|
|
56
|
-
export declare function AgentResponseTimeline({ getHitlActionState, hitlLabels, onHitlPaint, isLoading, message, nodeActivityMode, onHitlAction, onNodeSelect, parts: displayParts, renderUiBlocks, responseProps, toolSlots, toolViewMode, }: AgentResponseTimelineProps): import("react/jsx-runtime").JSX.Element;
|
|
59
|
+
export declare function AgentResponseTimeline({ getHitlActionState, hitlLabels, onHitlPaint, isLoading, message, nodeActivityMode, onHitlAction, onNodeSelect, parts: displayParts, renderUiBlocks, responseProps, statusLabels, toolSlots: suppliedToolSlots, toolViewMode, toolLabelMode, }: AgentResponseTimelineProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { ChatAttachment } from "../types";
|
|
3
|
+
import { type ChatAttachmentContentResolver } from "./adapters";
|
|
4
|
+
export declare function AgentChatDictationPending({ label, status }: {
|
|
5
|
+
label?: string;
|
|
6
|
+
status?: string;
|
|
7
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
/** Replaces a source in place; history mounts settled and reduced motion stays still. */
|
|
9
|
+
export declare function AgentChatAttachmentText({ attachment, children, dir, resolveContent }: {
|
|
10
|
+
attachment: ChatAttachment;
|
|
11
|
+
children: React.ReactNode;
|
|
12
|
+
dir?: "ltr" | "rtl";
|
|
13
|
+
resolveContent?: ChatAttachmentContentResolver;
|
|
14
|
+
}): import("react/jsx-runtime").JSX.Element;
|
package/dist/ui/bubble.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import * as React from "react";
|
|
|
2
2
|
import { type VariantProps } from "class-variance-authority";
|
|
3
3
|
declare function BubbleGroup({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
declare const bubbleVariants: (props?: ({
|
|
5
|
-
variant?: "default" | "destructive" | "
|
|
5
|
+
variant?: "default" | "destructive" | "muted" | "secondary" | "tinted" | "outline" | "ghost" | null | undefined;
|
|
6
6
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
7
|
declare function Bubble({ variant, align, className, ...props }: React.ComponentProps<"div"> & VariantProps<typeof bubbleVariants> & {
|
|
8
8
|
align?: "start" | "end";
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { ChatToolIconKey, ChatToolPart } from "../types";
|
|
3
|
+
declare const actions: {
|
|
4
|
+
readonly search: "Searched";
|
|
5
|
+
readonly read: "Read files";
|
|
6
|
+
readonly write: "Wrote files";
|
|
7
|
+
readonly execute: "Ran commands";
|
|
8
|
+
readonly inspect: "Inspected items";
|
|
9
|
+
readonly network: "Made network requests";
|
|
10
|
+
};
|
|
11
|
+
export type AgentChatToolIconKey = ChatToolIconKey;
|
|
12
|
+
type ToolCategory = keyof typeof actions | "other";
|
|
13
|
+
export type AgentChatCompletedToolIconContext = {
|
|
14
|
+
kind: "tool" | "group";
|
|
15
|
+
iconKey: AgentChatToolIconKey;
|
|
16
|
+
category: ToolCategory;
|
|
17
|
+
parts: readonly ChatToolPart[];
|
|
18
|
+
};
|
|
19
|
+
export type AgentChatCompletedToolAction = {
|
|
20
|
+
category: ToolCategory;
|
|
21
|
+
label: string;
|
|
22
|
+
parts: readonly ChatToolPart[];
|
|
23
|
+
};
|
|
24
|
+
export declare function completedToolActions(parts: readonly ChatToolPart[]): AgentChatCompletedToolAction[];
|
|
25
|
+
export declare function completedToolSummary(actions: readonly AgentChatCompletedToolAction[], parts: readonly ChatToolPart[]): string;
|
|
26
|
+
export declare function completedToolIcon(kind: AgentChatCompletedToolIconContext["kind"], parts: readonly ChatToolPart[], renderer?: (context: AgentChatCompletedToolIconContext) => ReactNode, generatedIcon?: ChatToolIconKey): ReactNode;
|
|
27
|
+
export declare function CompletedToolActionList({ actions, parts, renderIcon }: {
|
|
28
|
+
actions: readonly {
|
|
29
|
+
label: string;
|
|
30
|
+
iconKey?: ChatToolIconKey;
|
|
31
|
+
parts?: readonly ChatToolPart[];
|
|
32
|
+
}[];
|
|
33
|
+
parts: readonly ChatToolPart[];
|
|
34
|
+
renderIcon?: (context: AgentChatCompletedToolIconContext) => ReactNode;
|
|
35
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
export {};
|
|
@@ -13,3 +13,5 @@ export type AgentChatComposerFile = ChatAttachment & {
|
|
|
13
13
|
export declare function createAgentChatComposerFile(file: File): AgentChatComposerFile;
|
|
14
14
|
export declare function revokeAgentChatComposerFiles(files: readonly AgentChatComposerFile[]): void;
|
|
15
15
|
export declare function queuedMessageComposerFiles(message: Pick<ThreadMessage, "attachment_ids" | "attachments">): AgentChatComposerFile[];
|
|
16
|
+
/** Explicit presentation intent; ordinary file attachments retain their audio UI. */
|
|
17
|
+
export declare function createDictationComposerFile(file: File): AgentChatComposerFile;
|