@@ -58,11 +58,9 @@ export async function POST(request: NextRequest) {
5858
5959    let  previousResponseId : string  |  undefined  =  undefined ; 
6060    if  ( encryptedPreviousResponseId )  { 
61-       // console.log('Received encryptedPreviousResponseId:', encryptedPreviousResponseId); 
6261      try  { 
6362        previousResponseId  =  decrypt ( encryptedPreviousResponseId ,  Buffer . from ( process . env . PREVIOUS_RESPONSE_ID_SECRET ! ,  'hex' ) ) ; 
64-       }  catch  { 
65-       } 
63+       }  catch  { } 
6664    } 
6765
6866    // Read system prompt 
@@ -106,29 +104,13 @@ Achtung! Die Dateien haben mehr Zeilen als hier gezeigt. Alle Dateien sind im Or
106104                  exerciseData . data_files . map ( f  =>  path . join ( process . cwd ( ) ,  'prompts' ,  exerciseData . folder ,  f ) ) , 
107105                  sessionId 
108106                ) ; 
109-                 if  ( result . resultFiles )  { 
110-                   for  ( const  resultFile  of  result . resultFiles )  { 
111-                     // TODO: handle non-image files differently (see GH issue #29) 
112-                     const  markdownImage  =  ` ; 
114-                     controller . enqueue ( encoder . encode ( `data: ${ data }  ) ) ; 
115-                   } 
116-                 } 
117-                 if  ( result . stdout  ||  result . stderr )  { 
118-                   // TODO: send the output as a collapsed section (see GH issue #17) 
119-                 } 
120107                return  JSON . stringify ( result ) ; 
121108              } , 
122109            ) ; 
123110
124111            // Update session with new response ID 
125112            // Encrypt previousResponseId before sending to client 
126-             let  encryptedResponseId : string  |  undefined ; 
127-             // console.log('New previousResponseId:', newPreviousResponseId); 
128-             // console.log('Encryption key:', process.env.PREVIOUS_RESPONSE_ID_SECRET); 
129-             // Revert key.toString('hex') first 
130- 
131-             encryptedResponseId  =  encrypt ( newPreviousResponseId ,  Buffer . from ( process . env . PREVIOUS_RESPONSE_ID_SECRET ! ,  'hex' ) ) ; 
113+             let  encryptedResponseId  =  encrypt ( newPreviousResponseId ,  Buffer . from ( process . env . PREVIOUS_RESPONSE_ID_SECRET ! ,  'hex' ) ) ; 
132114
133115            const  data  =  JSON . stringify ( {  encryptedResponseId } ) ; 
134116            controller . enqueue ( encoder . encode ( `data: ${ data }  ) ) ; 
0 commit comments