Skip to content

refactor: 移除交互式 xsql ai TUI 模块 - #86

Merged
zx06 merged 3 commits into
mainfrom
cursor/remove-ai-tui-41ee
Oct 11, 2026
Merged

zx06 merged 3 commits into
mainfrom
cursor/remove-ai-tui-41ee

Conversation

@zx06

@zx06 zx06 commented Oct 11, 2026

Copy link
Copy Markdown
Owner

背景

经真实 TUI 测试后,交互式 xsql ai 在 UX 与可靠性上未达预期,决定有意移除该功能。本 PR 仅删除 AI TUI 及其专用配置/依赖,保留 query、schema、MCP、Web UI、只读策略与 error guidance 等能力。

删除范围

类别 路径/内容
CLI cmd/xsql/ai.go、cmd/xsql/ai_test.go
包 internal/ai、internal/tui、internal/js、internal/session、internal/export
E2E tests/e2e/ai_test.go
配置 ai: schema、XSQL_AI_*、Resolve/CLI AI 合并、SaveAI / Web POST /api/v1/config/ai 与 config/test/ai
Web UI Config 模态框「AI Settings」Tab 与相关 API 调用
依赖 openai-go、bubbletea/lipgloss/bubbles/glamour、goja、chroma、runewidth 等(经 go mod tidy 验证无其他引用)

保留( intentionally kept )

  • xsql query / schema dump / profile / proxy / config / stats / spec
  • xsql mcp server 及 MCP tools
  • xsql serve / xsql web 与查询/Schema API
  • 只读双重保护与 error.details.hint 指引(文案已去掉 xsql ai)
  • docs/ai.md 中 MCP / AI-first CLI 约定;新增说明 TUI 已移除

文档

  • 更新 docs/cli-spec.md、docs/config.md、docs/env.md、docs/architecture.md、docs/dev.md、README、AGENTS.md、agent skill
  • RFC 0009–0013 索引状态改为 Removed,文首注明历史记录

验证

  • go test ./...
  • go test -tags=e2e ./tests/e2e/...
  • 本地 go build ./cmd/xsql;xsql --help 无 ai 子命令;xsql spec 无 ai 命令条目
Open in Web Open in Cursor 

 deliberate feature removal after TUI UX/reliability issues.

- 删除 cmd/xsql ai、internal/{ai,tui,js,session,export} 与相关测试
- 移除配置 ai: 段、XSQL_AI_* ENV 与 Web UI AI 设置/API
- 更新 docs/AGENTS/README;RFC 0009–0013 标记 Removed
- go mod tidy:移除 bubbletea/openai-go/goja/chroma 等仅 TUI 使用的依赖

Co-authored-by: x_zhuo <zx06@users.noreply.github.com>
@codecov

codecov Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.36%. Comparing base (0811bc1) to head (8c8708e).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #86      +/-   ##
==========================================
+ Coverage   84.23%   84.36%   +0.13%     
==========================================
  Files          74       63      -11     
  Lines        6970     5233    -1737     
==========================================
- Hits         5871     4415    -1456     
+ Misses        802      597     -205     
+ Partials      297      221      -76     
Flag Coverage Δ
e2e 27.14% <ø> (-1.81%) ⬇️
integration 27.14% <ø> (-1.81%) ⬇️
unittests 76.15% <ø> (-1.63%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

cursoragent and others added 2 commits October 11, 2026 01:34
Co-authored-by: x_zhuo <zx06@users.noreply.github.com>
Co-authored-by: x_zhuo <zx06@users.noreply.github.com>
@sonarqubecloud

Copy link
Copy Markdown

@zx06
zx06 marked this pull request as ready for review October 11, 2026 01:46
@zx06
zx06 merged commit d04da8b into main Oct 11, 2026
14 checks passed
@zx06
zx06 deleted the cursor/remove-ai-tui-41ee branch October 20, 2026 03:41
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.

2 participants