Skip to content

Commit 2358983

Browse files
authored
add ChatSkill.disableModelInvocation (#314174)
* add ChatSkill.disableModelInvocation * update
1 parent 83b3a75 commit 2358983

6 files changed

Lines changed: 11 additions & 2 deletions

File tree

extensions/copilot/src/extension/chatSessions/copilotcli/vscode-node/test/copilotCLICustomizationProvider.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ function makeInstruction(uri: URI, name: string, pattern: string | undefined, de
6060

6161
/** Creates a ChatSkill stub, deriving the name from the parent directory for SKILL.md files. */
6262
function makeSkill(uri: URI, name: string): vscode.ChatSkill {
63-
return { uri, name: name, source: 'local' };
63+
return { uri, name: name, source: 'local', disableModelInvocation: false };
6464
}
6565

6666
/** Creates a ChatHook stub. */

extensions/copilot/src/extension/chatSessions/vscode-node/test/claudeCustomizationProvider.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ function mockAgent(uri: URI, name: string): vscode.ChatCustomAgent {
2323
}
2424

2525
function mockSkill(uri: URI, name: string): vscode.ChatSkill {
26-
return { uri, name, source: 'local' } satisfies vscode.ChatSkill;
26+
return { uri, name, source: 'local', disableModelInvocation: false } satisfies vscode.ChatSkill;
2727
}
2828

2929
class FakeChatSessionCustomizationType {

src/vs/workbench/api/browser/mainThreadChatAgents2.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,7 @@ export class MainThreadChatAgents2 extends Disposable implements MainThreadChatA
251251
pluginUri: skill.pluginUri,
252252
sessionTypes: skill.sessionTypes,
253253
userInvocable: skill.userInvocable,
254+
disableModelInvocation: skill.disableModelInvocation,
254255
};
255256
}
256257

src/vs/workbench/api/common/extHost.protocol.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1713,6 +1713,7 @@ export interface IInstructionDto extends IChatResourceDto {
17131713

17141714
export interface ISkillDto extends IChatResourceDto {
17151715
readonly userInvocable: boolean;
1716+
readonly disableModelInvocation: boolean;
17161717
}
17171718

17181719
export interface ISlashCommandDto extends IChatResourceDto {

src/vs/workbench/api/common/extHostChatAgents2.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -572,6 +572,7 @@ export class ExtHostChatAgents2 extends Disposable implements ExtHostChatAgentsS
572572
pluginUri: dto.pluginUri ? URI.revive(dto.pluginUri) : undefined,
573573
sessionTypes: dto.sessionTypes,
574574
userInvocable: dto.userInvocable,
575+
disableModelInvocation: dto.disableModelInvocation,
575576
});
576577
}
577578

src/vscode-dts/vscode.proposed.chatPromptFiles.d.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,12 @@ declare module 'vscode' {
192192
* Whether this skill should be shown to users as invocable.
193193
*/
194194
readonly userInvocable?: boolean;
195+
196+
/**
197+
* Whether this skill should be excluded from model invocation.
198+
* When true, the skill can only be triggered manually via `/name`.
199+
*/
200+
readonly disableModelInvocation: boolean;
195201
}
196202

197203
/**

0 commit comments

Comments
 (0)