Skip to content

Commit 15616c1

Browse files
committed
chore: added all option
Signed-off-by: Evzen Gasta <[email protected]>
1 parent 989601d commit 15616c1

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

packages/backend/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
"ai-lab.inferenceRuntime": {
5555
"type": "string",
5656
"enum": [
57+
"all",
5758
"llama-cpp",
5859
"whisper-cpp",
5960
"none"

packages/backend/src/registries/ConfigurationRegistry.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export class ConfigurationRegistry extends Publisher<ExtensionConfiguration> imp
5555
modelsPath: this.getModelsPath(),
5656
experimentalGPU: this.#configuration.get<boolean>('experimentalGPU') ?? false,
5757
apiPort: this.#configuration.get<number>('apiPort') ?? API_PORT_DEFAULT,
58-
inferenceRuntime: this.#configuration.get<string>('inferenceRuntime') ?? 'none',
58+
inferenceRuntime: this.#configuration.get<string>('inferenceRuntime') ?? 'all',
5959
experimentalTuning: this.#configuration.get<boolean>('experimentalTuning') ?? false,
6060
modelUploadDisabled: this.#configuration.get<boolean>('modelUploadDisabled') ?? false,
6161
showGPUPromotion: this.#configuration.get<boolean>('showGPUPromotion') ?? true,

packages/frontend/src/lib/select/ModelSelect.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ onMount(() => {
5959
6060
function filterModel(model: ModelInfo): boolean {
6161
// If the defaultRuntime is undefined we should not filter any model
62-
if (!defaultRuntime) return true;
62+
if (!defaultRuntime || defaultRuntime === 'all') return true;
6363
6464
return model.backend === defaultRuntime;
6565
}

packages/frontend/src/pages/Recipes.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ let defaultRuntime: string | undefined = $state();
108108
onMount(() => {
109109
const inferenceRuntime = $configuration?.inferenceRuntime;
110110
if (inferenceRuntime) defaultRuntime = inferenceRuntime;
111-
onFilterChange('tools', defaultRuntime ?? 'all');
111+
if (inferenceRuntime !== 'all') onFilterChange('tools', defaultRuntime ?? '');
112112
});
113113
</script>
114114

@@ -144,7 +144,7 @@ onMount(() => {
144144
<label for={filterComponent.key} class="block mb-2 text-sm font-medium">{filterComponent.label}</label>
145145
<Dropdown
146146
id={filterComponent.key}
147-
value={filterComponent.key === 'tools' ? defaultRuntime : undefined}
147+
value={filterComponent.key === 'tools' ? defaultRuntime : ''}
148148
options={choicesToOptions(choices[filterComponent.key])}
149149
onChange={(v): void => onFilterChange(filterComponent.key, v)}></Dropdown>
150150
</div>

0 commit comments

Comments
 (0)