Skip to content

Commit 139fbe6

Browse files
authored
Merge pull request #145 from odefun/feat/status-ready-url-177199
fix: keep status URL aligned with daemon host config
2 parents 154259f + 2db0a0a commit 139fbe6

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ode",
3-
"version": "0.0.94",
3+
"version": "0.0.95",
44
"description": "Coding anywhere with your coding agents connected",
55
"module": "packages/core/index.ts",
66
"type": "module",

packages/core/cli.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,16 @@ function fallbackReadyMessage(): string {
8787
return `Ode is ready! Waiting for messages, setting UI is accessible at ${getLocalSettingsUrl()}`;
8888
}
8989

90+
function extractSettingsUrl(readyMessage: string | null): string | null {
91+
if (!readyMessage) return null;
92+
const marker = "setting UI is accessible at ";
93+
const markerIndex = readyMessage.indexOf(marker);
94+
if (markerIndex === -1) return null;
95+
96+
const url = readyMessage.slice(markerIndex + marker.length).trim();
97+
return url.length > 0 ? url : null;
98+
}
99+
90100
function delay(ms: number): Promise<void> {
91101
return new Promise((resolve) => {
92102
setTimeout(resolve, ms);
@@ -339,7 +349,8 @@ async function showStatus(): Promise<void> {
339349
console.log("Upgrade: none pending");
340350
}
341351
if (daemonIsRunning) {
342-
console.log(`ode is running, setting UI is accessible at ${getLocalSettingsUrl()}`);
352+
const settingsUrl = extractSettingsUrl(state.readyMessage) ?? getLocalSettingsUrl();
353+
console.log(`ode is running, setting UI is accessible at ${settingsUrl}`);
343354
return;
344355
}
345356
console.log("ode is installed but not running, can run it with ode");

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"@/*": ["packages/*"]
66
},
77
// Environment setup & latest features
8-
"lib": ["ESNext"],
8+
"lib": ["ESNext", "DOM"],
99
"target": "ESNext",
1010
"module": "Preserve",
1111
"moduleDetection": "force",

0 commit comments

Comments
 (0)