Redesign the SQL editor AI interaction and result workflow

Aperta
#2,255 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
java, sql
Ambito
ai, database, frontend

Direzione di ricerca

Start with the SQL editor AI entry points and existing Chat2DB AI services; the issue does not name specific files or tests. Read the linked design discussion #2256 for accepted decisions before implementation. Done means one explicit workflow supports context review, visible request and result states, safe reversible application, and the listed Web/Desktop compatibility criteria.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Summary

Replace the slash-triggered SQL editor AI interaction with a deliberate, reusable workflow for invoking AI, reviewing results, and safely applying selected output.

User problem

The SQL editor treats / at the start of an empty line as an implicit AI command even though slash is normal SQL input. The current inline implementation also duplicates Monaco overlays, view zones, focus handling, and keyboard lifecycle code while providing no complete contract for context selection, request state, result review, or safe application.

User workflow

  1. Select SQL, the current statement, or another explicit editor scope.
  2. Invoke AI through a deliberate editor action.
  3. Inspect the database and editor context that will be sent.
  4. Follow request, streaming, tool, cancellation, and error states.
  5. Review generated SQL, explanations, proposed edits, and warnings.
  6. Insert, replace, partially apply, copy, retry, or reject the result.
  7. Undo accepted changes and recover safely if the editor changed during generation.

Desired outcome

Normal SQL typing remains untouched, while all editor AI entry points share one predictable interaction, state, result, and apply contract across Community Web and Desktop.

Acceptance criteria

  • Slash and every other normal SQL character remain normal editor input.
  • The legacy slash-triggered composer, hint, duplicated overlay code, and global keyboard handling are removed.
  • AI invocation is explicit, discoverable, keyboard-accessible, and does not depend on printable punctuation.
  • Users can inspect the selected editor and database context before sending.
  • All editor AI entry points reuse one request lifecycle and existing Chat2DB AI services instead of creating a parallel stack.
  • Streaming, tool activity, cancellation, errors, and completed results remain visible without hiding or continuously resizing the editor.
  • Generated output is reviewed before mutation and is never executed automatically.
  • Apply operations detect stale editor context, support appropriate partial or complete acceptance, and remain reversible through Monaco undo.
  • Focus restoration, IME input, accessibility, tab switching, and Web/Desktop behavior pass the accepted compatibility matrix.
  • Ordinary SQL typing does not require loading the editor AI implementation or starting an AI request.

Design boundary

#2256 - Redesign SQL editor AI interaction and result workflow owns unresolved design questions, alternatives, and decision records.

This Issue owns the user problem, product scope, priority, acceptance criteria, and implementation tracking. Update these criteria when decisions are accepted in the Discussion.

Related work

  • Existing right-side AI, SQL optimizer, AI table creation, and other explicit AI actions must remain available during the transition.
Lingua principale
Java
Stelle
28.3k
Fork
3.2k
Merge medio
1h 20m
PR unite (30g)
4

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di OtterMind/Chat2DB

Tutte le issue di OtterMind/Chat2DB

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.