vite-plugin-opencode-assistant 1.0.17 → 1.0.19

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.
@@ -175,16 +175,31 @@ function generateBridgeScript(options) {
175
175
  const displayText = '@' + selector + (textPreview ? '(' + textPreview + ')' : '');
176
176
 
177
177
  const jsonStr = JSON.stringify({
178
- pageContext: {
179
- url: previewPageUrl || '',
180
- title: previewPageTitle || '',
181
- },
182
178
  nodeContext: {
183
- filePath,
184
- line,
185
- column,
186
- description,
187
- innerText: innerText ? innerText.substring(0, 500) : ''
179
+ "filePath": {
180
+ "value": filePath ?? '\u672A\u77E5',
181
+ "desc": "\u6E90\u7801\u6587\u4EF6\u8DEF\u5F84"
182
+ },
183
+ "line": {
184
+ "value": line ?? '\u672A\u77E5',
185
+ "desc": "\u4EE3\u7801\u6240\u5728\u884C\u53F7"
186
+ },
187
+ "column": {
188
+ "value": column ?? '\u672A\u77E5',
189
+ "desc": "\u4EE3\u7801\u6240\u5728\u5217\u53F7"
190
+ },
191
+ "description": {
192
+ "value": description ?? '\u672A\u77E5',
193
+ "desc": "DOM \u5143\u7D20\u9009\u62E9\u5668"
194
+ },
195
+ "innerText": {
196
+ "value": innerText ? innerText.substring(0, 500) : '',
197
+ "desc": "DOM \u5143\u7D20\u5185\u90E8\u6587\u672C"
198
+ },
199
+ "selectAt": {
200
+ "value": previewPageUrl || '\u672A\u77E5',
201
+ "desc": "\u7528\u6237\u9009\u4E2D\u8282\u70B9\u65F6\u7684\u9875\u9762 URL"
202
+ }
188
203
  }
189
204
  });
190
205
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite-plugin-opencode-assistant",
3
- "version": "1.0.17",
3
+ "version": "1.0.19",
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/opencode": "1.0.17",
40
- "@vite-plugin-opencode-assistant/shared": "1.0.17",
41
- "@vite-plugin-opencode-assistant/components": "1.0.17"
39
+ "@vite-plugin-opencode-assistant/opencode": "1.0.19",
40
+ "@vite-plugin-opencode-assistant/components": "1.0.19",
41
+ "@vite-plugin-opencode-assistant/shared": "1.0.19"
42
42
  },
43
43
  "peerDependencies": {
44
44
  "vite": ">=4.0.0"