fix(coding-agent/slash-commands): fixed slash command shutdown handler return contract

- Updated the TUI shutdown slash command handler to return a `SlashCommandResult` instead of `void`.
- Returned `commandConsumed()` after clearing the editor and invoking runtime shutdown.
- Imported `SkillPromptDetails` as a type in the input controller message imports.
This commit is contained in:
can1357
2026-05-13 06:20:07 +02:00
parent d776063963
commit edd08864c6
2 changed files with 3 additions and 2 deletions
@@ -8,7 +8,7 @@ import { createPromptActionAutocompleteProvider } from "../../modes/prompt-actio
import { theme } from "../../modes/theme/theme";
import type { InteractiveModeContext } from "../../modes/types";
import type { AgentSessionEvent } from "../../session/agent-session";
import { SKILL_PROMPT_MESSAGE_TYPE } from "../../session/messages";
import { SKILL_PROMPT_MESSAGE_TYPE, type SkillPromptDetails } from "../../session/messages";
import { executeBuiltinSlashCommand } from "../../slash-commands/builtin-registry";
import { copyToClipboard, readImageFromClipboard } from "../../utils/clipboard";
import { getEditorCommand, openInEditor } from "../../utils/external-editor";
@@ -51,9 +51,10 @@ function refreshStatusLine(ctx: InteractiveModeContext): void {
ctx.ui.requestRender();
}
const shutdownHandlerTui = (_command: ParsedSlashCommand, runtime: TuiSlashCommandRuntime): void => {
const shutdownHandlerTui = (_command: ParsedSlashCommand, runtime: TuiSlashCommandRuntime): SlashCommandResult => {
runtime.ctx.editor.setText("");
void runtime.ctx.shutdown();
return commandConsumed();
};
const BUILTIN_SLASH_COMMAND_REGISTRY: ReadonlyArray<SlashCommandSpec> = [