mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
feat: Add modelId support when exporting tasks (#2142)
Added modelId to the task export process. Signed-off-by: feifei <liuyansheng1121@gmail.com>
This commit is contained in:
parent
3ffe61f548
commit
4fe0b3c419
3 changed files with 10 additions and 0 deletions
|
|
@ -2309,6 +2309,7 @@ export class Cline extends EventEmitter<ClineEvents> {
|
|||
const {
|
||||
mode,
|
||||
customModes,
|
||||
apiModelId,
|
||||
customModePrompts,
|
||||
experiments = {} as Record<ExperimentId, boolean>,
|
||||
customInstructions: globalCustomInstructions,
|
||||
|
|
@ -2323,6 +2324,7 @@ export class Cline extends EventEmitter<ClineEvents> {
|
|||
details += `\n\n# Current Mode\n`
|
||||
details += `<slug>${currentMode}</slug>\n`
|
||||
details += `<name>${modeDetails.name}</name>\n`
|
||||
details += `<model>${apiModelId}</model>\n`
|
||||
if (Experiments.isEnabled(experiments ?? {}, EXPERIMENT_IDS.POWER_STEERING)) {
|
||||
details += `<role>${modeDetails.roleDefinition}</role>\n`
|
||||
if (modeDetails.customInstructions) {
|
||||
|
|
|
|||
|
|
@ -1355,6 +1355,7 @@ export class ClineProvider extends EventEmitter<ClineProviderEvents> implements
|
|||
apiConfiguration: providerSettings,
|
||||
lastShownAnnouncementId: stateValues.lastShownAnnouncementId,
|
||||
customInstructions: stateValues.customInstructions,
|
||||
apiModelId: stateValues.apiModelId,
|
||||
alwaysAllowReadOnly: stateValues.alwaysAllowReadOnly ?? false,
|
||||
alwaysAllowReadOnlyOutsideWorkspace: stateValues.alwaysAllowReadOnlyOutsideWorkspace ?? false,
|
||||
alwaysAllowWrite: stateValues.alwaysAllowWrite ?? false,
|
||||
|
|
|
|||
|
|
@ -129,6 +129,13 @@ const ApiOptions = ({
|
|||
[apiConfiguration],
|
||||
)
|
||||
|
||||
// Update apiConfiguration.aiModelId whenever selectedModelId changes.
|
||||
useEffect(() => {
|
||||
if (selectedModelId) {
|
||||
setApiConfigurationField("apiModelId", selectedModelId)
|
||||
}
|
||||
}, [selectedModelId, setApiConfigurationField])
|
||||
|
||||
// Debounced refresh model updates, only executed 250ms after the user
|
||||
// stops typing.
|
||||
useDebounce(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue