mirror of
https://github.com/aljazceru/opencode.git
synced 2026-01-04 08:24:59 +01:00
fix: unsupported option
This commit is contained in:
@@ -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>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user