Artifact dbaf141985329022c59eb8b2993fd29af4b6aa5289ba338c63dc67b17d920780:
- File
src/help.h
— part of check-in
[c8bc1bfa6d]
at
2026-11-23 11:40:21
on branch ux-models
— Model choice says why and recovers from a refused key
With no saved default, pic starts on a provider whose key worked and passes over one that was refused, out of credit or limited; OpenRouter, Moonshot and DeepSeek start on inexpensive general models. The first screen (and stderr for ask and -p) names the model and why; with no key it says how to get one. The picker shows prices and key marks, lists keyless models once typed, ranks exact and prefix matches first, says what it saved and when the thinking level changes. After a refused key, Alt+P picks another model and the message returns to the editor for it. pic sessions shows each conversation's model and marks failed ones; pic models --json carries key; pic --version; pic help start opens with the user path. (user: dmestas, size: 1334) [annotate] [blame] [check-ins using] [more...]
/* pic's manual and reference, compiled in (help.c, src/manual.inc made from * docs/manual and docs/reference by tools/manual-inc.sh): what `pic help` * and the terminal's /help show. A topic is its file's name without .md. */ #ifndef PIC_HELP_H #define PIC_HELP_H #include <stddef.h> #include <stdio.h> /* The number of topics; topic I's name, title (the file's heading) and * whether it belongs to the reference rather than the manual. */ size_t pic_help_count(void); const char *pic_help_name(size_t i); const char *pic_help_title(size_t i); int pic_help_is_reference(size_t i); /* NAME's text, as its file holds it, malloc'd; NULL for an unknown topic (or * no memory). */ char *pic_help_text(const char *name); /* Writes the list of topics, one " NAME TITLE" line each under "Manual:" * and "Reference:". */ void pic_help_index(FILE *out); /* pic help [TOPIC]: the list, or the topic on stdout (0); an unknown topic * or more than one argument names the problem and lists the topics on * stderr (1). */ int pic_help_command(int argc, char **argv); /* CHANGELOG.md, compiled in (src/changelog.inc): its text in chunks, NULL-terminated. */ extern const char *const pic_changelog[]; /* pic's version: the date of the newest section of CHANGELOG.md ("2026-11-23"). */ void pic_version(char *out, size_t cap); #endif