diff --git a/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx b/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx index 8576dd5763..abd9d112bc 100644 --- a/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx +++ b/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx @@ -529,9 +529,9 @@ export function Prompt(props: PromptProps) { const sessionID = props.sessionID ? props.sessionID : await (async () => { - const sessionID = await sdk.client.session.create({}).then((x) => x.data!.id) - return sessionID - })() + const sessionID = await sdk.client.session.create({}).then((x) => x.data!.id) + return sessionID + })() const messageID = Identifier.ascending("message") let inputText = store.prompt.input @@ -620,7 +620,7 @@ export function Prompt(props: PromptProps) { })), ], }) - .catch(() => {}) + .catch(() => { }) } history.append({ ...store.prompt, @@ -913,20 +913,20 @@ export function Prompt(props: PromptProps) { const file = Bun.file(filepath) // Handle SVG as raw text content, not as base64 image if (file.type === "image/svg+xml") { - event.preventDefault() - const content = await file.text().catch(() => {}) + const content = await file.text().catch(() => { }) if (content) { + event.preventDefault() pasteText(content, `[SVG: ${file.name ?? "image"}]`) return } } if (file.type.startsWith("image/")) { - event.preventDefault() const content = await file .arrayBuffer() .then((buffer) => Buffer.from(buffer).toString("base64")) - .catch(() => {}) + .catch(() => { }) if (content) { + event.preventDefault() await pasteImage({ filename: file.name, mime: file.type, @@ -935,7 +935,7 @@ export function Prompt(props: PromptProps) { return } } - } catch {} + } catch { } } const lineCount = (pastedContent.match(/\n/g)?.length ?? 0) + 1 @@ -1010,13 +1010,13 @@ export function Prompt(props: PromptProps) { customBorderChars={ theme.backgroundElement.a !== 0 ? { - ...EmptyBorder, - horizontal: "▀", - } + ...EmptyBorder, + horizontal: "▀", + } : { - ...EmptyBorder, - horizontal: " ", - } + ...EmptyBorder, + horizontal: " ", + } } />