Merge pull request #2419 from guazi04/fix/serverurl-throw-getter
fix(tmux): handle serverUrl throw getter from upstream opencode refactor
This commit is contained in:
@@ -73,7 +73,11 @@ export class TmuxSessionManager {
|
|||||||
this.tmuxConfig = tmuxConfig
|
this.tmuxConfig = tmuxConfig
|
||||||
this.deps = deps
|
this.deps = deps
|
||||||
const defaultPort = process.env.OPENCODE_PORT ?? "4096"
|
const defaultPort = process.env.OPENCODE_PORT ?? "4096"
|
||||||
this.serverUrl = ctx.serverUrl?.toString() ?? `http://localhost:${defaultPort}`
|
try {
|
||||||
|
this.serverUrl = ctx.serverUrl?.toString() ?? `http://localhost:${defaultPort}`
|
||||||
|
} catch {
|
||||||
|
this.serverUrl = `http://localhost:${defaultPort}`
|
||||||
|
}
|
||||||
this.sourcePaneId = deps.getCurrentPaneId()
|
this.sourcePaneId = deps.getCurrentPaneId()
|
||||||
this.pollingManager = new TmuxPollingManager(
|
this.pollingManager = new TmuxPollingManager(
|
||||||
this.client,
|
this.client,
|
||||||
|
|||||||
Reference in New Issue
Block a user