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 <[email protected]>
  Replace hardcoded threshold with configurable value via getAutoCompactThresholdRatio().
  Users can now set autoCompactThreshold in ~/.kode.json to customize trigger behavior.
@CrazyBoyM CrazyBoyM force-pushed the main branch 3 times, most recently from 7710476 to b1ddd2f Compare December 29, 2025 21:29
@CrazyBoyM
Copy link
Contributor

CrazyBoyM commented Dec 29, 2025

要不考虑添加到设置菜单?

@luojiyin1987
Copy link
Contributor Author

luojiyin1987 commented Dec 30, 2025

要不考虑添加到设置菜单?
设置菜单的入口在哪里? 代码冲突太多了, 我将新开pr。 @CrazyBoyM

@CrazyBoyM
Copy link
Contributor

就是“ / ”触发的slash

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 的能力偶尔会报错

2 participants