Ship Assistent 0.13.1: compile 0.13.0 so the SwarmUI tab loads.
Add missing WebSocket/HttpClient usings, stop using static on Config/FilePath helpers, and copy Microsoft.Data.Sqlite next to the extension dll. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -137,7 +137,7 @@ public partial class SwarmAssistentExtension
|
||||
string cacheKey = $"hf:{datasetId}";
|
||||
if (useCache)
|
||||
{
|
||||
JObject cached = Memory.GetKvObject(KvHfDatasetCache)?[cacheKey] as JObject;
|
||||
JObject cached = Memory.GetKvObject(AssistentMemory.KvHfDatasetCache)?[cacheKey] as JObject;
|
||||
if (cached is not null && cached["checked_at"]?.Value<long?>() > DateTimeOffset.UtcNow.AddHours(-6).ToUnixTimeMilliseconds())
|
||||
{
|
||||
return cached;
|
||||
@@ -302,9 +302,9 @@ public partial class SwarmAssistentExtension
|
||||
result["checked_at"] = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds();
|
||||
try
|
||||
{
|
||||
JObject bag = Memory.GetKvObject(KvHfDatasetCache) ?? new JObject();
|
||||
JObject bag = Memory.GetKvObject(AssistentMemory.KvHfDatasetCache) ?? new JObject();
|
||||
bag[cacheKey] = result;
|
||||
Memory.SetKvObject(KvHfDatasetCache, bag);
|
||||
Memory.SetKvObject(AssistentMemory.KvHfDatasetCache, bag);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user