@adminforth/bulk-ai-flow 1.24.4 → 1.24.5

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/build.log CHANGED
@@ -14,5 +14,5 @@ custom/package.json
14
14
  custom/pnpm-lock.yaml
15
15
  custom/tsconfig.json
16
16
 
17
- sent 112,987 bytes received 191 bytes 226,356.00 bytes/sec
18
- total size is 112,273 speedup is 0.99
17
+ sent 113,381 bytes received 191 bytes 227,144.00 bytes/sec
18
+ total size is 112,667 speedup is 0.99
@@ -446,8 +446,16 @@ function getActionLabel(actionType: GenerationAction) {
446
446
  return actionType.replace('_', ' ');
447
447
  }
448
448
 
449
+ function getGenerationFailureGroupKey(actionType: GenerationAction, error: string) {
450
+ const normalizedError = error
451
+ .replace(/Please retry in [\d.]+s\.?/g, 'Please retry later.')
452
+ .replace(/\b\d+\.\d+s\b/g, '<duration>')
453
+ .replace(/\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/gi, '<uuid>');
454
+ return `${actionType}:${normalizedError}`;
455
+ }
456
+
449
457
  function registerGenerationFailure(record: RecordState, actionType: GenerationAction, error: string) {
450
- const key = `${actionType}:${error}`;
458
+ const key = getGenerationFailureGroupKey(actionType, error);
451
459
  let group = generationFailureGroups.get(key);
452
460
  if (!group) {
453
461
  group = {
@@ -446,8 +446,16 @@ function getActionLabel(actionType: GenerationAction) {
446
446
  return actionType.replace('_', ' ');
447
447
  }
448
448
 
449
+ function getGenerationFailureGroupKey(actionType: GenerationAction, error: string) {
450
+ const normalizedError = error
451
+ .replace(/Please retry in [\d.]+s\.?/g, 'Please retry later.')
452
+ .replace(/\b\d+\.\d+s\b/g, '<duration>')
453
+ .replace(/\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/gi, '<uuid>');
454
+ return `${actionType}:${normalizedError}`;
455
+ }
456
+
449
457
  function registerGenerationFailure(record: RecordState, actionType: GenerationAction, error: string) {
450
- const key = `${actionType}:${error}`;
458
+ const key = getGenerationFailureGroupKey(actionType, error);
451
459
  let group = generationFailureGroups.get(key);
452
460
  if (!group) {
453
461
  group = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adminforth/bulk-ai-flow",
3
- "version": "1.24.4",
3
+ "version": "1.24.5",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },