Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Address desktop Ensu Packs review feedback

setalp64c2ae9cb544
diff --git a/web/apps/ensu/src/components/chat/ChatComposer.tsx b/web/apps/ensu/src/components/chat/ChatComposer.tsx
index a307776b6e..9fc1f74e10 100644
--- a/web/apps/ensu/src/components/chat/ChatComposer.tsx
+++ b/web/apps/ensu/src/components/chat/ChatComposer.tsx
@@ -131,7 +131,12 @@ export const ChatComposer = memo(
actionIconProps,
stopButtonColor,
}: ChatComposerProps) => {
+ const isModelPreparationActive =
+ modelGateStatus === "checking" ||
+ modelGateStatus === "preloading" ||
+ modelGateStatus === "downloading";
const disableSend =
+ isModelPreparationActive ||
isDownloading ||
(!isGenerating &&
!input.trim() &&
@@ -139,6 +144,7 @@ export const ChatComposer = memo(
pendingImages.length === 0);
const disableAttachmentButton =
isGenerating ||
+ isModelPreparationActive ||
isDownloading ||
(showImageAttachment && isImageAttachmentLimitReached);
diff --git a/web/apps/ensu/src/components/chat/ChatDialogs.tsx b/web/apps/ensu/src/components/chat/ChatDialogs.tsx
index 2890736ad5..1867c6c78e 100644
--- a/web/apps/ensu/src/components/chat/ChatDialogs.tsx
+++ b/web/apps/ensu/src/components/chat/ChatDialogs.tsx
@@ -764,10 +764,7 @@ export const ChatDialogs = memo(
</Button>
</Stack>
)}
- {knowledgeCatalogLoading &&
- knowledgePacks.length === 0 && (
- <LinearProgress />
- )}
+ {knowledgeCatalogLoading && <LinearProgress />}
{knowledgePacks.map((pack) => {
const progress =
knowledgeDownloadProgress[pack.stableId];
diff --git a/web/apps/ensu/src/pages/chat.tsx b/web/apps/ensu/src/pages/chat.tsx
index 43e58c5052..de3f6aca61 100644
--- a/web/apps/ensu/src/pages/chat.tsx
+++ b/web/apps/ensu/src/pages/chat.tsx
@@ -1005,7 +1005,7 @@ const Page: React.FC = () => {
.filter((pack) => !enabled.has(pack.stableId))
.map((pack) => pack.stableId);
if (disabledStableIds.length === 0) return;
- void loadKnowledgeCatalog(disabledStableIds)
+ return loadKnowledgeCatalog(disabledStableIds)
.then((updates) => {
setKnowledgePacks((current) => {
const currentById = new Map(
@@ -4178,7 +4178,7 @@ const Page: React.FC = () => {
if (!trimmed && !hasDocuments && !hasImages) {
return;
}
- if (showModelGate) return;
+ if (showModelGate || isModelPreparationActive) return;
if (generationStartingRef.current || generationStoppingRef.current) {
return;
}
@@ -4409,6 +4409,7 @@ const Page: React.FC = () => {
editingMessage,
isDownloading,
isGenerating,
+ isModelPreparationActive,
messageState.path,
pendingDocuments,
pendingImages,