@zzp123/mcp-zentao 1.7.0 → 1.7.1
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/CHANGELOG.md +12 -0
- package/dist/index.js +4 -4
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,18 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [1.7.1] - 2025-11-06
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
- **图片 HTML 格式优化**
|
|
12
|
+
- `uploadFile` 和 `uploadImageFromClipboard` 工具现在生成的 `imageHtml` 会被 `<p>` 标签包裹
|
|
13
|
+
- 修复了某些情况下图片在禅道中无法正确显示的问题
|
|
14
|
+
- 确保生成的 HTML 格式与禅道富文本编辑器的标准格式一致
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
- 图片 HTML 格式从 `<img ... />` 改为 `<p><img ... /></p>`
|
|
18
|
+
- 更新使用提示,明确说明图片会被包裹在 `<p>` 标签中
|
|
19
|
+
|
|
8
20
|
## [1.7.0] - 2025-11-06
|
|
9
21
|
|
|
10
22
|
### Added
|
package/dist/index.js
CHANGED
|
@@ -992,13 +992,13 @@ server.tool("uploadFile", {
|
|
|
992
992
|
const fileId = result.id;
|
|
993
993
|
const baseUrl = zentaoApi.getConfig().url;
|
|
994
994
|
const imageUrl = `${baseUrl}/zentao/entao/api.php?m=file&f=read&t=png&fileID=${fileId}`;
|
|
995
|
-
const imageHtml = `<img onload="setImageSize(this,0)" src="${imageUrl}" alt="${finalFilename}"
|
|
995
|
+
const imageHtml = `<p><img onload="setImageSize(this,0)" src="${imageUrl}" alt="${finalFilename}" /></p>`;
|
|
996
996
|
const response = {
|
|
997
997
|
upload: result,
|
|
998
998
|
fileId: fileId,
|
|
999
999
|
imageUrl: imageUrl,
|
|
1000
1000
|
imageHtml: imageHtml,
|
|
1001
|
-
tip: `更新 Bug 描述时,请使用 imageHtml 字段中的 HTML
|
|
1001
|
+
tip: `更新 Bug 描述时,请使用 imageHtml 字段中的 HTML 代码。图片会被包裹在 <p> 标签中以确保正确显示。`
|
|
1002
1002
|
};
|
|
1003
1003
|
if (savedPath) {
|
|
1004
1004
|
response.savedPath = savedPath;
|
|
@@ -1142,7 +1142,7 @@ server.tool("uploadImageFromClipboard", {
|
|
|
1142
1142
|
const fileId = uploadResult.id;
|
|
1143
1143
|
const baseUrl = zentaoApi.getConfig().url;
|
|
1144
1144
|
const imageUrl = `${baseUrl}/zentao/entao/api.php?m=file&f=read&t=png&fileID=${fileId}`;
|
|
1145
|
-
const imageHtml = `<img onload="setImageSize(this,0)" src="${imageUrl}" alt="${finalFilename}"
|
|
1145
|
+
const imageHtml = `<p><img onload="setImageSize(this,0)" src="${imageUrl}" alt="${finalFilename}" /></p>`;
|
|
1146
1146
|
const response = {
|
|
1147
1147
|
success: true,
|
|
1148
1148
|
upload: uploadResult,
|
|
@@ -1153,7 +1153,7 @@ server.tool("uploadImageFromClipboard", {
|
|
|
1153
1153
|
imageUrl: imageUrl,
|
|
1154
1154
|
imageHtml: imageHtml,
|
|
1155
1155
|
message: `图片已保存到本地并上传到禅道`,
|
|
1156
|
-
tip: `更新 Bug 描述时,请使用 imageHtml 字段中的 HTML
|
|
1156
|
+
tip: `更新 Bug 描述时,请使用 imageHtml 字段中的 HTML 代码。图片会被包裹在 <p> 标签中以确保正确显示。`
|
|
1157
1157
|
};
|
|
1158
1158
|
console.log('[uploadImageFromClipboard] 返回结果:', response);
|
|
1159
1159
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zzp123/mcp-zentao",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.1",
|
|
4
4
|
"description": "禅道项目管理系统的高级API集成包,提供任务管理、Bug跟踪等功能的完整封装,专为Cursor IDE设计的MCP扩展",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"license": "MIT",
|
|
43
43
|
"repository": {
|
|
44
44
|
"type": "git",
|
|
45
|
-
"url": "https://github.com/yourusername/mcp-zentao.git"
|
|
45
|
+
"url": "git+https://github.com/yourusername/mcp-zentao.git"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@modelcontextprotocol/sdk": "^1.6.1",
|