fix: unsupported option

This commit is contained in:
Aiden Cline
2025-10-31 16:53:08 -05:00
parent 31d0caee38
commit 60dc38050d

View File

@@ -53,7 +53,11 @@ export function tui(input: {
render( render(
() => { () => {
return ( return (
<ErrorBoundary fallback={(error, reset) => <ErrorComponent error={error} reset={reset} onExit={onExit} />}> <ErrorBoundary
fallback={(error, reset) => (
<ErrorComponent error={error} reset={reset} onExit={onExit} />
)}
>
<ExitProvider onExit={onExit}> <ExitProvider onExit={onExit}>
<KVProvider> <KVProvider>
<ToastProvider> <ToastProvider>
@@ -319,7 +323,7 @@ function App() {
<text <text
bg={local.agent.color(local.agent.current().name)} bg={local.agent.color(local.agent.current().name)}
fg={theme.background} fg={theme.background}
wrapMode="none" wrapMode={undefined}
> >
<span style={{ bold: true }}> {local.agent.current().name.toUpperCase()}</span> <span style={{ bold: true }}> {local.agent.current().name.toUpperCase()}</span>
<span> AGENT </span> <span> AGENT </span>
@@ -330,7 +334,7 @@ function App() {
) )
} }
function ErrorComponent(props: { error: Error; reset: () => void, onExit: () => Promise<void> }) { function ErrorComponent(props: { error: Error; reset: () => void; onExit: () => Promise<void> }) {
const term = useTerminalDimensions() const term = useTerminalDimensions()
useKeyboard((evt) => { useKeyboard((evt) => {
if (evt.ctrl && evt.name === "c") { if (evt.ctrl && evt.name === "c") {
@@ -346,11 +350,16 @@ function ErrorComponent(props: { error: Error; reset: () => void, onExit: () =>
} }
if (props.error.stack) { if (props.error.stack) {
issueURL.searchParams.set("description", "```\n" + props.error.stack.substring(0, 6000 - issueURL.toString().length) + "...\n```") issueURL.searchParams.set(
"description",
"```\n" + props.error.stack.substring(0, 6000 - issueURL.toString().length) + "...\n```",
)
} }
const copyIssueURL = () => { const copyIssueURL = () => {
Clipboard.copy(issueURL.toString()).then(() => { setCopied(true) }) Clipboard.copy(issueURL.toString()).then(() => {
setCopied(true)
})
} }
return ( return (
@@ -375,6 +384,6 @@ function ErrorComponent(props: { error: Error; reset: () => void, onExit: () =>
<text>{props.error.stack}</text> <text>{props.error.stack}</text>
</scrollbox> </scrollbox>
<text>{props.error.message}</text> <text>{props.error.message}</text>
</box > </box>
) )
} }