Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
62d571f
PR
pwang347 Dec 1, 2025
e552013
activation
pwang347 Dec 1, 2025
94e111e
fix test
pwang347 Dec 1, 2025
b539e0e
wip
pwang347 Dec 1, 2025
e2e9c04
update
pwang347 Dec 1, 2025
b8e5a48
Merge branch 'main' into pawang/customAgentProviderFollowups
pwang347 Dec 1, 2025
0c9900b
tests
pwang347 Dec 1, 2025
654bb5a
Merge branch 'pawang/customAgentProviderFollowups' of https://github.…
pwang347 Dec 1, 2025
22808a2
Update src/platform/github/common/githubService.ts
pwang347 Dec 1, 2025
58f0b98
Update src/extension/agents/vscode-node/organizationInstructionsProvi…
pwang347 Dec 1, 2025
8b4ca51
Update src/platform/github/common/octoKitServiceImpl.ts
pwang347 Dec 1, 2025
7e4d5b7
update
pwang347 Dec 1, 2025
9a903e7
Merge branch 'pawang/customAgentProviderFollowups' of https://github.…
pwang347 Dec 1, 2025
ac46114
update setting name
pwang347 Dec 1, 2025
c60ca8c
Merge branch 'main' of github.com:microsoft/vscode-copilot-chat into …
pwang347 Dec 31, 2025
1def2e7
wip
pwang347 Dec 31, 2025
da7039c
fix
pwang347 Dec 31, 2025
8697883
use enum
pwang347 Dec 31, 2025
28e810d
Merge branch 'main' of github.com:microsoft/vscode-copilot-chat into …
pwang347 Jan 7, 2026
e62f583
PR
pwang347 Jan 7, 2026
9a81ff6
nit
pwang347 Jan 7, 2026
147b0f0
add polling
pwang347 Jan 7, 2026
bf255df
tests
pwang347 Jan 7, 2026
1ab4167
cleanup
pwang347 Jan 7, 2026
c926baa
use helper
pwang347 Jan 7, 2026
24f3e2e
remove instructions
pwang347 Jan 7, 2026
d00db38
clean
pwang347 Jan 7, 2026
f4c99cd
use custom source
pwang347 Jan 7, 2026
77fce42
Merge branch 'main' of github.com:microsoft/vscode-copilot-chat into …
pwang347 Jan 12, 2026
fb0fabc
update
pwang347 Jan 13, 2026
33d9844
update
pwang347 Jan 13, 2026
5790a1d
test updates
pwang347 Jan 13, 2026
3d6b669
fix tests
pwang347 Jan 13, 2026
af4fb96
update types
pwang347 Jan 13, 2026
bfe945e
PR
pwang347 Jan 13, 2026
c28ddd6
Merge branch 'main' into pawang/updateCustomAgents
pwang347 Jan 13, 2026
79d0415
Merge branch 'main' of https://github.com/microsoft/vscode-copilot-ch…
pwang347 Jan 15, 2026
c136b57
use proposed API
pwang347 Jan 15, 2026
a09278d
Update src/platform/customInstructions/common/customInstructionsServi…
pwang347 Jan 16, 2026
41cd2a5
fix tests
pwang347 Jan 16, 2026
f25ed0e
update for skills
pwang347 Jan 16, 2026
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
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
"onUri",
"onFileSystem:ccreq",
"onFileSystem:ccsettings",
"onCustomAgentsProvider"
"onCustomAgentProvider"
],
"main": "./dist/extension",
"l10n": "./l10n",
Expand Down Expand Up @@ -136,7 +136,8 @@
"languageModelThinkingPart",
"chatSessionsProvider@3",
"devDeviceId",
"contribEditorContentMenu"
"contribEditorContentMenu",
"chatPromptFiles"
],
"contributes": {
"languageModelTools": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,15 @@ import { Disposable } from '../../../util/vs/base/common/lifecycle';

const AgentFileExtension = '.agent.md';

export class OrganizationAndEnterpriseAgentProvider extends Disposable implements vscode.CustomAgentsProvider {
export class OrganizationAndEnterpriseAgentProvider extends Disposable implements vscode.CustomAgentProvider {

label: string = vscode.l10n.t('GitHub Organization');

private readonly _onDidChangeCustomAgents = this._register(new vscode.EventEmitter<void>());
readonly onDidChangeCustomAgents = this._onDidChangeCustomAgents.event;

private isFetching = false;
private memoryCache: vscode.CustomAgentResource[] | undefined;
private memoryCache: vscode.CustomAgentChatResource[] | undefined;

constructor(
@IOctoKitService private readonly octoKitService: IOctoKitService,
Expand All @@ -42,9 +44,9 @@ export class OrganizationAndEnterpriseAgentProvider extends Disposable implement
}

async provideCustomAgents(
_options: vscode.CustomAgentQueryOptions,
_options: vscode.CustomAgentContext,
_token: vscode.CancellationToken
): Promise<vscode.CustomAgentResource[]> {
): Promise<vscode.CustomAgentChatResource[]> {
try {
if (this.memoryCache !== undefined) {
return this.memoryCache;
Expand All @@ -58,15 +60,15 @@ export class OrganizationAndEnterpriseAgentProvider extends Disposable implement
}
}

private async readFromCache(): Promise<vscode.CustomAgentResource[]> {
private async readFromCache(): Promise<vscode.CustomAgentChatResource[]> {
try {
const cacheDir = this.getCacheDir();
if (!cacheDir) {
this.logService.trace('[OrganizationAndEnterpriseAgentProvider] No workspace open, cannot use cache');
return [];
}

const agents: vscode.CustomAgentResource[] = [];
const agents: vscode.CustomAgentChatResource[] = [];

// Check if cache directory exists
try {
Expand All @@ -91,11 +93,7 @@ export class OrganizationAndEnterpriseAgentProvider extends Disposable implement
const metadata = this.parseAgentMetadata(text, filename);
if (metadata) {
const fileUri = vscode.Uri.joinPath(orgDir, filename);
agents.push({
name: metadata.name,
description: metadata.description,
uri: fileUri,
});
agents.push(new vscode.CustomAgentChatResource(fileUri));
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,21 @@ import { IInstantiationService } from '../../../util/vs/platform/instantiation/c
import { IExtensionContribution } from '../../common/contributions';
import { OrganizationAndEnterpriseAgentProvider } from './organizationAndEnterpriseAgentProvider';

export class OrganizationAndEnterpriseAgentContribution extends Disposable implements IExtensionContribution {
readonly id = 'OrganizationAndEnterpriseAgents';
export class PromptFileContribution extends Disposable implements IExtensionContribution {
readonly id = 'PromptFiles';

constructor(
@IInstantiationService instantiationService: IInstantiationService,
@IConfigurationService configurationService: IConfigurationService,
) {
super();

if ('registerCustomAgentsProvider' in vscode.chat) {
// Register custom agent provider
if ('registerCustomAgentProvider' in vscode.chat) {
// Only register the provider if the setting is enabled
if (configurationService.getConfig(ConfigKey.ShowOrganizationAndEnterpriseAgents)) {
const provider = instantiationService.createInstance(OrganizationAndEnterpriseAgentProvider);
this._register(vscode.chat.registerCustomAgentsProvider(provider));
const orgAndEnterpriseAgentProvider = instantiationService.createInstance(OrganizationAndEnterpriseAgentProvider);
this._register(vscode.chat.registerCustomAgentProvider(orgAndEnterpriseAgentProvider));
}
}
}
Expand Down
Loading