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 @@ -389,6 +389,12 @@ export class OrganizationAndEnterpriseAgentProvider extends Disposable implement
if (agent.target) {
frontmatterObj.target = agent.target;
}
if (agent.model) {
frontmatterObj.model = agent.model;
}
if (agent.infer) {
frontmatterObj.infer = agent.infer;
}

const frontmatter = YAML.stringify(frontmatterObj, { lineWidth: 0 }).trim();
const body = agent.prompt ?? '';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,8 @@ Test prompt content`;
const mockDetails: CustomAgentDetails = {
...mockAgent,
prompt: 'Detailed prompt content',
model: 'gpt-4',
infer: true,
};
mockOctoKitService.setAgentDetails('full_agent', mockDetails);

Expand All @@ -246,6 +248,8 @@ tools:
- tool2
argument-hint: Provide context
target: vscode
model: gpt-4
infer: true
---
Detailed prompt content
`;
Expand Down Expand Up @@ -650,6 +654,8 @@ Agent 1 prompt`;
assert.ok(!content.includes('tools:'));
assert.ok(!content.includes('argument-hint:'));
assert.ok(!content.includes('target:'));
assert.ok(!content.includes('model:'));
assert.ok(!content.includes('infer:'));
});

test('excludes tools field when array contains only wildcard', async () => {
Expand Down
2 changes: 2 additions & 0 deletions src/platform/github/common/githubService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@ export interface CustomAgentListItem {
metadata?: Record<string, string>;
target?: string;
config_error?: string;
model?: string;
infer?: boolean;
'mcp-servers'?: {
[serverName: string]: {
type: string;
Expand Down