feat: 完善 Server 层并添加 CLI 和 Web 前端
Server 层增强: - 添加 Agent 适配层,支持动态加载 core 模块 - 实现 Token 认证机制,支持本地/远程模式 - WebSocket 集成 Agent 实时对话 CLI 模块 (packages/cli): - serve 命令启动 HTTP Server - attach 命令连接远程 Server - API Client 封装 Web 前端 (packages/web): - React 18 + Vite + Tailwind CSS - 会话管理侧边栏 - WebSocket 实时聊天界面 - 流式消息显示
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
#!/usr/bin/env bun
|
||||
/**
|
||||
* AI Assistant CLI
|
||||
*
|
||||
* 命令行入口
|
||||
*/
|
||||
|
||||
import { Command } from 'commander';
|
||||
import { registerServeCommand, registerAttachCommand } from './commands/index.js';
|
||||
|
||||
const program = new Command();
|
||||
|
||||
program
|
||||
.name('ai-assistant')
|
||||
.description('AI Terminal Assistant - Your AI-powered coding companion')
|
||||
.version('1.0.0');
|
||||
|
||||
// 注册命令
|
||||
registerServeCommand(program);
|
||||
registerAttachCommand(program);
|
||||
|
||||
// 默认命令 (无参数时的行为)
|
||||
program
|
||||
.action(() => {
|
||||
program.help();
|
||||
});
|
||||
|
||||
// 解析命令行参数
|
||||
program.parse(process.argv);
|
||||
Reference in New Issue
Block a user