fix(tui): show docs URL in dialog when browser cannot open on headless systems

Resolve merge conflict with main (command structure refactored from
onSelect to run) and add missing changeset.
This commit is contained in:
grandmaster451
2026-06-16 22:03:16 +03:00
parent 1321d7eb14
commit fb37d9c773
2 changed files with 13 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
---
"@kilocode/cli": patch
---
Show the docs URL in an alert dialog when the browser cannot be opened on headless systems instead of silently failing.
+8 -1
View File
@@ -685,8 +685,15 @@ function App(props: { onSnapshot?: () => Promise<string[]> }) {
name: "docs.open",
title: "Open docs",
run: () => {
open(KiloApp.DOCS_URL).catch(() => {}) // kilocode_change
dialog.clear()
open(KiloApp.DOCS_URL).catch(() => {
dialog.replace(() => (
<DialogAlert
title="Cannot open browser"
message={`No display detected.\n\nOpen the docs manually:\n${KiloApp.DOCS_URL}`}
/>
))
}) // kilocode_change
},
category: "System",
},