Compare commits

...

3 Commits

Author SHA1 Message Date
Ryan Vogel
d7766bc6eb core: remove unused isBeta() function from installation module 2026-02-05 08:05:20 -05:00
Ryan Vogel
39845695ba tui: show Discord bug report banner only for beta channel users
The Discord bug report banner in the session header now only appears
for beta channel installations instead of all preview channels. This
ensures only beta testers see the bug report prompt, making it more
targeted and relevant to users actively testing pre-release builds.
2026-02-05 08:02:23 -05:00
Ryan Vogel
09d410f6fc tui: show discord link for bug reports in preview sessions 2026-02-05 05:30:20 -05:00

View File

@@ -78,6 +78,7 @@ import { QuestionPrompt } from "./question"
import { DialogExportOptions } from "../../ui/dialog-export-options"
import { formatTranscript } from "../../util/transcript"
import { UI } from "@/cli/ui.ts"
import { Installation } from "@/installation"
addDefaultParsers(parsers.parsers)
@@ -226,14 +227,19 @@ export function Session() {
createEffect(() => {
const title = Locale.truncate(session()?.title ?? "", 50)
return exit.message.set(
[
``,
`▀▀${UI.Style.TEXT_DIM}${title}${UI.Style.TEXT_NORMAL}`,
` █ █ ${UI.Style.TEXT_DIM}opencode -s ${session()?.id}${UI.Style.TEXT_NORMAL}`,
` ▀▀▀▀ `,
].join("\n"),
)
const lines = [
``,
` █▀▀█ ${UI.Style.TEXT_DIM}${title}${UI.Style.TEXT_NORMAL}`,
` ${UI.Style.TEXT_DIM}opencode -s ${session()?.id}${UI.Style.TEXT_NORMAL}`,
]
if (Installation.CHANNEL === "beta") {
lines.push(
` ▀▀▀▀ ${UI.Style.TEXT_DIM}found a bug? report it on discord at https://opencode.ai/discord${UI.Style.TEXT_NORMAL}`,
)
} else {
lines.push(` ▀▀▀▀ `)
}
return exit.message.set(lines.join("\n"))
})
useKeyboard((evt) => {