The open source coding agent.
TypeScript
fix(desktop): Properly decode session id for permission context (#6580)
OpeOginnifbd9677932d2
diff --git a/packages/app/src/context/permission.tsx b/packages/app/src/context/permission.tsxindex 06147036116..d47d850b967 100644--- a/packages/app/src/context/permission.tsx+++ b/packages/app/src/context/permission.tsx@@ -6,6 +6,7 @@ import { persisted } from "@/utils/persist"import { useGlobalSDK } from "@/context/global-sdk"import { useGlobalSync } from "./global-sync"import { useParams } from "@solidjs/router"+import { base64Decode } from "@opencode-ai/util/encode"type PermissionRespondFn = (input: {sessionID: string@@ -26,8 +27,8 @@ export const { use: usePermission, provider: PermissionProvider } = createSimpleconst globalSync = useGlobalSync()const permissionsEnabled = createMemo(() => {- if (!params.dir) return false- const [store] = globalSync.child(params.dir)+ if (!params.dir || !base64Decode(params.dir)) return false+ const [store] = globalSync.child(base64Decode(params.dir))return store.config.permission !== undefined})