Skip to content

Commit 641c9d9

Browse files
authored
Deprecate assitantMessage and assistantPrefix fields (#220)
1 parent d8700c9 commit 641c9d9

36 files changed

+622
-431
lines changed

backend/src/__tests__/dynamic-agent-loader.test.ts

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,7 @@ describe('Dynamic Agent Loader', () => {
8585
agentStepPrompt: 'Continue brainstorming.',
8686
toolNames: ['end_turn'],
8787
spawnableAgents: ['thinker', 'researcher'],
88-
initialAssistantMessage: '',
89-
initialAssistantPrefix: '',
90-
stepAssistantMessage: '',
91-
stepAssistantPrefix: '',
88+
9289
outputMode: 'last_message',
9390
includeMessageHistory: true,
9491
},
@@ -121,10 +118,6 @@ describe('Dynamic Agent Loader', () => {
121118
outputMode: 'last_message',
122119
includeMessageHistory: true,
123120
toolNames: ['end_turn'],
124-
initialAssistantMessage: '',
125-
initialAssistantPrefix: '',
126-
stepAssistantMessage: '',
127-
stepAssistantPrefix: '',
128121
},
129122
},
130123
}
@@ -155,10 +148,6 @@ describe('Dynamic Agent Loader', () => {
155148
includeMessageHistory: true,
156149
toolNames: ['end_turn'],
157150
spawnableAgents: [],
158-
initialAssistantMessage: '',
159-
initialAssistantPrefix: '',
160-
stepAssistantMessage: '',
161-
stepAssistantPrefix: '',
162151
},
163152
},
164153
}
@@ -202,10 +191,6 @@ describe('Dynamic Agent Loader', () => {
202191
includeMessageHistory: true,
203192
toolNames: ['end_turn'],
204193
spawnableAgents: [],
205-
initialAssistantMessage: '',
206-
initialAssistantPrefix: '',
207-
stepAssistantMessage: '',
208-
stepAssistantPrefix: '',
209194
},
210195
},
211196
}
@@ -244,10 +229,6 @@ describe('Dynamic Agent Loader', () => {
244229
includeMessageHistory: true,
245230
toolNames: ['end_turn'],
246231
spawnableAgents: [],
247-
initialAssistantMessage: '',
248-
initialAssistantPrefix: '',
249-
stepAssistantMessage: '',
250-
stepAssistantPrefix: '',
251232
},
252233
},
253234
}
@@ -285,10 +266,6 @@ describe('Dynamic Agent Loader', () => {
285266
includeMessageHistory: true,
286267
toolNames: ['end_turn'],
287268
spawnableAgents: [],
288-
initialAssistantMessage: '',
289-
initialAssistantPrefix: '',
290-
stepAssistantMessage: '',
291-
stepAssistantPrefix: '',
292269
},
293270
},
294271
}
@@ -319,10 +296,6 @@ describe('Dynamic Agent Loader', () => {
319296
outputMode: 'last_message',
320297
includeMessageHistory: true,
321298
toolNames: ['end_turn'],
322-
initialAssistantMessage: '',
323-
initialAssistantPrefix: '',
324-
stepAssistantMessage: '',
325-
stepAssistantPrefix: '',
326299
},
327300
spawner: {
328301
id: 'spawner_agent',
@@ -338,10 +311,6 @@ describe('Dynamic Agent Loader', () => {
338311
outputMode: 'last_message',
339312
includeMessageHistory: true,
340313
toolNames: ['end_turn'],
341-
initialAssistantMessage: '',
342-
initialAssistantPrefix: '',
343-
stepAssistantMessage: '',
344-
stepAssistantPrefix: '',
345314
},
346315
},
347316
}

backend/src/__tests__/dynamic-agent-schema-validation.test.ts

Lines changed: 7 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,7 @@ describe('Dynamic Agent Schema Validation', () => {
4848
systemPrompt: 'Test system prompt',
4949
userInputPrompt: 'Test user prompt',
5050
agentStepPrompt: 'Test step prompt',
51-
initialAssistantMessage: '',
52-
initialAssistantPrefix: '',
53-
stepAssistantMessage: '',
54-
stepAssistantPrefix: '',
51+
5552
outputMode: 'last_message',
5653
includeMessageHistory: true,
5754
toolNames: ['end_turn'],
@@ -84,10 +81,7 @@ describe('Dynamic Agent Schema Validation', () => {
8481
systemPrompt: 'Test system prompt',
8582
userInputPrompt: 'Test user prompt',
8683
agentStepPrompt: 'Test step prompt',
87-
initialAssistantMessage: '',
88-
initialAssistantPrefix: '',
89-
stepAssistantMessage: '',
90-
stepAssistantPrefix: '',
84+
9185
outputMode: 'last_message',
9286
includeMessageHistory: true,
9387
toolNames: ['end_turn'],
@@ -122,10 +116,7 @@ describe('Dynamic Agent Schema Validation', () => {
122116
systemPrompt: 'Test system prompt',
123117
userInputPrompt: 'Test user prompt',
124118
agentStepPrompt: 'Test step prompt',
125-
initialAssistantMessage: '',
126-
initialAssistantPrefix: '',
127-
stepAssistantMessage: '',
128-
stepAssistantPrefix: '',
119+
129120
promptSchema: {
130121
prompt: {
131122
type: 'string',
@@ -195,10 +186,7 @@ describe('Dynamic Agent Schema Validation', () => {
195186
systemPrompt: 'Test system prompt',
196187
userInputPrompt: 'Test user prompt',
197188
agentStepPrompt: 'Test step prompt',
198-
initialAssistantMessage: '',
199-
initialAssistantPrefix: '',
200-
stepAssistantMessage: '',
201-
stepAssistantPrefix: '',
189+
202190
promptSchema: {
203191
params: {
204192
type: 'object',
@@ -281,10 +269,7 @@ describe('Dynamic Agent Schema Validation', () => {
281269
systemPrompt: 'Test system prompt',
282270
userInputPrompt: 'Test user prompt',
283271
agentStepPrompt: 'Test step prompt',
284-
initialAssistantMessage: '',
285-
initialAssistantPrefix: '',
286-
stepAssistantMessage: '',
287-
stepAssistantPrefix: '',
272+
288273
promptSchema: {
289274
prompt: {
290275
type: 'boolean', // Invalid for prompt schema
@@ -337,10 +322,7 @@ describe('Dynamic Agent Schema Validation', () => {
337322
required: ['message'],
338323
},
339324
},
340-
initialAssistantMessage: '',
341-
initialAssistantPrefix: '',
342-
stepAssistantMessage: '',
343-
stepAssistantPrefix: '',
325+
344326
outputMode: 'last_message',
345327
includeMessageHistory: true,
346328
toolNames: ['end_turn'],
@@ -386,10 +368,7 @@ describe('Dynamic Agent Schema Validation', () => {
386368
userInputPrompt: 'Test user prompt',
387369
agentStepPrompt: 'Test step prompt',
388370
promptSchema: {},
389-
initialAssistantMessage: '',
390-
initialAssistantPrefix: '',
391-
stepAssistantMessage: '',
392-
stepAssistantPrefix: '',
371+
393372
outputMode: 'last_message',
394373
includeMessageHistory: true,
395374
toolNames: ['end_turn'],

backend/src/__tests__/handlesteps-parsing.test.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,6 @@ describe('handleSteps Parsing Tests', () => {
5555
systemPrompt: 'Test system prompt',
5656
userInputPrompt: 'Test user prompt',
5757
agentStepPrompt: 'Test agent step prompt',
58-
initialAssistantMessage: '',
59-
initialAssistantPrefix: '',
60-
stepAssistantMessage: '',
61-
stepAssistantPrefix: '',
6258
}
6359
})
6460

@@ -154,10 +150,7 @@ describe('handleSteps Parsing Tests', () => {
154150
systemPrompt: 'Test',
155151
userInputPrompt: 'Test',
156152
agentStepPrompt: 'Test',
157-
initialAssistantMessage: '',
158-
initialAssistantPrefix: '',
159-
stepAssistantMessage: '',
160-
stepAssistantPrefix: '',
153+
161154
handleSteps:
162155
'function* () { yield { toolName: "set_output", args: {} } }',
163156
}
@@ -229,7 +222,7 @@ describe('handleSteps Parsing Tests', () => {
229222
// Verify no validation errors
230223
expect(result.validationErrors).toHaveLength(0)
231224
expect(result.templates['test-agent']).toBeDefined()
232-
225+
233226
// Verify the loaded template's handleSteps field matches the original toString
234227
expect(result.templates['test-agent'].handleSteps).toBe(expectedStringified)
235228
expect(typeof result.templates['test-agent'].handleSteps).toBe('string')

backend/src/__tests__/parent-instructions.test.ts

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,6 @@ describe('Parent Instructions Injection', () => {
6565
systemPrompt: 'You are a test agent.',
6666
userInputPrompt: 'Process the user request.',
6767
agentStepPrompt: 'Continue processing.',
68-
initialAssistantMessage: '',
69-
initialAssistantPrefix: '',
70-
stepAssistantMessage: '',
71-
stepAssistantPrefix: '',
7268
},
7369
researcher: {
7470
version: '1.0.0',
@@ -84,10 +80,6 @@ describe('Parent Instructions Injection', () => {
8480
systemPrompt: 'You are a researcher.',
8581
userInputPrompt: 'Research the topic.',
8682
agentStepPrompt: 'Continue research.',
87-
initialAssistantMessage: '',
88-
initialAssistantPrefix: '',
89-
stepAssistantMessage: '',
90-
stepAssistantPrefix: '',
9183
},
9284
})
9385

@@ -139,10 +131,6 @@ describe('Parent Instructions Injection', () => {
139131
systemPrompt: 'You are a researcher.',
140132
userInputPrompt: 'Research the topic.',
141133
agentStepPrompt: 'Continue research.',
142-
initialAssistantMessage: '',
143-
initialAssistantPrefix: '',
144-
stepAssistantMessage: '',
145-
stepAssistantPrefix: '',
146134
},
147135
})
148136

@@ -183,10 +171,6 @@ describe('Parent Instructions Injection', () => {
183171
systemPrompt: 'You are a test agent.',
184172
userInputPrompt: 'Process the user request.',
185173
agentStepPrompt: 'Continue processing.',
186-
initialAssistantMessage: '',
187-
initialAssistantPrefix: '',
188-
stepAssistantMessage: '',
189-
stepAssistantPrefix: '',
190174
},
191175
planner: {
192176
version: '1.0.0',
@@ -205,10 +189,6 @@ describe('Parent Instructions Injection', () => {
205189
systemPrompt: 'You are a planner.',
206190
userInputPrompt: 'Plan the task.',
207191
agentStepPrompt: 'Continue planning.',
208-
initialAssistantMessage: '',
209-
initialAssistantPrefix: '',
210-
stepAssistantMessage: '',
211-
stepAssistantPrefix: '',
212192
},
213193
researcher: {
214194
version: '1.0.0',
@@ -224,10 +204,6 @@ describe('Parent Instructions Injection', () => {
224204
systemPrompt: 'You are a researcher.',
225205
userInputPrompt: 'Research the topic.',
226206
agentStepPrompt: 'Continue research.',
227-
initialAssistantMessage: '',
228-
initialAssistantPrefix: '',
229-
stepAssistantMessage: '',
230-
stepAssistantPrefix: '',
231207
},
232208
})
233209

backend/src/__tests__/read-docs-tool.test.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,6 @@ describe('read_docs tool with researcher agent', () => {
132132
agentState,
133133
prompt: 'Get React documentation',
134134
params: undefined,
135-
assistantMessage: undefined,
136-
assistantPrefix: undefined,
137135
}
138136
)
139137

@@ -199,8 +197,6 @@ describe('read_docs tool with researcher agent', () => {
199197
agentState,
200198
prompt: 'Get React hooks documentation',
201199
params: undefined,
202-
assistantMessage: undefined,
203-
assistantPrefix: undefined,
204200
})
205201

206202
expect(context7Api.fetchContext7LibraryDocumentation).toHaveBeenCalledWith(
@@ -253,8 +249,6 @@ describe('read_docs tool with researcher agent', () => {
253249
agentState,
254250
prompt: 'Get documentation for NonExistentLibrary',
255251
params: undefined,
256-
assistantMessage: undefined,
257-
assistantPrefix: undefined,
258252
}
259253
)
260254

@@ -316,8 +310,6 @@ describe('read_docs tool with researcher agent', () => {
316310
agentState,
317311
prompt: 'Get React documentation',
318312
params: undefined,
319-
assistantMessage: undefined,
320-
assistantPrefix: undefined,
321313
}
322314
)
323315

@@ -379,8 +371,6 @@ describe('read_docs tool with researcher agent', () => {
379371
agentState,
380372
prompt: 'Get React server components documentation',
381373
params: undefined,
382-
assistantMessage: undefined,
383-
assistantPrefix: undefined,
384374
}
385375
)
386376

@@ -440,8 +430,6 @@ describe('read_docs tool with researcher agent', () => {
440430
agentState,
441431
prompt: 'Get React documentation',
442432
params: undefined,
443-
assistantMessage: undefined,
444-
assistantPrefix: undefined,
445433
}
446434
)
447435

0 commit comments

Comments
 (0)