@funnycode/myclaude 0.1.80 → 0.1.82
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 +70 -31
- package/dist/myclaude.mjs +70 -31
- 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.82",
|
|
8
|
+
BUILD_TIME: "2026-07-16T14:27:50.796Z",
|
|
9
9
|
PACKAGE_URL: "@funnycode/myclaude",
|
|
10
10
|
NATIVE_PACKAGE_URL: "@funnycode/myclaude",
|
|
11
11
|
VERSION_CHANGELOG: '',
|
|
@@ -117487,7 +117487,7 @@ var package_default;
|
|
|
117487
117487
|
var init_package = __esm(() => {
|
|
117488
117488
|
package_default = {
|
|
117489
117489
|
name: "@funnycode/myclaude",
|
|
117490
|
-
version: "0.1.
|
|
117490
|
+
version: "0.1.82",
|
|
117491
117491
|
private: false,
|
|
117492
117492
|
description: "An open-source AI coding assistant in your terminal - powered by Claude",
|
|
117493
117493
|
license: "MIT",
|
|
@@ -210155,6 +210155,32 @@ import { dirname as dirname27, join as join48 } from "path";
|
|
|
210155
210155
|
function hashString3(str) {
|
|
210156
210156
|
return createHash5("sha256").update(str).digest("hex");
|
|
210157
210157
|
}
|
|
210158
|
+
function enqueueDumpRequest(agentIdOrSessionId, callback) {
|
|
210159
|
+
if (!dumpRequestQueue.has(agentIdOrSessionId)) {
|
|
210160
|
+
dumpRequestQueue.set(agentIdOrSessionId, []);
|
|
210161
|
+
}
|
|
210162
|
+
dumpRequestQueue.get(agentIdOrSessionId).push(callback);
|
|
210163
|
+
if (!processingQueues.has(agentIdOrSessionId)) {
|
|
210164
|
+
processQueue(agentIdOrSessionId);
|
|
210165
|
+
}
|
|
210166
|
+
}
|
|
210167
|
+
function processQueue(agentIdOrSessionId) {
|
|
210168
|
+
processingQueues.add(agentIdOrSessionId);
|
|
210169
|
+
const queue = dumpRequestQueue.get(agentIdOrSessionId);
|
|
210170
|
+
if (!queue || queue.length === 0) {
|
|
210171
|
+
dumpRequestQueue.delete(agentIdOrSessionId);
|
|
210172
|
+
processingQueues.delete(agentIdOrSessionId);
|
|
210173
|
+
return;
|
|
210174
|
+
}
|
|
210175
|
+
const callback = queue.shift();
|
|
210176
|
+
callback();
|
|
210177
|
+
if (queue.length > 0) {
|
|
210178
|
+
setImmediate(() => processQueue(agentIdOrSessionId));
|
|
210179
|
+
} else {
|
|
210180
|
+
dumpRequestQueue.delete(agentIdOrSessionId);
|
|
210181
|
+
processingQueues.delete(agentIdOrSessionId);
|
|
210182
|
+
}
|
|
210183
|
+
}
|
|
210158
210184
|
function clearDumpState(agentIdOrSessionId) {
|
|
210159
210185
|
dumpState.delete(agentIdOrSessionId);
|
|
210160
210186
|
}
|
|
@@ -210164,10 +210190,14 @@ function clearAllDumpState() {
|
|
|
210164
210190
|
function addApiRequestToCache(requestData) {
|
|
210165
210191
|
if (process.env.USER_TYPE !== "ant")
|
|
210166
210192
|
return;
|
|
210167
|
-
|
|
210193
|
+
const metadata = {
|
|
210168
210194
|
timestamp: new Date().toISOString(),
|
|
210169
|
-
request:
|
|
210170
|
-
|
|
210195
|
+
request: {
|
|
210196
|
+
model: requestData.model,
|
|
210197
|
+
requestHash: hashString3(JSON.stringify(requestData))
|
|
210198
|
+
}
|
|
210199
|
+
};
|
|
210200
|
+
cachedApiRequests.push(metadata);
|
|
210171
210201
|
if (cachedApiRequests.length > MAX_CACHED_REQUESTS) {
|
|
210172
210202
|
cachedApiRequests.shift();
|
|
210173
210203
|
}
|
|
@@ -210200,10 +210230,20 @@ function dumpRequest(body, ts, state, filePath) {
|
|
|
210200
210230
|
const entries = [];
|
|
210201
210231
|
const messages = req.messages ?? [];
|
|
210202
210232
|
const fingerprint = initFingerprint(req);
|
|
210203
|
-
|
|
210233
|
+
let initDataStr;
|
|
210234
|
+
let initDataHash;
|
|
210235
|
+
const shouldWriteInitData = !state.initialized || fingerprint !== state.lastInitFingerprint;
|
|
210236
|
+
if (shouldWriteInitData) {
|
|
210204
210237
|
const { messages: _2, ...initData } = req;
|
|
210205
|
-
|
|
210206
|
-
|
|
210238
|
+
initDataStr = jsonStringify(initData);
|
|
210239
|
+
initDataHash = hashString3(initDataStr);
|
|
210240
|
+
}
|
|
210241
|
+
for (const msg of messages.slice(state.messageCountSeen)) {
|
|
210242
|
+
if (msg.role === "user") {
|
|
210243
|
+
entries.push(jsonStringify({ type: "message", timestamp: ts, data: msg }));
|
|
210244
|
+
}
|
|
210245
|
+
}
|
|
210246
|
+
if (shouldWriteInitData) {
|
|
210207
210247
|
state.lastInitFingerprint = fingerprint;
|
|
210208
210248
|
if (!state.initialized) {
|
|
210209
210249
|
state.initialized = true;
|
|
@@ -210214,11 +210254,6 @@ function dumpRequest(body, ts, state, filePath) {
|
|
|
210214
210254
|
entries.push(`{"type":"system_update","timestamp":"${ts}","data":${initDataStr}}`);
|
|
210215
210255
|
}
|
|
210216
210256
|
}
|
|
210217
|
-
for (const msg of messages.slice(state.messageCountSeen)) {
|
|
210218
|
-
if (msg.role === "user") {
|
|
210219
|
-
entries.push(jsonStringify({ type: "message", timestamp: ts, data: msg }));
|
|
210220
|
-
}
|
|
210221
|
-
}
|
|
210222
210257
|
state.messageCountSeen = messages.length;
|
|
210223
210258
|
appendToFile(filePath, entries);
|
|
210224
210259
|
} catch (err2) {
|
|
@@ -210238,7 +210273,9 @@ function createDumpPromptsFetch(agentIdOrSessionId) {
|
|
|
210238
210273
|
let timestamp;
|
|
210239
210274
|
if (init2?.method === "POST" && init2.body) {
|
|
210240
210275
|
timestamp = new Date().toISOString();
|
|
210241
|
-
|
|
210276
|
+
enqueueDumpRequest(agentIdOrSessionId, () => {
|
|
210277
|
+
dumpRequest(init2.body, timestamp, state, filePath);
|
|
210278
|
+
});
|
|
210242
210279
|
}
|
|
210243
210280
|
const response = await globalThis.fetch(input, init2);
|
|
210244
210281
|
if (timestamp && response.ok && process.env.USER_TYPE === "ant" && process.env.DUMP_PROMPTS === "1") {
|
|
@@ -210290,7 +210327,7 @@ function createDumpPromptsFetch(agentIdOrSessionId) {
|
|
|
210290
210327
|
return response;
|
|
210291
210328
|
};
|
|
210292
210329
|
}
|
|
210293
|
-
var MAX_CACHED_REQUESTS = 5, cachedApiRequests, dumpState;
|
|
210330
|
+
var MAX_CACHED_REQUESTS = 5, cachedApiRequests, dumpState, dumpRequestQueue, processingQueues;
|
|
210294
210331
|
var init_dumpPrompts = __esm(() => {
|
|
210295
210332
|
init_state();
|
|
210296
210333
|
init_envUtils();
|
|
@@ -210298,6 +210335,8 @@ var init_dumpPrompts = __esm(() => {
|
|
|
210298
210335
|
init_debug();
|
|
210299
210336
|
cachedApiRequests = [];
|
|
210300
210337
|
dumpState = new Map;
|
|
210338
|
+
dumpRequestQueue = new Map;
|
|
210339
|
+
processingQueues = new Set;
|
|
210301
210340
|
});
|
|
210302
210341
|
|
|
210303
210342
|
// src/utils/abortController.ts
|
|
@@ -406815,13 +406854,13 @@ var init_AppState = __esm(() => {
|
|
|
406815
406854
|
function useNotifications() {
|
|
406816
406855
|
const store = useAppStateStore();
|
|
406817
406856
|
const setAppState = useSetAppState();
|
|
406818
|
-
const
|
|
406857
|
+
const processQueue2 = import_react85.useCallback(() => {
|
|
406819
406858
|
setAppState((prev) => {
|
|
406820
406859
|
const next = getNext(prev.notifications.queue);
|
|
406821
406860
|
if (prev.notifications.current !== null || !next) {
|
|
406822
406861
|
return prev;
|
|
406823
406862
|
}
|
|
406824
|
-
currentTimeoutId = setTimeout((setAppState2, nextKey,
|
|
406863
|
+
currentTimeoutId = setTimeout((setAppState2, nextKey, processQueue3) => {
|
|
406825
406864
|
currentTimeoutId = null;
|
|
406826
406865
|
setAppState2((prev2) => {
|
|
406827
406866
|
if (prev2.notifications.current?.key !== nextKey) {
|
|
@@ -406835,8 +406874,8 @@ function useNotifications() {
|
|
|
406835
406874
|
}
|
|
406836
406875
|
};
|
|
406837
406876
|
});
|
|
406838
|
-
|
|
406839
|
-
}, next.timeoutMs ?? DEFAULT_TIMEOUT_MS2, setAppState, next.key,
|
|
406877
|
+
processQueue3();
|
|
406878
|
+
}, next.timeoutMs ?? DEFAULT_TIMEOUT_MS2, setAppState, next.key, processQueue2);
|
|
406840
406879
|
return {
|
|
406841
406880
|
...prev,
|
|
406842
406881
|
notifications: {
|
|
@@ -406852,7 +406891,7 @@ function useNotifications() {
|
|
|
406852
406891
|
clearTimeout(currentTimeoutId);
|
|
406853
406892
|
currentTimeoutId = null;
|
|
406854
406893
|
}
|
|
406855
|
-
currentTimeoutId = setTimeout((setAppState2, notif2,
|
|
406894
|
+
currentTimeoutId = setTimeout((setAppState2, notif2, processQueue3) => {
|
|
406856
406895
|
currentTimeoutId = null;
|
|
406857
406896
|
setAppState2((prev) => {
|
|
406858
406897
|
if (prev.notifications.current?.key !== notif2.key) {
|
|
@@ -406866,8 +406905,8 @@ function useNotifications() {
|
|
|
406866
406905
|
}
|
|
406867
406906
|
};
|
|
406868
406907
|
});
|
|
406869
|
-
|
|
406870
|
-
}, notif.timeoutMs ?? DEFAULT_TIMEOUT_MS2, setAppState, notif,
|
|
406908
|
+
processQueue3();
|
|
406909
|
+
}, notif.timeoutMs ?? DEFAULT_TIMEOUT_MS2, setAppState, notif, processQueue2);
|
|
406871
406910
|
setAppState((prev) => ({
|
|
406872
406911
|
...prev,
|
|
406873
406912
|
notifications: {
|
|
@@ -406885,7 +406924,7 @@ function useNotifications() {
|
|
|
406885
406924
|
clearTimeout(currentTimeoutId);
|
|
406886
406925
|
currentTimeoutId = null;
|
|
406887
406926
|
}
|
|
406888
|
-
currentTimeoutId = setTimeout((setAppState2, foldedKey,
|
|
406927
|
+
currentTimeoutId = setTimeout((setAppState2, foldedKey, processQueue3) => {
|
|
406889
406928
|
currentTimeoutId = null;
|
|
406890
406929
|
setAppState2((p) => {
|
|
406891
406930
|
if (p.notifications.current?.key !== foldedKey) {
|
|
@@ -406899,8 +406938,8 @@ function useNotifications() {
|
|
|
406899
406938
|
}
|
|
406900
406939
|
};
|
|
406901
406940
|
});
|
|
406902
|
-
|
|
406903
|
-
}, folded.timeoutMs ?? DEFAULT_TIMEOUT_MS2, setAppState, folded.key,
|
|
406941
|
+
processQueue3();
|
|
406942
|
+
}, folded.timeoutMs ?? DEFAULT_TIMEOUT_MS2, setAppState, folded.key, processQueue2);
|
|
406904
406943
|
return {
|
|
406905
406944
|
...prev,
|
|
406906
406945
|
notifications: {
|
|
@@ -406940,8 +406979,8 @@ function useNotifications() {
|
|
|
406940
406979
|
}
|
|
406941
406980
|
};
|
|
406942
406981
|
});
|
|
406943
|
-
|
|
406944
|
-
}, [setAppState,
|
|
406982
|
+
processQueue2();
|
|
406983
|
+
}, [setAppState, processQueue2]);
|
|
406945
406984
|
const removeNotification = import_react85.useCallback((key2) => {
|
|
406946
406985
|
setAppState((prev) => {
|
|
406947
406986
|
const isCurrent = prev.notifications.current?.key === key2;
|
|
@@ -406961,11 +407000,11 @@ function useNotifications() {
|
|
|
406961
407000
|
}
|
|
406962
407001
|
};
|
|
406963
407002
|
});
|
|
406964
|
-
|
|
406965
|
-
}, [setAppState,
|
|
407003
|
+
processQueue2();
|
|
407004
|
+
}, [setAppState, processQueue2]);
|
|
406966
407005
|
import_react85.useEffect(() => {
|
|
406967
407006
|
if (store.getState().notifications.queue.length > 0) {
|
|
406968
|
-
|
|
407007
|
+
processQueue2();
|
|
406969
407008
|
}
|
|
406970
407009
|
}, []);
|
|
406971
407010
|
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.82",
|
|
8
|
+
BUILD_TIME: "2026-07-16T14:27:50.796Z",
|
|
9
9
|
PACKAGE_URL: "@funnycode/myclaude",
|
|
10
10
|
NATIVE_PACKAGE_URL: "@funnycode/myclaude",
|
|
11
11
|
VERSION_CHANGELOG: '',
|
|
@@ -117487,7 +117487,7 @@ var package_default;
|
|
|
117487
117487
|
var init_package = __esm(() => {
|
|
117488
117488
|
package_default = {
|
|
117489
117489
|
name: "@funnycode/myclaude",
|
|
117490
|
-
version: "0.1.
|
|
117490
|
+
version: "0.1.82",
|
|
117491
117491
|
private: false,
|
|
117492
117492
|
description: "An open-source AI coding assistant in your terminal - powered by Claude",
|
|
117493
117493
|
license: "MIT",
|
|
@@ -210155,6 +210155,32 @@ import { dirname as dirname27, join as join48 } from "path";
|
|
|
210155
210155
|
function hashString3(str) {
|
|
210156
210156
|
return createHash5("sha256").update(str).digest("hex");
|
|
210157
210157
|
}
|
|
210158
|
+
function enqueueDumpRequest(agentIdOrSessionId, callback) {
|
|
210159
|
+
if (!dumpRequestQueue.has(agentIdOrSessionId)) {
|
|
210160
|
+
dumpRequestQueue.set(agentIdOrSessionId, []);
|
|
210161
|
+
}
|
|
210162
|
+
dumpRequestQueue.get(agentIdOrSessionId).push(callback);
|
|
210163
|
+
if (!processingQueues.has(agentIdOrSessionId)) {
|
|
210164
|
+
processQueue(agentIdOrSessionId);
|
|
210165
|
+
}
|
|
210166
|
+
}
|
|
210167
|
+
function processQueue(agentIdOrSessionId) {
|
|
210168
|
+
processingQueues.add(agentIdOrSessionId);
|
|
210169
|
+
const queue = dumpRequestQueue.get(agentIdOrSessionId);
|
|
210170
|
+
if (!queue || queue.length === 0) {
|
|
210171
|
+
dumpRequestQueue.delete(agentIdOrSessionId);
|
|
210172
|
+
processingQueues.delete(agentIdOrSessionId);
|
|
210173
|
+
return;
|
|
210174
|
+
}
|
|
210175
|
+
const callback = queue.shift();
|
|
210176
|
+
callback();
|
|
210177
|
+
if (queue.length > 0) {
|
|
210178
|
+
setImmediate(() => processQueue(agentIdOrSessionId));
|
|
210179
|
+
} else {
|
|
210180
|
+
dumpRequestQueue.delete(agentIdOrSessionId);
|
|
210181
|
+
processingQueues.delete(agentIdOrSessionId);
|
|
210182
|
+
}
|
|
210183
|
+
}
|
|
210158
210184
|
function clearDumpState(agentIdOrSessionId) {
|
|
210159
210185
|
dumpState.delete(agentIdOrSessionId);
|
|
210160
210186
|
}
|
|
@@ -210164,10 +210190,14 @@ function clearAllDumpState() {
|
|
|
210164
210190
|
function addApiRequestToCache(requestData) {
|
|
210165
210191
|
if (process.env.USER_TYPE !== "ant")
|
|
210166
210192
|
return;
|
|
210167
|
-
|
|
210193
|
+
const metadata = {
|
|
210168
210194
|
timestamp: new Date().toISOString(),
|
|
210169
|
-
request:
|
|
210170
|
-
|
|
210195
|
+
request: {
|
|
210196
|
+
model: requestData.model,
|
|
210197
|
+
requestHash: hashString3(JSON.stringify(requestData))
|
|
210198
|
+
}
|
|
210199
|
+
};
|
|
210200
|
+
cachedApiRequests.push(metadata);
|
|
210171
210201
|
if (cachedApiRequests.length > MAX_CACHED_REQUESTS) {
|
|
210172
210202
|
cachedApiRequests.shift();
|
|
210173
210203
|
}
|
|
@@ -210200,10 +210230,20 @@ function dumpRequest(body, ts, state, filePath) {
|
|
|
210200
210230
|
const entries = [];
|
|
210201
210231
|
const messages = req.messages ?? [];
|
|
210202
210232
|
const fingerprint = initFingerprint(req);
|
|
210203
|
-
|
|
210233
|
+
let initDataStr;
|
|
210234
|
+
let initDataHash;
|
|
210235
|
+
const shouldWriteInitData = !state.initialized || fingerprint !== state.lastInitFingerprint;
|
|
210236
|
+
if (shouldWriteInitData) {
|
|
210204
210237
|
const { messages: _2, ...initData } = req;
|
|
210205
|
-
|
|
210206
|
-
|
|
210238
|
+
initDataStr = jsonStringify(initData);
|
|
210239
|
+
initDataHash = hashString3(initDataStr);
|
|
210240
|
+
}
|
|
210241
|
+
for (const msg of messages.slice(state.messageCountSeen)) {
|
|
210242
|
+
if (msg.role === "user") {
|
|
210243
|
+
entries.push(jsonStringify({ type: "message", timestamp: ts, data: msg }));
|
|
210244
|
+
}
|
|
210245
|
+
}
|
|
210246
|
+
if (shouldWriteInitData) {
|
|
210207
210247
|
state.lastInitFingerprint = fingerprint;
|
|
210208
210248
|
if (!state.initialized) {
|
|
210209
210249
|
state.initialized = true;
|
|
@@ -210214,11 +210254,6 @@ function dumpRequest(body, ts, state, filePath) {
|
|
|
210214
210254
|
entries.push(`{"type":"system_update","timestamp":"${ts}","data":${initDataStr}}`);
|
|
210215
210255
|
}
|
|
210216
210256
|
}
|
|
210217
|
-
for (const msg of messages.slice(state.messageCountSeen)) {
|
|
210218
|
-
if (msg.role === "user") {
|
|
210219
|
-
entries.push(jsonStringify({ type: "message", timestamp: ts, data: msg }));
|
|
210220
|
-
}
|
|
210221
|
-
}
|
|
210222
210257
|
state.messageCountSeen = messages.length;
|
|
210223
210258
|
appendToFile(filePath, entries);
|
|
210224
210259
|
} catch (err2) {
|
|
@@ -210238,7 +210273,9 @@ function createDumpPromptsFetch(agentIdOrSessionId) {
|
|
|
210238
210273
|
let timestamp;
|
|
210239
210274
|
if (init2?.method === "POST" && init2.body) {
|
|
210240
210275
|
timestamp = new Date().toISOString();
|
|
210241
|
-
|
|
210276
|
+
enqueueDumpRequest(agentIdOrSessionId, () => {
|
|
210277
|
+
dumpRequest(init2.body, timestamp, state, filePath);
|
|
210278
|
+
});
|
|
210242
210279
|
}
|
|
210243
210280
|
const response = await globalThis.fetch(input, init2);
|
|
210244
210281
|
if (timestamp && response.ok && process.env.USER_TYPE === "ant" && process.env.DUMP_PROMPTS === "1") {
|
|
@@ -210290,7 +210327,7 @@ function createDumpPromptsFetch(agentIdOrSessionId) {
|
|
|
210290
210327
|
return response;
|
|
210291
210328
|
};
|
|
210292
210329
|
}
|
|
210293
|
-
var MAX_CACHED_REQUESTS = 5, cachedApiRequests, dumpState;
|
|
210330
|
+
var MAX_CACHED_REQUESTS = 5, cachedApiRequests, dumpState, dumpRequestQueue, processingQueues;
|
|
210294
210331
|
var init_dumpPrompts = __esm(() => {
|
|
210295
210332
|
init_state();
|
|
210296
210333
|
init_envUtils();
|
|
@@ -210298,6 +210335,8 @@ var init_dumpPrompts = __esm(() => {
|
|
|
210298
210335
|
init_debug();
|
|
210299
210336
|
cachedApiRequests = [];
|
|
210300
210337
|
dumpState = new Map;
|
|
210338
|
+
dumpRequestQueue = new Map;
|
|
210339
|
+
processingQueues = new Set;
|
|
210301
210340
|
});
|
|
210302
210341
|
|
|
210303
210342
|
// src/utils/abortController.ts
|
|
@@ -406815,13 +406854,13 @@ var init_AppState = __esm(() => {
|
|
|
406815
406854
|
function useNotifications() {
|
|
406816
406855
|
const store = useAppStateStore();
|
|
406817
406856
|
const setAppState = useSetAppState();
|
|
406818
|
-
const
|
|
406857
|
+
const processQueue2 = import_react85.useCallback(() => {
|
|
406819
406858
|
setAppState((prev) => {
|
|
406820
406859
|
const next = getNext(prev.notifications.queue);
|
|
406821
406860
|
if (prev.notifications.current !== null || !next) {
|
|
406822
406861
|
return prev;
|
|
406823
406862
|
}
|
|
406824
|
-
currentTimeoutId = setTimeout((setAppState2, nextKey,
|
|
406863
|
+
currentTimeoutId = setTimeout((setAppState2, nextKey, processQueue3) => {
|
|
406825
406864
|
currentTimeoutId = null;
|
|
406826
406865
|
setAppState2((prev2) => {
|
|
406827
406866
|
if (prev2.notifications.current?.key !== nextKey) {
|
|
@@ -406835,8 +406874,8 @@ function useNotifications() {
|
|
|
406835
406874
|
}
|
|
406836
406875
|
};
|
|
406837
406876
|
});
|
|
406838
|
-
|
|
406839
|
-
}, next.timeoutMs ?? DEFAULT_TIMEOUT_MS2, setAppState, next.key,
|
|
406877
|
+
processQueue3();
|
|
406878
|
+
}, next.timeoutMs ?? DEFAULT_TIMEOUT_MS2, setAppState, next.key, processQueue2);
|
|
406840
406879
|
return {
|
|
406841
406880
|
...prev,
|
|
406842
406881
|
notifications: {
|
|
@@ -406852,7 +406891,7 @@ function useNotifications() {
|
|
|
406852
406891
|
clearTimeout(currentTimeoutId);
|
|
406853
406892
|
currentTimeoutId = null;
|
|
406854
406893
|
}
|
|
406855
|
-
currentTimeoutId = setTimeout((setAppState2, notif2,
|
|
406894
|
+
currentTimeoutId = setTimeout((setAppState2, notif2, processQueue3) => {
|
|
406856
406895
|
currentTimeoutId = null;
|
|
406857
406896
|
setAppState2((prev) => {
|
|
406858
406897
|
if (prev.notifications.current?.key !== notif2.key) {
|
|
@@ -406866,8 +406905,8 @@ function useNotifications() {
|
|
|
406866
406905
|
}
|
|
406867
406906
|
};
|
|
406868
406907
|
});
|
|
406869
|
-
|
|
406870
|
-
}, notif.timeoutMs ?? DEFAULT_TIMEOUT_MS2, setAppState, notif,
|
|
406908
|
+
processQueue3();
|
|
406909
|
+
}, notif.timeoutMs ?? DEFAULT_TIMEOUT_MS2, setAppState, notif, processQueue2);
|
|
406871
406910
|
setAppState((prev) => ({
|
|
406872
406911
|
...prev,
|
|
406873
406912
|
notifications: {
|
|
@@ -406885,7 +406924,7 @@ function useNotifications() {
|
|
|
406885
406924
|
clearTimeout(currentTimeoutId);
|
|
406886
406925
|
currentTimeoutId = null;
|
|
406887
406926
|
}
|
|
406888
|
-
currentTimeoutId = setTimeout((setAppState2, foldedKey,
|
|
406927
|
+
currentTimeoutId = setTimeout((setAppState2, foldedKey, processQueue3) => {
|
|
406889
406928
|
currentTimeoutId = null;
|
|
406890
406929
|
setAppState2((p) => {
|
|
406891
406930
|
if (p.notifications.current?.key !== foldedKey) {
|
|
@@ -406899,8 +406938,8 @@ function useNotifications() {
|
|
|
406899
406938
|
}
|
|
406900
406939
|
};
|
|
406901
406940
|
});
|
|
406902
|
-
|
|
406903
|
-
}, folded.timeoutMs ?? DEFAULT_TIMEOUT_MS2, setAppState, folded.key,
|
|
406941
|
+
processQueue3();
|
|
406942
|
+
}, folded.timeoutMs ?? DEFAULT_TIMEOUT_MS2, setAppState, folded.key, processQueue2);
|
|
406904
406943
|
return {
|
|
406905
406944
|
...prev,
|
|
406906
406945
|
notifications: {
|
|
@@ -406940,8 +406979,8 @@ function useNotifications() {
|
|
|
406940
406979
|
}
|
|
406941
406980
|
};
|
|
406942
406981
|
});
|
|
406943
|
-
|
|
406944
|
-
}, [setAppState,
|
|
406982
|
+
processQueue2();
|
|
406983
|
+
}, [setAppState, processQueue2]);
|
|
406945
406984
|
const removeNotification = import_react85.useCallback((key2) => {
|
|
406946
406985
|
setAppState((prev) => {
|
|
406947
406986
|
const isCurrent = prev.notifications.current?.key === key2;
|
|
@@ -406961,11 +407000,11 @@ function useNotifications() {
|
|
|
406961
407000
|
}
|
|
406962
407001
|
};
|
|
406963
407002
|
});
|
|
406964
|
-
|
|
406965
|
-
}, [setAppState,
|
|
407003
|
+
processQueue2();
|
|
407004
|
+
}, [setAppState, processQueue2]);
|
|
406966
407005
|
import_react85.useEffect(() => {
|
|
406967
407006
|
if (store.getState().notifications.queue.length > 0) {
|
|
406968
|
-
|
|
407007
|
+
processQueue2();
|
|
406969
407008
|
}
|
|
406970
407009
|
}, []);
|
|
406971
407010
|
return {
|