/** Chat slash commands offered on Tab when the line is `/…`. */ export declare const ASK_SLASH_COMMANDS: readonly ["/help", "/clear", "/new", "/agent", "/cancel", "/exit"]; export type AskCompleter = (line: string) => [string[], string]; /** What a `/…` token turned out to be. */ export type SlashTokenKind = "command" | "path" | "unknown"; /** * Decide whether a `/…` token is a chat command, a filesystem path, or * neither. * * The completer and the slash parser both need this answer, and they must * agree: anything the completer offers has to be accepted when the user * presses Enter on it. Written twice, the two drifted — `/tmp` completed as a * path and was then answered with "is not a chat command". * * Shape settles most tokens, but a bare `/word` is ambiguous: `/tmp` and * `/orchestration` are spelled the same. Only the filesystem separates them, * so an unknown word is looked up — cheap, and reached only for a single * bare word that no command matches. */ export declare function classifySlashToken(token: string): SlashTokenKind; /** Max rows shown in the live Ask suggestion menu. */ export declare const ASK_COMPLETION_MENU_LIMIT = 8; /** * Tab completer for the Ask prompt: slash commands when the line is `/…`, * otherwise local path completion for a path-like last token. */ export declare function createAskCompleter(cwd: string): AskCompleter; /** * Matches for the live suggestion menu (slash commands, else path hits). * Empty when the line is plain prose. */ export declare function listCompletions(line: string, cwd: string): string[]; /** * Replace the completed span with `completion`: whole line for slash * commands, last token for paths. */ export declare function applyCompletion(line: string, completion: string): string; /** * `/hel` → `/help`. Only when the whole line is a single `/token` (no spaces) * and it matches a chat command prefix. `/tmp` falls through to path completion. */ export declare function completeSlash(line: string): [string[], string] | undefined; /** * Complete the last whitespace-separated token when it looks like a path. * Exported for tests. */ export declare function completePath(line: string, cwd: string): [string[], string]; //# sourceMappingURL=completer.d.ts.map