mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-06 08:37:22 +00:00
Add AI settings
This commit is contained in:
12 files changed
+527
-40
No files matched your search
@@ -0,0 +1,28 @@
|
||||
import { fsManager } from './fs';
|
||||
|
||||
export async function debugProjectFiles(projectId: string) {
|
||||
console.log('=== Debugging project files ===');
|
||||
console.log('Project ID:', projectId);
|
||||
|
||||
try {
|
||||
const rootFiles = await fsManager.listFiles(projectId, '');
|
||||
console.log('Root files:', rootFiles);
|
||||
|
||||
for (const file of rootFiles) {
|
||||
const filePath = `${fsManager['dir']}/${projectId}/${file}`;
|
||||
try {
|
||||
const stat = await fsManager['fs'].promises.stat(filePath);
|
||||
console.log(`${file}: ${stat.isDirectory() ? 'directory' : 'file'}`);
|
||||
|
||||
if (stat.isDirectory() && file !== '.git') {
|
||||
const subFiles = await fsManager.listFiles(projectId, file);
|
||||
console.log(` ${file}/ contents:`, subFiles);
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(`Error accessing ${file}:`, error);
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Error listing files:', error);
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -204,7 +204,7 @@ export default defineConfig({
|
||||
async writeFile(projectId: string, filePath: string, content: string): Promise<void> {
|
||||
const fullPath = `${this.dir}/${projectId}/${filePath}`;
|
||||
const dir = fullPath.split('/').slice(0, -1).join('/');
|
||||
await this.fs.promises.mkdir(dir, { recursive: true });
|
||||
await this.fs.promises.mkdir(dir);
|
||||
await this.fs.promises.writeFile(fullPath, content);
|
||||
|
||||
// Update last modified
|
||||
|
||||
Reference in new issue
Block a user