fix(prompts): stop on-disk prompt overrides from freezing forever
EnsureExists blindly seeded ~/.todo-app/prompts/*.md with the bundled default and never revisited it, so any file created by opening the Files settings tab shadowed every later default change permanently (SuggestImprovement/AskUser sections never reached real runs since 2026-06-04). PromptFiles now hashes what a file was seeded/saved with in prompts/.defaults.json: Classify() tells missing/current-default/ known-past-default/edited apart, ReconcileStaleDefaults() drops files that only ever matched a superseded default, and real edits are left alone and surfaced in the Files tab with a diff + reset-to-default action. QuarantineOrphans() moves stale-named leftovers (agent.md, planning.md) into prompts/_orphans instead of silently deleting them. Wired as a Worker startup sweep (PromptFileRecovery) alongside the existing OrphanRecovery/AttachmentOrphanRecovery services.
This commit is contained in:
@@ -63,6 +63,7 @@ builder.Services.AddSingleton<AttachmentStore>();
|
||||
builder.Services.AddHostedService<StaleTaskRecovery>();
|
||||
builder.Services.AddHostedService<OrphanRecovery>();
|
||||
builder.Services.AddHostedService<AttachmentOrphanRecovery>();
|
||||
builder.Services.AddHostedService<PromptFileRecovery>();
|
||||
builder.Services.AddSignalR().AddJsonProtocol(options =>
|
||||
{
|
||||
options.PayloadSerializerOptions.Converters.Add(new System.Text.Json.Serialization.JsonStringEnumConverter());
|
||||
|
||||
Reference in New Issue
Block a user