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 @@ -115,11 +115,18 @@ async function deployDocument({
115
115
process . exit ( 1 ) ;
116
116
}
117
117
118
+ // Fetch the existing documents
119
+ const prodDocs = await listMemoryDocuments ( {
120
+ account,
121
+ memoryName
122
+ } ) ;
123
+
118
124
await handleSingleDocDeploy ( {
119
125
memory : memoryObject ,
120
126
account,
121
127
document,
122
- overwrite
128
+ overwrite,
129
+ prodDocs
123
130
} ) ;
124
131
125
132
spinner . stop (
@@ -140,23 +147,19 @@ export async function handleSingleDocDeploy({
140
147
memory,
141
148
account,
142
149
document,
143
- overwrite
150
+ overwrite,
151
+ prodDocs
144
152
} : {
145
153
memory : MemoryI ;
146
154
account : Account ;
147
155
document : MemoryDocumentI ;
148
156
overwrite : boolean ;
157
+ prodDocs : string [ ] ;
149
158
} ) {
150
159
p . log . info (
151
160
`Checking "${ memory . name } " memory for document "${ document . name } ".`
152
161
) ;
153
162
154
- // Fetch the existing documents
155
- const prodDocs = await listMemoryDocuments ( {
156
- account,
157
- memoryName : memory . name
158
- } ) ;
159
-
160
163
// If overwrite is present, deploy.
161
164
if ( overwrite ) {
162
165
await uploadDocumentsToMemory ( {
You can’t perform that action at this time.
0 commit comments