@meshagent/meshagent-tailwind 0.38.4 → 0.39.0
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 +7 -0
- package/dist/cjs/Chat.js +3 -3
- package/dist/cjs/ChatBotView.js +132 -40
- package/dist/cjs/ChatThread.js +1 -1
- package/dist/cjs/chat-hooks.d.ts +41 -5
- package/dist/cjs/chat-hooks.js +246 -55
- package/dist/esm/Chat.js +3 -3
- package/dist/esm/ChatBotView.js +142 -42
- package/dist/esm/ChatThread.js +1 -1
- package/dist/esm/chat-hooks.d.ts +41 -5
- package/dist/esm/chat-hooks.js +246 -55
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [0.39.0]
|
|
2
|
+
- Expanded TypeScript datasets client support for dataset index management (index configuration/remapping and index metadata).
|
|
3
|
+
- Added TypeScript datasets SQL cancellation API with typed cancel status/results.
|
|
4
|
+
- Applied “database” -> “datasets” terminology and toolkit/client updates across Node SDK clients (breaking for prior database-named usage).
|
|
5
|
+
- Updated Node SDK/client surfaces for improved LLM proxy “pipes”, custom LLM usage tracking, and pricing/usage reporting (including gpt-5.5 pricing).
|
|
6
|
+
- Updated a Node example dependency: `uuid` bumped to `^14.0.0` (from `^11.1.0`).
|
|
7
|
+
|
|
1
8
|
## [0.38.4]
|
|
2
9
|
- Stability
|
|
3
10
|
|
package/dist/cjs/Chat.js
CHANGED
|
@@ -134,7 +134,7 @@ function EmptyState({
|
|
|
134
134
|
title,
|
|
135
135
|
description
|
|
136
136
|
}) {
|
|
137
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "
|
|
137
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "h-full max-w-2xl flex flex-col items-center justify-center px-6 py-20 text-center", children: [
|
|
138
138
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", { className: "text-4xl font-semibold tracking-tight text-foreground sm:text-5xl", children: title }),
|
|
139
139
|
description?.trim() ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "mt-3 max-w-xl text-sm leading-6 text-muted-foreground sm:text-base", children: description }) : null
|
|
140
140
|
] });
|
|
@@ -404,7 +404,7 @@ function Chat({
|
|
|
404
404
|
placeholder: agentName?.trim() ? `Type a message or @${displayParticipantName(agentName)}` : "Type a message"
|
|
405
405
|
}
|
|
406
406
|
);
|
|
407
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "
|
|
407
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "h-full flex flex-1 flex-col", children: [
|
|
408
408
|
activePath ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
409
409
|
ResolvedChatView,
|
|
410
410
|
{
|
|
@@ -425,7 +425,7 @@ function Chat({
|
|
|
425
425
|
] }),
|
|
426
426
|
composer,
|
|
427
427
|
newThreadError ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ErrorBanner, { message: newThreadError }) : null
|
|
428
|
-
] }) }) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "
|
|
428
|
+
] }) }) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "h-full flex flex-1 flex-col", children: [
|
|
429
429
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "flex-1", children: emptyStateTitle ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EmptyState, { title: emptyStateTitle, description: emptyStateDescription }) : null }),
|
|
430
430
|
pendingStatusText ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "px-4 pb-2", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "mx-auto w-full max-w-[912px] text-sm text-muted-foreground", children: pendingStatusText }) }) : null,
|
|
431
431
|
newThreadError ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "px-4 pb-2", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ErrorBanner, { message: newThreadError }) }) : null,
|
package/dist/cjs/ChatBotView.js
CHANGED
|
@@ -31,6 +31,9 @@ var import_lucide_react = require("lucide-react");
|
|
|
31
31
|
var import_chat_hooks = require("./chat-hooks");
|
|
32
32
|
var import_Chat = require("./Chat");
|
|
33
33
|
var import_button = require("./components/ui/button");
|
|
34
|
+
var import_dialog = require("./components/ui/dialog");
|
|
35
|
+
var import_input = require("./components/ui/input");
|
|
36
|
+
var import_label = require("./components/ui/label");
|
|
34
37
|
var import_spinner = require("./components/ui/spinner");
|
|
35
38
|
var import_conversation_descriptor = require("./conversation-descriptor");
|
|
36
39
|
var import_utils = require("./lib/utils");
|
|
@@ -121,10 +124,7 @@ function useIsWideLayout(minWidth) {
|
|
|
121
124
|
}, [minWidth]);
|
|
122
125
|
return matches;
|
|
123
126
|
}
|
|
124
|
-
function useThreadListDocument({
|
|
125
|
-
room,
|
|
126
|
-
path
|
|
127
|
-
}) {
|
|
127
|
+
function useThreadListDocument({ room, path }) {
|
|
128
128
|
const [document, setDocument] = (0, import_react.useState)(null);
|
|
129
129
|
const [entries, setEntries] = (0, import_react.useState)([]);
|
|
130
130
|
const [loading, setLoading] = (0, import_react.useState)(path !== null);
|
|
@@ -191,7 +191,7 @@ function ThreadListRow({
|
|
|
191
191
|
icon,
|
|
192
192
|
trailing
|
|
193
193
|
}) {
|
|
194
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "px-2 py-1", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
194
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "px-2 py-1 cursor-pointer", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
195
195
|
"div",
|
|
196
196
|
{
|
|
197
197
|
className: (0, import_utils.cn)(
|
|
@@ -235,14 +235,13 @@ function ThreadListEntryRow({
|
|
|
235
235
|
}) {
|
|
236
236
|
const status = (0, import_chat_hooks.useThreadStatus)({ room, path: entry.path, agentName });
|
|
237
237
|
const iconClassName = selected ? "text-accent-foreground" : "text-muted-foreground";
|
|
238
|
-
const hasStatus = status.text?.trim() !== "";
|
|
239
238
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
240
239
|
ThreadListRow,
|
|
241
240
|
{
|
|
242
241
|
title: entry.name,
|
|
243
242
|
selected,
|
|
244
243
|
onClick: () => onSelect(entry),
|
|
245
|
-
icon: hasStatus ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_spinner.Spinner, { size: "sm", className: iconClassName }) : selected ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Check, { className: (0, import_utils.cn)("h-4 w-4", iconClassName) }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.MessageSquare, { className: (0, import_utils.cn)("h-4 w-4", iconClassName) }),
|
|
244
|
+
icon: status.hasStatus ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_spinner.Spinner, { size: "sm", className: iconClassName }) : selected ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Check, { className: (0, import_utils.cn)("h-4 w-4", iconClassName) }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.MessageSquare, { className: (0, import_utils.cn)("h-4 w-4", iconClassName) }),
|
|
246
245
|
trailing: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
247
246
|
import_button.Button,
|
|
248
247
|
{
|
|
@@ -270,7 +269,7 @@ function ThreadListPanel({
|
|
|
270
269
|
const { entries, error, loading } = threadList;
|
|
271
270
|
const hasSelectedEntry = selectedThreadPath !== null && entries.some((entry) => entry.path === selectedThreadPath);
|
|
272
271
|
const showPendingNewThreadSelection = selectedThreadPath === null || !hasSelectedEntry;
|
|
273
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "
|
|
272
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "h-full flex flex-col rounded-md border", children: loading ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "flex min-h-0 flex-1 items-center justify-center p-6", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_spinner.Spinner, { size: "lg", className: "text-muted-foreground" }) }) : error ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "flex min-h-0 flex-1 items-center justify-center p-6 text-center text-sm text-muted-foreground", children: `Unable to load threads: ${describeError(error)}` }) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex h-full flex-1 flex-col overflow-y-auto py-1", children: [
|
|
274
273
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
275
274
|
ThreadListRow,
|
|
276
275
|
{
|
|
@@ -295,6 +294,52 @@ function ThreadListPanel({
|
|
|
295
294
|
))
|
|
296
295
|
] }) });
|
|
297
296
|
}
|
|
297
|
+
function RenameThreadDialog({
|
|
298
|
+
dialogState,
|
|
299
|
+
onNameChange,
|
|
300
|
+
onOpenChange,
|
|
301
|
+
onSubmit
|
|
302
|
+
}) {
|
|
303
|
+
const inputId = (0, import_react.useId)();
|
|
304
|
+
const inputRef = (0, import_react.useRef)(null);
|
|
305
|
+
const trimmedName = dialogState?.value.trim() ?? "";
|
|
306
|
+
const saveDisabled = dialogState === null || trimmedName === "" || trimmedName === dialogState.entry.name;
|
|
307
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dialog.Dialog, { open: dialogState !== null, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
308
|
+
import_dialog.DialogContent,
|
|
309
|
+
{
|
|
310
|
+
showCloseButton: false,
|
|
311
|
+
className: "sm:max-w-[425px]",
|
|
312
|
+
onOpenAutoFocus: (event) => {
|
|
313
|
+
event.preventDefault();
|
|
314
|
+
inputRef.current?.focus();
|
|
315
|
+
inputRef.current?.select();
|
|
316
|
+
},
|
|
317
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("form", { className: "space-y-4", onSubmit, children: [
|
|
318
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_dialog.DialogHeader, { children: [
|
|
319
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dialog.DialogTitle, { children: "Rename thread" }),
|
|
320
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dialog.DialogDescription, { children: "Use a short and descriptive name" })
|
|
321
|
+
] }),
|
|
322
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-2", children: [
|
|
323
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_label.Label, { htmlFor: inputId, children: "Name" }),
|
|
324
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
325
|
+
import_input.Input,
|
|
326
|
+
{
|
|
327
|
+
ref: inputRef,
|
|
328
|
+
id: inputId,
|
|
329
|
+
value: dialogState?.value ?? "",
|
|
330
|
+
autoComplete: "off",
|
|
331
|
+
onChange: onNameChange
|
|
332
|
+
}
|
|
333
|
+
)
|
|
334
|
+
] }),
|
|
335
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_dialog.DialogFooter, { children: [
|
|
336
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dialog.DialogClose, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.Button, { type: "button", variant: "outline", children: "Cancel" }) }),
|
|
337
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.Button, { type: "submit", disabled: saveDisabled, children: "Save" })
|
|
338
|
+
] })
|
|
339
|
+
] })
|
|
340
|
+
}
|
|
341
|
+
) });
|
|
342
|
+
}
|
|
298
343
|
function MultiThreadUnavailable() {
|
|
299
344
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "flex min-h-0 flex-1 items-center justify-center px-4 py-8", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "w-full max-w-[912px] rounded-3xl border border-destructive/30 bg-destructive/5 p-6 text-destructive", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-start gap-3", children: [
|
|
300
345
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.AlertTriangle, { className: "mt-0.5 h-5 w-5 shrink-0" }),
|
|
@@ -341,6 +386,7 @@ function ChatBotView({
|
|
|
341
386
|
const [internalSelectedThreadPath, setInternalSelectedThreadPath] = (0, import_react.useState)(() => explicitSelectedThreadPath ?? legacySelectedThreadPath ?? null);
|
|
342
387
|
const previousLegacySelectedThreadPathRef = (0, import_react.useRef)(legacySelectedThreadPath);
|
|
343
388
|
const previousNewThreadResetVersionRef = (0, import_react.useRef)(newThreadResetVersion);
|
|
389
|
+
const [renameThreadDialog, setRenameThreadDialog] = (0, import_react.useState)(null);
|
|
344
390
|
const activeSelectedThreadPath = explicitSelectedThreadPath ?? internalSelectedThreadPath;
|
|
345
391
|
const resolvedThreadListDocumentPath = (0, import_react.useMemo)(
|
|
346
392
|
() => (0, import_conversation_descriptor.resolvedThreadListPath)(threadListPath, { threadDir, agentName }),
|
|
@@ -382,6 +428,9 @@ function ChatBotView({
|
|
|
382
428
|
handleSelectedThreadPathChanged(normalizedNextPath);
|
|
383
429
|
emitResolvedThread(normalizedNextPath, displayName);
|
|
384
430
|
}, [emitResolvedThread, handleSelectedThreadPathChanged]);
|
|
431
|
+
const closeRenameThreadDialog = (0, import_react.useCallback)(() => {
|
|
432
|
+
setRenameThreadDialog(null);
|
|
433
|
+
}, []);
|
|
385
434
|
(0, import_react.useEffect)(() => {
|
|
386
435
|
if (threadDisplayMode !== import_conversation_descriptor.ChatThreadDisplayMode.MultiThreadComposer) {
|
|
387
436
|
previousNewThreadResetVersionRef.current = newThreadResetVersion;
|
|
@@ -393,22 +442,43 @@ function ChatBotView({
|
|
|
393
442
|
previousNewThreadResetVersionRef.current = newThreadResetVersion;
|
|
394
443
|
}, [activeSelectedThreadPath, newThreadResetVersion, setSelectedThread, threadDisplayMode]);
|
|
395
444
|
const handleRenameThread = (0, import_react.useCallback)((entry) => {
|
|
396
|
-
|
|
397
|
-
|
|
445
|
+
setRenameThreadDialog({
|
|
446
|
+
entry,
|
|
447
|
+
value: entry.name
|
|
448
|
+
});
|
|
449
|
+
}, []);
|
|
450
|
+
const handleRenameThreadNameChanged = (0, import_react.useCallback)((event) => {
|
|
451
|
+
const nextValue = event.target.value;
|
|
452
|
+
setRenameThreadDialog((currentDialogState) => {
|
|
453
|
+
if (currentDialogState === null) {
|
|
454
|
+
return currentDialogState;
|
|
455
|
+
}
|
|
456
|
+
return {
|
|
457
|
+
...currentDialogState,
|
|
458
|
+
value: nextValue
|
|
459
|
+
};
|
|
460
|
+
});
|
|
461
|
+
}, []);
|
|
462
|
+
const handleRenameThreadDialogOpenChange = (0, import_react.useCallback)((open) => {
|
|
463
|
+
if (!open) {
|
|
464
|
+
closeRenameThreadDialog();
|
|
398
465
|
}
|
|
399
|
-
|
|
400
|
-
|
|
466
|
+
}, [closeRenameThreadDialog]);
|
|
467
|
+
const handleRenameThreadSubmit = (0, import_react.useCallback)((event) => {
|
|
468
|
+
event.preventDefault();
|
|
469
|
+
if (renameThreadDialog === null) {
|
|
401
470
|
return;
|
|
402
471
|
}
|
|
403
|
-
const trimmedName =
|
|
404
|
-
if (trimmedName === "" || trimmedName === entry.name) {
|
|
472
|
+
const trimmedName = renameThreadDialog.value.trim();
|
|
473
|
+
if (trimmedName === "" || trimmedName === renameThreadDialog.entry.name) {
|
|
405
474
|
return;
|
|
406
475
|
}
|
|
407
|
-
entry.element.setAttribute("name", trimmedName);
|
|
408
|
-
if (entry.path === activeSelectedThreadPath) {
|
|
409
|
-
emitResolvedThread(entry.path, trimmedName);
|
|
476
|
+
renameThreadDialog.entry.element.setAttribute("name", trimmedName);
|
|
477
|
+
if (renameThreadDialog.entry.path === activeSelectedThreadPath) {
|
|
478
|
+
emitResolvedThread(renameThreadDialog.entry.path, trimmedName);
|
|
410
479
|
}
|
|
411
|
-
|
|
480
|
+
closeRenameThreadDialog();
|
|
481
|
+
}, [activeSelectedThreadPath, closeRenameThreadDialog, emitResolvedThread, renameThreadDialog]);
|
|
412
482
|
if (threadDisplayMode !== import_conversation_descriptor.ChatThreadDisplayMode.MultiThreadComposer) {
|
|
413
483
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
414
484
|
import_Chat.Chat,
|
|
@@ -460,31 +530,53 @@ function ChatBotView({
|
|
|
460
530
|
}
|
|
461
531
|
);
|
|
462
532
|
if (!showThreadList || resolvedThreadListDocumentPath === null) {
|
|
463
|
-
return
|
|
533
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
534
|
+
content,
|
|
535
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
536
|
+
RenameThreadDialog,
|
|
537
|
+
{
|
|
538
|
+
dialogState: renameThreadDialog,
|
|
539
|
+
onNameChange: handleRenameThreadNameChanged,
|
|
540
|
+
onOpenChange: handleRenameThreadDialogOpenChange,
|
|
541
|
+
onSubmit: handleRenameThreadSubmit
|
|
542
|
+
}
|
|
543
|
+
)
|
|
544
|
+
] });
|
|
464
545
|
}
|
|
465
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
466
|
-
/* @__PURE__ */ (0, import_jsx_runtime.
|
|
546
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
547
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: (0, import_utils.cn)("flex flex-1 h-full", isWideLayout ? "flex-row items-stretch" : "flex-col"), children: [
|
|
548
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "flex flex-col h-full min-h-0 min-w-0 flex-1", children: content }),
|
|
549
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
550
|
+
"div",
|
|
551
|
+
{
|
|
552
|
+
className: (0, import_utils.cn)("shrink-0 mr-4", isWideLayout ? "ml-3" : "mt-3"),
|
|
553
|
+
style: isWideLayout ? { width: threadListWidth } : { height: threadListCollapsedHeight },
|
|
554
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
555
|
+
ThreadListPanel,
|
|
556
|
+
{
|
|
557
|
+
room,
|
|
558
|
+
threadList,
|
|
559
|
+
selectedThreadPath: activeSelectedThreadPath,
|
|
560
|
+
agentName,
|
|
561
|
+
onSelectThread: (entry) => {
|
|
562
|
+
setSelectedThread(entry.path, entry.name);
|
|
563
|
+
},
|
|
564
|
+
onClearSelection: () => {
|
|
565
|
+
setSelectedThread(null, null);
|
|
566
|
+
},
|
|
567
|
+
onRenameThread: handleRenameThread
|
|
568
|
+
}
|
|
569
|
+
)
|
|
570
|
+
}
|
|
571
|
+
)
|
|
572
|
+
] }),
|
|
467
573
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
468
|
-
|
|
574
|
+
RenameThreadDialog,
|
|
469
575
|
{
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
{
|
|
475
|
-
room,
|
|
476
|
-
threadList,
|
|
477
|
-
selectedThreadPath: activeSelectedThreadPath,
|
|
478
|
-
agentName,
|
|
479
|
-
onSelectThread: (entry) => {
|
|
480
|
-
setSelectedThread(entry.path, entry.name);
|
|
481
|
-
},
|
|
482
|
-
onClearSelection: () => {
|
|
483
|
-
setSelectedThread(null, null);
|
|
484
|
-
},
|
|
485
|
-
onRenameThread: handleRenameThread
|
|
486
|
-
}
|
|
487
|
-
)
|
|
576
|
+
dialogState: renameThreadDialog,
|
|
577
|
+
onNameChange: handleRenameThreadNameChanged,
|
|
578
|
+
onOpenChange: handleRenameThreadDialogOpenChange,
|
|
579
|
+
onSubmit: handleRenameThreadSubmit
|
|
488
580
|
}
|
|
489
581
|
)
|
|
490
582
|
] });
|
package/dist/cjs/ChatThread.js
CHANGED
|
@@ -539,7 +539,7 @@ function EmptyState({
|
|
|
539
539
|
title,
|
|
540
540
|
description
|
|
541
541
|
}) {
|
|
542
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "mx-auto flex max-w-2xl flex-col items-center justify-center px-6 py-20 text-center", children: [
|
|
542
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "h-full mx-auto flex max-w-2xl flex-col items-center justify-center px-6 py-20 text-center", children: [
|
|
543
543
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", { className: "text-4xl font-semibold tracking-tight text-foreground sm:text-5xl", children: title }),
|
|
544
544
|
description?.trim() ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "mt-3 max-w-xl text-sm leading-6 text-muted-foreground sm:text-base", children: description }) : null
|
|
545
545
|
] });
|
package/dist/cjs/chat-hooks.d.ts
CHANGED
|
@@ -22,16 +22,52 @@ export interface UseChatThreadResult {
|
|
|
22
22
|
localParticipantName: string;
|
|
23
23
|
cancelRequest?: () => void;
|
|
24
24
|
}
|
|
25
|
-
export
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
export declare class PendingAgentMessage {
|
|
26
|
+
readonly messageId: string;
|
|
27
|
+
readonly messageType: string;
|
|
28
|
+
readonly threadPath: string;
|
|
29
|
+
readonly text: string;
|
|
30
|
+
readonly attachments: string[];
|
|
31
|
+
readonly senderName?: string;
|
|
32
|
+
readonly awaitingAcceptance: boolean;
|
|
33
|
+
readonly awaitingOnline: boolean;
|
|
34
|
+
constructor({ messageId, messageType, threadPath, text, attachments, senderName, awaitingAcceptance, awaitingOnline, }: {
|
|
35
|
+
messageId: string;
|
|
36
|
+
messageType: string;
|
|
37
|
+
threadPath: string;
|
|
38
|
+
text: string;
|
|
39
|
+
attachments: string[];
|
|
40
|
+
senderName?: string;
|
|
41
|
+
awaitingAcceptance?: boolean;
|
|
42
|
+
awaitingOnline?: boolean;
|
|
43
|
+
});
|
|
44
|
+
static fromQueueJson(json: Record<string, unknown>): PendingAgentMessage;
|
|
30
45
|
}
|
|
46
|
+
export declare class ChatThreadStatusState {
|
|
47
|
+
readonly text?: string;
|
|
48
|
+
readonly startedAt?: Date;
|
|
49
|
+
readonly mode?: string;
|
|
50
|
+
readonly turnId?: string;
|
|
51
|
+
readonly pendingMessages: PendingAgentMessage[];
|
|
52
|
+
readonly pendingItemId?: string;
|
|
53
|
+
readonly supportsAgentMessages: boolean;
|
|
54
|
+
constructor({ text, startedAt, mode, turnId, pendingMessages, pendingItemId, supportsAgentMessages, }: {
|
|
55
|
+
text?: string;
|
|
56
|
+
startedAt?: Date;
|
|
57
|
+
mode?: string;
|
|
58
|
+
turnId?: string;
|
|
59
|
+
pendingMessages?: PendingAgentMessage[];
|
|
60
|
+
pendingItemId?: string;
|
|
61
|
+
supportsAgentMessages?: boolean;
|
|
62
|
+
});
|
|
63
|
+
get hasStatus(): boolean;
|
|
64
|
+
}
|
|
65
|
+
export type ThreadStatus = ChatThreadStatusState;
|
|
31
66
|
export interface UseThreadStatusProps {
|
|
32
67
|
room: RoomClient;
|
|
33
68
|
path: string;
|
|
34
69
|
agentName?: string;
|
|
70
|
+
previous?: ChatThreadStatusState;
|
|
35
71
|
}
|
|
36
72
|
export declare function formatThreadStatusText(text: string, startedAt?: Date | null): string;
|
|
37
73
|
export declare function useChatThread({ room, path, participants, participantNames, initialMessage, includeLocalParticipant, agentName, }: UseChatThreadProps): UseChatThreadResult;
|