Commit Graph
3 Commits
Author SHA1 Message Date
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
abel533andCopilot 80f43480c1 refactor: extract utility classes and split AppConfig
- CommandUtils: shared formatting (header, separator, formatBytes, formatDuration, progressBar, truncate)
- ToolValidator: input validation (requireString, getString, getInt, getBoolean, validatePathInWorkDir)
- ProcessExecutor: consolidated ProcessBuilder with timeout, cleanup, shell execution
- AbstractReadOnlyTool: base class for read-only tools
- Split AppConfig -> ToolConfiguration + CommandConfiguration + AppConfig (core)
- Applied CommandUtils to 16 command files, removed duplicated private methods
- Applied ToolValidator + ProcessExecutor to NotificationTool

Net: -403 lines removed, 87 tests still passing

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-05 12:32:49 +08:00
abel533andCopilot dd47566cb8 feat: Phase 4C infrastructure services + 4D debug commands
4C Services:
- RateLimiter: sliding window rate limiting, concurrent semaphore, cooldowns
- TokenEstimationService: approximate token counting, cost estimation
- NotificationService: cross-platform desktop notifications
- InternalLogger: structured session logging with export

4D Debug Commands:
- /debug: toggle debug mode, view internal logs
- /heapdump: JVM heap dump and memory pool info (Java advantage)
- /trace: request/response tracing
- /ctx-viz: context window token distribution visualization
- /reset-limits: reset rate limits and cooldowns
- /sandbox: sandbox mode toggle (strict/permissive/none)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-05 11:36:35 +08:00