@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.mjs
CHANGED
|
@@ -7696,7 +7696,9 @@ async function validateSingleExternalToolQuery(component, collections, executedT
|
|
|
7696
7696
|
const toolName = compProps?.externalTool?.toolName;
|
|
7697
7697
|
let currentSql = compProps?.externalTool?.parameters?.sql;
|
|
7698
7698
|
if (!toolId || !currentSql) return component;
|
|
7699
|
-
|
|
7699
|
+
const executedTool = executedTools.find((t) => t.id === toolId);
|
|
7700
|
+
const dbType = executedTool?.sourceType || "postgresql";
|
|
7701
|
+
currentSql = ensureQueryLimit(currentSql, 10, MAX_COMPONENT_QUERY_LIMIT, dbType);
|
|
7700
7702
|
let attempts = 0;
|
|
7701
7703
|
while (attempts < MAX_QUERY_VALIDATION_RETRIES) {
|
|
7702
7704
|
attempts++;
|
|
@@ -7745,7 +7747,7 @@ async function validateSingleExternalToolQuery(component, collections, executedT
|
|
|
7745
7747
|
apiKey
|
|
7746
7748
|
);
|
|
7747
7749
|
if (fixedSql && fixedSql !== currentSql) {
|
|
7748
|
-
currentSql = ensureQueryLimit(fixedSql, 10, MAX_COMPONENT_QUERY_LIMIT);
|
|
7750
|
+
currentSql = ensureQueryLimit(fixedSql, 10, MAX_COMPONENT_QUERY_LIMIT, dbType);
|
|
7749
7751
|
logger.info(`[AgentComponentGen] LLM provided fix for ${component.name}, retrying...`);
|
|
7750
7752
|
} else {
|
|
7751
7753
|
logger.warn(`[AgentComponentGen] LLM returned same or empty query, stopping retries`);
|