Skip to content

Commit 5e87b97

Browse files
authored
format coding agent pr description (#7352)
1 parent f5c4af7 commit 5e87b97

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/github/copilotRemoteAgent.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -556,12 +556,18 @@ export class CopilotRemoteAgentManager extends Disposable {
556556
title = titleMatch[1].trim();
557557
}
558558

559+
const formatBodyPlaceholder = (problemContext: string): string => {
560+
const header = vscode.l10n.t('Coding agent has begun work on **{0}** and will replace this description as work progresses.', title);
561+
const collapsedContext = `<details><summary>${vscode.l10n.t('See problem context')}</summary>\n\n${problemContext}\n\n</details>`;
562+
return `${header}\n\n${collapsedContext}`;
563+
};
564+
559565
const problemStatement: string = `${prompt} ${problemContext ? `: ${problemContext}` : ''}`;
560566
const payload: RemoteAgentJobPayload = {
561567
problem_statement: problemStatement,
562568
pull_request: {
563569
title,
564-
body_placeholder: problemContext,
570+
body_placeholder: formatBodyPlaceholder(problemContext),
565571
base_ref,
566572
body_suffix,
567573
...(hasChanges && { head_ref: ref })

0 commit comments

Comments
 (0)