refactor(tui): rename link concept to pair

This commit is contained in:
Dax Raad 2026-07-09 13:05:20 -04:00
commit 6fb526741b
5 changed files with 16 additions and 16 deletions

View file

@ -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: {

View file

@ -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)

View file

@ -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"),