mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-09 22:31:08 +00:00
feat: changing profile-specific threshold in context management setting will also change in Gemini context management
- sync between Context Management Settting <-> Gemini Context Management with regards to thresholding
This commit is contained in:
parent
26b1f53d9b
commit
8f468f49b0
1 changed files with 10 additions and 1 deletions
|
|
@ -177,6 +177,15 @@ const SettingsView = forwardRef<SettingsViewRef, SettingsViewProps>(({ onDone, t
|
|||
|
||||
const apiConfiguration = useMemo(() => cachedState.apiConfiguration ?? {}, [cachedState.apiConfiguration])
|
||||
|
||||
const getCurrentProfileId = useCallback(() => {
|
||||
if (!currentApiConfigName || !listApiConfigMeta) {
|
||||
return currentApiConfigName
|
||||
}
|
||||
|
||||
const profile = listApiConfigMeta.find((p) => p.name === currentApiConfigName)
|
||||
return profile ? profile.id : currentApiConfigName
|
||||
}, [currentApiConfigName, listApiConfigMeta])
|
||||
|
||||
useEffect(() => {
|
||||
// Update only when currentApiConfigName is changed.
|
||||
// Expected to be triggered by loadApiConfiguration/upsertApiConfiguration.
|
||||
|
|
@ -586,7 +595,7 @@ const SettingsView = forwardRef<SettingsViewRef, SettingsViewProps>(({ onDone, t
|
|||
setApiConfigurationField={setApiConfigurationField}
|
||||
errorMessage={errorMessage}
|
||||
setErrorMessage={setErrorMessage}
|
||||
currentProfileId={currentApiConfigName}
|
||||
currentProfileId={getCurrentProfileId()}
|
||||
profileThresholds={profileThresholds || {}}
|
||||
autoCondenseContextPercent={autoCondenseContextPercent || 75}
|
||||
setProfileThreshold={setProfileThreshold}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue