@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
19 lines • 995 B
TypeScript
import type { EditorSubmitDetails } from "@earendil-works/pi-tui";
/** A `/...` submission typed after leading whitespace is sent as text instead of checked as a command. */
export declare function submitsCommandAsText(text: string, details: EditorSubmitDetails | undefined): boolean;
export interface UnknownCommandFeedbackTarget {
readonly editor: {
getText(): string;
setText(text: string): void;
};
armConfirmation(text: string): void;
readonly confirmHint: string;
showWarning(message: string): void;
}
/**
* Turn an unknown-command rejection into editor feedback: the submitted text goes back into an empty
* editor, the rejection is shown with the confirm hint, and submitting the same text again sends it as
* a message. Returns `false` for any other error.
*/
export declare function reportUnknownCommand(error: unknown, submittedText: string, target: UnknownCommandFeedbackTarget): boolean;
//# sourceMappingURL=unknown-command-feedback.d.ts.map