Commit Graph

28 Commits

Author SHA1 Message Date
alan 24bc3f7d6e merge(app): land chat-attach-send micro-slice 2026-10-22 09:50:21 +01:00
alan 3c4ce4c57f feat(app): encode chat prompt attachments on the wire
Build the chat_prompt attachments array in draft order with the web's
{name, mime, data} shape, trimming and 8-file/1 MiB bounds, and read a
recorded history file part back to an attachment.
2026-10-22 03:45:52 +01:00
alan 39fffeb181 Merge branch 'main' into flutter/chat-activity-overlay 2026-10-22 03:34:39 +01:00
alan 4aee83c262 feat(app): pick chat attachments from the host file input 2026-10-22 03:32:33 +01:00
alan af5bda520e Merge branch 'main' into flutter/chat-activity-overlay 2026-10-22 03:31:42 +01:00
alan 1d648c520e feat(app): expand a recorded chat activity line in place
The summary line now carries the host's own disclosure control and, when expanded, the recorded lifecycle, input, output, error, duration and edit diff. Each absent field keeps an exact sentence; no value is inferred from answer text.
2026-10-22 03:31:21 +01:00
alan 68d291602b feat(app): create, rename, star, close and hide chat sessions 2026-10-22 03:22:44 +01:00
alan c98e6baec6 merge(app): land chat-attach-model micro-slice 2026-10-22 03:11:54 +01:00
alan 67427e0231 feat(app): add the chat attachment draft model
Record picked attachment metadata and keep the web composer's 1 MiB
total budget with a refusal that leaves the draft unchanged.
2026-10-22 02:39:56 +01:00
alan 4a86f0db77 feat(app): show a recorded chat activity sequence as one line
Lift recorded activity/compaction parts out of an assistant turn into a
single activity row before the answer. Running kinds use the web's phase
words; terminal records keep the label the server recorded.
2026-10-22 02:33:08 +01:00
alan 221a2582dc feat(app): native permission and question cards in the chat transcript 2026-10-22 02:01:45 +01:00
alan dc6b963170 feat(app): render markdown in chat messages and artifact previews 2026-10-22 00:26:36 +01:00
alan a692befad4 merge(app): land native chat composer after retained-run recovery 2026-10-21 23:49:08 +01:00
alan 421831b585 feat(app): add native chat composer with persisted drafts and stop 2026-10-21 23:49:04 +01:00
alan 90fc9e8a18 Merge branch 'main' into flutter/chat-markdown 2026-10-21 23:34:35 +01:00
alan a5afc55a9d feat(app): render native transcript markdown
Port the web markdown subset to a pure Dart parser and a native
Material/Cupertino block renderer, with a caller seam for assistant text
parts and safe http(s) link activation.

- parser: entities, paragraphs, H1-H6, fenced code, quotes, lists, tables,
  rules, inline code/emphasis/links; entity overflow stays literal
- renderer: host text roles, inline/fenced code fills, table header fill,
  heading level and list/columnHeader semantics, horizontal code/table
  scrolling, native selection
- tests cover parser safety, both hosts, the seam and real taps
- probe plus note record the web evidence and remaining limits
2026-10-21 23:34:33 +01:00
alan 8d7ceffdbd merge(app): land live Chat destination after retained-deadline recovery 2026-10-21 22:58:45 +01:00
alan 86a9b4a664 feat(app): register the live Chat destination with read-only history 2026-10-21 22:57:08 +01:00
alan 565cdaaa1b feat(app): add native chat composer draft and send state
Persist the exact per-session draft, send one plain prompt with a stable operation/native identity, restore a refused draft without overwriting newer typing, track the reply's queued flag and stop through chat_interrupt. No UI, transport, server or platform change; the optimistic/rejection callbacks and loadDraft are the thread integration seam.
2026-10-21 21:25:51 +01:00
alan 2088d4607e fix(app): preserve unknown user parts and native transcript typography 2026-10-21 21:12:50 +01:00
alan 74475b9a4b Merge branch 'main' into flutter/chat-messages 2026-10-21 20:44:02 +01:00
alan 9e4a925587 feat(app): add native chat transcript message row
Render one transcriptRows row with native controls: role-labelled user and
agent messages, verbatim user text, client and attachment names (own name,
URI basename, else file), ordered agent parts, and collapsed reasoning, tool
and unknown-part bodies using ExpansionTile or a Cupertino disclosure.

Blank known parts draw nothing so they no longer fall through to the
unknown-part disclosure; closed bodies build lazily. Adds focused widget
tests, the fixture probe pair and the C2 evidence note.
2026-10-21 20:44:00 +01:00
alan c970aa5d16 fix(app): expose refused chat watches without losing readable history 2026-10-21 20:09:36 +01:00
alan 76437db018 feat(app): add chat thread controller for live conversations
Owns one open chat session: subscribes with chat_subscribe, reads the newest
history page, folds only this session's chat_event frames, pages older history
with the opaque cursor, and replaces the held turn on resync. Failures keep the
held transcript and surface an error; disposal only cancels the local stream.

Co-authored-by: C2 pipeline <noreply@pipeline.local>
2026-10-21 20:04:38 +01:00
alan 41d30a4280 feat(app): split chat sessions into native Material and Cupertino views
Split the 406-line chat session browser into a controller, body, shared
adaptive primitives and separate standard Material and Cupertino lists and
dialogs. Preserve the existing server directory/backend catalogs,
instructions field, closed/starred grouping, directory headings and
empty/no-match states.

- keep refresh generations so stale replies are discarded
- open a created chat immediately and refresh the list in the background
- disable rename Save while the trimmed name is blank
- label row actions per session, with the id on duplicate titles
- wrap Cupertino empty/no-match/error messages instead of clipping, and
  give them a Cupertino text style under a bare MaterialApp
- allow the Material rename helper to wrap at large text scales
- cover both native branches, lifecycle ordering, create/rename/close/star
  and the Cupertino theme path with widget tests
2026-10-21 17:42:39 +01:00
alan a2b02b3810 Improve chat session catalog creation 2026-10-21 13:48:35 +01:00
alan 48059247d1 feat(app): add native chat sessions browser 2026-10-21 13:37:03 +01:00
alan 7cdb9e8338 feat(app): add chat foundation 2026-10-21 13:24:49 +01:00