Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

1.4 KB
Raw Blame
import { Minus } from "@langfuse/icons";

import { Button } from "@/src/components/ui/button";
import { KeyboardShortcut } from "@/src/components/design-system/KeyboardShortcut/KeyboardShortcut";
import { InAppAgentNotice } from "@/src/features/in-app-agent/components/InAppAgentNotice";
import { HaloIcon } from "@/src/features/in-app-agent/components/HaloIcon";

/**
 * Transient nudge that the run keeps going without the drawer. Lives in the
 * notice band, so showing it never shifts the composer or the run indicator.
 */
export function InAppAgentBackgroundHint({
  isExpanded,
  onMinimize,
}: {
  isExpanded: boolean;
  onMinimize: () => void;
}) {
  return (
    <InAppAgentNotice
      icon={<HaloIcon variant="notice" />}
      isExpanded={isExpanded}
      role="status"
      tone="neutral"
      action={
        <Button
          type="button"
          variant="ghost"
          size="sm"
          aria-label="Minimize Halo"
          className="-my-0.5 h-5 shrink-0 gap-1 px-1"
          onClick={onMinimize}
        >
          <Minus size="base" color="default" />
          <span className="hidden md:inline-flex">
            <KeyboardShortcut variant="subtle" keys={["Mod", "I"]} />
          </span>
        </Button>
      }
    >
      I keep running in the background. Feel free to minimize, I&apos;ll notify
      you when I&apos;m done or need you.
    </InAppAgentNotice>
  );
}