From 73515d1a592c135c7007d7775f80998bf485a595 Mon Sep 17 00:00:00 2001 From: "shi.gg" Date: Sun, 18 Jan 2026 19:03:19 +0000 Subject: [PATCH] fix: Cannot clone a subclass of BskyAgent http://witchsky.app/profile/did:plc:q7suwaz53ztc4mbiqyygbn43/post/3mcnu54wgks2x http://localhost:19006/profile/did:plc:q7suwaz53ztc4mbiqyygbn43/post/3mcnu54wgks2x --- src/state/session/agent.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/state/session/agent.ts b/src/state/session/agent.ts index 1443d87d3..17ae5790b 100644 --- a/src/state/session/agent.ts +++ b/src/state/session/agent.ts @@ -465,6 +465,9 @@ class BskyAppAgent extends BskyAgent { * other PDS-specific operations like preferences. */ export function pdsAgent(agent: T): T { + if ('cloneWithoutProxy' in agent && typeof agent.cloneWithoutProxy === 'function') { + return agent.cloneWithoutProxy() as T + } const clone = agent.clone() as T clone.configureProxy(null) return clone -- 2.51.2