@alexkroman1/aai-ui 10.0.0 → 11.0.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/dist/{aai-logo-9xRBGVFl.js → aai-logo-CXZGPSIY.js} +2 -1
- package/dist/{chat-view-BJ6sOARu.js → chat-view-DDTtrh7N.js} +2 -2
- package/dist/components/button.js +11 -10
- package/dist/components/chat-view.js +1 -1
- package/dist/components/controls.js +1 -1
- package/dist/components/message-list.js +1 -1
- package/dist/components/start-screen.js +1 -1
- package/dist/components/tool-call-block.js +1 -1
- package/dist/default-client/assets/{audio-CoVe8N48.js → audio-BuDICbPf.js} +1 -1
- package/dist/default-client/assets/{capture-processor-Dmc-KEpb.js → capture-processor-BO5IsLJE.js} +1 -1
- package/dist/default-client/assets/client-audio-constants-CP13UQZt.js +1 -0
- package/dist/default-client/assets/index-B8Zz9w5B.js +298 -0
- package/dist/default-client/assets/{playback-processor-DwQ9tE7X.js → playback-processor-BWxNmYZp.js} +1 -1
- package/dist/default-client/index.html +2 -2
- package/dist/define-client.js +2 -2
- package/dist/index.js +32 -26
- package/dist/internal.js +1 -1
- package/dist/{message-list-Dtl03sGr.js → message-list-BJYyuIcR.js} +1 -1
- package/dist/{session-core-0hClhPz-.js → session-core-DxBYsfHA.js} +1 -4
- package/dist/session-core.js +1 -1
- package/dist/{tool-call-block-B7KlhaWl.js → tool-call-block-tcPQAkcP.js} +11 -10
- package/dist/{url-chips-DxXKgyL9.js → url-chips-YqhCjWfQ.js} +2 -1
- package/package.json +28 -23
- package/dist/default-client/assets/client-audio-constants-Ck0IJO4c.js +0 -1
- package/dist/default-client/assets/index-DS-RCrri.js +0 -299
package/dist/default-client/assets/{playback-processor-DwQ9tE7X.js → playback-processor-BWxNmYZp.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{i as e}from"./client-audio-constants-CP13UQZt.js";import{t}from"./_module-url-BX0RuRU2.js";var n=`
|
|
2
2
|
class PlaybackProcessor extends AudioWorkletProcessor {
|
|
3
3
|
constructor(options) {
|
|
4
4
|
super();
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
<title>aai</title>
|
|
7
7
|
<link rel="icon" href="./favicon.ico" />
|
|
8
8
|
<style>html, body { background: #FBF8F2; margin: 0; }</style>
|
|
9
|
-
<script type="module" crossorigin src="./assets/index-
|
|
10
|
-
<link rel="modulepreload" crossorigin href="./assets/client-audio-constants-
|
|
9
|
+
<script type="module" crossorigin src="./assets/index-B8Zz9w5B.js"></script>
|
|
10
|
+
<link rel="modulepreload" crossorigin href="./assets/client-audio-constants-CP13UQZt.js">
|
|
11
11
|
<link rel="stylesheet" crossorigin href="./assets/index-S5fkKi6B.css">
|
|
12
12
|
</head>
|
|
13
13
|
<body>
|
package/dist/define-client.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { n as fetchClientConfig } from "./client-config-BT_kWID5.js";
|
|
2
2
|
import { SessionProvider, ThemeProvider } from "./context.js";
|
|
3
|
-
import { t as ChatView } from "./chat-view-
|
|
3
|
+
import { t as ChatView } from "./chat-view-DDTtrh7N.js";
|
|
4
4
|
import { n as setPageTitle, t as pageBaseUrl } from "./_utils-B6498_bm.js";
|
|
5
5
|
import { t as ToolConfigContext } from "./tool-config-context-DzAofqi_.js";
|
|
6
6
|
import { SidebarLayout } from "./components/sidebar-layout.js";
|
|
7
7
|
import { StartScreen } from "./components/start-screen.js";
|
|
8
|
-
import { t as createSessionCore } from "./session-core-
|
|
8
|
+
import { t as createSessionCore } from "./session-core-DxBYsfHA.js";
|
|
9
9
|
import { jsx } from "react/jsx-runtime";
|
|
10
10
|
import { createElement, useEffect, useState } from "react";
|
|
11
11
|
import { flushSync } from "react-dom";
|
package/dist/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { n as fetchClientConfig } from "./client-config-BT_kWID5.js";
|
|
2
|
-
import { i as AutoScroll, n as Markdown, r as useConversation, t as MessageList } from "./message-list-
|
|
2
|
+
import { i as AutoScroll, n as Markdown, r as useConversation, t as MessageList } from "./message-list-BJYyuIcR.js";
|
|
3
3
|
import { ThemeProvider, useSession, useSessionSelector, useTheme } from "./context.js";
|
|
4
4
|
import { r as inkTint } from "./_colors-j8XMToi9.js";
|
|
5
5
|
import { Button } from "./components/button.js";
|
|
6
|
-
import { n as ConsoleShell, t as ChatView } from "./chat-view-
|
|
6
|
+
import { n as ConsoleShell, t as ChatView } from "./chat-view-DDTtrh7N.js";
|
|
7
7
|
import { n as setPageTitle } from "./_utils-B6498_bm.js";
|
|
8
8
|
import { Controls } from "./components/controls.js";
|
|
9
9
|
import { n as useUserTranscript } from "./use-user-transcript-C14qWFu2.js";
|
|
10
|
-
import { n as ToolCallRow } from "./tool-call-block-
|
|
10
|
+
import { n as ToolCallRow } from "./tool-call-block-tcPQAkcP.js";
|
|
11
11
|
import { SidebarLayout } from "./components/sidebar-layout.js";
|
|
12
12
|
import { StartScreen } from "./components/start-screen.js";
|
|
13
13
|
import { a as useWorkflowRun, c as isTerminal, n as useWorkflowProgress, o as useWorkflowApiRef, s as createWorkflowApi } from "./use-workflow-progress-Cu0SxMyg.js";
|
|
14
|
-
import { t as createSessionCore } from "./session-core-
|
|
14
|
+
import { t as createSessionCore } from "./session-core-DxBYsfHA.js";
|
|
15
15
|
import { client, mountRoot, resolveContainer } from "./define-client.js";
|
|
16
16
|
import { useAgentState, useEvent, useToolCallStart, useToolResult } from "./hooks.js";
|
|
17
17
|
import clsx from "clsx";
|
|
@@ -322,6 +322,7 @@ function useFileControlProps() {
|
|
|
322
322
|
*/
|
|
323
323
|
function TextField({ name, label, hint, className, ...rest }) {
|
|
324
324
|
const id = useId();
|
|
325
|
+
const control = useControlProps();
|
|
325
326
|
return /* @__PURE__ */ jsx(Field, {
|
|
326
327
|
label,
|
|
327
328
|
hint,
|
|
@@ -331,7 +332,7 @@ function TextField({ name, label, hint, className, ...rest }) {
|
|
|
331
332
|
id,
|
|
332
333
|
name,
|
|
333
334
|
type: "text",
|
|
334
|
-
...
|
|
335
|
+
...control,
|
|
335
336
|
...rest
|
|
336
337
|
})
|
|
337
338
|
});
|
|
@@ -350,6 +351,7 @@ function TextField({ name, label, hint, className, ...rest }) {
|
|
|
350
351
|
*/
|
|
351
352
|
function NumberField({ name, label, hint, className, ...rest }) {
|
|
352
353
|
const id = useId();
|
|
354
|
+
const control = useControlProps();
|
|
353
355
|
return /* @__PURE__ */ jsx(Field, {
|
|
354
356
|
label,
|
|
355
357
|
hint,
|
|
@@ -359,7 +361,7 @@ function NumberField({ name, label, hint, className, ...rest }) {
|
|
|
359
361
|
id,
|
|
360
362
|
name,
|
|
361
363
|
type: "number",
|
|
362
|
-
...
|
|
364
|
+
...control,
|
|
363
365
|
...rest
|
|
364
366
|
})
|
|
365
367
|
});
|
|
@@ -376,6 +378,7 @@ function NumberField({ name, label, hint, className, ...rest }) {
|
|
|
376
378
|
*/
|
|
377
379
|
function TextAreaField({ name, label, hint, className, rows = 4, ...rest }) {
|
|
378
380
|
const id = useId();
|
|
381
|
+
const control = useControlProps();
|
|
379
382
|
return /* @__PURE__ */ jsx(Field, {
|
|
380
383
|
label,
|
|
381
384
|
hint,
|
|
@@ -385,7 +388,7 @@ function TextAreaField({ name, label, hint, className, rows = 4, ...rest }) {
|
|
|
385
388
|
id,
|
|
386
389
|
name,
|
|
387
390
|
rows,
|
|
388
|
-
...
|
|
391
|
+
...control,
|
|
389
392
|
...rest
|
|
390
393
|
})
|
|
391
394
|
});
|
|
@@ -409,6 +412,7 @@ function TextAreaField({ name, label, hint, className, rows = 4, ...rest }) {
|
|
|
409
412
|
*/
|
|
410
413
|
function SelectField({ name, label, hint, className, options, children, ...rest }) {
|
|
411
414
|
const id = useId();
|
|
415
|
+
const control = useControlProps();
|
|
412
416
|
return /* @__PURE__ */ jsx(Field, {
|
|
413
417
|
label,
|
|
414
418
|
hint,
|
|
@@ -417,13 +421,14 @@ function SelectField({ name, label, hint, className, options, children, ...rest
|
|
|
417
421
|
children: /* @__PURE__ */ jsx("select", {
|
|
418
422
|
id,
|
|
419
423
|
name,
|
|
420
|
-
...
|
|
424
|
+
...control,
|
|
421
425
|
...rest,
|
|
422
426
|
children: children ?? options?.map((option) => {
|
|
423
427
|
const value = typeof option === "string" ? option : option.value;
|
|
428
|
+
const text = typeof option === "string" ? option : option.label;
|
|
424
429
|
return /* @__PURE__ */ jsx("option", {
|
|
425
430
|
value,
|
|
426
|
-
children:
|
|
431
|
+
children: text
|
|
427
432
|
}, value);
|
|
428
433
|
})
|
|
429
434
|
})
|
|
@@ -568,24 +573,25 @@ function Form({ onSubmit, error, children, className, ...rest }) {
|
|
|
568
573
|
const theme = useTheme();
|
|
569
574
|
const [busy, setBusy] = useState(false);
|
|
570
575
|
const { pending: fieldsPending, declare } = useFormReadiness();
|
|
576
|
+
const handle = useCallback((event) => {
|
|
577
|
+
event.preventDefault();
|
|
578
|
+
if (busy || fieldsPending) return;
|
|
579
|
+
const form = event.currentTarget;
|
|
580
|
+
setBusy(true);
|
|
581
|
+
(async () => {
|
|
582
|
+
try {
|
|
583
|
+
await onSubmit(await collectValues(form));
|
|
584
|
+
} finally {
|
|
585
|
+
setBusy(false);
|
|
586
|
+
}
|
|
587
|
+
})();
|
|
588
|
+
}, [
|
|
589
|
+
busy,
|
|
590
|
+
fieldsPending,
|
|
591
|
+
onSubmit
|
|
592
|
+
]);
|
|
571
593
|
return /* @__PURE__ */ jsxs("form", {
|
|
572
|
-
onSubmit:
|
|
573
|
-
event.preventDefault();
|
|
574
|
-
if (busy || fieldsPending) return;
|
|
575
|
-
const form = event.currentTarget;
|
|
576
|
-
setBusy(true);
|
|
577
|
-
(async () => {
|
|
578
|
-
try {
|
|
579
|
-
await onSubmit(await collectValues(form));
|
|
580
|
-
} finally {
|
|
581
|
-
setBusy(false);
|
|
582
|
-
}
|
|
583
|
-
})();
|
|
584
|
-
}, [
|
|
585
|
-
busy,
|
|
586
|
-
fieldsPending,
|
|
587
|
-
onSubmit
|
|
588
|
-
]),
|
|
594
|
+
onSubmit: handle,
|
|
589
595
|
className: clsx("flex flex-col gap-5 font-aai", className),
|
|
590
596
|
...rest,
|
|
591
597
|
children: [/* @__PURE__ */ jsx("fieldset", {
|
package/dist/internal.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as loadClientConfig, t as buildAgentUrl } from "./client-config-BT_kWID5.js";
|
|
2
2
|
import { SessionProvider, ThemeProvider } from "./context.js";
|
|
3
|
-
import { n as SessionUrlChips, r as UiUrlChip, t as ApiUrlChip } from "./url-chips-
|
|
3
|
+
import { n as SessionUrlChips, r as UiUrlChip, t as ApiUrlChip } from "./url-chips-YqhCjWfQ.js";
|
|
4
4
|
import { t as TRANSCRIBING_PLACEHOLDER } from "./use-user-transcript-C14qWFu2.js";
|
|
5
5
|
import { t as ToolConfigContext } from "./tool-config-context-DzAofqi_.js";
|
|
6
6
|
import { i as MAX_MISSING_READS, r as DEFAULT_WORKFLOW_POLL_MS, t as DEFAULT_PROGRESS_POLL_MS } from "./use-workflow-progress-Cu0SxMyg.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useSessionSelector, useTheme } from "./context.js";
|
|
2
2
|
import { i as primaryTint, r as inkTint } from "./_colors-j8XMToi9.js";
|
|
3
3
|
import { n as useUserTranscript } from "./use-user-transcript-C14qWFu2.js";
|
|
4
|
-
import { t as ToolCallBlock } from "./tool-call-block-
|
|
4
|
+
import { t as ToolCallBlock } from "./tool-call-block-tcPQAkcP.js";
|
|
5
5
|
import clsx from "clsx";
|
|
6
6
|
import { StickToBottom } from "use-stick-to-bottom";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -723,10 +723,7 @@ function createMessageHandlers(deps) {
|
|
|
723
723
|
case "error.reported":
|
|
724
724
|
handleErrorEvent(e);
|
|
725
725
|
break;
|
|
726
|
-
case "session.timed-out":
|
|
727
|
-
conn.retiredByServer = true;
|
|
728
|
-
break;
|
|
729
|
-
default: break;
|
|
726
|
+
case "session.timed-out": conn.retiredByServer = true;
|
|
730
727
|
}
|
|
731
728
|
}
|
|
732
729
|
/** Enqueue a PCM16 audio chunk for playback. Transitions state to `"speaking"` on the first chunk. */
|
package/dist/session-core.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as createSessionCore } from "./session-core-
|
|
1
|
+
import { t as createSessionCore } from "./session-core-DxBYsfHA.js";
|
|
2
2
|
export { createSessionCore };
|
|
@@ -152,18 +152,19 @@ const ToolCallBlock = memo(function ToolCallBlock({ toolCall, className }) {
|
|
|
152
152
|
const icon = config?.icon;
|
|
153
153
|
const canExpand = !isPending && Boolean(toolCall.result);
|
|
154
154
|
const formatted = useMemo(() => toolCall.result ? formatResult(toolCall.result) : "", [toolCall.result]);
|
|
155
|
+
const subtitle = useMemo(() => {
|
|
156
|
+
const args = toolCall.args;
|
|
157
|
+
if (toolCall.name === "run_code" && args.code) return truncate(String(args.code).split("\n")[0] ?? "");
|
|
158
|
+
for (const key of [
|
|
159
|
+
"query",
|
|
160
|
+
"url",
|
|
161
|
+
"question"
|
|
162
|
+
]) if (args[key]) return String(args[key]);
|
|
163
|
+
return truncate(JSON.stringify(args));
|
|
164
|
+
}, [toolCall.name, toolCall.args]);
|
|
155
165
|
return /* @__PURE__ */ jsx(ToolCallRow, {
|
|
156
166
|
title,
|
|
157
|
-
detail:
|
|
158
|
-
const args = toolCall.args;
|
|
159
|
-
if (toolCall.name === "run_code" && args.code) return truncate(String(args.code).split("\n")[0] ?? "");
|
|
160
|
-
for (const key of [
|
|
161
|
-
"query",
|
|
162
|
-
"url",
|
|
163
|
-
"question"
|
|
164
|
-
]) if (args[key]) return String(args[key]);
|
|
165
|
-
return truncate(JSON.stringify(args));
|
|
166
|
-
}, [toolCall.name, toolCall.args]),
|
|
167
|
+
detail: subtitle,
|
|
167
168
|
pending: isPending,
|
|
168
169
|
icon,
|
|
169
170
|
className,
|
|
@@ -73,9 +73,10 @@ function UiUrlChip({ className }) {
|
|
|
73
73
|
* @internal
|
|
74
74
|
*/
|
|
75
75
|
function ApiUrlChip({ className }) {
|
|
76
|
+
const apiUrl = useSessionSelector((s) => s.apiUrl);
|
|
76
77
|
return /* @__PURE__ */ jsx(UrlChip, {
|
|
77
78
|
label: "API",
|
|
78
|
-
url:
|
|
79
|
+
url: apiUrl,
|
|
79
80
|
hint: "API endpoint",
|
|
80
81
|
testId: "api-url-chip",
|
|
81
82
|
className
|
package/package.json
CHANGED
|
@@ -1,7 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alexkroman1/aai-ui",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "11.0.0",
|
|
4
4
|
"type": "module",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/alexkroman/agent.git",
|
|
9
|
+
"directory": "packages/aai-ui"
|
|
10
|
+
},
|
|
11
|
+
"engines": {
|
|
12
|
+
"node": ">=24"
|
|
13
|
+
},
|
|
14
|
+
"sideEffects": [
|
|
15
|
+
"*.css",
|
|
16
|
+
"**/*.css"
|
|
17
|
+
],
|
|
5
18
|
"files": [
|
|
6
19
|
"dist",
|
|
7
20
|
"styles.css"
|
|
@@ -33,17 +46,7 @@
|
|
|
33
46
|
"use-stick-to-bottom": "^1.1.6",
|
|
34
47
|
"use-sync-external-store": "^1.6.0",
|
|
35
48
|
"xstate": "^5.32.5",
|
|
36
|
-
"@alexkroman1/aai": "
|
|
37
|
-
},
|
|
38
|
-
"peerDependencies": {
|
|
39
|
-
"react": "^19.0.0",
|
|
40
|
-
"react-dom": "^19.0.0",
|
|
41
|
-
"tailwindcss": "^4.0.0"
|
|
42
|
-
},
|
|
43
|
-
"peerDependenciesMeta": {
|
|
44
|
-
"tailwindcss": {
|
|
45
|
-
"optional": true
|
|
46
|
-
}
|
|
49
|
+
"@alexkroman1/aai": "11.0.0"
|
|
47
50
|
},
|
|
48
51
|
"devDependencies": {
|
|
49
52
|
"@tailwindcss/vite": "^4.3.3",
|
|
@@ -61,21 +64,23 @@
|
|
|
61
64
|
"vite": "^8.2.1",
|
|
62
65
|
"vitest": "^4.1.10"
|
|
63
66
|
},
|
|
64
|
-
"
|
|
65
|
-
"
|
|
67
|
+
"peerDependencies": {
|
|
68
|
+
"react": "^19.0.0",
|
|
69
|
+
"react-dom": "^19.0.0",
|
|
70
|
+
"tailwindcss": "^4.0.0"
|
|
66
71
|
},
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
|
|
70
|
-
|
|
72
|
+
"peerDependenciesMeta": {
|
|
73
|
+
"tailwindcss": {
|
|
74
|
+
"optional": true
|
|
75
|
+
}
|
|
71
76
|
},
|
|
72
77
|
"scripts": {
|
|
73
|
-
"test": "vitest run",
|
|
74
|
-
"test:coverage": "vitest run --coverage",
|
|
75
78
|
"build": "tsdown && tsc -p tsconfig.build.json && node build-default-client.ts",
|
|
76
|
-
"
|
|
77
|
-
"lint": "biome check .",
|
|
79
|
+
"check:attw": "attw --pack --profile esm-only --exclude-entrypoints styles.css",
|
|
78
80
|
"check:publint": "publint",
|
|
79
|
-
"
|
|
81
|
+
"lint": "biome check .",
|
|
82
|
+
"test": "vitest run",
|
|
83
|
+
"test:coverage": "vitest run --coverage",
|
|
84
|
+
"typecheck": "tsc --noEmit"
|
|
80
85
|
}
|
|
81
86
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=.1,t=1500,n=.001,r=1e3,i=65e3,a=65536,o=6e5;export{n as a,t as i,e as n,i as o,a as r,r as s,o as t};
|