-
Notifications
You must be signed in to change notification settings - Fork 2.8k
fix: auto-migrate v1 condensing prompt and handle invalid providers on import #10931
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
+819
−16
Conversation
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
…n import - Add migration to detect and clear old v1 default condensing prompt from customSupportPrompts.CONDENSE using fingerprinting, allowing users to automatically receive the improved v2 default - Implement lenient settings import that sanitizes invalid/removed apiProvider values instead of failing the entire import - Validate each provider profile individually, collecting warnings for issues while preserving valid profiles - Show warning notifications when import succeeds with issues - Add default URI to import file picker (last export path or Downloads folder) - Add comprehensive tests for both migrations and import edge cases
Contributor
Review status: The remaining edge cases are addressed; no further changes requested.
Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues. |
- Add currentApiConfigName fallback when imported current profile was skipped
- If the imported currentApiConfigName profile is invalid/skipped, fall back to
the first valid imported profile
- Add warning message when fallback occurs
- Improve warning notification UX for settings import
- Show short summary in toast (e.g., '2 profiles had issues during import.')
- Log full warning details to Developer Tools console
- Reference console in the toast message for users who need full details
- Add comprehensive tests for the new fallback and notification behavior
mrubens
approved these changes
Jan 24, 2026
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.
Summary
This PR introduces two improvements to configuration handling:
Auto-migration of old v1 default condensing prompt - Detects and clears the old v1 default condensing prompt from
customSupportPrompts.CONDENSEusing fingerprinting, allowing users to automatically receive the improved v2 default (which includes analysis tags, error tracking, and better task continuity).Lenient settings import with invalid provider handling - The settings import system now gracefully handles invalid or removed API providers instead of failing the entire import.
Changes
migrateOldDefaultCondensingPrompt()migration that runs onContextProxyinitializationisOldV1DefaultCondensePrompt()fingerprinting function to detect v1 default without exact matchingsanitizeProviderConfig()to strip invalid/removedapiProvidervalues from imported profilesproviderSettingsWithIdSchema.safeParse()showWarningMessagenotification when import succeeds with warningsImportant
This PR auto-migrates old v1 condensing prompts and handles invalid providers during import, enhancing configuration handling and user experience.
ContextProxy.tsusingmigrateOldDefaultCondensingPrompt().importExport.tsusingsanitizeProviderConfig().isOldV1DefaultCondensePrompt()inContextProxy.tsfor prompt detection.importSettingsFromPath()inimportExport.tsfor lenient import handling.ContextProxy.spec.ts.importExport.spec.ts.This description was created by
for cf9f809. You can customize this summary. It will automatically update as commits are pushed.