@@ -33,7 +33,6 @@ export class NoirPluginClient extends PluginClient {
3333 }
3434
3535 init ( ) : void {
36- console . log ( 'initializing noir plugin...' )
3736 }
3837
3938 onActivation ( ) : void {
@@ -45,7 +44,6 @@ export class NoirPluginClient extends PluginClient {
4544 // @ts -ignore
4645 this . ws = new WebSocket ( `${ WS_URL } ` )
4746 this . ws . onopen = ( ) => {
48- console . log ( 'WebSocket connection opened' )
4947 }
5048 this . ws . onmessage = ( event ) => {
5149 const message = JSON . parse ( event . data )
@@ -62,7 +60,6 @@ export class NoirPluginClient extends PluginClient {
6260 this . logFn ( 'WebSocket error: ' + event )
6361 }
6462 this . ws . onclose = ( ) => {
65- console . log ( 'WebSocket connection closed' )
6663 // restart the websocket connection
6764 this . ws = null
6865 setTimeout ( this . setupWebSocketEvents . bind ( this ) , 5000 )
@@ -184,7 +181,6 @@ export class NoirPluginClient extends PluginClient {
184181
185182 async generateProof ( path : string ) : Promise < void > {
186183 const requestID = this . generateRequestID ( )
187- console . log ( `[${ requestID } ] New proof generation request for: ${ path } ` )
188184
189185 this . internalEvents . emit ( 'noir_proofing_start' )
190186 this . emit ( 'statusChanged' , { key : 'loading' , title : 'Generating Proof...' , type : 'info' } )
@@ -196,7 +192,7 @@ export class NoirPluginClient extends PluginClient {
196192 if ( this . ws . readyState !== WebSocket . OPEN ) {
197193 throw new Error ( 'WebSocket connection not open. Cannot generate proof.' )
198194 }
199-
195+
200196 projectRoot = await this . findProjectRoot ( path )
201197 if ( projectRoot === null ) {
202198 throw new Error ( `Invalid project structure for '${ path } '. Could not find project root.` )
@@ -241,11 +237,9 @@ export class NoirPluginClient extends PluginClient {
241237 'public_inputs' : { path : `${ buildPath } /public_inputs` , type : 'string' , isPublicInputs : true } ,
242238 }
243239
244- console . log ( '[Noir Plugin] Starting file extraction loop...' )
245-
246240 for ( const [ zipPath , info ] of Object . entries ( filesToSave ) ) {
247241 const file = zip . file ( zipPath )
248-
242+
249243 if ( file ) {
250244 let content : string ;
251245
@@ -255,46 +249,40 @@ export class NoirPluginClient extends PluginClient {
255249 } else {
256250 content = await file . async ( 'string' ) ;
257251 }
258-
252+
259253 // @ts -ignore
260254 if ( info . isProof ) formattedProof = content
261255 // @ts -ignore
262256 if ( info . isPublicInputs ) formattedPublicInputsStr = content
263257 // @ts -ignore
264258 if ( info . isScript ) {
265- console . log ( `[Noir Plugin] Found script file: ${ zipPath } . Replacing placeholder with: '${ buildPath } '` )
266259 content = content . replace ( / % % B U I L D _ P A T H % % / g, buildPath )
267260 }
268261
269262 await this . call ( 'fileManager' , 'writeFile' , info . path , content )
270263 // @ts -ignore
271264 this . call ( 'terminal' , 'log' , { type : 'log' , value : `Wrote artifact: ${ info . path } ` } )
272-
265+
273266 } else {
274267 // @ts -ignore
275268 this . call ( 'terminal' , 'log' , { type : 'warn' , value : `Warning: File '${ zipPath } ' not found in zip from backend.` } )
276- console . warn ( `[Noir Plugin] File not found in zip: ${ zipPath } ` )
277269 }
278270 }
279- console . log ( '[Noir Plugin] File extraction loop finished.' )
280-
281- console . log ( '[Noir Plugin] Formatting verifier inputs...' )
282271 // @ts -ignore
283272 this . call ( 'terminal' , 'log' , { type : 'log' , value : 'Formatting Verifier.sol inputs...' } )
284273
285274 if ( ! formattedProof || ! formattedPublicInputsStr ) {
286275 console . error ( '[Noir Plugin] Error: formattedProof or formattedPublicInputsStr is null or empty after loop.' )
287276 throw new Error ( "Formatted proof or public inputs data could not be read from zip stream." )
288277 }
289-
278+
290279 const formattedPublicInputs = JSON . parse ( formattedPublicInputsStr )
291-
280+
292281 const verifierInputs : VerifierInputs = {
293282 proof : formattedProof ,
294283 publicInputs : formattedPublicInputs
295284 }
296285
297- console . log ( '[Noir Plugin] Emitting noir_proofing_done with payload:' , verifierInputs )
298286 this . internalEvents . emit ( 'noir_proofing_done' , verifierInputs )
299287
300288 this . emit ( 'statusChanged' , { key : 'succeed' , title : 'Proof generated successfully' , type : 'success' } )
@@ -307,7 +295,7 @@ export class NoirPluginClient extends PluginClient {
307295 if ( e . response && e . response . data ) {
308296 try {
309297 let errorData = e . response . data
310-
298+
311299 if ( e . response . data instanceof Blob ) {
312300 const errorText = await e . response . data . text ( )
313301 errorData = JSON . parse ( errorText )
0 commit comments