Draft
Fix file associations lost when restoring prompts with conflict resolution#7
Conversation
Co-authored-by: SegaraRai <29276700+SegaraRai@users.noreply.github.com>
Co-authored-by: SegaraRai <29276700+SegaraRai@users.noreply.github.com>
Co-authored-by: SegaraRai <29276700+SegaraRai@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] File associations are lost when restoring prompts
Fix file associations lost when restoring prompts with conflict resolution
Jul 24, 2025
Owner
|
@copilot
|
Author
I'll implement these changes:
Starting implementation now. Warning Firewall rules blocked me from connecting to one or more addressesI tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Co-authored-by: SegaraRai <29276700+SegaraRai@users.noreply.github.com>
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.
Problem
When restoring prompts that were linked to files, the system would load the current file content instead of preserving the original prompt that was saved. This caused data loss when files were modified after the prompt was saved, and there was no way for users to choose between the original saved content and the current file content.
Solution
This PR implements a comprehensive conflict resolution system for file restoration:
1. Enhanced Embedding Format
Added a new
FILE_DATA:format that preserves original content even for linked files:2. Conflict Detection
The system now automatically detects when saved content differs from current file content:
3. User Choice Dialog
When conflicts are detected, users get a clear dialog with two options:
4. Robust Edge Case Handling
Key Features
encodeOriginalForLinkedFilessetting (defaults totrue)Example Usage
This implementation ensures that file associations are properly preserved and users never lose their original prompt content, while providing clear choices when conflicts arise.
Fixes #2.
Warning
Firewall rules blocked me from connecting to one or more addresses
I tried to connect to the following addresses, but was blocked by firewall rules:
cdn.jsdelivr.netnode (vitest)(dns block)node /home/REDACTED/work/ComfyUI-Prompt-Studio/ComfyUI-Prompt-Studio/node_modules/.bin/vite build(dns block)eu.posthog.comnode (vitest)(dns block)node /home/REDACTED/work/ComfyUI-Prompt-Studio/ComfyUI-Prompt-Studio/node_modules/.bin/vite build(dns block)If you need me to access, download, or install something from one of these locations, you can either:
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.