storkit: merge 374_story_web_ui_implements_all_bot_commands_as_slash_commands

This commit is contained in:
dave
2026-03-23 18:33:13 +00:00
parent 6d3eab92fd
commit 1a3b69301a
11 changed files with 774 additions and 146 deletions

View File

@@ -382,6 +382,14 @@ export const api = {
deleteStory(storyId: string) {
return callMcpTool("delete_story", { story_id: storyId });
},
/** Execute a bot slash command without LLM invocation. Returns markdown response text. */
botCommand(command: string, args: string, baseUrl?: string) {
return requestJson<{ response: string }>(
"/bot/command",
{ method: "POST", body: JSON.stringify({ command, args }) },
baseUrl,
);
},
};
async function callMcpTool(