-
Notifications
You must be signed in to change notification settings - Fork 3.8k
fix(attachments): model egress attachments #6312
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -395,11 +395,16 @@ export async function buildCopilotRequestPayload( | |
| content: lines.join('\n'), | ||
| }) | ||
| } catch (err) { | ||
| const cause = toError(err) | ||
| logger.warn('Failed to track chat upload', { | ||
| filename, | ||
| chatId, | ||
| error: toError(err).message, | ||
| error: cause.message, | ||
| }) | ||
| throw new Error( | ||
| `Failed to prepare attached file "${filename}" for Copilot. Please try again.`, | ||
| { cause } | ||
| ) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Prepare failure leaves chat incompleteMedium Severity When Reviewed by Cursor Bugbot for commit e698b10. Configure here. |
||
| } | ||
| } | ||
| } | ||
|
|
||


There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When
trackChatUploadrejects, this new exception aborts the request after persistence of the user message has already begun, causing the client to receive an HTTP 500 while the chat retains a user turn with no assistant response; retrying can then create duplicate user turns.