cursor-feedback 1.0.3 → 1.0.4
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/webview/script.js +16 -4
- package/dist/webview/styles.css +3 -3
- package/package.json +1 -1
- package/src/webview/script.js +16 -4
- package/src/webview/styles.css +3 -3
package/dist/webview/script.js
CHANGED
|
@@ -51,13 +51,13 @@
|
|
|
51
51
|
// 更新快捷键模式 UI
|
|
52
52
|
function updateKeyModeUI() {
|
|
53
53
|
if (enterToSubmit) {
|
|
54
|
-
submitBtn.textContent = '
|
|
54
|
+
submitBtn.textContent = 'Enter 提交 · Shift+Enter 换行';
|
|
55
55
|
toggleKeyModeBtn.classList.add('enter-mode');
|
|
56
|
-
toggleKeyModeBtn.title = '
|
|
56
|
+
toggleKeyModeBtn.title = '点击切换为 Ctrl+Enter 提交';
|
|
57
57
|
} else {
|
|
58
|
-
submitBtn.textContent = '
|
|
58
|
+
submitBtn.textContent = 'Ctrl+Enter 提交 · Enter 换行';
|
|
59
59
|
toggleKeyModeBtn.classList.remove('enter-mode');
|
|
60
|
-
toggleKeyModeBtn.title = '
|
|
60
|
+
toggleKeyModeBtn.title = '点击切换为 Enter 提交';
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
|
|
@@ -71,6 +71,15 @@
|
|
|
71
71
|
updateKeyModeUI();
|
|
72
72
|
});
|
|
73
73
|
|
|
74
|
+
// 输入法组合状态(用于中文等输入法兼容)
|
|
75
|
+
let isComposing = false;
|
|
76
|
+
feedbackInput.addEventListener('compositionstart', () => {
|
|
77
|
+
isComposing = true;
|
|
78
|
+
});
|
|
79
|
+
feedbackInput.addEventListener('compositionend', () => {
|
|
80
|
+
isComposing = false;
|
|
81
|
+
});
|
|
82
|
+
|
|
74
83
|
// 恢复输入框文本
|
|
75
84
|
if (previousState?.text) {
|
|
76
85
|
feedbackInput.value = previousState.text;
|
|
@@ -214,6 +223,9 @@
|
|
|
214
223
|
|
|
215
224
|
submitBtn.addEventListener('click', submitFeedback);
|
|
216
225
|
feedbackInput.addEventListener('keydown', (e) => {
|
|
226
|
+
// 如果正在使用输入法(如中文输入),不触发提交
|
|
227
|
+
if (isComposing || e.isComposing) return;
|
|
228
|
+
|
|
217
229
|
if (e.key === 'Enter') {
|
|
218
230
|
if (enterToSubmit) {
|
|
219
231
|
// Enter 提交模式:Enter 提交,Shift+Enter 换行
|
package/dist/webview/styles.css
CHANGED
|
@@ -135,14 +135,14 @@ body {
|
|
|
135
135
|
|
|
136
136
|
.submit-btn {
|
|
137
137
|
flex: 1;
|
|
138
|
-
padding: 12px;
|
|
138
|
+
padding: 10px 12px;
|
|
139
139
|
background: var(--vscode-button-background);
|
|
140
140
|
color: var(--vscode-button-foreground);
|
|
141
141
|
border: none;
|
|
142
142
|
border-radius: 6px;
|
|
143
143
|
cursor: pointer;
|
|
144
|
-
font-weight:
|
|
145
|
-
font-size:
|
|
144
|
+
font-weight: 500;
|
|
145
|
+
font-size: 12px;
|
|
146
146
|
transition: background 0.15s;
|
|
147
147
|
}
|
|
148
148
|
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "cursor-feedback",
|
|
3
3
|
"displayName": "Cursor Feedback",
|
|
4
4
|
"description": "Interactive feedback collection for AI agents in Cursor/VS Code - MCP Server with sidebar UI",
|
|
5
|
-
"version": "1.0.
|
|
5
|
+
"version": "1.0.4",
|
|
6
6
|
"author": "jianger666",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"repository": {
|
package/src/webview/script.js
CHANGED
|
@@ -51,13 +51,13 @@
|
|
|
51
51
|
// 更新快捷键模式 UI
|
|
52
52
|
function updateKeyModeUI() {
|
|
53
53
|
if (enterToSubmit) {
|
|
54
|
-
submitBtn.textContent = '
|
|
54
|
+
submitBtn.textContent = 'Enter 提交 · Shift+Enter 换行';
|
|
55
55
|
toggleKeyModeBtn.classList.add('enter-mode');
|
|
56
|
-
toggleKeyModeBtn.title = '
|
|
56
|
+
toggleKeyModeBtn.title = '点击切换为 Ctrl+Enter 提交';
|
|
57
57
|
} else {
|
|
58
|
-
submitBtn.textContent = '
|
|
58
|
+
submitBtn.textContent = 'Ctrl+Enter 提交 · Enter 换行';
|
|
59
59
|
toggleKeyModeBtn.classList.remove('enter-mode');
|
|
60
|
-
toggleKeyModeBtn.title = '
|
|
60
|
+
toggleKeyModeBtn.title = '点击切换为 Enter 提交';
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
|
|
@@ -71,6 +71,15 @@
|
|
|
71
71
|
updateKeyModeUI();
|
|
72
72
|
});
|
|
73
73
|
|
|
74
|
+
// 输入法组合状态(用于中文等输入法兼容)
|
|
75
|
+
let isComposing = false;
|
|
76
|
+
feedbackInput.addEventListener('compositionstart', () => {
|
|
77
|
+
isComposing = true;
|
|
78
|
+
});
|
|
79
|
+
feedbackInput.addEventListener('compositionend', () => {
|
|
80
|
+
isComposing = false;
|
|
81
|
+
});
|
|
82
|
+
|
|
74
83
|
// 恢复输入框文本
|
|
75
84
|
if (previousState?.text) {
|
|
76
85
|
feedbackInput.value = previousState.text;
|
|
@@ -214,6 +223,9 @@
|
|
|
214
223
|
|
|
215
224
|
submitBtn.addEventListener('click', submitFeedback);
|
|
216
225
|
feedbackInput.addEventListener('keydown', (e) => {
|
|
226
|
+
// 如果正在使用输入法(如中文输入),不触发提交
|
|
227
|
+
if (isComposing || e.isComposing) return;
|
|
228
|
+
|
|
217
229
|
if (e.key === 'Enter') {
|
|
218
230
|
if (enterToSubmit) {
|
|
219
231
|
// Enter 提交模式:Enter 提交,Shift+Enter 换行
|
package/src/webview/styles.css
CHANGED
|
@@ -135,14 +135,14 @@ body {
|
|
|
135
135
|
|
|
136
136
|
.submit-btn {
|
|
137
137
|
flex: 1;
|
|
138
|
-
padding: 12px;
|
|
138
|
+
padding: 10px 12px;
|
|
139
139
|
background: var(--vscode-button-background);
|
|
140
140
|
color: var(--vscode-button-foreground);
|
|
141
141
|
border: none;
|
|
142
142
|
border-radius: 6px;
|
|
143
143
|
cursor: pointer;
|
|
144
|
-
font-weight:
|
|
145
|
-
font-size:
|
|
144
|
+
font-weight: 500;
|
|
145
|
+
font-size: 12px;
|
|
146
146
|
transition: background 0.15s;
|
|
147
147
|
}
|
|
148
148
|
|