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 3ea51d5 commit d2640e2Copy full SHA for d2640e2
packages/memory/src/index.test.ts
@@ -9,6 +9,7 @@ describe('LongTermMemory', () => {
9
beforeEach(async () => {
10
await fs.remove(testRulesDir);
11
memory = new LongTermMemory(testRulesDir);
12
+ await memory.init();
13
});
14
15
afterEach(async () => {
packages/memory/src/index.ts
@@ -1,5 +1,6 @@
1
import fs from 'fs-extra';
2
import path from 'path';
3
+import crypto from 'crypto';
4
5
export interface Rule {
6
id: string;
@@ -16,7 +17,10 @@ export class LongTermMemory {
16
17
constructor(rulesDir: string = path.join(process.cwd(), 'rules')) {
18
this.rulesDir = rulesDir;
19
this.rules = new Map();
- this.initialize();
20
+ }
21
+
22
+ async init() {
23
+ await this.initialize();
24
}
25
26
private async initialize() {
0 commit comments