diff --git a/packages/tui/src/component/dialog-provider.tsx b/packages/tui/src/component/dialog-provider.tsx
index 2767508eb2..9da9dd12af 100644
--- a/packages/tui/src/component/dialog-provider.tsx
+++ b/packages/tui/src/component/dialog-provider.tsx
@@ -367,30 +367,31 @@ function ApiMethod(props: ApiMethodProps) {
title={props.title}
placeholder="API key"
description={
- {
- opencode: (
-
-
- OpenCode Zen gives you access to all the best coding models at the cheapest prices with a single API
- key.
-
-
- Go to https://opencode.ai/zen to get a key
-
-
- ),
- "opencode-go": (
-
-
- OpenCode Go is a $10 per month subscription that provides reliable access to popular open coding models
- with generous usage limits.
-
-
- Go to https://opencode.ai/go and enable OpenCode Go
-
-
- ),
- }[props.providerID] ?? undefined
+ props.providerID === "opencode"
+ ? () => (
+
+
+ OpenCode Zen gives you access to all the best coding models at the cheapest prices with a single API
+ key.
+
+
+ Go to https://opencode.ai/zen to get a key
+
+
+ )
+ : props.providerID === "opencode-go"
+ ? () => (
+
+
+ OpenCode Go is a $10 per month subscription that provides reliable access to popular open coding models
+ with generous usage limits.
+
+
+ Go to https://opencode.ai/go and enable OpenCode Go
+
+
+ )
+ : undefined
}
onConfirm={async (value) => {
if (!value) return
diff --git a/packages/tui/src/routes/session/index.tsx b/packages/tui/src/routes/session/index.tsx
index f832174aa4..a870cd7614 100644
--- a/packages/tui/src/routes/session/index.tsx
+++ b/packages/tui/src/routes/session/index.tsx
@@ -1528,7 +1528,7 @@ function AssistantMessage(props: { message: AssistantMessage; parts: Part[]; las
customBorderChars={SplitBorder.customBorderChars}
borderColor={theme.error}
>
- {props.message.error?.data.message}
+ {errorMessage(props.message.error)}
diff --git a/packages/tui/src/ui/dialog-prompt.tsx b/packages/tui/src/ui/dialog-prompt.tsx
index d627ea2970..f518fb2950 100644
--- a/packages/tui/src/ui/dialog-prompt.tsx
+++ b/packages/tui/src/ui/dialog-prompt.tsx
@@ -83,7 +83,7 @@ export function DialogPrompt(props: DialogPromptProps) {
- {props.description}
+ {props.description?.()}