@tomny-dev/uzi 0.7.0 → 0.7.1-pr.82.252.1.0f7aa55
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/README.md +4 -0
- package/dist/components/ai-chat/AIChat.d.ts +63 -0
- package/dist/components/ai-chat/AIChat.d.ts.map +1 -0
- package/dist/components/ai-chat/AIChat.test.d.ts +2 -0
- package/dist/components/ai-chat/AIChat.test.d.ts.map +1 -0
- package/dist/index.cjs +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index14.js.map +1 -1
- package/dist/index15.cjs.map +1 -1
- package/dist/index20.js.map +1 -1
- package/dist/index21.cjs.map +1 -1
- package/dist/index26.js.map +1 -1
- package/dist/index27.cjs.map +1 -1
- package/dist/index28.js.map +1 -1
- package/dist/index29.cjs.map +1 -1
- package/dist/index4.js.map +1 -1
- package/dist/index5.cjs.map +1 -1
- package/dist/index75.js +65 -0
- package/dist/index75.js.map +1 -0
- package/dist/index76.cjs +94 -0
- package/dist/index76.cjs.map +1 -0
- package/dist/index76.js +303 -0
- package/dist/index76.js.map +1 -0
- package/dist/index77.cjs +303 -0
- package/dist/index77.cjs.map +1 -0
- package/dist/style.css +389 -17
- package/package.json +3 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index77.cjs","names":[],"sources":["../src/components/ai-chat/AIChat.tsx"],"sourcesContent":["'use client';\n\nimport { useMemo, useState } from 'react';\nimport type { CSSProperties, ComponentType, FormEvent, KeyboardEvent, ReactNode } from 'react';\n\nimport { AuiConfig, AuiProvider, ThreadPrimitive } from '@assistant-ui/react';\nimport { AISDKChat, AssistantChatTransport, useAISDKChat } from '@assistant-ui/ai-sdk';\n\nimport styles from './ai-chat.module.css';\n\nexport interface AIChatProps {\n /** AI SDK UI-message stream endpoint. */\n readonly api: string;\n /** Opaque scope identifier sent to the API. Server must authorize it. */\n readonly scope?: string;\n /** Human-readable display text; never used as an access-control identifier. */\n readonly scopeLabel?: string;\n /** Fetch adapter for authentication, request instrumentation and local demos. */\n readonly fetch?: typeof globalThis.fetch;\n readonly headers?: Record<string, string>;\n readonly credentials?: RequestCredentials;\n /** Change this when the authenticated identity changes to reset the transcript. */\n readonly sessionKey?: string | number;\n /** Maximum number of user turns (default: 8). */\n readonly messageLimit?: number;\n readonly inputPlaceholder?: string;\n readonly inputMaxLength?: number;\n readonly components?: AIChatComponents;\n readonly onClose?: () => void;\n readonly className?: string;\n readonly style?: CSSProperties;\n}\n\nexport interface AIChatComponents {\n readonly MessageRenderer?: ComponentType<AIChatMessageRendererProps>;\n readonly ReasoningRenderer?: ComponentType<AIChatReasoningRendererProps>;\n readonly SourceRenderer?: ComponentType<AIChatSourceRendererProps>;\n readonly DataRenderer?: ComponentType<AIChatDataRendererProps>;\n readonly ErrorRenderer?: ComponentType<AIChatErrorRendererProps>;\n}\n\nexport interface AIChatMessageRendererProps {\n readonly message: {\n readonly id: string;\n readonly role: 'user' | 'assistant';\n readonly parts: readonly unknown[];\n readonly metadata?: Record<string, unknown>;\n };\n readonly renderMessagePart: (part: Record<string, unknown>, index: number) => ReactNode;\n}\n\nexport interface AIChatReasoningRendererProps {\n readonly children: string;\n readonly title?: string;\n}\n\nexport interface AIChatSource {\n readonly id: string;\n readonly title?: string;\n readonly url?: string;\n}\n\nexport interface AIChatSourceRendererProps {\n readonly sources: readonly AIChatSource[];\n readonly renderSource: (source: AIChatSource, index: number) => ReactNode;\n}\n\nexport interface AIChatDataRendererProps {\n readonly data: readonly Record<string, unknown>[];\n readonly renderDataItem: (item: Record<string, unknown>, index: number) => ReactNode;\n}\n\nexport interface AIChatErrorRendererProps {\n readonly error: Error;\n readonly onRetry: () => void;\n readonly onClear: () => void;\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\nfunction asString(value: unknown): string | undefined {\n return typeof value === 'string' ? value : undefined;\n}\n\nfunction safeHttpUrl(value: unknown): string | undefined {\n const url = asString(value);\n return url && /^https?:\\/\\//i.test(url) ? url : undefined;\n}\n\nfunction DefaultMessageRenderer({ message, renderMessagePart }: AIChatMessageRendererProps) {\n return (\n <div className={message.role === 'user' ? styles.userMessage : styles.assistantMessage}>\n {message.parts.map((part, index) => (\n <div key={isRecord(part) && typeof part.id === 'string' ? part.id : index}>\n {isRecord(part) ? renderMessagePart(part, index) : null}\n </div>\n ))}\n </div>\n );\n}\n\nfunction DefaultReasoningRenderer({ children, title = 'Reasoning' }: AIChatReasoningRendererProps) {\n return (\n <details className={styles.reasoning}>\n <summary className={styles.reasoningSummary}>{title}</summary>\n <p className={styles.reasoningText}>{children}</p>\n </details>\n );\n}\n\nfunction DefaultSourceRenderer({ sources, renderSource }: AIChatSourceRendererProps) {\n return (\n <div className={styles.sources}>\n <span className={styles.sourcesLabel}>Sources</span>\n <ul>\n {sources.map((source, index) => (\n <li key={source.id}>{renderSource(source, index)}</li>\n ))}\n </ul>\n </div>\n );\n}\n\nfunction DefaultDataRenderer({ data, renderDataItem }: AIChatDataRendererProps) {\n return (\n <div className={styles.data}>\n {data.map((item, index) => (\n <div key={index}>{renderDataItem(item, index)}</div>\n ))}\n </div>\n );\n}\n\nfunction DefaultErrorRenderer({ error, onRetry, onClear }: AIChatErrorRendererProps) {\n return (\n <div className={styles.error} role=\"alert\">\n <p>{error.message}</p>\n <div className={styles.errorActions}>\n <button type=\"button\" onClick={onRetry}>Retry response</button>\n <button type=\"button\" onClick={onClear}>Start new chat</button>\n </div>\n </div>\n );\n}\n\nfunction renderPart(\n part: Record<string, unknown>,\n index: number,\n components: AIChatComponents | undefined,\n): ReactNode {\n const type = asString(part.type) ?? '';\n if (type === 'step-start') return null;\n if (type === 'text') {\n return <span className={styles.textPart}>{asString(part.text) ?? ''}</span>;\n }\n if (type === 'reasoning') {\n const ReasoningRenderer = components?.ReasoningRenderer ?? DefaultReasoningRenderer;\n return <ReasoningRenderer>{asString(part.text) ?? ''}</ReasoningRenderer>;\n }\n if (type === 'source-url' || type === 'source-document') {\n const SourceRenderer = components?.SourceRenderer ?? DefaultSourceRenderer;\n const source: AIChatSource = {\n id: asString(part.sourceId) ?? asString(part.id) ?? `source-${index}`,\n title: asString(part.title) ?? asString(part.filename),\n url: safeHttpUrl(part.url),\n };\n return (\n <SourceRenderer\n sources={[source]}\n renderSource={(item) => item.url ? (\n <a href={item.url} target=\"_blank\" rel=\"noopener noreferrer\">\n {item.title ?? item.url}\n </a>\n ) : <span>{item.title ?? item.id}</span>}\n />\n );\n }\n if (type.startsWith('data-')) {\n const DataRenderer = components?.DataRenderer ?? DefaultDataRenderer;\n return (\n <DataRenderer\n data={[part]}\n renderDataItem={(item) => (\n <pre className={styles.structuredData}>{JSON.stringify(item.data ?? item, null, 2)}</pre>\n )}\n />\n );\n }\n if (type.startsWith('tool-') || type === 'dynamic-tool') {\n return (\n <details className={styles.toolPart}>\n <summary>{asString(part.toolName) ?? type.replace(/^tool-/, '')}</summary>\n <pre className={styles.structuredData}>\n {JSON.stringify(part.output ?? part.input ?? part, null, 2)}\n </pre>\n </details>\n );\n }\n if (type === 'file' || type === 'image') {\n const url = safeHttpUrl(part.url);\n return url ? (\n <a href={url} target=\"_blank\" rel=\"noopener noreferrer\">\n {asString(part.filename) ?? 'View attachment'}\n </a>\n ) : <span>Attachment</span>;\n }\n // Preserve unsupported part types as inspectable data instead of silently dropping them.\n return <pre className={styles.structuredData}>{JSON.stringify(part, null, 2)}</pre>;\n}\n\nconst DEFAULT_MESSAGE_LIMIT = 8;\n\nexport function AIChat({\n api,\n scope,\n scopeLabel,\n fetch: requestFetch,\n headers,\n credentials,\n sessionKey,\n messageLimit = DEFAULT_MESSAGE_LIMIT,\n inputPlaceholder = 'Ask a question...',\n inputMaxLength = 2000,\n components,\n onClose,\n className,\n style,\n}: AIChatProps) {\n // Remounting the provider creates a fresh AI SDK chat id, not merely an empty transcript.\n const [session, setSession] = useState(0);\n const transport = useMemo(\n () => new AssistantChatTransport({\n api,\n // The transport merges this with the AI SDK messages, id, model context and tools.\n // The endpoint, not the presentation component, must enforce the scope.\n ...(scope ? { body: { scope } } : {}),\n ...(requestFetch ? { fetch: requestFetch } : {}),\n ...(headers ? { headers } : {}),\n ...(credentials ? { credentials } : {}),\n }),\n [api, scope, requestFetch, headers, credentials],\n );\n const config = useMemo(\n () => AuiConfig({ threads: AISDKChat({ transport }) }),\n [transport, session],\n );\n\n return (\n <div className={[styles.container, className].filter(Boolean).join(' ')} style={style}>\n {scopeLabel && (\n <div className={styles.scope}>\n <span className={styles.scopeLabel}>Current scope</span>\n <strong>{scopeLabel}</strong>\n </div>\n )}\n {onClose && (\n <button className={styles.closeBtn} type=\"button\" onClick={onClose} aria-label=\"Close chat\">\n ✕\n </button>\n )}\n <AuiProvider key={JSON.stringify([api, scope, sessionKey, session])} config={config}>\n <ThreadPrimitive.Root className={styles.thread}>\n <ChatViewport\n messageLimit={Number.isFinite(messageLimit) ? Math.max(1, Math.floor(messageLimit)) : DEFAULT_MESSAGE_LIMIT}\n inputPlaceholder={inputPlaceholder}\n inputMaxLength={inputMaxLength}\n components={components}\n onNewChat={() => setSession((previous) => previous + 1)}\n />\n </ThreadPrimitive.Root>\n </AuiProvider>\n </div>\n );\n}\n\ninterface ChatViewportProps {\n readonly messageLimit: number;\n readonly inputPlaceholder: string;\n readonly inputMaxLength: number;\n readonly components?: AIChatComponents;\n readonly onNewChat: () => void;\n}\n\nfunction ChatViewport({\n messageLimit,\n inputPlaceholder,\n inputMaxLength,\n components,\n onNewChat,\n}: ChatViewportProps) {\n const chat = useAISDKChat();\n const [draft, setDraft] = useState('');\n const messages = chat?.messages ?? [];\n const status = chat?.status ?? 'ready';\n const isBusy = status === 'submitted' || status === 'streaming';\n const historyFull = messages.filter((message) => message.role === 'user').length >= messageLimit;\n const MessageRenderer = components?.MessageRenderer ?? DefaultMessageRenderer;\n const ErrorRenderer = components?.ErrorRenderer ?? DefaultErrorRenderer;\n\n const handleSubmit = () => {\n const text = draft.trim();\n if (!chat || !text || isBusy || historyFull || chat.error) return;\n setDraft('');\n void chat.sendMessage({ text });\n };\n\n const handleNewChat = () => {\n void chat?.stop();\n onNewChat();\n };\n\n const handleRetry = () => {\n if (!chat || isBusy) return;\n chat.clearError();\n void chat.regenerate();\n };\n\n const handleKeyDown = (event: KeyboardEvent<HTMLTextAreaElement>) => {\n if (event.key === 'Enter' && !event.shiftKey && !event.nativeEvent.isComposing) {\n event.preventDefault();\n handleSubmit();\n }\n };\n\n const handleFormSubmit = (event: FormEvent<HTMLFormElement>) => {\n event.preventDefault();\n handleSubmit();\n };\n\n return (\n <ThreadPrimitive.Viewport autoScroll className={styles.viewport}>\n {messages.length > 0 && (\n <div className={styles.chatToolbar}>\n <button type=\"button\" onClick={handleNewChat}>New chat</button>\n </div>\n )}\n <div className={styles.messageList} role=\"log\" aria-label=\"Chat history\" aria-live=\"polite\">\n {messages.length === 0 && (\n <div className={styles.emptyState}>\n <p>Start a conversation</p>\n </div>\n )}\n {messages.filter((message) => message.role === 'user' || message.role === 'assistant').map((message) => (\n <MessageRenderer\n key={message.id}\n message={{\n id: message.id,\n role: message.role as 'user' | 'assistant',\n parts: message.parts,\n ...(isRecord(message.metadata) ? { metadata: message.metadata } : {}),\n }}\n renderMessagePart={(part, index) => renderPart(part, index, components)}\n />\n ))}\n {isBusy && <p className={styles.status}>Thinking...</p>}\n </div>\n <ThreadPrimitive.ViewportFooter className={styles.footer}>\n {!chat && <p className={styles.error} role=\"alert\">Chat runtime is unavailable.</p>}\n {chat?.error && (\n <ErrorRenderer error={chat.error} onRetry={handleRetry} onClear={handleNewChat} />\n )}\n {historyFull && !chat?.error && !isBusy && (\n <div className={styles.historyLimit}>\n <span>This chat has reached its {messageLimit}-question limit.</span>\n <button type=\"button\" onClick={handleNewChat}>Start new chat</button>\n </div>\n )}\n {(!historyFull || isBusy) && !chat?.error && (\n <form className={styles.composerForm} onSubmit={handleFormSubmit}>\n <textarea\n className={styles.input}\n aria-label=\"Message\"\n rows={2}\n value={draft}\n onChange={(event) => setDraft(event.target.value)}\n onKeyDown={handleKeyDown}\n placeholder={inputPlaceholder}\n maxLength={inputMaxLength}\n disabled={isBusy || !chat}\n />\n {isBusy ? (\n <button type=\"button\" className={styles.sendButton} onClick={() => void chat?.stop()}>\n Stop\n </button>\n ) : (\n <button type=\"submit\" className={styles.sendButton} disabled={!chat || !draft.trim()}>\n Send\n </button>\n )}\n </form>\n )}\n </ThreadPrimitive.ViewportFooter>\n </ThreadPrimitive.Viewport>\n );\n}\n"],"mappings":";;;;;;;AA8EA,SAAS,SAAS,OAAkD;CAClE,OAAO,OAAO,UAAU,YAAY,UAAU,QAAQ,CAAC,MAAM,QAAQ,KAAK;AAC5E;AAEA,SAAS,SAAS,OAAoC;CACpD,OAAO,OAAO,UAAU,WAAW,QAAQ,KAAA;AAC7C;AAEA,SAAS,YAAY,OAAoC;CACvD,MAAM,MAAM,SAAS,KAAK;CAC1B,OAAO,OAAO,gBAAgB,KAAK,GAAG,IAAI,MAAM,KAAA;AAClD;AAEA,SAAS,uBAAuB,EAAE,SAAS,qBAAiD;CAC1F,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;EAAK,WAAW,QAAQ,SAAS,SAAS,uBAAA,QAAO,cAAc,uBAAA,QAAO;YACnE,QAAQ,MAAM,KAAK,MAAM,UACxB,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD,EAAA,UACG,SAAS,IAAI,IAAI,kBAAkB,MAAM,KAAK,IAAI,KAChD,GAFK,SAAS,IAAI,KAAK,OAAO,KAAK,OAAO,WAAW,KAAK,KAAK,KAE/D,CACN;CACE,CAAA;AAET;AAEA,SAAS,yBAAyB,EAAE,UAAU,QAAQ,eAA6C;CACjG,OACE,iBAAA,GAAA,kBAAA,KAAA,CAAC,WAAD;EAAS,WAAW,uBAAA,QAAO;YAA3B,CACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,WAAD;GAAS,WAAW,uBAA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A,CAAC,QAAD,EAAA,UAAA;OAAM;OAA2B;OAAa;MAAsB,EAAA,CAAA,GACpE,iBAAA,GAAA,kBAAA,IAAA,CAAC,UAAD;OAAQ,MAAK;OAAS,SAAS;iBAAe;MAAsB,CAAA,CACjE;;MAEL,CAAC,eAAe,WAAW,CAAC,MAAM,SAClC,iBAAA,GAAA,kBAAA,KAAA,CAAC,QAAD;MAAM,WAAW,uBAAA,QAAO;MAAc,UAAU;gBAAhD,CACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,YAAD;OACE,WAAW,uBAAA,QAAO;OAClB,cAAW;OACX,MAAM;OACN,OAAO;OACP,WAAW,UAAU,SAAS,MAAM,OAAO,KAAK;OAChD,WAAW;OACX,aAAa;OACb,WAAW;OACX,UAAU,UAAU,CAAC;MACtB,CAAA,GACA,SACC,iBAAA,GAAA,kBAAA,IAAA,CAAC,UAAD;OAAQ,MAAK;OAAS,WAAW,uBAAA,QAAO;OAAY,eAAe,KAAK,MAAM,KAAK;iBAAG;MAE9E,CAAA,IAER,iBAAA,GAAA,kBAAA,IAAA,CAAC,UAAD;OAAQ,MAAK;OAAS,WAAW,uBAAA,QAAO;OAAY,UAAU,CAAC,QAAQ,CAAC,MAAM,KAAK;iBAAG;MAE9E,CAAA,CAEN;;IAEsB;;EACR;;AAE9B"}
|
package/dist/style.css
CHANGED
|
@@ -111,13 +111,13 @@ body {
|
|
|
111
111
|
color-scheme: dark;
|
|
112
112
|
--background: #0f172a;
|
|
113
113
|
--foreground: #e2e8f0;
|
|
114
|
-
--card: #
|
|
114
|
+
--card: #1e293b;
|
|
115
115
|
--card-foreground: #e2e8f0;
|
|
116
|
-
--popover: #
|
|
116
|
+
--popover: #2a374d;
|
|
117
117
|
--popover-foreground: #e2e8f0;
|
|
118
|
-
--secondary: #
|
|
118
|
+
--secondary: #243047;
|
|
119
119
|
--secondary-foreground: #e2e8f0;
|
|
120
|
-
--muted: #
|
|
120
|
+
--muted: #243047;
|
|
121
121
|
--muted-foreground: #94a3b8;
|
|
122
122
|
--accent: color-mix(in srgb, var(--primary) 12%, transparent);
|
|
123
123
|
--uzi-control-shadow:
|
|
@@ -129,14 +129,14 @@ body {
|
|
|
129
129
|
--accent-foreground: #e2e8f0;
|
|
130
130
|
--destructive: hsl(0 72% 51%);
|
|
131
131
|
--destructive-foreground: hsl(0 0% 98%);
|
|
132
|
-
--border: #
|
|
133
|
-
--input: #
|
|
134
|
-
--panel: #
|
|
132
|
+
--border: #334155;
|
|
133
|
+
--input: #334155;
|
|
134
|
+
--panel: #1e293b;
|
|
135
135
|
--text: #e2e8f0;
|
|
136
136
|
--uzi-surface-canvas: var(--background);
|
|
137
|
-
--uzi-surface-1:
|
|
138
|
-
--uzi-surface-2:
|
|
139
|
-
--uzi-surface-raised:
|
|
137
|
+
--uzi-surface-1: var(--panel);
|
|
138
|
+
--uzi-surface-2: var(--secondary);
|
|
139
|
+
--uzi-surface-raised: #2a374d;
|
|
140
140
|
--uzi-surface-selected: color-mix(in srgb, var(--primary) 12%, var(--panel));
|
|
141
141
|
--uzi-text-primary: var(--foreground);
|
|
142
142
|
--uzi-text-secondary: color-mix(in srgb, var(--foreground) 72%, var(--muted-foreground));
|
|
@@ -157,7 +157,7 @@ body {
|
|
|
157
157
|
inset 0 1px 0 rgba(255, 255, 255, 0.035),
|
|
158
158
|
0 20px 56px rgba(0, 0, 0, 0.32);
|
|
159
159
|
/* Preserve the legacy alias value while new components use semantic Uzi tokens. */
|
|
160
|
-
--surface-elevated:
|
|
160
|
+
--surface-elevated: var(--uzi-surface-raised);
|
|
161
161
|
--surface-topbar: color-mix(in srgb, var(--background, #0b1224) 85%, transparent);
|
|
162
162
|
}
|
|
163
163
|
|
|
@@ -186,7 +186,7 @@ body {
|
|
|
186
186
|
:root[data-uzi-accent="emerald"],
|
|
187
187
|
[data-uzi-accent="emerald"] {
|
|
188
188
|
--primary: hsl(160 84% 39%);
|
|
189
|
-
--primary-foreground:
|
|
189
|
+
--primary-foreground: #0f172a;
|
|
190
190
|
--ring: hsl(160 84% 39%);
|
|
191
191
|
}
|
|
192
192
|
|
|
@@ -285,7 +285,7 @@ body {
|
|
|
285
285
|
}
|
|
286
286
|
|
|
287
287
|
.uzi-button-module__variantOutline__uXfiP {
|
|
288
|
-
background: var(--ts-btn-outline-bg,
|
|
288
|
+
background: var(--ts-btn-outline-bg, transparent);
|
|
289
289
|
color: var(--ts-btn-outline-text, var(--foreground));
|
|
290
290
|
border-color: var(--ts-btn-outline-border, var(--border));
|
|
291
291
|
}
|
|
@@ -580,7 +580,7 @@ body {
|
|
|
580
580
|
}
|
|
581
581
|
|
|
582
582
|
.uzi-modal-module__modal__Mao59 {
|
|
583
|
-
background: var(--
|
|
583
|
+
background: var(--uzi-surface-raised, var(--popover));
|
|
584
584
|
border: 1px solid var(--border);
|
|
585
585
|
border-radius: 14px;
|
|
586
586
|
max-height: calc(100vh - var(--uzi-modal-viewport-margin));
|
|
@@ -968,7 +968,7 @@ body {
|
|
|
968
968
|
min-height: 2.25rem;
|
|
969
969
|
border-radius: 0.5rem;
|
|
970
970
|
border: 1px solid var(--ts-input-border, var(--input));
|
|
971
|
-
background: var(--ts-input-bg, var(--
|
|
971
|
+
background: var(--ts-input-bg, var(--uzi-surface-2, var(--secondary)));
|
|
972
972
|
color: var(--ts-input-fg, var(--foreground));
|
|
973
973
|
padding: 0.25rem 0.75rem;
|
|
974
974
|
font-size: 0.875rem;
|
|
@@ -1037,7 +1037,7 @@ body {
|
|
|
1037
1037
|
gap: 0.625rem;
|
|
1038
1038
|
border-radius: var(--uzi-control-radius);
|
|
1039
1039
|
border: 1px solid var(--ts-dropdown-border, var(--border));
|
|
1040
|
-
background: var(--ts-dropdown-bg, var(--
|
|
1040
|
+
background: var(--ts-dropdown-bg, var(--uzi-surface-2, var(--secondary)));
|
|
1041
1041
|
color: var(--ts-dropdown-text, var(--foreground));
|
|
1042
1042
|
padding:
|
|
1043
1043
|
var(--uzi-control-padding-y)
|
|
@@ -1300,7 +1300,7 @@ body {
|
|
|
1300
1300
|
min-height: var(--uzi-control-min-height);
|
|
1301
1301
|
border-radius: var(--uzi-control-radius);
|
|
1302
1302
|
border: 1px solid var(--ts-dropdown-border, var(--border));
|
|
1303
|
-
background: var(--ts-dropdown-bg, var(--
|
|
1303
|
+
background: var(--ts-dropdown-bg, var(--uzi-surface-2, var(--secondary)));
|
|
1304
1304
|
color: var(--ts-dropdown-text, var(--foreground));
|
|
1305
1305
|
padding:
|
|
1306
1306
|
var(--uzi-control-padding-y)
|
|
@@ -3432,4 +3432,376 @@ button.uzi-sidebar-nav-module__item__uMHkJ {
|
|
|
3432
3432
|
padding: 2rem 1.5rem;
|
|
3433
3433
|
}
|
|
3434
3434
|
}
|
|
3435
|
+
.uzi-ai-chat-module__container__UoyFb {
|
|
3436
|
+
display: flex;
|
|
3437
|
+
flex-direction: column;
|
|
3438
|
+
height: 100%;
|
|
3439
|
+
min-height: 18rem;
|
|
3440
|
+
max-height: 48rem;
|
|
3441
|
+
overflow: hidden;
|
|
3442
|
+
position: relative;
|
|
3443
|
+
}
|
|
3444
|
+
|
|
3445
|
+
.uzi-ai-chat-module__scope__6xOgo {
|
|
3446
|
+
display: flex;
|
|
3447
|
+
flex-direction: column;
|
|
3448
|
+
gap: 0.25rem;
|
|
3449
|
+
padding: 0.75rem 3rem 0.75rem 1rem;
|
|
3450
|
+
background: var(--uzi-surface-1, var(--muted));
|
|
3451
|
+
border-bottom: 1px solid var(--border);
|
|
3452
|
+
}
|
|
3453
|
+
|
|
3454
|
+
.uzi-ai-chat-module__scopeLabel__LHbKZ {
|
|
3455
|
+
font-size: 0.6875rem;
|
|
3456
|
+
font-weight: 650;
|
|
3457
|
+
letter-spacing: 0.04em;
|
|
3458
|
+
text-transform: uppercase;
|
|
3459
|
+
color: var(--muted-foreground);
|
|
3460
|
+
}
|
|
3461
|
+
|
|
3462
|
+
.uzi-ai-chat-module__scope__6xOgo strong {
|
|
3463
|
+
font-size: 0.875rem;
|
|
3464
|
+
}
|
|
3465
|
+
|
|
3466
|
+
.uzi-ai-chat-module__scopeHelp__NddsL {
|
|
3467
|
+
margin: 0;
|
|
3468
|
+
font-size: 0.75rem;
|
|
3469
|
+
color: var(--muted-foreground);
|
|
3470
|
+
line-height: 1.5;
|
|
3471
|
+
}
|
|
3472
|
+
|
|
3473
|
+
.uzi-ai-chat-module__closeBtn__IeRH2 {
|
|
3474
|
+
position: absolute;
|
|
3475
|
+
top: 0.5rem;
|
|
3476
|
+
right: 0.5rem;
|
|
3477
|
+
z-index: 1;
|
|
3478
|
+
display: grid;
|
|
3479
|
+
place-items: center;
|
|
3480
|
+
width: 2rem;
|
|
3481
|
+
height: 2rem;
|
|
3482
|
+
border: 0;
|
|
3483
|
+
border-radius: 50%;
|
|
3484
|
+
background: transparent;
|
|
3485
|
+
color: var(--muted-foreground);
|
|
3486
|
+
cursor: pointer;
|
|
3487
|
+
font-size: 0.875rem;
|
|
3488
|
+
}
|
|
3489
|
+
|
|
3490
|
+
.uzi-ai-chat-module__closeBtn__IeRH2:hover {
|
|
3491
|
+
background: var(--uzi-surface-2, var(--muted));
|
|
3492
|
+
color: var(--foreground);
|
|
3493
|
+
}
|
|
3494
|
+
|
|
3495
|
+
.uzi-ai-chat-module__closeBtn__IeRH2:focus-visible,
|
|
3496
|
+
.uzi-ai-chat-module__sendButton__S9MmM:focus-visible,
|
|
3497
|
+
.uzi-ai-chat-module__errorActions__MWoVQ button:focus-visible,
|
|
3498
|
+
.uzi-ai-chat-module__historyLimit__LgZzD button:focus-visible {
|
|
3499
|
+
outline: 2px solid var(--primary);
|
|
3500
|
+
outline-offset: 2px;
|
|
3501
|
+
}
|
|
3502
|
+
|
|
3503
|
+
.uzi-ai-chat-module__thread__Rqyeu {
|
|
3504
|
+
display: flex;
|
|
3505
|
+
flex: 1;
|
|
3506
|
+
flex-direction: column;
|
|
3507
|
+
min-height: 0;
|
|
3508
|
+
overflow: hidden;
|
|
3509
|
+
}
|
|
3510
|
+
|
|
3511
|
+
.uzi-ai-chat-module__viewport__-CgLF {
|
|
3512
|
+
flex: 1;
|
|
3513
|
+
display: flex;
|
|
3514
|
+
flex-direction: column;
|
|
3515
|
+
min-height: 0;
|
|
3516
|
+
overflow-y: auto;
|
|
3517
|
+
overflow-x: hidden;
|
|
3518
|
+
gap: 0.75rem;
|
|
3519
|
+
}
|
|
3520
|
+
|
|
3521
|
+
.uzi-ai-chat-module__chatToolbar__-QMr9 {
|
|
3522
|
+
position: sticky;
|
|
3523
|
+
top: 0;
|
|
3524
|
+
z-index: 1;
|
|
3525
|
+
display: flex;
|
|
3526
|
+
justify-content: flex-end;
|
|
3527
|
+
padding: 0.5rem 1rem;
|
|
3528
|
+
background: var(--uzi-surface-1, var(--background));
|
|
3529
|
+
border-bottom: 1px solid var(--border);
|
|
3530
|
+
}
|
|
3531
|
+
|
|
3532
|
+
.uzi-ai-chat-module__chatToolbar__-QMr9 button {
|
|
3533
|
+
border: 0;
|
|
3534
|
+
border-radius: 0.375rem;
|
|
3535
|
+
padding: 0.35rem 0.5rem;
|
|
3536
|
+
background: transparent;
|
|
3537
|
+
color: var(--muted-foreground);
|
|
3538
|
+
font: inherit;
|
|
3539
|
+
font-size: 0.75rem;
|
|
3540
|
+
cursor: pointer;
|
|
3541
|
+
}
|
|
3542
|
+
|
|
3543
|
+
.uzi-ai-chat-module__chatToolbar__-QMr9 button:hover {
|
|
3544
|
+
color: var(--foreground);
|
|
3545
|
+
background: var(--uzi-surface-2, var(--muted));
|
|
3546
|
+
}
|
|
3547
|
+
|
|
3548
|
+
.uzi-ai-chat-module__chatToolbar__-QMr9 button:focus-visible {
|
|
3549
|
+
outline: 2px solid var(--primary);
|
|
3550
|
+
outline-offset: 2px;
|
|
3551
|
+
}
|
|
3552
|
+
|
|
3553
|
+
.uzi-ai-chat-module__messageList__G3H50 {
|
|
3554
|
+
display: flex;
|
|
3555
|
+
flex: 1 0 auto;
|
|
3556
|
+
flex-direction: column;
|
|
3557
|
+
gap: 0.75rem;
|
|
3558
|
+
padding: 1rem;
|
|
3559
|
+
}
|
|
3560
|
+
|
|
3561
|
+
.uzi-ai-chat-module__userMessage__iGksi,
|
|
3562
|
+
.uzi-ai-chat-module__assistantMessage__hRdxP {
|
|
3563
|
+
display: flex;
|
|
3564
|
+
flex-direction: column;
|
|
3565
|
+
gap: 0.5rem;
|
|
3566
|
+
padding: 0.75rem 1rem;
|
|
3567
|
+
border-radius: 0.75rem;
|
|
3568
|
+
color: var(--foreground);
|
|
3569
|
+
overflow-wrap: anywhere;
|
|
3570
|
+
}
|
|
3571
|
+
|
|
3572
|
+
.uzi-ai-chat-module__userMessage__iGksi {
|
|
3573
|
+
background: color-mix(in srgb, var(--primary) 10%, transparent);
|
|
3574
|
+
border: 1px solid color-mix(in srgb, var(--primary) 20%, transparent);
|
|
3575
|
+
}
|
|
3576
|
+
|
|
3577
|
+
.uzi-ai-chat-module__assistantMessage__hRdxP {
|
|
3578
|
+
background: var(--muted);
|
|
3579
|
+
border: 1px solid var(--border);
|
|
3580
|
+
}
|
|
3581
|
+
|
|
3582
|
+
.uzi-ai-chat-module__textPart__U0myJ {
|
|
3583
|
+
white-space: pre-wrap;
|
|
3584
|
+
line-height: 1.6;
|
|
3585
|
+
}
|
|
3586
|
+
|
|
3587
|
+
.uzi-ai-chat-module__reasoning__7Xf83,
|
|
3588
|
+
.uzi-ai-chat-module__toolPart__P160m {
|
|
3589
|
+
border: 1px solid var(--border);
|
|
3590
|
+
border-radius: 0.5rem;
|
|
3591
|
+
padding: 0.5rem 0.75rem;
|
|
3592
|
+
background: var(--uzi-surface-1, transparent);
|
|
3593
|
+
}
|
|
3594
|
+
|
|
3595
|
+
.uzi-ai-chat-module__reasoningSummary__3gaQ3,
|
|
3596
|
+
.uzi-ai-chat-module__toolPart__P160m summary {
|
|
3597
|
+
cursor: pointer;
|
|
3598
|
+
font-size: 0.75rem;
|
|
3599
|
+
font-weight: 600;
|
|
3600
|
+
color: var(--muted-foreground);
|
|
3601
|
+
}
|
|
3602
|
+
|
|
3603
|
+
.uzi-ai-chat-module__reasoningText__qxl36 {
|
|
3604
|
+
margin: 0.5rem 0 0;
|
|
3605
|
+
font-size: 0.8125rem;
|
|
3606
|
+
line-height: 1.6;
|
|
3607
|
+
color: var(--muted-foreground);
|
|
3608
|
+
white-space: pre-wrap;
|
|
3609
|
+
}
|
|
3610
|
+
|
|
3611
|
+
.uzi-ai-chat-module__sources__EwoEv {
|
|
3612
|
+
padding-top: 0.5rem;
|
|
3613
|
+
border-top: 1px solid var(--border);
|
|
3614
|
+
}
|
|
3615
|
+
|
|
3616
|
+
.uzi-ai-chat-module__sourcesLabel__YV6j1 {
|
|
3617
|
+
display: block;
|
|
3618
|
+
font-size: 0.6875rem;
|
|
3619
|
+
font-weight: 650;
|
|
3620
|
+
color: var(--muted-foreground);
|
|
3621
|
+
margin-bottom: 0.25rem;
|
|
3622
|
+
}
|
|
3623
|
+
|
|
3624
|
+
.uzi-ai-chat-module__sources__EwoEv ul {
|
|
3625
|
+
display: flex;
|
|
3626
|
+
flex-wrap: wrap;
|
|
3627
|
+
gap: 0.5rem;
|
|
3628
|
+
margin: 0;
|
|
3629
|
+
padding-left: 1.25rem;
|
|
3630
|
+
}
|
|
3631
|
+
|
|
3632
|
+
.uzi-ai-chat-module__sources__EwoEv li {
|
|
3633
|
+
font-size: 0.75rem;
|
|
3634
|
+
overflow-wrap: anywhere;
|
|
3635
|
+
}
|
|
3636
|
+
|
|
3637
|
+
.uzi-ai-chat-module__data__6pYCT {
|
|
3638
|
+
padding: 0.5rem;
|
|
3639
|
+
background: var(--uzi-surface-2, var(--muted));
|
|
3640
|
+
border-radius: 0.5rem;
|
|
3641
|
+
overflow-x: auto;
|
|
3642
|
+
}
|
|
3643
|
+
|
|
3644
|
+
.uzi-ai-chat-module__structuredData__CVeqF {
|
|
3645
|
+
margin: 0;
|
|
3646
|
+
padding: 0.5rem 0;
|
|
3647
|
+
max-width: 100%;
|
|
3648
|
+
overflow-x: auto;
|
|
3649
|
+
white-space: pre-wrap;
|
|
3650
|
+
overflow-wrap: anywhere;
|
|
3651
|
+
font-size: 0.75rem;
|
|
3652
|
+
line-height: 1.5;
|
|
3653
|
+
}
|
|
3654
|
+
|
|
3655
|
+
.uzi-ai-chat-module__footer__VzCvT {
|
|
3656
|
+
position: sticky;
|
|
3657
|
+
bottom: 0;
|
|
3658
|
+
z-index: 1;
|
|
3659
|
+
flex-shrink: 0;
|
|
3660
|
+
background: var(--background);
|
|
3661
|
+
border-top: 1px solid var(--border);
|
|
3662
|
+
}
|
|
3663
|
+
|
|
3664
|
+
.uzi-ai-chat-module__composerForm__E2Wqd {
|
|
3665
|
+
display: grid;
|
|
3666
|
+
grid-template-columns: minmax(0, 1fr) auto;
|
|
3667
|
+
align-items: end;
|
|
3668
|
+
gap: 0.75rem;
|
|
3669
|
+
padding: 0.75rem 1rem;
|
|
3670
|
+
}
|
|
3671
|
+
|
|
3672
|
+
.uzi-ai-chat-module__input__-Rzh8 {
|
|
3673
|
+
width: 100%;
|
|
3674
|
+
min-height: 2.5rem;
|
|
3675
|
+
padding: 0.5rem 0.75rem;
|
|
3676
|
+
border: 1px solid var(--border);
|
|
3677
|
+
border-radius: 0.5rem;
|
|
3678
|
+
background: var(--background);
|
|
3679
|
+
color: var(--foreground);
|
|
3680
|
+
font: inherit;
|
|
3681
|
+
font-size: 0.875rem;
|
|
3682
|
+
line-height: 1.5;
|
|
3683
|
+
resize: vertical;
|
|
3684
|
+
}
|
|
3685
|
+
|
|
3686
|
+
.uzi-ai-chat-module__input__-Rzh8:focus {
|
|
3687
|
+
outline: none;
|
|
3688
|
+
border-color: var(--primary);
|
|
3689
|
+
box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 30%, transparent);
|
|
3690
|
+
}
|
|
3691
|
+
|
|
3692
|
+
.uzi-ai-chat-module__input__-Rzh8::placeholder {
|
|
3693
|
+
color: var(--muted-foreground);
|
|
3694
|
+
}
|
|
3695
|
+
|
|
3696
|
+
.uzi-ai-chat-module__input__-Rzh8:disabled,
|
|
3697
|
+
.uzi-ai-chat-module__sendButton__S9MmM:disabled {
|
|
3698
|
+
opacity: 0.5;
|
|
3699
|
+
cursor: not-allowed;
|
|
3700
|
+
}
|
|
3701
|
+
|
|
3702
|
+
.uzi-ai-chat-module__sendButton__S9MmM {
|
|
3703
|
+
min-height: 2.5rem;
|
|
3704
|
+
padding: 0.5rem 0.875rem;
|
|
3705
|
+
border: 1px solid var(--border);
|
|
3706
|
+
border-radius: 0.5rem;
|
|
3707
|
+
background: var(--primary);
|
|
3708
|
+
color: var(--primary-foreground);
|
|
3709
|
+
font: inherit;
|
|
3710
|
+
font-size: 0.875rem;
|
|
3711
|
+
font-weight: 600;
|
|
3712
|
+
cursor: pointer;
|
|
3713
|
+
}
|
|
3714
|
+
|
|
3715
|
+
.uzi-ai-chat-module__sendButton__S9MmM:not(:disabled):hover {
|
|
3716
|
+
filter: brightness(0.95);
|
|
3717
|
+
}
|
|
3718
|
+
|
|
3719
|
+
.uzi-ai-chat-module__status__Wm3t3 {
|
|
3720
|
+
margin: 0;
|
|
3721
|
+
padding: 0.5rem 1rem;
|
|
3722
|
+
text-align: center;
|
|
3723
|
+
font-size: 0.8125rem;
|
|
3724
|
+
color: var(--muted-foreground);
|
|
3725
|
+
font-style: italic;
|
|
3726
|
+
}
|
|
3727
|
+
|
|
3728
|
+
.uzi-ai-chat-module__error__csAOF {
|
|
3729
|
+
display: flex;
|
|
3730
|
+
flex-direction: column;
|
|
3731
|
+
gap: 0.5rem;
|
|
3732
|
+
padding: 0.75rem 1rem;
|
|
3733
|
+
border: 1px solid var(--destructive);
|
|
3734
|
+
border-radius: 0.5rem;
|
|
3735
|
+
margin: 0.75rem 1rem;
|
|
3736
|
+
background: color-mix(in srgb, var(--destructive) 10%, transparent);
|
|
3737
|
+
}
|
|
3738
|
+
|
|
3739
|
+
.uzi-ai-chat-module__error__csAOF p {
|
|
3740
|
+
margin: 0;
|
|
3741
|
+
color: var(--destructive);
|
|
3742
|
+
font-size: 0.8125rem;
|
|
3743
|
+
}
|
|
3744
|
+
|
|
3745
|
+
.uzi-ai-chat-module__errorActions__MWoVQ {
|
|
3746
|
+
display: flex;
|
|
3747
|
+
gap: 0.5rem;
|
|
3748
|
+
}
|
|
3749
|
+
|
|
3750
|
+
.uzi-ai-chat-module__errorActions__MWoVQ button,
|
|
3751
|
+
.uzi-ai-chat-module__historyLimit__LgZzD button {
|
|
3752
|
+
padding: 0.375rem 0.75rem;
|
|
3753
|
+
border: 1px solid var(--border);
|
|
3754
|
+
border-radius: 0.375rem;
|
|
3755
|
+
background: transparent;
|
|
3756
|
+
color: var(--foreground);
|
|
3757
|
+
font: inherit;
|
|
3758
|
+
font-size: 0.75rem;
|
|
3759
|
+
cursor: pointer;
|
|
3760
|
+
}
|
|
3761
|
+
|
|
3762
|
+
.uzi-ai-chat-module__errorActions__MWoVQ button:hover,
|
|
3763
|
+
.uzi-ai-chat-module__historyLimit__LgZzD button:hover {
|
|
3764
|
+
background: var(--uzi-surface-2, var(--muted));
|
|
3765
|
+
}
|
|
3766
|
+
|
|
3767
|
+
.uzi-ai-chat-module__historyLimit__LgZzD {
|
|
3768
|
+
display: flex;
|
|
3769
|
+
flex-direction: column;
|
|
3770
|
+
gap: 0.5rem;
|
|
3771
|
+
align-items: center;
|
|
3772
|
+
padding: 0.75rem 1rem;
|
|
3773
|
+
margin: 0.75rem 1rem;
|
|
3774
|
+
background: var(--uzi-surface-1, var(--muted));
|
|
3775
|
+
border: 1px solid var(--border);
|
|
3776
|
+
border-radius: 0.5rem;
|
|
3777
|
+
}
|
|
3778
|
+
|
|
3779
|
+
.uzi-ai-chat-module__historyLimit__LgZzD span {
|
|
3780
|
+
font-size: 0.75rem;
|
|
3781
|
+
color: var(--muted-foreground);
|
|
3782
|
+
}
|
|
3783
|
+
|
|
3784
|
+
.uzi-ai-chat-module__emptyState__JzB1x {
|
|
3785
|
+
display: grid;
|
|
3786
|
+
place-items: center;
|
|
3787
|
+
flex: 1;
|
|
3788
|
+
min-height: 12rem;
|
|
3789
|
+
color: var(--muted-foreground);
|
|
3790
|
+
text-align: center;
|
|
3791
|
+
}
|
|
3792
|
+
|
|
3793
|
+
.uzi-ai-chat-module__emptyState__JzB1x p {
|
|
3794
|
+
margin: 0;
|
|
3795
|
+
font-size: 0.875rem;
|
|
3796
|
+
}
|
|
3797
|
+
|
|
3798
|
+
@media (max-width: 640px) {
|
|
3799
|
+
.uzi-ai-chat-module__composerForm__E2Wqd {
|
|
3800
|
+
grid-template-columns: minmax(0, 1fr) auto;
|
|
3801
|
+
}
|
|
3802
|
+
|
|
3803
|
+
.uzi-ai-chat-module__errorActions__MWoVQ {
|
|
3804
|
+
flex-wrap: wrap;
|
|
3805
|
+
}
|
|
3806
|
+
}
|
|
3435
3807
|
/*$vite$:1*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tomny-dev/uzi",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.1-pr.82.252.1.0f7aa55",
|
|
4
4
|
"description": "Rapid-fire React UI components. Ship faster, build more.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -57,6 +57,8 @@
|
|
|
57
57
|
"react-dom": "^18.0.0 || ^19.0.0"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
+
"@assistant-ui/ai-sdk": "^0.0.11",
|
|
61
|
+
"@assistant-ui/react": "^0.15.25",
|
|
60
62
|
"@radix-ui/react-avatar": "^1.1.0",
|
|
61
63
|
"@radix-ui/react-dialog": "^1.1.15",
|
|
62
64
|
"@radix-ui/react-dropdown-menu": "^2.1.2",
|