File tree Expand file tree Collapse file tree 2 files changed +7
-23
lines changed
webview-ui/src/components/settings Expand file tree Collapse file tree 2 files changed +7
-23
lines changed Original file line number Diff line number Diff line change @@ -83,24 +83,6 @@ const INITIAL_RETRY_DELAY = 1000 // Initial retry delay in milliseconds
8383const MAX_RETRY_DELAY = 32000 // Maximum retry delay in milliseconds
8484const JITTER_FACTOR = 0.2 // Jitter factor for randomization (20%)
8585
86- // Define default headers
87- export const defaultHeaders = {
88- "HTTP-Referer" : "https://github.com/RooVetGit/Roo-Cline" ,
89- "X-Title" : "Roo Code" ,
90- }
91-
92- interface TextContent {
93- type : "text"
94- text : string
95- }
96-
97- interface ImageURLContent {
98- type : "image_url"
99- url : string
100- }
101-
102- type MistralContent = string | ( TextContent | ImageURLContent ) [ ]
103-
10486interface MistralErrorResponse {
10587 error : {
10688 message : string
Original file line number Diff line number Diff line change @@ -428,10 +428,9 @@ const ApiOptions = ({
428428 < >
429429 < VSCodeTextField
430430 value = { apiConfiguration ?. mistralApiKey || "" }
431- style = { { width : "100%" } }
432431 type = "password"
433432 onInput = { handleInputChange ( "mistralApiKey" ) }
434- placeholder = "Enter API Key..."
433+ placeholder = { t ( "settings:placeholders.apiKey" ) }
435434 className = "w-full" >
436435 < span className = "font-medium" > { t ( "settings:providers.mistralApiKey" ) } </ span >
437436 </ VSCodeTextField >
@@ -443,18 +442,21 @@ const ApiOptions = ({
443442 { t ( "settings:providers.getMistralApiKey" ) }
444443 </ VSCodeButtonLink >
445444 ) }
446- { shouldShowCodestralUrl ( ) && (
445+ { ( apiConfiguration ?. apiModelId ?. startsWith ( "codestral-" ) ||
446+ ( ! apiConfiguration ?. apiModelId && mistralDefaultModelId . startsWith ( "codestral-" ) ) ) && (
447447 < >
448448 < VSCodeTextField
449449 value = { apiConfiguration ?. mistralCodestralUrl || "" }
450450 type = "url"
451451 onInput = { handleInputChange ( "mistralCodestralUrl" ) }
452452 placeholder = "https://codestral.mistral.ai"
453453 className = "w-full" >
454- < span className = "font-medium" > { t ( "settings:providers.codestralBaseUrl" ) } </ span >
454+ < label className = "block font-medium mb-1" >
455+ { t ( "settings:providers.codestralBaseUrl" ) }
456+ </ label >
455457 </ VSCodeTextField >
456458 < div className = "text-sm text-vscode-descriptionForeground -mt-2" >
457- < > { t ( "settings:providers.codestralBaseUrlDesc" ) } </ >
459+ { t ( "settings:providers.codestralBaseUrlDesc" ) }
458460 </ div >
459461 </ >
460462 ) }
You can’t perform that action at this time.
0 commit comments