From 1f294ef4a171eec72a069a9503629eaf7975d983 Mon Sep 17 00:00:00 2001 From: geireann Date: Thu, 17 Apr 2025 13:52:58 -0400 Subject: fix for resizing docs with native width and modify native dim set (fixes dailyjournal resizing). --- src/client/views/DocumentDecorations.tsx | 4 ++-- src/client/views/nodes/DocumentView.tsx | 2 +- src/client/views/nodes/chatbot/vectorstore/Vectorstore.ts | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) (limited to 'src/client/views') diff --git a/src/client/views/DocumentDecorations.tsx b/src/client/views/DocumentDecorations.tsx index 0756d3d9e..120467e8a 100644 --- a/src/client/views/DocumentDecorations.tsx +++ b/src/client/views/DocumentDecorations.tsx @@ -551,7 +551,7 @@ export class DocumentDecorations extends ObservableReactComponent() { } @computed private get nativeScaling() { if (this.shouldNotScale) return 1; - const minTextScale = this.Document.type === DocumentType.RTF ? 0.1 : 0; + const minTextScale = [DocumentType.RTF, DocumentType.JOURNAL].includes(this.Document.type as DocumentType) ? 0.1 : 0; const ai = this._showAIEditor && this.nativeWidth === this.layoutDoc.width ? 95 : 0; const effNW = Math.max(this.effectiveNativeWidth - ai, 1); const effNH = Math.max(this.effectiveNativeHeight - ai, 1); diff --git a/src/client/views/nodes/chatbot/vectorstore/Vectorstore.ts b/src/client/views/nodes/chatbot/vectorstore/Vectorstore.ts index afd34f28d..c1915a398 100644 --- a/src/client/views/nodes/chatbot/vectorstore/Vectorstore.ts +++ b/src/client/views/nodes/chatbot/vectorstore/Vectorstore.ts @@ -42,7 +42,8 @@ export class Vectorstore { constructor(id: string, doc_ids: () => string[]) { const pineconeApiKey = process.env.PINECONE_API_KEY; if (!pineconeApiKey) { - throw new Error('PINECONE_API_KEY is not defined.'); + console.log('PINECONE_API_KEY is not defined - Vectorstore will be unavailable'); + return; } // Initialize Pinecone and OpenAI clients with API keys from the environment. -- cgit v1.2.3-70-g09d2