diff --git a/apps/app/src/components/plugin/PluginPendingInteractionComposer.tsx b/apps/app/src/components/plugin/PluginPendingInteractionComposer.tsx index eecb562d6..38c12d8e0 100644 --- a/apps/app/src/components/plugin/PluginPendingInteractionComposer.tsx +++ b/apps/app/src/components/plugin/PluginPendingInteractionComposer.tsx @@ -1,4 +1,4 @@ -import { useCallback, useMemo, useState } from "react"; +import { useCallback, useMemo, useRef, useState } from "react"; import { Button } from "@bb/shared-ui/button"; import type { JsonValue, PendingInteraction } from "@bb/domain"; import { PluginSlotMount } from "./PluginSlotMount"; @@ -6,6 +6,7 @@ import { resolvePendingInteraction } from "@/lib/plugin-slot-resolvers"; import { usePluginSlots } from "@/lib/plugin-slots"; import { useStopThread } from "@/hooks/mutations/thread-runtime-mutations"; import { sdk } from "@/lib/sdk"; +import { useStickyFooterAvailableHeight } from "@/components/thread/user-questions/useStickyFooterAvailableHeight"; /** The plugin form to mount: the plugin, its renderer, and the ask. */ export interface PluginPendingInteractionRequest { @@ -38,6 +39,8 @@ export function PluginPendingInteractionComposer({ const stopThread = useStopThread(); const [error, setError] = useState(null); const [submitting, setSubmitting] = useState(false); + const rootRef = useRef(null); + const availableHeight = useStickyFooterAvailableHeight(rootRef); const slot = useMemo( () => resolvePendingInteraction( @@ -89,8 +92,16 @@ export function PluginPendingInteractionComposer({ const dismissLabel = dismissal === "cancel" ? "Cancel" : "Stop turn"; return ( -
-
+
+

{request.title}

@@ -120,7 +131,7 @@ export function PluginPendingInteractionComposer({ } > -
+