Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
4 changes: 2 additions & 2 deletions server.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down
2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const VERSION = '0.2.42';
export const VERSION = '0.2.43';
9 changes: 4 additions & 5 deletions test/test-file-handlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand All @@ -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' });
Expand Down
4 changes: 2 additions & 2 deletions test/test-markdown-preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
Loading