diff --git a/ui/apps/chat/.storybook/main.ts b/ui/apps/chat/.storybook/main.ts
index 3e8c1a39d8dc..e2b8dad14377 100644
--- a/ui/apps/chat/.storybook/main.ts
+++ b/ui/apps/chat/.storybook/main.ts
@@ -16,7 +16,7 @@ const config: StorybookConfig = {
'../tests/stories/**/*.stories.@(js|ts|svelte)',
{
directory: '../../../lib/ui/tests/stories',
- files: '{foundations,components,app,models,mockups}/**/*.stories.svelte'
+ files: '{foundations,components,app,models,mockups,voice}/**/*.stories.svelte'
}
],
addons: [
diff --git a/ui/apps/chat/DESIGN.md b/ui/apps/chat/DESIGN.md
index 971685e1bc51..79e5215286f3 100644
--- a/ui/apps/chat/DESIGN.md
+++ b/ui/apps/chat/DESIGN.md
@@ -1151,6 +1151,12 @@ icon buttons in the chat form are fully round.
(`--sidebar-reveal-x`), taking no taps while the page is aside. The page keeps room under its
last row (`max-md:pb-safe-24`) so the key never covers it. One per page, only for its main
action; from `md` up the action stays a button in the header.
+- **Voice clips:** a recorded clip is a round primary play key, its waveform and the time in
+ `caption`: bars in the muted foreground at 40%, the played part in the primary colour, so
+ the clip stays neutral in both modes. The live waveform while recording is as tall as the
+ input's line (24px), the newest level on the right, and holds still with reduced motion. A
+ voice message's transcript opens under the clip on hover, keyboard focus or a tap, and
+ stays in the DOM for screen readers while closed.
- **Copy feedback:** a copy action turns its icon into a `fg-success` check for 1.5s
(`COPY_FEEDBACK_RESET_MS`), only when the copy succeeded, then back. The icon pops in with a
150ms fade and scale, skipped on first render and with reduced motion.
diff --git a/ui/apps/chat/scripts/llama-ui.js b/ui/apps/chat/scripts/llama-ui.js
index c4eb26af77c9..f8963593a33b 100644
--- a/ui/apps/chat/scripts/llama-ui.js
+++ b/ui/apps/chat/scripts/llama-ui.js
@@ -26,6 +26,7 @@ const LLAMA_UI_EXPORTS = [
['@ggml-org/llama-ui/enums', `${source}/enums/index.ts`],
['@ggml-org/llama-ui/code', `${source}/utils/index.ts`],
['@ggml-org/llama-ui/utils', `${source}/components/ui/utils.ts`],
+ ['@ggml-org/llama-ui/voice', `${source}/components/voice/index.ts`],
['@ggml-org/llama-ui/styles/*', `${source}/styles/*`],
['@ggml-org/llama-ui/theme.css', `${source}/styles/theme.css`],
['@ggml-org/llama-ui/tokens.css', `${source}/styles/tokens.css`],
diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatAttachments/ChatAttachmentsList/ChatAttachmentsListItem/ChatAttachmentsListItem.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatAttachments/ChatAttachmentsList/ChatAttachmentsListItem/ChatAttachmentsListItem.svelte
index 5bb7a47d71ea..eb1a8163c43a 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatAttachments/ChatAttachmentsList/ChatAttachmentsListItem/ChatAttachmentsListItem.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatAttachments/ChatAttachmentsList/ChatAttachmentsListItem/ChatAttachmentsListItem.svelte
@@ -3,7 +3,8 @@
ChatAttachmentsListItemMcpPrompt,
ChatAttachmentsListItemMcpResource,
ChatAttachmentsListItemThumbnailFile,
- ChatAttachmentsListItemThumbnailImage
+ ChatAttachmentsListItemThumbnailImage,
+ ChatAttachmentsListItemVoice
} from '#lib/components/app/index.ts';
import { AttachmentType } from '#lib/enums/index.ts';
import type {
@@ -12,7 +13,7 @@
DatabaseMessageExtraMcpResource,
MCPResourceAttachment
} from '#lib/types/index.ts';
- import { isMcpPrompt, isMcpResource, isPdfFile } from '#lib/utils/index.ts';
+ import { isAudioFile, isMcpPrompt, isMcpResource, isPdfFile } from '#lib/utils/index.ts';
interface Props {
class?: string;
@@ -93,6 +94,15 @@
class="flex-shrink-0 {className} {scrollClasses}"
onclick={() => onMcpResourcePreview?.(mcpResource)}
/>
+{:else if isAudioFile(item.attachment, item.uploadedFile)}
+
+
{:else if item.isImage && item.preview}
+
+
+