char-fork/llama.cpp

git clone https://git.t4t.associates/char-fork/llama.cpp

Aleksander Grygierui: Replace per-conversation MCP overrides with per-conversation tool policy (#27745)fe235f434

char/aliceai-t5-moe
1.8 KiB55 linesraw
1import { FILE_TYPE_ICONS } from '$lib/constants';
2import { AttachmentAction, AttachmentItemEnabledWhen, AttachmentMenuItemId } from '$lib/enums';
3import type { AttachmentMenuItem } from '$lib/types';
4
5/**
6 * File attachment menu items shown in both the desktop dropdown and mobile sheet.
7 * The "Tools" submenu is handled separately by each component.
8 */
9export const ATTACHMENT_FILE_ITEMS: AttachmentMenuItem[] = [
10	{
11		action: AttachmentAction.FILE_UPLOAD,
12		class: 'images-button',
13		disabledTooltip: 'Image processing requires a vision model',
14		enabledWhen: AttachmentItemEnabledWhen.HAS_VISION_MODALITY,
15		icon: FILE_TYPE_ICONS.image,
16		id: AttachmentMenuItemId.IMAGES,
17		label: 'Images'
18	},
19	{
20		action: AttachmentAction.FILE_UPLOAD,
21		class: 'audio-button',
22		disabledTooltip: 'Audio files processing requires an audio model',
23		enabledWhen: AttachmentItemEnabledWhen.HAS_AUDIO_MODALITY,
24		icon: FILE_TYPE_ICONS.audio,
25		id: AttachmentMenuItemId.AUDIO,
26		label: 'Audio Files'
27	},
28	{
29		action: AttachmentAction.FILE_UPLOAD,
30		class: 'video-button',
31		disabledTooltip: 'Video files processing requires a video model',
32		enabledWhen: AttachmentItemEnabledWhen.HAS_VIDEO_MODALITY,
33		icon: FILE_TYPE_ICONS.video,
34		id: AttachmentMenuItemId.VIDEO,
35		label: 'Video Files'
36	},
37	{
38		action: AttachmentAction.FILE_UPLOAD,
39		enabledWhen: AttachmentItemEnabledWhen.ALWAYS,
40		icon: FILE_TYPE_ICONS.text,
41		id: AttachmentMenuItemId.TEXT,
42		label: 'Text Files'
43	},
44	{
45		action: AttachmentAction.FILE_UPLOAD,
46		disabledTooltip: 'PDFs will be converted to text. Image-based PDFs may not work properly.',
47		enabledWhen: AttachmentItemEnabledWhen.ALWAYS,
48		hasEnabledTooltip: true,
49		icon: FILE_TYPE_ICONS.pdf,
50		id: AttachmentMenuItemId.PDF,
51		label: 'PDF Files'
52	}
53];
54
55export const ATTACHMENT_TOOLTIP_TEXT = 'Add files, prompts, tools or MCP Servers';