diff --git a/src/vs/platform/void/common/voidConfigService.ts b/src/vs/platform/void/common/voidConfigService.ts index 8fc3aecd..26d135b8 100644 --- a/src/vs/platform/void/common/voidConfigService.ts +++ b/src/vs/platform/void/common/voidConfigService.ts @@ -106,7 +106,7 @@ class VoidConfigStateService extends Disposable implements IVoidConfigStateServi } } } - console.log('NEW STATE I', newState) + // console.log('NEW STATE I', JSON.stringify(newState, null, 2)) await this._storeVoidConfigState(newState) this._setState(newState) @@ -120,7 +120,7 @@ class VoidConfigStateService extends Disposable implements IVoidConfigStateServi [featureName]: newVal } } - console.log('NEW STATE II', newState) + // console.log('NEW STATE II', JSON.stringify(newState, null, 2)) await this._storeVoidConfigState(newState) this._setState(newState) diff --git a/src/vs/platform/void/common/voidConfigTypes.ts b/src/vs/platform/void/common/voidConfigTypes.ts index ce68f97f..36b77bc4 100644 --- a/src/vs/platform/void/common/voidConfigTypes.ts +++ b/src/vs/platform/void/common/voidConfigTypes.ts @@ -45,6 +45,16 @@ export const voidProviderDefaults = { } as const +export const dummyModelData = { + anthropic: ['claude 3.5'], + openAI: ['gpt 4o'], + ollama: ['llama 3.2'], + openRouter: ['qwen 2.5'], +} + + + + export const voidInitModelOptions = { anthropic: () => ({ // model: 'claude-3-5-sonnet-20240620', diff --git a/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/ModelSelectionSettings.tsx b/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/ModelSelectionSettings.tsx index 4dbcad84..d469af3b 100644 --- a/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/ModelSelectionSettings.tsx +++ b/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/ModelSelectionSettings.tsx @@ -4,15 +4,12 @@ *--------------------------------------------------------------------------------------------*/ import { useCallback, useEffect, useRef } from 'react' -import { FeatureName, featureNames, ProviderName, providerNames } from '../../../../../../../platform/void/common/voidConfigTypes.js' +import { dummyModelData, FeatureName, featureNames, ProviderName, providerNames } from '../../../../../../../platform/void/common/voidConfigTypes.js' import { useConfigState, useService } from '../util/services.js' -import ErrorBoundary from './ErrorBoundary.js' import { VoidSelectBox } from './inputs.js' import { SelectBox } from '../../../../../../../base/browser/ui/selectBox/selectBox.js' - - export const ModelSelectionOfFeature = ({ featureName }: { featureName: FeatureName }) => { const voidConfigService = useService('configStateService') @@ -31,12 +28,11 @@ export const ModelSelectionOfFeature = ({ featureName }: { featureName: FeatureN const isDummy = modelOptions.length === 0 if (isDummy) { - modelOptions.push( - { text: 'claude 3.5 (anthropic)', value: ['dummy', 'dummy'] as [string, string] }, - { text: 'gpt 4o (openai)', value: ['dummy', 'dummy'] as [string, string] }, - { text: 'llama 3.2 (ollama)', value: ['dummy', 'dummy'] as [string, string] }, - { text: 'qwen 2.5 (openrouter)', value: ['dummy', 'dummy'] as [string, string] }, - ) + for (const [providerName, models] of Object.entries(dummyModelData)) { + for (let model of models) { + modelOptions.push({ text: `${model} (${providerName})`, value: ['dummy', 'dummy'] }) + } + } } return <>