mirror of
https://github.com/CopilotKit/CopilotKit.git
synced 2026-09-14 16:26:20 +08:00
f3f32aafff
The "Sort out my offsite expenses" beat had three problems on stage: the harness console was a black slab in a light-mode transcript, the tool activity grew a stack of finished steps that pushed the report card off the screen, and the run took a full minute. Console (banking skin): - Every colour is now a semantic token, so the pane follows the app into dark or light instead of being hardcoded dark. It was `bg-ink` with `text-white/45`-style overlays, which only ever looked right in one mode. - Collapsed by default. The status strip still carries the live state, so the run reads as alive while closed. - Still the FULL log when open. It is the detail view, and windowing it as well left two lines and nowhere to read the rest. Tool activity (shell, all skins): - Rolls to the last two lines; older ones are REMOVED, not collapsed. - Registration is a layout effect, and that is load-bearing. A new line renders before it is registered, and registering is what evicts the oldest, so with a passive effect the browser painted the in-between state: three rows for one frame on every tool call, and again when the end-of-run MESSAGES_SNAPSHOT remounts every line at once. Measured per animation frame over a full run: 12,734 frames, never more than two. - A shared registry rather than something simpler because CopilotKit renders one component per tool call and owns the container. CSS `:nth-last-child` needs siblings and the lines had one parent each; mount-order counters drift across the snapshot remount. Agent (run time 1m 0s -> ~45s): - Research is gated on the offsite dates. A charge dated outside the window is settled by its date whatever the merchant turns out to be, so half the researcher dispatches were buying nothing. Travel on the adjacent days is still kept in scope. - Filings go out in one command instead of one curl per row. The researchers already ran concurrently, so the serial per-row round-trips through the model were most of the wall clock, not the research. - Fetch and verify are one command; there is nothing to decide between the halves. - Analyst reasoning effort defaults to medium, overridable with BANKING_EXPENSE_EFFORT. Filing is idempotent, which the batching made necessary: the script got run twice and every charge was filed twice, so the report card claimed six filings while the ledger held twelve. The script now writes `filed.json` and exits early if it exists. That marker is cleared once per run, because the workspace is a fixed directory shared by every run and a stale marker would convince the next demo it had already filed and post nothing at all — the same bug wearing the opposite mask, and a quieter one, since a run that files nothing still writes a confident report. Deduping server-side on merchant+amount would have been wrong: Hotel Verrano legitimately appears twice at the identical 318.55 for the two nights of the offsite. Does this change make anything in .claude/skills/reskin/ wrong, incomplete, or misleading? No. Nothing there documents the harness console, the tool-activity renderer, or the analyst prompt; its only matches for "console" are `console.error` in unrelated template code. Verified on the real path against a live Intelligence stack: six rows filed, all status=pending, stable across 60s of polling, and present in the Pending Approval queue with their notes and approve/decline actions.