File tree Expand file tree Collapse file tree
apps/editor/src/views/panel/backend/message-handlers
components/editor/panel/PromptField Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -46,13 +46,7 @@ const stop_recording = async (panel_provider: PanelProvider) => {
4646 const configs =
4747 await model_providers_manager . get_voice_input_tool_configs ( )
4848
49- if ( configs . length == 0 ) {
50- vscode . window . showWarningMessage (
51- 'No Voice Input configuration found. Please configure it in settings.' ,
52- { modal : true }
53- )
54- return
55- }
49+ if ( configs . length == 0 ) return
5650
5751 let config : ToolConfig | undefined =
5852 await model_providers_manager . get_default_voice_input_config ( )
@@ -177,6 +171,26 @@ export const handle_voice_input = async (
177171 return
178172 }
179173
174+ if ( message . is_recording ) {
175+ const model_providers_manager = new ModelProvidersManager (
176+ panel_provider . context
177+ )
178+ const configs = await model_providers_manager . get_voice_input_tool_configs ( )
179+
180+ if ( configs . length == 0 ) {
181+ vscode . window . showWarningMessage ( 'No configuration found' , {
182+ modal : true ,
183+ detail :
184+ 'Add a "Voice Input" configuration in settings to use this feature.'
185+ } )
186+ panel_provider . send_message ( {
187+ command : 'RECORDING_STATE' ,
188+ is_recording : false
189+ } )
190+ return
191+ }
192+ }
193+
180194 panel_provider . is_recording = message . is_recording
181195 panel_provider . send_message ( {
182196 command : 'RECORDING_STATE' ,
Original file line number Diff line number Diff line change 461461 height : 20px ;
462462 border-radius : 5px ;
463463
464- > svg {
465- width : 10px ;
466- fill : var (--vscode-icon-foreground );
467- }
468-
469464 & .codicon ::before {
470465 font-size : 16px ;
471466 }
487482 padding : 0 2px ;
488483 }
489484
485+ & --recording {
486+ background-color : var (--cwc-bg-red );
487+
488+ & :hover {
489+ background-color : var (--cwc-bg-red-dark ) !important ;
490+ }
491+
492+ & ::before {
493+ color : var (--cwc-text-color-red );
494+ }
495+ }
496+
490497 & --chevron {
491498 > span .codicon ::before {
492499 font-size : 11px ;
Original file line number Diff line number Diff line change 4949 transparent
5050 );
5151 --cwc-bg-red : color-mix (in srgb , var (--cwc-text-color-red ) 12% , transparent );
52+ --cwc-bg-red-dark : color-mix (
53+ in srgb ,
54+ var (--cwc-text-color-red ) 24% ,
55+ transparent
56+ );
5257 --cwc-bg-orange : color-mix (
5358 in srgb ,
5459 var (--cwc-text-color-orange ) 12% ,
You can’t perform that action at this time.
0 commit comments