Ship Assistent 0.10.21: slider/remember guards and Generate spinner fix.

Strip controls from Generate patches, skip Auto-Gen on remember turns, clear board spinner when Swarm finishes.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Leonid Pershin
2026-08-22 04:38:45 +03:00
co-authored by Cursor
parent 536637714c
commit 036484c7b7
7 changed files with 195 additions and 40 deletions
+18 -11
View File
@@ -1003,23 +1003,30 @@ public partial class SwarmAssistentExtension
patch["_persona_written"] = target;
}
}
// Control values from model patch (Exact). Ignore default-echo inside Generate patches.
// Control values from model patch (Exact). Generate patches never touch sliders.
if (patch["controls"] is JObject ctrlVals)
{
string ctrlPid = AssistentConfig.SafeId(patch["persona"]?.ToString()) ?? personaId;
JObject schema = Config.LoadControlsSchema(ctrlPid);
JObject current = Config.LoadControlValues(ctrlPid);
JObject filtered = AssistentConfig.FilterEchoedControlDefaults(
schema, current, ctrlVals, AssistentConfig.PatchLooksLikeGeneration(patch));
if (filtered.Count > 0)
if (AssistentConfig.PatchLooksLikeGeneration(patch))
{
Config.SaveControlValues(ctrlPid, filtered);
patch["controls"] = filtered;
patch["_controls_saved"] = true;
patch.Remove("controls");
}
else
{
patch.Remove("controls");
string ctrlPid = AssistentConfig.SafeId(patch["persona"]?.ToString()) ?? personaId;
JObject schema = Config.LoadControlsSchema(ctrlPid);
JObject current = Config.LoadControlValues(ctrlPid);
JObject filtered = AssistentConfig.FilterEchoedControlDefaults(
schema, current, ctrlVals, patchLooksLikeGen: false);
if (filtered.Count > 0)
{
Config.SaveControlValues(ctrlPid, filtered);
patch["controls"] = filtered;
patch["_controls_saved"] = true;
}
else
{
patch.Remove("controls");
}
}
}
}