Skip to content

Conversation

@luojiyin1987
Copy link
Contributor

Summary

  • Add autoCompactThreshold to GlobalConfig type and GLOBAL_CONFIG_KEYS
  • Replace hardcoded threshold (0.92) with configurable value via getAutoCompactThresholdRatio()
  • Users can now customize the auto-compact trigger ratio in ~/.kode.json

Fixes #143

Configuration Example

{
  "autoCompactThreshold": 0.80
}
Value Effect Use Case
0.80 Earlier, more conservative Small context models (e.g. deepseek 131k)
0.85 Balanced Medium context models
0.92 Default Large context models (e.g. Claude 200k)

🤖 Generated with Claude Code

   Add autoCompactThreshold to GlobalConfig type and GLOBAL_CONFIG_KEYS.
   Users can now customize the auto-compact trigger ratio (0-1) via ~/.kode.json

Signed-off-by: luojiyin <luojiyin@hotmail.com>
  Replace hardcoded threshold with configurable value via getAutoCompactThresholdRatio().
  Users can now set autoCompactThreshold in ~/.kode.json to customize trigger behavior.
Signed-off-by: luojiyin <luojiyin@hotmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] 自动 compact 的能力偶尔会报错

1 participant