import React, { useState } from 'react'; import type { TerminalSession } from '../../domain/models'; import { usePluginAgentHost } from '../../application/state/usePluginAgentHost'; import { Button } from '../ui/button'; import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle } from '../ui/dialog'; export function PluginAgentHost({ sessions }: { sessions: TerminalSession[] }) { const { choice } = usePluginAgentHost(sessions); const [selected, setSelected] = useState([]); return { if (!open) choice?.cancel(); }}> setSelected([])}> Choose terminals for this Agent conversation The conversation is independent of the active tab or workspace. Only the terminals selected here are eligible targets. Tool actions follow this plugin's Allow / Ask / Deny setting.
{choice?.items.map((item) => )} {choice?.items.length === 0 &&

No connected terminals. You can continue without targets.

}
; }