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>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
package com.claudecode.command.impl;
|
||||
|
||||
import com.claudecode.command.CommandContext;
|
||||
import com.claudecode.command.SlashCommand;
|
||||
import com.claudecode.command.BaseSlashCommand;
|
||||
import com.claudecode.permission.PermissionSettings;
|
||||
import com.claudecode.permission.PermissionTypes.PermissionMode;
|
||||
|
||||
@@ -10,7 +10,7 @@ import com.claudecode.permission.PermissionTypes.PermissionMode;
|
||||
* <p>
|
||||
* 切换计划模式开关。在计划模式下,AI只能分析不能修改。
|
||||
*/
|
||||
public class PlanCommand implements SlashCommand {
|
||||
public class PlanCommand extends BaseSlashCommand {
|
||||
|
||||
private final PermissionSettings permissionSettings;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user