@alexkroman1/aai 0.7.12 → 0.8.1
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.js +1 -1
- package/dist/cli.js +462 -352
- package/dist/sdk/_internal_types.d.ts +0 -1
- package/dist/sdk/_internal_types.d.ts.map +1 -1
- package/dist/sdk/_internal_types.js.map +1 -1
- package/dist/sdk/_render_check.d.ts +10 -0
- package/dist/sdk/_render_check.d.ts.map +1 -0
- package/dist/sdk/_render_check.js +42 -0
- package/dist/sdk/_render_check.js.map +1 -0
- package/dist/sdk/builtin_tools.d.ts.map +1 -1
- package/dist/sdk/builtin_tools.js +21 -0
- package/dist/sdk/builtin_tools.js.map +1 -1
- package/dist/sdk/define_agent.d.ts.map +1 -1
- package/dist/sdk/define_agent.js +0 -1
- package/dist/sdk/define_agent.js.map +1 -1
- package/dist/sdk/direct_executor.d.ts.map +1 -1
- package/dist/sdk/direct_executor.js +0 -1
- package/dist/sdk/direct_executor.js.map +1 -1
- package/dist/sdk/memory_tools.d.ts +38 -0
- package/dist/sdk/memory_tools.d.ts.map +1 -0
- package/dist/sdk/memory_tools.js +77 -0
- package/dist/sdk/memory_tools.js.map +1 -0
- package/dist/sdk/mod.d.ts +3 -1
- package/dist/sdk/mod.d.ts.map +1 -1
- package/dist/sdk/mod.js +2 -0
- package/dist/sdk/mod.js.map +1 -1
- package/dist/sdk/protocol.d.ts +3 -3
- package/dist/sdk/protocol.js +1 -1
- package/dist/sdk/s2s.d.ts.map +1 -1
- package/dist/sdk/s2s.js +3 -1
- package/dist/sdk/s2s.js.map +1 -1
- package/dist/sdk/session.d.ts.map +1 -1
- package/dist/sdk/session.js +2 -0
- package/dist/sdk/session.js.map +1 -1
- package/dist/sdk/types.d.ts +23 -14
- package/dist/sdk/types.d.ts.map +1 -1
- package/dist/sdk/types.js +29 -0
- package/dist/sdk/types.js.map +1 -1
- package/dist/ui/_components/app.d.ts.map +1 -1
- package/dist/ui/_components/app.js +6 -7
- package/dist/ui/_components/app.js.map +1 -1
- package/dist/ui/_components/sidebar_layout.d.ts +19 -0
- package/dist/ui/_components/sidebar_layout.d.ts.map +1 -0
- package/dist/ui/_components/sidebar_layout.js +21 -0
- package/dist/ui/_components/sidebar_layout.js.map +1 -0
- package/dist/ui/_components/start_screen.d.ts +24 -0
- package/dist/ui/_components/start_screen.d.ts.map +1 -0
- package/dist/ui/_components/start_screen.js +25 -0
- package/dist/ui/_components/start_screen.js.map +1 -0
- package/dist/ui/_hooks.d.ts +21 -0
- package/dist/ui/_hooks.d.ts.map +1 -0
- package/dist/ui/_hooks.js +35 -0
- package/dist/ui/_hooks.js.map +1 -0
- package/dist/ui/components.d.ts +20 -0
- package/dist/ui/components.d.ts.map +1 -1
- package/dist/ui/components.js +12 -0
- package/dist/ui/components.js.map +1 -1
- package/dist/ui/components_mod.d.ts +2 -1
- package/dist/ui/components_mod.d.ts.map +1 -1
- package/dist/ui/components_mod.js +2 -1
- package/dist/ui/components_mod.js.map +1 -1
- package/dist/ui/mod.d.ts +2 -1
- package/dist/ui/mod.d.ts.map +1 -1
- package/dist/ui/mod.js +2 -1
- package/dist/ui/mod.js.map +1 -1
- package/dist/ui/signals.d.ts.map +1 -1
- package/dist/ui/signals.js +5 -2
- package/dist/ui/signals.js.map +1 -1
- package/package.json +17 -1
- package/templates/_shared/CLAUDE.md +241 -121
- package/templates/_shared/package.json +4 -1
- package/templates/dispatch-center/agent.ts +43 -72
- package/templates/embedded-assets/agent.ts +4 -5
- package/templates/health-assistant/agent.ts +7 -7
- package/templates/infocom-adventure/agent.ts +20 -20
- package/templates/memory-agent/agent.ts +1 -55
- package/templates/night-owl/agent.ts +4 -4
- package/templates/night-owl/client.tsx +6 -23
- package/templates/pizza-ordering/agent.ts +14 -15
- package/templates/pizza-ordering/client.tsx +41 -101
- package/templates/smart-research/agent.ts +10 -10
package/dist/sdk/types.d.ts
CHANGED
|
@@ -21,8 +21,9 @@ export type BeforeStepResult = {
|
|
|
21
21
|
* - `"fetch_json"` — Call a REST API endpoint and return the JSON response.
|
|
22
22
|
* - `"run_code"` — Execute JavaScript in a sandbox for calculations and data processing.
|
|
23
23
|
* - `"vector_search"` — Search the agent's RAG knowledge base for relevant documents.
|
|
24
|
+
* - `"memory"` — Persistent KV memory: save_memory, recall_memory, list_memories, forget_memory.
|
|
24
25
|
*/
|
|
25
|
-
export type BuiltinTool = "web_search" | "visit_webpage" | "fetch_json" | "run_code" | "vector_search";
|
|
26
|
+
export type BuiltinTool = "web_search" | "visit_webpage" | "fetch_json" | "run_code" | "vector_search" | "memory";
|
|
26
27
|
/**
|
|
27
28
|
* How the LLM should select tools during a turn.
|
|
28
29
|
*
|
|
@@ -136,17 +137,31 @@ export type ToolDef<P extends z.ZodObject<z.ZodRawShape> = z.ZodObject<z.ZodRawS
|
|
|
136
137
|
execute(args: z.infer<P>, ctx: ToolContext<S>): Promise<unknown> | unknown;
|
|
137
138
|
};
|
|
138
139
|
/**
|
|
139
|
-
*
|
|
140
|
+
* Identity helper that preserves the Zod schema generic for type inference.
|
|
140
141
|
*
|
|
141
|
-
*
|
|
142
|
-
*
|
|
143
|
-
*
|
|
142
|
+
* When tools are defined inline in `defineAgent({ tools: { ... } })`, the
|
|
143
|
+
* generic `P` gets widened to the base `ZodObject` type, so `args` in
|
|
144
|
+
* `execute` loses its specific shape. Wrapping a tool definition in `tool()`
|
|
145
|
+
* lets TypeScript infer `P` from `parameters` and type `args` correctly.
|
|
144
146
|
*
|
|
145
|
-
*
|
|
147
|
+
* @example
|
|
148
|
+
* ```ts
|
|
149
|
+
* import { defineAgent, tool } from "aai";
|
|
150
|
+
* import { z } from "zod";
|
|
146
151
|
*
|
|
147
|
-
*
|
|
152
|
+
* export default defineAgent({
|
|
153
|
+
* name: "my-agent",
|
|
154
|
+
* tools: {
|
|
155
|
+
* greet: tool({
|
|
156
|
+
* description: "Greet the user",
|
|
157
|
+
* parameters: z.object({ name: z.string() }),
|
|
158
|
+
* execute: ({ name }) => `Hello, ${name}!`, // name is string
|
|
159
|
+
* }),
|
|
160
|
+
* },
|
|
161
|
+
* });
|
|
162
|
+
* ```
|
|
148
163
|
*/
|
|
149
|
-
export
|
|
164
|
+
export declare function tool<P extends z.ZodObject<z.ZodRawShape>, S = any>(def: ToolDef<P, S>): ToolDef<P, S>;
|
|
150
165
|
/**
|
|
151
166
|
* Information about a completed agentic step, passed to the `onStep` hook.
|
|
152
167
|
*
|
|
@@ -199,11 +214,6 @@ export type AgentOptions<S = Record<string, unknown>> = {
|
|
|
199
214
|
instructions?: string;
|
|
200
215
|
/** Initial spoken greeting when a session starts. */
|
|
201
216
|
greeting?: string;
|
|
202
|
-
/**
|
|
203
|
-
* Cartesia voice UUID for TTS. Defaults to the server's configured voice
|
|
204
|
-
* (Sarah) when omitted. Browse voices at https://play.cartesia.ai.
|
|
205
|
-
*/
|
|
206
|
-
voice?: Voice;
|
|
207
217
|
/** Prompt hint for the STT model to improve transcription accuracy. */
|
|
208
218
|
sttPrompt?: string;
|
|
209
219
|
/**
|
|
@@ -266,7 +276,6 @@ export type AgentDef = {
|
|
|
266
276
|
name: string;
|
|
267
277
|
instructions: string;
|
|
268
278
|
greeting: string;
|
|
269
|
-
voice: string;
|
|
270
279
|
sttPrompt?: string;
|
|
271
280
|
maxSteps: number | ((ctx: HookContext) => number);
|
|
272
281
|
toolChoice?: ToolChoice;
|
package/dist/sdk/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../sdk/types.ts"],"names":[],"mappings":"AACA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C,gEAAgE;AAChE,MAAM,MAAM,gBAAgB,GAAG;IAAE,WAAW,CAAC,EAAE,MA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;IAChC,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IACzC,KAAK,CAAC,EAAE,MAAM,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC,CAAC;IACtC,YAAY,CAAC,EAAE,YAAY,CAAC,cAAc,CAAC,CAAC;IAC5C,OAAO,CAAC,EAAE,YAAY,CAAC,SAAS,CAAC,CAAC;IAClC,MAAM,CAAC,EAAE,YAAY,CAAC,QAAQ,CAAC,CAAC;IAChC,MAAM,CAAC,EAAE,YAAY,CAAC,QAAQ,CAAC,CAAC;IAChC,YAAY,CAAC,EAAE,YAAY,CAAC,cAAc,CAAC,CAAC;CAC7C,CAAC"}
|
package/dist/sdk/types.js
CHANGED
|
@@ -4,6 +4,35 @@
|
|
|
4
4
|
*
|
|
5
5
|
* @module
|
|
6
6
|
*/
|
|
7
|
+
/**
|
|
8
|
+
* Identity helper that preserves the Zod schema generic for type inference.
|
|
9
|
+
*
|
|
10
|
+
* When tools are defined inline in `defineAgent({ tools: { ... } })`, the
|
|
11
|
+
* generic `P` gets widened to the base `ZodObject` type, so `args` in
|
|
12
|
+
* `execute` loses its specific shape. Wrapping a tool definition in `tool()`
|
|
13
|
+
* lets TypeScript infer `P` from `parameters` and type `args` correctly.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```ts
|
|
17
|
+
* import { defineAgent, tool } from "aai";
|
|
18
|
+
* import { z } from "zod";
|
|
19
|
+
*
|
|
20
|
+
* export default defineAgent({
|
|
21
|
+
* name: "my-agent",
|
|
22
|
+
* tools: {
|
|
23
|
+
* greet: tool({
|
|
24
|
+
* description: "Greet the user",
|
|
25
|
+
* parameters: z.object({ name: z.string() }),
|
|
26
|
+
* execute: ({ name }) => `Hello, ${name}!`, // name is string
|
|
27
|
+
* }),
|
|
28
|
+
* },
|
|
29
|
+
* });
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
// biome-ignore lint/suspicious/noExplicitAny: S defaults to any so tool() works with any agent state type
|
|
33
|
+
export function tool(def) {
|
|
34
|
+
return def;
|
|
35
|
+
}
|
|
7
36
|
/**
|
|
8
37
|
* Default system prompt used when `instructions` is not provided.
|
|
9
38
|
*
|
package/dist/sdk/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../sdk/types.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../sdk/types.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C;;;;GAIG;AAsJH;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,0GAA0G;AAC1G,MAAM,UAAU,IAAI,CAClB,GAAkB;IAElB,OAAO,GAAG,CAAC;AACb,CAAC;AAqGD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAW;;;;;;;;;;;;;;wEAc4B,CAAC;AAEzE,qDAAqD;AACrD,MAAM,CAAC,MAAM,gBAAgB,GAC3B,6DAA6D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../../ui/_components/app.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../../ui/_components/app.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,MAAM,QAAQ,CAAC;AAetC,wBAAgB,GAAG,IAAI,MAAM,CAAC,GAAG,CAAC,OAAO,CAQxC"}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import { jsx as _jsx
|
|
1
|
+
import { jsx as _jsx } from "preact/jsx-runtime";
|
|
2
2
|
import { useMountConfig } from "../mount_context.js";
|
|
3
|
-
import { useSession } from "../signals.js";
|
|
4
3
|
import { ChatView } from "./chat_view.js";
|
|
4
|
+
import { StartScreen } from "./start_screen.js";
|
|
5
5
|
const AAI_LOGO = `▄▀█ ▄▀█ █\n█▀█ █▀█ █`;
|
|
6
|
+
function AaiLogo() {
|
|
7
|
+
return (_jsx("span", { class: "font-aai-mono text-lg leading-[1.1] font-bold text-aai-primary whitespace-pre", children: AAI_LOGO }));
|
|
8
|
+
}
|
|
6
9
|
export function App() {
|
|
7
|
-
const { started, start } = useSession();
|
|
8
10
|
const { title } = useMountConfig();
|
|
9
|
-
|
|
10
|
-
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-6 bg-aai-surface border border-aai-border rounded-lg px-12 py-10", children: [title ? (_jsx("span", { class: "text-lg font-semibold text-aai-primary", children: title })) : (_jsx("span", { class: "font-aai-mono text-lg leading-[1.1] font-bold text-aai-primary whitespace-pre", children: AAI_LOGO })), _jsx("button", { type: "button", class: "h-8 px-4 py-1.5 rounded-aai text-sm font-medium leading-[130%] cursor-pointer bg-aai-surface-hover text-aai-text-secondary border border-aai-border outline-none", onClick: start, children: "Start" })] }) }));
|
|
11
|
-
}
|
|
12
|
-
return _jsx(ChatView, {});
|
|
11
|
+
return (_jsx(StartScreen, { icon: title ? undefined : _jsx(AaiLogo, {}), title: title, children: _jsx(ChatView, {}) }));
|
|
13
12
|
}
|
|
14
13
|
//# sourceMappingURL=app.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.js","sourceRoot":"","sources":["../../../ui/_components/app.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"app.js","sourceRoot":"","sources":["../../../ui/_components/app.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAiB,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAoB,CAAC;AAEjD,MAAM,QAAQ,GAAG,sBAAsB,CAAC;AAExC,SAAS,OAAO;IACd,OAAO,CACL,eAAM,KAAK,EAAC,+EAA+E,YACxF,QAAQ,GACJ,CACR,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,GAAG;IACjB,MAAM,EAAE,KAAK,EAAE,GAAG,cAAc,EAAE,CAAC;IAEnC,OAAO,CACL,KAAC,WAAW,IAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAC,OAAO,KAAG,EAAE,KAAK,EAAE,KAAK,YAC9D,KAAC,QAAQ,KAAG,GACA,CACf,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ComponentChildren } from "preact";
|
|
2
|
+
/**
|
|
3
|
+
* A two-column layout with a fixed-width sidebar and a flexible main area.
|
|
4
|
+
* Commonly used to pair a custom sidebar (cart, dashboard) with `<ChatView />`.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```tsx
|
|
8
|
+
* <SidebarLayout sidebar={<OrderPanel />}>
|
|
9
|
+
* <ChatView />
|
|
10
|
+
* </SidebarLayout>
|
|
11
|
+
* ```
|
|
12
|
+
*/
|
|
13
|
+
export declare function SidebarLayout({ sidebar, children, width, side, }: {
|
|
14
|
+
sidebar: ComponentChildren;
|
|
15
|
+
children: ComponentChildren;
|
|
16
|
+
width?: string | undefined;
|
|
17
|
+
side?: "left" | "right" | undefined;
|
|
18
|
+
}): import("preact").JSX.Element;
|
|
19
|
+
//# sourceMappingURL=sidebar_layout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sidebar_layout.d.ts","sourceRoot":"","sources":["../../../ui/_components/sidebar_layout.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAEhD;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAAC,EAC5B,OAAO,EACP,QAAQ,EACR,KAAe,EACf,IAAa,GACd,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;CACrC,gCAqBA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "preact/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* A two-column layout with a fixed-width sidebar and a flexible main area.
|
|
4
|
+
* Commonly used to pair a custom sidebar (cart, dashboard) with `<ChatView />`.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```tsx
|
|
8
|
+
* <SidebarLayout sidebar={<OrderPanel />}>
|
|
9
|
+
* <ChatView />
|
|
10
|
+
* </SidebarLayout>
|
|
11
|
+
* ```
|
|
12
|
+
*/
|
|
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
|
+
width,
|
|
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] }));
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=sidebar_layout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sidebar_layout.js","sourceRoot":"","sources":["../../../ui/_components/sidebar_layout.tsx"],"names":[],"mappings":";AAIA;;;;;;;;;;GAUG;AACH,MAAM,UAAU,aAAa,CAAC,EAC5B,OAAO,EACP,QAAQ,EACR,KAAK,GAAG,OAAO,EACf,IAAI,GAAG,MAAM,GAMd;IACC,MAAM,SAAS,GAAG,CAChB,cACE,KAAK,EAAC,6CAA6C,EACnD,KAAK,EAAE;YACL,KAAK;YACL,WAAW,EAAE,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,mCAAmC,CAAC,CAAC,CAAC,SAAS;YAC9E,UAAU,EAAE,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,mCAAmC,CAAC,CAAC,CAAC,SAAS;SAC/E,YAEA,OAAO,GACJ,CACP,CAAC;IAEF,OAAO,CACL,eAAK,KAAK,EAAC,eAAe,EAAC,KAAK,EAAE,EAAE,UAAU,EAAE,qBAAqB,EAAE,aACpE,IAAI,KAAK,MAAM,IAAI,SAAS,EAC7B,cAAK,KAAK,EAAC,gBAAgB,YAAE,QAAQ,GAAO,EAC3C,IAAI,KAAK,OAAO,IAAI,SAAS,IAC1B,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ComponentChildren } from "preact";
|
|
2
|
+
/**
|
|
3
|
+
* A centered start screen with icon, title, subtitle, and a start button.
|
|
4
|
+
* Renders `children` (the main app) once the session has started.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```tsx
|
|
8
|
+
* function MyAgent() {
|
|
9
|
+
* return (
|
|
10
|
+
* <StartScreen icon="🍕" title="Pizza Palace" subtitle="Voice-powered ordering">
|
|
11
|
+
* <ChatView />
|
|
12
|
+
* </StartScreen>
|
|
13
|
+
* );
|
|
14
|
+
* }
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
export declare function StartScreen({ children, icon, title, subtitle, buttonText, }: {
|
|
18
|
+
children: ComponentChildren;
|
|
19
|
+
icon?: ComponentChildren | undefined;
|
|
20
|
+
title?: string | undefined;
|
|
21
|
+
subtitle?: string | undefined;
|
|
22
|
+
buttonText?: string | undefined;
|
|
23
|
+
}): import("preact").JSX.Element;
|
|
24
|
+
//# sourceMappingURL=start_screen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"start_screen.d.ts","sourceRoot":"","sources":["../../../ui/_components/start_screen.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAGhD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,WAAW,CAAC,EAC1B,QAAQ,EACR,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,UAAoB,GACrB,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;CACjC,gCAuBA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "preact/jsx-runtime";
|
|
2
|
+
import { useSession } from "../signals.js";
|
|
3
|
+
/**
|
|
4
|
+
* A centered start screen with icon, title, subtitle, and a start button.
|
|
5
|
+
* Renders `children` (the main app) once the session has started.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```tsx
|
|
9
|
+
* function MyAgent() {
|
|
10
|
+
* return (
|
|
11
|
+
* <StartScreen icon="🍕" title="Pizza Palace" subtitle="Voice-powered ordering">
|
|
12
|
+
* <ChatView />
|
|
13
|
+
* </StartScreen>
|
|
14
|
+
* );
|
|
15
|
+
* }
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
export function StartScreen({ children, icon, title, subtitle, buttonText = "Start", }) {
|
|
19
|
+
const { started, start } = useSession();
|
|
20
|
+
if (started.value) {
|
|
21
|
+
return _jsx(_Fragment, { children: children });
|
|
22
|
+
}
|
|
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-6 bg-aai-surface border border-aai-border rounded-lg px-12 py-10", children: [icon && _jsx("div", { class: "text-5xl", children: icon }), title && _jsx("h1", { class: "text-xl font-semibold text-aai-text m-0", children: title }), subtitle && _jsx("p", { class: "text-sm text-aai-text-muted m-0", children: subtitle }), _jsx("button", { type: "button", class: "mt-2 px-8 py-3 rounded-aai text-sm font-medium cursor-pointer bg-aai-primary text-white border-none", onClick: start, children: buttonText })] }) }));
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=start_screen.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"start_screen.js","sourceRoot":"","sources":["../../../ui/_components/start_screen.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,WAAW,CAAC,EAC1B,QAAQ,EACR,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,UAAU,GAAG,OAAO,GAOrB;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,EAAC,8DAA8D,YACvE,eAAK,KAAK,EAAC,iGAAiG,aACzG,IAAI,IAAI,cAAK,KAAK,EAAC,UAAU,YAAE,IAAI,GAAO,EAC1C,KAAK,IAAI,aAAI,KAAK,EAAC,yCAAyC,YAAE,KAAK,GAAM,EACzE,QAAQ,IAAI,YAAG,KAAK,EAAC,iCAAiC,YAAE,QAAQ,GAAK,EACtE,iBACE,IAAI,EAAC,QAAQ,EACb,KAAK,EAAC,qGAAqG,EAC3G,OAAO,EAAE,KAAK,YAEb,UAAU,GACJ,IACL,GACF,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { RefObject } from "preact";
|
|
2
|
+
/**
|
|
3
|
+
* Auto-scroll a container to the bottom when messages, tool calls,
|
|
4
|
+
* or utterances change. Returns a ref to attach to a sentinel `<div>`
|
|
5
|
+
* at the bottom of the scrollable area.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```tsx
|
|
9
|
+
* function MyChat() {
|
|
10
|
+
* const bottomRef = useAutoScroll();
|
|
11
|
+
* return (
|
|
12
|
+
* <div class="overflow-y-auto">
|
|
13
|
+
* {messages.map((m, i) => <p key={i}>{m.text}</p>)}
|
|
14
|
+
* <div ref={bottomRef} />
|
|
15
|
+
* </div>
|
|
16
|
+
* );
|
|
17
|
+
* }
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
export declare function useAutoScroll(): RefObject<HTMLDivElement | null>;
|
|
21
|
+
//# sourceMappingURL=_hooks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_hooks.d.ts","sourceRoot":"","sources":["../../ui/_hooks.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAIxC;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,aAAa,IAAI,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAahE"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// Copyright 2025 the AAI authors. MIT license.
|
|
2
|
+
import { useSignalEffect } from "@preact/signals";
|
|
3
|
+
import { useRef } from "preact/hooks";
|
|
4
|
+
import { useSession } from "./signals.js";
|
|
5
|
+
/**
|
|
6
|
+
* Auto-scroll a container to the bottom when messages, tool calls,
|
|
7
|
+
* or utterances change. Returns a ref to attach to a sentinel `<div>`
|
|
8
|
+
* at the bottom of the scrollable area.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```tsx
|
|
12
|
+
* function MyChat() {
|
|
13
|
+
* const bottomRef = useAutoScroll();
|
|
14
|
+
* return (
|
|
15
|
+
* <div class="overflow-y-auto">
|
|
16
|
+
* {messages.map((m, i) => <p key={i}>{m.text}</p>)}
|
|
17
|
+
* <div ref={bottomRef} />
|
|
18
|
+
* </div>
|
|
19
|
+
* );
|
|
20
|
+
* }
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
export function useAutoScroll() {
|
|
24
|
+
const { session } = useSession();
|
|
25
|
+
const ref = useRef(null);
|
|
26
|
+
useSignalEffect(() => {
|
|
27
|
+
session.messages.value;
|
|
28
|
+
session.toolCalls.value;
|
|
29
|
+
session.userUtterance.value;
|
|
30
|
+
session.agentUtterance.value;
|
|
31
|
+
ref.current?.scrollIntoView({ behavior: "smooth" });
|
|
32
|
+
});
|
|
33
|
+
return ref;
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=_hooks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_hooks.js","sourceRoot":"","sources":["../../ui/_hooks.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAE/C,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAElD,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,aAAa;IAC3B,MAAM,EAAE,OAAO,EAAE,GAAG,UAAU,EAAE,CAAC;IACjC,MAAM,GAAG,GAAG,MAAM,CAAwB,IAAI,CAAC,CAAC;IAEhD,eAAe,CAAC,GAAG,EAAE;QACnB,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC;QACvB,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC;QACxB,OAAO,CAAC,aAAa,CAAC,KAAK,CAAC;QAC5B,OAAO,CAAC,cAAc,CAAC,KAAK,CAAC;QAC7B,GAAG,CAAC,OAAO,EAAE,cAAc,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,CAAC;IACtD,CAAC,CAAC,CAAC;IAEH,OAAO,GAAG,CAAC;AACb,CAAC"}
|
package/dist/ui/components.d.ts
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import type { Signal } from "@preact/signals";
|
|
8
8
|
import type * as preact from "preact";
|
|
9
|
+
import type { ComponentChildren } from "preact";
|
|
9
10
|
import type { AgentState, Message, SessionError, ToolCallInfo } from "./types.ts";
|
|
10
11
|
/** Displays the current agent state as a colored indicator. */
|
|
11
12
|
export declare const StateIndicator: (props: {
|
|
@@ -33,4 +34,23 @@ export declare const ThinkingIndicator: () => preact.JSX.Element;
|
|
|
33
34
|
export declare const ChatView: () => preact.JSX.Element;
|
|
34
35
|
/** Default top-level app component with start screen and chat view. */
|
|
35
36
|
export declare const App: () => preact.JSX.Element;
|
|
37
|
+
/** Session control buttons (Stop/Resume + New Conversation). */
|
|
38
|
+
export declare const Controls: () => preact.JSX.Element;
|
|
39
|
+
/** Message list with auto-scroll, tool call blocks, transcript, and thinking indicator. */
|
|
40
|
+
export declare const MessageList: () => preact.JSX.Element;
|
|
41
|
+
/** Centered start screen that renders children once the session starts. */
|
|
42
|
+
export declare const StartScreen: (props: {
|
|
43
|
+
children: ComponentChildren;
|
|
44
|
+
icon?: ComponentChildren | undefined;
|
|
45
|
+
title?: string | undefined;
|
|
46
|
+
subtitle?: string | undefined;
|
|
47
|
+
buttonText?: string | undefined;
|
|
48
|
+
}) => preact.JSX.Element;
|
|
49
|
+
/** Two-column layout with a fixed-width sidebar and flexible main area. */
|
|
50
|
+
export declare const SidebarLayout: (props: {
|
|
51
|
+
sidebar: ComponentChildren;
|
|
52
|
+
children: ComponentChildren;
|
|
53
|
+
width?: string | undefined;
|
|
54
|
+
side?: "left" | "right" | undefined;
|
|
55
|
+
}) => preact.JSX.Element;
|
|
36
56
|
//# sourceMappingURL=components.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../ui/components.ts"],"names":[],"mappings":"AACA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,KAAK,KAAK,MAAM,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../ui/components.ts"],"names":[],"mappings":"AACA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,KAAK,KAAK,MAAM,MAAM,QAAQ,CAAC;AACtC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAahD,OAAO,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAElF,+DAA+D;AAC/D,eAAO,MAAM,cAAc,EAAE,CAAC,KAAK,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC,UAAU,CAAC,CAAA;CAAE,KAAK,MAAM,CAAC,GAAG,CAAC,OACjE,CAAC;AAElB,iEAAiE;AACjE,eAAO,MAAM,WAAW,EAAE,CAAC,KAAK,EAAE;IAChC,KAAK,EAAE,MAAM,CAAC,YAAY,GAAG,IAAI,CAAC,CAAC;CACpC,KAAK,MAAM,CAAC,GAAG,CAAC,OAAO,GAAG,IAAmB,CAAC;AAE/C,4CAA4C;AAC5C,eAAO,MAAM,aAAa,EAAE,CAAC,KAAK,EAAE;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,KAAK,MAAM,CAAC,GAAG,CAAC,OAAwB,CAAC;AAEjG,6CAA6C;AAC7C,eAAO,MAAM,aAAa,EAAE,CAAC,KAAK,EAAE;IAAE,QAAQ,EAAE,YAAY,CAAA;CAAE,KAAK,MAAM,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OAAO,GAAG,SAAS,CAAC;CACrC,KAAK,MAAM,CAAC,GAAG,CAAC,OAAwB,CAAC"}
|
package/dist/ui/components.js
CHANGED
|
@@ -7,8 +7,12 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { App as _App } from "./_components/app.js";
|
|
9
9
|
import { ChatView as _ChatView } from "./_components/chat_view.js";
|
|
10
|
+
import { Controls as _Controls } from "./_components/controls.js";
|
|
10
11
|
import { ErrorBanner as _ErrorBanner } from "./_components/error_banner.js";
|
|
11
12
|
import { MessageBubble as _MessageBubble } from "./_components/message_bubble.js";
|
|
13
|
+
import { MessageList as _MessageList } from "./_components/message_list.js";
|
|
14
|
+
import { SidebarLayout as _SidebarLayout } from "./_components/sidebar_layout.js";
|
|
15
|
+
import { StartScreen as _StartScreen } from "./_components/start_screen.js";
|
|
12
16
|
import { StateIndicator as _StateIndicator } from "./_components/state_indicator.js";
|
|
13
17
|
import { ThinkingIndicator as _ThinkingIndicator } from "./_components/thinking_indicator.js";
|
|
14
18
|
import { ToolCallBlock as _ToolCallBlock } from "./_components/tool_call_block.js";
|
|
@@ -29,4 +33,12 @@ export const ThinkingIndicator = _ThinkingIndicator;
|
|
|
29
33
|
export const ChatView = _ChatView;
|
|
30
34
|
/** Default top-level app component with start screen and chat view. */
|
|
31
35
|
export const App = _App;
|
|
36
|
+
/** Session control buttons (Stop/Resume + New Conversation). */
|
|
37
|
+
export const Controls = _Controls;
|
|
38
|
+
/** Message list with auto-scroll, tool call blocks, transcript, and thinking indicator. */
|
|
39
|
+
export const MessageList = _MessageList;
|
|
40
|
+
/** Centered start screen that renders children once the session starts. */
|
|
41
|
+
export const StartScreen = _StartScreen;
|
|
42
|
+
/** Two-column layout with a fixed-width sidebar and flexible main area. */
|
|
43
|
+
export const SidebarLayout = _SidebarLayout;
|
|
32
44
|
//# sourceMappingURL=components.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components.js","sourceRoot":"","sources":["../../ui/components.ts"],"names":[],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E9C,8DAA8D;AAC9D,MAAM,CAAC,MAAM,iBAAiB,GAA6B,kBAAkB,CAAC;AAE9E,uEAAuE;AACvE,MAAM,CAAC,MAAM,QAAQ,GAA6B,SAAS,CAAC;AAE5D,uEAAuE;AACvE,MAAM,CAAC,MAAM,GAAG,GAA6B,IAAI,CAAC;AAElD,gEAAgE;AAChE,MAAM,CAAC,MAAM,QAAQ,GAA6B,SAAS,CAAC;AAE5D,2FAA2F;AAC3F,MAAM,CAAC,MAAM,WAAW,GAA6B,YAAY,CAAC;AAElE,2EAA2E;AAC3E,MAAM,CAAC,MAAM,WAAW,GAMG,YAAY,CAAC;AAExC,2EAA2E;AAC3E,MAAM,CAAC,MAAM,aAAa,GAKC,cAAc,CAAC"}
|
|
@@ -12,7 +12,8 @@
|
|
|
12
12
|
*
|
|
13
13
|
* @module
|
|
14
14
|
*/
|
|
15
|
-
export {
|
|
15
|
+
export { useAutoScroll } from "./_hooks.ts";
|
|
16
|
+
export { App, ChatView, Controls, ErrorBanner, MessageBubble, MessageList, SidebarLayout, StartScreen, StateIndicator, ThinkingIndicator, ToolCallBlock, Transcript, } from "./components.ts";
|
|
16
17
|
export type { MountHandle, MountOptions, MountTheme } from "./mount.tsx";
|
|
17
18
|
export { mount } from "./mount.tsx";
|
|
18
19
|
export type { MountConfig } from "./mount_context.ts";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components_mod.d.ts","sourceRoot":"","sources":["../../ui/components_mod.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EACL,GAAG,EACH,QAAQ,EACR,WAAW,EACX,aAAa,EACb,cAAc,EACd,iBAAiB,EACjB,aAAa,EACb,UAAU,GACX,MAAM,iBAAiB,CAAC;AACzB,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzE,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,YAAY,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,YAAY,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EACL,qBAAqB,EACrB,eAAe,EACf,UAAU,EACV,aAAa,GACd,MAAM,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"components_mod.d.ts","sourceRoot":"","sources":["../../ui/components_mod.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EACL,GAAG,EACH,QAAQ,EACR,QAAQ,EACR,WAAW,EACX,aAAa,EACb,WAAW,EACX,aAAa,EACb,WAAW,EACX,cAAc,EACd,iBAAiB,EACjB,aAAa,EACb,UAAU,GACX,MAAM,iBAAiB,CAAC;AACzB,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzE,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,YAAY,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,YAAY,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EACL,qBAAqB,EACrB,eAAe,EACf,UAAU,EACV,aAAa,GACd,MAAM,cAAc,CAAC"}
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
*
|
|
14
14
|
* @module
|
|
15
15
|
*/
|
|
16
|
-
export {
|
|
16
|
+
export { useAutoScroll } from "./_hooks.js";
|
|
17
|
+
export { App, ChatView, Controls, ErrorBanner, MessageBubble, MessageList, SidebarLayout, StartScreen, StateIndicator, ThinkingIndicator, ToolCallBlock, Transcript, } from "./components.js";
|
|
17
18
|
export { mount } from "./mount.js";
|
|
18
19
|
export { useMountConfig } from "./mount_context.js";
|
|
19
20
|
export { createSessionControls, SessionProvider, useSession, useToolResult, } from "./signals.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components_mod.js","sourceRoot":"","sources":["../../ui/components_mod.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C;;;;;;;;;;;;;GAaG;AAEH,OAAO,EACL,GAAG,EACH,QAAQ,EACR,WAAW,EACX,aAAa,EACb,cAAc,EACd,iBAAiB,EACjB,aAAa,EACb,UAAU,GACX,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EAAE,KAAK,EAAE,MAAM,YAAa,CAAC;AAEpC,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,EACL,qBAAqB,EACrB,eAAe,EACf,UAAU,EACV,aAAa,GACd,MAAM,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"components_mod.js","sourceRoot":"","sources":["../../ui/components_mod.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EACL,GAAG,EACH,QAAQ,EACR,QAAQ,EACR,WAAW,EACX,aAAa,EACb,WAAW,EACX,aAAa,EACb,WAAW,EACX,cAAc,EACd,iBAAiB,EACjB,aAAa,EACb,UAAU,GACX,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EAAE,KAAK,EAAE,MAAM,YAAa,CAAC;AAEpC,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,EACL,qBAAqB,EACrB,eAAe,EACf,UAAU,EACV,aAAa,GACd,MAAM,cAAc,CAAC"}
|
package/dist/ui/mod.d.ts
CHANGED
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
*
|
|
17
17
|
* @module
|
|
18
18
|
*/
|
|
19
|
-
export {
|
|
19
|
+
export { useAutoScroll } from "./_hooks.ts";
|
|
20
|
+
export { App, ChatView, Controls, ErrorBanner, MessageBubble, MessageList, SidebarLayout, StartScreen, StateIndicator, ThinkingIndicator, ToolCallBlock, Transcript, } from "./components.ts";
|
|
20
21
|
export type { MountHandle, MountOptions, MountTheme } from "./mount.tsx";
|
|
21
22
|
export { mount } from "./mount.tsx";
|
|
22
23
|
export type { MountConfig } from "./mount_context.ts";
|
package/dist/ui/mod.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../ui/mod.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EACL,GAAG,EACH,QAAQ,EACR,WAAW,EACX,aAAa,EACb,cAAc,EACd,iBAAiB,EACjB,aAAa,EACb,UAAU,GACX,MAAM,iBAAiB,CAAC;AACzB,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzE,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,YAAY,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,YAAY,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAClD,YAAY,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EACL,qBAAqB,EACrB,eAAe,EACf,UAAU,EACV,aAAa,GACd,MAAM,cAAc,CAAC;AACtB,YAAY,EACV,UAAU,EACV,OAAO,EACP,YAAY,EACZ,gBAAgB,EAChB,cAAc,EACd,YAAY,GACb,MAAM,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../ui/mod.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EACL,GAAG,EACH,QAAQ,EACR,QAAQ,EACR,WAAW,EACX,aAAa,EACb,WAAW,EACX,aAAa,EACb,WAAW,EACX,cAAc,EACd,iBAAiB,EACjB,aAAa,EACb,UAAU,GACX,MAAM,iBAAiB,CAAC;AACzB,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzE,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,YAAY,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,YAAY,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAClD,YAAY,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EACL,qBAAqB,EACrB,eAAe,EACf,UAAU,EACV,aAAa,GACd,MAAM,cAAc,CAAC;AACtB,YAAY,EACV,UAAU,EACV,OAAO,EACP,YAAY,EACZ,gBAAgB,EAChB,cAAc,EACd,YAAY,GACb,MAAM,YAAY,CAAC"}
|
package/dist/ui/mod.js
CHANGED
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
*
|
|
18
18
|
* @module
|
|
19
19
|
*/
|
|
20
|
-
export {
|
|
20
|
+
export { useAutoScroll } from "./_hooks.js";
|
|
21
|
+
export { App, ChatView, Controls, ErrorBanner, MessageBubble, MessageList, SidebarLayout, StartScreen, StateIndicator, ThinkingIndicator, ToolCallBlock, Transcript, } from "./components.js";
|
|
21
22
|
export { mount } from "./mount.js";
|
|
22
23
|
export { useMountConfig } from "./mount_context.js";
|
|
23
24
|
export { createVoiceSession } from "./session.js";
|
package/dist/ui/mod.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mod.js","sourceRoot":"","sources":["../../ui/mod.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EACL,GAAG,EACH,QAAQ,EACR,WAAW,EACX,aAAa,EACb,cAAc,EACd,iBAAiB,EACjB,aAAa,EACb,UAAU,GACX,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,KAAK,EAAE,MAAM,YAAa,CAAC;AAEpC,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAElD,OAAO,EACL,qBAAqB,EACrB,eAAe,EACf,UAAU,EACV,aAAa,GACd,MAAM,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"mod.js","sourceRoot":"","sources":["../../ui/mod.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EACL,GAAG,EACH,QAAQ,EACR,QAAQ,EACR,WAAW,EACX,aAAa,EACb,WAAW,EACX,aAAa,EACb,WAAW,EACX,cAAc,EACd,iBAAiB,EACjB,aAAa,EACb,UAAU,GACX,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,KAAK,EAAE,MAAM,YAAa,CAAC;AAEpC,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAElD,OAAO,EACL,qBAAqB,EACrB,eAAe,EACf,UAAU,EACV,aAAa,GACd,MAAM,cAAc,CAAC"}
|
package/dist/ui/signals.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signals.d.ts","sourceRoot":"","sources":["../../ui/signals.ts"],"names":[],"mappings":"AAEA,OAAO,EAAiB,KAAK,MAAM,EAAU,MAAM,iBAAiB,CAAC;AACrE,OAAO,KAAK,KAAK,MAAM,MAAM,QAAQ,CAAC;AACtC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAGhD,OAAO,KAAK,EAAE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AC3D,OAAO,IAAI,IAAI,CAAC;IAChB,2EAA2E;IAC3E,KAAK,IAAI,IAAI,CAAC;IACd,wDAAwD;IACxD,MAAM,IAAI,IAAI,CAAC;IACf,oDAAoD;IACpD,KAAK,IAAI,IAAI,CAAC;IACd,0DAA0D;IAC1D,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,IAAI,CAAC;CAC1B,CAAC;AAEF;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,YAAY,GAAG,cAAc,CAoC3E;AAID;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,EAC9B,KAAK,EACL,QAAQ,GACT,EAAE;IACD,KAAK,EAAE,cAAc,CAAC;IACtB,QAAQ,CAAC,EAAE,iBAAiB,CAAC;CAC9B,GAAG,MAAM,CAAC,GAAG,CAAC,OAAO,CAErB;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,IAAI,cAAc,CAI3C;AAUD;;;;;;;;;;;GAWG;AACH,wBAAgB,aAAa,CAC3B,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,KAAK,IAAI,GAC5E,IAAI,CA+BN"}
|
package/dist/ui/signals.js
CHANGED
|
@@ -32,10 +32,13 @@ export function createSessionControls(session) {
|
|
|
32
32
|
session.connect();
|
|
33
33
|
},
|
|
34
34
|
toggle() {
|
|
35
|
-
if (running.value)
|
|
35
|
+
if (running.value) {
|
|
36
|
+
session.cancel();
|
|
36
37
|
session.disconnect();
|
|
37
|
-
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
38
40
|
session.connect();
|
|
41
|
+
}
|
|
39
42
|
running.value = !running.value;
|
|
40
43
|
},
|
|
41
44
|
reset() {
|
package/dist/ui/signals.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signals.js","sourceRoot":"","sources":["../../ui/signals.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAE/C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AC,CAAC;gBACnC,MAAM,MAAM,GAAG,YAAY,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC;gBACvC,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC;YACzC,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAED,SAAS,CACP,GAAG,EAAE,CAAC,GAAG,EAAE;QACT,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC;QACvB,UAAU,CAAC,OAAO,GAAG,IAAI,CAAC;IAC5B,CAAC,EACD,EAAE,CACH,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alexkroman1/aai",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"aai": "dist/aai.js"
|
|
@@ -142,6 +142,22 @@
|
|
|
142
142
|
"typescript": "^5.9.3",
|
|
143
143
|
"vitest": "^4.1.0"
|
|
144
144
|
},
|
|
145
|
+
"peerDependencies": {
|
|
146
|
+
"@preact/signals": "^2.8.2",
|
|
147
|
+
"preact": "^10.29.0",
|
|
148
|
+
"tailwindcss": "^4.2.1"
|
|
149
|
+
},
|
|
150
|
+
"peerDependenciesMeta": {
|
|
151
|
+
"@preact/signals": {
|
|
152
|
+
"optional": true
|
|
153
|
+
},
|
|
154
|
+
"preact": {
|
|
155
|
+
"optional": true
|
|
156
|
+
},
|
|
157
|
+
"tailwindcss": {
|
|
158
|
+
"optional": true
|
|
159
|
+
}
|
|
160
|
+
},
|
|
145
161
|
"engines": {
|
|
146
162
|
"node": ">=20"
|
|
147
163
|
},
|