File size: 1,313 Bytes
82be208
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/**
 * Attachment type enum for database message extras
 */
export enum AttachmentType {
	AUDIO = 'AUDIO',
	IMAGE = 'IMAGE',
	LEGACY_CONTEXT = 'context', // Legacy attachment type for backward compatibility
	MCP_PROMPT = 'MCP_PROMPT',
	MCP_RESOURCE = 'MCP_RESOURCE',
	PDF = 'PDF',
	TEXT = 'TEXT',
	VIDEO = 'VIDEO'
}

/**
 * Unique identifiers for attachment menu items in the chat form action dropdowns.
 * Used to select which file upload or attachment action is triggered.
 */
export enum AttachmentMenuItemId {
	AUDIO = 'audio',
	IMAGES = 'images',
	PDF = 'pdf',
	SYSTEM_MESSAGE = 'system-message',
	TEXT = 'text',
	VIDEO = 'video'
}

/**
 * Defines when an attachment menu item should be enabled.
 */
export enum AttachmentItemEnabledWhen {
	ALWAYS = 'always',
	HAS_AUDIO_MODALITY = 'hasAudioModality',
	HAS_VIDEO_MODALITY = 'hasVideoModality',
	HAS_VISION_MODALITY = 'hasVisionModality'
}

/**
 * Defines the callback action triggered when an attachment menu item is clicked.
 */
export enum AttachmentAction {
	FILE_UPLOAD = 'onFileUpload',
	SYSTEM_PROMPT_CLICK = 'onSystemPromptClick'
}

/**
 * Human-readable labels used when embedding attachments in outgoing messages.
 */
export enum AttachmentLabel {
	FILE = 'File',
	MCP_PROMPT = 'MCP Prompt',
	MCP_RESOURCE = 'MCP Resource',
	PDF_FILE = 'PDF File'
}