@superatomai/sdk-node 0.0.5-mds → 0.0.6-mds
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.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7753,7 +7753,9 @@ async function validateSingleExternalToolQuery(component, collections, executedT
|
|
|
7753
7753
|
const toolName = compProps?.externalTool?.toolName;
|
|
7754
7754
|
let currentSql = compProps?.externalTool?.parameters?.sql;
|
|
7755
7755
|
if (!toolId || !currentSql) return component;
|
|
7756
|
-
|
|
7756
|
+
const executedTool = executedTools.find((t) => t.id === toolId);
|
|
7757
|
+
const dbType = executedTool?.sourceType || "postgresql";
|
|
7758
|
+
currentSql = ensureQueryLimit(currentSql, 10, MAX_COMPONENT_QUERY_LIMIT, dbType);
|
|
7757
7759
|
let attempts = 0;
|
|
7758
7760
|
while (attempts < MAX_QUERY_VALIDATION_RETRIES) {
|
|
7759
7761
|
attempts++;
|
|
@@ -7802,7 +7804,7 @@ async function validateSingleExternalToolQuery(component, collections, executedT
|
|
|
7802
7804
|
apiKey
|
|
7803
7805
|
);
|
|
7804
7806
|
if (fixedSql && fixedSql !== currentSql) {
|
|
7805
|
-
currentSql = ensureQueryLimit(fixedSql, 10, MAX_COMPONENT_QUERY_LIMIT);
|
|
7807
|
+
currentSql = ensureQueryLimit(fixedSql, 10, MAX_COMPONENT_QUERY_LIMIT, dbType);
|
|
7806
7808
|
logger.info(`[AgentComponentGen] LLM provided fix for ${component.name}, retrying...`);
|
|
7807
7809
|
} else {
|
|
7808
7810
|
logger.warn(`[AgentComponentGen] LLM returned same or empty query, stopping retries`);
|