Ship Assistent 0.11.9: esbuild bundle and patch-keys manifest.
Replace split Assets JS with a built bundle and aligned C#/config so SwarmUI loads one script and patch apply stays consistent; drop legacy terse persona and memory seed. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -10,8 +10,6 @@ namespace Mrleo1nid.SwarmAssistent;
|
||||
/// <summary>Facts about the human at the desk — global + per-persona, separate from craft RAG.</summary>
|
||||
public sealed partial class AssistentMemory
|
||||
{
|
||||
const string MetaTasteMigrated = "user_prefs_taste_migrated";
|
||||
|
||||
void EnsureUserPrefsSchema()
|
||||
{
|
||||
Exec(
|
||||
@@ -29,53 +27,6 @@ public sealed partial class AssistentMemory
|
||||
);
|
||||
CREATE INDEX IF NOT EXISTS idx_user_prefs_scope ON user_prefs(scope, persona_id);
|
||||
""");
|
||||
MigrateTasteToUserPrefsOnce();
|
||||
}
|
||||
|
||||
void MigrateTasteToUserPrefsOnce()
|
||||
{
|
||||
if (GetMeta(MetaTasteMigrated) == "1")
|
||||
{
|
||||
return;
|
||||
}
|
||||
try
|
||||
{
|
||||
JObject taste = GetKvObject(KvTaste);
|
||||
if (taste is not null && taste.Count > 0)
|
||||
{
|
||||
long now = DateTimeOffset.UtcNow.ToUnixTimeSeconds();
|
||||
void AddList(string prefix, JToken arr)
|
||||
{
|
||||
if (arr is not JArray a)
|
||||
{
|
||||
return;
|
||||
}
|
||||
int i = 0;
|
||||
foreach (JToken t in a)
|
||||
{
|
||||
string text = (t?.ToString() ?? "").Trim();
|
||||
if (string.IsNullOrWhiteSpace(text))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
UpsertUserPrefUnlocked($"{prefix}_{i++}", text, "global", "", "migrated_taste", pinned: false, now);
|
||||
}
|
||||
}
|
||||
AddList("like", taste["likes"]);
|
||||
AddList("avoid", taste["avoid"]);
|
||||
AddList("style", taste["styles"]);
|
||||
string notes = (taste["notes"]?.ToString() ?? "").Trim();
|
||||
if (!string.IsNullOrWhiteSpace(notes))
|
||||
{
|
||||
UpsertUserPrefUnlocked("notes", notes, "global", "", "migrated_taste", pinned: false, now);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logs.Debug($"AssistentMemory taste→user_prefs: {ex.Message}");
|
||||
}
|
||||
SetMeta(MetaTasteMigrated, "1");
|
||||
}
|
||||
|
||||
static string NormalizePrefScope(string scope)
|
||||
|
||||
Reference in New Issue
Block a user