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.
@@ -51,13 +51,13 @@
51
51
  // 更新快捷键模式 UI
52
52
  function updateKeyModeUI() {
53
53
  if (enterToSubmit) {
54
- submitBtn.textContent = '提交反馈 (Enter)';
54
+ submitBtn.textContent = 'Enter 提交 · Shift+Enter 换行';
55
55
  toggleKeyModeBtn.classList.add('enter-mode');
56
- toggleKeyModeBtn.title = '当前:Enter 提交,Shift+Enter 换行\n点击切换为 Ctrl+Enter 提交';
56
+ toggleKeyModeBtn.title = '点击切换为 Ctrl+Enter 提交';
57
57
  } else {
58
- submitBtn.textContent = '提交反馈 (Ctrl+Enter)';
58
+ submitBtn.textContent = 'Ctrl+Enter 提交 · Enter 换行';
59
59
  toggleKeyModeBtn.classList.remove('enter-mode');
60
- toggleKeyModeBtn.title = '当前:Ctrl+Enter 提交,Enter 换行\n点击切换为 Enter 提交';
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 换行
@@ -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: 600;
145
- font-size: 14px;
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.3",
5
+ "version": "1.0.4",
6
6
  "author": "jianger666",
7
7
  "license": "MIT",
8
8
  "repository": {
@@ -51,13 +51,13 @@
51
51
  // 更新快捷键模式 UI
52
52
  function updateKeyModeUI() {
53
53
  if (enterToSubmit) {
54
- submitBtn.textContent = '提交反馈 (Enter)';
54
+ submitBtn.textContent = 'Enter 提交 · Shift+Enter 换行';
55
55
  toggleKeyModeBtn.classList.add('enter-mode');
56
- toggleKeyModeBtn.title = '当前:Enter 提交,Shift+Enter 换行\n点击切换为 Ctrl+Enter 提交';
56
+ toggleKeyModeBtn.title = '点击切换为 Ctrl+Enter 提交';
57
57
  } else {
58
- submitBtn.textContent = '提交反馈 (Ctrl+Enter)';
58
+ submitBtn.textContent = 'Ctrl+Enter 提交 · Enter 换行';
59
59
  toggleKeyModeBtn.classList.remove('enter-mode');
60
- toggleKeyModeBtn.title = '当前:Ctrl+Enter 提交,Enter 换行\n点击切换为 Enter 提交';
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 换行
@@ -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: 600;
145
- font-size: 14px;
144
+ font-weight: 500;
145
+ font-size: 12px;
146
146
  transition: background 0.15s;
147
147
  }
148
148