refactor: use inline mode for all review commands

Remove context:'fork' from strict variants, all four commands now
execute inline in the main session.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
kingboung 2026-05-12 16:55:48 +08:00
parent 7425b59826
commit 7565ad59a4

View File

@ -28,7 +28,6 @@ function registerReviewSkill(
skillKey: string, skillKey: string,
files: Record<string, string>, files: Record<string, string>,
description: string, description: string,
forked: boolean,
): void { ): void {
registerBundledSkill({ registerBundledSkill({
name, name,
@ -37,7 +36,6 @@ function registerReviewSkill(
userInvocable: true, userInvocable: true,
disableModelInvocation: true, disableModelInvocation: true,
allowedTools: ALLOWED_TOOLS, allowedTools: ALLOWED_TOOLS,
context: forked ? 'fork' : undefined,
files, files,
async getPromptForCommand(args) { async getPromptForCommand(args) {
const template = CommandLocale.get(skillKey) const template = CommandLocale.get(skillKey)
@ -59,10 +57,7 @@ export function registerReviewSkills(): void {
const meta = localeMetadata[skillKey] const meta = localeMetadata[skillKey]
if (!meta || !files) continue if (!meta || !files) continue
// /review, /security-review — inline in main session registerReviewSkill(meta.name, skillKey, files, meta.description)
registerReviewSkill(meta.name, skillKey, files, meta.description, false) registerReviewSkill(`strict:${skillKey}`, skillKey, files, meta.description)
// /strict:review, /strict:security-review — forked sub-agent
registerReviewSkill(`strict:${skillKey}`, skillKey, files, meta.description, true)
} }
} }