summaryrefslogtreecommitdiffhomepage
path: root/packages/app/src/utils/base64.ts
diff options
context:
space:
mode:
authoradamelmore <[email protected]>2026-01-27 06:27:27 -0600
committeradamelmore <[email protected]>2026-01-27 06:29:20 -0600
commit095328faf439fbdc62506f3653875fbfec5c60ab (patch)
tree707036011dcafaa2ad13d05eb52b041ea6f0d951 /packages/app/src/utils/base64.ts
parent743e83d9bfc050183be5bfb0f241ebe5faac6b35 (diff)
downloadopencode-095328faf439fbdc62506f3653875fbfec5c60ab.tar.gz
opencode-095328faf439fbdc62506f3653875fbfec5c60ab.zip
fix(app): non-fatal error handling
Diffstat (limited to 'packages/app/src/utils/base64.ts')
-rw-r--r--packages/app/src/utils/base64.ts10
1 files changed, 10 insertions, 0 deletions
diff --git a/packages/app/src/utils/base64.ts b/packages/app/src/utils/base64.ts
new file mode 100644
index 000000000..c1f9d88c6
--- /dev/null
+++ b/packages/app/src/utils/base64.ts
@@ -0,0 +1,10 @@
+import { base64Decode } from "@opencode-ai/util/encode"
+
+export function decode64(value: string | undefined) {
+ if (value === undefined) return
+ try {
+ return base64Decode(value)
+ } catch {
+ return
+ }
+}