An assistant that does work answers with cards, not paragraphs. A card opens what it is about beside the conversation, where the person watches it change and can take over in the real editor at any point. ActionCard is the card, useWorkspace holds the open tabs, and WorkspacePanel draws them.
The workspace never knows what a tab holds: each tab carries your own data, and you draw its preview and its editor.
One frame for every result: an icon for the kind of thing, a title, a status on the right, a body and a footer of actions. When the assistant proposes a write (publish, send, schedule), put it in the footer as the one primary button, so nothing happens until the person presses it. With onPreview, the header gets an eye button that opens the card's subject in the workspace.
The open tabs as state. A tab is keyed by what it shows (site:42), so opening the same thing twice refreshes one tab instead of adding a second. Each tab's version goes up on every refresh and whenever it leaves its editor, and WorkspacePanel remounts the preview with it. An open editor keeps its version, so a refresh never throws away unsaved edits. Past maxTabs (8), the oldest tab that is not in front closes.
The reducer, workspaceReducer, is exported too, for an app that keeps the tabs in its own store or on the server.
The tab strip, a header with the active tab's title and status, a Preview / Edit switch for tabs with editable, a Full editor link from editorHref, and the tab itself from children. Switching to Edit expands the workspace, so the editor gets the room; on a phone, the expand button shows one panel at a time. Arrow keys move between tabs and Delete closes the one in focus.
Lets the person point at part of a preview so the next message is about it: "make this shorter" then knows what "this" is. Arm it with setPicking(true) from a pointer button: the cursor turns into the select cursor (an arrow with a dashed box, selectCursor(accent), or any CSS cursor through cursor) over the whole page, links included, blocks outline under the pointer, a click picks one, Escape cancels. On a page built from <section> elements it picks the outermost section and reports its position (index of total) and heading; on a page without sections it picks a single heading, paragraph, image or link. The picked block stays outlined until clear().
The frame must be same-origin. A cross-origin frame cannot be reached, and arming does nothing there. Without React, armElementPicker(document, options) arms one pick on any document and returns the cleanup.