44b2cff347
On Android and iOS the keyboard's Return now inserts a newline and the Send button sends; desktop keeps Enter to send. The Material activity line drops TextButton's inset so it starts at the answer's edge now that replies have no bubble.
2.2 KiB
2.2 KiB
Chat: ChatGPT-style transcript and composer
Branch chat/chatgpt-look.
- Agent replies render on the page with no bubble (
ChatAgentSurface), in the host's large body role; the readable cap on wide panes is 720. - The operator's turn is a neutral filled bubble with an even radius and no
border (
ChatUserBubble). - A finished reply with text has an icon-only copy control
(
chat-message-copy) that copies its text parts and shows a check for 2 s. Streaming or text-less turns have none. The per-reply model label stays. - The composer is one rounded filled pill (
chat-composer-pill) holding "+" (opens the host picker directly, same keychat-composer-attach), a borderless field and a round arrow Send (Stop beside it while running). Background tasks sit above the pill at the end. - Placeholder is
Work on <folder>from the session'sdirectory, elseMessage the agent; slash commands still start with/. - Fixed two picker tests left stale by the native picker (
962b358a): they now injectChatAttachmentPicker.unsupportedinstead of relying on the VM host.
Checks
flutter test: 1992 passed.flutter analyze: one pre-existing info intest/features/artifacts/ui/artifact_viewer_page_test.dart.- Chrome captures of
tool/chat_composer_probe_entry.dartat 390x844, Material light and Cupertino dark, show the bubble-less reply, copy control, gray user bubble and pill composer. - Both
tool/chat_composer_probe.mjs(expects Enter to insert a newline; Enter now sends) andtool/chat_message_probe.mjs(expects the old "Reasoning, expand for details" activity label) fail on checks that predate this change. The message probe's semantics dump does show the newCopycontrol. - Not verified on a device.
Follow-up: phone newline and activity alignment
- On Android and iOS (
chatEnterSends), the keyboard's Return inserts a line break (TextInputAction.newline) and Send sends; Ctrl/Cmd+Enter still sends. Desktop keeps Enter to send and Shift+Enter for a newline. Desktop keyboard tests run underTargetPlatformVariant.only(TargetPlatform.linux). - The Material activity line ("Ran 1 command ›") had TextButton's 12px inset, which used to match the bubble padding; it now starts at the answer's edge.