On-the-fly-docs -- Add quota exceeded dialogue#76877
Merged
akhera99 merged 7 commits intodotnet:mainfrom Jan 23, 2025
Merged
Conversation
| Task<ImmutableArray<Diagnostic>> GetCachedDiagnosticsAsync(Document document, string promptTitle, CancellationToken cancellationToken); | ||
| Task StartRefinementSessionAsync(Document oldDocument, Document newDocument, Diagnostic? primaryDiagnostic, CancellationToken cancellationToken); | ||
| Task<string> GetOnTheFlyDocsAsync(string symbolSignature, ImmutableArray<string> declarationCode, string language, CancellationToken cancellationToken); | ||
| Task<(string ResponseString, int ResponseStatus)> GetOnTheFlyDocsAsync(string symbolSignature, ImmutableArray<string> declarationCode, string language, CancellationToken cancellationToken); |
Contributor
There was a problem hiding this comment.
Suggested change
| Task<(string ResponseString, int ResponseStatus)> GetOnTheFlyDocsAsync(string symbolSignature, ImmutableArray<string> declarationCode, string language, CancellationToken cancellationToken); | |
| Task<(string responseString, int responseStatus)> GetOnTheFlyDocsAsync(string symbolSignature, ImmutableArray<string> declarationCode, string language, CancellationToken cancellationToken); |
Note: we recommmend not using tuples for apis shared among teams. define a real type that can be passed around.
also: is there a binary breaking change concern here?
Comment on lines
+146
to
+147
| ClassifiedTextElement.TextClassificationTypeName, | ||
| quotaExceededMatch.Groups[1].Value), |
Contributor
There was a problem hiding this comment.
Suggested change
| ClassifiedTextElement.TextClassificationTypeName, | |
| quotaExceededMatch.Groups[1].Value), | |
| ClassifiedTextElement.TextClassificationTypeName, | |
| quotaExceededMatch.Groups[1].Value), |
| cancellationToken.ThrowIfCancellationRequested(); | ||
|
|
||
| if (response is null || response.Length == 0) | ||
| if (responseString is null || responseString.Length == 0) |
Contributor
There was a problem hiding this comment.
Suggested change
| if (responseString is null || responseString.Length == 0) | |
| if (string.IsNullOrEmpty(responseString)) |
Comment on lines
+304
to
+309
| var elements = new List<object> | ||
| { | ||
| new ContainerElement(ContainerElementStyle.Wrapped, new ClassifiedTextElement(this.quotaExceededContent)) | ||
| }; | ||
|
|
||
| _responseControl.Content = ToUIElement(new ContainerElement(ContainerElementStyle.Stacked, elements)); |
Contributor
There was a problem hiding this comment.
Suggested change
| var elements = new List<object> | |
| { | |
| new ContainerElement(ContainerElementStyle.Wrapped, new ClassifiedTextElement(this.quotaExceededContent)) | |
| }; | |
| _responseControl.Content = ToUIElement(new ContainerElement(ContainerElementStyle.Stacked, elements)); | |
| _responseControl.Content = ToUIElement( | |
| new ContainerElement(ContainerElementStyle.Stacked, | |
| [new ContainerElement(ContainerElementStyle.Wrapped, new ClassifiedTextElement(this.quotaExceededContent))])); |
CyrusNajmabadi
approved these changes
Jan 23, 2025
akhera99
added a commit
to akhera99/roslyn
that referenced
this pull request
Jan 23, 2025
* wip * wip * revert * comments * pr feedback * pr feedback * pr feedback
akhera99
added a commit
that referenced
this pull request
Jan 25, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updates
OnTheFlyDocsView.xaml.vsto handle and display quota exceeded messages.Updates
ICopilotCodeAnalysisServiceto retrieve the status of the response from Copilot.