cursor-feedback 0.1.0

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/README.md ADDED
@@ -0,0 +1,164 @@
1
+ # Cursor Feedback
2
+
3
+ 一个用于 Cursor/VS Code 的交互式反馈收集工具,类似于 [mcp-feedback-enhanced](https://github.com/Minidoracat/mcp-feedback-enhanced),但使用 TypeScript 重写,并以侧边栏形式嵌入 IDE。
4
+
5
+ ## ✨ 特性
6
+
7
+ - 🎯 **侧边栏集成** - 直接在 IDE 侧边栏中显示反馈界面,无需打开外部浏览器
8
+ - 💬 **交互式反馈** - AI Agent 可以通过 MCP 工具请求用户反馈
9
+ - 🖼️ **图片支持** - 支持上传图片作为反馈的一部分
10
+ - 📝 **Markdown 渲染** - AI 摘要支持完整的 Markdown 格式
11
+ - ⏱️ **超时控制** - 支持配置反馈等待超时时间
12
+ - 🌍 **多语言支持** - 支持简体中文、繁体中文和英文
13
+ - 🔒 **项目隔离** - 多窗口同时使用时,各项目互不干扰
14
+
15
+ ## 🚀 快速开始
16
+
17
+ ### 1. 配置 MCP Server
18
+
19
+ #### 方式 A:使用 npx(推荐)
20
+
21
+ 在 Cursor 的 MCP 配置文件中添加(`~/.cursor/mcp.json`):
22
+
23
+ ```json
24
+ {
25
+ "mcpServers": {
26
+ "cursor-feedback": {
27
+ "command": "npx",
28
+ "args": ["-y", "cursor-feedback"]
29
+ }
30
+ }
31
+ }
32
+ ```
33
+
34
+ #### 方式 B:全局安装
35
+
36
+ ```bash
37
+ npm install -g cursor-feedback
38
+ ```
39
+
40
+ 然后配置:
41
+
42
+ ```json
43
+ {
44
+ "mcpServers": {
45
+ "cursor-feedback": {
46
+ "command": "cursor-feedback-mcp"
47
+ }
48
+ }
49
+ }
50
+ ```
51
+
52
+ ### 2. 安装 VS Code 插件
53
+
54
+ #### 方式 A:从源码构建
55
+
56
+ ```bash
57
+ git clone https://github.com/jianger666/cursor-feedback-extension.git
58
+ cd cursor-feedback-extension
59
+ npm install
60
+ npm run compile
61
+ ```
62
+
63
+ 然后在 Cursor 中按 F5 运行调试,或打包为 .vsix 安装。
64
+
65
+ #### 方式 B:从 VS Code Marketplace 安装(即将上线)
66
+
67
+ 搜索 "Cursor Feedback" 安装。
68
+
69
+ ### 3. 使用
70
+
71
+ 1. 重启 Cursor
72
+ 2. 侧边栏会出现 **Cursor Feedback** 图标
73
+ 3. 在聊天中让 AI 调用 `interactive_feedback` 工具
74
+
75
+ ## 📖 MCP 工具
76
+
77
+ ### interactive_feedback
78
+
79
+ 交互式反馈收集工具。
80
+
81
+ **参数:**
82
+
83
+ | 参数 | 类型 | 默认值 | 描述 |
84
+ |------|------|--------|------|
85
+ | `project_directory` | string | `.` | 项目目录路径 |
86
+ | `summary` | string | `I have completed the task you requested.` | AI 工作摘要(支持 Markdown) |
87
+ | `timeout` | number | `600` | 超时时间(秒) |
88
+
89
+ **返回:**
90
+
91
+ 用户反馈内容,包括文字和图片。
92
+
93
+ ### get_system_info
94
+
95
+ 获取系统环境信息。
96
+
97
+ ## ⚙️ 配置选项
98
+
99
+ 在 VS Code/Cursor 设置中可以配置:
100
+
101
+ | 设置 | 类型 | 默认值 | 描述 |
102
+ |------|------|--------|------|
103
+ | `cursorFeedback.serverPort` | number | `5678` | MCP Server HTTP 端口 |
104
+ | `cursorFeedback.autoStartServer` | boolean | `true` | 是否自动开始监听 |
105
+ | `cursorFeedback.language` | string | `zh-CN` | 界面语言 |
106
+
107
+ ## 🏗️ 架构
108
+
109
+ ```
110
+ ┌─────────────────┐ stdio ┌──────────────────┐
111
+ │ AI Agent │ ◄──────────► │ MCP Server │
112
+ │ (Cursor) │ │ (mcp-server.js) │
113
+ └─────────────────┘ └────────┬─────────┘
114
+ │ HTTP API
115
+
116
+ ┌──────────────────┐
117
+ │ VS Code 插件 │
118
+ │ (extension.js) │
119
+ └────────┬─────────┘
120
+ │ WebView
121
+
122
+ ┌──────────────────┐
123
+ │ 用户界面 │
124
+ │ (侧边栏) │
125
+ └──────────────────┘
126
+ ```
127
+
128
+ ## 📊 与 mcp-feedback-enhanced 对比
129
+
130
+ | 功能 | mcp-feedback-enhanced | cursor-feedback |
131
+ |------|:--------------------:|:---------------:|
132
+ | MCP 工具 | ✅ | ✅ |
133
+ | 文字反馈 | ✅ | ✅ |
134
+ | 图片上传 | ✅ | ✅ |
135
+ | Markdown 渲染 | ✅ | ✅ |
136
+ | 多语言支持 | ✅ | ✅ |
137
+ | **IDE 侧边栏集成** | ❌ | ✅ |
138
+ | **多窗口项目隔离** | ❌ | ✅ |
139
+ | 命令执行 | ✅ | ⏳ |
140
+
141
+ ## 🛠️ 开发
142
+
143
+ ```bash
144
+ # 安装依赖
145
+ npm install
146
+
147
+ # 编译
148
+ npm run compile
149
+
150
+ # 监听模式
151
+ npm run watch
152
+
153
+ # 运行 lint
154
+ npm run lint
155
+ ```
156
+
157
+ ## 📄 许可证
158
+
159
+ MIT
160
+
161
+ ## 🙏 致谢
162
+
163
+ - [mcp-feedback-enhanced](https://github.com/Minidoracat/mcp-feedback-enhanced) - 原始 Python 实现
164
+ - [Model Context Protocol](https://modelcontextprotocol.io/) - MCP 协议