@tangle-network/agent-app 0.57.17 → 0.57.18
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.
|
@@ -1144,7 +1144,9 @@ function createProtectedRuntimeChatProducer(options) {
|
|
|
1144
1144
|
...options,
|
|
1145
1145
|
grant: { ...options.grant, resolve: structuredClone(options.grant.resolve), reserve: structuredClone(options.grant.reserve) },
|
|
1146
1146
|
tools: options.tools.map((tool) => ({ ...tool, inputSchema: structuredClone(tool.inputSchema) })),
|
|
1147
|
-
|
|
1147
|
+
// Chat history rows carry storage fields (id, parts, timestamps). The
|
|
1148
|
+
// provider receives exactly role and content; Anthropic rejects extra keys.
|
|
1149
|
+
priorMessages: options.priorMessages?.map(({ role, content }) => ({ role, content }))
|
|
1148
1150
|
};
|
|
1149
1151
|
const tools = new Map(options.tools.map((tool) => [tool.name, tool]));
|
|
1150
1152
|
if (tools.size !== options.tools.length) throw new Error("Duplicate protected tool name");
|