@alexkroman1/aai 0.8.3 → 0.8.4
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/cli/tsconfig.tsbuildinfo +1 -0
- package/dist/cli.js +1223 -1701
- package/dist/sdk/_mock_ws.js +2 -2
- package/dist/sdk/_mock_ws.js.map +1 -1
- package/dist/sdk/_render_check.d.ts.map +1 -1
- package/dist/sdk/_render_check.js +29 -2
- package/dist/sdk/_render_check.js.map +1 -1
- package/dist/sdk/_utils.d.ts +4 -0
- package/dist/sdk/_utils.d.ts.map +1 -0
- package/dist/sdk/_utils.js +7 -0
- package/dist/sdk/_utils.js.map +1 -0
- package/dist/sdk/builtin_tools.d.ts +35 -11
- package/dist/sdk/builtin_tools.d.ts.map +1 -1
- package/dist/sdk/builtin_tools.js +118 -76
- package/dist/sdk/builtin_tools.js.map +1 -1
- package/dist/sdk/capnweb.d.ts +76 -47
- package/dist/sdk/capnweb.d.ts.map +1 -1
- package/dist/sdk/capnweb.js +99 -242
- package/dist/sdk/capnweb.js.map +1 -1
- package/dist/sdk/direct_executor.d.ts.map +1 -1
- package/dist/sdk/direct_executor.js +0 -2
- package/dist/sdk/direct_executor.js.map +1 -1
- package/dist/sdk/host.d.ts +59 -0
- package/dist/sdk/host.d.ts.map +1 -0
- package/dist/sdk/host.js +131 -0
- package/dist/sdk/host.js.map +1 -0
- package/dist/sdk/mod.d.ts +2 -4
- package/dist/sdk/mod.d.ts.map +1 -1
- package/dist/sdk/mod.js +2 -3
- package/dist/sdk/mod.js.map +1 -1
- package/dist/sdk/protocol.d.ts +33 -135
- package/dist/sdk/protocol.d.ts.map +1 -1
- package/dist/sdk/protocol.js +49 -51
- package/dist/sdk/protocol.js.map +1 -1
- package/dist/sdk/runtime.d.ts +0 -1
- package/dist/sdk/runtime.d.ts.map +1 -1
- package/dist/sdk/runtime.js +5 -24
- package/dist/sdk/runtime.js.map +1 -1
- package/dist/sdk/s2s.d.ts +14 -3
- package/dist/sdk/s2s.d.ts.map +1 -1
- package/dist/sdk/s2s.js +72 -113
- package/dist/sdk/s2s.js.map +1 -1
- package/dist/sdk/server.d.ts +1 -1
- package/dist/sdk/server.d.ts.map +1 -1
- package/dist/sdk/server.js +26 -10
- package/dist/sdk/server.js.map +1 -1
- package/dist/sdk/session.d.ts +5 -1
- package/dist/sdk/session.d.ts.map +1 -1
- package/dist/sdk/session.js +131 -137
- package/dist/sdk/session.js.map +1 -1
- package/dist/sdk/tsconfig.tsbuildinfo +1 -0
- package/dist/sdk/types.d.ts +30 -3
- package/dist/sdk/types.d.ts.map +1 -1
- package/dist/sdk/types.js +37 -0
- package/dist/sdk/types.js.map +1 -1
- package/dist/sdk/winterc_server.d.ts +0 -1
- package/dist/sdk/winterc_server.d.ts.map +1 -1
- package/dist/sdk/winterc_server.js +0 -1
- package/dist/sdk/winterc_server.js.map +1 -1
- package/dist/sdk/worker_entry.d.ts +3 -11
- package/dist/sdk/worker_entry.d.ts.map +1 -1
- package/dist/sdk/worker_entry.js +8 -18
- package/dist/sdk/worker_entry.js.map +1 -1
- package/dist/sdk/worker_shim.d.ts +5 -6
- package/dist/sdk/worker_shim.d.ts.map +1 -1
- package/dist/sdk/worker_shim.js +93 -136
- package/dist/sdk/worker_shim.js.map +1 -1
- package/dist/sdk/ws_handler.d.ts +1 -3
- package/dist/sdk/ws_handler.d.ts.map +1 -1
- package/dist/sdk/ws_handler.js +14 -25
- package/dist/sdk/ws_handler.js.map +1 -1
- package/dist/ui/_cn.d.ts +5 -0
- package/dist/ui/_cn.d.ts.map +1 -0
- package/dist/ui/_cn.js +22 -0
- package/dist/ui/_cn.js.map +1 -0
- package/dist/ui/_components/app.d.ts +3 -1
- package/dist/ui/_components/app.d.ts.map +1 -1
- package/dist/ui/_components/app.js +2 -2
- package/dist/ui/_components/app.js.map +1 -1
- package/dist/ui/_components/button.d.ts +11 -0
- package/dist/ui/_components/button.d.ts.map +1 -0
- package/dist/ui/_components/button.js +17 -0
- package/dist/ui/_components/button.js.map +1 -0
- package/dist/ui/_components/chat_view.d.ts +3 -1
- package/dist/ui/_components/chat_view.d.ts.map +1 -1
- package/dist/ui/_components/chat_view.js +4 -2
- package/dist/ui/_components/chat_view.js.map +1 -1
- package/dist/ui/_components/controls.d.ts +3 -1
- package/dist/ui/_components/controls.d.ts.map +1 -1
- package/dist/ui/_components/controls.js +4 -5
- package/dist/ui/_components/controls.js.map +1 -1
- package/dist/ui/_components/error_banner.d.ts +2 -1
- package/dist/ui/_components/error_banner.d.ts.map +1 -1
- package/dist/ui/_components/error_banner.js +3 -2
- package/dist/ui/_components/error_banner.js.map +1 -1
- package/dist/ui/_components/message_bubble.d.ts +2 -1
- package/dist/ui/_components/message_bubble.d.ts.map +1 -1
- package/dist/ui/_components/message_bubble.js +5 -3
- package/dist/ui/_components/message_bubble.js.map +1 -1
- package/dist/ui/_components/message_list.d.ts +3 -1
- package/dist/ui/_components/message_list.d.ts.map +1 -1
- package/dist/ui/_components/message_list.js +7 -15
- package/dist/ui/_components/message_list.js.map +1 -1
- package/dist/ui/_components/sidebar_layout.d.ts +2 -1
- package/dist/ui/_components/sidebar_layout.d.ts.map +1 -1
- package/dist/ui/_components/sidebar_layout.js +5 -7
- package/dist/ui/_components/sidebar_layout.js.map +1 -1
- package/dist/ui/_components/start_screen.d.ts +2 -1
- package/dist/ui/_components/start_screen.d.ts.map +1 -1
- package/dist/ui/_components/start_screen.js +5 -2
- package/dist/ui/_components/start_screen.js.map +1 -1
- package/dist/ui/_components/state_indicator.d.ts +2 -1
- package/dist/ui/_components/state_indicator.d.ts.map +1 -1
- package/dist/ui/_components/state_indicator.js +3 -2
- package/dist/ui/_components/state_indicator.js.map +1 -1
- package/dist/ui/_components/thinking_indicator.d.ts +3 -1
- package/dist/ui/_components/thinking_indicator.d.ts.map +1 -1
- package/dist/ui/_components/thinking_indicator.js +4 -2
- package/dist/ui/_components/thinking_indicator.js.map +1 -1
- package/dist/ui/_components/tool_call_block.d.ts +2 -1
- package/dist/ui/_components/tool_call_block.d.ts.map +1 -1
- package/dist/ui/_components/tool_call_block.js +13 -25
- package/dist/ui/_components/tool_call_block.js.map +1 -1
- package/dist/ui/_components/transcript.d.ts +2 -1
- package/dist/ui/_components/transcript.d.ts.map +1 -1
- package/dist/ui/_components/transcript.js +3 -2
- package/dist/ui/_components/transcript.js.map +1 -1
- package/dist/ui/_jsdom_setup.d.ts +1 -0
- package/dist/ui/_jsdom_setup.d.ts.map +1 -0
- package/dist/ui/_jsdom_setup.js +6 -0
- package/dist/ui/_jsdom_setup.js.map +1 -0
- package/dist/ui/audio.d.ts.map +1 -1
- package/dist/ui/audio.js +4 -4
- package/dist/ui/audio.js.map +1 -1
- package/dist/ui/components.d.ts +13 -55
- package/dist/ui/components.d.ts.map +1 -1
- package/dist/ui/components.js +13 -42
- package/dist/ui/components.js.map +1 -1
- package/dist/ui/components_mod.d.ts +14 -3
- package/dist/ui/components_mod.d.ts.map +1 -1
- package/dist/ui/components_mod.js +14 -3
- package/dist/ui/components_mod.js.map +1 -1
- package/dist/ui/mod.d.ts +1 -8
- package/dist/ui/mod.d.ts.map +1 -1
- package/dist/ui/mod.js +1 -5
- package/dist/ui/mod.js.map +1 -1
- package/dist/ui/mount.d.ts +1 -1
- package/dist/ui/mount.d.ts.map +1 -1
- package/dist/ui/mount.js +1 -0
- package/dist/ui/mount.js.map +1 -1
- package/dist/ui/session.d.ts +0 -2
- package/dist/ui/session.d.ts.map +1 -1
- package/dist/ui/session.js +9 -18
- package/dist/ui/session.js.map +1 -1
- package/dist/ui/signals.d.ts +8 -3
- package/dist/ui/signals.d.ts.map +1 -1
- package/dist/ui/signals.js +22 -11
- package/dist/ui/signals.js.map +1 -1
- package/dist/ui/tsconfig.tsbuildinfo +1 -0
- package/dist/ui/worklets/playback-processor.js +3 -3
- package/package.json +37 -17
- package/templates/_shared/CLAUDE.md +4 -7
- package/templates/dispatch-center/agent.ts +85 -397
- package/templates/solo-rpg/agent.ts +3 -3
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type * as preact from "preact";
|
|
2
|
+
type ButtonVariant = "default" | "secondary" | "ghost";
|
|
3
|
+
type ButtonSize = "default" | "lg";
|
|
4
|
+
export declare function Button({ variant, size, className, children, ...rest }: {
|
|
5
|
+
variant?: ButtonVariant;
|
|
6
|
+
size?: ButtonSize;
|
|
7
|
+
className?: string;
|
|
8
|
+
children?: preact.ComponentChildren;
|
|
9
|
+
} & Omit<preact.JSX.HTMLAttributes<HTMLButtonElement>, "className">): preact.JSX.Element;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../ui/_components/button.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEtC,KAAK,aAAa,GAAG,SAAS,GAAG,WAAW,GAAG,OAAO,CAAC;AACvD,KAAK,UAAU,GAAG,SAAS,GAAG,IAAI,CAAC;AAEnC,wBAAgB,MAAM,CAAC,EACrB,OAAmB,EACnB,IAAgB,EAChB,SAAS,EACT,QAAQ,EACR,GAAG,IAAI,EACR,EAAE;IACD,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC,iBAAiB,CAAC;CACrC,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,cAAc,CAAC,iBAAiB,CAAC,EAAE,WAAW,CAAC,sBA8BlE"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as _jsx } from "preact/jsx-runtime";
|
|
2
|
+
// Copyright 2025 the AAI authors. MIT license.
|
|
3
|
+
import clsx from "clsx";
|
|
4
|
+
export function Button({ variant = "default", size = "default", className, children, ...rest }) {
|
|
5
|
+
return (_jsx("button", { type: "button", style: size === "lg"
|
|
6
|
+
? {
|
|
7
|
+
display: "grid",
|
|
8
|
+
placeItems: "center",
|
|
9
|
+
appearance: "none",
|
|
10
|
+
margin: 0,
|
|
11
|
+
padding: "12px 32px",
|
|
12
|
+
lineHeight: 1,
|
|
13
|
+
}
|
|
14
|
+
: undefined, class: clsx(size !== "lg" &&
|
|
15
|
+
"flex items-center justify-center appearance-none m-0 h-8 px-3 py-1.5 w-fit leading-none", "rounded-aai text-sm font-medium cursor-pointer border outline-none", variant === "secondary" && "bg-aai-surface-hover text-aai-text-secondary border-aai-border", variant === "ghost" && "bg-transparent text-aai-text-secondary border-aai-border", variant === "default" && "bg-aai-primary text-white border-transparent", className), ...rest, children: children }));
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.js","sourceRoot":"","sources":["../../../ui/_components/button.tsx"],"names":[],"mappings":";AAAA,+CAA+C;AAE/C,OAAO,IAAI,MAAM,MAAM,CAAC;AAMxB,MAAM,UAAU,MAAM,CAAC,EACrB,OAAO,GAAG,SAAS,EACnB,IAAI,GAAG,SAAS,EAChB,SAAS,EACT,QAAQ,EACR,GAAG,IAAI,EAM0D;IACjE,OAAO,CACL,iBACE,IAAI,EAAC,QAAQ,EACb,KAAK,EACH,IAAI,KAAK,IAAI;YACX,CAAC,CAAC;gBACE,OAAO,EAAE,MAAM;gBACf,UAAU,EAAE,QAAQ;gBACpB,UAAU,EAAE,MAAM;gBAClB,MAAM,EAAE,CAAC;gBACT,OAAO,EAAE,WAAW;gBACpB,UAAU,EAAE,CAAC;aACd;YACH,CAAC,CAAC,SAAS,EAEf,KAAK,EAAE,IAAI,CACT,IAAI,KAAK,IAAI;YACX,yFAAyF,EAC3F,oEAAoE,EACpE,OAAO,KAAK,WAAW,IAAI,gEAAgE,EAC3F,OAAO,KAAK,OAAO,IAAI,0DAA0D,EACjF,OAAO,KAAK,SAAS,IAAI,8CAA8C,EACvE,SAAS,CACV,KACG,IAAI,YAEP,QAAQ,GACF,CACV,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat_view.d.ts","sourceRoot":"","sources":["../../../ui/_components/chat_view.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"chat_view.d.ts","sourceRoot":"","sources":["../../../ui/_components/chat_view.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,MAAM,QAAQ,CAAC;AAQtC,wBAAgB,QAAQ,CAAC,EAAE,SAAS,EAAE,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAAC,GAAG,CAAC,OAAO,CA6BlF"}
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "preact/jsx-runtime";
|
|
2
|
+
// Copyright 2025 the AAI authors. MIT license.
|
|
3
|
+
import clsx from "clsx";
|
|
2
4
|
import { useMountConfig } from "../mount_context.js";
|
|
3
5
|
import { useSession } from "../signals.js";
|
|
4
6
|
import { Controls } from "./controls.js";
|
|
5
7
|
import { ErrorBanner } from "./error_banner.js";
|
|
6
8
|
import { MessageList } from "./message_list.js";
|
|
7
9
|
import { StateIndicator } from "./state_indicator.js";
|
|
8
|
-
export function ChatView() {
|
|
10
|
+
export function ChatView({ className }) {
|
|
9
11
|
const { session } = useSession();
|
|
10
12
|
const { title } = useMountConfig();
|
|
11
|
-
return (_jsxs("div", { class: "flex flex-col h-screen max-w-130 mx-auto bg-aai-bg text-aai-text font-aai text-sm", children: [_jsxs("div", { class: "flex items-center gap-3 px-4 py-3 border-b border-aai-border shrink-0", children: [title ? (_jsx("span", { class: "text-sm font-semibold text-aai-primary", children: title })) : (_jsx("pre", { class: "font-aai-mono text-[10px] leading-[1.1] font-bold text-aai-primary m-0", children: "▄▀█ ▄▀█ █\n█▀█ █▀█ █" })), _jsx("div", { class: "ml-auto", children: _jsx(StateIndicator, { state: session.state }) })] }), _jsx(ErrorBanner, { error: session.error }), _jsx(MessageList, {}), _jsx(Controls, {})] }));
|
|
13
|
+
return (_jsxs("div", { class: clsx("flex flex-col h-screen max-w-130 mx-auto bg-aai-bg text-aai-text font-aai text-sm", className), children: [_jsxs("div", { class: "flex items-center gap-3 px-4 py-3 border-b border-aai-border shrink-0", children: [title ? (_jsx("span", { class: "text-sm font-semibold text-aai-primary", children: title })) : (_jsx("pre", { class: "font-aai-mono text-[10px] leading-[1.1] font-bold text-aai-primary m-0", children: "▄▀█ ▄▀█ █\n█▀█ █▀█ █" })), _jsx("div", { class: "ml-auto", children: _jsx(StateIndicator, { state: session.state }) })] }), _jsx(ErrorBanner, { error: session.error }), _jsx(MessageList, {}), _jsx(Controls, {})] }));
|
|
12
14
|
}
|
|
13
15
|
//# sourceMappingURL=chat_view.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat_view.js","sourceRoot":"","sources":["../../../ui/_components/chat_view.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"chat_view.js","sourceRoot":"","sources":["../../../ui/_components/chat_view.tsx"],"names":[],"mappings":";AAAA,+CAA+C;AAE/C,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAgB,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAoB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAoB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAuB,CAAC;AAEvD,MAAM,UAAU,QAAQ,CAAC,EAAE,SAAS,EAA0B;IAC5D,MAAM,EAAE,OAAO,EAAE,GAAG,UAAU,EAAE,CAAC;IACjC,MAAM,EAAE,KAAK,EAAE,GAAG,cAAc,EAAE,CAAC;IAEnC,OAAO,CACL,eACE,KAAK,EAAE,IAAI,CACT,mFAAmF,EACnF,SAAS,CACV,aAGD,eAAK,KAAK,EAAC,uEAAuE,aAC/E,KAAK,CAAC,CAAC,CAAC,CACP,eAAM,KAAK,EAAC,wCAAwC,YAAE,KAAK,GAAQ,CACpE,CAAC,CAAC,CAAC,CACF,cAAK,KAAK,EAAC,wEAAwE,YAChF,sBAAsB,GACnB,CACP,EACD,cAAK,KAAK,EAAC,SAAS,YAClB,KAAC,cAAc,IAAC,KAAK,EAAE,OAAO,CAAC,KAAK,GAAI,GACpC,IACF,EACN,KAAC,WAAW,IAAC,KAAK,EAAE,OAAO,CAAC,KAAK,GAAI,EACrC,KAAC,WAAW,KAAG,EACf,KAAC,QAAQ,KAAG,IACR,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"controls.d.ts","sourceRoot":"","sources":["../../../ui/_components/controls.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"controls.d.ts","sourceRoot":"","sources":["../../../ui/_components/controls.tsx"],"names":[],"mappings":"AAKA,wBAAgB,QAAQ,CAAC,EAAE,SAAS,EAAE,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,gCAa7D"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "preact/jsx-runtime";
|
|
2
2
|
// Copyright 2025 the AAI authors. MIT license.
|
|
3
|
+
import clsx from "clsx";
|
|
3
4
|
import { useSession } from "../signals.js";
|
|
4
|
-
|
|
5
|
+
import { Button } from "./button.js";
|
|
6
|
+
export function Controls({ className }) {
|
|
5
7
|
const { running, toggle, reset } = useSession();
|
|
6
|
-
|
|
7
|
-
return (_jsxs("div", { class: "flex gap-2 px-4 py-3 border-t border-aai-border shrink-0", children: [_jsx("button", { type: "button", class: `${btnBase} ${running.value
|
|
8
|
-
? "bg-aai-surface-hover text-aai-text-secondary border-aai-border"
|
|
9
|
-
: "bg-aai-surface-hover text-aai-text-secondary border-aai-border"}`, onClick: toggle, children: running.value ? "Stop" : "Resume" }), _jsx("button", { type: "button", class: `${btnBase} bg-transparent text-aai-text-secondary border-aai-border`, onClick: reset, children: "New Conversation" })] }));
|
|
8
|
+
return (_jsxs("div", { class: clsx("flex gap-2 px-4 py-3 border-t border-aai-border shrink-0", className), children: [_jsx(Button, { variant: "secondary", onClick: toggle, children: running.value ? "Stop" : "Resume" }), _jsx(Button, { variant: "ghost", onClick: reset, children: "New Conversation" })] }));
|
|
10
9
|
}
|
|
11
10
|
//# sourceMappingURL=controls.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"controls.js","sourceRoot":"","sources":["../../../ui/_components/controls.tsx"],"names":[],"mappings":";AAAA,+CAA+C;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"controls.js","sourceRoot":"","sources":["../../../ui/_components/controls.tsx"],"names":[],"mappings":";AAAA,+CAA+C;AAC/C,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAc,CAAC;AAEtC,MAAM,UAAU,QAAQ,CAAC,EAAE,SAAS,EAA0B;IAC5D,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,UAAU,EAAE,CAAC;IAEhD,OAAO,CACL,eAAK,KAAK,EAAE,IAAI,CAAC,0DAA0D,EAAE,SAAS,CAAC,aACrF,KAAC,MAAM,IAAC,OAAO,EAAC,WAAW,EAAC,OAAO,EAAE,MAAM,YACxC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,GAC3B,EACT,KAAC,MAAM,IAAC,OAAO,EAAC,OAAO,EAAC,OAAO,EAAE,KAAK,iCAE7B,IACL,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { Signal } from "@preact/signals";
|
|
2
2
|
import type * as preact from "preact";
|
|
3
3
|
import type { SessionError } from "../types.ts";
|
|
4
|
-
export declare function ErrorBanner({ error, }: {
|
|
4
|
+
export declare function ErrorBanner({ error, className, }: {
|
|
5
5
|
error: Signal<SessionError | null>;
|
|
6
|
+
className?: string;
|
|
6
7
|
}): preact.JSX.Element | null;
|
|
7
8
|
//# sourceMappingURL=error_banner.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error_banner.d.ts","sourceRoot":"","sources":["../../../ui/_components/error_banner.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"error_banner.d.ts","sourceRoot":"","sources":["../../../ui/_components/error_banner.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAE9C,OAAO,KAAK,KAAK,MAAM,MAAM,QAAQ,CAAC;AACtC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,SAAS,GACV,EAAE;IACD,KAAK,EAAE,MAAM,CAAC,YAAY,GAAG,IAAI,CAAC,CAAC;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,MAAM,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,CAY5B"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx } from "preact/jsx-runtime";
|
|
2
|
-
|
|
2
|
+
import clsx from "clsx";
|
|
3
|
+
export function ErrorBanner({ error, className, }) {
|
|
3
4
|
if (!error.value)
|
|
4
5
|
return null;
|
|
5
|
-
return (_jsx("div", { class: "mx-4 mt-3 px-3 py-2 rounded-aai border border-aai-error/40 bg-aai-error/8 text-[13px] leading-[130%] text-aai-error", children: error.value.message }));
|
|
6
|
+
return (_jsx("div", { class: clsx("mx-4 mt-3 px-3 py-2 rounded-aai border border-aai-error/40 bg-aai-error/8 text-[13px] leading-[130%] text-aai-error", className), children: error.value.message }));
|
|
6
7
|
}
|
|
7
8
|
//# sourceMappingURL=error_banner.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error_banner.js","sourceRoot":"","sources":["../../../ui/_components/error_banner.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"error_banner.js","sourceRoot":"","sources":["../../../ui/_components/error_banner.tsx"],"names":[],"mappings":";AAGA,OAAO,IAAI,MAAM,MAAM,CAAC;AAIxB,MAAM,UAAU,WAAW,CAAC,EAC1B,KAAK,EACL,SAAS,GAIV;IACC,IAAI,CAAC,KAAK,CAAC,KAAK;QAAE,OAAO,IAAI,CAAC;IAC9B,OAAO,CACL,cACE,KAAK,EAAE,IAAI,CACT,qHAAqH,EACrH,SAAS,CACV,YAEA,KAAK,CAAC,KAAK,CAAC,OAAO,GAChB,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type * as preact from "preact";
|
|
2
2
|
import type { Message } from "../types.ts";
|
|
3
|
-
export declare function MessageBubble({ message }: {
|
|
3
|
+
export declare function MessageBubble({ message, className, }: {
|
|
4
4
|
message: Message;
|
|
5
|
+
className?: string;
|
|
5
6
|
}): preact.JSX.Element;
|
|
6
7
|
//# sourceMappingURL=message_bubble.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message_bubble.d.ts","sourceRoot":"","sources":["../../../ui/_components/message_bubble.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"message_bubble.d.ts","sourceRoot":"","sources":["../../../ui/_components/message_bubble.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,MAAM,QAAQ,CAAC;AACtC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAE3C,wBAAgB,aAAa,CAAC,EAC5B,OAAO,EACP,SAAS,GACV,EAAE;IACD,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,MAAM,CAAC,GAAG,CAAC,OAAO,CAqBrB"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx } from "preact/jsx-runtime";
|
|
2
|
-
|
|
2
|
+
// Copyright 2025 the AAI authors. MIT license.
|
|
3
|
+
import clsx from "clsx";
|
|
4
|
+
export function MessageBubble({ message, className, }) {
|
|
3
5
|
const isUser = message.role === "user";
|
|
4
6
|
if (isUser) {
|
|
5
|
-
return (_jsx("div", { class: "flex flex-col w-full items-end", children: _jsx("div", { class: "max-w-[min(82%,64ch)] bg-aai-surface-faint border border-aai-border px-3 py-2 rounded-aai whitespace-pre-wrap wrap-break-word text-sm font-normal leading-[150%] text-aai-text", children: message.text }) }));
|
|
7
|
+
return (_jsx("div", { class: clsx("flex flex-col w-full items-end", className), children: _jsx("div", { class: "max-w-[min(82%,64ch)] bg-aai-surface-faint border border-aai-border px-3 py-2 rounded-aai whitespace-pre-wrap wrap-break-word text-sm font-normal leading-[150%] text-aai-text", children: message.text }) }));
|
|
6
8
|
}
|
|
7
|
-
return (_jsx("div", { class: "whitespace-pre-wrap wrap-break-word text-sm font-normal leading-[150%] text-aai-text", children: message.text }));
|
|
9
|
+
return (_jsx("div", { class: clsx("whitespace-pre-wrap wrap-break-word text-sm font-normal leading-[150%] text-aai-text", className), children: message.text }));
|
|
8
10
|
}
|
|
9
11
|
//# sourceMappingURL=message_bubble.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message_bubble.js","sourceRoot":"","sources":["../../../ui/_components/message_bubble.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"message_bubble.js","sourceRoot":"","sources":["../../../ui/_components/message_bubble.tsx"],"names":[],"mappings":";AAAA,+CAA+C;AAE/C,OAAO,IAAI,MAAM,MAAM,CAAC;AAIxB,MAAM,UAAU,aAAa,CAAC,EAC5B,OAAO,EACP,SAAS,GAIV;IACC,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,KAAK,MAAM,CAAC;IACvC,IAAI,MAAM,EAAE,CAAC;QACX,OAAO,CACL,cAAK,KAAK,EAAE,IAAI,CAAC,gCAAgC,EAAE,SAAS,CAAC,YAC3D,cAAK,KAAK,EAAC,gLAAgL,YACxL,OAAO,CAAC,IAAI,GACT,GACF,CACP,CAAC;IACJ,CAAC;IACD,OAAO,CACL,cACE,KAAK,EAAE,IAAI,CACT,sFAAsF,EACtF,SAAS,CACV,YAEA,OAAO,CAAC,IAAI,GACT,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message_list.d.ts","sourceRoot":"","sources":["../../../ui/_components/message_list.tsx"],"names":[],"mappings":"AAWA,wBAAgB,WAAW,
|
|
1
|
+
{"version":3,"file":"message_list.d.ts","sourceRoot":"","sources":["../../../ui/_components/message_list.tsx"],"names":[],"mappings":"AAWA,wBAAgB,WAAW,CAAC,EAAE,SAAS,EAAE,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,gCAmDhE"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "preact/jsx-runtime";
|
|
2
2
|
// Copyright 2025 the AAI authors. MIT license.
|
|
3
|
-
import { computed
|
|
4
|
-
import
|
|
5
|
-
import { useSession } from "../signals.js";
|
|
3
|
+
import { computed } from "@preact/signals";
|
|
4
|
+
import clsx from "clsx";
|
|
5
|
+
import { useAutoScroll, useSession } from "../signals.js";
|
|
6
6
|
import { MessageBubble } from "./message_bubble.js";
|
|
7
7
|
import { ThinkingIndicator } from "./thinking_indicator.js";
|
|
8
8
|
import { ToolCallBlock } from "./tool_call_block.js";
|
|
9
9
|
import { Transcript } from "./transcript.js";
|
|
10
|
-
export function MessageList() {
|
|
10
|
+
export function MessageList({ className }) {
|
|
11
11
|
const { session } = useSession();
|
|
12
|
-
const scrollRef =
|
|
12
|
+
const scrollRef = useAutoScroll();
|
|
13
13
|
const showThinking = computed(() => {
|
|
14
14
|
if (session.state.value !== "thinking")
|
|
15
15
|
return false;
|
|
@@ -17,15 +17,7 @@ export function MessageList() {
|
|
|
17
17
|
if (last?.status === "pending")
|
|
18
18
|
return false;
|
|
19
19
|
const lastMsg = session.messages.value.at(-1);
|
|
20
|
-
return !lastMsg || lastMsg.role === "user" ||
|
|
21
|
-
});
|
|
22
|
-
useSignalEffect(() => {
|
|
23
|
-
session.messages.value;
|
|
24
|
-
session.toolCalls.value;
|
|
25
|
-
session.userUtterance.value;
|
|
26
|
-
session.agentUtterance.value;
|
|
27
|
-
session.state.value;
|
|
28
|
-
scrollRef.current?.scrollIntoView({ behavior: "smooth" });
|
|
20
|
+
return !lastMsg || lastMsg.role === "user" || Boolean(last);
|
|
29
21
|
});
|
|
30
22
|
const messages = session.messages.value;
|
|
31
23
|
const toolCalls = session.toolCalls.value;
|
|
@@ -48,6 +40,6 @@ export function MessageList() {
|
|
|
48
40
|
tci++;
|
|
49
41
|
tc = toolCalls[tci];
|
|
50
42
|
}
|
|
51
|
-
return (_jsx("div", { role: "log", class: "flex-1 overflow-y-auto [scrollbar-width:none] bg-aai-surface", children: _jsxs("div", { class: "flex flex-col gap-4.5 p-4", children: [items, session.agentUtterance.value && (_jsx(MessageBubble, { message: { role: "assistant", text: session.agentUtterance.value } })), _jsx(Transcript, { userUtterance: session.userUtterance }), showThinking.value && _jsx(ThinkingIndicator, {}), _jsx("div", { ref: scrollRef })] }) }));
|
|
43
|
+
return (_jsx("div", { role: "log", class: clsx("flex-1 overflow-y-auto [scrollbar-width:none] bg-aai-surface", className), children: _jsxs("div", { class: "flex flex-col gap-4.5 p-4", children: [items, session.agentUtterance.value && (_jsx(MessageBubble, { message: { role: "assistant", text: session.agentUtterance.value } })), _jsx(Transcript, { userUtterance: session.userUtterance }), showThinking.value && _jsx(ThinkingIndicator, {}), _jsx("div", { ref: scrollRef })] }) }));
|
|
52
44
|
}
|
|
53
45
|
//# sourceMappingURL=message_list.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message_list.js","sourceRoot":"","sources":["../../../ui/_components/message_list.tsx"],"names":[],"mappings":";AAAA,+CAA+C;AAE/C,OAAO,EAAE,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"message_list.js","sourceRoot":"","sources":["../../../ui/_components/message_list.tsx"],"names":[],"mappings":";AAAA,+CAA+C;AAE/C,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAsB,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAA0B,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAuB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAkB,CAAC;AAE9C,MAAM,UAAU,WAAW,CAAC,EAAE,SAAS,EAA0B;IAC/D,MAAM,EAAE,OAAO,EAAE,GAAG,UAAU,EAAE,CAAC;IACjC,MAAM,SAAS,GAAG,aAAa,EAAE,CAAC;IAElC,MAAM,YAAY,GAAG,QAAQ,CAAC,GAAG,EAAE;QACjC,IAAI,OAAO,CAAC,KAAK,CAAC,KAAK,KAAK,UAAU;YAAE,OAAO,KAAK,CAAC;QACrD,MAAM,IAAI,GAAG,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;QAC5C,IAAI,IAAI,EAAE,MAAM,KAAK,SAAS;YAAE,OAAO,KAAK,CAAC;QAC7C,MAAM,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;QAC9C,OAAO,CAAC,OAAO,IAAI,OAAO,CAAC,IAAI,KAAK,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9D,CAAC,CAAC,CAAC;IAEH,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC;IACxC,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC;IAE1C,kDAAkD;IAClD,MAAM,KAAK,GAAY,EAAE,CAAC;IAC1B,IAAI,GAAG,GAAG,CAAC,CAAC;IACZ,KAAK,MAAM,CAAC,CAAC,EAAE,GAAG,CAAC,IAAI,QAAQ,CAAC,OAAO,EAAE,EAAE,CAAC;QAC1C,KAAK,CAAC,IAAI,CAAC,KAAC,aAAa,IAAkB,OAAO,EAAE,GAAG,IAAxB,OAAO,CAAC,EAAE,CAAkB,CAAC,CAAC;QAC7D,IAAI,EAAE,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC;QACxB,OAAO,EAAE,IAAI,EAAE,CAAC,iBAAiB,IAAI,CAAC,EAAE,CAAC;YACvC,KAAK,CAAC,IAAI,CAAC,KAAC,aAAa,IAAqB,QAAQ,EAAE,EAAE,IAA3B,EAAE,CAAC,UAAU,CAAkB,CAAC,CAAC;YAChE,GAAG,EAAE,CAAC;YACN,EAAE,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC;QACtB,CAAC;IACH,CAAC;IACD,sEAAsE;IACtE,IAAI,EAAE,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC;IACxB,OAAO,EAAE,EAAE,CAAC;QACV,KAAK,CAAC,IAAI,CAAC,KAAC,aAAa,IAAqB,QAAQ,EAAE,EAAE,IAA3B,EAAE,CAAC,UAAU,CAAkB,CAAC,CAAC;QAChE,GAAG,EAAE,CAAC;QACN,EAAE,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC;IACtB,CAAC;IAED,OAAO,CACL,cACE,IAAI,EAAC,KAAK,EACV,KAAK,EAAE,IAAI,CAAC,8DAA8D,EAAE,SAAS,CAAC,YAEtF,eAAK,KAAK,EAAC,2BAA2B,aACnC,KAAK,EACL,OAAO,CAAC,cAAc,CAAC,KAAK,IAAI,CAC/B,KAAC,aAAa,IAAC,OAAO,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,OAAO,CAAC,cAAc,CAAC,KAAK,EAAE,GAAI,CACtF,EACD,KAAC,UAAU,IAAC,aAAa,EAAE,OAAO,CAAC,aAAa,GAAI,EACnD,YAAY,CAAC,KAAK,IAAI,KAAC,iBAAiB,KAAG,EAC5C,cAAK,GAAG,EAAE,SAAS,GAAI,IACnB,GACF,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -10,10 +10,11 @@ import type { ComponentChildren } from "preact";
|
|
|
10
10
|
* </SidebarLayout>
|
|
11
11
|
* ```
|
|
12
12
|
*/
|
|
13
|
-
export declare function SidebarLayout({ sidebar, children, width, side, }: {
|
|
13
|
+
export declare function SidebarLayout({ sidebar, children, width, side, className, }: {
|
|
14
14
|
sidebar: ComponentChildren;
|
|
15
15
|
children: ComponentChildren;
|
|
16
16
|
width?: string | undefined;
|
|
17
17
|
side?: "left" | "right" | undefined;
|
|
18
|
+
className?: string;
|
|
18
19
|
}): import("preact").JSX.Element;
|
|
19
20
|
//# sourceMappingURL=sidebar_layout.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sidebar_layout.d.ts","sourceRoot":"","sources":["../../../ui/_components/sidebar_layout.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sidebar_layout.d.ts","sourceRoot":"","sources":["../../../ui/_components/sidebar_layout.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAEhD;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAAC,EAC5B,OAAO,EACP,QAAQ,EACR,KAAe,EACf,IAAa,EACb,SAAS,GACV,EAAE;IACD,OAAO,EAAE,iBAAiB,CAAC;IAC3B,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,gCAoBA"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "preact/jsx-runtime";
|
|
2
|
+
// Copyright 2025 the AAI authors. MIT license.
|
|
3
|
+
import clsx from "clsx";
|
|
2
4
|
/**
|
|
3
5
|
* A two-column layout with a fixed-width sidebar and a flexible main area.
|
|
4
6
|
* Commonly used to pair a custom sidebar (cart, dashboard) with `<ChatView />`.
|
|
@@ -10,12 +12,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "preact/jsx-runtime";
|
|
|
10
12
|
* </SidebarLayout>
|
|
11
13
|
* ```
|
|
12
14
|
*/
|
|
13
|
-
export function SidebarLayout({ sidebar, children, width = "20rem", side = "left", }) {
|
|
14
|
-
const sidebarEl = (_jsx("div", { class: "flex-shrink-0 flex flex-col overflow-y-auto", style: {
|
|
15
|
-
|
|
16
|
-
borderRight: side === "left" ? "1px solid var(--color-aai-border)" : undefined,
|
|
17
|
-
borderLeft: side === "right" ? "1px solid var(--color-aai-border)" : undefined,
|
|
18
|
-
}, children: sidebar }));
|
|
19
|
-
return (_jsxs("div", { class: "flex h-screen", style: { background: "var(--color-aai-bg)" }, children: [side === "left" && sidebarEl, _jsx("div", { class: "flex-1 min-w-0", children: children }), side === "right" && sidebarEl] }));
|
|
15
|
+
export function SidebarLayout({ sidebar, children, width = "20rem", side = "left", className, }) {
|
|
16
|
+
const sidebarEl = (_jsx("div", { class: clsx("flex-shrink-0 flex flex-col overflow-y-auto", side === "left" ? "border-r border-aai-border" : "border-l border-aai-border"), style: { width }, children: sidebar }));
|
|
17
|
+
return (_jsxs("div", { class: clsx("flex h-screen bg-aai-bg", className), children: [side === "left" && sidebarEl, _jsx("div", { class: "flex-1 min-w-0", children: children }), side === "right" && sidebarEl] }));
|
|
20
18
|
}
|
|
21
19
|
//# sourceMappingURL=sidebar_layout.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sidebar_layout.js","sourceRoot":"","sources":["../../../ui/_components/sidebar_layout.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"sidebar_layout.js","sourceRoot":"","sources":["../../../ui/_components/sidebar_layout.tsx"],"names":[],"mappings":";AAAA,+CAA+C;AAE/C,OAAO,IAAI,MAAM,MAAM,CAAC;AAGxB;;;;;;;;;;GAUG;AACH,MAAM,UAAU,aAAa,CAAC,EAC5B,OAAO,EACP,QAAQ,EACR,KAAK,GAAG,OAAO,EACf,IAAI,GAAG,MAAM,EACb,SAAS,GAOV;IACC,MAAM,SAAS,GAAG,CAChB,cACE,KAAK,EAAE,IAAI,CACT,6CAA6C,EAC7C,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,4BAA4B,CAAC,CAAC,CAAC,4BAA4B,CAC9E,EACD,KAAK,EAAE,EAAE,KAAK,EAAE,YAEf,OAAO,GACJ,CACP,CAAC;IAEF,OAAO,CACL,eAAK,KAAK,EAAE,IAAI,CAAC,yBAAyB,EAAE,SAAS,CAAC,aACnD,IAAI,KAAK,MAAM,IAAI,SAAS,EAC7B,cAAK,KAAK,EAAC,gBAAgB,YAAE,QAAQ,GAAO,EAC3C,IAAI,KAAK,OAAO,IAAI,SAAS,IAC1B,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -14,11 +14,12 @@ import type { ComponentChildren } from "preact";
|
|
|
14
14
|
* }
|
|
15
15
|
* ```
|
|
16
16
|
*/
|
|
17
|
-
export declare function StartScreen({ children, icon, title, subtitle, buttonText, }: {
|
|
17
|
+
export declare function StartScreen({ children, icon, title, subtitle, buttonText, className, }: {
|
|
18
18
|
children: ComponentChildren;
|
|
19
19
|
icon?: ComponentChildren | undefined;
|
|
20
20
|
title?: string | undefined;
|
|
21
21
|
subtitle?: string | undefined;
|
|
22
22
|
buttonText?: string | undefined;
|
|
23
|
+
className?: string | undefined;
|
|
23
24
|
}): import("preact").JSX.Element;
|
|
24
25
|
//# sourceMappingURL=start_screen.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"start_screen.d.ts","sourceRoot":"","sources":["../../../ui/_components/start_screen.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"start_screen.d.ts","sourceRoot":"","sources":["../../../ui/_components/start_screen.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAIhD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,WAAW,CAAC,EAC1B,QAAQ,EACR,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,UAAoB,EACpB,SAAS,GACV,EAAE;IACD,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,IAAI,CAAC,EAAE,iBAAiB,GAAG,SAAS,CAAC;IACrC,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAChC,gCAmBA"}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "preact/jsx-runtime";
|
|
2
|
+
// Copyright 2025 the AAI authors. MIT license.
|
|
3
|
+
import clsx from "clsx";
|
|
2
4
|
import { useSession } from "../signals.js";
|
|
5
|
+
import { Button } from "./button.js";
|
|
3
6
|
/**
|
|
4
7
|
* A centered start screen with icon, title, subtitle, and a start button.
|
|
5
8
|
* Renders `children` (the main app) once the session has started.
|
|
@@ -15,11 +18,11 @@ import { useSession } from "../signals.js";
|
|
|
15
18
|
* }
|
|
16
19
|
* ```
|
|
17
20
|
*/
|
|
18
|
-
export function StartScreen({ children, icon, title, subtitle, buttonText = "Start", }) {
|
|
21
|
+
export function StartScreen({ children, icon, title, subtitle, buttonText = "Start", className, }) {
|
|
19
22
|
const { started, start } = useSession();
|
|
20
23
|
if (started.value) {
|
|
21
24
|
return _jsx(_Fragment, { children: children });
|
|
22
25
|
}
|
|
23
|
-
return (_jsx("div", { class: "flex items-center justify-center h-screen bg-aai-bg font-aai", children: _jsxs("div", { class: "flex flex-col items-center gap-4 bg-aai-surface border border-aai-border rounded-lg px-12 py-10 max-w-sm text-center", children: [icon, title && _jsx("h1", { class: "font-semibold text-aai-primary m-0", children: title }), subtitle && _jsx("p", { class: "text-sm text-aai-text-muted m-0", children: subtitle }), _jsx(
|
|
26
|
+
return (_jsx("div", { class: clsx("flex items-center justify-center h-screen bg-aai-bg font-aai", className), children: _jsxs("div", { class: "flex flex-col items-center gap-4 bg-aai-surface border border-aai-border rounded-lg px-12 py-10 max-w-sm text-center", children: [icon, title && _jsx("h1", { class: "font-semibold text-aai-primary m-0", children: title }), subtitle && _jsx("p", { class: "text-sm text-aai-text-muted m-0", children: subtitle }), _jsx(Button, { size: "lg", className: "mt-2 w-full", onClick: start, children: buttonText })] }) }));
|
|
24
27
|
}
|
|
25
28
|
//# sourceMappingURL=start_screen.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"start_screen.js","sourceRoot":"","sources":["../../../ui/_components/start_screen.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"start_screen.js","sourceRoot":"","sources":["../../../ui/_components/start_screen.tsx"],"names":[],"mappings":";AAAA,+CAA+C;AAE/C,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAc,CAAC;AAEtC;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,WAAW,CAAC,EAC1B,QAAQ,EACR,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,UAAU,GAAG,OAAO,EACpB,SAAS,GAQV;IACC,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,UAAU,EAAE,CAAC;IAExC,IAAI,OAAO,CAAC,KAAK,EAAE,CAAC;QAClB,OAAO,4BAAG,QAAQ,GAAI,CAAC;IACzB,CAAC;IAED,OAAO,CACL,cAAK,KAAK,EAAE,IAAI,CAAC,8DAA8D,EAAE,SAAS,CAAC,YACzF,eAAK,KAAK,EAAC,sHAAsH,aAC9H,IAAI,EACJ,KAAK,IAAI,aAAI,KAAK,EAAC,oCAAoC,YAAE,KAAK,GAAM,EACpE,QAAQ,IAAI,YAAG,KAAK,EAAC,iCAAiC,YAAE,QAAQ,GAAK,EACtE,KAAC,MAAM,IAAC,IAAI,EAAC,IAAI,EAAC,SAAS,EAAC,aAAa,EAAC,OAAO,EAAE,KAAK,YACrD,UAAU,GACJ,IACL,GACF,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { Signal } from "@preact/signals";
|
|
2
2
|
import type * as preact from "preact";
|
|
3
3
|
import type { AgentState } from "../types.ts";
|
|
4
|
-
export declare function StateIndicator({ state }: {
|
|
4
|
+
export declare function StateIndicator({ state, className, }: {
|
|
5
5
|
state: Signal<AgentState>;
|
|
6
|
+
className?: string;
|
|
6
7
|
}): preact.JSX.Element;
|
|
7
8
|
//# sourceMappingURL=state_indicator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state_indicator.d.ts","sourceRoot":"","sources":["../../../ui/_components/state_indicator.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"state_indicator.d.ts","sourceRoot":"","sources":["../../../ui/_components/state_indicator.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAE9C,OAAO,KAAK,KAAK,MAAM,MAAM,QAAQ,CAAC;AACtC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C,wBAAgB,cAAc,CAAC,EAC7B,KAAK,EACL,SAAS,GACV,EAAE;IACD,KAAK,EAAE,MAAM,CAAC,UAAU,CAAC,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,MAAM,CAAC,GAAG,CAAC,OAAO,CAerB"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "preact/jsx-runtime";
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import clsx from "clsx";
|
|
3
|
+
export function StateIndicator({ state, className, }) {
|
|
4
|
+
return (_jsxs("div", { class: clsx("inline-flex items-center justify-center gap-1.5 text-[13px] font-medium leading-[130%] text-aai-text-muted capitalize", className), children: [_jsx("div", { "data-state": state.value, class: "w-2 h-2 rounded-full data-[state=disconnected]:bg-aai-state-disconnected data-[state=connecting]:bg-aai-state-connecting data-[state=ready]:bg-aai-state-ready data-[state=listening]:bg-aai-state-listening data-[state=thinking]:bg-aai-state-thinking data-[state=speaking]:bg-aai-state-speaking data-[state=error]:bg-aai-state-error" }), state] }));
|
|
4
5
|
}
|
|
5
6
|
//# sourceMappingURL=state_indicator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state_indicator.js","sourceRoot":"","sources":["../../../ui/_components/state_indicator.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"state_indicator.js","sourceRoot":"","sources":["../../../ui/_components/state_indicator.tsx"],"names":[],"mappings":";AAGA,OAAO,IAAI,MAAM,MAAM,CAAC;AAIxB,MAAM,UAAU,cAAc,CAAC,EAC7B,KAAK,EACL,SAAS,GAIV;IACC,OAAO,CACL,eACE,KAAK,EAAE,IAAI,CACT,uHAAuH,EACvH,SAAS,CACV,aAED,4BACc,KAAK,CAAC,KAAK,EACvB,KAAK,EAAC,4UAA4U,GAClV,EACD,KAAK,IACF,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"thinking_indicator.d.ts","sourceRoot":"","sources":["../../../ui/_components/thinking_indicator.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"thinking_indicator.d.ts","sourceRoot":"","sources":["../../../ui/_components/thinking_indicator.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEtC,wBAAgB,iBAAiB,CAAC,EAAE,SAAS,EAAE,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAAC,GAAG,CAAC,OAAO,CAoB3F"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx } from "preact/jsx-runtime";
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
// Copyright 2025 the AAI authors. MIT license.
|
|
3
|
+
import clsx from "clsx";
|
|
4
|
+
export function ThinkingIndicator({ className }) {
|
|
5
|
+
return (_jsx("div", { class: clsx("flex items-center gap-2 text-aai-text-dim text-sm font-medium min-h-5", className), children: [0, 0.16, 0.32].map((delay) => (_jsx("div", { class: "w-1.5 h-1.5 rounded-full bg-aai-text-dim", style: {
|
|
4
6
|
animation: "aai-bounce 1.4s infinite ease-in-out both",
|
|
5
7
|
animationDelay: `${delay}s`,
|
|
6
8
|
} }, delay))) }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"thinking_indicator.js","sourceRoot":"","sources":["../../../ui/_components/thinking_indicator.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"thinking_indicator.js","sourceRoot":"","sources":["../../../ui/_components/thinking_indicator.tsx"],"names":[],"mappings":";AAAA,+CAA+C;AAE/C,OAAO,IAAI,MAAM,MAAM,CAAC;AAGxB,MAAM,UAAU,iBAAiB,CAAC,EAAE,SAAS,EAA0B;IACrE,OAAO,CACL,cACE,KAAK,EAAE,IAAI,CACT,uEAAuE,EACvE,SAAS,CACV,YAEA,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAC9B,cAEE,KAAK,EAAC,0CAA0C,EAChD,KAAK,EAAE;gBACL,SAAS,EAAE,2CAA2C;gBACtD,cAAc,EAAE,GAAG,KAAK,GAAG;aAC5B,IALI,KAAK,CAMV,CACH,CAAC,GACE,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type * as preact from "preact";
|
|
2
2
|
import type { ToolCallInfo } from "../types.ts";
|
|
3
|
-
export declare function ToolCallBlock({ toolCall }: {
|
|
3
|
+
export declare function ToolCallBlock({ toolCall, className, }: {
|
|
4
4
|
toolCall: ToolCallInfo;
|
|
5
|
+
className?: string;
|
|
5
6
|
}): preact.JSX.Element;
|
|
6
7
|
//# sourceMappingURL=tool_call_block.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool_call_block.d.ts","sourceRoot":"","sources":["../../../ui/_components/tool_call_block.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tool_call_block.d.ts","sourceRoot":"","sources":["../../../ui/_components/tool_call_block.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEtC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAuDhD,wBAAgB,aAAa,CAAC,EAC5B,QAAQ,EACR,SAAS,GACV,EAAE;IACD,QAAQ,EAAE,YAAY,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,MAAM,CAAC,GAAG,CAAC,OAAO,CAgDrB"}
|
|
@@ -1,36 +1,22 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "preact/jsx-runtime";
|
|
2
|
-
|
|
2
|
+
// Copyright 2025 the AAI authors. MIT license.
|
|
3
|
+
import clsx from "clsx";
|
|
4
|
+
import { useMemo, useState } from "preact/hooks";
|
|
3
5
|
import { BoltIcon, ChatBubbleIcon, DownloadIcon, ExternalLinkIcon, SearchIcon, TerminalIcon, } from "./tool_icons.js";
|
|
6
|
+
const argField = (key) => (args) => String(args[key] ?? "");
|
|
4
7
|
const TOOL_CONFIG = {
|
|
5
|
-
web_search: {
|
|
6
|
-
|
|
7
|
-
title: "Web Search",
|
|
8
|
-
subtitle: (args) => String(args.query ?? ""),
|
|
9
|
-
},
|
|
10
|
-
visit_webpage: {
|
|
11
|
-
Icon: ExternalLinkIcon,
|
|
12
|
-
title: "Visit Page",
|
|
13
|
-
subtitle: (args) => String(args.url ?? ""),
|
|
14
|
-
},
|
|
8
|
+
web_search: { Icon: SearchIcon, title: "Web Search", subtitle: argField("query") },
|
|
9
|
+
visit_webpage: { Icon: ExternalLinkIcon, title: "Visit Page", subtitle: argField("url") },
|
|
15
10
|
run_code: {
|
|
16
11
|
Icon: TerminalIcon,
|
|
17
12
|
title: "Run Code",
|
|
18
13
|
subtitle: (args) => {
|
|
19
|
-
const
|
|
20
|
-
const firstLine = code.split("\n")[0] ?? "";
|
|
14
|
+
const firstLine = String(args.code ?? "").split("\n")[0] ?? "";
|
|
21
15
|
return firstLine.length > 80 ? `${firstLine.slice(0, 80)}...` : firstLine;
|
|
22
16
|
},
|
|
23
17
|
},
|
|
24
|
-
fetch_json: {
|
|
25
|
-
|
|
26
|
-
title: "Fetch JSON",
|
|
27
|
-
subtitle: (args) => String(args.url ?? ""),
|
|
28
|
-
},
|
|
29
|
-
user_input: {
|
|
30
|
-
Icon: ChatBubbleIcon,
|
|
31
|
-
title: "Asking User",
|
|
32
|
-
subtitle: (args) => String(args.question ?? ""),
|
|
33
|
-
},
|
|
18
|
+
fetch_json: { Icon: DownloadIcon, title: "Fetch JSON", subtitle: argField("url") },
|
|
19
|
+
user_input: { Icon: ChatBubbleIcon, title: "Asking User", subtitle: argField("question") },
|
|
34
20
|
};
|
|
35
21
|
const DEFAULT_CONFIG = {
|
|
36
22
|
Icon: BoltIcon,
|
|
@@ -48,11 +34,13 @@ function formatResult(result) {
|
|
|
48
34
|
return result;
|
|
49
35
|
}
|
|
50
36
|
}
|
|
51
|
-
export function ToolCallBlock({ toolCall }) {
|
|
37
|
+
export function ToolCallBlock({ toolCall, className, }) {
|
|
52
38
|
const [isOpen, setOpen] = useState(false);
|
|
53
39
|
const config = TOOL_CONFIG[toolCall.toolName] ?? DEFAULT_CONFIG;
|
|
54
40
|
const isPending = toolCall.status === "pending";
|
|
55
41
|
const title = config.title || toolCall.toolName;
|
|
56
|
-
|
|
42
|
+
const canExpand = !isPending && !!toolCall.result;
|
|
43
|
+
const formatted = useMemo(() => (toolCall.result ? formatResult(toolCall.result) : ""), [toolCall.result]);
|
|
44
|
+
return (_jsxs("div", { class: clsx("flex flex-col", className), children: [_jsxs("button", { type: "button", "aria-expanded": canExpand ? isOpen : undefined, disabled: isPending, class: clsx("flex items-center gap-2 px-3 py-2 rounded-aai border border-aai-border bg-aai-surface-faint select-none text-left w-full", canExpand && "cursor-pointer"), onClick: () => canExpand && setOpen(!isOpen), children: [_jsx(config.Icon, { class: "w-4 h-4 text-aai-text-dim shrink-0" }), _jsx("span", { class: clsx("text-sm font-medium text-aai-text", isPending && "tool-shimmer"), children: title }), _jsx("span", { class: "text-sm text-aai-text-dim truncate flex-1 min-w-0", children: config.subtitle(toolCall.args) }), canExpand && (_jsx("span", { class: "text-xs text-aai-text-dim shrink-0", children: isOpen ? "\u25BE" : "\u25B8" }))] }), isOpen && (_jsxs("div", { class: "border-x border-b border-aai-border rounded-b-aai bg-aai-surface max-h-64 overflow-auto", children: [toolCall.toolName === "run_code" && toolCall.args.code && (_jsx("pre", { class: "text-xs text-aai-text p-2 whitespace-pre-wrap border-b border-aai-border font-mono", children: String(toolCall.args.code) })), formatted && (_jsx("pre", { class: "text-xs text-aai-text-dim p-2 whitespace-pre-wrap", children: formatted }))] }))] }));
|
|
57
45
|
}
|
|
58
46
|
//# sourceMappingURL=tool_call_block.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool_call_block.js","sourceRoot":"","sources":["../../../ui/_components/tool_call_block.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"tool_call_block.js","sourceRoot":"","sources":["../../../ui/_components/tool_call_block.tsx"],"names":[],"mappings":"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"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Signal } from "@preact/signals";
|
|
2
2
|
import type * as preact from "preact";
|
|
3
|
-
export declare function Transcript({ userUtterance, }: {
|
|
3
|
+
export declare function Transcript({ userUtterance, className, }: {
|
|
4
4
|
userUtterance: Signal<string | null>;
|
|
5
|
+
className?: string;
|
|
5
6
|
}): preact.JSX.Element | null;
|
|
6
7
|
//# sourceMappingURL=transcript.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transcript.d.ts","sourceRoot":"","sources":["../../../ui/_components/transcript.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"transcript.d.ts","sourceRoot":"","sources":["../../../ui/_components/transcript.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAE9C,OAAO,KAAK,KAAK,MAAM,MAAM,QAAQ,CAAC;AAGtC,wBAAgB,UAAU,CAAC,EACzB,aAAa,EACb,SAAS,GACV,EAAE;IACD,aAAa,EAAE,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,MAAM,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,CAS5B"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx } from "preact/jsx-runtime";
|
|
2
|
+
import clsx from "clsx";
|
|
2
3
|
import { ThinkingIndicator } from "./thinking_indicator.js";
|
|
3
|
-
export function Transcript({ userUtterance, }) {
|
|
4
|
+
export function Transcript({ userUtterance, className, }) {
|
|
4
5
|
if (userUtterance.value === null)
|
|
5
6
|
return null;
|
|
6
|
-
return (_jsx("div", { class: "flex flex-col items-end w-full", children: _jsx("div", { class: "max-w-[min(82%,64ch)] whitespace-pre-wrap wrap-break-word text-sm leading-[150%] text-aai-text-muted bg-aai-surface-faint border border-aai-border px-3 py-2 rounded-aai ml-auto", children: userUtterance.value || _jsx(ThinkingIndicator, {}) }) }));
|
|
7
|
+
return (_jsx("div", { class: clsx("flex flex-col items-end w-full", className), children: _jsx("div", { class: "max-w-[min(82%,64ch)] whitespace-pre-wrap wrap-break-word text-sm leading-[150%] text-aai-text-muted bg-aai-surface-faint border border-aai-border px-3 py-2 rounded-aai ml-auto", children: userUtterance.value || _jsx(ThinkingIndicator, {}) }) }));
|
|
7
8
|
}
|
|
8
9
|
//# sourceMappingURL=transcript.js.map
|