diff --git a/front/components/WorkspacePicker.tsx b/front/components/WorkspacePicker.tsx
index faa783f239f1..e8e2598626eb 100644
--- a/front/components/WorkspacePicker.tsx
+++ b/front/components/WorkspacePicker.tsx
@@ -1,7 +1,5 @@
-import { ChevronDownIcon } from "@dust-tt/sparkle";
-import { Menu } from "@headlessui/react";
+import { DropdownMenu } from "@dust-tt/sparkle";
-import { classNames } from "@app/lib/utils";
import { UserType, WorkspaceType } from "@app/types/user";
export default function WorkspacePicker({
@@ -15,54 +13,22 @@ export default function WorkspacePicker({
onWorkspaceUpdate: (w: WorkspaceType) => void;
}) {
return (
-
-
-
+
+ {user.workspaces.map((w) => {
+ return (
+ void onWorkspaceUpdate(w)}
+ label={w.name}
+ />
+ );
+ })}
+
+
);
}
diff --git a/front/components/sparkle/AppLayout.tsx b/front/components/sparkle/AppLayout.tsx
index b4b990071fa6..67e33b47ae96 100644
--- a/front/components/sparkle/AppLayout.tsx
+++ b/front/components/sparkle/AppLayout.tsx
@@ -1,5 +1,5 @@
-import { Item, Logo, Tab, XMarkIcon } from "@dust-tt/sparkle";
-import { Dialog, Menu, Transition } from "@headlessui/react";
+import { DropdownMenu, Item, Logo, Tab, XMarkIcon } from "@dust-tt/sparkle";
+import { Dialog, Transition } from "@headlessui/react";
import { Bars3Icon } from "@heroicons/react/20/solid";
import Head from "next/head";
import { useRouter } from "next/router";
@@ -43,54 +43,31 @@ function NavigationBar({
diff --git a/front/components/use/chat/ChatSidebarMenu.tsx b/front/components/use/chat/ChatSidebarMenu.tsx
index f045d3dc2d08..4d555250e969 100644
--- a/front/components/use/chat/ChatSidebarMenu.tsx
+++ b/front/components/use/chat/ChatSidebarMenu.tsx
@@ -1,10 +1,4 @@
-import {
- Button,
- ChatBubbleBottomCenterPlusIcon,
- Item,
- ItemSectionHeader,
- ListItem,
-} from "@dust-tt/sparkle";
+import { Button, ChatBubbleBottomCenterPlusIcon, Item } from "@dust-tt/sparkle";
import { PlanetIcon } from "@dust-tt/sparkle";
import { useRouter } from "next/router";
@@ -56,10 +50,10 @@ export function ChatSidebarMenu({
{sessions.length > 0 && (
-
+
)}
-
+
{sessions.length === 0
? null
: sessions.map((s) => {
@@ -73,7 +67,7 @@ export function ChatSidebarMenu({
>
);
})}
-
+
diff --git a/front/package-lock.json b/front/package-lock.json
index 021c459a0ae9..083f2f1c4fdf 100644
--- a/front/package-lock.json
+++ b/front/package-lock.json
@@ -5,7 +5,7 @@
"packages": {
"": {
"dependencies": {
- "@dust-tt/sparkle": "0.1.37",
+ "@dust-tt/sparkle": "0.1.43",
"@headlessui/react": "^1.7.7",
"@heroicons/react": "^2.0.11",
"@nangohq/frontend": "^0.16.1",
@@ -713,9 +713,12 @@
"license": "Apache-2.0"
},
"node_modules/@dust-tt/sparkle": {
- "version": "0.1.37",
- "resolved": "https://registry.npmjs.org/@dust-tt/sparkle/-/sparkle-0.1.37.tgz",
- "integrity": "sha512-zGkYFYyD9mKxEkV0WIThL2/nO81Xt9S+PytDm5bPI9SvL5RkjbE7bWAv8Vaw4L+pFGzv2kBWyYZHwnFECwZODw==",
+ "version": "0.1.43",
+ "resolved": "https://registry.npmjs.org/@dust-tt/sparkle/-/sparkle-0.1.43.tgz",
+ "integrity": "sha512-Z5zCBIZxDmKFu5YIohAWchaRNyGIPxsbUAfjbI6asv7zQHkc8aY3JQdMsxxj61sFTzHWMlrWKA3QBkDHskCT/A==",
+ "dependencies": {
+ "@headlessui/react": "^1.7.17"
+ },
"peerDependencies": {
"react": "^18.2.0"
}
@@ -1114,8 +1117,9 @@
"license": "Apache-2.0"
},
"node_modules/@headlessui/react": {
- "version": "1.7.15",
- "license": "MIT",
+ "version": "1.7.17",
+ "resolved": "https://registry.npmjs.org/@headlessui/react/-/react-1.7.17.tgz",
+ "integrity": "sha512-4am+tzvkqDSSgiwrsEpGWqgGo9dz8qU5M3znCkC4PgkpY4HcCZzEDEvozltGGGHIKl9jbXbZPSH5TWn4sWJdow==",
"dependencies": {
"client-only": "^0.0.1"
},
diff --git a/front/package.json b/front/package.json
index f645f02e1c41..d6fde27e17ea 100644
--- a/front/package.json
+++ b/front/package.json
@@ -13,7 +13,7 @@
"initdb": "env $(cat .env.local) npx tsx admin/db.ts"
},
"dependencies": {
- "@dust-tt/sparkle": "0.1.37",
+ "@dust-tt/sparkle": "0.1.43",
"@headlessui/react": "^1.7.7",
"@heroicons/react": "^2.0.11",
"@nangohq/frontend": "^0.16.1",
diff --git a/front/pages/w/[wId]/workspace/index.tsx b/front/pages/w/[wId]/workspace/index.tsx
index 2b8474a6f63c..4f382941b230 100644
--- a/front/pages/w/[wId]/workspace/index.tsx
+++ b/front/pages/w/[wId]/workspace/index.tsx
@@ -1,10 +1,4 @@
-import {
- Button,
- Checkbox,
- KeyIcon,
- PageHeader,
- SectionHeader,
-} from "@dust-tt/sparkle";
+import { Button, KeyIcon, PageHeader, SectionHeader } from "@dust-tt/sparkle";
import { Listbox } from "@headlessui/react";
import { CheckIcon, ChevronUpDownIcon } from "@heroicons/react/20/solid";
import { GetServerSideProps, InferGetServerSidePropsType } from "next";
diff --git a/sparkle/src/stories/DropdownMenu.stories.tsx b/sparkle/src/stories/DropdownMenu.stories.tsx
index 0648f0a1e178..00a4677b0177 100644
--- a/sparkle/src/stories/DropdownMenu.stories.tsx
+++ b/sparkle/src/stories/DropdownMenu.stories.tsx
@@ -1,11 +1,10 @@
-import type { Meta, StoryObj } from "@storybook/react";
+import type { Meta } from "@storybook/react";
import React from "react";
import {
ChatBubbleBottomCenterTextIcon,
DropdownMenu,
Icon,
- Logo,
PlanetIcon,
} from "../index_with_tw_base";