@memberjunction/ng-dashboards 6.2.0-edge.5 → 6.2.0-edge.6

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.
Files changed (143) hide show
  1. package/README.md +28 -0
  2. package/dist/AI/components/autotagging/autotagging-pipeline-resource.component.d.ts +1 -1
  3. package/dist/AI/components/autotagging/autotagging-pipeline-resource.component.d.ts.map +1 -1
  4. package/dist/AI/components/autotagging/autotagging-pipeline-resource.component.js +15 -7
  5. package/dist/AI/components/autotagging/autotagging-pipeline-resource.component.js.map +1 -1
  6. package/dist/AI/components/duplicates/duplicate-detection-resource.component.d.ts +7 -1
  7. package/dist/AI/components/duplicates/duplicate-detection-resource.component.d.ts.map +1 -1
  8. package/dist/AI/components/duplicates/duplicate-detection-resource.component.js +209 -57
  9. package/dist/AI/components/duplicates/duplicate-detection-resource.component.js.map +1 -1
  10. package/dist/AI/components/duplicates/duplicate-detection-run-scope.d.ts +12 -11
  11. package/dist/AI/components/duplicates/duplicate-detection-run-scope.d.ts.map +1 -1
  12. package/dist/AI/components/duplicates/duplicate-detection-run-scope.js +15 -15
  13. package/dist/AI/components/duplicates/duplicate-detection-run-scope.js.map +1 -1
  14. package/dist/AI/components/execution-monitoring.component.d.ts.map +1 -1
  15. package/dist/AI/components/execution-monitoring.component.js +28 -16
  16. package/dist/AI/components/execution-monitoring.component.js.map +1 -1
  17. package/dist/AI/components/prompts/model-prompt-priority-matrix.component.d.ts +1 -0
  18. package/dist/AI/components/prompts/model-prompt-priority-matrix.component.d.ts.map +1 -1
  19. package/dist/AI/components/prompts/model-prompt-priority-matrix.component.js +30 -6
  20. package/dist/AI/components/prompts/model-prompt-priority-matrix.component.js.map +1 -1
  21. package/dist/AI/components/tags/tags-resource.component.d.ts +1 -1
  22. package/dist/AI/components/tags/tags-resource.component.d.ts.map +1 -1
  23. package/dist/AI/components/tags/tags-resource.component.js +15 -7
  24. package/dist/AI/components/tags/tags-resource.component.js.map +1 -1
  25. package/dist/AI/components/vectors/sensitive-fields.d.ts +9 -4
  26. package/dist/AI/components/vectors/sensitive-fields.d.ts.map +1 -1
  27. package/dist/AI/components/vectors/sensitive-fields.js +39 -14
  28. package/dist/AI/components/vectors/sensitive-fields.js.map +1 -1
  29. package/dist/AI/components/vectors/vector-document-rules.d.ts +13 -0
  30. package/dist/AI/components/vectors/vector-document-rules.d.ts.map +1 -1
  31. package/dist/AI/components/vectors/vector-document-rules.js +14 -0
  32. package/dist/AI/components/vectors/vector-document-rules.js.map +1 -1
  33. package/dist/AI/components/vectors/vector-management-resource.component.d.ts +34 -14
  34. package/dist/AI/components/vectors/vector-management-resource.component.d.ts.map +1 -1
  35. package/dist/AI/components/vectors/vector-management-resource.component.js +127 -50
  36. package/dist/AI/components/vectors/vector-management-resource.component.js.map +1 -1
  37. package/dist/AI/components/vectors/vector-store-selection.d.ts +32 -0
  38. package/dist/AI/components/vectors/vector-store-selection.d.ts.map +1 -0
  39. package/dist/AI/components/vectors/vector-store-selection.js +57 -0
  40. package/dist/AI/components/vectors/vector-store-selection.js.map +1 -0
  41. package/dist/ChiefOfStaff/chief-of-staff-agent-context.d.ts +236 -0
  42. package/dist/ChiefOfStaff/chief-of-staff-agent-context.d.ts.map +1 -0
  43. package/dist/ChiefOfStaff/chief-of-staff-agent-context.js +374 -0
  44. package/dist/ChiefOfStaff/chief-of-staff-agent-context.js.map +1 -0
  45. package/dist/ChiefOfStaff/chief-of-staff-dashboard.component.d.ts +195 -0
  46. package/dist/ChiefOfStaff/chief-of-staff-dashboard.component.d.ts.map +1 -0
  47. package/dist/ChiefOfStaff/chief-of-staff-dashboard.component.js +2910 -0
  48. package/dist/ChiefOfStaff/chief-of-staff-dashboard.component.js.map +1 -0
  49. package/dist/ChiefOfStaff/index.d.ts +3 -0
  50. package/dist/ChiefOfStaff/index.d.ts.map +1 -0
  51. package/dist/ChiefOfStaff/index.js +3 -0
  52. package/dist/ChiefOfStaff/index.js.map +1 -0
  53. package/dist/Communication/communication-logs-resource.component.d.ts.map +1 -1
  54. package/dist/Communication/communication-logs-resource.component.js +2 -1
  55. package/dist/Communication/communication-logs-resource.component.js.map +1 -1
  56. package/dist/Communication/communication-monitor-resource.component.d.ts.map +1 -1
  57. package/dist/Communication/communication-monitor-resource.component.js +23 -18
  58. package/dist/Communication/communication-monitor-resource.component.js.map +1 -1
  59. package/dist/Communication/communication-runs-resource.component.d.ts.map +1 -1
  60. package/dist/Communication/communication-runs-resource.component.js +11 -10
  61. package/dist/Communication/communication-runs-resource.component.js.map +1 -1
  62. package/dist/DashboardEditor/dashboard-editor.component.d.ts +17 -2
  63. package/dist/DashboardEditor/dashboard-editor.component.d.ts.map +1 -1
  64. package/dist/DashboardEditor/dashboard-editor.component.js +94 -43
  65. package/dist/DashboardEditor/dashboard-editor.component.js.map +1 -1
  66. package/dist/DataExplorer/data-explorer-dashboard.component.d.ts +24 -0
  67. package/dist/DataExplorer/data-explorer-dashboard.component.d.ts.map +1 -1
  68. package/dist/DataExplorer/data-explorer-dashboard.component.js +146 -50
  69. package/dist/DataExplorer/data-explorer-dashboard.component.js.map +1 -1
  70. package/dist/DataExplorer/models/explorer-state.interface.d.ts +2 -0
  71. package/dist/DataExplorer/models/explorer-state.interface.d.ts.map +1 -1
  72. package/dist/DataExplorer/models/explorer-state.interface.js.map +1 -1
  73. package/dist/LoginStudio/login-studio-resource.component.d.ts +10 -2
  74. package/dist/LoginStudio/login-studio-resource.component.d.ts.map +1 -1
  75. package/dist/LoginStudio/login-studio-resource.component.js +110 -77
  76. package/dist/LoginStudio/login-studio-resource.component.js.map +1 -1
  77. package/dist/MCP/mcp-dashboard.component.d.ts +24 -4
  78. package/dist/MCP/mcp-dashboard.component.d.ts.map +1 -1
  79. package/dist/MCP/mcp-dashboard.component.js +118 -65
  80. package/dist/MCP/mcp-dashboard.component.js.map +1 -1
  81. package/dist/PredictiveStudio/business-predictions.view-models.d.ts +1 -1
  82. package/dist/PredictiveStudio/business-predictions.view-models.d.ts.map +1 -1
  83. package/dist/PredictiveStudio/business-predictions.view-models.js +3 -3
  84. package/dist/PredictiveStudio/business-predictions.view-models.js.map +1 -1
  85. package/dist/PredictiveStudio/components/ps-experiments.component.d.ts +6 -63
  86. package/dist/PredictiveStudio/components/ps-experiments.component.d.ts.map +1 -1
  87. package/dist/PredictiveStudio/components/ps-experiments.component.js +256 -521
  88. package/dist/PredictiveStudio/components/ps-experiments.component.js.map +1 -1
  89. package/dist/PredictiveStudio/components/ps-pipeline-wizard.component.d.ts +0 -18
  90. package/dist/PredictiveStudio/components/ps-pipeline-wizard.component.d.ts.map +1 -1
  91. package/dist/PredictiveStudio/components/ps-pipeline-wizard.component.js +122 -249
  92. package/dist/PredictiveStudio/components/ps-pipeline-wizard.component.js.map +1 -1
  93. package/dist/PredictiveStudio/components/ps-pipelines.component.d.ts +5 -9
  94. package/dist/PredictiveStudio/components/ps-pipelines.component.d.ts.map +1 -1
  95. package/dist/PredictiveStudio/components/ps-pipelines.component.js +98 -130
  96. package/dist/PredictiveStudio/components/ps-pipelines.component.js.map +1 -1
  97. package/dist/PredictiveStudio/components/ps-predictions-grid.component.d.ts +53 -4
  98. package/dist/PredictiveStudio/components/ps-predictions-grid.component.d.ts.map +1 -1
  99. package/dist/PredictiveStudio/components/ps-predictions-grid.component.js +335 -326
  100. package/dist/PredictiveStudio/components/ps-predictions-grid.component.js.map +1 -1
  101. package/dist/PredictiveStudio/components/ps-row-drivers.component.d.ts +19 -0
  102. package/dist/PredictiveStudio/components/ps-row-drivers.component.d.ts.map +1 -0
  103. package/dist/PredictiveStudio/components/ps-row-drivers.component.js +85 -0
  104. package/dist/PredictiveStudio/components/ps-row-drivers.component.js.map +1 -0
  105. package/dist/PredictiveStudio/engine/predictive-studio.engine.d.ts +19 -1
  106. package/dist/PredictiveStudio/engine/predictive-studio.engine.d.ts.map +1 -1
  107. package/dist/PredictiveStudio/engine/predictive-studio.engine.js +51 -2
  108. package/dist/PredictiveStudio/engine/predictive-studio.engine.js.map +1 -1
  109. package/dist/PredictiveStudio/predictive-studio-agent-context.d.ts +3 -1
  110. package/dist/PredictiveStudio/predictive-studio-agent-context.d.ts.map +1 -1
  111. package/dist/PredictiveStudio/predictive-studio-agent-context.js +3 -0
  112. package/dist/PredictiveStudio/predictive-studio-agent-context.js.map +1 -1
  113. package/dist/PredictiveStudio/predictive-studio-score-history.service.d.ts +27 -4
  114. package/dist/PredictiveStudio/predictive-studio-score-history.service.d.ts.map +1 -1
  115. package/dist/PredictiveStudio/predictive-studio-score-history.service.js +94 -61
  116. package/dist/PredictiveStudio/predictive-studio-score-history.service.js.map +1 -1
  117. package/dist/PredictiveStudio/resources/ps-predictions-resource.component.d.ts +29 -5
  118. package/dist/PredictiveStudio/resources/ps-predictions-resource.component.d.ts.map +1 -1
  119. package/dist/PredictiveStudio/resources/ps-predictions-resource.component.js +185 -103
  120. package/dist/PredictiveStudio/resources/ps-predictions-resource.component.js.map +1 -1
  121. package/dist/PredictiveStudio/resources/ps-studio-resource.component.js +1 -1
  122. package/dist/PredictiveStudio/resources/ps-studio-resource.component.js.map +1 -1
  123. package/dist/ai-dashboards.module.d.ts +22 -21
  124. package/dist/ai-dashboards.module.d.ts.map +1 -1
  125. package/dist/ai-dashboards.module.js +8 -2
  126. package/dist/ai-dashboards.module.js.map +1 -1
  127. package/dist/public-api.d.ts +2 -0
  128. package/dist/public-api.d.ts.map +1 -1
  129. package/dist/public-api.js +3 -0
  130. package/dist/public-api.js.map +1 -1
  131. package/package.json +71 -71
  132. package/dist/PredictiveStudio/at-risk.view-models.d.ts +0 -120
  133. package/dist/PredictiveStudio/at-risk.view-models.d.ts.map +0 -1
  134. package/dist/PredictiveStudio/at-risk.view-models.js +0 -261
  135. package/dist/PredictiveStudio/at-risk.view-models.js.map +0 -1
  136. package/dist/PredictiveStudio/components/ps-confirm-modal.component.d.ts +0 -109
  137. package/dist/PredictiveStudio/components/ps-confirm-modal.component.d.ts.map +0 -1
  138. package/dist/PredictiveStudio/components/ps-confirm-modal.component.js +0 -323
  139. package/dist/PredictiveStudio/components/ps-confirm-modal.component.js.map +0 -1
  140. package/dist/PredictiveStudio/components/ps-run-experiment-modal.component.d.ts +0 -137
  141. package/dist/PredictiveStudio/components/ps-run-experiment-modal.component.d.ts.map +0 -1
  142. package/dist/PredictiveStudio/components/ps-run-experiment-modal.component.js +0 -826
  143. package/dist/PredictiveStudio/components/ps-run-experiment-modal.component.js.map +0 -1
@@ -27,7 +27,8 @@ import { RunViewParams } from '@memberjunction/core';
27
27
  /** The slice of an `MJ: Duplicate Runs` row the board needs to choose which run it shows. */
28
28
  export interface DuplicateRunCandidate {
29
29
  ID: string;
30
- EntityID: string;
30
+ /** The entity document the run used. */
31
+ EntityDocumentID: string;
31
32
  ProcessingStatus: string;
32
33
  StartedAt: Date | string | null;
33
34
  /** Set when the run covered one list's records rather than the whole entity. */
@@ -38,26 +39,26 @@ export declare const MATCH_QUERY_DETAIL_CHUNK_SIZE = 500;
38
39
  /** The slice of an entity-document picker option needed to choose a default. */
39
40
  export interface EntityDocumentCandidate {
40
41
  ID: string;
41
- EntityID: string;
42
42
  }
43
43
  /**
44
- * Pick the run the board should display for an entity: the newest run that did not fail and covered
45
- * the whole entity, or, when there is none, the newest run of any kind.
44
+ * Pick the run the board should display for an entity document: the newest run of that document
45
+ * that did not fail and covered the whole entity, or, when there is none, the newest run of any kind.
46
46
  *
47
47
  * Not "most recent Complete run": a run the user cancels keeps `ProcessingStatus = 'In Progress'`
48
48
  * (the detector marks it for resumption), and the board's own idle timer can finish a detection
49
49
  * before the server does; both end with a reload while a newer run exists, and preferring an older
50
50
  * Complete run there would hide the rows the user just watched being produced. Not plain "newest"
51
51
  * either: a Failed run usually has no details, and a list-scoped run holds a small subset, so each
52
- * would hide a good entity-wide run behind an empty or partial board. Runs for other entities are
53
- * never candidates. Returns null when there is no entity or no run for it.
52
+ * would hide a good entity-wide run behind an empty or partial board. Runs of other documents are
53
+ * never candidates, including other documents for the same entity: their template and thresholds
54
+ * produced different matches. Returns null when there is no document or no run for it.
54
55
  */
55
- export declare function SelectCurrentRunForEntity<T extends DuplicateRunCandidate>(runs: readonly T[], entityID: string | null | undefined): T | null;
56
+ export declare function SelectCurrentRunForDocument<T extends DuplicateRunCandidate>(runs: readonly T[], entityDocumentID: string | null | undefined): T | null;
56
57
  /**
57
- * The entity document the board should show before the user picks one: the document for the entity
58
- * of the newest run worth showing (see {@link SelectCurrentRunForEntity}), so a first visit lands on
59
- * results that exist. Falls back to the first document when no run matches any document, and to
60
- * null when there are no documents at all.
58
+ * The entity document the board should show before the user picks one: the document of the newest
59
+ * run worth showing (see {@link SelectCurrentRunForDocument}), so a first visit lands on results
60
+ * that exist. Falls back to the first document when no run matches any listed document, and to null
61
+ * when there are no documents at all.
61
62
  */
62
63
  export declare function PickDefaultEntityDocument<D extends EntityDocumentCandidate>(documents: readonly D[], runs: readonly DuplicateRunCandidate[]): D | null;
63
64
  /** The completed details of ONE run, newest first. Bounded by the run; `IgnoreMaxRows` per the file comment. */
@@ -1 +1 @@
1
- {"version":3,"file":"duplicate-detection-run-scope.d.ts","sourceRoot":"","sources":["../../../../src/AI/components/duplicates/duplicate-detection-run-scope.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAGrD,6FAA6F;AAC7F,MAAM,WAAW,qBAAqB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,EAAE,MAAM,CAAC;IACzB,SAAS,EAAE,IAAI,GAAG,MAAM,GAAG,IAAI,CAAC;IAChC,gFAAgF;IAChF,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B;AAaD,6FAA6F;AAC7F,eAAO,MAAM,6BAA6B,MAAM,CAAC;AAIjD,gFAAgF;AAChF,MAAM,WAAW,uBAAuB;IACpC,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,yBAAyB,CAAC,CAAC,SAAS,qBAAqB,EACrE,IAAI,EAAE,SAAS,CAAC,EAAE,EAClB,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GACpC,CAAC,GAAG,IAAI,CAMV;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,CAAC,SAAS,uBAAuB,EACvE,SAAS,EAAE,SAAS,CAAC,EAAE,EACvB,IAAI,EAAE,SAAS,qBAAqB,EAAE,GACvC,CAAC,GAAG,IAAI,CAcV;AAMD,gHAAgH;AAChH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,MAAM,GAAG,aAAa,CAQvE;AAED;;;;GAIG;AACH,wBAAgB,6BAA6B,CACzC,SAAS,EAAE,SAAS,MAAM,EAAE,EAC5B,SAAS,GAAE,MAAsC,GAClD,aAAa,EAAE,CAajB;AAED,4FAA4F;AAC5F,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,aAAa,GAAG,MAAM,EAAE,CAO3E;AAED,6EAA6E;AAC7E,wBAAgB,oBAAoB,CAAC,CAAC,SAAS;IAAE,oBAAoB,EAAE,MAAM,CAAA;CAAE,EAC3E,OAAO,EAAE,SAAS,CAAC,EAAE,GACtB,GAAG,CAAC,MAAM,EAAE,CAAC,EAAE,CAAC,CAWlB"}
1
+ {"version":3,"file":"duplicate-detection-run-scope.d.ts","sourceRoot":"","sources":["../../../../src/AI/components/duplicates/duplicate-detection-run-scope.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAGrD,6FAA6F;AAC7F,MAAM,WAAW,qBAAqB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,wCAAwC;IACxC,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB,EAAE,MAAM,CAAC;IACzB,SAAS,EAAE,IAAI,GAAG,MAAM,GAAG,IAAI,CAAC;IAChC,gFAAgF;IAChF,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B;AAaD,6FAA6F;AAC7F,eAAO,MAAM,6BAA6B,MAAM,CAAC;AAIjD,gFAAgF;AAChF,MAAM,WAAW,uBAAuB;IACpC,EAAE,EAAE,MAAM,CAAC;CACd;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,2BAA2B,CAAC,CAAC,SAAS,qBAAqB,EACvE,IAAI,EAAE,SAAS,CAAC,EAAE,EAClB,gBAAgB,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAC5C,CAAC,GAAG,IAAI,CAMV;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,CAAC,SAAS,uBAAuB,EACvE,SAAS,EAAE,SAAS,CAAC,EAAE,EACvB,IAAI,EAAE,SAAS,qBAAqB,EAAE,GACvC,CAAC,GAAG,IAAI,CAaV;AAMD,gHAAgH;AAChH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,MAAM,GAAG,aAAa,CAQvE;AAED;;;;GAIG;AACH,wBAAgB,6BAA6B,CACzC,SAAS,EAAE,SAAS,MAAM,EAAE,EAC5B,SAAS,GAAE,MAAsC,GAClD,aAAa,EAAE,CAajB;AAED,4FAA4F;AAC5F,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,aAAa,GAAG,MAAM,EAAE,CAO3E;AAED,6EAA6E;AAC7E,wBAAgB,oBAAoB,CAAC,CAAC,SAAS;IAAE,oBAAoB,EAAE,MAAM,CAAA;CAAE,EAC3E,OAAO,EAAE,SAAS,CAAC,EAAE,GACtB,GAAG,CAAC,MAAM,EAAE,CAAC,EAAE,CAAC,CAWlB"}
@@ -12,39 +12,39 @@ function isPreferredRun(run) {
12
12
  export const MATCH_QUERY_DETAIL_CHUNK_SIZE = 500;
13
13
  const DETAIL_COMPLETE = 'Complete';
14
14
  /**
15
- * Pick the run the board should display for an entity: the newest run that did not fail and covered
16
- * the whole entity, or, when there is none, the newest run of any kind.
15
+ * Pick the run the board should display for an entity document: the newest run of that document
16
+ * that did not fail and covered the whole entity, or, when there is none, the newest run of any kind.
17
17
  *
18
18
  * Not "most recent Complete run": a run the user cancels keeps `ProcessingStatus = 'In Progress'`
19
19
  * (the detector marks it for resumption), and the board's own idle timer can finish a detection
20
20
  * before the server does; both end with a reload while a newer run exists, and preferring an older
21
21
  * Complete run there would hide the rows the user just watched being produced. Not plain "newest"
22
22
  * either: a Failed run usually has no details, and a list-scoped run holds a small subset, so each
23
- * would hide a good entity-wide run behind an empty or partial board. Runs for other entities are
24
- * never candidates. Returns null when there is no entity or no run for it.
23
+ * would hide a good entity-wide run behind an empty or partial board. Runs of other documents are
24
+ * never candidates, including other documents for the same entity: their template and thresholds
25
+ * produced different matches. Returns null when there is no document or no run for it.
25
26
  */
26
- export function SelectCurrentRunForEntity(runs, entityID) {
27
- if (!entityID) {
27
+ export function SelectCurrentRunForDocument(runs, entityDocumentID) {
28
+ if (!entityDocumentID) {
28
29
  return null;
29
30
  }
30
- const forEntity = newestFirst(runs.filter(r => UUIDsEqual(r.EntityID, entityID)));
31
- return forEntity.find(isPreferredRun) ?? forEntity[0] ?? null;
31
+ const forDocument = newestFirst(runs.filter(r => UUIDsEqual(r.EntityDocumentID, entityDocumentID)));
32
+ return forDocument.find(isPreferredRun) ?? forDocument[0] ?? null;
32
33
  }
33
34
  /**
34
- * The entity document the board should show before the user picks one: the document for the entity
35
- * of the newest run worth showing (see {@link SelectCurrentRunForEntity}), so a first visit lands on
36
- * results that exist. Falls back to the first document when no run matches any document, and to
37
- * null when there are no documents at all.
35
+ * The entity document the board should show before the user picks one: the document of the newest
36
+ * run worth showing (see {@link SelectCurrentRunForDocument}), so a first visit lands on results
37
+ * that exist. Falls back to the first document when no run matches any listed document, and to null
38
+ * when there are no documents at all.
38
39
  */
39
40
  export function PickDefaultEntityDocument(documents, runs) {
40
41
  if (documents.length === 0) {
41
42
  return null;
42
43
  }
43
- // First document per entity wins, as documents.find() would.
44
- const documentsByEntity = IndexByUUID(documents, d => d.EntityID);
44
+ const documentsByID = IndexByUUID(documents, d => d.ID);
45
45
  const ordered = [...newestFirst(runs.filter(isPreferredRun)), ...newestFirst(runs)];
46
46
  for (const run of ordered) {
47
- const match = documentsByEntity.Get(run.EntityID);
47
+ const match = documentsByID.Get(run.EntityDocumentID);
48
48
  if (match) {
49
49
  return match;
50
50
  }
@@ -1 +1 @@
1
- {"version":3,"file":"duplicate-detection-run-scope.js","sourceRoot":"","sources":["../../../../src/AI/components/duplicates/duplicate-detection-run-scope.ts"],"names":[],"mappings":"AA0BA,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAYlF,MAAM,UAAU,GAAG,QAAQ,CAAC;AAE5B;;;;GAIG;AACH,SAAS,cAAc,CAAC,GAA0B;IAC9C,OAAO,GAAG,CAAC,gBAAgB,KAAK,UAAU,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC;AACpE,CAAC;AAED,6FAA6F;AAC7F,MAAM,CAAC,MAAM,6BAA6B,GAAG,GAAG,CAAC;AAEjD,MAAM,eAAe,GAAG,UAAU,CAAC;AAQnC;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,yBAAyB,CACrC,IAAkB,EAClB,QAAmC;IAEnC,IAAI,CAAC,QAAQ,EAAE,CAAC;QACZ,OAAO,IAAI,CAAC;IAChB,CAAC;IACD,MAAM,SAAS,GAAG,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC;IAClF,OAAO,SAAS,CAAC,IAAI,CAAC,cAAc,CAAC,IAAI,SAAS,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC;AAClE,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,yBAAyB,CACrC,SAAuB,EACvB,IAAsC;IAEtC,IAAI,SAAS,CAAC,MAAM,KAAK,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AM,QAAQ,GAAG,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAC;QAC1D,IAAI,QAAQ,EAAE,CAAC;YACX,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACzB,CAAC;aAAM,CAAC;YACJ,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,oBAAoB,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;QACtD,CAAC;IACL,CAAC;IACD,OAAO,QAAQ,CAAC;AACpB,CAAC;AAED,SAAS,MAAM,CAAC,KAA2B;IACvC,IAAI,CAAC,KAAK,EAAE,CAAC;QACT,OAAO,CAAC,CAAC;IACb,CAAC;IACD,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC;IACvC,OAAO,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AAClC,CAAC","sourcesContent":["/**\n * Pure helpers that scope the Record Duplicates board to ONE duplicate run.\n *\n * The board joins `MJ: Duplicate Run Details` to `MJ: Duplicate Run Detail Matches` by\n * DuplicateRunDetailID. Loading those two entities unscoped pulls every review row ever produced,\n * for every entity and every run (hundreds of thousands of rows on a busy tenant), and the load\n * grows with each run anyone performs. Restricting both sides to the run being viewed bounds the\n * load to that run's rows, which is what the board actually renders.\n *\n * The scoping is done in two steps, details first and then matches by the detail IDs just loaded,\n * on purpose. Matches carry no DuplicateRunID of their own, and the only single-query alternative is\n * a subquery against the details view, which means naming a schema and a view from the client. The\n * Angular client has no dialect knowledge (`QuoteSchemaAndView` lives on the server-side database\n * providers, not on the GraphQL provider); the server does rewrite bracketed identifiers for\n * PostgreSQL, but a view name chosen here is still a guess about the database behind the API. An\n * `IN (...)` list of IDs is plain SQL everywhere, names nothing, and the join it produces is exact\n * rather than re-derived. Cost: one extra round trip.\n *\n * Why both queries still carry `IgnoreMaxRows`: details truncate to the newest N by date while\n * matches truncate to the top N by probability. Those two subsets diverge as soon as a run exceeds\n * UserViewMaxRows (1000), leaving details with no loaded matches; buildGroups() then drops every\n * such detail and the board is empty with a full run behind it. Scoping bounds the volume, and the\n * flag keeps the join complete inside that bound. Dropping the flag would bring the empty board back\n * for any single run larger than 1000 rows.\n */\nimport { RunViewParams } from '@memberjunction/core';\nimport { EscapeSQLString, IndexByUUID, UUIDsEqual } from '@memberjunction/global';\n\n/** The slice of an `MJ: Duplicate Runs` row the board needs to choose which run it shows. */\nexport interface DuplicateRunCandidate {\n ID: string;\n EntityID: string;\n ProcessingStatus: string;\n StartedAt: Date | string | null;\n /** Set when the run covered one list's records rather than the whole entity. */\n SourceListID: string | null;\n}\n\nconst RUN_FAILED = 'Failed';\n\n/**\n * A run worth putting on the board ahead of others: it did not fail (a run is marked Failed on any\n * exception in detection, usually before a single detail is written) and it covered the whole\n * entity rather than one list (a list run is a small subset that would hide the entity-wide results).\n */\nfunction isPreferredRun(run: DuplicateRunCandidate): boolean {\n return run.ProcessingStatus !== RUN_FAILED && !run.SourceListID;\n}\n\n/** How many detail IDs go into one matches query; keeps each `IN (...)` list a sane size. */\nexport const MATCH_QUERY_DETAIL_CHUNK_SIZE = 500;\n\nconst DETAIL_COMPLETE = 'Complete';\n\n/** The slice of an entity-document picker option needed to choose a default. */\nexport interface EntityDocumentCandidate {\n ID: string;\n EntityID: string;\n}\n\n/**\n * Pick the run the board should display for an entity: the newest run that did not fail and covered\n * the whole entity, or, when there is none, the newest run of any kind.\n *\n * Not \"most recent Complete run\": a run the user cancels keeps `ProcessingStatus = 'In Progress'`\n * (the detector marks it for resumption), and the board's own idle timer can finish a detection\n * before the server does; both end with a reload while a newer run exists, and preferring an older\n * Complete run there would hide the rows the user just watched being produced. Not plain \"newest\"\n * either: a Failed run usually has no details, and a list-scoped run holds a small subset, so each\n * would hide a good entity-wide run behind an empty or partial board. Runs for other entities are\n * never candidates. Returns null when there is no entity or no run for it.\n */\nexport function SelectCurrentRunForEntity<T extends DuplicateRunCandidate>(\n runs: readonly T[],\n entityID: string | null | undefined\n): T | null {\n if (!entityID) {\n return null;\n }\n const forEntity = newestFirst(runs.filter(r => UUIDsEqual(r.EntityID, entityID)));\n return forEntity.find(isPreferredRun) ?? forEntity[0] ?? null;\n}\n\n/**\n * The entity document the board should show before the user picks one: the document for the entity\n * of the newest run worth showing (see {@link SelectCurrentRunForEntity}), so a first visit lands on\n * results that exist. Falls back to the first document when no run matches any document, and to\n * null when there are no documents at all.\n */\nexport function PickDefaultEntityDocument<D extends EntityDocumentCandidate>(\n documents: readonly D[],\n runs: readonly DuplicateRunCandidate[]\n): D | null {\n if (documents.length === 0) {\n return null;\n }\n // First document per entity wins, as documents.find() would.\n const documentsByEntity = IndexByUUID(documents, d => d.EntityID);\n const ordered = [...newestFirst(runs.filter(isPreferredRun)), ...newestFirst(runs)];\n for (const run of ordered) {\n const match = documentsByEntity.Get(run.EntityID);\n if (match) {\n return match;\n }\n }\n return documents[0];\n}\n\nfunction newestFirst<T extends DuplicateRunCandidate>(runs: readonly T[]): T[] {\n return [...runs].sort((a, b) => toTime(b.StartedAt) - toTime(a.StartedAt));\n}\n\n/** The completed details of ONE run, newest first. Bounded by the run; `IgnoreMaxRows` per the file comment. */\nexport function BuildRunScopedDetailsQuery(runID: string): RunViewParams {\n return {\n EntityName: 'MJ: Duplicate Run Details',\n ExtraFilter: `DuplicateRunID='${EscapeSQLString(runID)}' AND MatchStatus='${DETAIL_COMPLETE}'`,\n OrderBy: '__mj_CreatedAt DESC',\n IgnoreMaxRows: true,\n ResultType: 'entity_object'\n };\n}\n\n/**\n * The matches whose parent detail is one of `detailIDs`, as one query per chunk of\n * {@link MATCH_QUERY_DETAIL_CHUNK_SIZE} IDs. No IDs, no queries. Plain `IN (...)` so it runs on any\n * database behind the API; `IgnoreMaxRows` per the file comment.\n */\nexport function BuildMatchQueriesForDetailIDs(\n detailIDs: readonly string[],\n chunkSize: number = MATCH_QUERY_DETAIL_CHUNK_SIZE\n): RunViewParams[] {\n const queries: RunViewParams[] = [];\n for (let start = 0; start < detailIDs.length; start += chunkSize) {\n const literals = detailIDs.slice(start, start + chunkSize).map(id => `'${EscapeSQLString(id)}'`);\n queries.push({\n EntityName: 'MJ: Duplicate Run Detail Matches',\n ExtraFilter: `DuplicateRunDetailID IN (${literals.join(',')})`,\n OrderBy: 'MatchProbability DESC',\n IgnoreMaxRows: true,\n ResultType: 'entity_object'\n });\n }\n return queries;\n}\n\n/** The detail IDs a matches query built by {@link BuildMatchQueriesForDetailIDs} covers. */\nexport function DetailIDsCoveredByMatchQuery(query: RunViewParams): string[] {\n const filter = typeof query.ExtraFilter === 'string' ? query.ExtraFilter : '';\n const list = /DuplicateRunDetailID IN \\((.*)\\)/s.exec(filter)?.[1] ?? '';\n return list\n .split(/','/)\n .map(part => part.replace(/^'|'$/g, '').replace(/''/g, \"'\"))\n .filter(part => part.length > 0);\n}\n\n/** Index matches by their parent detail; the join buildGroups() performs. */\nexport function GroupMatchesByDetail<M extends { DuplicateRunDetailID: string }>(\n matches: readonly M[]\n): Map<string, M[]> {\n const byDetail = new Map<string, M[]>();\n for (const match of matches) {\n const existing = byDetail.get(match.DuplicateRunDetailID);\n if (existing) {\n existing.push(match);\n } else {\n byDetail.set(match.DuplicateRunDetailID, [match]);\n }\n }\n return byDetail;\n}\n\nfunction toTime(value: Date | string | null): number {\n if (!value) {\n return 0;\n }\n const time = new Date(value).getTime();\n return isNaN(time) ? 0 : time;\n}\n"]}
1
+ {"version":3,"file":"duplicate-detection-run-scope.js","sourceRoot":"","sources":["../../../../src/AI/components/duplicates/duplicate-detection-run-scope.ts"],"names":[],"mappings":"AA0BA,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAalF,MAAM,UAAU,GAAG,QAAQ,CAAC;AAE5B;;;;GAIG;AACH,SAAS,cAAc,CAAC,GAA0B;IAC9C,OAAO,GAAG,CAAC,gBAAgB,KAAK,UAAU,IAAI,CAAC,GAA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ClC,CAAC","sourcesContent":["/**\n * Pure helpers that scope the Record Duplicates board to ONE duplicate run.\n *\n * The board joins `MJ: Duplicate Run Details` to `MJ: Duplicate Run Detail Matches` by\n * DuplicateRunDetailID. Loading those two entities unscoped pulls every review row ever produced,\n * for every entity and every run (hundreds of thousands of rows on a busy tenant), and the load\n * grows with each run anyone performs. Restricting both sides to the run being viewed bounds the\n * load to that run's rows, which is what the board actually renders.\n *\n * The scoping is done in two steps, details first and then matches by the detail IDs just loaded,\n * on purpose. Matches carry no DuplicateRunID of their own, and the only single-query alternative is\n * a subquery against the details view, which means naming a schema and a view from the client. The\n * Angular client has no dialect knowledge (`QuoteSchemaAndView` lives on the server-side database\n * providers, not on the GraphQL provider); the server does rewrite bracketed identifiers for\n * PostgreSQL, but a view name chosen here is still a guess about the database behind the API. An\n * `IN (...)` list of IDs is plain SQL everywhere, names nothing, and the join it produces is exact\n * rather than re-derived. Cost: one extra round trip.\n *\n * Why both queries still carry `IgnoreMaxRows`: details truncate to the newest N by date while\n * matches truncate to the top N by probability. Those two subsets diverge as soon as a run exceeds\n * UserViewMaxRows (1000), leaving details with no loaded matches; buildGroups() then drops every\n * such detail and the board is empty with a full run behind it. Scoping bounds the volume, and the\n * flag keeps the join complete inside that bound. Dropping the flag would bring the empty board back\n * for any single run larger than 1000 rows.\n */\nimport { RunViewParams } from '@memberjunction/core';\nimport { EscapeSQLString, IndexByUUID, UUIDsEqual } from '@memberjunction/global';\n\n/** The slice of an `MJ: Duplicate Runs` row the board needs to choose which run it shows. */\nexport interface DuplicateRunCandidate {\n ID: string;\n /** The entity document the run used. */\n EntityDocumentID: string;\n ProcessingStatus: string;\n StartedAt: Date | string | null;\n /** Set when the run covered one list's records rather than the whole entity. */\n SourceListID: string | null;\n}\n\nconst RUN_FAILED = 'Failed';\n\n/**\n * A run worth putting on the board ahead of others: it did not fail (a run is marked Failed on any\n * exception in detection, usually before a single detail is written) and it covered the whole\n * entity rather than one list (a list run is a small subset that would hide the entity-wide results).\n */\nfunction isPreferredRun(run: DuplicateRunCandidate): boolean {\n return run.ProcessingStatus !== RUN_FAILED && !run.SourceListID;\n}\n\n/** How many detail IDs go into one matches query; keeps each `IN (...)` list a sane size. */\nexport const MATCH_QUERY_DETAIL_CHUNK_SIZE = 500;\n\nconst DETAIL_COMPLETE = 'Complete';\n\n/** The slice of an entity-document picker option needed to choose a default. */\nexport interface EntityDocumentCandidate {\n ID: string;\n}\n\n/**\n * Pick the run the board should display for an entity document: the newest run of that document\n * that did not fail and covered the whole entity, or, when there is none, the newest run of any kind.\n *\n * Not \"most recent Complete run\": a run the user cancels keeps `ProcessingStatus = 'In Progress'`\n * (the detector marks it for resumption), and the board's own idle timer can finish a detection\n * before the server does; both end with a reload while a newer run exists, and preferring an older\n * Complete run there would hide the rows the user just watched being produced. Not plain \"newest\"\n * either: a Failed run usually has no details, and a list-scoped run holds a small subset, so each\n * would hide a good entity-wide run behind an empty or partial board. Runs of other documents are\n * never candidates, including other documents for the same entity: their template and thresholds\n * produced different matches. Returns null when there is no document or no run for it.\n */\nexport function SelectCurrentRunForDocument<T extends DuplicateRunCandidate>(\n runs: readonly T[],\n entityDocumentID: string | null | undefined\n): T | null {\n if (!entityDocumentID) {\n return null;\n }\n const forDocument = newestFirst(runs.filter(r => UUIDsEqual(r.EntityDocumentID, entityDocumentID)));\n return forDocument.find(isPreferredRun) ?? forDocument[0] ?? null;\n}\n\n/**\n * The entity document the board should show before the user picks one: the document of the newest\n * run worth showing (see {@link SelectCurrentRunForDocument}), so a first visit lands on results\n * that exist. Falls back to the first document when no run matches any listed document, and to null\n * when there are no documents at all.\n */\nexport function PickDefaultEntityDocument<D extends EntityDocumentCandidate>(\n documents: readonly D[],\n runs: readonly DuplicateRunCandidate[]\n): D | null {\n if (documents.length === 0) {\n return null;\n }\n const documentsByID = IndexByUUID(documents, d => d.ID);\n const ordered = [...newestFirst(runs.filter(isPreferredRun)), ...newestFirst(runs)];\n for (const run of ordered) {\n const match = documentsByID.Get(run.EntityDocumentID);\n if (match) {\n return match;\n }\n }\n return documents[0];\n}\n\nfunction newestFirst<T extends DuplicateRunCandidate>(runs: readonly T[]): T[] {\n return [...runs].sort((a, b) => toTime(b.StartedAt) - toTime(a.StartedAt));\n}\n\n/** The completed details of ONE run, newest first. Bounded by the run; `IgnoreMaxRows` per the file comment. */\nexport function BuildRunScopedDetailsQuery(runID: string): RunViewParams {\n return {\n EntityName: 'MJ: Duplicate Run Details',\n ExtraFilter: `DuplicateRunID='${EscapeSQLString(runID)}' AND MatchStatus='${DETAIL_COMPLETE}'`,\n OrderBy: '__mj_CreatedAt DESC',\n IgnoreMaxRows: true,\n ResultType: 'entity_object'\n };\n}\n\n/**\n * The matches whose parent detail is one of `detailIDs`, as one query per chunk of\n * {@link MATCH_QUERY_DETAIL_CHUNK_SIZE} IDs. No IDs, no queries. Plain `IN (...)` so it runs on any\n * database behind the API; `IgnoreMaxRows` per the file comment.\n */\nexport function BuildMatchQueriesForDetailIDs(\n detailIDs: readonly string[],\n chunkSize: number = MATCH_QUERY_DETAIL_CHUNK_SIZE\n): RunViewParams[] {\n const queries: RunViewParams[] = [];\n for (let start = 0; start < detailIDs.length; start += chunkSize) {\n const literals = detailIDs.slice(start, start + chunkSize).map(id => `'${EscapeSQLString(id)}'`);\n queries.push({\n EntityName: 'MJ: Duplicate Run Detail Matches',\n ExtraFilter: `DuplicateRunDetailID IN (${literals.join(',')})`,\n OrderBy: 'MatchProbability DESC',\n IgnoreMaxRows: true,\n ResultType: 'entity_object'\n });\n }\n return queries;\n}\n\n/** The detail IDs a matches query built by {@link BuildMatchQueriesForDetailIDs} covers. */\nexport function DetailIDsCoveredByMatchQuery(query: RunViewParams): string[] {\n const filter = typeof query.ExtraFilter === 'string' ? query.ExtraFilter : '';\n const list = /DuplicateRunDetailID IN \\((.*)\\)/s.exec(filter)?.[1] ?? '';\n return list\n .split(/','/)\n .map(part => part.replace(/^'|'$/g, '').replace(/''/g, \"'\"))\n .filter(part => part.length > 0);\n}\n\n/** Index matches by their parent detail; the join buildGroups() performs. */\nexport function GroupMatchesByDetail<M extends { DuplicateRunDetailID: string }>(\n matches: readonly M[]\n): Map<string, M[]> {\n const byDetail = new Map<string, M[]>();\n for (const match of matches) {\n const existing = byDetail.get(match.DuplicateRunDetailID);\n if (existing) {\n existing.push(match);\n } else {\n byDetail.set(match.DuplicateRunDetailID, [match]);\n }\n }\n return byDetail;\n}\n\nfunction toTime(value: Date | string | null): number {\n if (!value) {\n return 0;\n }\n const time = new Date(value).getTime();\n return isNaN(time) ? 0 : time;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"execution-monitoring.component.d.ts","sourceRoot":"","sources":["../../../src/AI/components/execution-monitoring.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,MAAM,EAAE,SAAS,EAAE,iBAAiB,EAA2B,MAAM,eAAe,CAAC;AACzG,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAE3C,OAAO,EACL,wBAAwB,EACxB,aAAa,EACb,SAAS,EACT,aAAa,EACb,SAAS,EACT,gBAAgB,EACjB,MAAM,wCAAwC,CAAC;AAEhD,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAC3E,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;AAErE,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAE7D,OAAO,EAAE,qBAAqB,EAAqB,MAAM,2BAA2B,CAAC;;AAErF,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,OAAO,GAAG,YAAY,GAAG,cAAc,CAAC;IAC9C,IAAI,CAAC,EAAE,GAAG,CAAC;IACX,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,OAA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,QAAQ,EAAE,OAAO,GAAG,IAAI;IAI/F,mBAAmB,CAAC,SAAS,EAAE,eAAe,GAAG,IAAI;IAgBrD,mDAAmD;IACnD,mBAAmB,CAAC,SAAS,EAAE,eAAe,GAAG,IAAI;IAIrD,cAAc,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM;IAc5C,WAAW,CAAC,OAAO,EAAE,gBAAgB,GAAG,MAAM;IAM9C,2CAA2C;IAC3C,WAAW,CAAC,OAAO,EAAE,gBAAgB,GAAG,MAAM;IAI9C,sBAAsB,CAAC,KAAK,EAAE,GAAG,GAAG,IAAI;IAUxC,sDAAsD;IACtD,sBAAsB,CAAC,KAAK,EAAE,GAAG,GAAG,IAAI;IAMxC;;OAEG;IACG,sBAAsB,CAAC,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC;IAIjE;;OAEG;IACG,oBAAoB,CAAC,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC;yCApmCpD,4BAA4B;2CAA5B,4BAA4B;CAumCxC"}
1
+ {"version":3,"file":"execution-monitoring.component.d.ts","sourceRoot":"","sources":["../../../src/AI/components/execution-monitoring.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,MAAM,EAAE,SAAS,EAAE,iBAAiB,EAA2B,MAAM,eAAe,CAAC;AACzG,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAE3C,OAAO,EACL,wBAAwB,EACxB,aAAa,EACb,SAAS,EACT,aAAa,EACb,SAAS,EACT,gBAAgB,EACjB,MAAM,wCAAwC,CAAC;AAEhD,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAC3E,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;AAErE,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAG7D,OAAO,EAAE,qBAAqB,EAAqB,MA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GAAG,SAAS,GAAG,MAAM;IAI9D,uDAAuD;IACvD,uBAAuB,CAAC,GAAG,EAAE,YAAY,GAAG,SAAS,GAAG,MAAM;IAK9D,qBAAqB,CAAC,SAAS,EAAE,MAAM,GAAG,YAAY,GAAG,YAAY,EAAE,QAAQ,EAAE,OAAO,GAAG,IAAI;IAK/F,qDAAqD;IACrD,qBAAqB,CAAC,SAAS,EAAE,MAAM,GAAG,YAAY,GAAG,YAAY,EAAE,QAAQ,EAAE,OAAO,GAAG,IAAI;IAI/F,mBAAmB,CAAC,SAAS,EAAE,eAAe,GAAG,IAAI;IAgBrD,mDAAmD;IACnD,mBAAmB,CAAC,SAAS,EAAE,eAAe,GAAG,IAAI;IAIrD,cAAc,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM;IAc5C,WAAW,CAAC,OAAO,EAAE,gBAAgB,GAAG,MAAM;IAM9C,2CAA2C;IAC3C,WAAW,CAAC,OAAO,EAAE,gBAAgB,GAAG,MAAM;IAI9C,sBAAsB,CAAC,KAAK,EAAE,GAAG,GAAG,IAAI;IAUxC,sDAAsD;IACtD,sBAAsB,CAAC,KAAK,EAAE,GAAG,GAAG,IAAI;IAMxC;;OAEG;IACG,sBAAsB,CAAC,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC;IAIjE;;OAEG;IACG,oBAAoB,CAAC,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC;yCA9mCpD,4BAA4B;2CAA5B,4BAA4B;CAinCxC"}
@@ -3,6 +3,7 @@ import { Subject } from 'rxjs';
3
3
  import { map, takeUntil, debounceTime } from 'rxjs/operators';
4
4
  import { ComputeCoveragePercent, GetBucketSizeMs } from '../services/ai-usage-analytics.compute';
5
5
  import { RunView, CompositeKey } from '@memberjunction/core';
6
+ import { AIEngineBase } from '@memberjunction/ai-engine-base';
6
7
  import { BaseResourceComponent } from '@memberjunction/ng-shared';
7
8
  import * as i0 from "@angular/core";
8
9
  import * as i1 from "../services/ai-instrumentation.service";
@@ -1438,20 +1439,25 @@ export class ExecutionMonitoringComponent extends BaseResourceComponent {
1438
1439
  endTime = new Date(tab.timestamp);
1439
1440
  endTime.setHours(23, 59, 59, 999);
1440
1441
  }
1441
- // Load executions for this time period
1442
- const [promptResults, agentResults] = await Promise.all([
1443
- RunView.FromMetadataProvider(this.ProviderToUse).RunView({
1442
+ // Load executions for this time period in a single batched RunViews call with lightweight scalar projections
1443
+ const rv = RunView.FromMetadataProvider(this.ProviderToUse);
1444
+ const [promptResults, agentResults] = await rv.RunViews([
1445
+ {
1444
1446
  EntityName: 'MJ: AI Prompt Runs',
1445
1447
  ExtraFilter: `RunAt >= '${startTime.toISOString()}' AND RunAt <= '${endTime.toISOString()}'`,
1446
1448
  OrderBy: 'RunAt DESC',
1447
- MaxRows: 500
1448
- }),
1449
- RunView.FromMetadataProvider(this.ProviderToUse).RunView({
1449
+ MaxRows: 500,
1450
+ Fields: ['ID', 'Prompt', 'Model', 'Success', 'RunAt', 'CompletedAt', 'Cost', 'TokensUsed', 'ErrorMessage'],
1451
+ ResultType: 'simple'
1452
+ },
1453
+ {
1450
1454
  EntityName: 'MJ: AI Agent Runs',
1451
1455
  ExtraFilter: `StartedAt >= '${startTime.toISOString()}' AND StartedAt <= '${endTime.toISOString()}'`,
1452
1456
  OrderBy: 'StartedAt DESC',
1453
- MaxRows: 500
1454
- })
1457
+ MaxRows: 500,
1458
+ Fields: ['ID', 'Agent', 'Status', 'StartedAt', 'CompletedAt', 'TotalCost', 'TotalTokensUsed', 'ErrorMessage'],
1459
+ ResultType: 'simple'
1460
+ }
1455
1461
  ]);
1456
1462
  // Convert to ExecutionRecord format
1457
1463
  const executions = [];
@@ -1511,13 +1517,19 @@ export class ExecutionMonitoringComponent extends BaseResourceComponent {
1511
1517
  async loadModelDetails(tab, modelName) {
1512
1518
  this.LoadingDrillDown = true;
1513
1519
  try {
1514
- // Find model by name
1515
- const rv = RunView.FromMetadataProvider(this.ProviderToUse);
1516
- const result = await rv.RunView({
1517
- EntityName: 'MJ: AI Models',
1518
- ExtraFilter: `Name = '${modelName.replace(/'/g, "''")}'`
1519
- });
1520
- const model = result.Results[0];
1520
+ // Consult AIEngineBase in-memory cache first before issuing a network RunView
1521
+ await AIEngineBase.Instance.Config(false);
1522
+ let model = AIEngineBase.Instance.Models.find(m => m.Name === modelName);
1523
+ if (!model) {
1524
+ const rv = RunView.FromMetadataProvider(this.ProviderToUse);
1525
+ const result = await rv.RunView({
1526
+ EntityName: 'MJ: AI Models',
1527
+ ExtraFilter: `Name = '${modelName.replace(/'/g, "''")}'`,
1528
+ Fields: ['ID', 'Name', 'Vendor', 'APIName', 'IsActive', 'Description'],
1529
+ ResultType: 'simple'
1530
+ });
1531
+ model = result.Results[0];
1532
+ }
1521
1533
  if (model) {
1522
1534
  tab.data = {
1523
1535
  name: model.Name,
@@ -2297,5 +2309,5 @@ export class ExecutionMonitoringComponent extends BaseResourceComponent {
2297
2309
  </div>
2298
2310
  `, styles: ["\n .execution-monitoring {\n padding: 0;\n background: var(--mj-bg-surface-card);\n width: 100%;\n height: 100%;\n position: relative;\n overflow: auto;\n display: flex;\n flex-direction: column;\n }\n\n .execution-monitoring.loading {\n overflow: hidden;\n }\n\n /* Loading Overlay */\n .loading-overlay {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: color-mix(in srgb, var(--mj-bg-surface) 70%, transparent);\n z-index: 999;\n display: flex;\n align-items: center;\n justify-content: center;\n backdrop-filter: blur(4px);\n }\n\n /* === Dashboard Header - Clean White Style === */\n .monitoring-header {\n background: var(--mj-bg-surface);\n padding: 16px 24px;\n display: flex;\n justify-content: space-between;\n align-items: center;\n flex-wrap: wrap;\n gap: 16px;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);\n border-bottom: 1px solid var(--mj-border-default);\n position: relative;\n z-index: 10;\n }\n\n .monitoring-title {\n margin: 0;\n font-size: 20px;\n font-weight: 700;\n color: var(--mj-text-primary);\n display: flex;\n align-items: center;\n gap: 12px;\n }\n\n .monitoring-title i {\n color: var(--mj-brand-primary);\n font-size: 22px;\n }\n\n .monitoring-controls {\n display: flex;\n gap: 12px;\n align-items: center;\n flex-wrap: wrap;\n }\n\n .time-range-control {\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: 13px;\n }\n\n .time-range-control label {\n color: var(--mj-text-muted);\n font-weight: 500;\n }\n\n .time-range-control select {\n padding: 8px 14px;\n border: 1px solid var(--mj-border-default);\n border-radius: 8px;\n font-size: 13px;\n background: var(--mj-bg-surface-card);\n color: var(--mj-text-primary);\n cursor: pointer;\n transition: all 0.2s ease;\n }\n\n .time-range-control select:hover:not(:disabled) {\n background: var(--mj-bg-surface-sunken);\n border-color: var(--mj-border-strong);\n }\n\n .time-range-control select:focus {\n outline: none;\n border-color: var(--mj-brand-primary);\n box-shadow: 0 0 0 3px color-mix(in srgb, var(--mj-brand-primary) 10%, transparent);\n }\n\n .time-range-control select:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n .time-range-control select option {\n background: var(--mj-bg-surface);\n color: var(--mj-text-primary);\n }\n\n .refresh-btn {\n background: var(--mj-brand-primary);\n color: var(--mj-text-inverse);\n border: none;\n padding: 8px 16px;\n border-radius: 8px;\n font-size: 13px;\n font-weight: 600;\n cursor: pointer;\n display: flex;\n align-items: center;\n gap: 8px;\n transition: all 0.2s ease;\n box-shadow: 0 2px 8px color-mix(in srgb, var(--mj-brand-primary) 25%, transparent);\n }\n\n .refresh-btn:hover:not(:disabled) {\n background: var(--mj-brand-primary-hover);\n transform: translateY(-1px);\n box-shadow: 0 4px 12px color-mix(in srgb, var(--mj-brand-primary) 35%, transparent);\n }\n\n .refresh-btn:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n transform: none;\n }\n\n .refresh-btn i.spinning {\n animation: spin 1s linear infinite;\n }\n\n @keyframes spin {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n }\n\n .kpi-dashboard {\n padding: 20px;\n }\n\n .kpi-grid {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));\n gap: 16px;\n }\n\n .dashboard-splitter {\n flex: 1;\n min-height: 500px;\n margin: 0 20px 20px 20px;\n }\n\n .dashboard-section {\n background: var(--mj-bg-surface);\n border-radius: 12px;\n box-shadow: 0 4px 16px color-mix(in srgb, var(--mj-brand-primary) 8%, transparent);\n overflow: hidden;\n height: 100%;\n display: flex;\n flex-direction: column;\n border: 1px solid color-mix(in srgb, var(--mj-brand-primary) 8%, transparent);\n transition: box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n }\n\n .dashboard-section:hover {\n box-shadow: 0 8px 24px color-mix(in srgb, var(--mj-brand-primary) 12%, transparent);\n }\n\n /* Ensure splitter areas take full height */\n :host ::ng-deep as-split-area > .as-split-area-content {\n overflow: hidden;\n padding: 10px;\n }\n\n /* Cost Analysis Styles */\n .cost-chart-container, .efficiency-chart-container, .status-container {\n padding: 20px;\n height: 100%;\n display: flex;\n flex-direction: column;\n }\n\n .chart-header {\n margin-bottom: 16px;\n }\n\n .chart-title {\n margin: 0;\n font-size: 16px;\n font-weight: 600;\n color: var(--mj-text-primary);\n display: flex;\n align-items: center;\n gap: 8px;\n }\n\n .chart-title i {\n color: var(--mj-brand-primary);\n }\n\n .cost-bars, .efficiency-items {\n flex: 1;\n display: flex;\n flex-direction: column;\n gap: 12px;\n }\n\n .cost-bar-item {\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 8px 0;\n border-bottom: 1px solid var(--mj-border-default);\n }\n\n .cost-bar-item:last-child {\n border-bottom: none;\n }\n\n .cost-bar-info {\n min-width: 120px;\n display: flex;\n flex-direction: column;\n gap: 2px;\n }\n\n .model-name {\n font-size: 12px;\n font-weight: 500;\n color: var(--mj-text-primary);\n }\n\n .cost-value {\n font-size: 11px;\n color: var(--mj-brand-primary);\n font-weight: 600;\n }\n\n .cost-bar-container {\n flex: 1;\n height: 8px;\n background: color-mix(in srgb, var(--mj-brand-primary) 10%, transparent);\n border-radius: 4px;\n overflow: hidden;\n }\n\n .cost-bar {\n height: 100%;\n background: var(--mj-brand-primary);\n border-radius: 4px;\n transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);\n }\n\n .token-info {\n font-size: 10px;\n color: var(--mj-text-muted);\n min-width: 80px;\n text-align: right;\n }\n\n /* Token Efficiency Styles */\n .efficiency-item {\n padding: 12px 0;\n border-bottom: 1px solid var(--mj-border-default);\n }\n\n .efficiency-item:last-child {\n border-bottom: none;\n }\n\n .efficiency-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 8px;\n }\n\n .efficiency-ratio {\n font-size: 11px;\n color: var(--mj-brand-primary);\n font-weight: 600;\n }\n\n .token-breakdown {\n display: flex;\n flex-direction: column;\n gap: 6px;\n }\n\n .token-bar {\n height: 8px;\n background: color-mix(in srgb, var(--mj-brand-primary) 10%, transparent);\n border-radius: 4px;\n overflow: hidden;\n display: flex;\n }\n\n .token-segment {\n height: 100%;\n transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);\n }\n\n .token-segment--input {\n background: var(--mj-brand-primary);\n }\n\n .token-segment--output {\n background: var(--mj-brand-accent);\n }\n\n .token-labels {\n display: flex;\n justify-content: space-between;\n font-size: 10px;\n color: var(--mj-text-muted);\n }\n\n .input-label {\n color: var(--mj-brand-primary);\n font-weight: 500;\n }\n\n .output-label {\n color: var(--mj-brand-accent);\n font-weight: 500;\n }\n\n .cost-per-token {\n font-size: 10px;\n color: var(--mj-text-disabled);\n margin-top: 4px;\n }\n\n /* System Status Styles */\n .status-metrics {\n display: flex;\n flex-direction: column;\n gap: 16px;\n flex: 1;\n }\n\n .status-metric {\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 12px;\n background: var(--mj-bg-surface-card);\n border-radius: 6px;\n }\n\n .status-icon {\n width: 40px;\n height: 40px;\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n }\n\n .status-icon--success {\n background: color-mix(in srgb, var(--mj-status-success) 15%, var(--mj-bg-surface));\n color: var(--mj-status-success);\n }\n\n .status-icon--warning {\n background: color-mix(in srgb, var(--mj-status-warning) 15%, var(--mj-bg-surface));\n color: var(--mj-status-warning);\n }\n\n .status-icon--info {\n background: color-mix(in srgb, var(--mj-brand-primary) 15%, var(--mj-bg-surface));\n color: var(--mj-brand-primary);\n }\n\n .status-icon--primary {\n background: color-mix(in srgb, var(--mj-brand-primary) 15%, var(--mj-bg-surface));\n color: var(--mj-brand-primary);\n }\n\n .status-info {\n flex: 1;\n }\n\n .status-label {\n font-size: 12px;\n color: var(--mj-text-muted);\n font-weight: 500;\n }\n\n .status-value {\n font-size: 18px;\n font-weight: 700;\n color: var(--mj-text-primary);\n margin: 2px 0;\n }\n\n .status-subtitle {\n font-size: 10px;\n color: var(--mj-text-disabled);\n }\n\n /* Execution Modal Styles */\n .execution-modal {\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background: rgba(0, 0, 0, 0.5);\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 1000;\n padding: 20px;\n }\n\n .execution-modal-content {\n background: var(--mj-bg-surface);\n border-radius: 8px;\n max-width: 800px;\n width: 100%;\n max-height: 80vh;\n overflow: hidden;\n display: flex;\n flex-direction: column;\n }\n\n .execution-modal-header {\n padding: 20px;\n border-bottom: 1px solid var(--mj-border-default);\n display: flex;\n justify-content: space-between;\n align-items: center;\n }\n\n .execution-modal-header h3 {\n margin: 0;\n font-size: 18px;\n font-weight: 600;\n color: var(--mj-text-primary);\n }\n\n .modal-header-actions {\n display: flex;\n gap: 12px;\n align-items: center;\n }\n\n .open-record-btn {\n background: var(--mj-brand-primary);\n color: var(--mj-text-inverse);\n border: none;\n padding: 8px 16px;\n border-radius: 8px;\n font-size: 13px;\n font-weight: 600;\n cursor: pointer;\n display: flex;\n align-items: center;\n gap: 6px;\n transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n box-shadow: 0 2px 8px color-mix(in srgb, var(--mj-brand-primary) 25%, transparent);\n }\n\n .open-record-btn:hover {\n background: var(--mj-brand-primary-hover);\n transform: translateY(-1px);\n box-shadow: 0 4px 12px color-mix(in srgb, var(--mj-brand-primary) 35%, transparent);\n }\n\n .open-record-btn i {\n font-size: 12px;\n }\n\n .close-btn {\n background: none;\n border: none;\n font-size: 16px;\n color: var(--mj-text-disabled);\n cursor: pointer;\n padding: 4px;\n }\n\n .close-btn:hover {\n color: var(--mj-text-primary);\n }\n\n .execution-modal-body {\n padding: 20px;\n overflow-y: auto;\n flex: 1;\n }\n\n .execution-details {\n display: flex;\n flex-direction: column;\n gap: 20px;\n }\n\n .detail-section h4 {\n margin: 0 0 12px 0;\n font-size: 14px;\n font-weight: 600;\n color: var(--mj-text-primary);\n border-bottom: 1px solid var(--mj-border-default);\n padding-bottom: 6px;\n }\n\n .detail-grid {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));\n gap: 12px;\n }\n\n .detail-item {\n display: flex;\n flex-direction: column;\n gap: 4px;\n }\n\n .detail-item label {\n font-size: 11px;\n color: var(--mj-text-muted);\n font-weight: 500;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n }\n\n .detail-item span {\n font-size: 13px;\n color: var(--mj-text-primary);\n }\n\n .status-badge {\n display: inline-block;\n padding: 2px 8px;\n border-radius: 12px;\n font-size: 10px;\n font-weight: 500;\n text-transform: uppercase;\n }\n\n .status-badge--completed {\n background: color-mix(in srgb, var(--mj-status-success) 15%, var(--mj-bg-surface));\n color: var(--mj-status-success);\n }\n\n .status-badge--running {\n background: color-mix(in srgb, var(--mj-brand-primary) 15%, var(--mj-bg-surface));\n color: var(--mj-brand-primary);\n }\n\n .status-badge--failed {\n background: color-mix(in srgb, var(--mj-status-error) 15%, var(--mj-bg-surface));\n color: var(--mj-status-error);\n }\n\n .error-message {\n background: color-mix(in srgb, var(--mj-status-warning) 10%, var(--mj-bg-surface));\n border: 1px solid var(--mj-status-warning);\n border-radius: 4px;\n padding: 12px;\n font-size: 12px;\n color: var(--mj-status-error);\n font-family: monospace;\n }\n\n .child-executions {\n display: flex;\n flex-direction: column;\n gap: 8px;\n }\n\n .child-execution {\n background: var(--mj-bg-surface-card);\n border-radius: 4px;\n padding: 12px;\n display: flex;\n justify-content: space-between;\n align-items: center;\n }\n\n .child-info {\n display: flex;\n align-items: center;\n gap: 8px;\n }\n\n .child-name {\n font-size: 12px;\n font-weight: 500;\n color: var(--mj-text-primary);\n }\n\n .child-type {\n font-size: 10px;\n background: var(--mj-border-default);\n padding: 2px 6px;\n border-radius: 3px;\n color: var(--mj-text-muted);\n }\n\n .child-status {\n font-size: 10px;\n padding: 2px 6px;\n border-radius: 3px;\n }\n\n .child-metrics {\n display: flex;\n gap: 12px;\n font-size: 11px;\n color: var(--mj-text-muted);\n }\n\n .loading-details {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 40px;\n gap: 12px;\n }\n\n /* Drill-down Tab Styles */\n .drill-down-container {\n height: 100%;\n display: flex;\n flex-direction: column;\n }\n\n .drill-down-tabs {\n height: 100%;\n display: flex;\n flex-direction: column;\n }\n\n .tab-header {\n display: flex;\n border-bottom: 1px solid color-mix(in srgb, var(--mj-brand-primary) 10%, transparent);\n background: var(--mj-bg-surface-card);\n min-height: 44px;\n overflow-x: auto;\n }\n\n .tab-item {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 10px 18px;\n background: transparent;\n border: none;\n border-bottom: 2px solid transparent;\n cursor: pointer;\n font-size: 13px;\n font-weight: 500;\n color: var(--mj-text-muted);\n white-space: nowrap;\n transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n min-width: 120px;\n justify-content: space-between;\n }\n\n .tab-item:hover {\n background: color-mix(in srgb, var(--mj-brand-primary) 5%, transparent);\n color: var(--mj-brand-primary);\n }\n\n .tab-item.active {\n background: var(--mj-bg-surface);\n color: var(--mj-brand-primary);\n border-bottom-color: var(--mj-brand-primary);\n font-weight: 600;\n }\n\n .tab-title {\n flex: 1;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n .tab-close {\n background: none;\n border: none;\n color: var(--mj-text-disabled);\n cursor: pointer;\n padding: 2px;\n border-radius: 2px;\n font-size: 10px;\n width: 16px;\n height: 16px;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: all 0.2s ease;\n }\n\n .tab-close:hover {\n background: rgba(0, 0, 0, 0.1);\n color: var(--mj-text-primary);\n }\n\n .tab-content {\n flex: 1;\n overflow: hidden;\n display: flex;\n flex-direction: column;\n }\n\n .tab-pane {\n height: 100%;\n overflow: hidden;\n display: flex;\n flex-direction: column;\n }\n\n .trends-chart {\n padding: 0;\n }\n\n .trends-chart app-time-series-chart {\n height: 100%;\n display: block;\n overflow: hidden;\n }\n\n /* Ensure chart fits within tab pane */\n .tab-pane.trends-chart {\n display: flex;\n flex-direction: column;\n overflow: hidden;\n }\n\n /* Drill-down specific styles */\n .executions-drill-down {\n padding: 20px;\n overflow-y: auto;\n }\n\n .drill-down-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 20px;\n padding-bottom: 12px;\n border-bottom: 1px solid var(--mj-border-default);\n }\n\n .drill-down-header h4 {\n margin: 0;\n font-size: 16px;\n font-weight: 600;\n color: var(--mj-text-primary);\n display: flex;\n align-items: center;\n gap: 8px;\n }\n\n .drill-down-meta {\n display: flex;\n gap: 12px;\n align-items: center;\n font-size: 12px;\n }\n\n .timestamp {\n color: var(--mj-text-muted);\n background: var(--mj-bg-surface-sunken);\n padding: 4px 8px;\n border-radius: 4px;\n }\n\n .metric-badge {\n background: var(--mj-brand-primary);\n color: var(--mj-text-inverse);\n padding: 4px 10px;\n border-radius: 6px;\n font-weight: 600;\n box-shadow: 0 2px 4px color-mix(in srgb, var(--mj-brand-primary) 25%, transparent);\n }\n\n .loading-spinner {\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 40px;\n color: var(--mj-text-muted);\n gap: 12px;\n }\n\n .executions-table {\n display: flex;\n flex-direction: column;\n gap: 0;\n border: 1px solid var(--mj-border-default);\n border-radius: 6px;\n overflow: hidden;\n }\n\n .table-header {\n display: grid;\n grid-template-columns: 80px 1fr 120px 100px 100px 80px 100px 120px;\n gap: 12px;\n background: var(--mj-bg-surface-card);\n padding: 12px 16px;\n font-size: 11px;\n font-weight: 600;\n color: var(--mj-text-muted);\n text-transform: uppercase;\n letter-spacing: 0.5px;\n }\n\n .table-row {\n display: grid;\n grid-template-columns: 80px 1fr 120px 100px 100px 80px 100px 120px;\n gap: 12px;\n padding: 12px 16px;\n border-top: 1px solid var(--mj-bg-surface-sunken);\n cursor: pointer;\n transition: background 0.2s ease;\n align-items: center;\n }\n\n .table-row:hover {\n background: var(--mj-bg-surface-card);\n }\n\n .table-cell {\n font-size: 12px;\n color: var(--mj-text-primary);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .type-badge {\n background: color-mix(in srgb, var(--mj-text-muted) 10%, var(--mj-bg-surface));\n color: var(--mj-text-muted);\n padding: 3px 8px;\n border-radius: 4px;\n font-size: 10px;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.3px;\n }\n\n .type-badge--prompt {\n background: color-mix(in srgb, var(--mj-brand-primary) 15%, var(--mj-bg-surface));\n color: var(--mj-brand-primary);\n }\n\n .type-badge--agent {\n background: color-mix(in srgb, var(--mj-status-success) 15%, var(--mj-bg-surface));\n color: var(--mj-status-success);\n }\n\n /* Model detail styles */\n .model-detail {\n padding: 20px;\n overflow-y: auto;\n }\n\n .model-details {\n display: flex;\n flex-direction: column;\n gap: 24px;\n }\n\n .model-info-grid {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));\n gap: 16px;\n }\n\n .info-item {\n display: flex;\n flex-direction: column;\n gap: 6px;\n padding: 16px;\n background: var(--mj-bg-surface-card);\n border-radius: 6px;\n }\n\n .info-item label {\n font-size: 11px;\n color: var(--mj-text-muted);\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n margin: 0;\n }\n\n .info-item span {\n font-size: 14px;\n color: var(--mj-text-primary);\n font-weight: 500;\n }\n\n .status-indicator {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n font-size: 12px;\n }\n\n .status-indicator.active {\n color: var(--mj-status-success);\n }\n\n .status-indicator.active::before {\n content: '';\n width: 6px;\n height: 6px;\n background: var(--mj-status-success);\n border-radius: 50%;\n }\n\n .model-description {\n padding: 20px;\n background: var(--mj-bg-surface-card);\n border-radius: 8px;\n }\n\n .model-description h5 {\n margin: 0 0 12px 0;\n font-size: 14px;\n font-weight: 600;\n color: var(--mj-text-primary);\n }\n\n .model-description p {\n margin: 0;\n font-size: 13px;\n color: var(--mj-text-muted);\n line-height: 1.5;\n }\n\n /* Clickable KPI cards */\n .clickable {\n cursor: pointer;\n transition: transform 0.2s ease, box-shadow 0.2s ease;\n }\n\n .clickable:hover {\n transform: translateY(-2px);\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);\n }\n\n /* Collapsible Panel Styles */\n .analysis-panels {\n padding: 12px;\n height: 100%;\n overflow-y: auto;\n background: var(--mj-bg-surface-card);\n }\n\n /* Analysis panel chrome (wrapper/header/toggle-icon) now owned by <mj-accordion-panel>. */\n .panel-title {\n display: flex;\n align-items: center;\n gap: 10px;\n font-weight: 600;\n color: var(--mj-text-primary);\n font-size: 14px;\n }\n\n .panel-title i {\n color: var(--mj-brand-primary);\n width: 18px;\n }\n\n .panel-content {\n padding: 18px;\n }\n\n .live-executions-panel {\n padding: 0;\n }\n\n .live-executions-panel app-live-execution-widget {\n height: 300px;\n display: block;\n }\n\n /* Responsive Design */\n @media (max-width: 1200px) {\n .dashboard-splitter {\n min-height: 400px;\n }\n \n .table-header,\n .table-row {\n grid-template-columns: 60px 1fr 100px 80px 80px 60px 80px 100px;\n gap: 8px;\n }\n \n .model-info-grid {\n grid-template-columns: 1fr;\n }\n \n .analysis-panels {\n padding: 8px;\n }\n }\n\n @media (max-width: 768px) {\n .execution-monitoring {\n padding: 12px;\n }\n \n .monitoring-header {\n flex-direction: column;\n align-items: flex-start;\n }\n \n .monitoring-controls {\n width: 100%;\n justify-content: flex-start;\n }\n \n .dashboard-splitter {\n min-height: 350px;\n }\n \n .kpi-grid {\n grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));\n }\n\n /* Reduce padding on smaller screens */\n :host ::ng-deep as-split-area > .as-split-area-content {\n padding: 5px;\n }\n\n .tab-header {\n overflow-x: auto;\n }\n \n .tab-item {\n min-width: 100px;\n padding: 6px 12px;\n }\n \n .table-header,\n .table-row {\n grid-template-columns: 1fr;\n gap: 4px;\n text-align: left;\n }\n \n .table-row {\n display: block;\n padding: 16px;\n }\n \n .table-cell {\n display: block;\n margin-bottom: 8px;\n }\n \n .table-cell:before {\n content: attr(data-label) ': ';\n font-weight: 600;\n color: var(--mj-text-muted);\n font-size: 11px;\n text-transform: uppercase;\n }\n \n .executions-drill-down,\n .model-detail {\n padding: 12px;\n }\n \n .panel-content {\n padding: 12px;\n }\n\n .panel-title {\n font-size: 13px;\n }\n }\n "] }]
2299
2311
  }], () => [{ type: i1.AIInstrumentationService }, { type: i0.ChangeDetectorRef }], null); })();
2300
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ExecutionMonitoringComponent, { className: "ExecutionMonitoringComponent", filePath: "src/AI/components/execution-monitoring.component.ts", lineNumber: 1684 }); })();
2312
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ExecutionMonitoringComponent, { className: "ExecutionMonitoringComponent", filePath: "src/AI/components/execution-monitoring.component.ts", lineNumber: 1685 }); })();
2301
2313
  //# sourceMappingURL=execution-monitoring.component.js.map