From 64c3db60bd41e2f276974512c73db9429ec965ab Mon Sep 17 00:00:00 2001 From: CREDO23 Date: Mon, 22 Jun 2026 22:36:20 +0200 Subject: [PATCH] feat: add artifacts panel toggle action --- .../features/chat-artifacts/state/artifacts-panel.atom.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/surfsense_web/features/chat-artifacts/state/artifacts-panel.atom.ts b/surfsense_web/features/chat-artifacts/state/artifacts-panel.atom.ts index 2ed0f7479..1a0f5e738 100644 --- a/surfsense_web/features/chat-artifacts/state/artifacts-panel.atom.ts +++ b/surfsense_web/features/chat-artifacts/state/artifacts-panel.atom.ts @@ -29,3 +29,8 @@ export const closeArtifactsPanelAtom = atom(null, (get, set) => { set(preArtifactsCollapsedAtom, null); } }); + +export const toggleArtifactsPanelAtom = atom(null, (get, set) => { + if (get(artifactsPanelOpenAtom)) set(closeArtifactsPanelAtom); + else set(openArtifactsPanelAtom); +});