latest version broken?
Cloned the git repo, installed with --user, launched, set provider as llama.cpp, pointed to the URL and model, saved the API key, then:
[Qwen3.6-35B-A3B-UD-Q6_K-instruct] username: are you there YOU: are you there ∙ ERROR → I'm sorry, I encountered an error: File Not Found
[Qwen3.6-35B-A3B-UD-Q6_K-instruct] username: /help Can't use string ("/api") as an ARRAY ref while "strict refs" in use at /home/username/.local/clio/lib/CLIO/UI/Chat/Help.pm line 199.
Automated Triage Summary
| Field | Value |
|---|---|
| Classification | bug |
| Priority | high |
| Completeness | 75% |
Analysis: Author reports two errors immediately after a fresh install: (1) /help crashes with 'Can't use string ("/api") as an ARRAY ref while "strict refs" in use at lib/CLIO/UI/Chat/Help.pm line 199', and (2) the first message ('are you there') returns 'ERROR -> I'm sorry, I encountered an error: File Not Found'. The /help crash is a real, reproducible bug introduced in commit 98cb96c1 (refactor extracting display_help into Chat/Help.pm). The new @sections data structure uses '/cmd' => 'desc' syntax, which Perl flattens into a single list, so the inner loop tries to dereference each string command as an array ref. To fix, change each pair to an explicit [cmd, desc] arrayref. The 'File Not Found' error is generated by SimpleAIAgent.pm:300 wrapping a tool error; the user mentions llama.cpp but no llama.cpp provider module exists in the repo, so the exact source of the File Not Found error cannot be traced without additional provider/context information — recommend a maintainer investigate the provider configuration path separately.
Root Cause Analysis
Confidence: high
Relevant files:
lib/CLIO/UI/Chat/Help.pm
Relevant functions:
display_help
The @sections data structure at lib/CLIO/UI/Chat/Help.pm lines 86-192 uses the => ('fat comma') operator with bare string keys to express command/description pairs. Because => between two arrays is just a comma, the inner array $items is built as a flat list [title, cmd1, desc1, cmd2, desc2, ...] rather than as nested pairs. The loop at line 197 iterates @$items and at line 199 does my ($cmd, $desc) = @$item — but on the first iteration $item is the string '/api', and dereferencing a string as an array ref fails under use strict with 'Can't use string ("/api") as an ARRAY ref while "strict refs" in use'. I confirmed this by extracting the actual data structure from the file and feeding it to a stub chat object, which reproduced the exact error at line 199. The fix is to wrap each pair in an anonymous array: ['/api', 'API settings ...'] rather than '/api' => 'API settings ...'. The second reported error ('File Not Found' on first message) is generated by SimpleAIAgent.pm line 300 wrapping a tool error; the user references a llama.cpp provider but no such provider module exists in lib/CLIO/Providers/ (only Anthropic, Base, Google, NVIDIA), so this is likely a cascading failure from a missing provider or a missing context file — out of scope for the help-bug fix but worth noting.
Affected Areas
- lib/CLIO/UI/Chat/Help.pm
- lib/CLIO/Core/SimpleAIAgent.pm (error message wrapping at line 300)
This is an automated analysis. A maintainer will review shortly.
Additionally after I enter "/api"
Q quit │ any key for more
The Q is treated as any other button and continues the list instead of abortin.
Thanks for the report, I'll fix up /help I guess I haven't used it in a while - and I'll add a test. The file not found error is your base url, make sure it has /v1/chat/completions. I'll make that more clear too. :)