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() {
4242 } )
4343 ) . then ( ( ) => console . log ( "successfully removed all assistants" ) ) ;
4444
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+
4557 const timestamp = new Date ( ) . toISOString ( ) . replace ( / [: .] / g, "-" ) ;
4658 let summaryLog = `
4759Translation Summary (${ timestamp } )
@@ -250,7 +262,7 @@ export default async function fancyName(path: string) {
250262 const results = await Promise . allSettled (
251263 batch . map ( async file => {
252264 try {
253- console . log ( `Translating file: ${ file } ` ) ;
265+ console . log ( `Starting translation for ${ file } ` ) ;
254266 await translate ( "Chinese" , file ) ;
255267 return { file, success : true } ;
256268 } catch ( error ) {
You can’t perform that action at this time.
0 commit comments