File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
components/engines/typescript/agent/tools
types/streaming/nextjs/app/api/sandbox Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -115,7 +115,7 @@ export class InterpreterTool implements BaseTool<InterpreterParameter> {
115115 for ( const filePath of input . sandboxFiles ) {
116116 const fileName = path . basename ( filePath ) ;
117117 const localFilePath = path . join ( this . uploadedFilesDir , fileName ) ;
118- const content = fs . readFileSync ( localFilePath ) ;
118+ const content = fs . readFileSync ( localFilePath ) as ArrayBuffer ;
119119 await this . codeInterpreter ?. files . write ( filePath , content ) ;
120120 }
121121 } catch ( error ) {
Original file line number Diff line number Diff line change @@ -90,7 +90,7 @@ export async function POST(req: Request) {
9090 artifact . files . forEach ( async ( sandboxFilePath ) => {
9191 const fileName = path . basename ( sandboxFilePath ) ;
9292 const localFilePath = path . join ( "output" , "uploaded" , fileName ) ;
93- const fileContent = await fs . readFile ( localFilePath ) ;
93+ const fileContent = ( await fs . readFile ( localFilePath ) ) as ArrayBuffer ;
9494
9595 await sbx . files . write ( sandboxFilePath , fileContent ) ;
9696 console . log ( `Copied file to ${ sandboxFilePath } in ${ sbx . sandboxID } ` ) ;
You can’t perform that action at this time.
0 commit comments