/**
* CommandMenu — reusable command palette with agent chat fallback.
*
* Features:
* - Anchored to top of viewport (not centered)
* - Falls back to agent chat when no command matches
* - Opens agent sidebar automatically when sending prompts
* - Customizable commands via children
*
* Usage:
*
*
* doThing()}>Do thing
*
*
*/
import React, { type ReactNode } from "react";
/**
* Opens the agent sidebar (dispatches event that AgentSidebar listens for)
*/
export declare function openAgentSidebar(): void;
export declare function openAgentSettings(section?: string | {
section?: string | null;
}): void;
export declare function focusAgentChat(): void;
/**
* Sends a prompt to the agent and opens the sidebar
*/
export declare function submitToAgent(message: string): void;
interface CommandGroupProps {
heading?: string;
children: ReactNode;
}
declare function CommandGroup({ heading, children }: CommandGroupProps): React.JSX.Element;
interface CommandItemProps {
onSelect: () => void;
children: ReactNode;
keywords?: string[];
className?: string;
deferSelect?: boolean;
}
declare function CommandItem({ onSelect, children, keywords: _keywords, className, deferSelect, }: CommandItemProps): React.JSX.Element;
interface CommandShortcutProps {
children: ReactNode;
className?: string;
}
declare function CommandShortcut({ children, className }: CommandShortcutProps): React.JSX.Element;
declare function CommandSeparator({ className }: {
className?: string;
}): React.JSX.Element;
export interface CommandMenuDoc {
title: string;
href: string;
description?: string;
keywords?: string[];
}
interface CommandDocsGroupProps {
docs: CommandMenuDoc[];
heading?: string;
}
declare function CommandDocsGroup({ docs, heading }: CommandDocsGroupProps): React.JSX.Element | null;
export interface CommandMenuProps {
open: boolean;
onOpenChange: (open: boolean) => void;
children: ReactNode;
/** Render app-specific dynamic results from the current search value. */
renderResults?: (search: string) => ReactNode;
/** Placeholder text for the search input */
placeholder?: string;
/** Text shown when no results match (before showing agent fallback) */
emptyText?: string;
/** Whether to show the "Ask AI" fallback when no commands match. Default: true */
showAgentFallback?: boolean;
/** Custom class for the dialog content */
className?: string;
/**
* Raw CHANGELOG.md contents. When provided, the menu shows a built-in
* "What's new" entry that opens an in-app changelog dialog (with an unseen
* dot for new releases). Pass your app's own file:
* import changelog from "../CHANGELOG.md?raw";
*
*/
changelog?: string;
/** Label for the built-in changelog entry. Default: "What's new". */
changelogLabel?: string;
/**
* Stable key used to remember which release a user has already seen (for the
* unseen dot). Defaults to the document title's host app; set explicitly when
* multiple apps share an origin.
*/
changelogKey?: string;
}
export declare function CommandMenu({ open, onOpenChange, children, renderResults, placeholder, emptyText: _emptyText, showAgentFallback, className, changelog, changelogLabel, changelogKey, }: CommandMenuProps): React.JSX.Element;
export declare namespace CommandMenu {
export { CommandGroup as Group };
export { CommandItem as Item };
export { CommandDocsGroup as DocsGroup };
export { CommandShortcut as Shortcut };
export { CommandSeparator as Separator };
}
export declare const COMMAND_MENU_OPEN_EVENT = "agent-native:open-command-menu";
export declare function openCommandMenu(): void;
/**
* Hook to handle Cmd+K (or Ctrl+K) to open the command menu
*/
export declare function useCommandMenuShortcut(onOpen: () => void, options?: {
allowContentEditable?: boolean;
}): void;
export type { CommandDocsGroupProps, CommandGroupProps, CommandItemProps, CommandShortcutProps, };
//# sourceMappingURL=CommandMenu.d.ts.map