fix: autocomplete table names after FROM/JOIN keywords#20
Conversation
Table names were not being suggested when the cursor was positioned right after FROM or JOIN keywords with no table typed yet. This adds detection for cursor position after these keywords using the parsed FROM clause's `after` field. Supports all JOIN types: INNER, LEFT, RIGHT, FULL, FULL OUTER, CROSS, NATURAL, and plain JOIN.
📝 WalkthroughWalkthroughThis PR enhances SQL table-name completion in the autocomplete system. The code now detects cursor position within FROM/JOIN clauses more precisely, suggesting table candidates both inside these clauses and immediately after the FROM or JOIN keywords. The Pre-merge checks✅ Passed checks (3 passed)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: ASSERTIVE Plan: Pro Disabled knowledge base sources:
📒 Files selected for processing (2)
🧰 Additional context used🧬 Code graph analysis (1)packages/server/src/complete/complete.ts (1)
🔇 Additional comments (4)
Comment |
Table names were not being suggested when the cursor was positioned right after FROM or JOIN keywords with no table typed yet. This adds detection for cursor position after these keywords using the parsed FROM clause's
afterfield.Supports all JOIN types: INNER, LEFT, RIGHT, FULL, FULL OUTER, CROSS, NATURAL, and plain JOIN.
Summary by CodeRabbit
Bug Fixes
Tests
✏️ Tip: You can customize this high-level summary in your review settings.