diff --git a/front/components/assistant_builder/AssistantBuilderAvatarPicker.tsx b/front/components/assistant_builder/AssistantBuilderAvatarPicker.tsx
index f6dbc640ebf9..14b38d85ca45 100644
--- a/front/components/assistant_builder/AssistantBuilderAvatarPicker.tsx
+++ b/front/components/assistant_builder/AssistantBuilderAvatarPicker.tsx
@@ -144,7 +144,7 @@ export function AvatarPicker({
isOpen={isOpen}
onClose={onClose}
title="Select an avatar for your assistant:"
- isFullScreen={false}
+ isFullScreen={true}
hasChanged={currentTab === "upload" && !!src}
onSave={isUploadingAvatar ? undefined : onUpload}
>
@@ -154,98 +154,104 @@ export function AvatarPicker({
onChange={onFileChange}
ref={fileInputRef}
/>
-
- {avatarUrls.map(({ available, url }) => (
-
{
- if (available) {
- onPick(url);
- onClose();
- }
- }}
- >
-
}
- clickable={available}
- />
-
- ))}
+
+
+ {
+ const isUploadTab = tab.startsWith("Upload");
+ if (isUploadTab) {
+ setCurrentTab("upload");
+ } else {
+ setCurrentTab("pick");
+ }
+ }}
+ />
- )}
-
+ {avatarUrls.map(({ available, url }) => (
+
{
+ if (available) {
+ onPick(url);
+ onClose();
+ }
+ }}
+ >
+
}
+ clickable={available}
+ />
+
+ ))}
+
)}
- >
- {src ? (
-
-
setCrop(pC)}>
- {
- const { naturalWidth: width, naturalHeight: height } =
- event.currentTarget;
-
- const newCrop = centerCrop(
- makeAspectCrop(
- {
- unit: "%",
- width: 100,
- },
- 1,
+
+ {src ? (
+
+
setCrop(pC)}
+ >
+ {
+ const { naturalWidth: width, naturalHeight: height } =
+ event.currentTarget;
+
+ const newCrop = centerCrop(
+ makeAspectCrop(
+ {
+ unit: "%",
+ width: 100,
+ },
+ 1,
+ width,
+ height
+ ),
width,
height
- ),
- width,
- height
- );
+ );
- setCrop(newCrop);
- }}
- ref={imageRef}
- />
-
-
- ) : (
-
+ ) : (
+
);
diff --git a/front/package-lock.json b/front/package-lock.json
index 1028dd625c25..9bd080ccf7ad 100644
--- a/front/package-lock.json
+++ b/front/package-lock.json
@@ -5,7 +5,7 @@
"packages": {
"": {
"dependencies": {
- "@dust-tt/sparkle": "0.1.85",
+ "@dust-tt/sparkle": "0.1.89",
"@headlessui/react": "^1.7.7",
"@heroicons/react": "^2.0.11",
"@nangohq/frontend": "^0.16.1",
@@ -722,9 +722,9 @@
"license": "Apache-2.0"
},
"node_modules/@dust-tt/sparkle": {
- "version": "0.1.85",
- "resolved": "https://registry.npmjs.org/@dust-tt/sparkle/-/sparkle-0.1.85.tgz",
- "integrity": "sha512-/Z8aM1eTxRfaZGQnDtiwxtpFMB2Db3ZiLhg3xD8p7m12GZFCcwUUm4uiinfjMGL+KPL/dH0ZfhZ2J8fNTxTErw==",
+ "version": "0.1.89",
+ "resolved": "https://registry.npmjs.org/@dust-tt/sparkle/-/sparkle-0.1.89.tgz",
+ "integrity": "sha512-/JOKBD1w2yPWdqFsCj7k/BKHTO3bIvMUl0K+cI9cDhfYQcZzueFpzyhgvOLfhScYSJx3/BohI4cgGQ1PxFt6wg==",
"dependencies": {
"@headlessui/react": "^1.7.17"
},
@@ -12876,6 +12876,7 @@
},
"node_modules/unix-dgram": {
"version": "2.0.6",
+ "hasInstallScript": true,
"license": "ISC",
"optional": true,
"dependencies": {
diff --git a/front/package.json b/front/package.json
index bf69678169c6..57354696453e 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.85",
+ "@dust-tt/sparkle": "0.1.89",
"@headlessui/react": "^1.7.7",
"@heroicons/react": "^2.0.11",
"@nangohq/frontend": "^0.16.1",