+
+
+
+
+ {t('terminalPane.agentStarting.title', 'Starting {{agent}}…', { agent: name })}
+
+
+ {Math.floor(elapsed / 1000)}s
+
+
+ {elapsed >= AGENT_STARTING_SLOW_MS ? (
+
+ {t(
+ 'terminalPane.agentStarting.slow',
+ 'Taking longer than usual. It opens here as soon as it’s ready.'
+ )}
+
+ ) : null}
+
+
+ )
+}
+
+function PaneAgentStarting({
+ terminal,
+ agent,
+ container,
+ paneId
+}: {
+ terminal: Terminal
+ agent: TuiAgent
+ container: HTMLElement
+ paneId: number
+}): React.JSX.Element | null {
+ const blank = useTerminalStillBlank(terminal)
+ // Counted from when this pane began waiting; the clock stops mattering once it draws.
+ const [startedAt] = useState(() => Date.now())
+ if (!blank) {
+ return null
+ }
+ return createPortal(
+