xonecas.io
7814
Ta

tiny-c-agent / files

tiny-c-agent / src / tui / tui.h

702 bytes
1// tiny TUI: the interactive projection of the agent event stream.
2//
3// The agent turn runs on a worker thread so the render stays responsive; the
4// main thread owns the terminal, reads keys, and draws. Every render and every
5// state change happens under one lock.
6
7#ifndef TINY_TUI_TUI_H
8#define TINY_TUI_TUI_H
9
10#include "config.h"
11#include "provider.h"
12#include "resources.h"
13#include "tool.h"
14
15typedef struct {
16    tiny_config *cfg;
17    tiny_model model;
18    const tiny_resources *resources;
19    const char *cwd;
20} tiny_tui_config;
21
22// Runs the interactive loop until the user exits. Returns the process exit
23// code. Owns no caller resources.
24int tiny_tui_run(const tiny_tui_config *c);
25
26#endif