Codex model list: show all models, surface fetch failures, hx models

This commit is contained in:
hermes committed 2026-10-06 10:19:21 +00:00
1 parent aa72ab664d
commit 48a808d526
5 files changed
+117 -23

No files matched your search

+3 -1
View File
@@ -149,6 +149,8 @@ pub struct Completion {
}
pub const MAX_ITEMS: usize = 8;
/// Enum args (model ids) show every match; the popup scrolls.
pub const MAX_ENUM_ITEMS: usize = 100;
/// Complete the token ending at byte `cur` of `line`:
/// `/cmd` at line start → commands; `/cmd partial` → the command's args; `@partial` → files.
@@ -184,7 +186,7 @@ pub fn complete(line: &str, cur: usize, specs: &[CmdSpec], files: &[String]) ->
&& let Some(spec) = specs.iter().find(|s| s.name == name)
{
match &spec.args {
ArgKind::Enum(v) => rank(v.iter().map(String::as_str), tok, MAX_ITEMS)
ArgKind::Enum(v) => rank(v.iter().map(String::as_str), tok, MAX_ENUM_ITEMS)
.into_iter()
.map(|x| cand(x.into(), ""))
.collect(),