Skip to content

Commit 2173554

Browse files
webui: extract ModelOption type into dedicated models.d.ts
Co-authored-by: Aleksander Grygier <[email protected]>
1 parent ab922d9 commit 2173554

File tree

3 files changed

+13
-12
lines changed

3 files changed

+13
-12
lines changed

tools/server/webui/src/lib/components/app/chat/ChatForm/ChatFormModelSelector.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
selectModel,
1313
selectedModelId
1414
} from '$lib/stores/models.svelte';
15-
import type { ModelOption } from '$lib/stores/models.svelte';
15+
import type { ModelOption } from '$lib/types/models';
1616
1717
interface Props {
1818
class?: string;

tools/server/webui/src/lib/stores/models.svelte.ts

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,7 @@
11
import { ModelsService } from '$lib/services/models';
22
import { persisted } from '$lib/stores/persisted.svelte';
3-
import type { ApiModelDataEntry, ApiModelDetails } from '$lib/types/api';
43
import { SELECTED_MODEL_LOCALSTORAGE_KEY } from '$lib/constants/localstorage-keys';
5-
6-
export interface ModelOption {
7-
id: string;
8-
name: string;
9-
model: string;
10-
description?: string;
11-
capabilities: string[];
12-
details?: ApiModelDetails['details'];
13-
meta?: ApiModelDataEntry['meta'];
14-
}
4+
import type { ModelOption } from '$lib/types/models';
155

166
type PersistedModelSelection = {
177
id: string;
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import type { ApiModelDataEntry, ApiModelDetails } from '$lib/types/api';
2+
3+
export interface ModelOption {
4+
id: string;
5+
name: string;
6+
model: string;
7+
description?: string;
8+
capabilities: string[];
9+
details?: ApiModelDetails['details'];
10+
meta?: ApiModelDataEntry['meta'];
11+
}

0 commit comments

Comments
 (0)