|
| 1 | +import type { ModelDefinition } from './types'; |
| 2 | + |
| 3 | +/** |
| 4 | + * Compile-time constants shared across the extension. |
| 5 | + * |
| 6 | + * These do NOT depend on the VS Code runtime (no workspace configuration, |
| 7 | + * no secrets API). For run-time settings reads see `config.ts`. |
| 8 | + */ |
| 9 | + |
| 10 | +/** VS Code configuration section prefix for all extension settings. */ |
| 11 | +export const CONFIG_SECTION = 'deepseek-copilot'; |
| 12 | + |
| 13 | +// ---- Secret keys ---- |
| 14 | + |
| 15 | +/** SecretStorage key for the DeepSeek API key. */ |
| 16 | +export const API_KEY_SECRET = 'deepseek-copilot.apiKey'; |
| 17 | + |
| 18 | +/** memento key tracking whether the welcome walkthrough has been shown. */ |
| 19 | +export const WELCOME_SHOWN_KEY = 'deepseek-copilot.welcomeShown'; |
| 20 | + |
| 21 | +// ---- Walkthrough ---- |
| 22 | + |
| 23 | +/** Walkthrough contribution ID. */ |
| 24 | +export const WALKTHROUGH_ID = 'Vizards.deepseek-v4-for-copilot#deepseekGettingStarted'; |
| 25 | + |
| 26 | +// ---- Model picker ---- |
| 27 | + |
| 28 | +/** Detail text shown in the model picker when no API key is configured. */ |
| 29 | +export const API_KEY_REQUIRED_DETAIL = 'Please run DeepSeek: Set API Key to configure.'; |
| 30 | + |
| 31 | +/** Per-model configuration schema consumed by Copilot Chat's model picker. */ |
| 32 | +export const THINKING_EFFORT_CONFIGURATION_SCHEMA = { |
| 33 | + properties: { |
| 34 | + reasoningEffort: { |
| 35 | + type: 'string', |
| 36 | + title: 'Thinking Effort', |
| 37 | + enum: ['none', 'high', 'max'], |
| 38 | + enumItemLabels: ['None', 'High', 'Max'], |
| 39 | + enumDescriptions: [ |
| 40 | + 'Disable thinking for faster responses', |
| 41 | + 'Recommended for most tasks', |
| 42 | + 'Maximum reasoning depth for complex agent tasks', |
| 43 | + ], |
| 44 | + default: 'high', |
| 45 | + group: 'navigation', |
| 46 | + }, |
| 47 | + }, |
| 48 | +} as const; |
| 49 | + |
| 50 | +// ---- Vision proxy ---- |
| 51 | + |
| 52 | +/** Default model ID used for the vision proxy when auto-detection is enabled. */ |
| 53 | +export const DEFAULT_VISION_MODEL_ID = 'oswe-vscode-prime'; |
| 54 | + |
| 55 | +/** |
| 56 | + * Prompt sent to the vision proxy model when describing image attachments |
| 57 | + * before forwarding them to text-only DeepSeek models. |
| 58 | + */ |
| 59 | +export const IMAGE_DESCRIPTION_PROMPT = |
| 60 | + 'Describe the visual contents of this image in detail, including any text, objects, people, or context that would be relevant for understanding it. Focus on factual visual elements.'; |
| 61 | + |
| 62 | +// ---- Cache ---- |
| 63 | + |
| 64 | +/** Max entries in the reasoning-content cache before eviction kicks in. */ |
| 65 | +export const MAX_CACHE_SIZE = 200; |
| 66 | + |
| 67 | +// ---- Model registry ---- |
| 68 | + |
| 69 | +/** Available DeepSeek models exposed through the language model provider. */ |
| 70 | +export const MODELS: ModelDefinition[] = [ |
| 71 | + { |
| 72 | + id: 'deepseek-v4-flash', |
| 73 | + name: 'DeepSeek V4 Flash', |
| 74 | + family: 'deepseek', |
| 75 | + version: 'v4', |
| 76 | + detail: 'Fast, general-purpose model', |
| 77 | + maxInputTokens: 1048576, |
| 78 | + maxOutputTokens: 393216, |
| 79 | + capabilities: { |
| 80 | + toolCalling: true, |
| 81 | + imageInput: true, |
| 82 | + thinking: true, |
| 83 | + }, |
| 84 | + requiresThinkingParam: true, |
| 85 | + }, |
| 86 | + { |
| 87 | + id: 'deepseek-v4-pro', |
| 88 | + name: 'DeepSeek V4 Pro', |
| 89 | + family: 'deepseek', |
| 90 | + version: 'v4', |
| 91 | + detail: 'Most capable reasoning model', |
| 92 | + maxInputTokens: 1048576, |
| 93 | + maxOutputTokens: 393216, |
| 94 | + capabilities: { |
| 95 | + toolCalling: true, |
| 96 | + imageInput: true, |
| 97 | + thinking: true, |
| 98 | + }, |
| 99 | + requiresThinkingParam: true, |
| 100 | + }, |
| 101 | +]; |
0 commit comments