import type { AutocompleteItem } from "@oh-my-pi/pi-tui"; import type { SubcommandDef, TuiSlashCommandRuntime } from "./types.js"; /** Options shared by the declarative subcommand completers. */ interface SubcommandCompletionOptions { /** Mirrors `BuiltinSlashCommand.subcommandOptional`. */ optional?: boolean; } /** * Build getArgumentCompletions from declarative subcommand definitions. * Returns subcommand names filtered by prefix in the dropdown; each item's * hint is the ghost text the editor shows while that item is selected. * An optional subcommand offers nothing until a prefix is typed, so Enter on * the bare `/name ` submits it instead of accepting the first subcommand. */ export declare function buildArgumentCompletions(subcommands: SubcommandDef[], options?: SubcommandCompletionOptions): (prefix: string) => AutocompleteItem[] | null; /** * Build getArgumentCompletions for `/effort `. The static `subcommands` * list documents the full vocabulary for ACP clients, but the dropdown must * offer only what the active model exposes: suggesting a tier the model lacks * (e.g. `xhigh` on a model capped at `high`) would make the handler answer the * accepted completion with `Unknown thinking level`. Returns null for a model * with no reasoning dial — there is nothing to pick. Reads the viewed session, * which `/effort` targets from a focused subagent. */ export declare function buildEffortArgumentCompletions(runtime: TuiSlashCommandRuntime): (argumentPrefix: string) => AutocompleteItem[] | null; /** * Build getInlineHint for `/effort ` from the same live list as the * dropdown, so the ghost text never completes a tier the active model lacks. */ export declare function buildEffortInlineHint(runtime: TuiSlashCommandRuntime): (argumentText: string) => string | null; /** * Build getArgumentCompletions for /mcp. Delegates to the generic * declarative subcommand completer while the subcommand name itself is * still being typed, then switches to MCP server-name completion (sourced * from {@link collectMcpServerNames}) once a recognized server-name * subcommand (enable/disable/test/remove/reconnect/reauth/unauth) is * followed by a space. `remove` gets its own scope-aware completions (see * {@link buildMcpRemoveCompletions}) since — unlike the others — * it only ever succeeds against a config-file entry. Subcommands with a * different argument shape (add, smithery-search, ...) get no argument * completion. */ export declare function buildMcpArgumentCompletions(subcommands: SubcommandDef[], runtime: TuiSlashCommandRuntime): (argumentPrefix: string) => Promise; /** * Build getInlineHint from declarative subcommand definitions. * Shows remaining completion + usage as dim ghost text after cursor; an * optional subcommand advertises its choices before anything is typed, since * {@link buildArgumentCompletions} opens no dropdown there. */ export declare function buildSubcommandInlineHint(subcommands: SubcommandDef[], options?: SubcommandCompletionOptions): (argumentText: string) => string | null; /** * Build getInlineHint for commands with a simple static hint string. * Shows the hint only when no arguments have been typed yet. */ export declare function buildStaticInlineHint(hint: string): (argumentText: string) => string | null; /** * Build getArgumentCompletions for `/switch `, ordered like the alt+p * picker for the same query: a leading `@` lists configured role aliases * (ctrl+p cycle roles first, in cycle order); anything else lists the * session's cycle scope (or every authenticated model) as `provider/id`, * fuzzy-ranked with the picker's role/MRU/provider affinity. Any `:level` * suffix already typed is kept out of the match and re-appended. Returning * role matches also keeps `@smol` from falling through to `@`-file mention * completion. */ export declare function buildModelSelectorCompletions(runtime: TuiSlashCommandRuntime): (argumentPrefix: string) => AutocompleteItem[] | null; /** * Build getArgumentCompletions that suggests directories relative to the * current project directory. Used by /move so users can Tab-complete the * destination directory. * * Tab accepts the highlighted suggestion, so only a prefix that ends in a * separator lists the directory's children. A prefix naming a directory * without one (`..`, `~`, `foo/.`) completes the separator first; otherwise * Tab would jump straight into the first child. */ export declare function buildDirectoryArgumentCompletions(): (prefix: string) => Promise; /** `/local` argument: session local:// file names (accepts a `local://` / `local:/` prefix). */ export declare function buildLocalFileArgumentCompletions(runtime: TuiSlashCommandRuntime): (argumentPrefix: string) => Promise; export {};