From 0bd12de8d8e690a9052c11d95a05687432ed962e Mon Sep 17 00:00:00 2001 From: seb Date: Tue, 6 Oct 2026 12:42:22 +0200 Subject: [PATCH] u --- src/services/conversationManager.js | 1 + src/tools/javascript.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/services/conversationManager.js b/src/services/conversationManager.js index 8a5cbb2..08bda0e 100644 --- a/src/services/conversationManager.js +++ b/src/services/conversationManager.js @@ -129,6 +129,7 @@ async function buildSystemPrompt(vfsRoot, googleAuthId) { '', 'VIRTUAL FILESYSTEM:', '- Persistent per-company VFS. Paths are root-relative forward-slash (e.g. "labels/sheet1.png").', + '- Can host an entire static website (HTML, CSS, JS, images, etc.).', '- Text: list with find_files, read with read_file, write with patch.', '- User attachments are saved to VFS (e.g. "attachments/...") and tagged in user messages as `[ATTACHMENT name= path= type=]`. Inspect attachments with appropriate tools: `read_file` (text/csv/json), `pdf_read` (PDFs), or `analyze_image` (images).', '- Markdown links: Internet links are "https://..." or simply "hostname.com" / "hostname.com/filename". A pure relative path with no dotted hostname is always a VFS relative path (e.g. `[download](report.csv)` or `![preview](images/photo.png)`).', diff --git a/src/tools/javascript.js b/src/tools/javascript.js index e646796..283e44f 100644 --- a/src/tools/javascript.js +++ b/src/tools/javascript.js @@ -124,7 +124,7 @@ export function createJavascriptExecuteTool({ googleAuthId }) { description: 'Execute JS in isolated worker sandbox. Assign `module.exports` to return value (sync value or Promise; wrap async in IIFE: `module.exports = (async () => { ... })()`). ' + 'REST API: `await fetch("/path")` (authenticated). ' + - 'VFS: directly use global `fs.readFileSync`/`writeFileSync` for binary artifacts/buffers/images (`image/` is read-only; paths must be relative paths, root is not allowed). ' + + 'VFS: directly use global `fs.readFileSync`/`writeFileSync` for binary artifacts/buffers/images (`image/` is read-only; paths must be relative paths, root is not allowed). VFS can host a static website (HTML, CSS, JS, images, etc.). ' + 'Embed generated images/links in markdown: `![alt](relative/path)`. Internet links use `https://...` or `hostname.com`/`hostname.com/filename`; a pure relative file with no dotted hostname is always a VFS relative path. Use find_files/read_file/patch for text. ' + 'All APIs are pre-injected globals: `fs`/`vfs` (virtual filesystem), `sharp` (image processing), WebCrypto `crypto` (`subtle`, `randomUUID`), and standard web globals. Do NOT use `require()` or `import` (disabled; all necessary APIs are already in global scope).', strict: false,