Skip to content
Merged
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
8 changes: 7 additions & 1 deletion src/github/copilotRemoteAgent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -556,12 +556,18 @@ export class CopilotRemoteAgentManager extends Disposable {
title = titleMatch[1].trim();
}

const formatBodyPlaceholder = (problemContext: string): string => {
const header = vscode.l10n.t('Coding agent has begun work on **{0}** and will replace this description as work progresses.', title);
const collapsedContext = `<details><summary>${vscode.l10n.t('See problem context')}</summary>\n\n${problemContext}\n\n</details>`;
return `${header}\n\n${collapsedContext}`;
};

const problemStatement: string = `${prompt} ${problemContext ? `: ${problemContext}` : ''}`;
const payload: RemoteAgentJobPayload = {
problem_statement: problemStatement,
pull_request: {
title,
body_placeholder: problemContext,
body_placeholder: formatBodyPlaceholder(problemContext),
base_ref,
body_suffix,
...(hasChanges && { head_ref: ref })
Expand Down