File tree Expand file tree Collapse file tree 3 files changed +10
-0
lines changed
webview-ui/src/components/settings Expand file tree Collapse file tree 3 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -2289,6 +2289,7 @@ export class Cline extends EventEmitter<ClineEvents> {
22892289 const {
22902290 mode,
22912291 customModes,
2292+ apiModelId,
22922293 customModePrompts,
22932294 experiments = { } as Record < ExperimentId , boolean > ,
22942295 customInstructions : globalCustomInstructions ,
@@ -2303,6 +2304,7 @@ export class Cline extends EventEmitter<ClineEvents> {
23032304 details += `\n\n# Current Mode\n`
23042305 details += `<slug>${ currentMode } </slug>\n`
23052306 details += `<name>${ modeDetails . name } </name>\n`
2307+ details += `<model>${ apiModelId } </model>\n`
23062308 if ( Experiments . isEnabled ( experiments ?? { } , EXPERIMENT_IDS . POWER_STEERING ) ) {
23072309 details += `<role>${ modeDetails . roleDefinition } </role>\n`
23082310 if ( modeDetails . customInstructions ) {
Original file line number Diff line number Diff line change @@ -2691,6 +2691,7 @@ export class ClineProvider extends EventEmitter<ClineProviderEvents> implements
26912691 osInfo : os . platform ( ) === "win32" ? "win32" : "unix" ,
26922692 lastShownAnnouncementId : stateValues . lastShownAnnouncementId ,
26932693 customInstructions : stateValues . customInstructions ,
2694+ apiModelId : stateValues . apiModelId ,
26942695 alwaysAllowReadOnly : stateValues . alwaysAllowReadOnly ?? false ,
26952696 alwaysAllowReadOnlyOutsideWorkspace : stateValues . alwaysAllowReadOnlyOutsideWorkspace ?? false ,
26962697 alwaysAllowWrite : stateValues . alwaysAllowWrite ?? false ,
Original file line number Diff line number Diff line change @@ -126,6 +126,13 @@ const ApiOptions = ({
126126 [ apiConfiguration ] ,
127127 )
128128
129+ // Update apiConfiguration.aiModelId whenever selectedModelId changes.
130+ useEffect ( ( ) => {
131+ if ( selectedModelId ) {
132+ setApiConfigurationField ( "apiModelId" , selectedModelId )
133+ }
134+ } , [ selectedModelId , setApiConfigurationField ] )
135+
129136 // Debounced refresh model updates, only executed 250ms after the user
130137 // stops typing.
131138 useDebounce (
You can’t perform that action at this time.
0 commit comments