Backend (agent-engine.port.ts): - Add `cancelled` event type: emitted when a task is cancelled (user-initiated or injection), so Flutter can close the old stream cleanly - Add `task_info` event type: emitted after inject to pass the new taskId to the client, enabling cancel/re-inject on the replacement task Flutter (features/chat/): - ChatState: track current `taskId` alongside `sessionId`; clear on completion or error - Handle `TaskInfoEvent`: update taskId in state when server issues a new task - Handle `CancelledEvent`: treat as stream termination (agentStatus → idle) - MessageType.interrupted: new UI node (warning style) for mid-stream cancels - _inject(): send text as an inject request while streaming; backend cancels the current task and starts a new one with the injected message - Input area: during streaming, hint changes to "追加指令...", Enter key calls _inject() instead of _send(), and both inject-send + stop buttons are shown - isAwaitingApproval kept separate from isStreaming so approval flow is not blocked by inject mode Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| android | ||
| assets | ||
| ios/Runner/Assets.xcassets/AppIcon.appiconset | ||
| lib | ||
| test | ||
| .gitignore | ||
| .metadata | ||
| README.md | ||
| analysis_options.yaml | ||
| pubspec.lock | ||
| pubspec.yaml | ||
README.md
it0_app
A new Flutter project.
Getting Started
This project is a starting point for a Flutter application.
A few resources to get you started if this is your first Flutter project:
For help getting started with Flutter development, view the online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.