[Feat]: SQL editor: opt-in AI inline completion

Open
#1,414 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
rust, sql, tauri, typescript

Research direction

Start with packages/web-ui/src/components/ui/SqlEditorWrapper.tsx for the Monaco lifecycle, then read packages/web-ui/src/utils/autocomplete.ts to understand existing completion behavior. Trace the AI support through src-tauri/src/application/ai.rs, src-tauri/src/ai.rs, and src-tauri/src/ai_schema_context.rs, coordinating with provider refactoring PR #1337. Done means the opt-in completion meets the listed privacy, cancellation, keyboard, undo, and execution-safety criteria, with the specified tests and repository checks.

Written by the indexing model from the issue text.

Description

feature request help wanted
Prerequisites
  • I have written a descriptive issue title.
  • I have searched existing issues and open pull requests to avoid duplicating an existing feature request.
🚀 Feature Proposal

Add optional AI-generated SQL continuations rendered as ghost text at the cursor. Accepting a suggestion inserts editor text; it never executes SQL.

Motivation

Small context-aware continuations can reduce typing without opening a separate generation dialog.

Example
Start a join against a known table and accept a suggested continuation using the editor's explicit acceptance action.
Acceptance criteria
  • Default to disabled and allow provider/model selection through existing AI configuration, including supported local providers.
  • Use a bounded prefix/suffix and schema context, disclose what is sent and avoid sending result rows or credentials implicitly.
  • Debounce requests, cancel on context/model/editor changes, suppress during IME composition and discard stale responses.
  • Coordinate acceptance/dismissal keys with autocomplete, indentation and accessibility; one accepted insertion is one editor undo step.
  • Test request cancellation, provider failures, context switching, conflicting completion widgets and the guarantee that acceptance never triggers execution.
Where to start
  • packages/web-ui/src/components/ui/SqlEditorWrapper.tsx owns editor/Monaco lifecycle.
  • src-tauri/src/application/ai.rs, src-tauri/src/ai.rs and src-tauri/src/ai_schema_context.rs implement existing AI support.
  • packages/web-ui/src/utils/autocomplete.ts handles ordinary completion; preserve its behavior. Coordinate with provider refactoring PR #1337.

Boundary: optional editor text completion; no autonomous query execution, automatic data access or new provider credential store.

Contributor notes
  • Follow AGENTS.md and the repository rules. Run GitNexus upstream impact analysis before editing existing symbols and report the blast radius.
  • Add new UI strings to every locale under packages/web-ui/src/i18n/locales/; use design tokens, keyboard access and visible focus.
  • Keep pure frontend helpers under packages/web-ui/src/utils/ and tests in the matching packages/web-ui/tests/ paths. Run focused tests, typecheck and relevant repository checks.
  • Shared backend behavior belongs in src-tauri/src/application/ or plain modules. Keep Tauri code under transport/desktop/, expose shared web behavior when applicable and preserve cargo check --no-default-features from src-tauri/ for backend changes.
  • Questions? Ask here or on Discord.
Dominant language
TypeScript
Stars
5.1k
Forks
335
Avg merge
1d 11h
Merged PRs (30d)
280

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from TabularisDB/tabularis

All issues in TabularisDB/tabularis

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.