Skip to content

feat: Text2SQL views (dataset/tables/examples) + chat integration, full i18n#1

Closed
dividduang wants to merge 3 commits into
fastapi-practices:masterfrom
dividduang:feat/text2sql
Closed

feat: Text2SQL views (dataset/tables/examples) + chat integration, full i18n#1
dividduang wants to merge 3 commits into
fastapi-practices:masterfrom
dividduang:feat/text2sql

Conversation

@dividduang

Copy link
Copy Markdown

What

Frontend for Text2SQL: a dataset management page (dataset → tables → examples panes) and a chat sender-toolbar dataset toggle that injects the text2sql_query capability.

i18n

Every user-facing string is routed through $t() from @vben/locales; 57 keys live under ai.text2sqlPage.* with full zh-CN / en-US parity (verified programmatically — zero dangling references, zero key drift). The namespace is text2sqlPage (not text2sql) to avoid colliding with the flat text2sql key already used by routes/index.ts for the menu title.

Conventions

Follows the plugin's existing views: vxe-table, useVbenForm, useVbenModal, Page, confirm(), loading/empty/error states. API response types are declared and match the backend schema/text2sql.py. No logic changes to chat beyond the dataset toggle.

Deps

Adds @ag-ui/core, @antdv-next/x, @antdv-next/x-markdown, @antdv-next/x-sdk (catalog + app deps).

dengjingren added 3 commits June 22, 2026 22:34
- Add text2sql page: dataset, tables, examples panes
- Update chat composables and sender toolbar
- Add zh-CN/en-US i18n entries for text2sql
- Register text2sql route
…fig refactor

- Resolve conflicts in .gitignore, use-sender-toolbar.ts, chat/index.vue
- Convert Text2SQL view imports #/plugins/ai/api -> ../../api (relative,
  matching upstream's standalone-plugin convention; plugin has no '#' alias)
- Retain all Text2SQL views (data.ts, dataset-*-pane.vue, index.vue), api, i18n, route
- Adopt upstream: chat streaming rewrite, config/default-model views, runtime/ layout
Externalize all hardcoded strings in views/text2sql/* through $t() from
@vben/locales; add ai.text2sqlPage.* keys to both langs/zh-CN/ai.json and
langs/en-US/ai.json with full parity (57 keys resolve in both locales).
No logic changes -- string externalization only.

Namespace is text2sqlPage (not text2sql) to avoid colliding with the flat
'text2sql' key used by routes/index.ts for the menu title.
@wu-clan

wu-clan commented Jun 29, 2026

Copy link
Copy Markdown
Member

Replaced by fastapi-practices/plugins#53

@wu-clan wu-clan closed this Jun 29, 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.

2 participants