 abel533andCopilot
|
9f4023bdf0
|
refactor: apply BaseSlashCommand to all 54 command implementations
- implements SlashCommand -> extends BaseSlashCommand (all 54 files)
- Replace CommandUtils.parseArgs/args null checks -> args(args)
- Replace agentLoop null checks -> requireAgentLoop(context)/noSession()
- Replace context.agentLoop().getToolContext() -> toolCtx(context)
- Replace CommandUtils.success/error/header/subtitle/warning/info -> instance methods
- Remove unused CommandUtils/AnsiStyle imports where applicable
- 87 tests passing, zero compilation errors
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
2026-04-05 13:16:55 +08:00 |
|
 liuzhandCopilot
|
fa565d8c07
|
feat: 压缩和权限gap功能增强 - PTL gap解析, 时间感知微压缩, token估算安全系数, PLAN模式, 拒绝追踪
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
2026-04-02 23:17:29 +08:00 |
|
 liuzhandCopilot
|
730551cb3f
|
feat: 多层上下文压缩 + 多级权限管理系统
权限管理:
- PermissionTypes: 权限行为/模式/规则/决策/选择类型系统
- PermissionSettings: 用户级/项目级/会话级权限持久化(settings.json)
- PermissionRuleEngine: 多层规则引擎(deny→allow→readOnly→mode→dangerous→ASK)
- DangerousPatterns: 危险shell命令检测(rm -rf, eval, exec等)
- ReplSession: Y/A/N/D四选项权限确认UI
- ConfigCommand: permission-mode/list/reset子命令
- AgentLoop: 集成规则引擎,PermissionChoice回调
上下文压缩:
- TokenTracker: 上下文窗口监控(93%自动压缩/82%警告/98%阻塞)
- MicroCompact: 微压缩,裁剪旧tool_result(无API调用)
- SessionMemoryCompact: Session Memory压缩,AI摘要旧消息保留近期段
- FullCompact: 全量压缩+PTL重试(按API Round逐步丢弃)
- AutoCompactManager: 压缩编排器(micro→session→full),含熔断机制
- CompactCommand: 改造为委托FullCompact
- StatusLine: token使用百分比+颜色告警(绿→黄→红→闪烁)
- AppConfig: 注册PermissionSettings/RuleEngine/AutoCompactManager Bean
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
2026-04-02 23:05:37 +08:00 |
|
 liuzhandCopilot
|
7a6c2fcc02
|
feat: Phase4 命令系统与上下文增强
新增基础设施:
- TokenTracker: 真实Token使用量追踪和费用估算(按模型定价)
- SkillLoader: .claude/skills/ 扫描加载,支持YAML frontmatter元数据
- GitContext: Git分支/状态/最近提交收集,注入系统提示词
新增命令 (4个):
- /init: 项目CLAUDE.md初始化向导,自动检测项目类型(Maven/Gradle/Node/Python等)
- /status: 会话状态仪表板(模型、Token、内存、运行时间等)
- /context: 上下文概览(CLAUDE.md、Skills、Git、系统提示词大小)
- /config: 配置查看/设置(支持model快捷切换和API key显示)
增强命令 (3个):
- /cost: 从占位→真实Token统计,显示input/output/cache tokens和费用
- /model: 支持快捷名称切换(sonnet/opus/haiku),显示可用模型列表
- /compact: 增强显示压缩前后消息数和Token使用量
系统提示词增强:
- 集成Skills摘要和Git上下文到系统提示词
- 新增Shell环境信息和更详细的Guidelines
命令总数: 6 → 10, 工具总数: 11
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
2026-04-01 20:59:22 +08:00 |
|