zc
This commit is contained in:
Binary file not shown.
@@ -1145,6 +1145,10 @@ You are 'The Legion', a super AI of the Wula Empire. Your personality is authori
|
|||||||
for (int i = 0; i < _history.Count; i++)
|
for (int i = 0; i < _history.Count; i++)
|
||||||
{
|
{
|
||||||
var entry = _history[i];
|
var entry = _history[i];
|
||||||
|
if (string.Equals(entry.role, "toolcall", StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if (string.Equals(entry.role, "tool", StringComparison.OrdinalIgnoreCase))
|
if (string.Equals(entry.role, "tool", StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
if (lastUserIndex != -1 && i > lastUserIndex)
|
if (lastUserIndex != -1 && i > lastUserIndex)
|
||||||
@@ -1160,8 +1164,12 @@ You are 'The Legion', a super AI of the Wula Empire. Your personality is authori
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Revert UI filtering: Add assistant messages directly without stripping tool call JSON for history context
|
string cleaned = StripToolCallJson(entry.message)?.Trim() ?? "";
|
||||||
filtered.Add(entry);
|
if (string.IsNullOrWhiteSpace(cleaned))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
filtered.Add((entry.role, cleaned));
|
||||||
}
|
}
|
||||||
|
|
||||||
return filtered;
|
return filtered;
|
||||||
|
|||||||
@@ -627,10 +627,6 @@ namespace WulaFallenEmpire.EventSystem.AI.UI
|
|||||||
|
|
||||||
float padding = 8f;
|
float padding = 8f;
|
||||||
Rect headerRect = new Rect(rect.x, rect.y, rect.width, traceEntry.traceHeaderHeight);
|
Rect headerRect = new Rect(rect.x, rect.y, rect.width, traceEntry.traceHeaderHeight);
|
||||||
GUI.color = new Color(0.15f, 0.15f, 0.15f, 0.8f);
|
|
||||||
Widgets.DrawBoxSolid(headerRect, GUI.color);
|
|
||||||
GUI.color = Color.white;
|
|
||||||
|
|
||||||
Text.Font = GameFont.Tiny;
|
Text.Font = GameFont.Tiny;
|
||||||
Text.Anchor = TextAnchor.MiddleLeft;
|
Text.Anchor = TextAnchor.MiddleLeft;
|
||||||
string headerLine = $"{(traceEntry.traceExpanded ? "v" : ">")} {traceEntry.traceHeader}";
|
string headerLine = $"{(traceEntry.traceExpanded ? "v" : ">")} {traceEntry.traceHeader}";
|
||||||
@@ -646,11 +642,6 @@ namespace WulaFallenEmpire.EventSystem.AI.UI
|
|||||||
|
|
||||||
if (traceEntry.traceExpanded && traceEntry.traceLines != null && traceEntry.traceLines.Count > 0)
|
if (traceEntry.traceExpanded && traceEntry.traceLines != null && traceEntry.traceLines.Count > 0)
|
||||||
{
|
{
|
||||||
Rect bodyRect = new Rect(rect.x, headerRect.yMax, rect.width, rect.height - traceEntry.traceHeaderHeight);
|
|
||||||
GUI.color = new Color(0.12f, 0.12f, 0.12f, 0.45f);
|
|
||||||
Widgets.DrawBoxSolid(bodyRect, GUI.color);
|
|
||||||
GUI.color = Color.white;
|
|
||||||
|
|
||||||
float y = headerRect.yMax + 6f;
|
float y = headerRect.yMax + 6f;
|
||||||
foreach (string line in traceEntry.traceLines)
|
foreach (string line in traceEntry.traceLines)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -673,10 +673,6 @@ namespace WulaFallenEmpire.EventSystem.AI.UI
|
|||||||
|
|
||||||
float padding = 8f;
|
float padding = 8f;
|
||||||
Rect headerRect = new Rect(rect.x, rect.y, rect.width, traceEntry.traceHeaderHeight);
|
Rect headerRect = new Rect(rect.x, rect.y, rect.width, traceEntry.traceHeaderHeight);
|
||||||
GUI.color = new Color(0.12f, 0.12f, 0.12f, 0.8f);
|
|
||||||
Widgets.DrawBoxSolid(headerRect, GUI.color);
|
|
||||||
GUI.color = Color.white;
|
|
||||||
|
|
||||||
Text.Font = GameFont.Tiny;
|
Text.Font = GameFont.Tiny;
|
||||||
Text.Anchor = TextAnchor.MiddleLeft;
|
Text.Anchor = TextAnchor.MiddleLeft;
|
||||||
string headerLine = $"{(traceEntry.traceExpanded ? "v" : ">")} {traceEntry.traceHeader}";
|
string headerLine = $"{(traceEntry.traceExpanded ? "v" : ">")} {traceEntry.traceHeader}";
|
||||||
@@ -692,11 +688,6 @@ namespace WulaFallenEmpire.EventSystem.AI.UI
|
|||||||
|
|
||||||
if (traceEntry.traceExpanded && traceEntry.traceLines != null && traceEntry.traceLines.Count > 0)
|
if (traceEntry.traceExpanded && traceEntry.traceLines != null && traceEntry.traceLines.Count > 0)
|
||||||
{
|
{
|
||||||
Rect bodyRect = new Rect(rect.x, headerRect.yMax, rect.width, rect.height - traceEntry.traceHeaderHeight);
|
|
||||||
GUI.color = new Color(0.1f, 0.1f, 0.1f, 0.45f);
|
|
||||||
Widgets.DrawBoxSolid(bodyRect, GUI.color);
|
|
||||||
GUI.color = Color.white;
|
|
||||||
|
|
||||||
float y = headerRect.yMax + 6f;
|
float y = headerRect.yMax + 6f;
|
||||||
foreach (string line in traceEntry.traceLines)
|
foreach (string line in traceEntry.traceLines)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user