Skip to content

Commit

Permalink
respond to feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
akhera99 committed Sep 20, 2024
1 parent f65aa66 commit f900324
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,7 @@ private async Task SetResultTextAsync(ICopilotCodeAnalysisService copilotService
{
SetResultText(EditorFeaturesResources.Your_organization_excluded_a_referenced_file_from_Copilot);
CurrentState = OnTheFlyDocsState.Finished;
Logger.Log(FunctionId.Copilot_On_The_Fly_Docs_Content_Excluded, KeyValueLogMessage.Create(m =>
{
m["SymbolHeaderText"] = _onTheFlyDocsElement.SymbolSignature;
}, LogLevel.Information));

Logger.Log(FunctionId.Copilot_On_The_Fly_Docs_Content_Excluded, logLevel: LogLevel.Information);
return;

}
Expand Down Expand Up @@ -215,7 +211,6 @@ public void RequestResults()
CurrentState = OnTheFlyDocsState.Loading;
Logger.Log(FunctionId.Copilot_On_The_Fly_Docs_Loading_State_Entered, KeyValueLogMessage.Create(m =>
{
m["SymbolHeaderText"] = _onTheFlyDocsElement.SymbolSignature;
m["HasDocumentationComments"] = _onTheFlyDocsElement.HasComments;
}, LogLevel.Information));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,7 @@ public OnTheFlyDocsViewFactory(IViewElementFactoryService factoryService, IAsync

var editorFeaturesOnTheFlyDocsElement = (EditorFeaturesOnTheFlyDocsElement)model;

Logger.Log(FunctionId.Copilot_On_The_Fly_Docs_Showed_Link, KeyValueLogMessage.Create(m =>
{
m["SymbolHeaderText"] = editorFeaturesOnTheFlyDocsElement.OnTheFlyDocsElement.SymbolSignature;
}, LogLevel.Information));
Logger.Log(FunctionId.Copilot_On_The_Fly_Docs_Showed_Link, logLevel: LogLevel.Information);

var quickInfoSession = _asyncQuickInfoBroker.GetSession(textView);

Expand Down
4 changes: 2 additions & 2 deletions src/Features/Core/Portable/QuickInfo/OnTheFlyDocsElement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ namespace Microsoft.CodeAnalysis.QuickInfo;
/// <param name="declarationCode">the symbol's declaration code</param>
/// <param name="language">the language of the symbol</param>
/// <param name="hasComments">whether the symbol has comments</param>
internal sealed class OnTheFlyDocsElement(string symbolSignature, ImmutableArray<string> declarationCode, string language, bool hasContentExcluded, bool hasComments = false)
internal sealed class OnTheFlyDocsElement(string symbolSignature, ImmutableArray<string> declarationCode, string language, bool isContentExcluded, bool hasComments = false)
{
public string SymbolSignature { get; } = symbolSignature;
public ImmutableArray<string> DeclarationCode { get; } = declarationCode;
public string Language { get; } = language;
public bool IsContentExcluded { get; set; } = hasContentExcluded;
public bool IsContentExcluded { get; set; } = isContentExcluded;

// Added for telemetry collection purposes.
public bool HasComments { get; set; } = hasComments;
Expand Down

0 comments on commit f900324

Please sign in to comment.