diff --git a/package.json b/package.json index 19cfcdd2..5b48874b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@wonderwhy-er/desktop-commander", - "version": "0.2.42", + "version": "0.2.43", "description": "MCP server for terminal operations and file editing", "mcpName": "io.github.wonderwhy-er/desktop-commander", "license": "MIT", diff --git a/server.json b/server.json index 2e3c71ff..910046e3 100644 --- a/server.json +++ b/server.json @@ -7,13 +7,13 @@ "url": "https://github.com/wonderwhy-er/DesktopCommanderMCP", "source": "github" }, - "version": "0.2.42", + "version": "0.2.43", "packages": [ { "registryType": "npm", "registryBaseUrl": "https://registry.npmjs.org", "identifier": "@wonderwhy-er/desktop-commander", - "version": "0.2.42", + "version": "0.2.43", "transport": { "type": "stdio" } diff --git a/src/version.ts b/src/version.ts index 345b4f0a..c71780bc 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = '0.2.42'; +export const VERSION = '0.2.43'; diff --git a/test/test-file-handlers.js b/test/test-file-handlers.js index caf04337..2a7d57e2 100644 --- a/test/test-file-handlers.js +++ b/test/test-file-handlers.js @@ -333,9 +333,8 @@ async function testReadFilePreviewMetadata() { assert.ok(typeof imageContentItem.data === 'string' && imageContentItem.data.length > 0, 'Image content item should carry non-empty base64 data'); assert.ok(imageResult.structuredContent, 'Image should include structuredContent'); assert.strictEqual(imageResult.structuredContent.fileType, 'image', 'Image fileType should map to image preview state'); - assert.strictEqual(typeof imageResult.structuredContent.imageData, 'string', 'Image structured payload should include imageData'); - assert.ok(imageResult.structuredContent.imageData.length > 0, 'Image structured payload should include non-empty imageData'); - assert.strictEqual(imageResult.structuredContent.content, imageResult.structuredContent.imageData, 'Image structuredContent should include file content'); + assert.strictEqual(typeof imageResult.structuredContent.content, 'string', 'Image structured payload should carry base64 in content'); + assert.ok(imageResult.structuredContent.content.length > 0, 'Image structured payload should include non-empty content'); assert.strictEqual(imageResult.structuredContent.mimeType, 'image/png', 'Image structured payload should include mimeType'); assert.strictEqual(imageResult.structuredContent.filePath, IMAGE_FILE, 'Image file path should be present'); assert.strictEqual(imageResult.structuredContent.sourceTool, 'read_file', 'Image preview should preserve source tool'); @@ -349,8 +348,8 @@ async function testReadFilePreviewMetadata() { assert.ok(svgResult.structuredContent, 'SVG should include structuredContent'); assert.strictEqual(svgResult.structuredContent.fileType, 'image', 'SVG should map to image preview state'); assert.strictEqual(svgResult.structuredContent.mimeType, 'image/svg+xml', 'SVG structured payload should include SVG mimeType'); - assert.strictEqual(typeof svgResult.structuredContent.imageData, 'string', 'SVG structured payload should include imageData'); - assert.ok(svgResult.structuredContent.imageData.length > 0, 'SVG structured payload should include non-empty imageData'); + assert.strictEqual(typeof svgResult.structuredContent.content, 'string', 'SVG structured payload should carry base64 in content'); + assert.ok(svgResult.structuredContent.content.length > 0, 'SVG structured payload should include non-empty content'); assert.strictEqual(svgResult.structuredContent.sourceTool, 'read_file', 'SVG preview should preserve source tool'); const writeResult = await handleWriteFile({ path: TEXT_FILE, content: 'written through handler' }); diff --git a/test/test-markdown-preview.js b/test/test-markdown-preview.js index e11e914e..9520bfb9 100644 --- a/test/test-markdown-preview.js +++ b/test/test-markdown-preview.js @@ -219,7 +219,7 @@ async function testFailedSaveResyncsEditBaseline() { } if (name === 'read_file') { - assert.deepStrictEqual(args, { path: payload.filePath }); + assert.deepStrictEqual(args, { path: payload.filePath, origin: 'ui' }); return { structuredContent: { fileName: payload.fileName, @@ -444,7 +444,7 @@ async function testPartialDocumentBecomesNewEditBaseline() { const controller = createMarkdownController({ callTool: async (name, args) => { assert.strictEqual(name, 'read_file'); - assert.deepStrictEqual(args, { path: partialPayload.filePath, offset: 0, length: 3 }); + assert.deepStrictEqual(args, { path: partialPayload.filePath, offset: 0, length: 3, origin: 'ui' }); return { structuredContent: { fileName: partialPayload.fileName,