Skip to content

Sort custom prompt list by recency #656

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

Merged
merged 8 commits into from
Sep 23, 2024
Merged

Conversation

Emt-lin
Copy link
Collaborator

@Emt-lin Emt-lin commented Sep 19, 2024

see: #638

// Clean up promptUsageTimestamps
this.usageStrategy?.removeUnusedPrompts(prompts.map((prompt) => prompt.title)).save();

console.log(this.settings.promptUsageTimestamps);
Copy link
Owner

Choose a reason for hiding this comment

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

We can remove this.

@@ -0,0 +1,53 @@
import { CopilotSettings } from "@/settings/SettingsPage";
Copy link
Owner

@logancyang logancyang Sep 23, 2024

Choose a reason for hiding this comment

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

Nit: For consistency can we name this file promptUsageStrategy.ts without the capitalization.

@logancyang
Copy link
Owner

@Emt-lin Thank you so much for the PR! Generally lgtm, just some nits.

Btw, you can use git rebase master in the future, no need to merge and create a new commit.

@logancyang
Copy link
Owner

Merging now and will address the nits myself in the next PR.

@logancyang logancyang merged commit 16e191e into logancyang:master Sep 23, 2024
2 checks passed
@Emt-lin
Copy link
Collaborator Author

Emt-lin commented Sep 23, 2024

@Emt-lin Thank you so much for the PR! Generally lgtm, just some nits.

Btw, you can use git rebase master in the future, no need to merge and create a new commit.

ok, Thank you for the reminder.

@logancyang logancyang mentioned this pull request Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants