Artifact 492d3596f5607e22aa0250337dd61e614bf571d679aedf2b66112dcf22d8459b:
- File
src/tui/tui.h
— part of check-in
[37a5984f8b]
at
2026-11-22 10:54:21
on branch pi-flags
— Add Pi's session flags: -r/--resume, --session-id, --no-session, --mode json|text
The system prompt now points the model at pic help. (user: dmestas, size: 1711) [annotate] [blame] [check-ins using] [more...]
/* pic's terminal UI (app.c): plain pic in a terminal. Each request runs as a * child `pic --json ask` process and is known only through its JSON events; * the journal stays the record, so a UI fault cannot touch a run. */ #ifndef PIC_TUI_H #define PIC_TUI_H #include <stddef.h> typedef struct { const char *self; /* this executable, for the child processes */ const char *db; /* journal path */ const char *workspace; const char *model; /* provider/model */ const char *default_model; /* the saved default (or pic's own), marked in the picker */ int exec_seconds; long context_window; /* -1: the model's */ const char *resume; /* NULL: a new conversation; "latest" or an id */ const char *new_id; /* --session-id naming no conversation yet: the first request creates it under this id */ int pick; /* -r: open the conversation picker at start */ const char *tui_mode; /* --tui-mode: "fullscreen" or "regular"; NULL: the tuiMode setting */ const char *theme; /* --theme: a theme name or "light/dark", for this run; NULL: the theme setting */ /* Options every child request takes too, as Pi applies them to the whole session. */ const char *system_replace; /* --system-prompt; NULL: none */ const char *const *system_append; /* --append-system-prompt arguments */ size_t system_nappend; const char *tools, *exclude_tools; /* --tools, --exclude-tools; NULL: none */ int no_tools, no_builtin_tools; /* --no-tools, --no-builtin-tools */ } pic_tui_options; /* Runs until the person quits; 0, or 1 when the terminal could not be used. */ int pic_tui_main(const pic_tui_options *o); #endif