GooDAnDReaDY/dsh-context-lens ↗★ 2
@goodandready/dsh-context-lens
AST上下文压缩、日志过滤与Token预算管理 适合需要压缩代码上下文、过滤测试日志以节省Token预算的开发者。
安裝
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:GooDAnDReaDY/dsh-context-lens說明文件
閱讀完整 README ↗⚙️ Configuration Reference (settings.yaml)
Settings can be modified via settings.yaml or directly in the DSH Web UI under Settings → Plugins → Context Lens.
dsh-context-lens:
compressionMode: balanced # Log compression mode: 'raw', 'balanced', or 'aggressive'
astSkeletonMaxDepth: 3 # Maximum depth level for AST signature traversal (1..10)
tokenSavingsTracking: true # Track and display live token savings
autoCompressThreshold: 4000 # Auto-compression character threshold (0 to disable)
budgetLimit: 100000 # Session token budget limit
budgetAlertPercent: 90 # Budget percentage threshold triggering warning badge (50..99)
autoCollapse: true # Display warning in UI when budget is nearly exhausted
| Parameter | Type | Default | Description |
|---|---|---|---|
compressionMode | string | balanced | Default log compression aggressiveness (raw, balanced, aggressive) |
astSkeletonMaxDepth | number | 3 | Maximum nesting depth for AST signature parsing (1 to 10) |
tokenSavingsTracking | boolean | true | Track token savings before/after compression |
autoCompressThreshold | number | 4000 | Auto-compress terminal logs exceeding this character length (0 to disable) |
budgetLimit | number | 100000 | Total token budget limit allocated per session |
budgetAlertPercent | number | 90 | Budget alert threshold percentage triggering warnings (50 to 99) |
autoCollapse | boolean | true | Display low-budget warning badge in settings card and header chip |