fix: /help命令动态展示全部28个已注册命令
- CommandContext增加commandRegistry字段 - HelpCommand从registry动态获取命令列表(不再硬编码6个) - 自动对齐命令名称,附显示别名 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -192,7 +192,7 @@ public class ReplSession {
|
||||
statusLine.enable(providerInfo.model(), agentLoop.getTokenTracker());
|
||||
}
|
||||
|
||||
CommandContext cmdContext = new CommandContext(agentLoop, toolRegistry, out, () -> running = false);
|
||||
CommandContext cmdContext = new CommandContext(agentLoop, toolRegistry, commandRegistry, out, () -> running = false);
|
||||
|
||||
while (running) {
|
||||
String input;
|
||||
@@ -272,7 +272,7 @@ public class ReplSession {
|
||||
|
||||
Scanner scanner = new Scanner(System.in);
|
||||
this.activeScanner = scanner;
|
||||
CommandContext cmdContext = new CommandContext(agentLoop, toolRegistry, out, () -> running = false);
|
||||
CommandContext cmdContext = new CommandContext(agentLoop, toolRegistry, commandRegistry, out, () -> running = false);
|
||||
|
||||
while (running) {
|
||||
out.print(AnsiStyle.BOLD + AnsiStyle.BRIGHT_CYAN + "❯ " + AnsiStyle.RESET);
|
||||
|
||||
Reference in New Issue
Block a user