@oh-my-pi/pi-ai 4.3.0 → 4.3.1
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/package.json
CHANGED
|
@@ -68,7 +68,7 @@ export async function pollCursorAuth(
|
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
throw new Error(`Poll failed: ${response.status}`);
|
|
71
|
-
} catch
|
|
71
|
+
} catch {
|
|
72
72
|
consecutiveErrors++;
|
|
73
73
|
if (consecutiveErrors >= 3) {
|
|
74
74
|
throw new Error("Too many consecutive errors during Cursor auth polling");
|
package/src/utils/oauth/index.ts
CHANGED
|
@@ -124,7 +124,7 @@ export async function getOAuthApiKey(
|
|
|
124
124
|
if (Date.now() >= creds.expires) {
|
|
125
125
|
try {
|
|
126
126
|
creds = await refreshOAuthToken(provider, creds);
|
|
127
|
-
} catch
|
|
127
|
+
} catch {
|
|
128
128
|
throw new Error(`Failed to refresh OAuth token for ${provider}`);
|
|
129
129
|
}
|
|
130
130
|
}
|
package/src/utils/validation.ts
CHANGED
|
@@ -266,7 +266,7 @@ if (!isBrowserExtension) {
|
|
|
266
266
|
strict: false,
|
|
267
267
|
});
|
|
268
268
|
addFormats(ajv);
|
|
269
|
-
} catch
|
|
269
|
+
} catch {
|
|
270
270
|
// AJV initialization failed (likely CSP restriction)
|
|
271
271
|
console.warn("AJV validation disabled due to CSP restrictions");
|
|
272
272
|
}
|
|
@@ -333,7 +333,9 @@ export function validateToolArguments(tool: Tool, toolCall: ToolCall): any {
|
|
|
333
333
|
}
|
|
334
334
|
: originalArgs;
|
|
335
335
|
|
|
336
|
-
const errorMessage = `Validation failed for tool "${
|
|
336
|
+
const errorMessage = `Validation failed for tool "${
|
|
337
|
+
toolCall.name
|
|
338
|
+
}":\n${errors}\n\nReceived arguments:\n${JSON.stringify(receivedArgs, null, 2)}`;
|
|
337
339
|
|
|
338
340
|
throw new Error(errorMessage);
|
|
339
341
|
}
|