Skip to content
pi-c Timeline
Login

Timeline

50 descendants and 50 ancestors of ea7e1fa24c0b6f7a

2026-11-20
11:50
Hooks: Claude Code-compatible hooks.json (SessionStart, UserPromptSubmit, Pre/PostToolUse, PreCompact, Stop, SessionEnd), journaled before effects; journal v11 check-in: 1a6d31192a user: dmestas tags: hooks
11:49
Merge tui-round-3: build lists keep bash.c, highlight and the new files check-in: 29a145230c user: dmestas tags: tui-atfile
11:49
Merge tui-round-3: build lists keep bash.c, highlight and the new files check-in: 788cb48331 user: dmestas tags: skills-ignore
11:36
Merge trunk into tui-round-3: vendored libfossil a88df0d; Fil-C build lists keep bash.c and the Gemini files check-in: 06c5df2a07 user: dmestas tags: tui-round-3
11:36
TUI: @file completion in the editor, as Pi's autocomplete (ranking, scoped paths, folders continue) check-in: 80c4504bdc user: dmestas tags: tui-atfile
11:20
Skills: honour .gitignore, .ignore and .fdignore while walking skill folders, as Pi does check-in: b1c35dca5d user: dmestas tags: skills-ignore
11:17
Merge trunk into tui-round-3: images, caching, costs, Gemini, hooks seam; pic_bash kept at journal v10 check-in: fa1d0f1004 user: dmestas tags: tui-round-3
11:16
land libfossil-a88df0d check-in: 69b81880a0 user: dmestas tags: trunk
03:52
Vendor libfossil a88df0d594 (sql-ext-int), the cut suit uses

pic and suit now pin the same libfossil, file for file (hashes match). This cut adds onefile (a repository inside a host SQLite database), cowoco (a working copy as rows) and anypipe (caller-supplied sync channels) for the projects-in-libfossil plan (ticket 01e8ad6714). The bundled SQLite is byte-identical to the previous one, so the journal's behaviour does not change; build defines are unchanged. Provenance in vendor/libfossil/README.md; SHA256SUMS regenerated. closed check-in: 4ef08eb9f4 user: dmestas tags: libfossil-a88df0d

02:48
CI green on 5dbfd58fbab4 check-in: 157b7d7187 user: dmestas tags: trunk
02:40
Merge trunk (caching, Gemini) into the syntax highlighter closed check-in: 5dbfd58fba user: dmestas tags: highlight
02:33
CI green on 1e0a50a3c533; Fil-C pass (222) check-in: 5ee3c97358 user: dmestas tags: trunk
02:30
CI green on d3f1fb85511f; Fil-C pass (221) on ebc4b0e75a5e check-in: 01796f84c3 user: dmestas tags: trunk
02:28
Merge trunk into the syntax highlighter check-in: f7b1bab2f5 user: dmestas tags: highlight
02:23
Merge trunk (gcc builds) into prompt caching closed check-in: d3f1fb8551 user: dmestas tags: cache
02:17
Merge trunk into Gemini; the catalog includes Google's models

src/model_catalog.inc regenerated from pi.dev with google-generative-ai: 679 models, each with input types and prices. closed check-in: 1e0a50a3c5 user: dmestas tags: gemini

02:11
CI green on fc3329ac14e5 check-in: c4f5d9c2cd user: dmestas tags: trunk
01:33
TUI round 3: steering keys, live output, retry countdown, durable !cmd

Enter steers a running reply and Alt+Enter queues a follow-up (Shift+Enter or Ctrl+J for a newline); the queue shows Pi's labels, delivered steering appears where it lands, returned messages go back to the editor, and Esc aborts over the command pipe with signals as the fallback. The running bash block shows its output as it arrives; retries count down and Esc cancels the wait. pic bash CMD (optionally --no-context, -c or a conversation id) runs a command and journals it as Pi's bash execution message, so !cmd survives a restart and reaches the model as Pi does. The footer shows cost when usage carries one. check-in: 6b33552ab9 user: dmestas tags: tui-round-3

01:32
Land gcc-build: gcc builds, a leak fix, the Linux benchmark baseline

Merges the gcc-build branch (gcc warning-clean build flags, _GNU_SOURCE for strptime, the json_valid leak in models.c, a checked freopen in the benchmark, the Linux-x86_64 baseline) into current trunk. Code added since the branch is made gcc-clean too (a shadowed name in the TUI, a string comparison gcc could not prove safe), and the benchmark builds again (designated initializers for the tool hooks). The README's build notes move into its Build section. closed check-in: fc3329ac14 user: dmestas tags: gcc-land

01:03
Merge trunk (images, costs) into prompt caching check-in: ebc4b0e75a user: dmestas tags: cache
00:59
CI green on 76939caa663b; Fil-C pass (215); reviewed twice check-in: 6432af2cbc user: dmestas tags: trunk
00:42
Merge trunk (costs) into images; the catalog keeps both input and cost

tools/model-catalog.sh writes each model's input types and prices; src/model_catalog.inc regenerated from pi.dev (653 models). closed check-in: 76939caa66 user: dmestas tags: images

00:37
CI green on facfe0d2409e; Fil-C pass (213) check-in: d23959e47c user: dmestas tags: trunk
00:37
Merge images into prompt caching check-in: 2a29f15311 user: dmestas tags: cache
00:29
Prompt caching on every provider, as Pi's

Anthropic: cache_control on the system block, the last tool and the last block of the final user message; 5 minutes by default, ttl 1h with cacheRetention=long, none with cacheRetention=none (setting in pic.sqlite, PI_CACHE_RETENTION as fallback). Anthropic models through OpenRouter get the same markers. OpenAI Responses and Chat Completions send prompt_cache_key (the conversation id) and 24h retention when long, as Pi does. The system prompt and tools stay byte-identical across turns, and 1-hour cache writes are kept in the stored usage. check-in: 376fd483ed user: dmestas tags: cache

00:29
Merge trunk (TUI round 2, live events) into images

Keeps both features where they met: tool-end events carry images and bash streams partial output; the tool hooks carry both. Fil-C builds image.c and prune.c and runs images.sh, which skips where there is no sqlite3 command (as migrate.sh does). check-in: d5076648a8 user: dmestas tags: images

00:22
Images: re-attaching a pruned image stores its bytes again

INSERT OR IGNORE kept a pruned row (data NULL) and pointed the new attachment at it, so the image was lost on arrival. An upsert restores the bytes when the stored row was pruned. check-in: 972511ccd2 user: dmestas tags: images

00:15
Merge trunk (steering, round 2, live events) into costs closed check-in: facfe0d240 user: dmestas tags: cost
00:09
CI green on 49befd80de6f; Fil-C pass (212) check-in: 8952c4ae13 user: dmestas tags: trunk
00:08
Images: validate at entry, cap per request, prune by retention

Every image is checked from its header (PNG IHDR with CRC, JPEG frame header, GIF screen, WebP) as Fossil sniffs types: an invalid header, a type that isn't the declared one, more than 8000 px a side or over 4.5 MB is refused; the stored type is the sniffed one, with width and height. RPC image errors are reported, never dropped. A request carries the newest 20 images up to 20 MB; older ones become Pi's placeholder. Image bytes are dropped once compacted away or after imageRetentionDays (default 30; 0 keeps them), leaving hash, type and size and an "[image removed]" placeholder; pic prune [--dry-run] runs it, and it also runs at open at most hourly. pic check re-hashes images. Imports keep images. Journal version 10. check-in: 0cc6f109a2 user: dmestas tags: images

2026-11-19
23:39
Images, as Pi's

User messages, steering and follow-ups, and tool results can carry images. Journal version 9 keeps their bytes in SQLite (pic_image, deduplicated by SHA3-256, deflated only when smaller) linked by pic_attachment, written in the same transaction as the entry; pic check covers them. Each adapter sends its native shape (Anthropic base64 blocks, Chat image_url data URLs, Responses input_image); a model whose catalog input lacks images gets Pi's placeholders. pic ask --image PATH, the RPC images field and the read tool on image files add them; the Pi and HTML exports include them. check-in: c55dfbb163 user: dmestas tags: images

23:34
Merge trunk (TUI round 2) into live events closed check-in: 49befd80de user: dmestas tags: live-events
23:30
CI green on 649919032a4e; Fil-C pass (210) check-in: 6b90e74bfe user: dmestas tags: trunk
23:29
A Google Gemini provider, as Pi's

The google-generative-ai API: streamGenerateContent over SSE with GEMINI_API_KEY, native parts replayed per conversation, tool calls and results, usage, and Pi's thinking mapping (thinkingLevel for Gemini 3 and later, a token budget for 2.5, 0 for off). A conversation can move between Gemini and the other providers turn by turn. Recorded streams cover text, thinking, tools, parallel calls, safety blocks, truncation and errors. check-in: 1011fc8472 user: dmestas tags: gemini

23:24
Fil-C runs the cost test too check-in: 3e251306f6 user: dmestas tags: cost
23:24
Model prices and real costs, as Pi's

The catalog snapshot (regenerated from pi.dev) keeps each model's per-Mtok prices and tiers, as do the pi.dev overlay and models.json. Each reply is priced as Pi's calculateCost does: tiers, 1-hour cache writes, per-API usage normalisation, OpenRouter's billed total. The cost and Pi's normalised token counts are stored with the generation and appear in usage events, the Pi export, pic models --json and, per conversation, pic sessions --json. check-in: fe63b75bbd user: dmestas tags: cost

23:12
TUI: a syntax highlighter for code blocks

src/tui/highlight.c colours fenced code with ANSI SGR using Pi's token classes and its dark and light theme colours: C and C++, shell, Python, JavaScript and TypeScript, JSON, Go, Rust, diff, Markdown, YAML and SQL, with a generic fallback. Linear, safe on arbitrary bytes (a random input test under ASan), every styled span closed before each newline so lines wrap on their own. Not wired into the renderer yet. check-in: f84ad487f5 user: dmestas tags: highlight

23:10
Merge trunk (steering) into TUI round 2 closed check-in: 649919032a user: dmestas tags: tui-parity-2
23:05
CI green on 2a3594e86096 (pair); Fil-C pass (201); reviewed twice check-in: 4807bb7d80 user: dmestas tags: trunk
23:03
Integrate TUI round 2, steering and live events for round 3 check-in: 101703404d user: dmestas tags: tui-round-3
22:47
Merge trunk (README platforms) into TUI round 2 check-in: 9d420ea9a1 user: dmestas tags: tui-parity-2
22:44
TUI: closer to Pi, round 2

!cmd runs a command and adds its output to the next message; !!cmd runs it without. Editor: a kill ring (Ctrl+K, Ctrl+U, Ctrl+W, Alt+D into it; Ctrl+Y, Alt+Y out), undo (Ctrl+-), Ctrl+] to jump to a character, Ctrl+G to edit in $VISUAL or $EDITOR, Ctrl+Z to suspend. Markdown: tables, ordered and nested lists, quotes, italics, strikethrough, links (OSC 8 where the terminal draws them), code-fence labels; user messages on a background. Alt+Up restores queued messages. Startup shows Pi's key hints and the loaded context files, skills and prompt templates, and sets the terminal title. Double Esc opens /tree, Shift+Ctrl+P cycles models backwards, Ctrl+X copies the last reply. check-in: e6887db767 user: dmestas tags: tui-parity-2

22:38
Events: the real retry delay, and bash output while it runs

auto_retry_start carries the delay pic is about to wait before retrying a 429 or 5xx (Retry-After or backoff), so a client can count it down. While a bash command runs, tool_execution_update events carry its output so far, throttled to 100 ms as in Pi, emitted outside any journal transaction. check-in: 784650d9f0 user: dmestas tags: live-events

22:33
Merge trunk (TUI round 1) into steering closed check-in: 2a3594e860 user: dmestas tags: steering
22:27
CI green on 1c97d5bf491f (docs only) check-in: 32ae0b410e user: dmestas tags: trunk
22:21
README: where pic can run

A section on the platforms pic's design reaches: today or a build flag away, through the platform and executor interfaces, and with more porting. Tickets 6892fcb11b (static musl binary) and the WebAssembly core track the first two steps. closed check-in: 1c97d5bf49 user: dmestas tags: readme-platforms

22:10
CI green on 781bbf202685; Fil-C pass (185) check-in: d5d3cca608 user: dmestas tags: trunk
22:09
Merge trunk (skills) into steering; skills expand in steer and follow-up text too check-in: 3ec6a62601 user: dmestas tags: steering
21:52
Merge trunk (skills) into TUI round 1; the history test waits for the recall closed check-in: 781bbf2026 user: dmestas tags: tui-parity-1
21:35
CI green on ea7e1fa24c0b; Fil-C pass (178) check-in: a426d5cbec user: dmestas tags: trunk
21:20
Skills, as Pi's

Each folder with a SKILL.md under ~/.pic/skills/ (and, once the workspace is trusted, WORKSPACE/.pic/skills/) is a skill: Pi's frontmatter, validation and discovery rules, symlinks followed (suit places them as links), nothing ever written there. The system prompt lists them in Pi's wording, frozen with the conversation; /skill:name expands to Pi's skill block where templates expand, so ask, chat and the terminal agree, and the slash menu lists them. pic skills [--json] lists them. The frontmatter parser is now shared with prompt templates. closed check-in: ea7e1fa24c user: dmestas tags: skills

20:54
CI green on 4587be10a75e (docs, license, option handling) check-in: c4025eecec user: dmestas tags: trunk
20:54
CI green on f76faff78ed3; Fil-C pass (171) check-in: 606918c3a7 user: dmestas tags: trunk
20:39
CI green on 716e1362b5c3; Fil-C pass (164) check-in: 7e1725f395 user: dmestas tags: trunk
20:39
Merge the TUI race fixes into prompt templates closed check-in: f76faff78e user: dmestas tags: templates
20:35
Prompt templates, as Pi's

Markdown files in ~/.pic/prompts/ and, once the workspace is trusted, WORKSPACE/.pic/prompts/ become /name commands: Pi's frontmatter (description, argument-hint), shell-like arguments and substitutions ($1, $@, $ARGUMENTS, ${1:-default}, ${@:N}, ${@:N:L}). They expand where text becomes a request, so ask, chat and the terminal agree; the slash menu lists them, built-in commands win a name clash, and /reload re-reads them. pic prompts [--json] lists them. Files are read through the platform's input reader, which gains a directory listing. Fixes a pollfd array one entry too small when a catalog refresh runs during a reply. check-in: bb88ac58ac user: dmestas tags: templates

20:34
pic: reject a leftover option before opening anything

pic --bogus used to create WORKSPACE/.pic/journal.sqlite and register the workspace in pic.sqlite before reporting the unknown option. An unknown option, or one missing its value, is now an error first. closed check-in: 4587be10a7 user: dmestas tags: readme-license

20:30
README, BSD 2-Clause license, and repository tending

The README describes pic as it is: what it does, how to build, install, use and test it, and where the documents are. pic is BSD 2-Clause licensed (LICENSE); NOTICE lists the vendored code and the Pi material pic adapts, with their licenses. pic --help and -h print the usage and exit 0. A failed setting names pic.sqlite, not the old settings.json. The plan's stage list is current. .zitignore covers .pic/. check-in: 7c648de250 user: dmestas tags: readme-license

20:22
TUI: fix the races that failed CI on trunk

Esc then a key that arrive in one read (a busy machine, a slow link) are now Escape and that key; they used to be dropped as an unknown Alt+key, so Esc then /share typed into the open dialog instead. A stopping request gets 10 s after SIGINT before SIGTERM (was 3 s), so a slow disk records the cancellation instead of a kill. Quitting waits at most 2 s for the catalog refresh, which no longer starts when the catalog is offline. The exit line is printed and flushed first. The pty driver waits up to 30 s for text and exit. closed check-in: 716e1362b5 user: dmestas tags: tui-races

19:34
CI green on 44df2d733792; Fil-C pass (164) check-in: 06ac29aa05 user: dmestas tags: trunk
19:19
CI green on 0d9513f2d757 (docs only) check-in: 9812ebbcf6 user: dmestas tags: trunk
19:18
Pi lines go to pic.sqlite only; old entries get their times; tests keep off the real HOME (ticket 467ff3edef)

ctx now reads picu_pi_session_line, so ask, chat and the terminal stop writing ~/.pic/sessions files by default; piSessionFiles=1 brings them back. Journal version 7 fills in the times versions before 5 never wrote: an entry takes its request's start from the ask key, and a conversation its first entry's time when earlier, so exported lines no longer carry a null timestamp. Every test script now sets its own HOME, so running one outside make cannot touch the real ~/.pic. closed check-in: 44df2d7337 user: dmestas tags: pi-rows-only

19:06
Plan: running without an operating system, as an option

pic keeps running on a machine with a workspace on disk and bash. The build with no operating system becomes optional stage 7, not to be built yet. There a separate tool runs commands on a runner machine, trading only Fossil check-ins (ticket d909e0fe55); the open decision on where scratch check-ins live is recorded. closed check-in: 0d9513f2d7 user: dmestas tags: no-os-plan

18:40
CI green on b44c2b66e8ed; Fil-C pass (164) check-in: 29c6862cfd user: dmestas tags: trunk
18:21
Merge the test_files umask fix closed check-in: b44c2b66e8 user: dmestas tags: slash
18:21
test_files: expect the mode after the umask

Files are created as POSIX does, so the process umask applies; the Fil-C run's umask 077 turned 0644 into 0600. closed check-in: ee7ac290e2 user: dmestas tags: seams

18:20
Merge the platform seams into the slash commands

Resolves the Makefile source list and app.c's includes, and routes the import's clock through the platform. check-in: 1aadead70b user: dmestas tags: slash

18:13
The rest of Pi's slash commands (ticket 03abef634d)

The terminal gains /settings, /scoped-models (Ctrl+P then cycles only those), /thinking and Shift+Tab (the levels the model supports), /tree (continue from any branch point), /reload, /trust, /import of a Pi v3 JSONL conversation (text only), /export to a self-contained web page, /changelog, /share (a secret gist through gh, after a yes) and /bug (a local report in picu_bug; nothing is sent). /login and /logout say they are not available yet. State lives in pic.sqlite. New subcommands back them: pic tree, export --html, import, trust, scoped-models and bug. check-in: adeb66a371 user: dmestas tags: slash

18:07
Platform and executor seams (ticket d131051152)

pic's OS dependencies now sit behind two interfaces, with the host as the only implementation and no change in behaviour. pic_platform (src/platform.h) holds the wall and monotonic clocks, entropy, the journal lock, input reading and the SQLite VFS name, which the journal and pic.sqlite now open with. pic_executor (src/pic.h) holds the file operations the tools use (stat, read, write, remove, mkdir, list) and running a command; it mirrors libfossil's checkout filesystem so a database-backed workspace can drop in later. test_files covers the host file operations. check-in: 9542357f2e user: dmestas tags: seams

18:04
CI green on e91d80b36c10; Fil-C pass (156) check-in: bad27ab05b user: dmestas tags: trunk
17:49
CI green on 88cfdf0095ed; Fil-C pass (156) check-in: 771137f682 user: dmestas tags: trunk
17:48
One reader for file inputs, and Mozilla's roots compiled in (ticket 2140960de4)

AGENTS.md and the other instruction files, models.json and the certificate bundle are now read through pic_input_read (src/input.c): bounded, regular files only, with an ownership check for the certificate bundle, so a build without a filesystem can supply them another way. When no system bundle exists pic falls back to Mozilla's root certificates compiled in from curl's cacert.pem (tools/ca-bundle.sh regenerates src/ca_bundle.inc); PIC_CA=builtin uses only those. The HTTP test checks the built-in roots load. closed check-in: e91d80b36c user: dmestas tags: input

17:33
Bash output that does not fit goes to the journal, not a temp file (ticket 75eb601110)

When a command's output is cut to Pi's last 2000 lines or 50 KB, the full output (its last 16 MB) is now stored with the call in the journal as pic_output, compressed by the SQLite Archive rule, in the same transaction as the result. The supervisor streams it to pic over a length-prefixed report instead of writing $TMPDIR/pic-bash-*. The truncation notice names pic:output/<id>, which the read tool opens with its usual offset and limit; to search it, the notice says to rerun the command with a filter. closed check-in: 88cfdf0095 user: dmestas tags: spill

17:24
CI green on 34868fb74a7a; Fil-C pass check-in: 9304258f7d user: dmestas tags: trunk
17:09
Conversations as rows of picu_pi_session_line for ctx (ticket 467ff3edef)

The Pi v3 lines pic exports for ctx now go into picu_pi_session_line in ~/.pic/pic.sqlite: one row per line, append-only per conversation, deflated when smaller by the SQLite Archive rule, with the line's Pi type and the journal entry it came from. Exporting again adds only what is new; a rename adds one line. Until ctx reads the rows the ~/.pic/sessions files are still written; piSessionFiles=0 stops them. pic export --pi DIR still writes files there, and - writes to standard output. closed check-in: 34868fb74a user: dmestas tags: rows

16:52
CI green on 7ba00eb0a394; Fil-C pass check-in: 26395fd459 user: dmestas tags: trunk
16:36
Link zlib into the model test on the Fil-C host

The sqlar functions catalog.c now uses need zlib; the payload linked the model test with SQLite alone. closed check-in: 7ba00eb0a3 user: dmestas tags: userdb

16:11
Give the Fil-C payload a private HOME

pic keeps user state under $HOME/.pic; the remote run now keeps it inside its own directory, which teardown removes, and runs the catalog offline. check-in: fc236129ed user: dmestas tags: userdb

16:10
User state in ~/.pic/pic.sqlite instead of loose files (ticket 2ad667b78b)

pic's user-level state now lives in one SQLite database, shared by every pic process (WAL, a busy timeout), in tables prefixed picu_: settings, the model catalog cache from pi.dev (stored with the SQLite Archive compression rule; sqlar_compress and sqlar_uncompress are registered), project trust, model scopes and the workspaces pic has used. ~/.pic/settings.json and ~/.pic/models-store.json are imported on first open in one transaction and then deleted. pic settings shows and changes settings. Tests and benchmarks now run with a private HOME and an offline catalog, so they no longer read or write the real ~/.pic. check-in: dd27c70e9d user: dmestas tags: userdb

15:45
CI green on 998e8169f137; live check on three providers check-in: 5058e3b40f user: dmestas tags: trunk
15:39
Thinking levels as in Pi, for every API

Pi's levels (off, minimal, low, medium, high, xhigh, max) limited to what each model supports per Pi's catalog (thinkingLevelMap, now in the built-in snapshot), and sent as Pi sends them: Anthropic adaptive thinking with effort for models that force it, otherwise thinking budgets with max_tokens raised, disabled when off; Chat Completions by thinking format (reasoning_effort, OpenRouter reasoning, DeepSeek and Z.ai thinking, Qwen and Together switches); Responses reasoning.effort. The level comes from --thinking, else the saved per-model or default level, else medium; pic models --thinking-default saves the default and pic models --json lists each model's levels. agent_start reports the level. closed check-in: 998e8169f1 user: dmestas tags: thinking

14:32
CI green on 1e04dff70e05; Fil-C pass check-in: 5451d909db user: dmestas tags: trunk
14:17
Ship generated .inc sources to the Fil-C host

The remote run copies sources by extension and left out the generated model catalog (src/model_catalog.inc). closed check-in: 1e04dff70e user: dmestas tags: models

14:01
Model picker, slash command menu and Pi's model catalog

Models are chosen as in Pi. pic carries a snapshot of Pi's catalog for its providers (653 chat models; tools/model-catalog.sh regenerates it from pi.dev/api/models) and lays fresher per-provider lists from pi.dev over it, cached in ~/.pic/models-store.json with ETags and trusted for four hours, used only when newer than the snapshot. Resolution takes a model's API, endpoint, limits and compat settings from the catalog before the models file. pic models lists the models of providers with a key (--all every one, --json, --refresh); pic models --default saves the model used when none is given.

In the terminal interface, Ctrl+L or /model opens a picker of the models whose provider has a key, filtered by Pi's fuzzy matching as you type, current and default first; Enter uses the model, Ctrl+S also saves it as the default; Ctrl+P cycles. Typing / shows a menu of commands with their arguments (Tab completes, Enter runs) and /model completes model names. New commands show the conversation's details and token counts, copy the last reply (OSC 52 and the system clipboard), export, clone and list the hotkeys. check-in: fb82c37817 user: dmestas tags: models

13:34
CI green on fc4294d0eafd; Fil-C pass check-in: ad4310396c user: dmestas tags: trunk
13:19
Harden the terminal interface after review

Quitting or pressing Esc again while a request will not stop now escalates from SIGINT to SIGTERM to SIGKILL instead of hanging; a terminated or crashed interface cancels its running request and puts the terminal back; a request that exits without its events is reported. A run is settled when the child exits, not when its output closes. Children run detached from the terminal and get none of the interface's descriptors. Text is sanitized before it reaches the screen: only colour escapes survive, other escapes and control characters are dropped. A streamed reply is committed early only by whole lines, so a resize cannot duplicate or lose text, and a cut-off reply that had lines committed says so. Split key sequences on slow links are kept for the rest; the renderer redraws fully after a resize even when output was committed first. The interface's unit tests run under Fil-C too. closed check-in: fc4294d0ea user: dmestas tags: tui

13:09
Add a terminal interface: plain pic in a terminal

A module in the pic binary (src/tui) that runs each request as a child pic --json process and knows it only through its events, so a fault in the interface cannot touch a run. Finished output is committed once to the terminal's scrollback; a small live area (the reply being streamed, a running tool call, status, queued messages, the editor and a footer with the directory, conversation, tokens, context and model) is redrawn from its first changed line, inside synchronized output. A reply that fails mid-stream only ever lived in the live area and simply goes away.

Editor: multi-line, history, bracketed paste with large pastes shown as atomic markers. Keys: Enter sends (queues while a reply runs), Ctrl+J or Alt+Enter adds a line, Esc interrupts, Ctrl+C clears and twice quits, Ctrl+D quits, Ctrl+O expands later tool output. Commands: new, resume with a picker, name, fork, compact, model, help, quit; commands typed during a reply wait for it. pic tui -c continues the latest conversation and shows its history; pic chat remains the plain prompt.

For clients, agent_start now carries the conversation, model and context window and message_end the usage; the conversation list and a conversation's entries are available as JSON. Tested with unit tests for the width, key, render and editor modules and end to end on a pseudo-terminal. check-in: cb2ad5fbe9 user: dmestas tags: tui

12:49
CI green on acbf15df96dc check-in: 736c8c70b6 user: dmestas tags: trunk
12:45
Fix the usability problems found by test runs on real tasks

pic log now shows how a request ended when it was not answered (cancelled, failed with its error, or still running). pic chat -c continues the latest conversation, or a given one by id, and the prompt says which. A wrong conversation id points at the listing command; a refused fork point names the latest valid ones; an unknown option or command says so before the usage text; an unknown slash command is reported as unknown. closed check-in: acbf15df96 user: dmestas tags: dogfood-fixes

12:41
CI green on a17b05aaa7ca check-in: 9d99f3d144 user: dmestas tags: trunk
12:36
Benchmark long conversations: the context estimate and a full request per API

A conversation of 100 read calls (about 200 entries, 400 KB) is built once; context/estimate-long times Pi's estimate in-process, and request/<api>-long times one whole pic run against a local server inside the benchmark (anthropic, chat, responses). Measured: the history adds about 3 ms to a request at this size (building the messages and body, sending them); the rest of a request is durable commits and process start. Baseline rows added; existing rows left as recorded. closed check-in: a17b05aaa7 user: dmestas tags: bench-long

12:16
CI green on 193e5d1a30ec; Fil-C pass check-in: 3c23c4f6fa user: dmestas tags: trunk
12:01
Write conversations as Pi v3 session files for ctx and Pi's tools

pic export --pi [DIR] writes each conversation as an append-only Pi v3 JSONL file named as Pi names them, by default under ~/.pic/sessions/ --<cwd>--/ and never in Pi's own folder: entry ids are journal entry numbers, a fork names its source file, instruction updates are custom_message entries, names are session_info, compactions are Pi compaction entries. Exporting again appends only finished entries after the last one written, after cutting a torn last line. ask and the line mode export their conversation after each request (PIC_PI_EXPORT=0 turns that off).

Also fixes compaction file lists: they were stored as JSON text rather than arrays, so a later compaction did not carry the earlier read and modified files forward. Lists already stored that way are read either way. closed check-in: 193e5d1a30 user: dmestas tags: pi-export

11:46
CI green on dc583648f4b7; Fil-C pass check-in: 3f3d884187 user: dmestas tags: trunk
11:32
Check event JSON with sqlite3 only where the command exists

The Fil-C host has no sqlite3 command; the events test now skips just that check there, as the migration test does. closed check-in: dc583648f4 user: dmestas tags: events

11:17
Add an interactive line mode: plain pic in a terminal, or pic chat

A prompt that continues one conversation: each message streams its reply, Ctrl-C cancels just that reply, a line ending in a backslash continues the message, and Ctrl-D or /quit leaves. Slash commands start, resume, list, log, name, fork and compact conversations and change the model. The journal is opened only while an input is handled, so other pic commands can use it while the prompt waits. check-in: f41f8c8e00 user: dmestas tags: events

11:13
Ctrl-C cancels the running request, not pic

The first Ctrl-C sets a flag that network waits, retry pauses and the bash tool notice: a running command is aborted through its supervisor and its output kept ("Command aborted"), a provider request stops waiting and is not retried, and the run loop cancels that request the way pic cancel does, leaving other queued requests alone. A second Ctrl-C exits at once and the next run recovers as before. pic also ignores SIGPIPE, so a reader that goes away does not stop a run. check-in: 0dececc6d4 user: dmestas tags: events

11:05
Stream live events: Pi's JSON-mode events, or the reply as it arrives

--json writes one event per line as the run goes, with Pi's names and shapes: agent, turn and message start and end, text and thinking deltas from every adapter, tool execution start and end, compaction start and end, and auto_retry_start. A reply cut off mid-stream ends in message_end with stopReason error before it is requested again, so a client drops the partial text. pic ask streams the reply text when stdout is a terminal (--stream forces it) and prints it only once; tool calls stay on stderr. Events are not journaled: the journal remains the record. check-in: 9983dd9955 user: dmestas tags: events

10:49
CI green on 99cd3b102938 check-in: 1ca1db547f user: dmestas tags: trunk
10:45
Export finished entries as JSON lines for ctx and other readers

pic export [--since ENTRY] writes each finished entry: conversation, entry number, parent, request, role, time, workspace, model, text, tool calls, tool results and whether it is the final answer; thinking is left out. The entry number is the cursor, so there is no outbox table: export stops before the first entry of any unfinished request, and a reader that keeps the last number it saw never skips or repeats one. closed check-in: 99cd3b1029 user: dmestas tags: export

02:51
CI green on dae7ef5eda51 check-in: 134a797840 user: dmestas tags: trunk