mirror of
https://github.com/Kilo-Org/kilocode.git
synced 2026-09-19 10:02:04 +08:00
Merge pull request #7954 from Kilo-Org/eshurakov/eshurakov/remote-config
CLI - Add remote_control Config Option
This commit is contained in:
@@ -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())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user