terminal: remove bare command validation

Stop highlighting bare tokens matching tool names as errors. Also
updates the zenai dependency.
This commit is contained in:
Adrià Arrufat
2026-05-31 15:29:53 +02:00
parent 0d22bd32a5
commit 63f2706202
2 changed files with 3 additions and 9 deletions

View File

@@ -39,8 +39,8 @@
.hash = "N-V-__8AABGOuAC_dhAN07kfoP4dycCFi8Bka4O-tuhriNH8",
},
.zenai = .{
.url = "git+https://github.com/lightpanda-io/zenai.git#db96cffd3a9d0a7bbc26fc6caf99feb783abc164",
.hash = "zenai-0.0.0-iOY_VB_FAwB68e1j78QoLVTuyR0DCxAQwTWwADtZxkmV",
.url = "git+https://github.com/lightpanda-io/zenai.git#120f5fd2a2d29779fbc44584aaa472ad83c6a153",
.hash = "zenai-0.0.0-iOY_VP_EAwBATbpytTro7tmzT1aASeBvKPPvJEO2tEzB",
},
.isocline = .{
.url = "git+https://github.com/arrufat/isocline.git#48d94027aec0408dc58af9ca2dfedf4720870e8c",

View File

@@ -556,13 +556,7 @@ fn highlighterCallback(henv: ?*c.ic_highlight_env_t, input: [*c]const u8, _: ?*a
}
highlightSlashArgs(henv, text, i);
} else {
// A bare token whose first word matches a tool name suggests the user
// forgot the leading `/`. Flag it in error red.
if (closed and isKnownSlashName(cmd)) {
c.ic_highlight(henv, @intCast(cmd_start), @intCast(cmd.len), style_err.ptr);
}
// Natural-language prompts still benefit from `$LP_*` highlighting on
// any embedded env-var references.
// No leading `/`: a natural-language prompt, so no command validation.
highlightDollarVars(henv, text, i);
}
}