Ship Assistent 0.14.0: chat sessions, ask-only hops, and context compression.

Per-chat Generate session with sparse deltas; drop Cards/Civitai/wanted hops; rolling history summary via the same Ollama model with a budget chip and /compress.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Leonid Pershin
2026-08-23 06:19:04 +03:00
co-authored by Cursor
parent d29436c944
commit 9ac24a828b
35 changed files with 5640 additions and 5652 deletions
+1 -43
View File
@@ -1,8 +1,6 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json.Linq;
using SwarmUI.Accounts;
@@ -10,7 +8,7 @@ using SwarmUI.Utils;
namespace Mrleo1nid.SwarmAssistent;
/// <summary>Read/write routes for the vector memory list in ⚙ and the gpu-rent wanted queue badge.</summary>
/// <summary>Read/write routes for the vector memory list in ⚙.</summary>
public partial class SwarmAssistentExtension
{
/// <summary>Embed model the UI should use: settings overlay wins, then persona assistant.json.</summary>
@@ -274,44 +272,4 @@ public partial class SwarmAssistentExtension
return new JObject { ["error"] = $"memory clear: {ex.Message}" };
}
}
/// <summary>The gpu-rent wanted queue (models pending the next <c>up</c>) — count + entries.</summary>
public async Task<JObject> AssistentListWanted(Session session)
{
await Task.CompletedTask;
string path = WantedModelsPath();
JArray items = [];
if (!File.Exists(path))
{
return new JObject { ["success"] = true, ["count"] = 0, ["items"] = items, ["path"] = path };
}
try
{
Dictionary<string, List<WantedEntry>> sections = LoadWantedYaml(File.ReadAllText(path, Encoding.UTF8));
foreach ((string kind, List<WantedEntry> list) in sections.OrderBy(p => p.Key, StringComparer.OrdinalIgnoreCase))
{
foreach (WantedEntry entry in list)
{
items.Add(new JObject
{
["kind"] = kind,
["url"] = entry.Url,
["title"] = entry.Title,
["version_id"] = entry.VersionId,
});
}
}
return new JObject
{
["success"] = true,
["count"] = items.Count,
["items"] = items,
["path"] = path,
};
}
catch (Exception ex)
{
return new JObject { ["error"] = $"wanted queue: {ex.Message}" };
}
}
}