@funnycode/myclaude 0.1.306 → 0.1.308

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/dist/myclaude.js CHANGED
@@ -4,8 +4,8 @@
4
4
  // MACRO - build-time constants (injected by build.ts)
5
5
  // MACRO injected by build script
6
6
  globalThis.MACRO = {
7
- VERSION: "0.1.306",
8
- BUILD_TIME: "2026-09-03T19:01:03.864Z",
7
+ VERSION: "0.1.308",
8
+ BUILD_TIME: "2026-09-04T17:39:13.049Z",
9
9
  PACKAGE_URL: "@funnycode/myclaude",
10
10
  NATIVE_PACKAGE_URL: "@funnycode/myclaude",
11
11
  VERSION_CHANGELOG: '',
@@ -120027,7 +120027,7 @@ var package_default;
120027
120027
  var init_package = __esm(() => {
120028
120028
  package_default = {
120029
120029
  name: "@funnycode/myclaude",
120030
- version: "0.1.306",
120030
+ version: "0.1.308",
120031
120031
  private: false,
120032
120032
  description: "An open-source AI coding assistant in your terminal - powered by Claude",
120033
120033
  license: "MIT",
@@ -344994,7 +344994,7 @@ class DiagnosticTrackingService {
344994
344994
  static instance;
344995
344995
  baseline = new Map;
344996
344996
  initialized = false;
344997
- mcpClient;
344997
+ clients = [];
344998
344998
  lastProcessedTimestamps = new Map;
344999
344999
  rightFileDiagnosticsState = new Map;
345000
345000
  static getInstance() {
@@ -345003,15 +345003,19 @@ class DiagnosticTrackingService {
345003
345003
  }
345004
345004
  return DiagnosticTrackingService.instance;
345005
345005
  }
345006
+ getIdeClient() {
345007
+ return getConnectedIdeClient(this.clients);
345008
+ }
345006
345009
  initialize(mcpClient) {
345007
345010
  if (this.initialized) {
345008
345011
  return;
345009
345012
  }
345010
- this.mcpClient = mcpClient;
345013
+ this.clients = [mcpClient];
345011
345014
  this.initialized = true;
345012
345015
  }
345013
345016
  async shutdown() {
345014
345017
  this.initialized = false;
345018
+ this.clients = [];
345015
345019
  this.baseline.clear();
345016
345020
  this.rightFileDiagnosticsState.clear();
345017
345021
  this.lastProcessedTimestamps.clear();
@@ -345037,7 +345041,8 @@ class DiagnosticTrackingService {
345037
345041
  return normalizePathForComparison(normalized);
345038
345042
  }
345039
345043
  async ensureFileOpened(fileUri) {
345040
- if (!this.initialized || !this.mcpClient || this.mcpClient.type !== "connected") {
345044
+ const ideClient = this.getIdeClient();
345045
+ if (!this.initialized || !ideClient) {
345041
345046
  return;
345042
345047
  }
345043
345048
  try {
@@ -345048,18 +345053,19 @@ class DiagnosticTrackingService {
345048
345053
  endText: "",
345049
345054
  selectToEndOfLine: false,
345050
345055
  makeFrontmost: false
345051
- }, this.mcpClient);
345056
+ }, ideClient);
345052
345057
  } catch (error52) {
345053
345058
  logError2(error52);
345054
345059
  }
345055
345060
  }
345056
345061
  async beforeFileEdited(filePath) {
345057
- if (!this.initialized || !this.mcpClient || this.mcpClient.type !== "connected") {
345062
+ const ideClient = this.getIdeClient();
345063
+ if (!this.initialized || !ideClient) {
345058
345064
  return;
345059
345065
  }
345060
345066
  const timestamp = Date.now();
345061
345067
  try {
345062
- const result = await callIdeRpc("getDiagnostics", { uri: `file://${filePath}` }, this.mcpClient);
345068
+ const result = await callIdeRpc("getDiagnostics", { uri: `file://${filePath}` }, ideClient);
345063
345069
  const diagnosticFile = this.parseDiagnosticResult(result)[0];
345064
345070
  if (diagnosticFile) {
345065
345071
  if (!pathsEqual(this.normalizeFileUri(filePath), this.normalizeFileUri(diagnosticFile.uri))) {
@@ -345077,12 +345083,13 @@ class DiagnosticTrackingService {
345077
345083
  } catch (_error) {}
345078
345084
  }
345079
345085
  async getNewDiagnostics() {
345080
- if (!this.initialized || !this.mcpClient || this.mcpClient.type !== "connected") {
345086
+ const ideClient = this.getIdeClient();
345087
+ if (!this.initialized || !ideClient) {
345081
345088
  return [];
345082
345089
  }
345083
345090
  let allDiagnosticFiles = [];
345084
345091
  try {
345085
- const result = await callIdeRpc("getDiagnostics", {}, this.mcpClient);
345092
+ const result = await callIdeRpc("getDiagnostics", {}, ideClient);
345086
345093
  allDiagnosticFiles = this.parseDiagnosticResult(result);
345087
345094
  } catch (_error) {
345088
345095
  return [];
@@ -345135,10 +345142,10 @@ class DiagnosticTrackingService {
345135
345142
  return a2.every((diagA) => b3.some((diagB) => this.areDiagnosticsEqual(diagA, diagB))) && b3.every((diagB) => a2.some((diagA) => this.areDiagnosticsEqual(diagA, diagB)));
345136
345143
  }
345137
345144
  async handleQueryStart(clients) {
345145
+ this.clients = clients;
345138
345146
  if (!this.initialized) {
345139
- const connectedIdeClient = getConnectedIdeClient(clients);
345140
- if (connectedIdeClient) {
345141
- this.initialize(connectedIdeClient);
345147
+ if (getConnectedIdeClient(clients)) {
345148
+ this.initialized = true;
345142
345149
  }
345143
345150
  } else {
345144
345151
  this.reset();
package/dist/myclaude.mjs CHANGED
@@ -4,8 +4,8 @@
4
4
  // MACRO - build-time constants (injected by build.ts)
5
5
  // MACRO injected by build script
6
6
  globalThis.MACRO = {
7
- VERSION: "0.1.306",
8
- BUILD_TIME: "2026-09-03T19:01:03.864Z",
7
+ VERSION: "0.1.308",
8
+ BUILD_TIME: "2026-09-04T17:39:13.049Z",
9
9
  PACKAGE_URL: "@funnycode/myclaude",
10
10
  NATIVE_PACKAGE_URL: "@funnycode/myclaude",
11
11
  VERSION_CHANGELOG: '',
@@ -120027,7 +120027,7 @@ var package_default;
120027
120027
  var init_package = __esm(() => {
120028
120028
  package_default = {
120029
120029
  name: "@funnycode/myclaude",
120030
- version: "0.1.306",
120030
+ version: "0.1.308",
120031
120031
  private: false,
120032
120032
  description: "An open-source AI coding assistant in your terminal - powered by Claude",
120033
120033
  license: "MIT",
@@ -344994,7 +344994,7 @@ class DiagnosticTrackingService {
344994
344994
  static instance;
344995
344995
  baseline = new Map;
344996
344996
  initialized = false;
344997
- mcpClient;
344997
+ clients = [];
344998
344998
  lastProcessedTimestamps = new Map;
344999
344999
  rightFileDiagnosticsState = new Map;
345000
345000
  static getInstance() {
@@ -345003,15 +345003,19 @@ class DiagnosticTrackingService {
345003
345003
  }
345004
345004
  return DiagnosticTrackingService.instance;
345005
345005
  }
345006
+ getIdeClient() {
345007
+ return getConnectedIdeClient(this.clients);
345008
+ }
345006
345009
  initialize(mcpClient) {
345007
345010
  if (this.initialized) {
345008
345011
  return;
345009
345012
  }
345010
- this.mcpClient = mcpClient;
345013
+ this.clients = [mcpClient];
345011
345014
  this.initialized = true;
345012
345015
  }
345013
345016
  async shutdown() {
345014
345017
  this.initialized = false;
345018
+ this.clients = [];
345015
345019
  this.baseline.clear();
345016
345020
  this.rightFileDiagnosticsState.clear();
345017
345021
  this.lastProcessedTimestamps.clear();
@@ -345037,7 +345041,8 @@ class DiagnosticTrackingService {
345037
345041
  return normalizePathForComparison(normalized);
345038
345042
  }
345039
345043
  async ensureFileOpened(fileUri) {
345040
- if (!this.initialized || !this.mcpClient || this.mcpClient.type !== "connected") {
345044
+ const ideClient = this.getIdeClient();
345045
+ if (!this.initialized || !ideClient) {
345041
345046
  return;
345042
345047
  }
345043
345048
  try {
@@ -345048,18 +345053,19 @@ class DiagnosticTrackingService {
345048
345053
  endText: "",
345049
345054
  selectToEndOfLine: false,
345050
345055
  makeFrontmost: false
345051
- }, this.mcpClient);
345056
+ }, ideClient);
345052
345057
  } catch (error52) {
345053
345058
  logError2(error52);
345054
345059
  }
345055
345060
  }
345056
345061
  async beforeFileEdited(filePath) {
345057
- if (!this.initialized || !this.mcpClient || this.mcpClient.type !== "connected") {
345062
+ const ideClient = this.getIdeClient();
345063
+ if (!this.initialized || !ideClient) {
345058
345064
  return;
345059
345065
  }
345060
345066
  const timestamp = Date.now();
345061
345067
  try {
345062
- const result = await callIdeRpc("getDiagnostics", { uri: `file://${filePath}` }, this.mcpClient);
345068
+ const result = await callIdeRpc("getDiagnostics", { uri: `file://${filePath}` }, ideClient);
345063
345069
  const diagnosticFile = this.parseDiagnosticResult(result)[0];
345064
345070
  if (diagnosticFile) {
345065
345071
  if (!pathsEqual(this.normalizeFileUri(filePath), this.normalizeFileUri(diagnosticFile.uri))) {
@@ -345077,12 +345083,13 @@ class DiagnosticTrackingService {
345077
345083
  } catch (_error) {}
345078
345084
  }
345079
345085
  async getNewDiagnostics() {
345080
- if (!this.initialized || !this.mcpClient || this.mcpClient.type !== "connected") {
345086
+ const ideClient = this.getIdeClient();
345087
+ if (!this.initialized || !ideClient) {
345081
345088
  return [];
345082
345089
  }
345083
345090
  let allDiagnosticFiles = [];
345084
345091
  try {
345085
- const result = await callIdeRpc("getDiagnostics", {}, this.mcpClient);
345092
+ const result = await callIdeRpc("getDiagnostics", {}, ideClient);
345086
345093
  allDiagnosticFiles = this.parseDiagnosticResult(result);
345087
345094
  } catch (_error) {
345088
345095
  return [];
@@ -345135,10 +345142,10 @@ class DiagnosticTrackingService {
345135
345142
  return a2.every((diagA) => b3.some((diagB) => this.areDiagnosticsEqual(diagA, diagB))) && b3.every((diagB) => a2.some((diagA) => this.areDiagnosticsEqual(diagA, diagB)));
345136
345143
  }
345137
345144
  async handleQueryStart(clients) {
345145
+ this.clients = clients;
345138
345146
  if (!this.initialized) {
345139
- const connectedIdeClient = getConnectedIdeClient(clients);
345140
- if (connectedIdeClient) {
345141
- this.initialize(connectedIdeClient);
345147
+ if (getConnectedIdeClient(clients)) {
345148
+ this.initialized = true;
345142
345149
  }
345143
345150
  } else {
345144
345151
  this.reset();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@funnycode/myclaude",
3
- "version": "0.1.306",
3
+ "version": "0.1.308",
4
4
  "private": false,
5
5
  "description": "An open-source AI coding assistant in your terminal - powered by Claude",
6
6
  "license": "MIT",