@funnycode/myclaude 0.1.118 → 0.1.119
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 +41 -45
- package/dist/myclaude.mjs +41 -45
- package/package.json +1 -1
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.
|
|
8
|
-
BUILD_TIME: "2026-07-
|
|
7
|
+
VERSION: "0.1.119",
|
|
8
|
+
BUILD_TIME: "2026-07-22T20:40:03.122Z",
|
|
9
9
|
PACKAGE_URL: "@funnycode/myclaude",
|
|
10
10
|
NATIVE_PACKAGE_URL: "@funnycode/myclaude",
|
|
11
11
|
VERSION_CHANGELOG: '',
|
|
@@ -117790,7 +117790,7 @@ var package_default;
|
|
|
117790
117790
|
var init_package = __esm(() => {
|
|
117791
117791
|
package_default = {
|
|
117792
117792
|
name: "@funnycode/myclaude",
|
|
117793
|
-
version: "0.1.
|
|
117793
|
+
version: "0.1.119",
|
|
117794
117794
|
private: false,
|
|
117795
117795
|
description: "An open-source AI coding assistant in your terminal - powered by Claude",
|
|
117796
117796
|
license: "MIT",
|
|
@@ -210450,37 +210450,27 @@ function enqueueDumpRequest(agentIdOrSessionId, callback) {
|
|
|
210450
210450
|
dumpRequestQueue.set(agentIdOrSessionId, []);
|
|
210451
210451
|
}
|
|
210452
210452
|
dumpRequestQueue.get(agentIdOrSessionId).push(callback);
|
|
210453
|
-
if (!
|
|
210454
|
-
|
|
210455
|
-
processQueue(agentIdOrSessionId);
|
|
210456
|
-
}
|
|
210457
|
-
}
|
|
210458
|
-
async function processQueue(agentIdOrSessionId) {
|
|
210459
|
-
try {
|
|
210460
|
-
while (true) {
|
|
210453
|
+
if (!processingPromises.has(agentIdOrSessionId)) {
|
|
210454
|
+
const promise2 = (async () => {
|
|
210461
210455
|
while (true) {
|
|
210462
|
-
const
|
|
210463
|
-
if (!
|
|
210456
|
+
const queue = dumpRequestQueue.get(agentIdOrSessionId);
|
|
210457
|
+
if (!queue || queue.length === 0) {
|
|
210464
210458
|
break;
|
|
210465
210459
|
}
|
|
210466
|
-
const
|
|
210460
|
+
const cb = queue.shift();
|
|
210467
210461
|
try {
|
|
210468
|
-
await
|
|
210462
|
+
await cb();
|
|
210469
210463
|
} catch (err2) {
|
|
210470
210464
|
logForDebugging(`dumpPrompts.processQueue: callback threw: ${err2}`, { level: "error" });
|
|
210471
210465
|
}
|
|
210472
210466
|
}
|
|
210473
|
-
|
|
210474
|
-
|
|
210475
|
-
|
|
210476
|
-
|
|
210477
|
-
|
|
210478
|
-
|
|
210479
|
-
|
|
210480
|
-
} catch (err2) {
|
|
210481
|
-
logError2(`processQueue: failed for ${agentIdOrSessionId}`, err2);
|
|
210482
|
-
dumpRequestQueue.delete(agentIdOrSessionId);
|
|
210483
|
-
processingFlags.delete(agentIdOrSessionId);
|
|
210467
|
+
})().catch((err2) => {
|
|
210468
|
+
logError2(`processQueue: failed for ${agentIdOrSessionId}`, err2);
|
|
210469
|
+
dumpRequestQueue.delete(agentIdOrSessionId);
|
|
210470
|
+
}).finally(() => {
|
|
210471
|
+
processingPromises.delete(agentIdOrSessionId);
|
|
210472
|
+
});
|
|
210473
|
+
processingPromises.set(agentIdOrSessionId, promise2);
|
|
210484
210474
|
}
|
|
210485
210475
|
}
|
|
210486
210476
|
function clearDumpState(agentIdOrSessionId) {
|
|
@@ -210677,7 +210667,7 @@ function createDumpPromptsFetch(agentIdOrSessionId) {
|
|
|
210677
210667
|
return response;
|
|
210678
210668
|
};
|
|
210679
210669
|
}
|
|
210680
|
-
var MAX_CACHED_REQUESTS = 5, cachedApiRequests, dumpState, dumpRequestQueue,
|
|
210670
|
+
var MAX_CACHED_REQUESTS = 5, cachedApiRequests, dumpState, dumpRequestQueue, processingPromises;
|
|
210681
210671
|
var init_dumpPrompts = __esm(() => {
|
|
210682
210672
|
init_state();
|
|
210683
210673
|
init_envUtils();
|
|
@@ -210690,7 +210680,7 @@ var init_dumpPrompts = __esm(() => {
|
|
|
210690
210680
|
cachedApiRequests = [];
|
|
210691
210681
|
dumpState = new Map;
|
|
210692
210682
|
dumpRequestQueue = new Map;
|
|
210693
|
-
|
|
210683
|
+
processingPromises = new Map;
|
|
210694
210684
|
});
|
|
210695
210685
|
|
|
210696
210686
|
// src/utils/abortController.ts
|
|
@@ -301629,9 +301619,15 @@ function memoizeWithTTL(fn, ttlMs) {
|
|
|
301629
301619
|
lastCachedAt = Date.now();
|
|
301630
301620
|
return freshResult;
|
|
301631
301621
|
}
|
|
301632
|
-
|
|
301622
|
+
if (memoized.cache.has(args[0])) {
|
|
301623
|
+
return memoized(...args);
|
|
301624
|
+
}
|
|
301625
|
+
return freshResult;
|
|
301633
301626
|
} catch (error49) {
|
|
301634
|
-
|
|
301627
|
+
if (memoized.cache.has(args[0])) {
|
|
301628
|
+
return memoized(...args);
|
|
301629
|
+
}
|
|
301630
|
+
return { success: false };
|
|
301635
301631
|
}
|
|
301636
301632
|
} finally {
|
|
301637
301633
|
pendingRefreshes.delete(key2);
|
|
@@ -407729,13 +407725,13 @@ var init_AppState = __esm(() => {
|
|
|
407729
407725
|
function useNotifications() {
|
|
407730
407726
|
const store = useAppStateStore();
|
|
407731
407727
|
const setAppState = useSetAppState();
|
|
407732
|
-
const
|
|
407728
|
+
const processQueue = import_react85.useCallback(() => {
|
|
407733
407729
|
setAppState((prev) => {
|
|
407734
407730
|
const next = getNext(prev.notifications.queue);
|
|
407735
407731
|
if (prev.notifications.current !== null || !next) {
|
|
407736
407732
|
return prev;
|
|
407737
407733
|
}
|
|
407738
|
-
currentTimeoutId = setTimeout((setAppState2, nextKey,
|
|
407734
|
+
currentTimeoutId = setTimeout((setAppState2, nextKey, processQueue2) => {
|
|
407739
407735
|
currentTimeoutId = null;
|
|
407740
407736
|
setAppState2((prev2) => {
|
|
407741
407737
|
if (prev2.notifications.current?.key !== nextKey) {
|
|
@@ -407749,8 +407745,8 @@ function useNotifications() {
|
|
|
407749
407745
|
}
|
|
407750
407746
|
};
|
|
407751
407747
|
});
|
|
407752
|
-
|
|
407753
|
-
}, next.timeoutMs ?? DEFAULT_TIMEOUT_MS2, setAppState, next.key,
|
|
407748
|
+
processQueue2();
|
|
407749
|
+
}, next.timeoutMs ?? DEFAULT_TIMEOUT_MS2, setAppState, next.key, processQueue);
|
|
407754
407750
|
return {
|
|
407755
407751
|
...prev,
|
|
407756
407752
|
notifications: {
|
|
@@ -407766,7 +407762,7 @@ function useNotifications() {
|
|
|
407766
407762
|
clearTimeout(currentTimeoutId);
|
|
407767
407763
|
currentTimeoutId = null;
|
|
407768
407764
|
}
|
|
407769
|
-
currentTimeoutId = setTimeout((setAppState2, notif2,
|
|
407765
|
+
currentTimeoutId = setTimeout((setAppState2, notif2, processQueue2) => {
|
|
407770
407766
|
currentTimeoutId = null;
|
|
407771
407767
|
setAppState2((prev) => {
|
|
407772
407768
|
if (prev.notifications.current?.key !== notif2.key) {
|
|
@@ -407780,8 +407776,8 @@ function useNotifications() {
|
|
|
407780
407776
|
}
|
|
407781
407777
|
};
|
|
407782
407778
|
});
|
|
407783
|
-
|
|
407784
|
-
}, notif.timeoutMs ?? DEFAULT_TIMEOUT_MS2, setAppState, notif,
|
|
407779
|
+
processQueue2();
|
|
407780
|
+
}, notif.timeoutMs ?? DEFAULT_TIMEOUT_MS2, setAppState, notif, processQueue);
|
|
407785
407781
|
setAppState((prev) => ({
|
|
407786
407782
|
...prev,
|
|
407787
407783
|
notifications: {
|
|
@@ -407799,7 +407795,7 @@ function useNotifications() {
|
|
|
407799
407795
|
clearTimeout(currentTimeoutId);
|
|
407800
407796
|
currentTimeoutId = null;
|
|
407801
407797
|
}
|
|
407802
|
-
currentTimeoutId = setTimeout((setAppState2, foldedKey,
|
|
407798
|
+
currentTimeoutId = setTimeout((setAppState2, foldedKey, processQueue2) => {
|
|
407803
407799
|
currentTimeoutId = null;
|
|
407804
407800
|
setAppState2((p) => {
|
|
407805
407801
|
if (p.notifications.current?.key !== foldedKey) {
|
|
@@ -407813,8 +407809,8 @@ function useNotifications() {
|
|
|
407813
407809
|
}
|
|
407814
407810
|
};
|
|
407815
407811
|
});
|
|
407816
|
-
|
|
407817
|
-
}, folded.timeoutMs ?? DEFAULT_TIMEOUT_MS2, setAppState, folded.key,
|
|
407812
|
+
processQueue2();
|
|
407813
|
+
}, folded.timeoutMs ?? DEFAULT_TIMEOUT_MS2, setAppState, folded.key, processQueue);
|
|
407818
407814
|
return {
|
|
407819
407815
|
...prev,
|
|
407820
407816
|
notifications: {
|
|
@@ -407854,8 +407850,8 @@ function useNotifications() {
|
|
|
407854
407850
|
}
|
|
407855
407851
|
};
|
|
407856
407852
|
});
|
|
407857
|
-
|
|
407858
|
-
}, [setAppState,
|
|
407853
|
+
processQueue();
|
|
407854
|
+
}, [setAppState, processQueue]);
|
|
407859
407855
|
const removeNotification = import_react85.useCallback((key2) => {
|
|
407860
407856
|
setAppState((prev) => {
|
|
407861
407857
|
const isCurrent = prev.notifications.current?.key === key2;
|
|
@@ -407875,11 +407871,11 @@ function useNotifications() {
|
|
|
407875
407871
|
}
|
|
407876
407872
|
};
|
|
407877
407873
|
});
|
|
407878
|
-
|
|
407879
|
-
}, [setAppState,
|
|
407874
|
+
processQueue();
|
|
407875
|
+
}, [setAppState, processQueue]);
|
|
407880
407876
|
import_react85.useEffect(() => {
|
|
407881
407877
|
if (store.getState().notifications.queue.length > 0) {
|
|
407882
|
-
|
|
407878
|
+
processQueue();
|
|
407883
407879
|
}
|
|
407884
407880
|
}, []);
|
|
407885
407881
|
return {
|
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.
|
|
8
|
-
BUILD_TIME: "2026-07-
|
|
7
|
+
VERSION: "0.1.119",
|
|
8
|
+
BUILD_TIME: "2026-07-22T20:40:03.122Z",
|
|
9
9
|
PACKAGE_URL: "@funnycode/myclaude",
|
|
10
10
|
NATIVE_PACKAGE_URL: "@funnycode/myclaude",
|
|
11
11
|
VERSION_CHANGELOG: '',
|
|
@@ -117790,7 +117790,7 @@ var package_default;
|
|
|
117790
117790
|
var init_package = __esm(() => {
|
|
117791
117791
|
package_default = {
|
|
117792
117792
|
name: "@funnycode/myclaude",
|
|
117793
|
-
version: "0.1.
|
|
117793
|
+
version: "0.1.119",
|
|
117794
117794
|
private: false,
|
|
117795
117795
|
description: "An open-source AI coding assistant in your terminal - powered by Claude",
|
|
117796
117796
|
license: "MIT",
|
|
@@ -210450,37 +210450,27 @@ function enqueueDumpRequest(agentIdOrSessionId, callback) {
|
|
|
210450
210450
|
dumpRequestQueue.set(agentIdOrSessionId, []);
|
|
210451
210451
|
}
|
|
210452
210452
|
dumpRequestQueue.get(agentIdOrSessionId).push(callback);
|
|
210453
|
-
if (!
|
|
210454
|
-
|
|
210455
|
-
processQueue(agentIdOrSessionId);
|
|
210456
|
-
}
|
|
210457
|
-
}
|
|
210458
|
-
async function processQueue(agentIdOrSessionId) {
|
|
210459
|
-
try {
|
|
210460
|
-
while (true) {
|
|
210453
|
+
if (!processingPromises.has(agentIdOrSessionId)) {
|
|
210454
|
+
const promise2 = (async () => {
|
|
210461
210455
|
while (true) {
|
|
210462
|
-
const
|
|
210463
|
-
if (!
|
|
210456
|
+
const queue = dumpRequestQueue.get(agentIdOrSessionId);
|
|
210457
|
+
if (!queue || queue.length === 0) {
|
|
210464
210458
|
break;
|
|
210465
210459
|
}
|
|
210466
|
-
const
|
|
210460
|
+
const cb = queue.shift();
|
|
210467
210461
|
try {
|
|
210468
|
-
await
|
|
210462
|
+
await cb();
|
|
210469
210463
|
} catch (err2) {
|
|
210470
210464
|
logForDebugging(`dumpPrompts.processQueue: callback threw: ${err2}`, { level: "error" });
|
|
210471
210465
|
}
|
|
210472
210466
|
}
|
|
210473
|
-
|
|
210474
|
-
|
|
210475
|
-
|
|
210476
|
-
|
|
210477
|
-
|
|
210478
|
-
|
|
210479
|
-
|
|
210480
|
-
} catch (err2) {
|
|
210481
|
-
logError2(`processQueue: failed for ${agentIdOrSessionId}`, err2);
|
|
210482
|
-
dumpRequestQueue.delete(agentIdOrSessionId);
|
|
210483
|
-
processingFlags.delete(agentIdOrSessionId);
|
|
210467
|
+
})().catch((err2) => {
|
|
210468
|
+
logError2(`processQueue: failed for ${agentIdOrSessionId}`, err2);
|
|
210469
|
+
dumpRequestQueue.delete(agentIdOrSessionId);
|
|
210470
|
+
}).finally(() => {
|
|
210471
|
+
processingPromises.delete(agentIdOrSessionId);
|
|
210472
|
+
});
|
|
210473
|
+
processingPromises.set(agentIdOrSessionId, promise2);
|
|
210484
210474
|
}
|
|
210485
210475
|
}
|
|
210486
210476
|
function clearDumpState(agentIdOrSessionId) {
|
|
@@ -210677,7 +210667,7 @@ function createDumpPromptsFetch(agentIdOrSessionId) {
|
|
|
210677
210667
|
return response;
|
|
210678
210668
|
};
|
|
210679
210669
|
}
|
|
210680
|
-
var MAX_CACHED_REQUESTS = 5, cachedApiRequests, dumpState, dumpRequestQueue,
|
|
210670
|
+
var MAX_CACHED_REQUESTS = 5, cachedApiRequests, dumpState, dumpRequestQueue, processingPromises;
|
|
210681
210671
|
var init_dumpPrompts = __esm(() => {
|
|
210682
210672
|
init_state();
|
|
210683
210673
|
init_envUtils();
|
|
@@ -210690,7 +210680,7 @@ var init_dumpPrompts = __esm(() => {
|
|
|
210690
210680
|
cachedApiRequests = [];
|
|
210691
210681
|
dumpState = new Map;
|
|
210692
210682
|
dumpRequestQueue = new Map;
|
|
210693
|
-
|
|
210683
|
+
processingPromises = new Map;
|
|
210694
210684
|
});
|
|
210695
210685
|
|
|
210696
210686
|
// src/utils/abortController.ts
|
|
@@ -301629,9 +301619,15 @@ function memoizeWithTTL(fn, ttlMs) {
|
|
|
301629
301619
|
lastCachedAt = Date.now();
|
|
301630
301620
|
return freshResult;
|
|
301631
301621
|
}
|
|
301632
|
-
|
|
301622
|
+
if (memoized.cache.has(args[0])) {
|
|
301623
|
+
return memoized(...args);
|
|
301624
|
+
}
|
|
301625
|
+
return freshResult;
|
|
301633
301626
|
} catch (error49) {
|
|
301634
|
-
|
|
301627
|
+
if (memoized.cache.has(args[0])) {
|
|
301628
|
+
return memoized(...args);
|
|
301629
|
+
}
|
|
301630
|
+
return { success: false };
|
|
301635
301631
|
}
|
|
301636
301632
|
} finally {
|
|
301637
301633
|
pendingRefreshes.delete(key2);
|
|
@@ -407729,13 +407725,13 @@ var init_AppState = __esm(() => {
|
|
|
407729
407725
|
function useNotifications() {
|
|
407730
407726
|
const store = useAppStateStore();
|
|
407731
407727
|
const setAppState = useSetAppState();
|
|
407732
|
-
const
|
|
407728
|
+
const processQueue = import_react85.useCallback(() => {
|
|
407733
407729
|
setAppState((prev) => {
|
|
407734
407730
|
const next = getNext(prev.notifications.queue);
|
|
407735
407731
|
if (prev.notifications.current !== null || !next) {
|
|
407736
407732
|
return prev;
|
|
407737
407733
|
}
|
|
407738
|
-
currentTimeoutId = setTimeout((setAppState2, nextKey,
|
|
407734
|
+
currentTimeoutId = setTimeout((setAppState2, nextKey, processQueue2) => {
|
|
407739
407735
|
currentTimeoutId = null;
|
|
407740
407736
|
setAppState2((prev2) => {
|
|
407741
407737
|
if (prev2.notifications.current?.key !== nextKey) {
|
|
@@ -407749,8 +407745,8 @@ function useNotifications() {
|
|
|
407749
407745
|
}
|
|
407750
407746
|
};
|
|
407751
407747
|
});
|
|
407752
|
-
|
|
407753
|
-
}, next.timeoutMs ?? DEFAULT_TIMEOUT_MS2, setAppState, next.key,
|
|
407748
|
+
processQueue2();
|
|
407749
|
+
}, next.timeoutMs ?? DEFAULT_TIMEOUT_MS2, setAppState, next.key, processQueue);
|
|
407754
407750
|
return {
|
|
407755
407751
|
...prev,
|
|
407756
407752
|
notifications: {
|
|
@@ -407766,7 +407762,7 @@ function useNotifications() {
|
|
|
407766
407762
|
clearTimeout(currentTimeoutId);
|
|
407767
407763
|
currentTimeoutId = null;
|
|
407768
407764
|
}
|
|
407769
|
-
currentTimeoutId = setTimeout((setAppState2, notif2,
|
|
407765
|
+
currentTimeoutId = setTimeout((setAppState2, notif2, processQueue2) => {
|
|
407770
407766
|
currentTimeoutId = null;
|
|
407771
407767
|
setAppState2((prev) => {
|
|
407772
407768
|
if (prev.notifications.current?.key !== notif2.key) {
|
|
@@ -407780,8 +407776,8 @@ function useNotifications() {
|
|
|
407780
407776
|
}
|
|
407781
407777
|
};
|
|
407782
407778
|
});
|
|
407783
|
-
|
|
407784
|
-
}, notif.timeoutMs ?? DEFAULT_TIMEOUT_MS2, setAppState, notif,
|
|
407779
|
+
processQueue2();
|
|
407780
|
+
}, notif.timeoutMs ?? DEFAULT_TIMEOUT_MS2, setAppState, notif, processQueue);
|
|
407785
407781
|
setAppState((prev) => ({
|
|
407786
407782
|
...prev,
|
|
407787
407783
|
notifications: {
|
|
@@ -407799,7 +407795,7 @@ function useNotifications() {
|
|
|
407799
407795
|
clearTimeout(currentTimeoutId);
|
|
407800
407796
|
currentTimeoutId = null;
|
|
407801
407797
|
}
|
|
407802
|
-
currentTimeoutId = setTimeout((setAppState2, foldedKey,
|
|
407798
|
+
currentTimeoutId = setTimeout((setAppState2, foldedKey, processQueue2) => {
|
|
407803
407799
|
currentTimeoutId = null;
|
|
407804
407800
|
setAppState2((p) => {
|
|
407805
407801
|
if (p.notifications.current?.key !== foldedKey) {
|
|
@@ -407813,8 +407809,8 @@ function useNotifications() {
|
|
|
407813
407809
|
}
|
|
407814
407810
|
};
|
|
407815
407811
|
});
|
|
407816
|
-
|
|
407817
|
-
}, folded.timeoutMs ?? DEFAULT_TIMEOUT_MS2, setAppState, folded.key,
|
|
407812
|
+
processQueue2();
|
|
407813
|
+
}, folded.timeoutMs ?? DEFAULT_TIMEOUT_MS2, setAppState, folded.key, processQueue);
|
|
407818
407814
|
return {
|
|
407819
407815
|
...prev,
|
|
407820
407816
|
notifications: {
|
|
@@ -407854,8 +407850,8 @@ function useNotifications() {
|
|
|
407854
407850
|
}
|
|
407855
407851
|
};
|
|
407856
407852
|
});
|
|
407857
|
-
|
|
407858
|
-
}, [setAppState,
|
|
407853
|
+
processQueue();
|
|
407854
|
+
}, [setAppState, processQueue]);
|
|
407859
407855
|
const removeNotification = import_react85.useCallback((key2) => {
|
|
407860
407856
|
setAppState((prev) => {
|
|
407861
407857
|
const isCurrent = prev.notifications.current?.key === key2;
|
|
@@ -407875,11 +407871,11 @@ function useNotifications() {
|
|
|
407875
407871
|
}
|
|
407876
407872
|
};
|
|
407877
407873
|
});
|
|
407878
|
-
|
|
407879
|
-
}, [setAppState,
|
|
407874
|
+
processQueue();
|
|
407875
|
+
}, [setAppState, processQueue]);
|
|
407880
407876
|
import_react85.useEffect(() => {
|
|
407881
407877
|
if (store.getState().notifications.queue.length > 0) {
|
|
407882
|
-
|
|
407878
|
+
processQueue();
|
|
407883
407879
|
}
|
|
407884
407880
|
}, []);
|
|
407885
407881
|
return {
|