Commit 9d6f04fa9 for llama.cpp

commit 9d6f04fa99936708b9df140b7b2df62a8925afd5
Author: Aleksander Grygier <aleksander.grygier@gmail.com>
Date:   Fri Nov 20 10:33:34 2026 +0100

    ui: show vision as glasses and audio as headphones (#32617)

    The model modality icons match the ones the Llama apps use: glasses for
    vision, headphones for audio. The attach menu's list of what the model
    takes reads the same icons instead of its own microphone and picture.

    Assisted-by: Claude (Opus 5.5 Medium)

diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionAdd/ChatFormActionAddDrawer.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionAdd/ChatFormActionAddDrawer.svelte
index b777b7c00..55e87129e 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionAdd/ChatFormActionAddDrawer.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionAdd/ChatFormActionAddDrawer.svelte
@@ -8,24 +8,23 @@
 		ChevronRight,
 		File,
 		Folder,
-		Image,
 		MessageSquare,
-		Mic,
-		PencilRuler,
-		Video
+		PencilRuler
 	} from '@lucide/svelte';
 	import {
 		ATTACHMENT_FILE_ITEMS,
 		ATTACHMENT_MENU_TEXT,
 		ATTACHMENT_MODALITY_TEXT,
-		ICON_CLASS_DEFAULT
+		ICON_CLASS_DEFAULT,
+		MODALITY_ICONS
 	} from '#lib/constants/index.ts';
 	import { getChatFormActionsContext } from '#lib/contexts/index.ts';
 	import { AttachmentAction, AttachmentItemEnabledWhen } from '#lib/enums/attachment.enums.ts';
+	import { ModelModality } from '#lib/enums/index.ts';
 	import { useAttachmentMenu } from '#lib/hooks/use-attachment-menu.svelte.ts';
 	import { useToolsPanel } from '#lib/hooks/use-tools-panel.svelte.ts';
 	import type { ToolGroup } from '#lib/types/index.ts';
-	import type { Snippet } from 'svelte';
+	import type { Component, Snippet } from 'svelte';

 	interface Props {
 		class?: string;
@@ -54,17 +53,17 @@
 		}
 	);

-	const FILE_MODALITY_ICONS: Record<string, { icon: typeof Image; label: string }> = {
+	const FILE_MODALITY_ICONS: Record<string, { icon: Component; label: string }> = {
 		[AttachmentItemEnabledWhen.HAS_AUDIO_MODALITY]: {
-			icon: Mic,
+			icon: MODALITY_ICONS[ModelModality.AUDIO],
 			label: ATTACHMENT_MODALITY_TEXT[AttachmentItemEnabledWhen.HAS_AUDIO_MODALITY]
 		},
 		[AttachmentItemEnabledWhen.HAS_VIDEO_MODALITY]: {
-			icon: Video,
+			icon: MODALITY_ICONS[ModelModality.VIDEO],
 			label: ATTACHMENT_MODALITY_TEXT[AttachmentItemEnabledWhen.HAS_VIDEO_MODALITY]
 		},
 		[AttachmentItemEnabledWhen.HAS_VISION_MODALITY]: {
-			icon: Image,
+			icon: MODALITY_ICONS[ModelModality.VISION],
 			label: ATTACHMENT_MODALITY_TEXT[AttachmentItemEnabledWhen.HAS_VISION_MODALITY]
 		}
 	};
diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionAdd/ChatFormActionAddDropdown.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionAdd/ChatFormActionAddDropdown.svelte
index 77d10bd9e..b4e6aa821 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionAdd/ChatFormActionAddDropdown.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionAdd/ChatFormActionAddDropdown.svelte
@@ -3,18 +3,20 @@
 	import * as DropdownMenu from '@ggml-org/llama-ui/ui/dropdown-menu';
 	import * as Tooltip from '@ggml-org/llama-ui/ui/tooltip';
 	import { cn } from '@ggml-org/llama-ui/utils';
-	import { File, Folder, Image, MessageSquare, Mic, Plus, Video } from '@lucide/svelte';
+	import { File, Folder, MessageSquare, Plus } from '@lucide/svelte';
 	import { ChatFormActionAddToolsSubmenu } from '#lib/components/app/index.ts';
 	import {
 		ATTACHMENT_FILE_ITEMS,
 		ATTACHMENT_MENU_TEXT,
 		ATTACHMENT_MODALITY_TEXT,
 		ATTACHMENT_TOOLTIP_TEXT,
-		ICON_CLASS_DEFAULT
+		ICON_CLASS_DEFAULT,
+		MODALITY_ICONS
 	} from '#lib/constants/index.ts';
 	import { getChatFormActionsContext } from '#lib/contexts/index.ts';
-	import { AttachmentAction, AttachmentItemEnabledWhen } from '#lib/enums/index.ts';
+	import { AttachmentAction, AttachmentItemEnabledWhen, ModelModality } from '#lib/enums/index.ts';
 	import { useAttachmentMenu } from '#lib/hooks/use-attachment-menu.svelte.ts';
+	import type { Component } from 'svelte';

 	interface Props {
 		class?: string;
@@ -44,17 +46,17 @@
 		}
 	);

-	const FILE_MODALITY_ICONS: Record<string, { icon: typeof Image; label: string }> = {
+	const FILE_MODALITY_ICONS: Record<string, { icon: Component; label: string }> = {
 		[AttachmentItemEnabledWhen.HAS_AUDIO_MODALITY]: {
-			icon: Mic,
+			icon: MODALITY_ICONS[ModelModality.AUDIO],
 			label: ATTACHMENT_MODALITY_TEXT[AttachmentItemEnabledWhen.HAS_AUDIO_MODALITY]
 		},
 		[AttachmentItemEnabledWhen.HAS_VIDEO_MODALITY]: {
-			icon: Video,
+			icon: MODALITY_ICONS[ModelModality.VIDEO],
 			label: ATTACHMENT_MODALITY_TEXT[AttachmentItemEnabledWhen.HAS_VIDEO_MODALITY]
 		},
 		[AttachmentItemEnabledWhen.HAS_VISION_MODALITY]: {
-			icon: Image,
+			icon: MODALITY_ICONS[ModelModality.VISION],
 			label: ATTACHMENT_MODALITY_TEXT[AttachmentItemEnabledWhen.HAS_VISION_MODALITY]
 		}
 	};
diff --git a/ui/lib/ui/src/lib/models/constants.ts b/ui/lib/ui/src/lib/models/constants.ts
index ebfbf84ae..9fff8ca10 100644
--- a/ui/lib/ui/src/lib/models/constants.ts
+++ b/ui/lib/ui/src/lib/models/constants.ts
@@ -2,9 +2,9 @@
 // models-discover-download and model-compatibility).
 import { ModelCapability, ModelModality } from './enums.js';
 import type { ModelModalities } from './types.js';
-import VisionIcon from '@lucide/svelte/icons/eye';
+import VisionIcon from '@lucide/svelte/icons/glasses';
 import ReasoningIcon from '@lucide/svelte/icons/lightbulb';
-import AudioIcon from '@lucide/svelte/icons/mic';
+import AudioIcon from '@lucide/svelte/icons/headphones';
 import VideoIcon from '@lucide/svelte/icons/video';
 import ToolUseIcon from '@lucide/svelte/icons/wrench';
 import type { Component } from 'svelte';