Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions packages/opencode/src/cli/cmd/pr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { git } from "@/util/git"

export const PrCommand = cmd({
command: "pr <number>",
describe: "fetch and checkout a GitHub PR branch, then run opencode",
describe: "fetch and checkout a GitHub PR branch, then run altimate-code",
builder: (yargs) =>
yargs.positional("number", {
type: "number",
Expand Down Expand Up @@ -82,15 +82,15 @@ export const PrCommand = cmd({
})
}

// Check for opencode session link in PR body
// Check for altimate-code session link in PR body
if (prInfo && prInfo.body) {
const sessionMatch = prInfo.body.match(/https:\/\/opncd\.ai\/s\/([a-zA-Z0-9_-]+)/)
if (sessionMatch) {
const sessionUrl = sessionMatch[0]
UI.println(`Found opencode session: ${sessionUrl}`)
UI.println(`Found altimate-code session: ${sessionUrl}`)
UI.println(`Importing session...`)

const importResult = await Process.text(["opencode", "import", sessionUrl], {
const importResult = await Process.text(["altimate-code", "import", sessionUrl], {
nothrow: true,
})
if (importResult.code === 0) {
Expand All @@ -109,21 +109,21 @@ export const PrCommand = cmd({

UI.println(`Successfully checked out PR #${prNumber} as branch '${localBranchName}'`)
UI.println()
UI.println("Starting opencode...")
UI.println("Starting altimate-code...")
UI.println()

// Launch opencode TUI with session ID if available
// Launch altimate-code TUI with session ID if available
const { spawn } = await import("child_process")
const opencodeArgs = sessionId ? ["-s", sessionId] : []
const opencodeProcess = spawn("opencode", opencodeArgs, {
const opencodeProcess = spawn("altimate-code", opencodeArgs, {
stdio: "inherit",
cwd: process.cwd(),
})

await new Promise<void>((resolve, reject) => {
opencodeProcess.on("exit", (code) => {
if (code === 0) resolve()
else reject(new Error(`opencode exited with code ${code}`))
else reject(new Error(`altimate-code exited with code ${code}`))
})
opencodeProcess.on("error", reject)
})
Expand Down
4 changes: 2 additions & 2 deletions packages/opencode/src/cli/cmd/tui/thread.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@ async function input(value?: string) {

export const TuiThreadCommand = cmd({
command: "$0 [project]",
describe: "start opencode tui",
describe: "start altimate-code tui",
builder: (yargs) =>
withNetworkOptions(yargs)
.positional("project", {
type: "string",
describe: "path to start opencode in",
describe: "path to start altimate-code in",
})
.option("model", {
type: "string",
Expand Down
2 changes: 1 addition & 1 deletion packages/opencode/src/cli/cmd/uninstall.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ interface RemovalTargets {

export const UninstallCommand = {
command: "uninstall",
describe: "uninstall opencode and remove all related files",
describe: "uninstall altimate-code and remove all related files",
builder: (yargs: Argv) =>
yargs
.option("keep-config", {
Expand Down
4 changes: 2 additions & 2 deletions packages/opencode/src/cli/network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ const options = {
},
"mdns-domain": {
type: "string" as const,
describe: "custom domain name for mDNS service (default: opencode.local)",
default: "opencode.local",
describe: "custom domain name for mDNS service (default: altimate-code.local)",
default: "altimate-code.local",
},
cors: {
type: "string" as const,
Expand Down
2 changes: 1 addition & 1 deletion packages/opencode/src/config/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -992,7 +992,7 @@ export namespace Config {
port: z.number().int().positive().optional().describe("Port to listen on"),
hostname: z.string().optional().describe("Hostname to listen on"),
mdns: z.boolean().optional().describe("Enable mDNS service discovery"),
mdnsDomain: z.string().optional().describe("Custom domain name for mDNS service (default: opencode.local)"),
mdnsDomain: z.string().optional().describe("Custom domain name for mDNS service (default: altimate-code.local)"),
cors: z.array(z.string()).optional().describe("Additional domains to allow for CORS"),
})
.strict()
Expand Down
4 changes: 2 additions & 2 deletions packages/opencode/src/server/mdns.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ export namespace MDNS {
if (bonjour) unpublish()

try {
const host = domain ?? "opencode.local"
const name = `opencode-${port}`
const host = domain ?? "altimate-code.local"
const name = `altimate-code-${port}`
bonjour = new Bonjour()
const service = bonjour.publish({
name,
Expand Down
4 changes: 2 additions & 2 deletions packages/opencode/test/cli/tui/thread.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ describe("tui thread", () => {
port: 0,
hostname: "127.0.0.1",
mdns: false,
"mdns-domain": "opencode.local",
mdnsDomain: "opencode.local",
"mdns-domain": "altimate-code.local",
mdnsDomain: "altimate-code.local",
cors: [],
}
return TuiThreadCommand.handler(args)
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/js/src/v2/gen/types.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1031,7 +1031,7 @@ export type ServerConfig = {
*/
mdns?: boolean
/**
* Custom domain name for mDNS service (default: opencode.local)
* Custom domain name for mDNS service (default: altimate-code.local)
*/
mdnsDomain?: string
/**
Expand Down
Loading