@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.js
CHANGED
|
@@ -3557,7 +3557,7 @@ function convertTopToLimit(query) {
|
|
|
3557
3557
|
let modifiedQuery = query.replace(/\bSELECT\s+TOP\s+\(?\d+\)?\s*/gi, "SELECT ");
|
|
3558
3558
|
return modifiedQuery;
|
|
3559
3559
|
}
|
|
3560
|
-
function ensureQueryLimit(query, defaultLimit = 10, maxLimit =
|
|
3560
|
+
function ensureQueryLimit(query, defaultLimit = 10, maxLimit = 10, dbType) {
|
|
3561
3561
|
if (!query || query.trim().length === 0) {
|
|
3562
3562
|
return query;
|
|
3563
3563
|
}
|
|
@@ -7265,7 +7265,7 @@ ${executedToolsText}`);
|
|
|
7265
7265
|
let sql = toolInput.sql;
|
|
7266
7266
|
const params = toolInput.params || {};
|
|
7267
7267
|
const reasoning = toolInput.reasoning;
|
|
7268
|
-
sql = ensureQueryLimit(sql, 10,
|
|
7268
|
+
sql = ensureQueryLimit(sql, 10, 10);
|
|
7269
7269
|
const queryKey = sql.toLowerCase().replace(/\s+/g, " ").trim();
|
|
7270
7270
|
const attempts = (queryAttempts.get(queryKey) || 0) + 1;
|
|
7271
7271
|
queryAttempts.set(queryKey, attempts);
|