Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ function makeInstruction(uri: URI, name: string, pattern: string | undefined, de

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

/** Creates a ChatHook stub. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function mockAgent(uri: URI, name: string): vscode.ChatCustomAgent {
}

function mockSkill(uri: URI, name: string): vscode.ChatSkill {
return { uri, name, source: 'local' } satisfies vscode.ChatSkill;
return { uri, name, source: 'local', disableModelInvocation: false } satisfies vscode.ChatSkill;
}

class FakeChatSessionCustomizationType {
Expand Down
1 change: 1 addition & 0 deletions src/vs/workbench/api/browser/mainThreadChatAgents2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ export class MainThreadChatAgents2 extends Disposable implements MainThreadChatA
pluginUri: skill.pluginUri,
sessionTypes: skill.sessionTypes,
userInvocable: skill.userInvocable,
disableModelInvocation: skill.disableModelInvocation,
};
}

Expand Down
1 change: 1 addition & 0 deletions src/vs/workbench/api/common/extHost.protocol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1713,6 +1713,7 @@ export interface IInstructionDto extends IChatResourceDto {

export interface ISkillDto extends IChatResourceDto {
readonly userInvocable: boolean;
readonly disableModelInvocation: boolean;
}

export interface ISlashCommandDto extends IChatResourceDto {
Expand Down
1 change: 1 addition & 0 deletions src/vs/workbench/api/common/extHostChatAgents2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,7 @@ export class ExtHostChatAgents2 extends Disposable implements ExtHostChatAgentsS
pluginUri: dto.pluginUri ? URI.revive(dto.pluginUri) : undefined,
sessionTypes: dto.sessionTypes,
userInvocable: dto.userInvocable,
disableModelInvocation: dto.disableModelInvocation,
});
}

Expand Down
6 changes: 6 additions & 0 deletions src/vscode-dts/vscode.proposed.chatPromptFiles.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,12 @@ declare module 'vscode' {
* Whether this skill should be shown to users as invocable.
*/
readonly userInvocable?: boolean;

/**
* Whether this skill should be excluded from model invocation.
* When true, the skill can only be triggered manually via `/name`.
*/
readonly disableModelInvocation: boolean;
}

/**
Expand Down
Loading