Release v0.1.2

This commit is contained in:
winlifes
2026-04-30 18:12:29 +08:00
parent 8c46313ac6
commit a903f7f0af
12 changed files with 423 additions and 24 deletions
+2 -1
View File
@@ -4,6 +4,7 @@ const fs = require('fs');
const path = require('path');
const { getCurrentSelection, queryAssetInfo, queryAssetMeta } = require('./assets');
const { runScriptDiagnostics } = require('./diagnostics');
const { resolveProjectPath } = require('./path-safety');
function createResource(uri, name, description) {
return { uri, name, description, mimeType: 'text/plain' };
@@ -199,7 +200,7 @@ class ResourceProvider {
readAssetByPath(relativePath) {
const { projectPath } = this.getRuntimeContext();
const fullPath = path.isAbsolute(relativePath) ? relativePath : path.join(projectPath, relativePath);
const fullPath = resolveProjectPath(projectPath, relativePath);
if (!fs.existsSync(fullPath)) {
return `Asset not found: ${relativePath}`;
}