/* 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 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 *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