fix(#1173): correct skill_manage result rendering (#1177)

This commit is contained in:
M57 authored and GitHub committed 2026-09-17 18:36:27 +03:00
1 parent e0688535dd
commit a567c91132
2 files changed
+75 -6

No files matched your search

@@ -105,14 +105,12 @@ internal object SkillManageRenderer : ToolRenderer {
val msg = ToolJson.firstString(call.result, listOf("message"))
val failed = ToolJson.boolFalse(call.result?.get("success"))
val succeeded = ToolJson.boolTrue(call.result?.get("success"))
// Pinned quirk from the original engine: the branch order is inverted
// (a non-false `success` renders the failure line). Preserved verbatim
// by the characterization suite; fix upstream deliberately if desired.
return when {
!failed -> "❌ Skill operation failed"
msg.isNotEmpty() -> "✅ $msg"
else -> "✅ Skill operation done"
failed -> "❌ ${msg.ifEmpty { "Skill operation failed" }}"
succeeded -> "✅ ${msg.ifEmpty { "Skill operation done" }}"
else -> "❌ ${msg.ifEmpty { "Skill operation failed" }}"
}
}
}