Skip to content
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

[AOT] Clean up some AOT issues in Advanced Paste module #36297

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

moooyo
Copy link
Contributor

@moooyo moooyo commented Dec 11, 2024

Summary of the Pull Request

Clean up some AOT build issue. Currently, we can not build the Advanced Paste module with AOT enabled.

blocker:

  1. We need to upgrade CommunityToolKit.WinUI to the latest preview version. It provide native AOT support. https://github.com/CommunityToolkit/Windows/releases/tag/v8.2.241112-preview1
  2. CommunityToolKit.Mvvm provide more AOT diagnostic info in 8.4.0. But I'm not sure wether it provide Native AOT support for our project. https://github.com/CommunityToolkit/dotnet/releases
  3. ReverseMarkdown does not support Native AOT

PR Checklist

  • Closes: #xxx
  • Communication: I've discussed this with core contributors already. If work hasn't been agreed, this work might be rejected
  • Tests: Added/updated and all pass
  • Localization: All end user facing strings can be localized
  • Dev docs: Added/updated
  • New binaries: Added on the required places
  • Documentation updated: If checked, please file a pull request on our docs repo and link it here: #xxx

Detailed Description of the Pull Request / Additional comments

Validation Steps Performed

@moooyo
Copy link
Contributor Author

moooyo commented Dec 11, 2024

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@moooyo moooyo added the Needs-Review This Pull Request awaits the review of a maintainer. label Dec 11, 2024
@moooyo moooyo marked this pull request as ready for review December 11, 2024 07:39
@jaimecbernardo jaimecbernardo added the Don't merge - Hold for release Hold off on merging this PR, even if it's approved. label Dec 11, 2024
@jaimecbernardo
Copy link
Collaborator

Hi, we've added the "Don't Merge" tag to the PR, since we're trying to keep the repo stable for the release and possible hotfix if necessary. Please don't merge the PR while the tag is still in here. This allows people to review the PR and approve with less fear that it'll get merged 😄

@moooyo
Copy link
Contributor Author

moooyo commented Dec 13, 2024

Hi, we've added the "Don't Merge" tag to the PR, since we're trying to keep the repo stable for the release and possible hotfix if necessary. Please don't merge the PR while the tag is still in here. This allows people to review the PR and approve with less fear that it'll get merged 😄

Thanks! We will wait until release complete

@jaimecbernardo jaimecbernardo removed the Don't merge - Hold for release Hold off on merging this PR, even if it's approved. label Dec 18, 2024

private object message;

public string ToJsonString() => JsonSerializer.Serialize(this, AdvancedPasteJsonSerializerContext.Default.PersistedCache);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
public string ToJsonString() => JsonSerializer.Serialize(this, AdvancedPasteJsonSerializerContext.Default.PersistedCache);
public string ToJsonString() => JsonSerializer.Serialize(this, AdvancedPasteJsonSerializerContext.Default.LogEvent);

Also, I believe the LogEvent class should be more defined.

Since we know telemetryEvent.CacheUsed, telemetryEvent.IsSavedQuery, telemetryEvent.PromptTokens, telemetryEvent.CompletionTokens, telemetryEvent.ModelName, telemetryEvent.ActionChain are the properties passed into the anonymous object, defining them in the class will make it cleaner and less prone to potential issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
In for .88 Needs-Review This Pull Request awaits the review of a maintainer.
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

4 participants