fix: format

This commit is contained in:
Catriel Müller
2026-05-22 11:05:40 -03:00
parent 5696a1937e
commit 697fa4e80f
7 changed files with 8 additions and 11 deletions
@@ -1,6 +1,10 @@
import type { KiloClient } from "@kilocode/sdk/v2/client"
export async function stopSessionProcesses(client: KiloClient | null, sessionID: string, directory: string): Promise<void> {
export async function stopSessionProcesses(
client: KiloClient | null,
sessionID: string,
directory: string,
): Promise<void> {
if (!client) return
await client.backgroundProcess
.stopSession({ sessionID, directory })
@@ -51,9 +51,7 @@ function ready(input: Record<string, unknown>) {
const value = input.ready
if (!value || typeof value !== "object") return []
const data = value as Record<string, unknown>
return [
text(data.port) ? ["Ports", text(data.port)!] : undefined,
].filter((item): item is [string, string] => !!item)
return [text(data.port) ? ["Ports", text(data.port)!] : undefined].filter((item): item is [string, string] => !!item)
}
function structured(raw: string | undefined, enabled: boolean) {
@@ -110,9 +108,7 @@ function BackgroundProcessTool(props: ToolProps) {
cwd() ? ["Cwd", cwd()!] : undefined,
!cwd() && text(props.input.workdir) ? ["Workdir", text(props.input.workdir)!] : undefined,
...ready(props.input),
...data().rows.filter(
(row) => !["Command", "Process id", "Status", "Cwd"].includes(row[0]),
),
...data().rows.filter((row) => !["Command", "Process id", "Status", "Cwd"].includes(row[0])),
].filter((item): item is [string, string] => !!item),
)
@@ -208,10 +208,7 @@ const backgroundLogsCompleted: ToolPart = {
state: {
status: "completed",
input: { action: "logs", id: "bgp_01hv8devserver" },
output: [
"VITE v5.4.0 ready in 318 ms",
"Local: http://127.0.0.1:5173/",
].join("\n"),
output: ["VITE v5.4.0 ready in 318 ms", "Local: http://127.0.0.1:5173/"].join("\n"),
title: "Logs: Dev server",
metadata: { processID: "bgp_01hv8devserver", status: "ready" },
time: { start: now - 1800, end: now - 1200 },