-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIConfigRepository.ts
More file actions
143 lines (118 loc) · 2.9 KB
/
Copy pathIConfigRepository.ts
File metadata and controls
143 lines (118 loc) · 2.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
import { TransformationProvider } from '../../domain/value-objects/TransformationProvider';
export interface Config {
/**
* OpenAI API key (stored separately in SecretStorage).
* Used for Whisper transcription and OpenAI prompt transformation.
*/
apiKey?: string;
/**
* Active provider for prompt transformation.
*/
transformationProvider: TransformationProvider;
/**
* Language for transcription (ISO 639-1 code or 'auto').
*/
transcriptionLanguage: string;
/**
* Enable prompt transformation via GPT-4.
*/
enablePromptTransformation: boolean;
/**
* OpenAI model ID used for prompt transformation (default: gpt-4o).
*/
transformationModel: string;
/**
* Anthropic model ID for Claude-based transformation.
*/
anthropicModel: string;
/**
* Google Gemini model ID for transformation.
*/
googleModel: string;
/**
* Azure OpenAI endpoint URL.
*/
azureEndpoint: string;
/**
* Azure OpenAI deployment name for the chat model.
*/
azureDeployment: string;
/**
* Ollama server base URL.
*/
ollamaBaseUrl: string;
/**
* Ollama model name/tag.
*/
ollamaModel: string;
/**
* OpenCode LLM proxy base URL.
*/
openCodeBaseUrl: string;
/**
* OpenCode model identifier (provider/model format).
*/
openCodeModel: string;
/**
* OpenRouter model identifier.
*/
openRouterModel: string;
/**
* Cursor model identifier for SDK-based transformation.
*/
cursorModel: string;
/**
* Audio recording quality ('low' | 'medium' | 'high').
*/
audioQuality: 'low' | 'medium' | 'high';
/**
* Maximum recording duration in seconds.
*/
maxRecordingDuration: number;
/**
* Show status notifications.
*/
showNotifications: boolean;
/**
* Transcription hint for technical terms (future).
*/
transcriptionHint?: string;
/**
* System prompt used to instruct the AI during prompt transformation.
*/
transformationSystemPrompt: string;
}
/**
* Port for configuration repository.
*
* Implementations:
* - VSCodeConfigRepository: Uses VSCode workspace configuration
*/
export interface IConfigRepository {
/**
* Get current configuration.
*
* @returns Current config with defaults applied
*/
getConfig(): Promise<Config>;
/**
* Update configuration.
*
* @param config Partial config to update
*/
updateConfig(config: Partial<Config>): Promise<void>;
/**
* Get API key for a specific transformation provider.
*/
getProviderApiKey(provider: TransformationProvider): Promise<string | undefined>;
/**
* Store API key for a specific transformation provider.
*/
setProviderApiKey(provider: TransformationProvider, apiKey: string | undefined): Promise<void>;
/**
* Watch for configuration changes.
*
* @param callback Function called when config changes
*/
onConfigChange(callback: (config: Config) => void): void;
}