File size: 2,308 Bytes
41a5ab2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
/**

 *

 * MODELS

 *

 * Components for model selection and display. Supports two server modes:

 * - **Single model mode**: Server runs with one model, selector shows model info

 * - **Router mode**: Server runs with multiple models, selector enables switching

 *

 * Integrates with modelsStore for model data and serverStore for mode detection.

 *

 */

/**

 * **ModelsSelector** - Model selection dropdown

 *

 * Dropdown for selecting AI models with status indicators,

 * search, and model information display. Adapts UI based on server mode.

 *

 * **Architecture:**

 * - Uses DropdownMenuSearchable for model list

 * - Integrates with modelsStore for model options and selection

 * - Detects router vs single mode from serverStore

 * - Opens DialogModelInformation for model details

 *

 * **Features:**

 * - Searchable model list with keyboard navigation

 * - Model status indicators (loading/ready/error/updating)

 * - Model capabilities badges (vision, tools, etc.)

 * - Current/active model highlighting

 * - Model information dialog on info button click

 * - Router mode: shows all available models with status

 * - Single mode: shows current model name only

 * - Loading/updating skeleton states

 * - Global selection support for form integration

 *

 * @example

 * ```svelte

 * <ModelsSelector

 *   currentModel={conversation.modelId}

 *   onModelChange={(id, name) => updateModel(id)}

 *   useGlobalSelection

 * />

 * ```

 */
export { default as ModelsSelector } from './ModelsSelector.svelte';

/**

 * **ModelBadge** - Model name display badge

 *

 * Compact badge showing current model name with package icon.

 * Only visible in single model mode. Supports tooltip and copy functionality.

 *

 * **Architecture:**

 * - Reads model name from modelsStore or prop

 * - Checks server mode from serverStore

 * - Uses BadgeInfo for consistent styling

 *

 * **Features:**

 * - Optional copy to clipboard button

 * - Optional tooltip with model details

 * - Click handler for model info dialog

 * - Only renders in model mode (not router)

 *

 * @example

 * ```svelte

 * <ModelBadge

 *   onclick={() => showModelInfo = true}

 *   showTooltip

 *   showCopyIcon

 * />

 * ```

 */
export { default as ModelBadge } from './ModelBadge.svelte';