vite-plugin-opencode-assistant 1.0.41 → 1.0.42
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/es/client/App.vue.js +21 -5
- package/es/client/composables/useHotkey.js +1 -1
- package/es/core/proxy-server.js +16 -0
- package/lib/client/App.vue.js +21 -5
- package/lib/client/composables/useHotkey.js +1 -1
- package/lib/client.js +978 -968
- package/lib/core/proxy-server.js +16 -0
- package/package.json +4 -4
package/lib/core/proxy-server.js
CHANGED
|
@@ -142,6 +142,22 @@ function generateBridgeScript(options) {
|
|
|
142
142
|
}
|
|
143
143
|
});
|
|
144
144
|
|
|
145
|
+
// === \u952E\u76D8\u4E8B\u4EF6\u8F6C\u53D1\uFF08\u7528\u4E8E\u9000\u51FA\u9009\u62E9\u6A21\u5F0F\uFF09 ===
|
|
146
|
+
window.addEventListener("keydown", function(event) {
|
|
147
|
+
if (event.key === "Escape" || (event.ctrlKey && event.key.toLowerCase() === "p")) {
|
|
148
|
+
if (window.parent !== window) {
|
|
149
|
+
window.parent.postMessage({
|
|
150
|
+
type: "OPENCODE_KEYDOWN",
|
|
151
|
+
key: event.key,
|
|
152
|
+
ctrlKey: event.ctrlKey,
|
|
153
|
+
metaKey: event.metaKey,
|
|
154
|
+
shiftKey: event.shiftKey,
|
|
155
|
+
altKey: event.altKey
|
|
156
|
+
}, "*");
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}, true);
|
|
160
|
+
|
|
145
161
|
// === \u6700\u5C0F\u5316\u72B6\u6001\u6837\u5F0F ===
|
|
146
162
|
const minimizeStyles = \`
|
|
147
163
|
.opencode-minimized [data-dock-surface="tray"]:not([data-slot="permission-footer"]) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vite-plugin-opencode-assistant",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.42",
|
|
4
4
|
"description": "Embed OpenCode Web UI in your Vite dev server for real-time code modification and preview",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -36,9 +36,9 @@
|
|
|
36
36
|
"license": "MIT",
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"unplugin-vue-inspector": "^2.4.0",
|
|
39
|
-
"@vite-plugin-opencode-assistant/
|
|
40
|
-
"@vite-plugin-opencode-assistant/
|
|
41
|
-
"@vite-plugin-opencode-assistant/shared": "1.0.
|
|
39
|
+
"@vite-plugin-opencode-assistant/components": "1.0.42",
|
|
40
|
+
"@vite-plugin-opencode-assistant/opencode": "1.0.42",
|
|
41
|
+
"@vite-plugin-opencode-assistant/shared": "1.0.42"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
44
|
"vite": ">=4.0.0"
|