Pārlūkot izejas kodu

fix: change keybinding to ctrl+alt+c, add explicit activation events

Developer 1 mēnesi atpakaļ
vecāks
revīzija
854aa5084d
2 mainītis faili ar 18 papildinājumiem un 6 dzēšanām
  1. 7 0
      CHANGELOG.md
  2. 11 6
      package.json

+ 7 - 0
CHANGELOG.md

@@ -1,5 +1,12 @@
 # Change Log
 
+## [0.2.10] - 2026-07-14
+
+### Fixed
+
+- 快捷键从 `Shift+Alt+C` 改为 `Ctrl+Alt+C`,避免 macOS Option 键被 OS 拦截
+- 添加 `onCommand` 显式激活事件,确保快捷键触发时扩展已激活
+
 ## [0.2.9] - 2026-07-14
 
 ### Removed

+ 11 - 6
package.json

@@ -2,7 +2,7 @@
   "name": "copy-ai-ctx",
   "displayName": "Copy AI Ctx",
   "description": "复制上下文供AI助手使用 —— 复制文件、内容的引用信息",
-  "version": "0.2.9",
+  "version": "0.2.10",
   "publisher": "fivesay",
   "engines": {
     "vscode": "^1.85.0"
@@ -20,7 +20,12 @@
     "claude",
     "pi"
   ],
-  "activationEvents": [],
+  "activationEvents": [
+    "onCommand:copy-ai-ctx.copySelection",
+    "onCommand:copy-ai-ctx.copyFile",
+    "onCommand:copy-ai-ctx.copySelectedFiles",
+    "onCommand:copy-ai-ctx.copyMultiFiles"
+  ],
   "main": "./dist/extension.js",
   "contributes": {
     "commands": [
@@ -70,22 +75,22 @@
     },
     "keybindings": [
       {
-        "key": "shift+alt+c",
+        "key": "ctrl+alt+c",
         "command": "copy-ai-ctx.copySelection",
         "when": "editorHasSelection"
       },
       {
-        "key": "shift+alt+c",
+        "key": "ctrl+alt+c",
         "command": "copy-ai-ctx.copyFile",
         "when": "!editorHasSelection && editorFocus"
       },
       {
-        "key": "shift+alt+c",
+        "key": "ctrl+alt+c",
         "command": "copy-ai-ctx.copySelectedFiles",
         "when": "explorerViewletVisible && !listMultiSelection"
       },
       {
-        "key": "shift+alt+c",
+        "key": "ctrl+alt+c",
         "command": "copy-ai-ctx.copyMultiFiles",
         "when": "explorerViewletVisible && listMultiSelection"
       }