vite-plugin-ai-annotator 1.14.14 → 1.15.0

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.
@@ -7665,6 +7665,11 @@
7665
7665
  this.socket.on("connect_error", (error) => {
7666
7666
  this.log("Connection error:", error.message);
7667
7667
  });
7668
+ this.socket.on("channel:notify", (data) => {
7669
+ if (typeof data?.message !== "string") return;
7670
+ const prefix = data.status === "done" ? "\u2713 " : data.status === "error" ? "\u2717 " : data.status === "progress" ? "\u2026 " : "";
7671
+ this.showToast(prefix + data.message);
7672
+ });
7668
7673
  }
7669
7674
  wrapRpcHandler(name, handler) {
7670
7675
  return (async (...args) => {
@@ -8062,13 +8067,17 @@
8062
8067
  return;
8063
8068
  }
8064
8069
  const text = `I have selected ${elements.length} feedback item(s) in the browser (session: ${this.sessionId}). Fetch them via GET ${this.wsEndpoint}/api/sessions/${this.sessionId}/feedback and modify the code accordingly.`;
8070
+ if (this.socket?.connected) {
8071
+ this.socket.emit("feedback:submitted", { count: elements.length });
8072
+ }
8065
8073
  try {
8066
8074
  await navigator.clipboard.writeText(text);
8067
- this.showToast(`Copied ${elements.length} element(s)`);
8075
+ this.showToast(`Sent ${elements.length} element(s) to Claude`);
8068
8076
  this.exitInspectingMode();
8069
8077
  } catch (error) {
8070
- this.showToast("Failed to copy");
8071
- this.log("Failed to copy:", error);
8078
+ this.showToast(`Sent ${elements.length} element(s) to Claude`);
8079
+ this.log("Clipboard copy failed (channel push still sent):", error);
8080
+ this.exitInspectingMode();
8072
8081
  }
8073
8082
  }
8074
8083
  toggleInspect() {
@@ -8169,13 +8178,16 @@
8169
8178
  return;
8170
8179
  }
8171
8180
  const text = `I have feedback in the browser (session: ${this.sessionId}). Fetch them via GET ${this.wsEndpoint}/api/sessions/${this.sessionId}/feedback`;
8181
+ if (this.socket?.connected) {
8182
+ this.socket.emit("feedback:submitted", { count: 0 });
8183
+ }
8172
8184
  try {
8173
8185
  await navigator.clipboard.writeText(text);
8174
- this.showToast("Copied!");
8186
+ this.showToast("Sent to Claude");
8175
8187
  this.log("Copied to clipboard:", text);
8176
8188
  } catch (error) {
8177
- this.showToast("Failed to copy");
8178
- this.log("Failed to copy:", error);
8189
+ this.showToast("Sent to Claude");
8190
+ this.log("Clipboard copy failed (channel push still sent):", error);
8179
8191
  }
8180
8192
  }
8181
8193
  renderErrorIcon() {