Merge pull request #7954 from Kilo-Org/eshurakov/eshurakov/remote-config

CLI - Add remote_control Config Option
This commit is contained in:
Evgeny Shurakov
2026-03-31 10:17:29 +02:00
committed by GitHub
2 changed files with 8 additions and 1 deletions
+4
View File
@@ -1159,6 +1159,10 @@ export namespace Config {
.boolean()
.optional()
.describe("@deprecated Use 'share' field instead. Share newly created sessions automatically"),
remote_control: z // kilocode_change
.boolean()
.optional()
.describe("Enable remote control of sessions via Kilo Cloud. Equivalent to running /remote on startup."),
autoupdate: z
.union([z.boolean(), z.literal("notify")])
.optional()
@@ -10,6 +10,7 @@ import { clearInFlightCache, withInFlightCache } from "@/kilo-sessions/inflight-
import type * as SDK from "@kilocode/sdk/v2"
import z from "zod"
import { KILO_API_BASE } from "@kilocode/kilo-gateway"
import { Config } from "@/config/config"
import { Instance } from "@/project/instance"
import { Vcs } from "@/project/vcs"
import simpleGit from "simple-git"
@@ -205,7 +206,9 @@ export namespace KiloSessions {
await ingest.sync(evt.properties.sessionID, [{ type: "session_close", data: { reason: evt.properties.reason } }])
})
if (remoteEnabled) enableRemote().catch((err) => log.warn("remote not enabled", { error: String(err) }))
const cfg = await Config.getGlobal()
if (remoteEnabled || cfg.remote_control)
enableRemote().catch((err) => log.warn("remote not enabled", { error: String(err) }))
Bus.subscribe(Bus.InstanceDisposed, () => disableRemote())
}