hint: replace misleading "null true false" suggestions at value slots

At value-literal slots (`insert into T values (`, `update T set
col=`, `where col=`, comma positions) the expected-token set
contains null/true/false/number/string-literal. The completion
engine was surfacing the three keyword candidates as Tab options
— actively misleading because the user is usually about to enter
a number, quoted text, or date, and seeing "null true false"
implies those are *the* options. User report (round-6 testing):
"especially not when I'm trying to insert a datetime value and
don't know the correct format for the literal".

Fix: detect the value-literal slot by its expected-set
fingerprint. Suppress Tab candidates at empty prefix. Surface a
prose hint listing all literal forms with format examples
('YYYY-MM-DD' for dates, 'YYYY-MM-DDTHH:MM:SS' for datetimes).
Once the user starts typing a prefix (n / tr / fa), normal
keyword completion still applies.

Schema-aware narrowing (show ONLY the datetime format at a
datetime column) waits on ADR-0023.

Tests: 769 -> 777 passing (+8). Clippy clean.
This commit is contained in:
claude@clouddev1
2026-05-14 20:40:19 +00:00
parent d6e138169f
commit 3b36bbb4d6
4 changed files with 172 additions and 0 deletions
+7
View File
@@ -282,6 +282,13 @@ hint:
# falls through to `ambient_typing_name` instead.
ambient_typing_name: "Type a name"
ambient_typing_name_then: "Type a name, then {next}"
# Value-literal slot — `insert ... values (`, `update ... set
# col=`, `where col=`. Replaces the misleading "null true
# false" keyword candidate list with format guidance for all
# accepted literal forms. Schema-aware narrowing (showing only
# the relevant format for the column's type) waits on
# ADR-0023.
value_literal_slot: "Type a value: number, 'text', true/false, null (dates as 'YYYY-MM-DD', datetimes as 'YYYY-MM-DDTHH:MM:SS')"
parse:
# Wrapper around chumsky's structural error message. The