deepagents 1.4.1 → 1.4.2

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.
package/dist/index.cjs CHANGED
@@ -1141,14 +1141,10 @@ function createSubAgentMiddleware(options) {
1141
1141
  taskDescription
1142
1142
  })],
1143
1143
  wrapModelCall: async (request, handler) => {
1144
- if (systemPrompt !== null) {
1145
- const currentPrompt = request.systemPrompt || "";
1146
- const newPrompt = currentPrompt ? `${currentPrompt}\n\n${systemPrompt}` : systemPrompt;
1147
- return handler({
1148
- ...request,
1149
- systemPrompt: newPrompt
1150
- });
1151
- }
1144
+ if (systemPrompt !== null) return handler({
1145
+ ...request,
1146
+ systemMessage: request.systemMessage.concat(new langchain.SystemMessage({ content: systemPrompt }))
1147
+ });
1152
1148
  return handler(request);
1153
1149
  }
1154
1150
  });