GooDAnDReaDY/dsh-context-lens ↗★ 2

@goodandready/dsh-context-lens

AST上下文压缩、日志过滤与Token预算管理 适合需要压缩代码上下文、过滤测试日志以节省Token预算的开发者。

套件
@goodandready/dsh-context-lens
相容性
待驗證
Harness 依賴範圍
^0.1.0-rc.6
Cordis 依賴範圍
^4.0.1
版本
0.1.23
授權
MIT
最近更新
2026年9月22日

安裝

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:GooDAnDReaDY/dsh-context-lens

⚙️ 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
ParameterTypeDefaultDescription
compressionModestringbalancedDefault log compression aggressiveness (raw, balanced, aggressive)
astSkeletonMaxDepthnumber3Maximum nesting depth for AST signature parsing (1 to 10)
tokenSavingsTrackingbooleantrueTrack token savings before/after compression
autoCompressThresholdnumber4000Auto-compress terminal logs exceeding this character length (0 to disable)
budgetLimitnumber100000Total token budget limit allocated per session
budgetAlertPercentnumber90Budget alert threshold percentage triggering warnings (50 to 99)
autoCollapsebooleantrueDisplay low-budget warning badge in settings card and header chip