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> {
115
115
for ( const filePath of input . sandboxFiles ) {
116
116
const fileName = path . basename ( filePath ) ;
117
117
const localFilePath = path . join ( this . uploadedFilesDir , fileName ) ;
118
- const content = fs . readFileSync ( localFilePath ) ;
118
+ const content = fs . readFileSync ( localFilePath ) as ArrayBuffer ;
119
119
await this . codeInterpreter ?. files . write ( filePath , content ) ;
120
120
}
121
121
} catch ( error ) {
Original file line number Diff line number Diff line change @@ -90,7 +90,7 @@ export async function POST(req: Request) {
90
90
artifact . files . forEach ( async ( sandboxFilePath ) => {
91
91
const fileName = path . basename ( sandboxFilePath ) ;
92
92
const localFilePath = path . join ( "output" , "uploaded" , fileName ) ;
93
- const fileContent = await fs . readFile ( localFilePath ) ;
93
+ const fileContent = ( await fs . readFile ( localFilePath ) ) as ArrayBuffer ;
94
94
95
95
await sbx . files . write ( sandboxFilePath , fileContent ) ;
96
96
console . log ( `Copied file to ${ sandboxFilePath } in ${ sbx . sandboxID } ` ) ;
You can’t perform that action at this time.
0 commit comments