@adaptic/lumic-utils 1.0.16 → 1.0.17
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/{apollo-client.client-D9cAiuA0.js → apollo-client.client-D-B7RKys.js} +4 -4
- package/dist/{apollo-client.client-D9cAiuA0.js.map → apollo-client.client-D-B7RKys.js.map} +1 -1
- package/dist/{apollo-client.client-BxYrv3du.js → apollo-client.client-NpMY129A.js} +3 -3
- package/dist/{apollo-client.client-BxYrv3du.js.map → apollo-client.client-NpMY129A.js.map} +1 -1
- package/dist/{apollo-client.server-CP1J8e9f.js → apollo-client.server-CBdqNKB_.js} +3 -3
- package/dist/{apollo-client.server-CP1J8e9f.js.map → apollo-client.server-CBdqNKB_.js.map} +1 -1
- package/dist/{apollo-client.server-bp1Spce0.js → apollo-client.server-CS3TcmzK.js} +3 -3
- package/dist/{apollo-client.server-bp1Spce0.js.map → apollo-client.server-CS3TcmzK.js.map} +1 -1
- package/dist/{index-BZdP8znv.js → index-7awA08-j.js} +2 -2
- package/dist/{index-BZdP8znv.js.map → index-7awA08-j.js.map} +1 -1
- package/dist/{index-COoh2hGG.js → index-CMRl9Q54.js} +35 -7
- package/dist/{index-COoh2hGG.js.map → index-CMRl9Q54.js.map} +1 -1
- package/dist/{index-CeftMshp.js → index-Y9dzs7p_.js} +35 -7
- package/dist/{index-CeftMshp.js.map → index-Y9dzs7p_.js.map} +1 -1
- package/dist/{index-BeN6McRy.js → index-coRTK6G3.js} +2 -2
- package/dist/{index-BeN6McRy.js.map → index-coRTK6G3.js.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/test.cjs +1 -1
- package/dist/test.mjs +1 -1
- package/package.json +1 -1
|
@@ -7873,10 +7873,38 @@ function translateContextToAnthropic(context) {
|
|
|
7873
7873
|
continue;
|
|
7874
7874
|
}
|
|
7875
7875
|
if (msg.role === 'assistant') {
|
|
7876
|
-
const
|
|
7877
|
-
|
|
7878
|
-
|
|
7879
|
-
|
|
7876
|
+
const assistantMsg = msg;
|
|
7877
|
+
// If the assistant message has tool_calls, translate to Anthropic tool_use blocks
|
|
7878
|
+
if (assistantMsg.tool_calls && assistantMsg.tool_calls.length > 0) {
|
|
7879
|
+
const contentBlocks = [];
|
|
7880
|
+
// Include text content if present
|
|
7881
|
+
if (typeof assistantMsg.content === 'string' && assistantMsg.content.trim()) {
|
|
7882
|
+
contentBlocks.push({ type: 'text', text: assistantMsg.content });
|
|
7883
|
+
}
|
|
7884
|
+
// Translate each tool_call to a tool_use block
|
|
7885
|
+
for (const tc of assistantMsg.tool_calls) {
|
|
7886
|
+
let input = {};
|
|
7887
|
+
try {
|
|
7888
|
+
input = JSON.parse(tc.function.arguments);
|
|
7889
|
+
}
|
|
7890
|
+
catch {
|
|
7891
|
+
input = { raw: tc.function.arguments };
|
|
7892
|
+
}
|
|
7893
|
+
contentBlocks.push({
|
|
7894
|
+
type: 'tool_use',
|
|
7895
|
+
id: tc.id,
|
|
7896
|
+
name: tc.function.name,
|
|
7897
|
+
input,
|
|
7898
|
+
});
|
|
7899
|
+
}
|
|
7900
|
+
messages.push({ role: 'assistant', content: contentBlocks });
|
|
7901
|
+
}
|
|
7902
|
+
else {
|
|
7903
|
+
const content = typeof assistantMsg.content === 'string'
|
|
7904
|
+
? assistantMsg.content
|
|
7905
|
+
: JSON.stringify(assistantMsg.content);
|
|
7906
|
+
messages.push({ role: 'assistant', content });
|
|
7907
|
+
}
|
|
7880
7908
|
continue;
|
|
7881
7909
|
}
|
|
7882
7910
|
if (msg.role === 'tool') {
|
|
@@ -22682,11 +22710,11 @@ let poolConfig = DEFAULT_POOL_CONFIG;
|
|
|
22682
22710
|
async function loadApolloModules() {
|
|
22683
22711
|
if (typeof window === "undefined" || process.env.AWS_EXECUTION_ENV) {
|
|
22684
22712
|
// Server-side (or Lambda): load the CommonJS‑based implementation.
|
|
22685
|
-
return (await Promise.resolve().then(function () { return require('./apollo-client.server-
|
|
22713
|
+
return (await Promise.resolve().then(function () { return require('./apollo-client.server-CS3TcmzK.js'); }));
|
|
22686
22714
|
}
|
|
22687
22715
|
else {
|
|
22688
22716
|
// Client-side: load the ESM‑based implementation.
|
|
22689
|
-
return (await Promise.resolve().then(function () { return require('./apollo-client.client-
|
|
22717
|
+
return (await Promise.resolve().then(function () { return require('./apollo-client.client-NpMY129A.js'); }));
|
|
22690
22718
|
}
|
|
22691
22719
|
}
|
|
22692
22720
|
/**
|
|
@@ -81397,4 +81425,4 @@ exports.withCorrelationId = withCorrelationId;
|
|
|
81397
81425
|
exports.withMetrics = withMetrics;
|
|
81398
81426
|
exports.withRateLimit = withRateLimit;
|
|
81399
81427
|
exports.withRetry = withRetry;
|
|
81400
|
-
//# sourceMappingURL=index-
|
|
81428
|
+
//# sourceMappingURL=index-Y9dzs7p_.js.map
|