Skip to content

Phase 2: Interactivity — HITL gate decision cards, live streaming output #18

@AlexChesser

Description

@AlexChesser

Priority: High | Dependency: Phase 1 (issue #17)

Description

HITL gate rendering and live step streaming. These require deeper integration with the NDJSON event stream.

Acceptance Criteria

  • When hitl_gate_reached event arrives, UnifiedPanel renders an interactive decision card with: step ID, gate type, message text, Approve/Reject buttons. Step row shows ⏸ glyph.
  • When permission_requested event arrives, render a permission card with tool name, detail, Allow/Deny buttons.
  • Approve/Reject writes hitl_response to ail stdin. Allow/Deny writes permission_response.
  • VS Code information notification fires on HITL gate: "ail: Step <id> is waiting for approval." Clicking reveals UnifiedPanel.
  • If gate open >2 minutes, notification escalates to warning.
  • stream_delta events render incrementally in active step's Output section (not batched).
  • thinking events render in distinct collapsible "Thinking" section during execution.
  • Auto-scroll follows new output; pauses if user scrolls up; resumes on scroll-to-bottom.

ail-core Change Required

  • ail-core/src/executor.rs: add message: Option<String> to HitlGateReached variant, populated from the step's message: YAML field.
  • Update spec/core/s23-structured-output.md (or equivalent) with the new field.

Files to Modify

  • vscode-ail/src/panels/unifiedPanelHtml.ts — HITL card, streaming DOM append, auto-scroll
  • vscode-ail/src/panels/UnifiedPanel.ts — VS Code notifications, gate timeout timer
  • vscode-ail/src/application/RunnerService.ts — forward gate events with context
  • vscode-ail/src/types.ts — add message?: string to HitlGateReachedEvent
  • ail-core/src/executor.rs — add message field to HitlGateReached

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions