File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,18 @@ async function saveSummaryLog() {
42
42
} )
43
43
) . then ( ( ) => console . log ( "successfully removed all assistants" ) ) ;
44
44
45
+ // list and delete all uploaded files
46
+ const files = await ai . files . list ( ) ;
47
+ await Promise . all (
48
+ files . data . map ( async file => {
49
+ try {
50
+ await ai . files . del ( file . id ) ;
51
+ } catch ( error ) {
52
+ failedDel . push ( file . id ) ;
53
+ }
54
+ } )
55
+ ) . then ( ( ) => console . log ( "successfully deleted all files" ) )
56
+
45
57
const timestamp = new Date ( ) . toISOString ( ) . replace ( / [: .] / g, "-" ) ;
46
58
let summaryLog = `
47
59
Translation Summary (${ timestamp } )
@@ -250,7 +262,7 @@ export default async function fancyName(path: string) {
250
262
const results = await Promise . allSettled (
251
263
batch . map ( async file => {
252
264
try {
253
- console . log ( `Translating file: ${ file } ` ) ;
265
+ console . log ( `Starting translation for ${ file } ` ) ;
254
266
await translate ( "Chinese" , file ) ;
255
267
return { file, success : true } ;
256
268
} catch ( error ) {
You can’t perform that action at this time.
0 commit comments