mirror of
https://github.com/Kilo-Org/kilocode.git
synced 2026-09-21 05:52:35 +08:00
fix: format
This commit is contained in:
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
@@ -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 },
|
||||
|
||||
Reference in New Issue
Block a user