mirror of
https://github.com/cline/cline.git
synced 2026-10-31 02:42:02 +08:00
Enable Auto Compact by default in VS Code (#12739)
* feat(vscode): enable Auto Compact by default The SDK-based extension has no fallback context management: with auto compact off, hitting the model's context window fails the request with a provider error and retrying keeps failing (the legacy extension truncated the oldest half of the conversation in this situation). The CLI already defaults compaction on (agentic); align the extension with it. * chore: add changeset for Auto Compact default-on
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"claude-dev": patch
|
||||
---
|
||||
|
||||
Enable Auto Compact by default so long chats automatically compress conversation history instead of failing at the model context limit. It can be disabled in Settings → Features → "Auto Compact".
|
||||
@@ -904,7 +904,9 @@ export async function buildSessionConfig(input: SessionConfigInput): Promise<Cor
|
||||
}
|
||||
|
||||
const stateManager = StateManager.get()
|
||||
const globalUseAutoCondense = stateManager.getGlobalSettingsKey("useAutoCondense") ?? false
|
||||
// Auto compact is on by default; keep this fallback aligned with the
|
||||
// `useAutoCondense` default in shared/storage/state-keys.ts.
|
||||
const globalUseAutoCondense = stateManager.getGlobalSettingsKey("useAutoCondense") ?? true
|
||||
const compactionStrategy = readCompactionStrategyGlobally()
|
||||
const enableCheckpoints = stateManager.getGlobalSettingsKey("enableCheckpointsSetting") ?? true
|
||||
const useAutoCondense = input.taskSettings?.useAutoCondense ?? globalUseAutoCondense
|
||||
|
||||
@@ -274,7 +274,7 @@ const USER_SETTINGS_FIELDS = {
|
||||
hooksEnabled: { default: true as boolean },
|
||||
yoloModeToggled: { default: false as boolean },
|
||||
autoApproveAllToggled: { default: false as boolean },
|
||||
useAutoCondense: { default: false as boolean },
|
||||
useAutoCondense: { default: true as boolean },
|
||||
subagentsEnabled: { default: false as boolean },
|
||||
worktreesEnabled: { default: false as boolean },
|
||||
preferredLanguage: { default: "English" as string },
|
||||
|
||||
@@ -298,7 +298,7 @@ export const ExtensionStateContextProvider: React.FC<{
|
||||
onboardingModels: undefined,
|
||||
mcpResponsesCollapsed: false, // Default value (expanded), will be overwritten by extension state
|
||||
yoloModeToggled: false,
|
||||
useAutoCondense: false,
|
||||
useAutoCondense: true,
|
||||
compactionStrategy: "basic",
|
||||
subagentsEnabled: false,
|
||||
worktreesEnabled: { user: true, featureFlag: false },
|
||||
|
||||
Reference in New Issue
Block a user