Release v1.01 Enhanced: Vi Control, TUI Gen5, Core Stability

This commit is contained in:
Gemini AI
2025-12-20 01:12:45 +04:00
Unverified
parent 2407c42eb9
commit 142aaeee1e
254 changed files with 44888 additions and 31025 deletions

View File

@@ -0,0 +1,32 @@
/**
* File System API Bridge
*/
import fs from 'fs/promises';
import path from 'path';
export const fsApi = {
async listFiles(dirPath) {
try {
const files = await fs.readdir(dirPath, { withFileTypes: true });
return files.map(f => ({
name: f.name,
isDirectory: f.isDirectory(),
path: path.join(dirPath, f.name)
}));
} catch (e) {
console.error('List files error:', e);
throw e;
}
},
async readFile(filePath) {
return fs.readFile(filePath, 'utf-8');
},
async writeFile(filePath, content) {
// Ensure dir exists
await fs.mkdir(path.dirname(filePath), { recursive: true });
return fs.writeFile(filePath, content, 'utf-8');
},
async deletePath(targetPath) {
await fs.rm(targetPath, { recursive: true, force: true });
}
};