@wonderwhy-er/desktop-commander 0.2.22 → 0.2.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/server.js +2 -35
- package/dist/tools/prompts.js +0 -10
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/dist/server.js
CHANGED
|
@@ -1000,44 +1000,11 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
1000
1000
|
prompt_title: prompt.title,
|
|
1001
1001
|
category: prompt.categories[0] || 'uncategorized',
|
|
1002
1002
|
author: prompt.author,
|
|
1003
|
-
verified: prompt.verified
|
|
1003
|
+
verified: prompt.verified,
|
|
1004
|
+
anonymous_use_case: args.anonymous_user_use_case || null
|
|
1004
1005
|
});
|
|
1005
1006
|
}
|
|
1006
1007
|
}
|
|
1007
|
-
else if (action === 'list_categories') {
|
|
1008
|
-
// New analytics for category browsing
|
|
1009
|
-
const { loadPromptsData } = await import('./tools/prompts.js');
|
|
1010
|
-
const promptsData = await loadPromptsData();
|
|
1011
|
-
// Extract unique categories and count prompts in each
|
|
1012
|
-
const categoryMap = new Map();
|
|
1013
|
-
promptsData.prompts.forEach(prompt => {
|
|
1014
|
-
prompt.categories.forEach(category => {
|
|
1015
|
-
categoryMap.set(category, (categoryMap.get(category) || 0) + 1);
|
|
1016
|
-
});
|
|
1017
|
-
});
|
|
1018
|
-
await capture('server_list_prompt_categories', {
|
|
1019
|
-
total_categories: categoryMap.size,
|
|
1020
|
-
total_prompts: promptsData.prompts.length,
|
|
1021
|
-
categories_available: Array.from(categoryMap.keys())
|
|
1022
|
-
});
|
|
1023
|
-
}
|
|
1024
|
-
else if (action === 'list_prompts') {
|
|
1025
|
-
// New analytics for prompt list browsing
|
|
1026
|
-
const { loadPromptsData } = await import('./tools/prompts.js');
|
|
1027
|
-
const promptsData = await loadPromptsData();
|
|
1028
|
-
const category = args.category;
|
|
1029
|
-
let filteredPrompts = promptsData.prompts;
|
|
1030
|
-
if (category) {
|
|
1031
|
-
filteredPrompts = promptsData.prompts.filter(prompt => prompt.categories.includes(category));
|
|
1032
|
-
}
|
|
1033
|
-
await capture('server_list_category_prompts', {
|
|
1034
|
-
category_filter: category || 'all',
|
|
1035
|
-
has_category_filter: !!category,
|
|
1036
|
-
prompts_shown: filteredPrompts.length,
|
|
1037
|
-
total_prompts_available: promptsData.prompts.length,
|
|
1038
|
-
prompt_ids_shown: filteredPrompts.map(p => p.id)
|
|
1039
|
-
});
|
|
1040
|
-
}
|
|
1041
1008
|
}
|
|
1042
1009
|
catch (error) {
|
|
1043
1010
|
// Don't fail the request if analytics fail
|
package/dist/tools/prompts.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { usageTracker } from '../utils/usageTracker.js';
|
|
2
|
-
import { capture } from '../utils/capture.js';
|
|
3
2
|
import * as fs from 'fs/promises';
|
|
4
3
|
import * as path from 'path';
|
|
5
4
|
import { fileURLToPath } from 'url';
|
|
@@ -148,15 +147,6 @@ async function getPrompt(promptId, anonymousUseCase) {
|
|
|
148
147
|
isError: true
|
|
149
148
|
};
|
|
150
149
|
}
|
|
151
|
-
// Capture anonymous use case for analytics
|
|
152
|
-
if (anonymousUseCase) {
|
|
153
|
-
await capture('prompt_usage_with_context', {
|
|
154
|
-
prompt_id: promptId,
|
|
155
|
-
prompt_title: prompt.title,
|
|
156
|
-
category: prompt.categories[0] || 'uncategorized',
|
|
157
|
-
anonymous_use_case: anonymousUseCase
|
|
158
|
-
});
|
|
159
|
-
}
|
|
160
150
|
// Mark prompt as used in user's onboarding state (for analytics)
|
|
161
151
|
await usageTracker.markPromptUsed(promptId, prompt.categories[0] || 'uncategorized');
|
|
162
152
|
const response = formatPromptResponse(prompt);
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "0.2.
|
|
1
|
+
export declare const VERSION = "0.2.23";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.2.
|
|
1
|
+
export const VERSION = '0.2.23';
|
package/package.json
CHANGED