feat(cli): enable skill activation via slash commands

- Register agent skills as dynamic slash commands using SkillCommandLoader
- Allow client-initiated tool calls to skip user confirmation if policy is ASK_USER
- Support follow-up prompt in skill slash commands via postSubmitPrompt
- Add tests for SkillCommandLoader and policy bypass
This commit is contained in:
Taylor Mullen
2026-03-08 15:47:34 -07:00
parent e5d58c2b5a
commit 755c16cb5d
9 changed files with 235 additions and 1 deletions

View File

@@ -747,7 +747,8 @@ export const useGeminiStream = (
if (slashCommandResult) {
switch (slashCommandResult.type) {
case 'schedule_tool': {
const { toolName, toolArgs } = slashCommandResult;
const { toolName, toolArgs, postSubmitPrompt } =
slashCommandResult;
const toolCallRequest: ToolCallRequestInfo = {
callId: `${toolName}-${Date.now()}-${Math.random().toString(16).slice(2)}`,
name: toolName,
@@ -756,6 +757,15 @@ export const useGeminiStream = (
prompt_id,
};
await scheduleToolCalls([toolCallRequest], abortSignal);
if (postSubmitPrompt) {
localQueryToSendToGemini = postSubmitPrompt;
return {
queryToSend: localQueryToSendToGemini,
shouldProceed: true,
};
}
return { queryToSend: null, shouldProceed: false };
}
case 'submit_prompt': {