Skip to content

Commit 8aaec7c

Browse files
committed
Added modelId to the task export process.
Signed-off-by: feifei <[email protected]>
1 parent 3322e08 commit 8aaec7c

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

src/core/Cline.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff 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) {

src/core/webview/ClineProvider.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff 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,

webview-ui/src/components/settings/ApiOptions.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff 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(

0 commit comments

Comments
 (0)