fix(tui): 调整界面大小,增加面板搜索,对齐输入格式,调整md渲染#449
Conversation
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
| {Usage: slashUsageClear, Description: "Clear the current draft transcript"}, | ||
| {Usage: slashUsageCompact, Description: "Compact the current session context"}, | ||
| {Usage: slashUsageStatus, Description: "Show current session and agent status"}, | ||
| {Usage: slashUsageWorkdir, Description: "Show or set current session workspace root (/cwd [path])"}, |
There was a problem hiding this comment.
[medium] 这里把 /cwd 作为可运行命令展示在 /help 列表中,但当前执行路径里它不会被 runSlashCommandSelection 直接处理,最终会落到 executeLocalCommand 的 unknown command。本 PR 的测试也在显式断言这个错误行为(update_test.go 2095+)。这会让用户在 help picker 里按 Enter 执行 /cwd 时直接失败,和“帮助即可执行”的交互语义不一致。建议要么在选择执行路径里补上 /cwd 处理,要么把 help picker 中带参数/非可直接执行项改成仅展示不执行。
| return out | ||
| } | ||
|
|
||
| targets := make([]string, 0, len(candidates)) |
There was a problem hiding this comment.
[low] 这里每次输入变化都会为全部候选文件重新构造一份 lowercase targets,再做一次全量 fuzzy.Find。在 maxWorkspaceFiles=4000 且按键实时建议的路径上,这会带来持续的 O(n) 分配与匹配开销。建议在刷新文件候选时预计算并缓存归一化文本(或复用可变缓冲),避免每个 key stroke 都重复构造 targets。

变更概述
本次改动聚焦 TUI 体验一致性与可用性优化,主要包含四个方向:
主要改动
1) 界面大小与窗口适配
60x302) 面板搜索能力增强
/provider、/model、/session、/helppicker 统一启用搜索框/model在异步刷新后搜索状态丢失的问题3) 输入/消息格式对齐
4) Markdown 渲染优化
命令行为变更
/status命令及其帮助入口测试与验证
已完成并通过:
go test ./internal/tui/core/app -count=1go test ./internal/tui/core/commands -count=1go test ./internal/tui/services -count=1go test ./internal/tui/... -count=1影响范围
internal/tui/core/app/*internal/tui/core/commands/*internal/tui/services/*internal/tui/infra/markdown_renderer*README.mdwww/guide/quick-start.md风险与兼容性说明
/status被移除后,依赖该命令的使用习惯需切换到现有状态展示路径(header/picker/activity)