it0/packages/services
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-service feat: inject-message support for mid-stream task interruption 2026-02-27 21:33:50 -08:00
audit-service fix: release QueryRunner connections to prevent pool exhaustion 2026-02-23 15:55:06 -08:00
auth-service feat: complete tenant member management (CRUD + delete tenant) 2026-02-26 10:00:09 -08:00
comm-service fix: release QueryRunner connections to prevent pool exhaustion 2026-02-23 15:55:06 -08:00
inventory-service fix: set tenantId when creating credentials in inventory-service 2026-02-26 10:52:14 -08:00
monitor-service fix: release QueryRunner connections to prevent pool exhaustion 2026-02-23 15:55:06 -08:00
ops-service fix: release QueryRunner connections to prevent pool exhaustion 2026-02-23 15:55:06 -08:00
voice-service fix: improve voice call reconnection robustness 2026-02-25 07:33:34 -08:00