refactor(tui): rename link concept to pair
This commit is contained in:
parent
85fdb3bde6
commit
6fb526741b
5 changed files with 16 additions and 16 deletions
|
|
@ -209,7 +209,7 @@ export const Commands = Spec.make(typeof OPENCODE_CLI_NAME === "string" ? OPENCO
|
|||
}),
|
||||
],
|
||||
}),
|
||||
Spec.make("link", { description: "Show server connection information" }),
|
||||
Spec.make("pair", { description: "Show server pairing information" }),
|
||||
Spec.make("serve", {
|
||||
description: "Start the v2 API server",
|
||||
params: {
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@ import { Runtime } from "../../framework/runtime"
|
|||
import { ServiceConfig } from "../../services/service-config"
|
||||
|
||||
export default Runtime.handler(
|
||||
Commands.commands.link,
|
||||
Effect.fn("cli.link")(function* () {
|
||||
Commands.commands.pair,
|
||||
Effect.fn("cli.pair")(function* () {
|
||||
const endpoint = yield* Service.start(yield* ServiceConfig.options())
|
||||
const password = yield* ServiceConfig.password()
|
||||
const server = yield* Effect.tryPromise(() =>
|
||||
|
|
@ -24,7 +24,7 @@ export default Runtime.handler(
|
|||
` Username ${info.username}`,
|
||||
` Password ${info.password}`,
|
||||
"",
|
||||
" Scan to connect",
|
||||
" Scan to pair",
|
||||
"",
|
||||
renderUnicodeCompact(JSON.stringify(info), { border: 2 })
|
||||
.split(EOL)
|
||||
|
|
@ -36,7 +36,7 @@ const Handlers = Runtime.handlers(Commands, {
|
|||
migrate: () => import("./commands/handlers/migrate"),
|
||||
mini: () => import("./commands/handlers/mini"),
|
||||
run: () => import("./commands/handlers/run"),
|
||||
link: () => import("./commands/handlers/link"),
|
||||
pair: () => import("./commands/handlers/pair"),
|
||||
service: {
|
||||
start: () => import("./commands/handlers/service/start"),
|
||||
restart: () => import("./commands/handlers/service/restart"),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue