it0/it0_app/lib/features
hailin d5f663f7af feat: inject-message support for mid-stream task interruption
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>
2026-02-27 21:33:50 -08:00
..
agent_call fix: improve voice call reconnection robustness 2026-02-25 07:33:34 -08:00
alerts refactor: 移除 AppBar 刷新按钮,统一使用下拉刷新 2026-02-23 05:08:16 -08:00
approvals refactor: 移除 AppBar 刷新按钮,统一使用下拉刷新 2026-02-23 05:08:16 -08:00
auth feat: 生产级 API 错误处理 — 重试拦截器、友好错误提示、网络监测、WebSocket 退避 2026-02-23 04:01:04 -08:00
chat feat: inject-message support for mid-stream task interruption 2026-02-27 21:33:50 -08:00
dashboard refactor: 移除 AppBar 刷新按钮,统一使用下拉刷新 2026-02-23 05:08:16 -08:00
notifications feat: 完成 iAgent App 三大功能 + 修复租户上下文 2026-02-23 01:10:52 -08:00
servers refactor: 移除 AppBar 刷新按钮,统一使用下拉刷新 2026-02-23 05:08:16 -08:00
settings feat: add app upgrade system with self-hosted APK update support 2026-02-26 22:35:01 -08:00
standing_orders feat: add app upgrade system with self-hosted APK update support 2026-02-26 22:35:01 -08:00
tasks feat: add app upgrade system with self-hosted APK update support 2026-02-26 22:35:01 -08:00
terminal fix: translate all remaining English UI strings to Chinese and remove dead code 2026-02-23 02:07:57 -08:00