Skip to content

feat(tui): 增加 Todo 可视化面板并清理无后端 slash 指令#350

Closed
creatang wants to merge 122 commits into
1024XEngineer:codex/issue-266-header-render-fixfrom
creatang:codex/issue-266-header-render-fix
Closed

feat(tui): 增加 Todo 可视化面板并清理无后端 slash 指令#350
creatang wants to merge 122 commits into
1024XEngineer:codex/issue-266-header-render-fixfrom
creatang:codex/issue-266-header-render-fix

Conversation

@creatang

Copy link
Copy Markdown
Collaborator

背景

主要变更

  1. 新增 TUI Todo 面板(展示优先)
  • 展示字段:id/title/status/priority/owner/updated_at
  • 支持按状态过滤:pending/in_progress/blocked/completed/failed/canceled
  • 支持稳定排序:status + priority + updated_at
  • 支持折叠/展开
  • 支持长任务链滚动查看,避免内容被截断
  • 支持选中项查看详情
  1. Runtime 事件联动
  • 订阅并响应 Todo 相关 runtime 事件(含更新/冲突场景)
  • 通过会话快照刷新面板数据
  • TUI 只读展示,不直接改写 session 状态
  1. Slash 指令清理
  • 移除无后端能力或已废弃指令:/memo/compact/remember/forget
  • 同步清理命令注册、分发逻辑、帮助项与对应测试

设计约束对齐

  • 保持 TUI -> Runtime 边界:TUI 仅负责展示与轻交互
  • 状态来源统一为 Runtime 事件/会话快照
  • 不引入 provider/tool 直连

测试

  • 新增/更新 Todo 面板相关测试(渲染、过滤、排序、折叠、交互、事件刷新)
  • 同步更新 slash 清理后的测试断言
  • 已通过:
    • go test ./internal/tui/core/app
    • go test ./internal/tui/...

影响范围

  • 仅涉及 TUI 层与对应测试,不改变 Runtime 写入链路
  • 不影响主消息渲染与主会话输入主流程

关联

phantom5099 and others added 30 commits April 16, 2026 01:05
…sion flow

Generated with [codeagent](https://github.com/qbox/codeagent)
Co-authored-by: phantom5099 <245659304+phantom5099@users.noreply.github.com>
Generated with [codeagent](https://github.com/qbox/codeagent)
Co-authored-by: phantom5099 <245659304+phantom5099@users.noreply.github.com>
fix(provider): validate parts and simplify message conversion
Generated with [codeagent](https://github.com/qbox/codeagent)
Co-authored-by: phantom5099 <245659304+phantom5099@users.noreply.github.com>
fix(runtime): align todo integration test with parts input
…/todo integration

Generated with [codeagent](https://github.com/qbox/codeagent)
Co-authored-by: phantom5099 <245659304+phantom5099@users.noreply.github.com>
为实现统一的流式会话路由奠定基础:
1. 身份注入:新增全局唯一的 ConnectionID 生成器,并注入至底层连接 Context 中,作为会话兜底标识。
2. 规则固化:在 JSON-RPC 解析层实现多级 Session 提取机制(显式字段优先 -> params 提取 -> 连接兜底 -> 缺失报错)。
3. 契约定义:新增 gateway.bindStream 请求体与 gateway.event 通知结构定义。
构建网关内部的核心消息分发枢纽:
1. 会话路由:维护 ConnectionID 到 Session/Run 的强类型多路复用映射表。
2. 自动续期:实现基于 TTL 的滑动窗口生命周期管理,并支持通过 gateway.ping 进行无参无感续期。
3. 容错隔离:为每个连接配置独立的有界发送队列 (Buffer),并实装“慢连接自动剔除 (Slow Consumer Eviction)”机制,防止局部网络阻塞拖垮全局事件循环。
将所有物理入口接入单例中继器,实现外层协议抹平:
1. IPC 接入:实现命名管道/Unix Socket 的连接注册与解绑,复用串行写通道。
2. WS 接入:在 WebSocket 读写循环中接入中继队列,实现双向流式推送。
3. SSE 接入:严格遵循 Server-Sent Events 换行与协议规范,将 gateway.event 格式化输出。
4. 生命周期:在物理连接断开时,自动触发路由表的清理销毁,拒绝幽灵路由。
完成 EPIC-GW-05 的闭环组装:
1. 启动编排:在 Server 初始化阶段注入全局单例 StreamRelay。
2. 分发调度:拦截 gateway.bindStream 方法进行显式路由注册;拦截其余业务请求触发 TTL 自动续期。
3. 优雅关停:保障进程退出时先截断流式中继器,再关停底层网络,实现彻底的无泄漏退出。
作为流式中继功能的收尾,重构核心类型并补安全链路的边缘测试:

1. 类型与校验内聚:整理 types.go 与 validate.go,将流式路由特有的数据结构(如 StreamChannel, BindingHint)与参数校验规则集中管理,提升代码可读性。
2. 核心网络面断言:全面扩展 server_test.go, network_server_test.go 与 bootstrap_test.go,覆盖流式中继器在 IPC/WS/SSE 多端点下的并发注册、事件推送与优雅关停。
3. 协议与分发测试:增补 jsonrpc_test.go 与 rpc_dispatch_test.go,严格测试不同优先级下的 Session ID 提取规则及缺失时的标准 JSON-RPC 报错机制。
4. 边界漏洞封堵:通过 validate_additional_test.go 增加海量非标输入参数的防注入与越界测试。
- start relay loops only after network listener is ready
- stop relay during network server close for deterministic cleanup
- reset relay start flags when loops exit and allow safe restart
- cap per-connection stream bindings to prevent unbounded growth
- add regression tests for lifecycle and limit paths

Generated with [codeagent](https://github.com/qbox/codeagent)
Co-authored-by: pionxe <148670367+pionxe@users.noreply.github.com>
…er-fix

test: increase coverage for config and tui app
Generated with [codeagent](https://github.com/qbox/codeagent)
Co-authored-by: pionxe <148670367+pionxe@users.noreply.github.com>
…emantics

Generated with [codeagent](https://github.com/qbox/codeagent)
Co-authored-by: phantom5099 <245659304+phantom5099@users.noreply.github.com>
fix(provider): tighten multimodal part validation and empty message semantics
…-05-session-stream-relay

feat: [EPIC-GW-05] 会话路由与流式透传中继 (Gateway 核心能力补全)
… gating

Generated with [codeagent](https://github.com/qbox/codeagent)
Co-authored-by: phantom5099 <245659304+phantom5099@users.noreply.github.com>
Generated with [codeagent](https://github.com/qbox/codeagent)
Co-authored-by: creatang <165447160+creatang@users.noreply.github.com>
fix(multimodal): redact transcript image identifiers and tighten memo gating
Generated with [codeagent](https://github.com/qbox/codeagent)
Co-authored-by: phantom5099 <245659304+phantom5099@users.noreply.github.com>
…345239

fix(multimodal): preserve blocked input and validate blank image url
…ader-render-fix

feat(provider): persist /provider add API key into env variables
xgopilot and others added 28 commits April 17, 2026 08:54
Generated with [codeagent](https://github.com/qbox/codeagent)
Co-authored-by: phantom5099 <245659304+phantom5099@users.noreply.github.com>
Generated with [codeagent](https://github.com/qbox/codeagent)
Co-authored-by: phantom5099 <245659304+phantom5099@users.noreply.github.com>
Generated with [codeagent](https://github.com/qbox/codeagent)
Co-authored-by: phantom5099 <245659304+phantom5099@users.noreply.github.com>
…e-334-1776410758

refactor: 删除 max-loop 空概念并修复权限默认放行与 webfetch SSRF
Generated with [codeagent](https://github.com/qbox/codeagent)

Co-authored-by: Cai-Tang-www <106404101+Cai-Tang-www@users.noreply.github.com>
- 引入 `go-selfupdate`,支持检测 Github Releases 并自动替换二进制文件
- 新增 `internal/version` 包,配合 `.goreleaser.yaml` 注入构建版本号
- 在根命令 `PersistentPreRunE` 挂载异步静默版本检测(屏蔽 `url-dispatch`)
- 优化 TUI 生命周期,利用提示缓冲实现 AltScreen 退出后的更新提醒
- 新增 `neocode update [--prerelease]` 手动升级命令
- fix(test): 修复 Windows 环境下 config 目录权限测试由于 `os.Chmod` 不兼容导致的误报
…dget cap

Generated with [codeagent](https://github.com/qbox/codeagent)
Co-authored-by: Cai-Tang-www <106404101+Cai-Tang-www@users.noreply.github.com>
Generated with [codeagent](https://github.com/qbox/codeagent)
Co-authored-by: phantom5099 <245659304+phantom5099@users.noreply.github.com>
feat(subagent): 实现 Task Context Slice 与结构化结果契约
- 拦截 `update` 命令的静默检测逻辑,避免与手动升级流程产生并发冲突及输出过期提示
- 新增 `sanitizeVersionForTerminal`,剥离远端版本字符串中的 ANSI 控制序列,防止终端转义注入
- 为 `neocode update` 手动升级命令增加 5 分钟显式超时上下文,并优化网络超时错误提示
- 补全边界场景单元测试(涵盖跳过静默检测、字符串清洗及网络超时触发分支)
Generated with [codeagent](https://github.com/qbox/codeagent)
Co-authored-by: pionxe <148670367+pionxe@users.noreply.github.com>
… cancel-safe asset flow

Generated with [codeagent](https://github.com/qbox/codeagent)
Co-authored-by: phantom5099 <245659304+phantom5099@users.noreply.github.com>
…410957

fix(runtime/session/config): resolve submit-event blocking and cancellation gaps
Generated with [codeagent](https://github.com/qbox/codeagent)
Co-authored-by: pionxe <148670367+pionxe@users.noreply.github.com>
…checks

- replace sync.Once init cache with mutex-guarded retryable init path
- resolve symlinks in containment checks to prevent asset path escapes
- add regression tests for init retry and symlink escape cases

Generated with [codeagent](https://github.com/qbox/codeagent)
Co-authored-by: Yumiue <188874804+Yumiue@users.noreply.github.com>
feat: 支持 CLI/TUI 程序启动时静默检测新版本与平滑升级
Generated with [codeagent](https://github.com/qbox/codeagent)
Co-authored-by: Yumiue <188874804+Yumiue@users.noreply.github.com>
Generated with [codeagent](https://github.com/qbox/codeagent)
Co-authored-by: Yumiue <188874804+Yumiue@users.noreply.github.com>
feat(TUI):收敛多模态输入链路:runtime 单入口提交 + session 归一化落地,清理 TUI 过渡职责并修复 schema/目录行为
Generated with [codeagent](https://github.com/qbox/codeagent)
Co-authored-by: Yumiue <188874804+Yumiue@users.noreply.github.com>
fix: resolve merge conflicts with main
…istence

重构会话持久化:改为 SQLite 增量存储并移除 JSON 快照写入
# Conflicts:
#	internal/tui/core/app/app.go
#	internal/tui/core/app/update.go
#	internal/tui/core/app/update_test.go
@creatang creatang closed this Apr 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants