Spaces:
Running
Running
Download debug_script.cjs from Luca448/APP-Backend: direct link, hf CLI and curl.
- Browser
- Download file 831 Bytes
-
https://huggingface.co/spaces/Luca448/APP-Backend/resolve/main/debug_script.cjs
- Command line
-
hf download hf://spaces/Luca448/APP-Backend/debug_script.cjs
-
curl -L -o debug_script.cjs https://huggingface.co/spaces/Luca448/APP-Backend/resolve/main/debug_script.cjs
831 Bytes
| const fs = require('fs'); | |
| let code = fs.readFileSync('src/views/chat/chat-view.js', 'utf8'); | |
| code = code.replace( | |
| /this\.transitionToLoading\(\);/g, | |
| `console.log('triggering transitionToLoading'); this.transitionToLoading();` | |
| ); | |
| code = code.replace( | |
| /transitionToLoading\(\) \{/g, | |
| `transitionToLoading() { | |
| console.log('transitionToLoading called. canvas height:', document.getElementById('particle-logo-canvas')?.height);` | |
| ); | |
| code = code.replace( | |
| /canvas\.width = viewRect\.width \* dpr;/g, | |
| `console.log('Resizing canvas to', viewRect.width, viewRect.height); canvas.width = viewRect.width * dpr;` | |
| ); | |
| code = code.replace( | |
| /this\.cleanupParticleLogo\(true\);/g, | |
| `console.log('cleanupParticleLogo called with true'); this.cleanupParticleLogo(true);` | |
| ); | |
| fs.writeFileSync('src/views/chat/chat-view.js', code); | |