vite-plugin-ai-annotator 1.14.4 → 1.14.5

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.
@@ -7258,6 +7258,28 @@
7258
7258
  componentLocation: codeLocation,
7259
7259
  framework: "vue"
7260
7260
  };
7261
+ const match = codeLocation.match(/^(.+\.vue):(\d+):(\d+)$/);
7262
+ if (match) {
7263
+ const [, file, line, column] = match;
7264
+ const componentName = file.split("/").pop()?.replace(".vue", "") || "Anonymous";
7265
+ componentInfo.componentName = componentName;
7266
+ componentInfo.elementLocation = {
7267
+ file,
7268
+ line: parseInt(line, 10),
7269
+ column: parseInt(column, 10)
7270
+ };
7271
+ componentInfo.sourceMap = {
7272
+ originalLine: parseInt(line, 10),
7273
+ originalColumn: parseInt(column, 10),
7274
+ originalSource: file
7275
+ };
7276
+ } else {
7277
+ const pathParts = codeLocation.split("/");
7278
+ const lastPart = pathParts[pathParts.length - 1];
7279
+ if (lastPart) {
7280
+ componentInfo.componentName = lastPart.replace(".vue", "").split("@")[0];
7281
+ }
7282
+ }
7261
7283
  const elementLocationInfo = extractVueElementLocation(element, vnode);
7262
7284
  if (elementLocationInfo) {
7263
7285
  Object.assign(componentInfo, elementLocationInfo);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite-plugin-ai-annotator",
3
- "version": "1.14.4",
3
+ "version": "1.14.5",
4
4
  "description": "AI-powered element annotator for Vite - Pick elements and get instant AI code modifications",
5
5
  "type": "module",
6
6
  "main": "dist/vite-plugin.js",