-
Notifications
You must be signed in to change notification settings - Fork 5
refactor(tui): 引入 CLI 命令框架以重构入口与子命令路由 #210
Copy link
Copy link
Closed
Labels
area:docsDocumentation and docs UXDocumentation and docs UXarea:securityApproval, sandbox, and security policyApproval, sandbox, and security policyarea:toolsBuilt-in tools and tool runtimeBuilt-in tools and tool runtimearea:tuiTerminal UI and interaction layerTerminal UI and interaction layerneeds-triageIssue needs initial triageIssue needs initial triage
Metadata
Metadata
Assignees
Labels
area:docsDocumentation and docs UXDocumentation and docs UXarea:securityApproval, sandbox, and security policyApproval, sandbox, and security policyarea:toolsBuilt-in tools and tool runtimeBuilt-in tools and tool runtimearea:tuiTerminal UI and interaction layerTerminal UI and interaction layerneeds-triageIssue needs initial triageIssue needs initial triage
背景
当前 memo 的 CLI 入口主要由手写参数解析与路由组成(例如 routeCli + parseArgs + main 分支)。随着子命令与参数增长,入口逻辑可读性与可维护性会逐步下降。
目标
引入成熟的 CLI 命令框架(优先考虑 Ink 生态方案,例如 Pastel,或其他同类方案),将“命令定义/参数解析/帮助信息”与“TUI 渲染逻辑”解耦。
范围(第一阶段)
memo(默认进入 TUI 或按非 TTY/--once 走 plain 模式)memo mcp ...(list/get/add/remove/login/logout)--once--prev--dangerous--version验收标准
备注
建议采用“命令层先迁移、会话核心不改动”的策略,降低回归风险。