Repository navigation
Investigation only: VS Code's Agent Host drops GitHub issues attached from the "+" menu (no changes in this repo) - #9146
Draft
Alex Ross (alexr00) with Copilot wants to merge 1 commit into
Draft
Alex Ross (alexr00) with Copilot wants to merge 1 commit into
Alex Ross (alexr00) with Copilot wants to merge 1 commit into
A GitHub issue attached from + → GitHub Issues... shows up as a chip in chat, but the model never gets its content. The model only sees other context, such as the open file (
view.jsin the report). The reporter says it works when the issue is open in its own editor tab.This PR has no code changes. The extension produces the issue content correctly; VS Code drops it before the request reaches the model, so the fix has to go into microsoft/vscode.
Root cause
IssueContextProvider.resolveAttachChatContextfillsvaluewith JSON containing the title, body and comments. The chip only appears after this succeeds.ChatContextService._asPicker → asAttachment(chatContextService.ts, release/1.143 lines 243–250) does this for every chat context provider. The extension can't choose a different kind.agentHostSessionHandler._convertVariableToAttachment(release/1.143 lines 7426–7432;mainlines 8064–8070) only passes a generic attachment on if it carries_meta['copilot.attachmentDetail']. Anything else returnsundefined.kind: 'string'(chatImplicitContext.tslines 550–556). The Agent Host passes those on (line 7423).ChatPromptReference.toand is shown to the model as an<attachment>. This rules out a bug in the extension.Suggested fix (microsoft/vscode)
Pass generic attachments with a text value through as simple attachments:
Agent Host skill and command completions are also generic attachments, but their
valueis an object ({ $mid: 'agentHostCompletion', ... }), so this check leaves them alone. Another option is to haveasAttachmentcreatekind: 'string'attachments. That requires fillinguriandhandle, so it's a bigger change.Workaround
Open the issue in its editor tab before sending the request.