Add Leonid Horny control, /ostyn cool-down, and /horny-game.

Second persona slider (0-100%) auto-rendered from controls schema; cool-down drops 30 points; horny-game lets the model patch horny from taste match. Fix partial control saves to DeepMerge.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Leonid Pershin
2026-08-22 02:33:22 +03:00
co-authored by Cursor
parent 26e4ef76fb
commit fee3eb8965
9 changed files with 143 additions and 17 deletions
+15 -5
View File
@@ -412,12 +412,13 @@ public sealed class AssistentConfig
{
string id = SafeId(personaId) ?? "neutral";
JObject schema = LoadControlsSchema(id);
JObject clamped = ClampControls(schema, values ?? new JObject());
string dir = Path.Combine(_overlayRoot, "personas", id);
Directory.CreateDirectory(dir);
string path = Path.Combine(dir, "exact.json");
JObject existing = TryReadJson(path) ?? new JObject();
existing["controls"] = clamped;
JObject prev = existing["controls"] as JObject ?? new JObject();
JObject clamped = ClampControls(schema, values ?? new JObject());
existing["controls"] = DeepMerge(prev, clamped);
File.WriteAllText(path, existing.ToString(Newtonsoft.Json.Formatting.Indented) + "\n", Encoding.UTF8);
return LoadControlValues(id);
}
@@ -475,8 +476,13 @@ public sealed class AssistentConfig
}
JObject values = LoadControlValues(id);
StringBuilder sb = new();
sb.AppendLine("### Controls (Exact — current values; user/UI/model may change)");
foreach (JProperty prop in schema.Properties())
sb.AppendLine("### Controls (Exact — current values; user/UI/model may change via patch.controls)");
sb.AppendLine("Any slider declared in this persona's controls.json appears in the UI automatically. Respect current numbers.");
foreach (JProperty prop in schema.Properties().OrderBy(p =>
{
double order = (p.Value as JObject)?["order"]?.Value<double?>() ?? 100;
return order;
}).ThenBy(p => p.Name, StringComparer.OrdinalIgnoreCase))
{
if (prop.Value is not JObject def)
{
@@ -493,7 +499,11 @@ public sealed class AssistentConfig
double cur = values[prop.Name]?.Value<double?>() ?? defVal;
string label = def["label"]?.ToString() ?? prop.Name;
string hint = def["hint"]?.ToString() ?? "";
sb.AppendLine($"- **{prop.Name}** ({label}): {cur.ToString("0.##", System.Globalization.CultureInfo.InvariantCulture)} (range {min}…{max})");
string display = def["display"]?.ToString() ?? "";
string curText = string.Equals(display, "percent", StringComparison.OrdinalIgnoreCase)
? $"{cur.ToString("0.#", System.Globalization.CultureInfo.InvariantCulture)}%"
: cur.ToString("0.##", System.Globalization.CultureInfo.InvariantCulture);
sb.AppendLine($"- **{prop.Name}** ({label}): {curText} (range {min}…{max})");
if (!string.IsNullOrWhiteSpace(hint))
{
sb.AppendLine($" - {hint}");