fix(tui): standardize OpenCode product casing (#36717)
This commit is contained in:
@@ -38,7 +38,7 @@ type TuiAttentionHost = TuiAttention & {
|
|||||||
dispose(): void
|
dispose(): void
|
||||||
}
|
}
|
||||||
|
|
||||||
const DEFAULT_TITLE = "opencode"
|
const DEFAULT_TITLE = "OpenCode"
|
||||||
const DEFAULT_PACK_ID = "opencode.default"
|
const DEFAULT_PACK_ID = "opencode.default"
|
||||||
const TITLE_LIMIT = 80
|
const TITLE_LIMIT = 80
|
||||||
const MESSAGE_LIMIT = 240
|
const MESSAGE_LIMIT = 240
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ export function ErrorComponent(props: { error: Error; reset: () => void; mode?:
|
|||||||
{/* Headline */}
|
{/* Headline */}
|
||||||
<box flexDirection="column" alignItems="center" flexShrink={0}>
|
<box flexDirection="column" alignItems="center" flexShrink={0}>
|
||||||
<text attributes={TextAttributes.BOLD} fg={colors.text}>
|
<text attributes={TextAttributes.BOLD} fg={colors.text}>
|
||||||
opencode crashed
|
OpenCode crashed
|
||||||
</text>
|
</text>
|
||||||
<Show when={showSubtext()}>
|
<Show when={showSubtext()}>
|
||||||
<text fg={colors.muted}>An unexpected error stopped the session.</text>
|
<text fg={colors.muted}>An unexpected error stopped the session.</text>
|
||||||
@@ -192,7 +192,7 @@ export function ErrorComponent(props: { error: Error; reset: () => void; mode?:
|
|||||||
? "Report copied — paste it into a new GitHub issue."
|
? "Report copied — paste it into a new GitHub issue."
|
||||||
: "Copy the report and open a GitHub issue to help us fix this."}
|
: "Copy the report and open a GitHub issue to help us fix this."}
|
||||||
</text>
|
</text>
|
||||||
<text fg={colors.muted}>opencode {InstallationVersion}</text>
|
<text fg={colors.muted}>OpenCode {InstallationVersion}</text>
|
||||||
</box>
|
</box>
|
||||||
</Show>
|
</Show>
|
||||||
</box>
|
</box>
|
||||||
@@ -211,7 +211,7 @@ function buildIssueURL(message: string, stack: string) {
|
|||||||
url.searchParams.set("terminal", describeTerminal())
|
url.searchParams.set("terminal", describeTerminal())
|
||||||
url.searchParams.set(
|
url.searchParams.set(
|
||||||
"reproduce",
|
"reproduce",
|
||||||
"Reported automatically from the opencode crash screen. If you can, describe what you were doing when it crashed.",
|
"Reported automatically from the OpenCode crash screen. If you can, describe what you were doing when it crashed.",
|
||||||
)
|
)
|
||||||
|
|
||||||
// Budget the stack against the fully URL-encoded length (not the raw length) so
|
// Budget the stack against the fully URL-encoded length (not the raw length) so
|
||||||
@@ -220,7 +220,7 @@ function buildIssueURL(message: string, stack: string) {
|
|||||||
// so measuring url.toString() is both correct and safe on any input.
|
// so measuring url.toString() is both correct and safe on any input.
|
||||||
const MAX_URL_LENGTH = 6000
|
const MAX_URL_LENGTH = 6000
|
||||||
const marker = "\n... (truncated)"
|
const marker = "\n... (truncated)"
|
||||||
const head = `The opencode TUI crashed with an unexpected error.\n\n**Error:** ${message}\n\n**Stack trace:**\n`
|
const head = `The OpenCode TUI crashed with an unexpected error.\n\n**Error:** ${message}\n\n**Stack trace:**\n`
|
||||||
const setBody = (body: string) => url.searchParams.set("description", head + "```\n" + body + "\n```")
|
const setBody = (body: string) => url.searchParams.set("description", head + "```\n" + body + "\n```")
|
||||||
|
|
||||||
setBody(stack)
|
setBody(stack)
|
||||||
|
|||||||
Reference in New Issue
Block a user