@dyno181cm.nexsoft/zentao_mcp 1.2.13 → 1.2.15

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.
Files changed (2) hide show
  1. package/build/tools.js +17 -8
  2. package/package.json +1 -1
package/build/tools.js CHANGED
@@ -80,8 +80,8 @@ async function localizeImages(html) {
80
80
  await client.downloadImageToLocal(remoteUrl, localPath);
81
81
  }
82
82
  const fileUrl = toFileUrl(localPath);
83
- // Replace img tag with a standard hyperlink (no inline rendering, saves tokens)
84
- const linkTag = `<a href="${fileUrl}">📎 ${linkText}</a>`;
83
+ // Replace img tag with a standard hyperlink (no inline rendering, saves tokens) using image icon
84
+ const linkTag = `<a href="${fileUrl}">🖼️ ${linkText}</a>`;
85
85
  result = result.split(fullTag).join(linkTag);
86
86
  }
87
87
  catch {
@@ -139,7 +139,12 @@ async function renderAttachments(files) {
139
139
  if (!f.localPath)
140
140
  return `- 📎 ${f.title} — *(download failed, Size: ${formatSize(f.size)})*`;
141
141
  const fileUrl = toFileUrl(f.localPath);
142
- return `- 📎 [${f.title}](${fileUrl}) *(Size: ${formatSize(f.size)})*`;
142
+ let icon = '📎';
143
+ if (IMAGE_EXTS.has(f.ext))
144
+ icon = '🖼️';
145
+ else if (VIDEO_EXTS.has(f.ext))
146
+ icon = '🎬';
147
+ return `- ${icon} [${f.title}](${fileUrl}) *(Size: ${formatSize(f.size)})*`;
143
148
  });
144
149
  return `\n## Files 📎${headerHint}\n${lines.join('\n')}\n`;
145
150
  }
@@ -173,10 +178,11 @@ export async function taskToMarkdown(rawTask) {
173
178
  const localizedDesc = await localizeImages(rawTask.desc);
174
179
  const desc = htmlToMarkdown(localizedDesc);
175
180
  const attachments = await renderAttachments(parseFiles(rawTask.files));
181
+ const metaList = meta.map(m => `- ${m}`).join('\n');
176
182
  return [
177
183
  `# Task #${rawTask.id}: ${rawTask.name}`,
178
184
  '',
179
- meta.join(' | '),
185
+ metaList,
180
186
  '',
181
187
  '## Description',
182
188
  desc || '*No description provided.*',
@@ -196,23 +202,26 @@ export async function bugToMarkdown(rawBug) {
196
202
  `**Priority:** ${rawBug.pri || 'N/A'}`,
197
203
  `**Type:** ${rawBug.type || 'N/A'}`,
198
204
  ];
199
- if (rawBug.openedBy)
205
+ if (rawBug.openedBy) {
200
206
  meta.push(`**Opened by:** ${formatUser(rawBug.openedBy)}`);
201
- if (rawBug.assignedTo)
207
+ }
208
+ if (rawBug.assignedTo) {
202
209
  meta.push(`**Assigned to:** ${formatUser(rawBug.assignedTo)}`);
210
+ }
203
211
  if (rawBug.resolvedBy) {
204
212
  const resolution = rawBug.resolution ? ` (${rawBug.resolution})` : '';
205
213
  meta.push(`**Resolved by:** ${formatUser(rawBug.resolvedBy)}${resolution}`);
206
214
  }
207
- if (rawBug.closedBy)
215
+ if (rawBug.closedBy) {
208
216
  meta.push(`**Closed by:** ${formatUser(rawBug.closedBy)}`);
217
+ }
209
218
  const localizedSteps = await localizeImages(rawBug.steps);
210
219
  const steps = htmlToMarkdown(localizedSteps);
211
220
  const attachments = await renderAttachments(parseFiles(rawBug.files));
212
221
  return [
213
222
  `# Bug #${rawBug.id}: ${rawBug.title}`,
214
223
  '',
215
- meta.join(' | '),
224
+ ...meta.map(m => `- ${m}`),
216
225
  '',
217
226
  '## Repro Steps',
218
227
  steps || '*No steps provided.*',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dyno181cm.nexsoft/zentao_mcp",
3
- "version": "1.2.13",
3
+ "version": "1.2.15",
4
4
  "description": "Zentao MCP Server",
5
5
  "repository": {
6
6
  "type": "git",