import type { MachineView } from "../../../machines.js"; import type { NewSessionSelectionHistory, Rig } from "@opengeni/sdk"; import { type ReactNode } from "react"; import { type MenuBodyPresentation } from "./composer-menu-radio.js"; export type { MenuBodyPresentation } from "./composer-menu-radio.js"; import { type SessionDraft } from "../../lib/session-create.js"; import { type SessionUsageLimitDraft } from "../../lib/session-usage-limit.js"; export type RunsOnChoices = { draft: SessionDraft; machines: MachineView[]; rigs: Rig[]; workspaceDefaultRigId: string | null; /** The deployment runs sessions only on connected machines. */ selfhostedPrimary: boolean; /** * The deployment has no managed sandbox backend. A chat that does not run on * a connected machine has no computer at all, so the choice reads as chat * only and Sandbox Environments do not apply. */ noManagedSandbox?: boolean | undefined; fleetLoadFailed: boolean; selectedChannelId: string | null; selectionHistory: NewSessionSelectionHistory; }; /** Whether "Runs on" has anything to choose; otherwise the + menu omits it. */ export declare function hasRunsOnChoices(choices: Pick): boolean; /** The right-aligned value of the "Runs on" row: environment or machine. */ export declare function runsOnSummary(choices: RunsOnChoices): string; /** * Why "Runs on" keeps Send disabled, if it does. The choice lives behind "+", * so the page says what is missing and where to fix it. */ export type RunsOnAttention = "fleet-load-failed" | "connect-machine" | "pick-machine" | "machine-unavailable" | null; export declare function runsOnAttention(choices: Pick & { fleetLoading: boolean; }): RunsOnAttention; /** A short note under the new-chat composer for what {@link runsOnAttention} found. */ export declare function RunsOnNotice(props: { attention: RunsOnAttention; machines: MachineView[]; disabled?: boolean | undefined; onRetryMachines: () => void; /** Where to connect a machine (a link to the Machines page). */ connectAction?: ReactNode | undefined; }): import("react").JSX.Element | null; /** * The checked "Sandbox environment" row. An empty rigId follows the workspace * default, and so does a restored draft that names the default explicitly: * the default isn't listed again, so its row is "Workspace default". */ export declare function checkedRigValue(draft: SessionDraft, workspaceDefaultRigId: string | null): string; export declare function RunsOnMenuBody(props: RunsOnChoices & { leading?: ReactNode | undefined; presentation?: MenuBodyPresentation | undefined; disabled: boolean; onChange: (draft: SessionDraft) => void; onComputeChange: (draft: SessionDraft) => void; onRetryMachines: () => void; }): import("react").JSX.Element; /** Whether "Visibility" is a real choice here (Only me is allowed). */ export declare function hasVisibilityChoice(props: { personalWorkspace: boolean; canCreatePrivate: boolean; }): boolean; export declare function visibilitySummary(value: "private" | "workspace"): string; export declare function VisibilityMenuBody(props: { leading?: ReactNode | undefined; presentation?: MenuBodyPresentation | undefined; value: "private" | "workspace"; disabled: boolean; onChange: (visibility: "private" | "workspace") => void; }): import("react").JSX.Element; /** * The new chat's usage limit: none (the default), or pause at a dollar amount * of API-equivalent model usage. Local to this composer, never remembered * across chats; sent on create only when the server offers limits. * * It holds a text field, so "+" always opens it as a dialog (a menu may only * contain menu items): a radio group and a labelled input with ordinary Tab * order, Escape to close and focus back on "+". */ export declare function UsageLimitMenuBody(props: { leading?: ReactNode | undefined; /** Accepted for the shared drill-in contract; this body is always a dialog. */ presentation?: MenuBodyPresentation | undefined; value: SessionUsageLimitDraft; disabled: boolean; /** A Send was blocked by this amount: show "enter an amount" even when empty. */ showRequiredError?: boolean | undefined; onChange: (value: SessionUsageLimitDraft) => void; }): import("react").JSX.Element;