claude-code-templates 1.21.9 → 1.21.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -67,7 +67,31 @@ const activeTasks = new Map();
67
67
 
68
68
  // Serve the sandbox interface at root
69
69
  app.get('/', (req, res) => {
70
- res.sendFile(path.join(__dirname, '../../docs/sandbox-interface.html'));
70
+ // Try local file first (when running from npm package)
71
+ const localPath = path.join(__dirname, 'sandbox-interface.html');
72
+ // Fallback to docs folder (when running from source)
73
+ const docsPath = path.join(__dirname, '../../docs/sandbox-interface.html');
74
+
75
+ if (fs.existsSync(localPath)) {
76
+ res.sendFile(localPath);
77
+ } else if (fs.existsSync(docsPath)) {
78
+ res.sendFile(docsPath);
79
+ } else {
80
+ res.status(404).send(`
81
+ <html>
82
+ <body style="font-family: system-ui; padding: 40px; background: #0f0f0f; color: #e0e0e0;">
83
+ <h1>❌ Sandbox Interface Not Found</h1>
84
+ <p>The sandbox-interface.html file could not be found.</p>
85
+ <p>Please reinstall the package or check your installation.</p>
86
+ <pre style="background: #1a1a1a; padding: 10px; border-radius: 5px;">
87
+ Tried paths:
88
+ - ${localPath}
89
+ - ${docsPath}
90
+ </pre>
91
+ </body>
92
+ </html>
93
+ `);
94
+ }
71
95
  });
72
96
 
73
97
  // Serve static files for CSS, JS, etc. (but not index.html at root)