@@ -21,7 +21,7 @@ import { populateMemories } from "../src/test_resources/populateMemories.ts";
21
21
import { runAiTest } from "../src/test_resources/runAiTest.ts" ;
22
22
import { messageHandlerTemplate } from "../src/test_resources/templates.ts" ;
23
23
import { type User } from "../src/test_resources/types.ts" ;
24
- import action from "../src/actions/ignore.ts" ;
24
+ import { ignore as action } from "../src/actions/ignore.ts" ;
25
25
import { generateMessageResponse } from "../src/core/generation.ts" ;
26
26
27
27
async function handleMessage (
@@ -42,6 +42,7 @@ async function handleMessage(
42
42
} ,
43
43
roomId,
44
44
embedding : embeddingZeroVector ,
45
+ agentId : runtime . agentId ,
45
46
} ) ;
46
47
}
47
48
} ;
@@ -76,6 +77,7 @@ async function handleMessage(
76
77
content : response ,
77
78
roomId,
78
79
embedding : embeddingZeroVector ,
80
+ agentId : runtime . agentId ,
79
81
} ;
80
82
81
83
if ( responseMessage . content . text ?. trim ( ) ) {
@@ -107,7 +109,10 @@ describe("Ignore action tests", () => {
107
109
actions : [ action ] ,
108
110
} ) ;
109
111
user = setup . session . user ;
110
- runtime = setup . runtime ;
112
+ if ( setup . runtime . llamaService === null ) {
113
+ throw new Error ( "llamaService cannot be null" ) ;
114
+ }
115
+ runtime = setup . runtime as IAgentRuntime ;
111
116
112
117
const data = await getOrCreateRelationship ( {
113
118
runtime,
@@ -139,6 +144,7 @@ describe("Ignore action tests", () => {
139
144
userId : user ?. id as UUID ,
140
145
content : { text : "Never talk to me again" } ,
141
146
roomId : roomId as UUID ,
147
+ agentId : runtime . agentId ,
142
148
} ;
143
149
144
150
await populateMemories ( runtime , user , roomId , [
@@ -159,6 +165,7 @@ describe("Ignore action tests", () => {
159
165
userId : user . id as UUID ,
160
166
content : { text : "" , action : "IGNORE" } ,
161
167
roomId : roomId as UUID ,
168
+ agentId : runtime . agentId ,
162
169
} ;
163
170
164
171
await populateMemories ( runtime , user , roomId , [
@@ -184,6 +191,7 @@ describe("Ignore action tests", () => {
184
191
userId : user . id as UUID ,
185
192
content : { text : "" , action : "IGNORE" } ,
186
193
roomId : roomId as UUID ,
194
+ agentId : runtime . agentId ,
187
195
} ;
188
196
189
197
await populateMemories ( runtime , user , roomId , [
@@ -207,6 +215,7 @@ describe("Ignore action tests", () => {
207
215
userId : user . id as UUID ,
208
216
content : { text : "Bye" } ,
209
217
roomId : roomId as UUID ,
218
+ agentId : runtime . agentId ,
210
219
} ;
211
220
212
221
await populateMemories ( runtime , user , roomId , [ Goodbye1 ] ) ;
0 commit comments