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