This repository was archived by the owner on Nov 14, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed
packages/baseai/src/deploy Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -114,11 +114,18 @@ async function deployDocument({
114114 process . exit ( 1 ) ;
115115 }
116116
117+ // Fetch the existing documents
118+ const prodDocs = await listMemoryDocuments ( {
119+ account,
120+ memoryName
121+ } ) ;
122+
117123 await handleSingleDocDeploy ( {
118124 memory : memoryObject ,
119125 account,
120126 document,
121- overwrite
127+ overwrite,
128+ prodDocs
122129 } ) ;
123130
124131 spinner . stop (
@@ -139,23 +146,19 @@ export async function handleSingleDocDeploy({
139146 memory,
140147 account,
141148 document,
142- overwrite
149+ overwrite,
150+ prodDocs
143151} : {
144152 memory : MemoryI ;
145153 account : Account ;
146154 document : MemoryDocumentI ;
147155 overwrite : boolean ;
156+ prodDocs : string [ ] ;
148157} ) {
149158 p . log . info (
150159 `Checking "${ memory . name } " memory for document "${ document . name } ".`
151160 ) ;
152161
153- // Fetch the existing documents
154- const prodDocs = await listMemoryDocuments ( {
155- account,
156- memoryName : memory . name
157- } ) ;
158-
159162 // If overwrite is present, deploy.
160163 if ( overwrite ) {
161164 await uploadDocumentsToMemory ( {
You can’t perform that action at this time.
0 commit comments