We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent be52a88 commit 0b88c56Copy full SHA for 0b88c56
packages/agents-core/src/shims/shims-browser.ts
@@ -87,10 +87,16 @@ export const ReadableStreamController =
87
export const TransformStream = globalThis.TransformStream;
88
89
export class AsyncLocalStorage {
90
- constructor() {}
91
- run() {}
92
- getStore() {}
93
- enterWith() {}
+ context = null;
+ constructor() { }
+ run(context: any, fn: () => any) {
+ this.context = context;
94
+ return fn();
95
+ }
96
+ getStore() {
97
+ return this.context;
98
99
+ enterWith() { }
100
}
101
102
export function isBrowserEnvironment(): boolean {
0 commit comments