Public: anyone can read this; the crew can change it.

docs/features/talk.md says what /talk does today: Enter sends, Do it and Not now, attachments, New, the byte pins #16120

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

talk/00-docs-stale → main 0 commits

  • Merged. talk/00-docs-stale was merged into main as a84220e.

Review

Sign in to review this change.
1 file changed +6 −6
docs/features/talk.md +6 −6
@@ -16,13 +16,13 @@ It needs a way to spend on a model: a granted Claude account, a monthly dollar g
1616
1717 ## On the web: `/talk`
1818
19 Reached from the Talk icon in every page's top bar, "Talk to the forge" in the palette (`Ctrl/Cmd+K`), `g t`, and the Talk button beside the tell box on home. Signed out, it sends you to /signin and back. It shows your own conversation (the last 50 turns, "Earlier" pages back) and a composer; Ctrl+Enter sends. `/` jumps to the composer from anywhere on the page except inside a field (and with no Ctrl, Cmd or Alt held); the composer carries `aria-keyshortcuts="/"`. It is a web shortcut only: the terminal door (`ssh <forge> talk`, `forge talk`) takes its words as typed and has no shortcut keys, so `/` there is just a character.
19 Reached from the Talk icon in every page's top bar, "Talk to the forge" in the palette (`Ctrl/Cmd+K`), `g t`, and the Talk button beside the tell box on home. Signed out, it sends you to /signin and back. It shows your own conversation (the last 50 turns, "Earlier" pages back) and a composer; Enter sends and Shift+Enter breaks a line. `/` jumps to the composer from anywhere on the page except inside a field (and with no Ctrl, Cmd or Alt held); the composer carries `aria-keyshortcuts="/"`. It is a web shortcut only: the terminal door (`ssh <forge> talk`, `forge talk`) takes its words as typed and has no shortcut keys, so `/` there is just a character.
2020
2121 On a phone the composer is sticky and lifts above the on-screen keyboard (the script sets `--kb` from `visualViewport`); the log is a `role=log` (polite, additions only) and the status line `role=status`, each already a polite live region, so a reply is announced once.
2222
2323 A reply streams in over `GET /talk/stream?after=<turn id>` (server-sent events, one `turn` frame per turn, each carrying the server-rendered markup). The stream ends with the turn (`done`), or after 40 seconds (`more`), well inside the edge's timeout; the page then reconnects from the last turn id it saw (`Last-Event-ID` works too). Without the script the composer is a plain form and a reload shows the answer.
2424
25 When the agent asks first (`needs_confirm`), the turn draws **Confirm** (the existing yes) and **Cancel** (a no: the confirm is spent, nothing runs, a turn says it was cancelled). A result shown once (an invite link) is drawn by Settings → Confirms instead, where Confirm leads.
25 When the agent asks first (`needs_confirm`), the turn draws **Do it** (the existing yes) and **Not now** (a no: the confirm is spent, nothing runs, a turn says it was cancelled). A result shown once (an invite link) is drawn by Settings → Confirms instead, where Do it leads.
2626
2727 ## The crew's line
2828
@@ -84,7 +84,7 @@ Prior art read: Vercel AI Elements (Apache-2.0 React on shadcn; anatomy and beha
8484 | Feature | Status | Why |
8585 | --- | --- | --- |
8686 | Server-drawn history, streaming over SSE, resume from turn id | have | the base of this page |
87 | Confirm / Cancel in place for held writes | have | trust rule |
87 | Do it / Not now in place for held writes | have | trust rule |
8888 | Enter sends, Shift+Enter breaks a line, autosizing box | this pull | what every chat does |
8989 | Draft kept on reload (localStorage, this device): per person and conversation, saved after a 300 ms pause and when the page is hidden or closed | this pull | cheap, local |
9090 | Who and when under each message; copy a message; copy a code block | this pull | AI Elements `Message`, `CodeBlock` |
@@ -96,12 +96,12 @@ Prior art read: Vercel AI Elements (Apache-2.0 React on shadcn; anatomy and beha
9696 | Edit and resend, regenerate, Retry (see below) | have (#8817) | replaced turns are kept and marked, not deleted |
9797 | Queue and Steer while an answer runs | #8819 | `Queue` / `PromptInput` |
9898 | Cost under each reply and how full the context is (header, and in the terminal) | this pull | the run's own usage record, never an estimate |
99 | Attachments, tables, plan line | later | need storage / token data / markdown tables |
99 | Attachments: pick, paste or drop | have | `docs/features/talk-attachments.md` |
100100 | Code highlighting and tables in replies | this pull (#8816) | a reply is stored whole and drawn whole, so no half-open fence is ever tokenised |
101101
102102 **Without the script** the page is a plain form: Enter adds a line, starters are links that prefill the box, and Copy and Latest are not drawn (the script draws them, along with the "Enter sends" hint). The log is `role="log"`; with the script, a new message while you are scrolled up is announced in the status line.
103103
104 **Cost and context.** Above the log, "Spent $0.52 in this conversation" totals the finished runs' `cost_usd` (`conversationTotal`); it, and a turn's cost, show nothing when no run reported one, never `$0`. `GET /api/v1/conversation/turns` (the read the MCP `say` tool points to) carries `totalUsd` and each agent turn's `costUsd`, `null` when unknown. Under a finished reply a quiet line gives the turn's dollars (`$0.12 this turn`); above the log, "Context 85% full (170k of 200k tokens)". Both are read from the run's record (`conversation_run`: `cost_usd`, and `context_tokens`/`context_window` from the last message's usage and the result's `modelUsage`), shown by `core/conversation_cost.ts`. When a run names no window, 200k is assumed and the line says so by showing it. From 80 % the line adds that a new conversation answers faster and costs less (information only: there is no way to start another yet, see "Many conversations"). A reply that streams in gets both when the stream ends; the terminal (`forge talk`) prints the last turn's cost, the total ("Spent $0.52 in this conversation") and the share after its confirmation line. The MCP read of all this is the turns route above.
104 **Cost and context.** Above the log, "Spent $0.52 in this conversation" totals the finished runs' `cost_usd` (`conversationTotal`); it, and a turn's cost, show nothing when no run reported one, never `$0`. `GET /api/v1/conversation/turns` (the read the MCP `say` tool points to) carries `totalUsd` and each agent turn's `costUsd`, `null` when unknown. Under a finished reply a quiet line gives the turn's dollars (`$0.12 this turn`); above the log, "Context 85% full (170k of 200k tokens)". Both are read from the run's record (`conversation_run`: `cost_usd`, and `context_tokens`/`context_window` from the last message's usage and the result's `modelUsage`), shown by `core/conversation_cost.ts`. When a run names no window, 200k is assumed and the line says so by showing it. From 80 % the line adds that a new conversation answers faster and costs less (information only: New starts another, see "Many conversations"). A reply that streams in gets both when the stream ends; the terminal (`forge talk`) prints the last turn's cost, the total ("Spent $0.52 in this conversation") and the share after its confirmation line. The MCP read of all this is the turns route above.
105105
106106 **Stopped is not failed.** A turn the person stopped is stored with `conversation_run.state = 'stopped'` (the `stopped` column is kept and set alongside, only for a release still in play that counts by it). The flow vitals line says it apart: `Talk: 2 turns failed, 1 stopped by the person` (`flow/talk_turns.ts`), and the failure rate leaves stopped turns out. The line is in the flow telemetry (`GET /api/v1/telemetry/flow` and the MCP flow tool) as `vitals.says`, with the counts at `vitals.talkTurns`.
107107
@@ -111,7 +111,7 @@ Prior art read: Vercel AI Elements (Apache-2.0 React on shadcn; anatomy and beha
111111
112112 An agent reply is Markdown, drawn on the server by the same renderer as a README: fenced code is highlighted, tables and links render, and everything else is escaped (a `<script>` in a reply shows as text). A table wider than the column scrolls inside it; the page does not. The reply sits in the column like a person's turn, with none of the README's padding or line measure.
113113
114 A reply arrives as one finished turn, never as growing text, and the page only appends a turn whose id it has not drawn (a repeat is ignored). Turns already on the page are not touched, so nothing above a new reply moves, and the page follows the end only if you were already there (otherwise "Latest" appears). An unfinished fence in a stored reply is closed for drawing. The page's own bytes are held by a test: the stylesheet under 3.5 KB, the script under 7.4 KB, and a page with a code reply under 40 KB.
114 A reply arrives as one finished turn, never as growing text, and the page only appends a turn whose id it has not drawn (a repeat is ignored). Turns already on the page are not touched, so nothing above a new reply moves, and the page follows the end only if you were already there (otherwise "Latest" appears). An unfinished fence in a stored reply is closed for drawing. The page's own bytes are held by a test (`test/talk-page.test.ts`): the stylesheet under 6,300 B, the script under 18,900 B, and a page with a code reply under 40,000 B.
115115
116116 **Copy:** each code block and each message has a Copy button, which copies the text, not the markup. The buttons are drawn by the script: with JavaScript off there are none, and the code is still there to select.
117117

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs