@ynhcj/xiaoyi-channel 0.0.86-next → 0.0.87-next
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.
|
@@ -94,7 +94,7 @@ export function getLatestSessionContext() {
|
|
|
94
94
|
* This ensures thread-safe context isolation for concurrent requests.
|
|
95
95
|
*/
|
|
96
96
|
export function runWithSessionContext(context, callback) {
|
|
97
|
-
|
|
97
|
+
console.log(`[SESSION-MGR] 🔵 ALS SET: sessionId=${context.sessionId} taskId=${context.taskId}`);
|
|
98
98
|
return asyncLocalStorage.run(context, callback);
|
|
99
99
|
}
|
|
100
100
|
/**
|
|
@@ -115,7 +115,7 @@ export function getCurrentSessionContext(sessionKey) {
|
|
|
115
115
|
}
|
|
116
116
|
// ALS not available — logging to understand when/why
|
|
117
117
|
const stack = new Error().stack?.split("\n").slice(2, 5).map(s => s.trim()).join(" | ");
|
|
118
|
-
|
|
118
|
+
console.log(`[SESSION-MGR] ⚠️ ALS miss, falling back to Map (size=${activeSessions.size}), callers: ${stack}`);
|
|
119
119
|
// 2. Fallback: look up from global activeSessions Map
|
|
120
120
|
if (activeSessions.size === 0) {
|
|
121
121
|
return null;
|