diff --git a/src/vs/platform/void/browser/llmMessageService.ts b/src/vs/platform/void/browser/llmMessageService.ts index 838cf7c0..52115567 100644 --- a/src/vs/platform/void/browser/llmMessageService.ts +++ b/src/vs/platform/void/browser/llmMessageService.ts @@ -12,7 +12,7 @@ import { createDecorator } from '../../instantiation/common/instantiation.js'; import { Event } from '../../../base/common/event.js'; import { Disposable } from '../../../base/common/lifecycle.js'; import { IVoidConfigStateService } from '../common/voidConfigService.js'; -import { INotificationService } from '../../notification/common/notification.js'; +// import { INotificationService } from '../../notification/common/notification.js'; // BROWSER IMPLEMENTATION OF SENDLLMMESSAGE @@ -38,7 +38,7 @@ export class SendLLMMessageService extends Disposable implements ISendLLMMessage constructor( @IMainProcessService private readonly mainProcessService: IMainProcessService, // used as a renderer (only usable on client side) @IVoidConfigStateService private readonly voidConfigStateService: IVoidConfigStateService, - @INotificationService private readonly notificationService: INotificationService, + // @INotificationService private readonly notificationService: INotificationService, ) { super() @@ -80,7 +80,6 @@ export class SendLLMMessageService extends Disposable implements ISendLLMMessage // end early if no provider const modelSelection = this.voidConfigStateService.state.modelSelectionOfFeature[featureName] if (modelSelection === null) { - this.notificationService.warn('Please add a Provider in Settings!') onError({ message: 'Please add a Provider in Settings!', fullError: null }) return null } diff --git a/src/vs/platform/void/common/voidConfigTypes.ts b/src/vs/platform/void/common/voidConfigTypes.ts index 6d7dcc47..ce68f97f 100644 --- a/src/vs/platform/void/common/voidConfigTypes.ts +++ b/src/vs/platform/void/common/voidConfigTypes.ts @@ -34,7 +34,7 @@ export const voidProviderDefaults = { }, openAICompatible: { apiKey: '', - endpoint: 'https://my-website.com/v1', + endpoint: '', }, gemini: { apiKey: '', @@ -262,24 +262,24 @@ export const displayInfoOfSettingName = (providerName: ProviderName, settingName return { title: 'API Key', type: 'string', - placeholder: providerName === 'anthropic' ? 'sk-ant-abc123...' : // sk-ant-api03-abc123 - providerName === 'openAI' ? 'sk-proj-abc123...' : - providerName === 'openRouter' ? 'sk-or-abc123...' : // sk-or-v1-abc123 - providerName === 'gemini' ? 'abc123...' : - providerName === 'groq' ? 'gsk_abc123...' : - providerName === 'openAICompatible' ? 'sk-abc123...' : + placeholder: providerName === 'anthropic' ? 'sk-ant-key...' : // sk-ant-api03-key + providerName === 'openAI' ? 'sk-proj-key...' : + providerName === 'openRouter' ? 'sk-or-key...' : // sk-or-v1-key + providerName === 'gemini' ? 'key...' : + providerName === 'groq' ? 'gsk_key...' : + providerName === 'openAICompatible' ? 'sk-key...' : '(never)', } } else if (settingName === 'endpoint') { return { title: providerName === 'ollama' ? 'Your Ollama endpoint' : - providerName === 'openAICompatible' ? 'Endpoint compatible with OpenAI API' // (do not include /chat/completions) + providerName === 'openAICompatible' ? 'baseURL' // (do not include /chat/completions) : '(never)', type: 'string', - placeholder: providerName === 'ollama' || providerName === 'openAICompatible' ? - voidProviderDefaults[providerName].endpoint - : '(never)', + placeholder: providerName === 'ollama' ? voidProviderDefaults.ollama.endpoint + : providerName === 'openAICompatible' ? 'https://my-website.com/v1' + : '(never)', } } else if (settingName === 'maxTokens') { diff --git a/src/vs/workbench/contrib/void/browser/react/build.js b/src/vs/workbench/contrib/void/browser/react/build.js index 9fb5fac6..41e6e635 100755 --- a/src/vs/workbench/contrib/void/browser/react/build.js +++ b/src/vs/workbench/contrib/void/browser/react/build.js @@ -9,7 +9,7 @@ import { execSync } from 'child_process'; execSync('npx rimraf out/ && npx rimraf src2/') // build and scope tailwind: https://www.npmjs.com/package/scope-tailwind -execSync('npx scope-tailwind ./src -o src2/ -s void-scope -c styles.css -p "prefix-" ') +execSync('npx scope-tailwind ./src -o src2/ -s void-scope -c styles.css -p "void-" ') // tsup to build src2/ into out/ execSync('npx tsup') diff --git a/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/ErrorDisplay.tsx b/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/ErrorDisplay.tsx index cfae95e7..714fbf26 100644 --- a/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/ErrorDisplay.tsx +++ b/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/ErrorDisplay.tsx @@ -38,7 +38,7 @@ export const ErrorDisplay = ({ {/* Header */}
{details}
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 ef84f752..4dbcad84 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
@@ -20,34 +20,44 @@ export const ModelSelectionOfFeature = ({ featureName }: { featureName: FeatureN
const modelOptions: { text: string, value: [string, string] }[] = []
- modelOptions.push({ text: 'Select a Provider', value: ['MyProvider', 'MyModel'] })
-
for (const providerName of providerNames) {
const providerConfig = voidConfigState[providerName]
if (providerConfig.enabled !== 'true') continue
providerConfig.models?.forEach(model => {
- modelOptions.push({ text: `${providerName} - ${model}`, value: [providerName, model] })
+ modelOptions.push({ text: `${model} (${providerName})`, value: [providerName, model] })
})
}
+ 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] },
+ )
+ }
return <>