@alexkroman1/aai-ui 0.12.2 → 0.12.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{_components → components}/app.js +1 -1
- package/dist/{_components → components}/button.js +1 -1
- package/dist/{_components → components}/chat-view.js +1 -1
- package/dist/{_components → components}/controls.js +1 -1
- package/dist/{_components → components}/error-banner.js +1 -1
- package/dist/{_components → components}/message-bubble.js +1 -1
- package/dist/{_components → components}/message-list.js +1 -1
- package/dist/{_components → components}/sidebar-layout.js +1 -1
- package/dist/{_components → components}/start-screen.js +1 -1
- package/dist/{_components → components}/state-indicator.js +1 -1
- package/dist/{_components → components}/thinking-indicator.js +1 -1
- package/dist/{_components → components}/tool-call-block.js +1 -1
- package/dist/{_components → components}/tool-icons.js +1 -1
- package/dist/{_components → components}/transcript.js +1 -1
- package/dist/index.d.ts +14 -14
- package/dist/index.js +13 -13
- package/package.json +8 -6
- /package/dist/{_components → components}/app.d.ts +0 -0
- /package/dist/{_components → components}/button.d.ts +0 -0
- /package/dist/{_components → components}/chat-view.d.ts +0 -0
- /package/dist/{_components → components}/controls.d.ts +0 -0
- /package/dist/{_components → components}/error-banner.d.ts +0 -0
- /package/dist/{_components → components}/message-bubble.d.ts +0 -0
- /package/dist/{_components → components}/message-list.d.ts +0 -0
- /package/dist/{_components → components}/sidebar-layout.d.ts +0 -0
- /package/dist/{_components → components}/start-screen.d.ts +0 -0
- /package/dist/{_components → components}/state-indicator.d.ts +0 -0
- /package/dist/{_components → components}/thinking-indicator.d.ts +0 -0
- /package/dist/{_components → components}/tool-call-block.d.ts +0 -0
- /package/dist/{_components → components}/tool-icons.d.ts +0 -0
- /package/dist/{_components → components}/transcript.d.ts +0 -0
|
@@ -2,7 +2,7 @@ import { useClientConfig } from "../client-context.js";
|
|
|
2
2
|
import { ChatView } from "./chat-view.js";
|
|
3
3
|
import { StartScreen } from "./start-screen.js";
|
|
4
4
|
import { jsx } from "preact/jsx-runtime";
|
|
5
|
-
//#region
|
|
5
|
+
//#region components/app.tsx
|
|
6
6
|
function AnsiLogo() {
|
|
7
7
|
return /* @__PURE__ */ jsx("pre", {
|
|
8
8
|
class: "font-aai-mono text-lg leading-[1.1] font-bold text-aai-primary m-0",
|
|
@@ -6,7 +6,7 @@ import { MessageList } from "./message-list.js";
|
|
|
6
6
|
import { StateIndicator } from "./state-indicator.js";
|
|
7
7
|
import clsx from "clsx";
|
|
8
8
|
import { jsx, jsxs } from "preact/jsx-runtime";
|
|
9
|
-
//#region
|
|
9
|
+
//#region components/chat-view.tsx
|
|
10
10
|
/**
|
|
11
11
|
* The main chat interface for a voice agent session.
|
|
12
12
|
* Displays a header (with title and {@link StateIndicator}), an
|
|
@@ -2,7 +2,7 @@ import { useSession } from "../signals.js";
|
|
|
2
2
|
import { Button } from "./button.js";
|
|
3
3
|
import clsx from "clsx";
|
|
4
4
|
import { jsx, jsxs } from "preact/jsx-runtime";
|
|
5
|
-
//#region
|
|
5
|
+
//#region components/controls.tsx
|
|
6
6
|
/**
|
|
7
7
|
* Session control buttons: **Stop / Resume** and **New Conversation**.
|
|
8
8
|
*
|
|
@@ -6,7 +6,7 @@ import { Transcript } from "./transcript.js";
|
|
|
6
6
|
import clsx from "clsx";
|
|
7
7
|
import { useComputed } from "@preact/signals";
|
|
8
8
|
import { jsx, jsxs } from "preact/jsx-runtime";
|
|
9
|
-
//#region
|
|
9
|
+
//#region components/message-list.tsx
|
|
10
10
|
/**
|
|
11
11
|
* Scrollable list of all chat messages, tool-call blocks, live transcript,
|
|
12
12
|
* streaming agent utterance, and a thinking indicator.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import clsx from "clsx";
|
|
2
2
|
import { jsx, jsxs } from "preact/jsx-runtime";
|
|
3
|
-
//#region
|
|
3
|
+
//#region components/sidebar-layout.tsx
|
|
4
4
|
/**
|
|
5
5
|
* A two-column layout with a fixed-width sidebar and a flexible main area.
|
|
6
6
|
* Commonly used to pair a custom sidebar (cart, dashboard) with `<ChatView />`.
|
|
@@ -2,7 +2,7 @@ import { useSession } from "../signals.js";
|
|
|
2
2
|
import { Button } from "./button.js";
|
|
3
3
|
import clsx from "clsx";
|
|
4
4
|
import { Fragment, jsx, jsxs } from "preact/jsx-runtime";
|
|
5
|
-
//#region
|
|
5
|
+
//#region components/start-screen.tsx
|
|
6
6
|
/**
|
|
7
7
|
* A centered start screen with icon, title, subtitle, and a start button.
|
|
8
8
|
* Renders `children` (the main app) once the session has started.
|
|
@@ -2,7 +2,7 @@ import { BoltIcon, ChatBubbleIcon, DownloadIcon, ExternalLinkIcon, SearchIcon, T
|
|
|
2
2
|
import clsx from "clsx";
|
|
3
3
|
import { useComputed, useSignal } from "@preact/signals";
|
|
4
4
|
import { jsx, jsxs } from "preact/jsx-runtime";
|
|
5
|
-
//#region
|
|
5
|
+
//#region components/tool-call-block.tsx
|
|
6
6
|
const argField = (key) => (args) => String(args[key] ?? "");
|
|
7
7
|
const TOOL_CONFIG = {
|
|
8
8
|
web_search: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ThinkingIndicator } from "./thinking-indicator.js";
|
|
2
2
|
import clsx from "clsx";
|
|
3
3
|
import { jsx } from "preact/jsx-runtime";
|
|
4
|
-
//#region
|
|
4
|
+
//#region components/transcript.tsx
|
|
5
5
|
/**
|
|
6
6
|
* Live speech-to-text transcript shown while the user is speaking.
|
|
7
7
|
* Returns `null` when there is no active utterance.
|
package/dist/index.d.ts
CHANGED
|
@@ -12,22 +12,22 @@
|
|
|
12
12
|
* defineClient(App, { target: "#app" });
|
|
13
13
|
* ```
|
|
14
14
|
*/
|
|
15
|
-
export { App } from "./_components/app.tsx";
|
|
16
|
-
export type { ButtonSize, ButtonVariant } from "./_components/button.tsx";
|
|
17
|
-
export { Button } from "./_components/button.tsx";
|
|
18
|
-
export { ChatView } from "./_components/chat-view.tsx";
|
|
19
|
-
export { Controls } from "./_components/controls.tsx";
|
|
20
|
-
export { ErrorBanner } from "./_components/error-banner.tsx";
|
|
21
|
-
export { MessageBubble } from "./_components/message-bubble.tsx";
|
|
22
|
-
export { MessageList } from "./_components/message-list.tsx";
|
|
23
|
-
export { SidebarLayout } from "./_components/sidebar-layout.tsx";
|
|
24
|
-
export { StartScreen } from "./_components/start-screen.tsx";
|
|
25
|
-
export { StateIndicator } from "./_components/state-indicator.tsx";
|
|
26
|
-
export { ThinkingIndicator } from "./_components/thinking-indicator.tsx";
|
|
27
|
-
export { ToolCallBlock } from "./_components/tool-call-block.tsx";
|
|
28
|
-
export { Transcript } from "./_components/transcript.tsx";
|
|
29
15
|
export type { ClientConfig, ClientTheme } from "./client-context.ts";
|
|
30
16
|
export { useClientConfig } from "./client-context.ts";
|
|
17
|
+
export { App } from "./components/app.tsx";
|
|
18
|
+
export type { ButtonSize, ButtonVariant } from "./components/button.tsx";
|
|
19
|
+
export { Button } from "./components/button.tsx";
|
|
20
|
+
export { ChatView } from "./components/chat-view.tsx";
|
|
21
|
+
export { Controls } from "./components/controls.tsx";
|
|
22
|
+
export { ErrorBanner } from "./components/error-banner.tsx";
|
|
23
|
+
export { MessageBubble } from "./components/message-bubble.tsx";
|
|
24
|
+
export { MessageList } from "./components/message-list.tsx";
|
|
25
|
+
export { SidebarLayout } from "./components/sidebar-layout.tsx";
|
|
26
|
+
export { StartScreen } from "./components/start-screen.tsx";
|
|
27
|
+
export { StateIndicator } from "./components/state-indicator.tsx";
|
|
28
|
+
export { ThinkingIndicator } from "./components/thinking-indicator.tsx";
|
|
29
|
+
export { ToolCallBlock } from "./components/tool-call-block.tsx";
|
|
30
|
+
export { Transcript } from "./components/transcript.tsx";
|
|
31
31
|
export type { ClientHandle, ClientOptions } from "./define-client.tsx";
|
|
32
32
|
export { defineClient } from "./define-client.tsx";
|
|
33
33
|
export type { VoiceSession } from "./session.ts";
|
package/dist/index.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { useClientConfig } from "./client-context.js";
|
|
2
2
|
import { SessionProvider, createSessionControls, useAutoScroll, useSession, useToolCallStart, useToolResult } from "./signals.js";
|
|
3
|
-
import { Button } from "./
|
|
4
|
-
import { Controls } from "./
|
|
5
|
-
import { ErrorBanner } from "./
|
|
6
|
-
import { MessageBubble } from "./
|
|
7
|
-
import { ThinkingIndicator } from "./
|
|
8
|
-
import { ToolCallBlock } from "./
|
|
9
|
-
import { Transcript } from "./
|
|
10
|
-
import { MessageList } from "./
|
|
11
|
-
import { StateIndicator } from "./
|
|
12
|
-
import { ChatView } from "./
|
|
13
|
-
import { StartScreen } from "./
|
|
14
|
-
import { App } from "./
|
|
15
|
-
import { SidebarLayout } from "./
|
|
3
|
+
import { Button } from "./components/button.js";
|
|
4
|
+
import { Controls } from "./components/controls.js";
|
|
5
|
+
import { ErrorBanner } from "./components/error-banner.js";
|
|
6
|
+
import { MessageBubble } from "./components/message-bubble.js";
|
|
7
|
+
import { ThinkingIndicator } from "./components/thinking-indicator.js";
|
|
8
|
+
import { ToolCallBlock } from "./components/tool-call-block.js";
|
|
9
|
+
import { Transcript } from "./components/transcript.js";
|
|
10
|
+
import { MessageList } from "./components/message-list.js";
|
|
11
|
+
import { StateIndicator } from "./components/state-indicator.js";
|
|
12
|
+
import { ChatView } from "./components/chat-view.js";
|
|
13
|
+
import { StartScreen } from "./components/start-screen.js";
|
|
14
|
+
import { App } from "./components/app.js";
|
|
15
|
+
import { SidebarLayout } from "./components/sidebar-layout.js";
|
|
16
16
|
import { t as createVoiceSession } from "./session-CWB7vmqz.js";
|
|
17
17
|
import { defineClient } from "./define-client.js";
|
|
18
18
|
export { App, Button, ChatView, Controls, ErrorBanner, MessageBubble, MessageList, SessionProvider, SidebarLayout, StartScreen, StateIndicator, ThinkingIndicator, ToolCallBlock, Transcript, createSessionControls, createVoiceSession, defineClient, useAutoScroll, useClientConfig, useSession, useToolCallStart, useToolResult };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alexkroman1/aai-ui",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -21,10 +21,10 @@
|
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"clsx": "^2.1.1",
|
|
24
|
-
"@alexkroman1/aai": "0.12.
|
|
24
|
+
"@alexkroman1/aai": "0.12.3"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
|
-
"@preact/signals": "^2.
|
|
27
|
+
"@preact/signals": "^2.9.0",
|
|
28
28
|
"preact": "^10.29.0",
|
|
29
29
|
"tailwindcss": "^4.2.1"
|
|
30
30
|
},
|
|
@@ -34,12 +34,12 @@
|
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@preact/signals": "^2.
|
|
37
|
+
"@preact/signals": "^2.9.0",
|
|
38
38
|
"@testing-library/preact": "^3.2.4",
|
|
39
39
|
"jsdom": "^29.0.1",
|
|
40
40
|
"preact": "^10.29.0",
|
|
41
|
-
"tsdown": "^0.21.
|
|
42
|
-
"vitest": "^4.1.
|
|
41
|
+
"tsdown": "^0.21.7",
|
|
42
|
+
"vitest": "^4.1.2"
|
|
43
43
|
},
|
|
44
44
|
"engines": {
|
|
45
45
|
"node": ">=22.6"
|
|
@@ -50,6 +50,8 @@
|
|
|
50
50
|
"directory": "packages/aai-ui"
|
|
51
51
|
},
|
|
52
52
|
"scripts": {
|
|
53
|
+
"test": "vitest run",
|
|
54
|
+
"test:coverage": "vitest run --coverage",
|
|
53
55
|
"build": "tsdown && tsc -p tsconfig.build.json",
|
|
54
56
|
"typecheck": "tsc --noEmit",
|
|
55
57
|
"lint": "biome check .",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|