fix(tool): satisfy ktlint formatting

This commit is contained in:
Hy4ri committed 2026-09-10 22:48:43 +03:00
1 parent 91566dfdd7
commit 10f7e9fa3c
4 files changed
+14 -3

No files matched your search

@@ -39,7 +39,12 @@ internal object FactStoreRenderer : ToolRenderer {
override fun subtitle(call: ToolCall): String {
val args = call.args
val result = call.result
val action = ToolJson.firstString(args, listOf("action")).ifEmpty { ToolJson.firstString(result, listOf("action")) }
val action =
ToolJson
.firstString(
args,
listOf("action"),
).ifEmpty { ToolJson.firstString(result, listOf("action")) }
val entity = ToolJson.firstString(args, listOf("entity"))
val query = ToolJson.firstString(args, listOf("query"))
val facts = facts(call)
@@ -75,7 +75,9 @@ internal object TerminalRenderer : ToolRenderer {
return when {
output.isNotEmpty() -> output
call.name == "execute_code" -> ToolJson.fallbackDetailText(call.rawArgs, call.rawResult)
// A terminal row with no output already shows its command in the
// title; the generic fallback would repeat it.
else -> ""
@@ -44,7 +44,10 @@ internal object WebSearchRenderer : ToolRenderer {
SearchHit(
title = ToolJson.cleanVisibleText(ToolJson.firstString(r, listOf("title", "name"))),
url = ToolJson.firstString(r, listOf("url", "href", "link")),
snippet = ToolJson.cleanVisibleText(ToolJson.firstString(r, listOf("snippet", "description", "body"))),
snippet =
ToolJson.cleanVisibleText(
ToolJson.firstString(r, listOf("snippet", "description", "body")),
),
)
}.filter { it.title.isNotEmpty() || it.url.isNotEmpty() }
.take(limit)