@superatomai/sdk-node 0.0.68 → 0.0.69
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 +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -3499,7 +3499,7 @@ function convertTopToLimit(query) {
|
|
|
3499
3499
|
let modifiedQuery = query.replace(/\bSELECT\s+TOP\s+\(?\d+\)?\s*/gi, "SELECT ");
|
|
3500
3500
|
return modifiedQuery;
|
|
3501
3501
|
}
|
|
3502
|
-
function ensureQueryLimit(query, defaultLimit = 10, maxLimit =
|
|
3502
|
+
function ensureQueryLimit(query, defaultLimit = 10, maxLimit = 10, dbType) {
|
|
3503
3503
|
if (!query || query.trim().length === 0) {
|
|
3504
3504
|
return query;
|
|
3505
3505
|
}
|
|
@@ -7207,7 +7207,7 @@ ${executedToolsText}`);
|
|
|
7207
7207
|
let sql = toolInput.sql;
|
|
7208
7208
|
const params = toolInput.params || {};
|
|
7209
7209
|
const reasoning = toolInput.reasoning;
|
|
7210
|
-
sql = ensureQueryLimit(sql, 10,
|
|
7210
|
+
sql = ensureQueryLimit(sql, 10, 10);
|
|
7211
7211
|
const queryKey = sql.toLowerCase().replace(/\s+/g, " ").trim();
|
|
7212
7212
|
const attempts = (queryAttempts.get(queryKey) || 0) + 1;
|
|
7213
7213
|
queryAttempts.set(queryKey, attempts);
|