diff --git a/src/lib/commandCenter/commandCenter.svelte b/src/lib/commandCenter/commandCenter.svelte
index c40eb0844..a53941916 100644
--- a/src/lib/commandCenter/commandCenter.svelte
+++ b/src/lib/commandCenter/commandCenter.svelte
@@ -12,13 +12,24 @@
setContext(contextKey, store);
return store;
};
+
+ export const toggleCommandCenter = () => {
+ if (get(subPanels).length > 0) {
+ clearSubPanels();
+ } else {
+ addSubPanel({
+ name: 'root',
+ component: Root
+ });
+ }
+ };
@@ -48,7 +47,7 @@
{#if projectType === 'existing'}
({
label: p.name,