Talk as a builder (#11009)
/talk gives the live preview of the repository the chat is working on its own column on a wide screen (from 80rem), with Code and Diff beside it, only while there is something to show: an app the conversation builds, or something running. With nothing running there is no pane at all (#15734); below 80rem it is the Preview tab of a Chat / Preview switch. Preview, Code, Diff and, on a phone, Chat / Preview are plain links (?pane=) drawn by the server, so all of it works with the script off; with the script a tab swaps the pane in place, so a streaming reply and the composer's words are kept.
The terminal has the same: the Talk screen (src/tui/screens/talk_chats.ts) draws the same steps, names the repository in its header, and p flips to the pane's contents: the repository and its pull, the address of what runs (Preview), the pull's files page (Diff) and the files the chat touched (Code). Both read src/actions/talk_workspace.ts. A terminal cannot draw a web page, so it prints the preview's address instead of framing it.
- Which repository: the last one a tool call in the conversation named (
src/core/talk_steps.tsrepoOf), shown only if you can read it. - Preview: the newest open pull's preview environment, else production, framed from the app's own origin (the page lists that one origin in
frame-src;originOftakes scheme, host and port only, so a URL with userinfo names none). Code lists the files the chat touched; Diff links the pull's files page (not frameable). - Steps, not JSON: each run of tool calls between two pieces of the reply is one closed disclosure, one tab stop, named by its one step ("Read src/a.ts") or its count ("3 steps"); open, each call is one line ("Read src/a.ts", "Edited src/a.ts (+12)", "Opened pull #12", "Merged pull #12 and deployed"), closed in turn, its
key: valuedetails a tap deeper (foldStepsinsrc/web/pages/talk.ts; the script folds a streamed step into its run the same way). Raw JSON is never drawn. The line under a reply summarises ("Read 4 files, opened #12"). - Stop and Steer while a reply streams, and the context meter, are unchanged.
Not yet: sidebar grouping by repository (a chat has no repo of its own), added/removed counts on edits (stored calls are cut short; only added lines are known), per-turn versions to go back to.
Watching it appear (#15734)
Beside a conversation that builds an app, the side pane is the app: its head (name, the preview's state, Publish as the one primary action, Open once published), the versions as chips (v1 to vN; a chip shows that version's files and Restore), then the bar (Preview, Code, Diff; the address of what runs; Reload; Open on its own) over the live frame. On a phone and a tablet the Chat / Preview switch sits in the conversation's head, and both stay alive: switching keeps the reply being written and the words in the box.
- It follows the work. Each turn that lands, and the end of the answer, read the page again and swap the panel in, so a new version appears with the turn that made it; when the count of versions grows the frame reloads under a calm "Updating the preview…" until it has loaded. A frame on a new origin (the build's first preview, or production after Publish) needs the page's own
frame-src, so the page loads again for it once no answer is being written. - It waits honestly. Before the first version the stage says "Making the first version…" (or that the app appears with the first change); once a version is made and its preview is not up yet, "Starting the preview…", and the page looks again every 3 seconds (40 times at most) rather than framing production in its place.
- Without the script the pane is the same page: the frame, the chips and Publish are links and forms, and a reload shows the newest version.
- Proof:
test/talk-build.test.ts(the waiting page, the chips, Publish),test/talk-page.test.ts(the panel swapped in and the frame reloaded under its note, in the page's own script),test/talk-steps.test.ts(the bar's address, Reload and Open). The terminal reads the same versions (:then Build an app) and prints the preview's address; it has no frame to reload.