Ship Assistent 0.10.18: settings as a peer tab, stream/VRAM chat fixes.

Move settings beside Chat/Cards; stop fence ramble, sticky scroll, horny echo filter, and force-warm after Generate.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Leonid Pershin
2026-08-22 04:12:53 +03:00
co-authored by Cursor
parent 43984208fc
commit 536637714c
11 changed files with 490 additions and 163 deletions
+45
View File
@@ -106,6 +106,51 @@ public partial class SwarmAssistentExtension
return null;
}
/// <summary>
/// If the reply already contains a closed fenced patch/card, cut everything after it.
/// Models often keep writing («Готово!», second aspect, …) and the stream never feels done.
/// </summary>
static bool TryTruncateAtCompleteFence(string reply, out string truncated)
{
truncated = reply ?? "";
if (string.IsNullOrWhiteSpace(reply))
{
return false;
}
MatchCollection matches = JsonFenceRe.Matches(reply);
if (matches.Count == 0)
{
return false;
}
for (int i = 0; i < matches.Count; i++)
{
Match match = matches[i];
string raw = match.Groups[1].Value.Trim();
try
{
JObject obj = JObject.Parse(raw);
if (obj is null)
{
continue;
}
bool usable = LooksLikeCardObject(obj)
|| Array.Exists(PatchKeys, k => obj[k] is not null);
if (!usable)
{
continue;
}
truncated = reply.Substring(0, match.Index + match.Length).TrimEnd();
// Only treat as complete if the fence actually closed (regex requires ```).
return true;
}
catch
{
// incomplete / invalid json inside fence
}
}
return false;
}
static string ExtractSearchQuery(JObject patch)
{
if (patch is null)