+ {action === "handoff" ? (
+
+
+
({
+ id: config.id,
+ label: config.label,
+ iconId: config.presetId,
+ presetId: config.presetId,
+ }))}
+ value={targetConfigId}
+ placeholder={t({
+ id: "workspace.terminalPane.selectAgent",
+ message: "Select an agent",
+ })}
+ onValueChange={setTargetConfigId}
+ disabled={isStarting || configs.length === 0}
+ triggerClassName="w-full"
+ onBeforeConfigureAgents={() => setAction(null)}
+ />
+ {selectedConfig && (
+
+ {transcriptFailed ? (
+
+ Couldn't read this terminal's context.
+
+ ) : transcript === null ? (
+
+ Measuring the context to send to {selectedConfig.label}…
+
+ ) : transcript.length === 0 ? (
+
+ This terminal has no output to hand over yet.
+
+ ) : (
+
+ Sends {formatNumber(transcript.length)} characters of
+ terminal context (about{" "}
+ {formatNumber(estimateTokens(transcript.length))}{" "}
+ tokens) to {selectedConfig.label}.
+
+ )}
+
+ )}
+
+ ) : (
+
+
+ Provider: {sourceConfig?.label ?? binding.agentId}
+
+
+ )}
+
+
+
+
+
+
+
+
+
+
+