Skip to content

feat: add interactive AI TUI mode (xsql-ai & xsql ai) - #65

Open
zx06 wants to merge 75 commits into
mainfrom
feat/ai-tui
Open

feat: add interactive AI TUI mode (xsql-ai & xsql ai)#65
zx06 wants to merge 75 commits into
mainfrom
feat/ai-tui

Conversation

@zx06

@zx06 zx06 commented Aug 5, 2026

Copy link
Copy Markdown
Owner

Summary

This PR introduces the interactive AI TUI mode to xsql with a standalone binary cmd/xsql-ai and subcommand xsql ai.

Key Features:

  • Interactive TUI Engine: Built using Charm Bubbletea and Lipgloss design system.
  • Auto-Execute Initial Prompt: Automatically analyzes and runs initial prompt given via CLI flags.
  • Strict No-Wrap Table & Column Scrolling: Prevent table border alignment breakage with horizontal column scrolling via ←/→ arrow keys.
  • Row Pagination & Full Vertical View: Support 12-row pagination via PgUp/PgDn and full untruncated vertical view toggle via Ctrl+E (psql \x style).
  • Execution Mode Toggle: Switch between AUTO-EXECUTE and MANUAL-APPROVE modes via Shift+Tab.

zx06 added 27 commits August 5, 2026 22:09
…able height to 12 rows for optimal viewport visibility
@codecov

codecov Bot commented Aug 5, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 79.83368% with 291 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.95%. Comparing base (f47ad0d) to head (f418f2d).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
internal/tui/model.go 76.25% 134 Missing and 31 partials ⚠️
internal/tui/components.go 82.16% 14 Missing and 14 partials ⚠️
internal/export/exporter.go 65.67% 14 Missing and 9 partials ⚠️
internal/ai/client.go 86.57% 19 Missing and 1 partial ⚠️
cmd/xsql-ai/main.go 76.92% 10 Missing and 2 partials ⚠️
cmd/xsql/ai.go 74.46% 8 Missing and 4 partials ⚠️
internal/session/store.go 82.14% 5 Missing and 5 partials ⚠️
internal/tui/render.go 79.16% 7 Missing and 3 partials ⚠️
internal/js/engine.go 92.13% 3 Missing and 4 partials ⚠️
internal/ai/prompt.go 80.00% 3 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #65      +/-   ##
==========================================
- Coverage   82.50%   81.95%   -0.55%     
==========================================
  Files          51       62      +11     
  Lines        4259     5687    +1428     
==========================================
+ Hits         3514     4661    +1147     
- Misses        563      773     +210     
- Partials      182      253      +71     
Flag Coverage Δ
e2e 28.97% <29.85%> (-18.06%) ⬇️
integration 28.97% <29.85%> (-18.06%) ⬇️
unittests 74.08% <79.34%> (+1.74%) ⬆️

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.

zx06 added 29 commits August 6, 2026 13:56
@sonarqubecloud

sonarqubecloud Bot commented Aug 6, 2026

Copy link
Copy Markdown

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.

1 participant