mirror of
https://github.com/Kilo-Org/kilocode.git
synced 2026-09-01 04:46:43 +08:00
fix(cli): remove unsupported kilo web command
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@kilocode/cli": patch
|
||||
---
|
||||
|
||||
Remove unsupported `kilo web` CLI command.
|
||||
@@ -13,7 +13,6 @@
|
||||
| `kilo upgrade [target]` | upgrade kilo to the latest or a specific version |
|
||||
| `kilo uninstall` | uninstall kilo and remove all related files |
|
||||
| `kilo serve` | starts a headless kilo server |
|
||||
| `kilo web` | start kilo server and open web interface |
|
||||
| `kilo models [provider]` | list all available models |
|
||||
| `kilo roll-call <filter>` | batch-test text models matching a filter for connectivity and latency |
|
||||
| `kilo profile` | show Kilo account profile |
|
||||
|
||||
@@ -659,21 +659,6 @@ Options:
|
||||
--cors additional domains to allow for CORS [array] [default: []]
|
||||
```
|
||||
|
||||
## kilo web
|
||||
|
||||
```
|
||||
start kilo server and open web interface
|
||||
|
||||
Options:
|
||||
--help Show help [boolean]
|
||||
--version Show version number [boolean]
|
||||
--port port to listen on [number] [default: 0]
|
||||
--hostname hostname to listen on [string] [default: "127.0.0.1"]
|
||||
--mdns enable mDNS service discovery (defaults hostname to 0.0.0.0) [boolean] [default: false]
|
||||
--mdns-domain custom domain name for mDNS service (default: kilo.local) [string] [default: "kilo.local"]
|
||||
--cors additional domains to allow for CORS [array] [default: []]
|
||||
```
|
||||
|
||||
## kilo models
|
||||
|
||||
```
|
||||
|
||||
@@ -1,61 +0,0 @@
|
||||
import { Effect } from "effect"
|
||||
import { UI } from "../ui"
|
||||
import { effectCmd } from "../effect-cmd"
|
||||
import { withNetworkOptions, resolveNetworkOptions } from "../network"
|
||||
import { Flag } from "@opencode-ai/core/flag/flag"
|
||||
import open from "open"
|
||||
|
||||
export const WebCommand = effectCmd({
|
||||
command: "web",
|
||||
builder: (yargs) => withNetworkOptions(yargs),
|
||||
describe: "start kilo server and open web interface",
|
||||
// Server loads instances per-request via x-kilo-directory header — no
|
||||
// ambient project InstanceContext needed at startup.
|
||||
instance: false, // kilocode_change
|
||||
handler: Effect.fn("Cli.web")(function* (args) {
|
||||
const { Server } = yield* Effect.promise(() => import("../../server/server"))
|
||||
if (!Flag.KILO_SERVER_PASSWORD) {
|
||||
UI.println(UI.Style.TEXT_WARNING_BOLD + "! KILO_SERVER_PASSWORD is not set; server is unsecured.")
|
||||
}
|
||||
const opts = yield* resolveNetworkOptions(args)
|
||||
const server = yield* Effect.promise(() => Server.listen(opts))
|
||||
UI.empty()
|
||||
UI.println(UI.logo(" "))
|
||||
UI.empty()
|
||||
|
||||
// kilocode_change start
|
||||
const urls = server.urls
|
||||
|
||||
UI.println(UI.Style.TEXT_INFO_BOLD + " Local: ", UI.Style.TEXT_NORMAL, urls.local)
|
||||
if (urls.network) {
|
||||
UI.println(UI.Style.TEXT_INFO_BOLD + " Network: ", UI.Style.TEXT_NORMAL, urls.network)
|
||||
}
|
||||
|
||||
if (opts.mdns) {
|
||||
UI.println(UI.Style.TEXT_INFO_BOLD + " mDNS: ", UI.Style.TEXT_NORMAL, `${opts.mdnsDomain}:${server.port}`)
|
||||
}
|
||||
|
||||
open(urls.local).catch(() => {})
|
||||
// kilocode_change end
|
||||
|
||||
// kilocode_change start - graceful signal shutdown
|
||||
const { InstanceRuntime } = yield* Effect.promise(() => import("../../project/instance-runtime"))
|
||||
yield* Effect.promise(
|
||||
() =>
|
||||
new Promise<void>((resolve) => {
|
||||
const shutdown = async () => {
|
||||
try {
|
||||
await InstanceRuntime.disposeAllInstances()
|
||||
await server.stop(true)
|
||||
} finally {
|
||||
resolve()
|
||||
}
|
||||
}
|
||||
process.once("SIGTERM", shutdown)
|
||||
process.once("SIGINT", shutdown)
|
||||
process.once("SIGHUP", shutdown)
|
||||
}),
|
||||
)
|
||||
// kilocode_change end
|
||||
}),
|
||||
})
|
||||
@@ -22,7 +22,7 @@ import { AttachCommand } from "./cli/cmd/attach"
|
||||
import { TuiThreadCommand } from "./cli/cmd/tui"
|
||||
import { AcpCommand } from "./cli/cmd/acp"
|
||||
import { EOL } from "os"
|
||||
import { WebCommand } from "./cli/cmd/web"
|
||||
// kilocode_change - upstream web command intentionally omitted; Kilo does not ship an embedded web UI
|
||||
import { PrCommand } from "./cli/cmd/pr"
|
||||
import { SessionCommand } from "./cli/cmd/session"
|
||||
import { DbCommand } from "./cli/cmd/db"
|
||||
@@ -106,7 +106,7 @@ let cli = yargs(args) // kilocode_change
|
||||
.command(UpgradeCommand)
|
||||
.command(UninstallCommand)
|
||||
.command(ServeCommand)
|
||||
.command(WebCommand)
|
||||
// kilocode_change - upstream web command intentionally omitted
|
||||
.command(ModelsCommand)
|
||||
.command(StatsCommand)
|
||||
.command(ExportCommand)
|
||||
|
||||
@@ -13,7 +13,6 @@ import { AgentCommand } from "../cli/cmd/agent"
|
||||
import { UpgradeCommand } from "../cli/cmd/upgrade"
|
||||
import { UninstallCommand } from "../cli/cmd/uninstall"
|
||||
import { ServeCommand } from "../cli/cmd/serve"
|
||||
import { WebCommand } from "../cli/cmd/web"
|
||||
import { ModelsCommand } from "../cli/cmd/models"
|
||||
import { StatsCommand } from "../cli/cmd/stats"
|
||||
import { ExportCommand } from "../cli/cmd/export"
|
||||
@@ -61,7 +60,6 @@ export const commands = [
|
||||
UpgradeCommand,
|
||||
UninstallCommand,
|
||||
ServeCommand,
|
||||
WebCommand,
|
||||
ModelsCommand,
|
||||
RollCallCommand,
|
||||
ProfileCommand,
|
||||
|
||||
@@ -235,27 +235,6 @@ Options:
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`Kilo CLI help-text snapshots every documented command emits stable help text: kilo web --help 1`] = `
|
||||
"kilo web
|
||||
|
||||
start kilo server and open web interface
|
||||
|
||||
Options:
|
||||
-h, --help show help [boolean]
|
||||
-v, --version show version number [boolean]
|
||||
--print-logs print logs to stderr [boolean]
|
||||
--log-level log level [string] [choices: "DEBUG", "INFO", "WARN", "ERROR"]
|
||||
--pure run without external plugins [boolean]
|
||||
--port port to listen on [number] [default: 0]
|
||||
--hostname hostname to listen on [string] [default: "127.0.0.1"]
|
||||
--mdns enable mDNS service discovery (defaults hostname to 0.0.0.0)
|
||||
[boolean] [default: false]
|
||||
--mdns-domain custom domain name for mDNS service (default: kilo.local)
|
||||
[string] [default: "kilo.local"]
|
||||
--cors additional domains to allow for CORS [array] [default: []]
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`Kilo CLI help-text snapshots every documented command emits stable help text: kilo models --help 1`] = `
|
||||
"kilo models [provider]
|
||||
|
||||
|
||||
@@ -66,7 +66,6 @@ const TOP_LEVEL = [
|
||||
"upgrade",
|
||||
"uninstall",
|
||||
"serve",
|
||||
"web",
|
||||
"models",
|
||||
"stats",
|
||||
"export",
|
||||
|
||||
@@ -12,7 +12,6 @@ import { AgentCommand } from "../../src/cli/cmd/agent"
|
||||
import { UpgradeCommand } from "../../src/cli/cmd/upgrade"
|
||||
import { UninstallCommand } from "../../src/cli/cmd/uninstall"
|
||||
import { ServeCommand } from "../../src/cli/cmd/serve"
|
||||
import { WebCommand } from "../../src/cli/cmd/web"
|
||||
import { ModelsCommand } from "../../src/cli/cmd/models"
|
||||
import { StatsCommand } from "../../src/cli/cmd/stats"
|
||||
import { ExportCommand } from "../../src/cli/cmd/export"
|
||||
@@ -64,7 +63,6 @@ const commands = [
|
||||
UpgradeCommand,
|
||||
UninstallCommand,
|
||||
ServeCommand,
|
||||
WebCommand,
|
||||
ModelsCommand,
|
||||
StatsCommand,
|
||||
ExportCommand,
|
||||
|
||||
Reference in New Issue
Block a user