llm-testrunner-components 1.0.6 → 1.0.9

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 (266) hide show
  1. package/README.md +101 -100
  2. package/dist/cjs/app-chips_5.cjs.entry.js +158 -0
  3. package/dist/cjs/app-chips_5.cjs.entry.js.map +1 -0
  4. package/dist/cjs/app-globals-Chb-oJtg.js +34 -0
  5. package/dist/cjs/app-globals-Chb-oJtg.js.map +1 -0
  6. package/dist/cjs/index-By1scwl6.js +25542 -0
  7. package/dist/cjs/index-By1scwl6.js.map +1 -0
  8. package/dist/cjs/index-CgmLNwZO.js +21460 -0
  9. package/dist/cjs/index-CgmLNwZO.js.map +1 -0
  10. package/dist/cjs/index.cjs.js +5 -483
  11. package/dist/cjs/index.cjs.js.map +1 -1
  12. package/dist/cjs/llm-testrunner.cjs.js +6 -4
  13. package/dist/cjs/llm-testrunner.cjs.js.map +1 -1
  14. package/dist/cjs/loader.cjs.js +5 -3
  15. package/dist/collection/collection-manifest.json +8 -3
  16. package/dist/collection/components/error-message/error-message.css +34 -0
  17. package/dist/collection/components/error-message/error-message.js +2 -2
  18. package/dist/collection/components/error-message/error-message.js.map +1 -1
  19. package/dist/collection/components/llm-test-runner/header/llm-test-runner-header.css +60 -0
  20. package/dist/collection/components/llm-test-runner/header/llm-test-runner-header.js +18 -0
  21. package/dist/collection/components/llm-test-runner/header/llm-test-runner-header.js.map +1 -0
  22. package/dist/collection/components/llm-test-runner/llm-test-runner.css +17 -657
  23. package/dist/collection/components/llm-test-runner/llm-test-runner.import-export.test.js +253 -0
  24. package/dist/collection/components/llm-test-runner/llm-test-runner.import-export.test.js.map +1 -0
  25. package/dist/collection/components/llm-test-runner/llm-test-runner.js +191 -200
  26. package/dist/collection/components/llm-test-runner/llm-test-runner.js.map +1 -1
  27. package/dist/collection/components/llm-test-runner/test-cases/actions/row-actions.css +28 -0
  28. package/dist/collection/components/llm-test-runner/test-cases/actions/row-actions.js +6 -0
  29. package/dist/collection/components/llm-test-runner/test-cases/actions/row-actions.js.map +1 -0
  30. package/dist/collection/components/llm-test-runner/test-cases/evaluation/evaluation-summary.css +67 -0
  31. package/dist/collection/components/llm-test-runner/test-cases/evaluation/evaluation-summary.js +5 -0
  32. package/dist/collection/components/llm-test-runner/test-cases/evaluation/evaluation-summary.js.map +1 -0
  33. package/dist/collection/components/llm-test-runner/test-cases/llm-test-case-row.css +42 -0
  34. package/dist/collection/components/llm-test-runner/test-cases/llm-test-case-row.js +39 -0
  35. package/dist/collection/components/llm-test-runner/test-cases/llm-test-case-row.js.map +1 -0
  36. package/dist/collection/components/llm-test-runner/test-cases/llm-test-cases.css +39 -0
  37. package/dist/collection/components/llm-test-runner/test-cases/llm-test-cases.js +7 -0
  38. package/dist/collection/components/llm-test-runner/test-cases/llm-test-cases.js.map +1 -0
  39. package/dist/collection/components/llm-test-runner/test-cases/output/response-output.css +51 -0
  40. package/dist/collection/components/llm-test-runner/test-cases/output/response-output.js +5 -0
  41. package/dist/collection/components/llm-test-runner/test-cases/output/response-output.js.map +1 -0
  42. package/dist/collection/global/env.js +3 -1
  43. package/dist/collection/global/env.js.map +1 -1
  44. package/dist/collection/index.js.map +1 -1
  45. package/dist/collection/lib/evaluation/constants.js +14 -0
  46. package/dist/collection/lib/evaluation/constants.js.map +1 -0
  47. package/dist/collection/lib/evaluation/evaluation-engine.js +45 -45
  48. package/dist/collection/lib/evaluation/evaluation-engine.js.map +1 -1
  49. package/dist/collection/lib/evaluation/evaluation-service.js +33 -0
  50. package/dist/collection/lib/evaluation/evaluation-service.js.map +1 -0
  51. package/dist/collection/lib/evaluation/evaluators/bleu/bleu-evaluator.js +116 -0
  52. package/dist/collection/lib/evaluation/evaluators/bleu/bleu-evaluator.js.map +1 -0
  53. package/dist/collection/lib/evaluation/evaluators/bleu/tests/bleu.test.js +352 -0
  54. package/dist/collection/lib/evaluation/evaluators/bleu/tests/bleu.test.js.map +1 -0
  55. package/dist/collection/lib/evaluation/evaluators/exact/exact.js +44 -0
  56. package/dist/collection/lib/evaluation/evaluators/exact/exact.js.map +1 -0
  57. package/dist/collection/lib/evaluation/evaluators/rouge1-evaluator.js +88 -0
  58. package/dist/collection/lib/evaluation/evaluators/rouge1-evaluator.js.map +1 -0
  59. package/dist/collection/lib/evaluation/evaluators/rougeL-evaluator.js +82 -0
  60. package/dist/collection/lib/evaluation/evaluators/rougeL-evaluator.js.map +1 -0
  61. package/dist/collection/lib/evaluation/evaluators/rougeL-evaluator.test.js +326 -0
  62. package/dist/collection/lib/evaluation/evaluators/rougeL-evaluator.test.js.map +1 -0
  63. package/dist/collection/lib/evaluation/evaluators/semantic/SemanticEvaluator.js +69 -0
  64. package/dist/collection/lib/evaluation/evaluators/semantic/SemanticEvaluator.js.map +1 -0
  65. package/dist/collection/lib/evaluation/evaluators/semantic/evaluate-keywords.js +56 -0
  66. package/dist/collection/lib/evaluation/evaluators/semantic/evaluate-keywords.js.map +1 -0
  67. package/dist/collection/lib/evaluation/evaluators/semantic/index.js +7 -0
  68. package/dist/collection/lib/evaluation/evaluators/semantic/index.js.map +1 -0
  69. package/dist/collection/lib/evaluation/evaluators/semantic/model-loader.js +19 -0
  70. package/dist/collection/lib/evaluation/evaluators/semantic/model-loader.js.map +1 -0
  71. package/dist/collection/lib/evaluation/evaluators/semantic/similarity-utils.js +16 -0
  72. package/dist/collection/lib/evaluation/evaluators/semantic/similarity-utils.js.map +1 -0
  73. package/dist/collection/lib/evaluation/evaluators/semantic/tests/evaluate-keywords.test.js +65 -0
  74. package/dist/collection/lib/evaluation/evaluators/semantic/tests/evaluate-keywords.test.js.map +1 -0
  75. package/dist/collection/lib/evaluation/evaluators/semantic/text-utils.js +5 -0
  76. package/dist/collection/lib/evaluation/evaluators/semantic/text-utils.js.map +1 -0
  77. package/dist/collection/lib/evaluation/index.js.map +1 -1
  78. package/dist/collection/lib/evaluation/rouge1-evaluator.test.js +117 -0
  79. package/dist/collection/lib/evaluation/rouge1-evaluator.test.js.map +1 -0
  80. package/dist/collection/lib/evaluation/types.js.map +1 -1
  81. package/dist/collection/lib/file/file-download.js +18 -0
  82. package/dist/collection/lib/file/file-download.js.map +1 -0
  83. package/dist/collection/lib/file/file-reader.js +14 -0
  84. package/dist/collection/lib/file/file-reader.js.map +1 -0
  85. package/dist/collection/lib/form/components/app-chips.css +97 -0
  86. package/dist/collection/lib/form/components/app-chips.js +155 -0
  87. package/dist/collection/lib/form/components/app-chips.js.map +1 -0
  88. package/dist/collection/lib/form/components/app-select.css +28 -0
  89. package/dist/collection/lib/form/components/app-select.js +101 -0
  90. package/dist/collection/lib/form/components/app-select.js.map +1 -0
  91. package/dist/collection/lib/form/components/app-textarea.css +38 -0
  92. package/dist/collection/lib/form/components/app-textarea.js +126 -0
  93. package/dist/collection/lib/form/components/app-textarea.js.map +1 -0
  94. package/dist/collection/lib/form/form-builder.js +171 -0
  95. package/dist/collection/lib/form/form-builder.js.map +1 -0
  96. package/dist/collection/lib/form/schema/base-input-field-config.js +2 -0
  97. package/dist/collection/lib/form/schema/base-input-field-config.js.map +1 -0
  98. package/dist/collection/lib/form/schema/form-control-config.js +2 -0
  99. package/dist/collection/lib/form/schema/form-control-config.js.map +1 -0
  100. package/dist/collection/lib/form/schema/index.js +8 -0
  101. package/dist/collection/lib/form/schema/index.js.map +1 -0
  102. package/dist/collection/lib/import-export/test-results-csv.js +65 -0
  103. package/dist/collection/lib/import-export/test-results-csv.js.map +1 -0
  104. package/dist/collection/lib/import-export/test-suite-exporter.js +15 -0
  105. package/dist/collection/lib/import-export/test-suite-exporter.js.map +1 -0
  106. package/dist/collection/lib/import-export/test-suite-importer.js +44 -0
  107. package/dist/collection/lib/import-export/test-suite-importer.js.map +1 -0
  108. package/dist/collection/lib/rate-limited-fetcher/rate-limited-fetcher.js +6 -6
  109. package/dist/collection/lib/rate-limited-fetcher/rate-limited-fetcher.js.map +1 -1
  110. package/dist/collection/lib/test-cases/test-case-factory.js +56 -0
  111. package/dist/collection/lib/test-cases/test-case-factory.js.map +1 -0
  112. package/dist/collection/lib/test-cases/test-case-mutations.js +16 -0
  113. package/dist/collection/lib/test-cases/test-case-mutations.js.map +1 -0
  114. package/dist/collection/lib/ui/button/button.css +113 -0
  115. package/dist/collection/lib/ui/button/button.js +21 -0
  116. package/dist/collection/lib/ui/button/button.js.map +1 -0
  117. package/dist/collection/lib/ui/button/index.js +2 -0
  118. package/dist/collection/lib/ui/button/index.js.map +1 -0
  119. package/dist/collection/lib/ui/icon-button/icon-button.css +77 -0
  120. package/dist/collection/lib/ui/icon-button/icon-button.js +19 -0
  121. package/dist/collection/lib/ui/icon-button/icon-button.js.map +1 -0
  122. package/dist/collection/lib/ui/icon-button/index.js +2 -0
  123. package/dist/collection/lib/ui/icon-button/index.js.map +1 -0
  124. package/dist/collection/services/adapters.js +2 -0
  125. package/dist/collection/services/adapters.js.map +1 -0
  126. package/dist/collection/services/models/gemini.js +17 -0
  127. package/dist/collection/services/models/gemini.js.map +1 -0
  128. package/dist/collection/styles/tokens.css +180 -0
  129. package/dist/collection/types/evaluation.js +2 -0
  130. package/dist/collection/types/evaluation.js.map +1 -0
  131. package/dist/collection/types/llm-test-runner.js +2 -0
  132. package/dist/collection/types/llm-test-runner.js.map +1 -0
  133. package/dist/components/app-chips.d.ts +11 -0
  134. package/dist/components/app-chips.js +2 -0
  135. package/dist/components/app-chips.js.map +1 -0
  136. package/dist/components/app-select.d.ts +11 -0
  137. package/dist/components/app-select.js +2 -0
  138. package/dist/components/app-select.js.map +1 -0
  139. package/dist/components/app-textarea.d.ts +11 -0
  140. package/dist/components/app-textarea.js +2 -0
  141. package/dist/components/app-textarea.js.map +1 -0
  142. package/dist/components/form-builder.d.ts +11 -0
  143. package/dist/components/form-builder.js +2 -0
  144. package/dist/components/form-builder.js.map +1 -0
  145. package/dist/components/index.d.ts +2 -0
  146. package/dist/components/index.js +1 -13
  147. package/dist/components/index.js.map +1 -1
  148. package/dist/components/llm-test-runner.js +1 -8
  149. package/dist/components/llm-test-runner.js.map +1 -1
  150. package/dist/components/p--2rdv_J9.js +2 -0
  151. package/dist/components/p--2rdv_J9.js.map +1 -0
  152. package/dist/components/p-B7J48VNq.js +2 -0
  153. package/dist/components/p-B7J48VNq.js.map +1 -0
  154. package/dist/components/p-BCB1rjPS.js +7 -0
  155. package/dist/components/p-BCB1rjPS.js.map +1 -0
  156. package/dist/components/p-BQhb2H_a.js +2 -0
  157. package/dist/components/p-BQhb2H_a.js.map +1 -0
  158. package/dist/components/p-D9BrlHdP.js +297 -0
  159. package/dist/components/p-D9BrlHdP.js.map +1 -0
  160. package/dist/components/p-DtCkZ1g2.js +2 -0
  161. package/dist/components/p-DtCkZ1g2.js.map +1 -0
  162. package/dist/esm/app-chips_5.entry.js +153 -0
  163. package/dist/esm/app-chips_5.entry.js.map +1 -0
  164. package/dist/esm/app-globals-DbR5vV7d.js +32 -0
  165. package/dist/esm/app-globals-DbR5vV7d.js.map +1 -0
  166. package/dist/esm/index-Bvg6mh1M.js +25539 -0
  167. package/dist/esm/index-Bvg6mh1M.js.map +1 -0
  168. package/dist/esm/index-DxzhGhec.js +21450 -0
  169. package/dist/esm/index-DxzhGhec.js.map +1 -0
  170. package/dist/esm/index.js +4 -486
  171. package/dist/esm/index.js.map +1 -1
  172. package/dist/esm/llm-testrunner.js +7 -5
  173. package/dist/esm/llm-testrunner.js.map +1 -1
  174. package/dist/esm/loader.js +6 -4
  175. package/dist/llm-testrunner/index.esm.js +1 -1
  176. package/dist/llm-testrunner/index.esm.js.map +1 -1
  177. package/dist/llm-testrunner/llm-testrunner.esm.js +1 -1
  178. package/dist/llm-testrunner/llm-testrunner.esm.js.map +1 -1
  179. package/dist/llm-testrunner/p-3f04b0fb.entry.js +2 -0
  180. package/dist/llm-testrunner/p-3f04b0fb.entry.js.map +1 -0
  181. package/dist/llm-testrunner/p-DFds8y01.js +7 -0
  182. package/dist/llm-testrunner/p-DFds8y01.js.map +1 -0
  183. package/dist/llm-testrunner/p-DxzhGhec.js +298 -0
  184. package/dist/llm-testrunner/p-DxzhGhec.js.map +1 -0
  185. package/dist/llm-testrunner/p-GQwFOmwJ.js +2 -0
  186. package/dist/llm-testrunner/p-GQwFOmwJ.js.map +1 -0
  187. package/dist/react/components.d.ts +32 -2
  188. package/dist/react/components.d.ts.map +1 -1
  189. package/dist/react/components.js +44 -2
  190. package/dist/types/components/llm-test-runner/header/llm-test-runner-header.d.ts +14 -0
  191. package/dist/types/components/llm-test-runner/llm-test-runner.d.ts +13 -29
  192. package/dist/types/components/llm-test-runner/llm-test-runner.import-export.test.d.ts +1 -0
  193. package/dist/types/components/llm-test-runner/test-cases/actions/row-actions.d.ts +8 -0
  194. package/dist/types/components/llm-test-runner/test-cases/evaluation/evaluation-summary.d.ts +7 -0
  195. package/dist/types/components/llm-test-runner/test-cases/llm-test-case-row.d.ts +25 -0
  196. package/dist/types/components/llm-test-runner/test-cases/llm-test-cases.d.ts +26 -0
  197. package/dist/types/components/llm-test-runner/test-cases/output/response-output.d.ts +6 -0
  198. package/dist/types/components.d.ts +199 -4
  199. package/dist/types/global/env.d.ts +2 -0
  200. package/dist/types/index.d.ts +1 -1
  201. package/dist/types/lib/evaluation/constants.d.ts +11 -0
  202. package/dist/types/lib/evaluation/evaluation-engine.d.ts +0 -4
  203. package/dist/types/lib/evaluation/evaluation-service.d.ts +15 -0
  204. package/dist/types/lib/evaluation/evaluators/bleu/bleu-evaluator.d.ts +18 -0
  205. package/dist/types/lib/evaluation/evaluators/bleu/tests/bleu.test.d.ts +1 -0
  206. package/dist/types/lib/evaluation/evaluators/exact/exact.d.ts +2 -0
  207. package/dist/types/lib/evaluation/evaluators/rouge1-evaluator.d.ts +17 -0
  208. package/dist/types/lib/evaluation/evaluators/rougeL-evaluator.d.ts +2 -0
  209. package/dist/types/lib/evaluation/evaluators/rougeL-evaluator.test.d.ts +1 -0
  210. package/dist/types/lib/evaluation/evaluators/semantic/SemanticEvaluator.d.ts +6 -0
  211. package/dist/types/lib/evaluation/evaluators/semantic/evaluate-keywords.d.ts +7 -0
  212. package/dist/types/lib/evaluation/evaluators/semantic/index.d.ts +2 -0
  213. package/dist/types/lib/evaluation/evaluators/semantic/model-loader.d.ts +1 -0
  214. package/dist/types/lib/evaluation/evaluators/semantic/similarity-utils.d.ts +1 -0
  215. package/dist/types/lib/evaluation/evaluators/semantic/tests/evaluate-keywords.test.d.ts +1 -0
  216. package/dist/types/lib/evaluation/evaluators/semantic/text-utils.d.ts +1 -0
  217. package/dist/types/lib/evaluation/index.d.ts +2 -2
  218. package/dist/types/lib/evaluation/rouge1-evaluator.test.d.ts +1 -0
  219. package/dist/types/lib/evaluation/types.d.ts +19 -7
  220. package/dist/types/lib/file/file-download.d.ts +7 -0
  221. package/dist/types/lib/file/file-reader.d.ts +6 -0
  222. package/dist/types/lib/form/components/app-chips.d.ts +20 -0
  223. package/dist/types/lib/form/components/app-select.d.ts +7 -0
  224. package/dist/types/lib/form/components/app-textarea.d.ts +14 -0
  225. package/dist/types/lib/form/form-builder.d.ts +24 -0
  226. package/dist/types/lib/form/schema/base-input-field-config.d.ts +37 -0
  227. package/dist/types/lib/form/schema/form-control-config.d.ts +13 -0
  228. package/dist/types/lib/form/schema/index.d.ts +9 -0
  229. package/dist/types/lib/import-export/test-results-csv.d.ts +13 -0
  230. package/dist/types/lib/import-export/test-suite-exporter.d.ts +16 -0
  231. package/dist/types/lib/import-export/test-suite-importer.d.ts +12 -0
  232. package/dist/types/lib/rate-limited-fetcher/rate-limited-fetcher.d.ts +1 -1
  233. package/dist/types/lib/test-cases/test-case-factory.d.ts +12 -0
  234. package/dist/types/lib/test-cases/test-case-mutations.d.ts +9 -0
  235. package/dist/types/lib/ui/button/button.d.ts +13 -0
  236. package/dist/types/lib/ui/button/index.d.ts +2 -0
  237. package/dist/types/lib/ui/icon-button/icon-button.d.ts +11 -0
  238. package/dist/types/lib/ui/icon-button/index.d.ts +2 -0
  239. package/dist/types/services/adapters.d.ts +3 -0
  240. package/dist/types/services/models/gemini.d.ts +11 -0
  241. package/dist/types/stencil-public-runtime.d.ts +110 -6
  242. package/dist/types/types/evaluation.d.ts +9 -0
  243. package/dist/types/types/llm-test-runner.d.ts +22 -0
  244. package/package.json +30 -6
  245. package/dist/cjs/app-globals-CbbEbofA.js +0 -14
  246. package/dist/cjs/app-globals-CbbEbofA.js.map +0 -1
  247. package/dist/cjs/index-D-FySkoV.js +0 -1470
  248. package/dist/cjs/index-D-FySkoV.js.map +0 -1
  249. package/dist/cjs/llm-test-runner.cjs.entry.js +0 -9
  250. package/dist/cjs/llm-test-runner.entry.cjs.js.map +0 -1
  251. package/dist/components/p-CYUbsbxt.js +0 -1770
  252. package/dist/components/p-CYUbsbxt.js.map +0 -1
  253. package/dist/esm/app-globals-BOQOUavG.js +0 -12
  254. package/dist/esm/app-globals-BOQOUavG.js.map +0 -1
  255. package/dist/esm/index-cncubhtM.js +0 -1463
  256. package/dist/esm/index-cncubhtM.js.map +0 -1
  257. package/dist/esm/llm-test-runner.entry.js +0 -3
  258. package/dist/esm/llm-test-runner.entry.js.map +0 -1
  259. package/dist/llm-testrunner/llm-test-runner.entry.esm.js.map +0 -1
  260. package/dist/llm-testrunner/loader.esm.js.map +0 -1
  261. package/dist/llm-testrunner/p-BOQOUavG.js +0 -2
  262. package/dist/llm-testrunner/p-BOQOUavG.js.map +0 -1
  263. package/dist/llm-testrunner/p-cncubhtM.js +0 -3
  264. package/dist/llm-testrunner/p-cncubhtM.js.map +0 -1
  265. package/dist/llm-testrunner/p-f68fd660.entry.js +0 -2
  266. package/dist/llm-testrunner/p-f68fd660.entry.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"llm-test-runner.js","sourceRoot":"","sources":["../../../src/components/llm-test-runner/llm-test-runner.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,EAAgB,KAAK,EAAE,MAAM,eAAe,CAAC;AAC/E,OAAO,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAE7E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CAAC,IAAI,CACzB;wBACT,cACE,KAAK,EAAC,yBAAyB,EAC/B,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,CAAC,EAC/C,KAAK,EAAC,kBAAkB,yBAGjB,CACL,CACF,CACP,CAAC,CACE;gBAEN,4DAAK,KAAK,EAAC,eAAe;oBACxB,+DAAQ,KAAK,EAAC,iBAAiB,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,cAAc,EAAE,qBAE3D,CACL,CACF,CACF,CACP,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, State, Prop, h, EventEmitter, Event } from '@stencil/core';\nimport { LLMEvaluationEngine } from '../../lib/evaluation/evaluation-engine';\nimport { EvaluationRequest, EvaluationResult } from '../../lib/evaluation/types';\nimport { v4 as uuidv4 } from 'uuid';\nimport { ErrorMessage } from '../error-message/error-message';\nimport { RateLimitedFetcher } from '../../lib/rate-limited-fetcher/rate-limited-fetcher';\n\nexport interface TestCase {\n id: string;\n question: string;\n expectedKeywords: string[];\n expectedSourceLinks: string[];\n output?: string;\n isRunning?: boolean;\n error?: string;\n evaluationResult?: EvaluationResult;\n responseTime?: number; // Time taken by the callback to execute in milliseconds\n}\n\nexport interface LLMRequestPayload {\n prompt: string;\n resolve: (result: string) => void;\n reject: (err: any) => void;\n}\n\n@Component({\n tag: 'llm-test-runner',\n styleUrl: 'llm-test-runner.css',\n shadow: true,\n})\nexport class LLMTestRunner {\n @Event() llmRequest: EventEmitter<LLMRequestPayload>;\n @Prop() delayMs?: number = 500; \n @State() testCases: TestCase[] = [\n {\n id: '1',\n question: '',\n expectedKeywords: [],\n expectedSourceLinks: [],\n isRunning: false\n }\n ];\n @State() isRunningAll: boolean = false;\n @State() error: string = '';\n\n private fileInput!: HTMLInputElement;\n @State() isExportingTestSuite: boolean = false;\n @State() isExportingTestResults: boolean = false;\n\n private evaluationEngine: LLMEvaluationEngine;\n\n componentWillLoad() {\n this.evaluationEngine = new LLMEvaluationEngine();\n }\n\n componentDidLoad() {\n }\n\n disconnectedCallback() {\n }\n\n private addNewTestCase() {\n const newTestCase: TestCase = {\n id: this.generateId(),\n question: '',\n expectedKeywords: [],\n expectedSourceLinks: [],\n isRunning: false\n };\n this.testCases = [...this.testCases, newTestCase];\n }\n\n private updateTestCase(id: string, updates: Partial<TestCase>) {\n this.testCases = this.testCases.map(tc => \n tc.id === id ? { ...tc, ...updates } : tc\n );\n }\n\n private async runSingleTest(testCase: TestCase): Promise<void> {\n console.log('🚀 Starting test for question:', testCase.question);\n const startTime = Date.now();\n this.updateTestCase(testCase.id, { isRunning: true });\n return new Promise<void>((resolve, reject) => {\n this.llmRequest.emit({\n prompt: testCase.question,\n resolve: async (aiResponse: string) => {\n console.log('✅ AI call completed for test case:', testCase.id);\n const endTime = Date.now();\n const responseTime = endTime - startTime;\n this.updateTestCase(testCase.id, {\n isRunning: false,\n output: aiResponse,\n error: null,\n responseTime: responseTime\n });\n\n await this.evaluateResponse({\n ...testCase,\n output: aiResponse,\n responseTime: responseTime\n });\n resolve()\n },\n reject: (error: any) => {\n console.error('❌ Error in runSingleTest:', error);\n this.updateTestCase(testCase.id, {\n isRunning: false,\n output: null,\n error: error instanceof Error ? error.message : 'Unknown error'\n });\n reject(error);\n }\n });\n })\n }\n\n private deleteTestCase(id: string) {\n this.testCases = this.testCases.filter(tc => tc.id !== id);\n }\n\n private addKeyword(testCaseId: string, keyword: string) {\n if (keyword.trim()) {\n const testCase = this.testCases.find(tc => tc.id === testCaseId);\n if (testCase) {\n this.updateTestCase(testCaseId, {\n expectedKeywords: [...testCase.expectedKeywords, keyword.trim()]\n });\n }\n }\n }\n\n private removeKeyword(testCaseId: string, index: number) {\n const testCase = this.testCases.find(tc => tc.id === testCaseId);\n if (testCase) {\n const newKeywords = testCase.expectedKeywords.filter((_, i) => i !== index);\n this.updateTestCase(testCaseId, { expectedKeywords: newKeywords });\n }\n }\n\n private addSourceLink(testCaseId: string, link: string) {\n if (link.trim()) {\n const testCase = this.testCases.find(tc => tc.id === testCaseId);\n if (testCase) {\n this.updateTestCase(testCaseId, {\n expectedSourceLinks: [...testCase.expectedSourceLinks, link.trim()]\n });\n }\n }\n }\n\n private removeSourceLink(testCaseId: string, index: number) {\n const testCase = this.testCases.find(tc => tc.id === testCaseId);\n if (testCase) {\n const newLinks = testCase.expectedSourceLinks.filter((_, i) => i !== index);\n this.updateTestCase(testCaseId, { expectedSourceLinks: newLinks });\n }\n }\n\n private async evaluateResponse(testCase: TestCase): Promise<void> {\n if (!testCase.output) {\n console.warn('⚠️ No output to evaluate for test case:', testCase.id);\n return;\n }\n\n const evaluationRequest: EvaluationRequest = {\n testCaseId: testCase.id,\n question: testCase.question,\n expectedKeywords: testCase.expectedKeywords,\n expectedSourceLinks: testCase.expectedSourceLinks,\n actualResponse: testCase.output\n };\n\n await this.evaluationEngine.evaluateResponse(evaluationRequest, (result: EvaluationResult) => {\n console.log('📊 Evaluation result received:', result);\n \n this.updateTestCase(testCase.id, {\n evaluationResult: result\n });\n });\n }\n\n private async runAllTests() {\n this.isRunningAll = true;\n const tasks = [];\n for (const testCase of this.testCases) {\n if (!testCase.isRunning && testCase.question.trim()) {\n tasks.push(() => this.runSingleTest(testCase).catch(err => {\n console.error(`⚠️ Test case ${testCase.id} failed`, err);\n }))\n }\n }\n try {\n const fetcher = new RateLimitedFetcher(this.delayMs);\n await fetcher.runAll(tasks);\n } catch (err) {\n console.error('⚠️ Error running all tests:', err);\n }\n this.isRunningAll = false;\n }\n\n private generateId(): string {\n return uuidv4();\n }\n\n private handleFileSelect(): void {\n this.fileInput.click();\n }\n\n private async handleFileChange(event: Event): Promise<void> {\n const target = event.target as HTMLInputElement;\n const file = target.files?.[0];\n\n // Immediately clear the input value to allow for a new upload.\n target.value = '';\n\n if (!file) {\n this.error = 'No file selected.';\n return;\n }\n\n const isJsonType = file.type === 'application/json';\n const isJsonExtension = file.name.toLowerCase().endsWith('.json');\n if (!isJsonType && !isJsonExtension) {\n this.error = 'Invalid file type. Please select a JSON file.';\n return;\n }\n\n this.error = '';\n\n try {\n const content = await this.readFileAsync(file);\n const fileContent = JSON.parse(content);\n\n if (!Array.isArray(fileContent)) {\n throw new Error(\"Invalid JSON structure. Expected a JSON array.\");\n } \n const importedTestCases: TestCase[] = fileContent.map((item) => ({\n id: this.generateId(),\n question: item.question || '',\n expectedKeywords: Array.isArray(item.expectedKeywords) ? item.expectedKeywords : [],\n expectedSourceLinks: Array.isArray(item.expectedSourceLinks) ? item.expectedSourceLinks : [],\n isRunning: false\n }));\n this.testCases = importedTestCases; \n } catch (err) {\n this.error = err?.message || 'Error processing file. Please ensure it is a valid JSON array.';\n console.error('File Processing Error:', err);\n }\n }\n\n private readFileAsync(file: File): Promise<string> {\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n reader.onload = () => resolve(reader.result as string);\n reader.onerror = () => reject(reader.error);\n reader.readAsText(file);\n });\n }\n\n private downloadFile(content: string, filename: string, mimeType: string) {\n const blob = new Blob([content], { type: mimeType });\n const url = URL.createObjectURL(blob);\n const link = document.createElement('a');\n link.href = url;\n link.download = filename;\n document.body.appendChild(link);\n link.click();\n document.body.removeChild(link);\n URL.revokeObjectURL(url);\n }\n\n private async handleExportTestSuite() {\n this.isExportingTestSuite = true;\n try {\n // Exporting only input data (question, expected keywords, expected source links)\n const exportData = this.testCases.map(testCase => ({\n id: testCase.id,\n question: testCase.question,\n expectedKeywords: testCase.expectedKeywords,\n expectedSourceLinks: testCase.expectedSourceLinks\n }));\n\n const jsonContent = JSON.stringify(exportData, null, 2);\n\n // Added a small delay to show the loading state\n await new Promise(resolve => setTimeout(resolve, 500));\n\n this.downloadFile(jsonContent, 'test-suite.json', 'application/json');\n } finally {\n this.isExportingTestSuite = false;\n }\n }\n\n private async handleExportTestResults() {\n this.isExportingTestResults = true;\n try {\n // Create CSV content with the required fields\n const csvRows = [];\n \n // Add header row\n const headers = [\n 'Question',\n 'Expected Keywords',\n 'Generated Keywords',\n 'Keywords Match',\n 'Expected Source Links',\n 'Generated Source Links',\n 'Source Links Match',\n 'Response Time (s)'\n ];\n csvRows.push(headers.join(','));\n \n // Add data rows\n this.testCases.forEach(testCase => {\n const expectedKeywords = testCase.expectedKeywords.join('; ');\n const expectedSourceLinks = testCase.expectedSourceLinks.join('; ');\n \n let generatedKeywords = '';\n let generatedSourceLinks = '';\n let keywordsMatch = '';\n let sourceLinksMatch = '';\n \n if (testCase.evaluationResult) {\n const foundKeywords = testCase.evaluationResult.keywordMatches\n .filter(match => match.found)\n .map(match => match.keyword);\n const foundSourceLinks = testCase.evaluationResult.sourceLinkMatches\n .filter(match => match.found)\n .map(match => match.link);\n \n generatedKeywords = foundKeywords.join('; ');\n generatedSourceLinks = foundSourceLinks.join('; ');\n \n // Calculate match percentages\n const keywordMatchCount = testCase.evaluationResult.keywordMatches.filter(m => m.found).length;\n const totalKeywords = testCase.evaluationResult.keywordMatches.length;\n const sourceLinkMatchCount = testCase.evaluationResult.sourceLinkMatches.filter(m => m.found).length;\n const totalSourceLinks = testCase.evaluationResult.sourceLinkMatches.length;\n \n keywordsMatch = totalKeywords > 0 ? `${keywordMatchCount}/${totalKeywords}` : 'N/A';\n sourceLinksMatch = totalSourceLinks > 0 ? `${sourceLinkMatchCount}/${totalSourceLinks}` : 'N/A';\n }\n \n const responseTime = testCase.responseTime ? (testCase.responseTime / 1000).toFixed(3) : 'N/A';\n \n const row = [\n this.escapeCsvField(testCase.question),\n this.escapeCsvField(expectedKeywords),\n this.escapeCsvField(generatedKeywords),\n keywordsMatch,\n this.escapeCsvField(expectedSourceLinks),\n this.escapeCsvField(generatedSourceLinks), \n sourceLinksMatch,\n responseTime\n ];\n \n csvRows.push(row.join(','));\n });\n \n const csvContent = csvRows.join('\\n');\n \n // Added a small delay to show the loading state\n await new Promise(resolve => setTimeout(resolve, 500));\n \n this.downloadFile(csvContent, 'test-results.csv', 'text/csv');\n } finally {\n this.isExportingTestResults = false;\n }\n }\n\n private escapeCsvField(field: string): string {\n if (field.includes(',') || field.includes('\"') || field.includes('\\n')) {\n return `\"${field.replace(/\"/g, '\"\"')}\"`;\n }\n return field;\n }\n\n render() {\n return (\n <div class=\"test-runner-container\">\n <header class=\"test-runner-header\">\n <div class=\"header-left\">\n <input\n class=\"hidden\"\n type=\"file\"\n ref={(el) => (this.fileInput = el as HTMLInputElement)}\n onChange={(e) => this.handleFileChange(e)}\n accept=\".json,application/json\"\n />\n <button class=\"btn btn-secondary\" onClick={() => this.handleFileSelect()}>\n <span class=\"icon\">↑</span>\n Import Test Suite\n </button>\n <button\n class=\"btn btn-secondary\"\n onClick={() => this.handleExportTestSuite()}\n disabled={this.isExportingTestSuite}\n >\n <span class=\"icon\">\n {this.isExportingTestSuite ? '⏳' : '↓'}\n </span>\n {this.isExportingTestSuite ? 'Exporting...' : 'Export Test Suite'}\n </button>\n </div>\n \n <div class=\"header-right\">\n <button class=\"btn btn-secondary\">\n <span class=\"icon\">⚙️</span>\n Prompt Editor\n </button>\n <button \n class=\"btn btn-secondary\"\n onClick={() => this.handleExportTestResults()}\n disabled={this.isExportingTestResults}\n >\n <span class=\"icon\">\n {this.isExportingTestResults ? '⏳' : '↓'}\n </span>\n {this.isExportingTestResults ? 'Exporting...' : 'Export Test Results'}\n </button>\n <button \n class=\"btn btn-primary\" \n onClick={() => this.runAllTests()}\n disabled={this.isRunningAll}\n >\n {this.isRunningAll ? 'Running...' : 'Run All'}\n </button>\n </div>\n </header>\n <ErrorMessage\n message={this.error}\n onClear={() => (this.error = '')}\n />\n <div class=\"test-runner-content\">\n <div class=\"column-headers\">\n <div class=\"column-header\">Input</div>\n <div class=\"column-header\">Output</div>\n <div class=\"column-header\">Evaluation</div>\n <div class=\"column-header\">Actions</div>\n </div>\n\n <div class=\"test-cases\">\n {this.testCases.map((testCase) => (\n <div class=\"test-case-row\" key={testCase.id}>\n <div class=\"input-column\">\n <div class=\"input-group\">\n <label>Question</label>\n <textarea\n value={testCase.question}\n onInput={(e) => this.updateTestCase(testCase.id, { \n question: (e.target as HTMLTextAreaElement).value \n })}\n placeholder=\"Enter your question here...\"\n rows={3}\n ></textarea>\n </div>\n \n <div class=\"keywords-group\">\n <label>Expected keywords</label>\n <div class=\"tags-container\">\n {testCase.expectedKeywords.map((keyword, index) => (\n <span class=\"tag\" key={index}>\n {keyword}\n <button \n class=\"tag-remove\" \n onClick={() => this.removeKeyword(testCase.id, index)}\n >×</button>\n </span>\n ))}\n <input\n type=\"text\"\n placeholder=\"New item...\"\n onKeyDown={(e) => {\n if (e.key === 'Enter') {\n this.addKeyword(testCase.id, (e.target as HTMLInputElement).value);\n (e.target as HTMLInputElement).value = '';\n }\n }}\n />\n </div>\n </div>\n \n <div class=\"links-group\">\n <label>Expected source links</label>\n <div class=\"links-container\">\n {testCase.expectedSourceLinks.map((link, index) => (\n <div class=\"link-item\" key={index}>\n <a href={link} target=\"_blank\" rel=\"noopener noreferrer\">{link}</a>\n <button \n class=\"link-remove\" \n onClick={() => this.removeSourceLink(testCase.id, index)}\n >×</button>\n </div>\n ))}\n <input\n type=\"url\"\n placeholder=\"New item...\"\n onKeyDown={(e) => {\n if (e.key === 'Enter') {\n this.addSourceLink(testCase.id, (e.target as HTMLInputElement).value);\n (e.target as HTMLInputElement).value = '';\n }\n }}\n />\n </div>\n </div>\n </div>\n\n <div class=\"output-column\">\n {testCase.output ? (\n <div class=\"output-content\">\n {testCase.output}\n </div>\n ) : (\n <div class=\"output-placeholder\">\n {testCase.isRunning ? 'Running...' : ''}\n </div>\n )}\n </div>\n\n <div class=\"evaluation-column\">\n {testCase.evaluationResult ? (\n <div class=\"evaluation-result\">\n <div class={`evaluation-status ${testCase.evaluationResult.passed ? 'passed' : 'failed'}`}>\n {testCase.evaluationResult.passed ? '✅ PASSED' : '❌ FAILED'}\n </div>\n <div class=\"evaluation-details\">\n Keywords: {testCase.evaluationResult.keywordMatches.filter(m => m.found).length}/{testCase.evaluationResult.keywordMatches.length} found\n </div>\n </div>\n ) : (\n <div class=\"evaluation-placeholder\">\n {testCase.isRunning ? 'Evaluating...' : ''}\n </div>\n )}\n </div>\n\n <div class=\"actions-column\">\n <button \n class=\"btn btn-icon btn-run\"\n onClick={() => this.runSingleTest(testCase)}\n disabled={testCase.isRunning || !testCase.question.trim()}\n title={!testCase.question.trim() ? \"Enter a question first\" : \"Run this test\"}\n >\n {testCase.isRunning ? '⏳' : '▶️'}\n </button>\n <button \n class=\"btn btn-icon btn-delete\"\n onClick={() => this.deleteTestCase(testCase.id)}\n title=\"Delete this test\"\n >\n 🗑️\n </button>\n </div>\n </div>\n ))}\n </div>\n\n <div class=\"add-test-case\">\n <button class=\"btn btn-outline\" onClick={() => this.addNewTestCase()}>\n + Add Question\n </button>\n </div>\n </div>\n </div>\n );\n }\n}"]}
1
+ {"version":3,"file":"llm-test-runner.js","sourceRoot":"","sources":["../../../src/components/llm-test-runner/llm-test-runner.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,KAAK,EACL,IAAI,EACJ,CAAC,EAED,KAAK,EACL,MAAM,GACP,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,qDAAqD,CAAC;AACzF,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAMpE,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,6CAA6C,CAAC;AACpF,OAAO,EAAE,sBAAsB,EAAE,MAAM,0CAA0C,CAAC;AAClF,OAAO,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAC;AAC9E,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AACxE,OAAO,KAAK,iBAAiB,MA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,cAAc,EAAE,EAC1C,oBAAoB,EAAE,IAAI,CAAC,oBAAoB,EAC/C,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,UAAU,EAAE,IAAI,CAAC,UAAU,GAC3B,CACE,CACF,CACP,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n Component,\n State,\n Prop,\n h,\n EventEmitter,\n Event,\n Method,\n} from '@stencil/core';\nimport { EvaluationResult } from '../../lib/evaluation/types';\nimport { ErrorMessage } from '../error-message/error-message';\nimport { RateLimitedFetcher } from '../../lib/rate-limited-fetcher/rate-limited-fetcher';\nimport { EvaluationApproach } from '../../lib/evaluation/constants';\nimport {\n TestCase,\n LLMRequestPayload,\n SavePayload,\n} from '../../types/llm-test-runner';\nimport { readFileAsync } from '../../lib/file/file-reader';\nimport { downloadFile } from '../../lib/file/file-download';\nimport { formatTestSuiteAsJson } from '../../lib/import-export/test-suite-exporter';\nimport { exportTestResultsToCsv } from '../../lib/import-export/test-results-csv';\nimport { importTestSuite } from '../../lib/import-export/test-suite-importer';\nimport { createTestCase } from '../../lib/test-cases/test-case-factory';\nimport * as TestCaseMutations from '../../lib/test-cases/test-case-mutations';\nimport { EvaluationService } from '../../lib/evaluation/evaluation-service';\nimport { LLMTestRunnerHeader } from './header/llm-test-runner-header';\nimport { LLMTestCases } from './test-cases/llm-test-cases';\n\n@Component({\n tag: 'llm-test-runner',\n styleUrls: [\n '../../styles/tokens.css',\n 'llm-test-runner.css',\n 'header/llm-test-runner-header.css',\n 'test-cases/llm-test-cases.css',\n 'test-cases/llm-test-case-row.css',\n 'test-cases/actions/row-actions.css',\n 'test-cases/evaluation/evaluation-summary.css',\n 'test-cases/output/response-output.css',\n '../error-message/error-message.css',\n '../../lib/ui/button/button.css',\n '../../lib/ui/icon-button/icon-button.css',\n ],\n shadow: true,\n})\nexport class LLMTestRunner {\n @Event() llmRequest: EventEmitter<LLMRequestPayload>;\n @Event() save: EventEmitter<SavePayload>;\n @Prop() delayMs?: number = 500;\n @Prop() useSave?: boolean = false;\n @Prop() initialTestCases?: TestCase[];\n @State() testCases: TestCase[] = [\n {\n id: '1',\n question: '',\n expectedOutcome: '',\n evaluationParameters: {\n approach: EvaluationApproach.EXACT,\n },\n isRunning: false,\n },\n ];\n @State() isRunningAll: boolean = false;\n @State() error: string = '';\n @State() isExportingTestSuite: boolean = false;\n @State() isExportingTestResults: boolean = false;\n @State() isSaving: boolean = false;\n\n private evaluationService: EvaluationService;\n\n componentWillLoad() {\n this.evaluationService = new EvaluationService();\n // Initialize testCases from prop if provided\n if (this.initialTestCases !== undefined) {\n this.testCases = this.initialTestCases;\n }\n }\n\n componentDidLoad() {}\n\n disconnectedCallback() {}\n\n @Method()\n async resetSavingState(): Promise<void> {\n this.isSaving = false;\n }\n\n private handleTestCaseChange = (\n event: CustomEvent<{ testCaseId: string; key: string; value: string }>,\n ) => {\n const { testCaseId, key, value } = event.detail;\n this.testCases = this.testCases.map(tc =>\n tc.id === testCaseId ? { ...tc, [key]: value } : tc,\n );\n };\n\n private addNewTestCase() {\n const newTestCase = createTestCase();\n this.testCases = [...this.testCases, newTestCase];\n }\n\n private updateTestCase(id: string, updates: Partial<TestCase>) {\n this.testCases = this.testCases.map(tc =>\n tc.id === id ? { ...tc, ...updates } : tc,\n );\n }\n\n private async runSingleTest(testCase: TestCase): Promise<void> {\n const startTime = Date.now();\n this.updateTestCase(testCase.id, { isRunning: true });\n return new Promise<void>((resolve, reject) => {\n this.llmRequest.emit({\n prompt: testCase.question,\n resolve: async (aiResponse: string) => {\n const endTime = Date.now();\n const responseTime = endTime - startTime;\n this.updateTestCase(testCase.id, {\n isRunning: false,\n output: aiResponse,\n error: null,\n responseTime: responseTime,\n });\n\n await this.evaluateResponse({\n ...testCase,\n output: aiResponse,\n responseTime: responseTime,\n });\n resolve();\n },\n reject: (error: Error | unknown) => {\n this.updateTestCase(testCase.id, {\n isRunning: false,\n output: null,\n error: error instanceof Error ? error.message : 'Unknown error',\n });\n reject(error);\n },\n });\n });\n }\n\n private deleteTestCase(id: string) {\n this.testCases = this.testCases.filter(tc => tc.id !== id);\n }\n\n private updateApproach(testCase: TestCase, approach: EvaluationApproach) {\n if (testCase) {\n const updated = TestCaseMutations.updateApproach(testCase, approach);\n this.updateTestCase(testCase.id, {\n evaluationParameters: updated.evaluationParameters,\n });\n }\n }\n\n private addChip = (\n event: CustomEvent<{ testCaseId: string; key: string; value: string }>,\n ) => {\n const { testCaseId, key, value: chipValue } = event.detail;\n const testCase = this.testCases.find(tc => tc.id === testCaseId);\n\n if (testCase) {\n const existing = Array.isArray(testCase[key]) ? testCase[key] : [];\n const updatedField = [...existing, chipValue];\n this.testCases = this.testCases.map(tc =>\n tc.id === testCaseId ? { ...tc, [key]: updatedField } : tc,\n );\n }\n };\n\n private removeChip = (\n event: CustomEvent<{ testCaseId: string; key: string; index: number }>,\n ) => {\n const { testCaseId, key, index } = event.detail;\n const testCase = this.testCases.find(tc => tc.id === testCaseId);\n\n if (testCase) {\n const existing = Array.isArray(testCase[key]) ? testCase[key] : [];\n const updatedField = existing.filter((_, i) => i !== index);\n this.testCases = this.testCases.map(tc =>\n tc.id === testCaseId ? { ...tc, [key]: updatedField } : tc,\n );\n }\n };\n\n private async evaluateResponse(testCase: TestCase): Promise<void> {\n await this.evaluationService.evaluateTestCase(\n testCase,\n (result: EvaluationResult) => {\n this.updateTestCase(testCase.id, {\n evaluationResult: result,\n });\n },\n );\n }\n\n private async runAllTests() {\n this.isRunningAll = true;\n const tasks = [];\n for (const testCase of this.testCases) {\n if (!testCase.isRunning && testCase.question.trim()) {\n tasks.push(() =>\n this.runSingleTest(testCase).catch(err => {\n console.error(`⚠️ Test case ${testCase.id} failed`, err);\n }),\n );\n }\n }\n try {\n const fetcher = new RateLimitedFetcher(this.delayMs);\n await fetcher.runAll(tasks);\n } catch (err) {\n console.error('⚠️ Error running all tests:', err);\n }\n this.isRunningAll = false;\n }\n\n private async handleImport(file: File): Promise<void> {\n const isJsonType = file.type === 'application/json';\n const isJsonExtension = file.name.toLowerCase().endsWith('.json');\n\n if (!isJsonType && !isJsonExtension) {\n this.error = 'Invalid file type. Please select a JSON file.';\n return;\n }\n\n this.error = '';\n\n try {\n const content = await readFileAsync(file);\n const result = importTestSuite(content);\n\n if (!result.success) {\n this.error = result.error || 'Unknown error occurred during import.';\n return;\n }\n\n this.testCases = result.testCases || [];\n } catch (err) {\n this.error =\n err instanceof Error\n ? err.message\n : 'Error processing file. Please ensure it is a valid JSON array.';\n console.error('File Processing Error:', err);\n }\n }\n\n private async handleExportTestSuite() {\n this.isExportingTestSuite = true;\n try {\n const jsonContent = formatTestSuiteAsJson(this.testCases);\n\n // Added a small delay to show the loading state\n await new Promise(resolve => setTimeout(resolve, 500));\n\n downloadFile(jsonContent, 'test-suite.json', 'application/json');\n } finally {\n this.isExportingTestSuite = false;\n }\n }\n\n private async handleExportTestResults() {\n this.isExportingTestResults = true;\n try {\n const csvContent = exportTestResultsToCsv(this.testCases);\n\n // Added a small delay to show the loading state\n await new Promise(resolve => setTimeout(resolve, 500));\n\n downloadFile(csvContent, 'test-results.csv', 'text/csv');\n } finally {\n this.isExportingTestResults = false;\n }\n }\n\n private async handleSave() {\n this.isSaving = true;\n try {\n const testRun = {\n timestamp: new Date().toISOString(),\n testCases: this.testCases,\n };\n this.save.emit(testRun);\n\n // Failsafe: Auto-reset saving state after 10 seconds to prevent stuck UI\n setTimeout(() => {\n if (this.isSaving) {\n console.warn('Save operation timed out, resetting state');\n this.isSaving = false;\n }\n }, 10000);\n } finally {\n // Parent will call resetSavingState() when actual save completes\n // If not called within 10 seconds, failsafe above will reset state\n }\n }\n\n render() {\n return (\n <div class=\"test-runner-container\">\n <LLMTestRunnerHeader\n isExportingTestSuite={this.isExportingTestSuite}\n isExportingTestResults={this.isExportingTestResults}\n isRunningAll={this.isRunningAll}\n useSave={this.useSave}\n isSaving={this.isSaving}\n onImport={file => this.handleImport(file)}\n onExportSuite={() => this.handleExportTestSuite()}\n onExportResults={() => this.handleExportTestResults()}\n onRunAll={() => this.runAllTests()}\n onSave={() => this.handleSave()}\n />\n <ErrorMessage message={this.error} onClear={() => (this.error = '')} />\n <div class=\"test-runner-container__content\">\n <LLMTestCases\n testCases={this.testCases}\n onRun={testCase => this.runSingleTest(testCase).catch(() => {})}\n onDelete={id => this.deleteTestCase(id)}\n onUpdateApproach={(testCase, approach) =>\n this.updateApproach(testCase, approach)\n }\n onAddTestCase={() => this.addNewTestCase()}\n handleTestCaseChange={this.handleTestCaseChange}\n addChip={this.addChip}\n removeChip={this.removeChip}\n />\n </div>\n </div>\n );\n }\n}\n"]}
@@ -0,0 +1,28 @@
1
+ /* Row Actions Block */
2
+ .row-actions {
3
+ height: 100%;
4
+ padding: var(--spacing-5);
5
+ background: var(--background);
6
+ display: flex;
7
+ flex-direction: column;
8
+ gap: var(--spacing-3);
9
+ align-items: center;
10
+ justify-content: flex-start;
11
+ align-self: flex-start;
12
+ }
13
+
14
+ /* Responsive Design */
15
+ @media (max-width: 1200px) {
16
+ .row-actions {
17
+ border-right: none;
18
+ border-bottom: var(--border-width) solid var(--border);
19
+ flex-direction: row;
20
+ justify-content: center;
21
+ }
22
+ }
23
+
24
+ @media (max-width: 768px) {
25
+ .row-actions {
26
+ padding: var(--spacing-4);
27
+ }
28
+ }
@@ -0,0 +1,6 @@
1
+ import { h } from "@stencil/core";
2
+ import { IconButton } from "../../../../lib/ui/icon-button/index";
3
+ export const RowActions = ({ isRunning, canRun, onRun, onDelete, }) => {
4
+ return (h("div", { class: "row-actions" }, h(IconButton, { variant: "outline", onClick: onRun, disabled: isRunning || !canRun, title: !canRun ? 'Enter a question first' : 'Run this test' }, isRunning ? '⏳' : '▶️'), h(IconButton, { variant: "outline", onClick: onDelete, title: "Delete this test" }, "\uD83D\uDDD1\uFE0F")));
5
+ };
6
+ //# sourceMappingURL=row-actions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"row-actions.js","sourceRoot":"","sources":["../../../../../src/components/llm-test-runner/test-cases/actions/row-actions.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAuB,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAC;AASlE,MAAM,CAAC,MAAM,UAAU,GAAyC,CAAC,EAC/D,SAAS,EACT,MAAM,EACN,KAAK,EACL,QAAQ,GACT,EAAE,EAAE;IACH,OAAO,CACL,WAAK,KAAK,EAAC,aAAa;QACtB,EAAC,UAAU,IACT,OAAO,EAAC,SAAS,EACjB,OAAO,EAAE,KAAK,EACd,QAAQ,EAAE,SAAS,IAAI,CAAC,MAAM,EAC9B,KAAK,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,wBAAwB,CAAC,CAAC,CAAC,eAAe,IAE1D,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CACZ;QACb,EAAC,UAAU,IAAC,OAAO,EAAC,SAAS,EAAC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAC,kBAAkB,yBAE5D,CACT,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { h, FunctionalComponent } from '@stencil/core';\nimport { IconButton } from '../../../../lib/ui/icon-button/index';\n\nexport interface RowActionsProps {\n isRunning: boolean;\n canRun: boolean;\n onRun: () => void;\n onDelete: () => void;\n}\n\nexport const RowActions: FunctionalComponent<RowActionsProps> = ({\n isRunning,\n canRun,\n onRun,\n onDelete,\n}) => {\n return (\n <div class=\"row-actions\">\n <IconButton\n variant=\"outline\"\n onClick={onRun}\n disabled={isRunning || !canRun}\n title={!canRun ? 'Enter a question first' : 'Run this test'}\n >\n {isRunning ? '⏳' : '▶️'}\n </IconButton>\n <IconButton variant=\"outline\" onClick={onDelete} title=\"Delete this test\">\n 🗑️\n </IconButton>\n </div>\n );\n};\n"]}
@@ -0,0 +1,67 @@
1
+ /* Evaluation Summary Block */
2
+ .evaluation-summary {
3
+ padding: var(--spacing-5);
4
+ background: var(--background);
5
+ border-right: var(--border-width) solid var(--border);
6
+ display: flex;
7
+ flex-direction: column;
8
+ }
9
+
10
+ .evaluation-summary__details {
11
+ display: flex;
12
+ flex-direction: column;
13
+ gap: var(--spacing-2);
14
+ }
15
+
16
+ .evaluation-summary__placeholder {
17
+ display: flex;
18
+ align-items: center;
19
+ justify-content: center;
20
+ color: var(--muted-foreground);
21
+ font-style: italic;
22
+ flex: 1;
23
+ background: var(--muted);
24
+ border: 2px dashed var(--border);
25
+ border-radius: var(--radius);
26
+ }
27
+
28
+ /* Evaluation Result Element */
29
+ .evaluation-summary__result {
30
+ display: flex;
31
+ flex-direction: column;
32
+ gap: var(--spacing-2);
33
+ }
34
+
35
+ .evaluation-summary__result-status {
36
+ font-weight: var(--font-weight-semibold);
37
+ font-size: var(--font-size-sm);
38
+ padding: var(--spacing-2) var(--spacing-3);
39
+ border-radius: var(--radius-md);
40
+ text-align: center;
41
+ }
42
+
43
+ .evaluation-summary__result-status--passed {
44
+ background: var(--success);
45
+ color: var(--success-foreground);
46
+ border: var(--border-width) solid var(--success);
47
+ }
48
+
49
+ .evaluation-summary__result-status--failed {
50
+ background: var(--destructive);
51
+ color: var(--destructive-foreground);
52
+ border: var(--border-width) solid var(--destructive);
53
+ }
54
+
55
+ /* Responsive Design */
56
+ @media (max-width: 1200px) {
57
+ .evaluation-summary {
58
+ border-right: none;
59
+ border-bottom: var(--border-width) solid var(--border);
60
+ }
61
+ }
62
+
63
+ @media (max-width: 768px) {
64
+ .evaluation-summary {
65
+ padding: var(--spacing-4);
66
+ }
67
+ }
@@ -0,0 +1,5 @@
1
+ import { h } from "@stencil/core";
2
+ export const EvaluationSummary = ({ result, isRunning, }) => {
3
+ return (h("div", { class: "evaluation-summary" }, result ? (h("div", { class: "evaluation-summary__result" }, h("div", { class: `evaluation-summary__result-status evaluation-summary__result-status--${result.passed ? 'passed' : 'failed'}` }, result.passed ? '✅ PASSED' : '❌ FAILED'), h("div", { class: "evaluation-summary__details" }, "Keywords: ", result.keywordMatches.filter(m => m.found).length, "/", result.keywordMatches.length, " found"))) : (h("div", { class: "evaluation-summary__placeholder" }, isRunning ? 'Evaluating...' : ''))));
4
+ };
5
+ //# sourceMappingURL=evaluation-summary.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"evaluation-summary.js","sourceRoot":"","sources":["../../../../../src/components/llm-test-runner/test-cases/evaluation/evaluation-summary.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAuB,MAAM,eAAe,CAAC;AAQvD,MAAM,CAAC,MAAM,iBAAiB,GAAgD,CAAC,EAC7E,MAAM,EACN,SAAS,GACV,EAAE,EAAE;IACH,OAAO,CACL,WAAK,KAAK,EAAC,oBAAoB,IAC5B,MAAM,CAAC,CAAC,CAAC,CACR,WAAK,KAAK,EAAC,4BAA4B;QACrC,WACE,KAAK,EAAE,wEAAwE,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,EAAE,IAEnH,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,UAAU,CACpC;QACN,WAAK,KAAK,EAAC,6BAA6B;;YAC3B,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,MAAM;;YAC3D,MAAM,CAAC,cAAc,CAAC,MAAM;qBACzB,CACF,CACP,CAAC,CAAC,CAAC,CACF,WAAK,KAAK,EAAC,iCAAiC,IACzC,SAAS,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,CAC7B,CACP,CACG,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { h, FunctionalComponent } from '@stencil/core';\nimport { EvaluationResult } from '../../../../lib/evaluation/types';\n\nexport interface EvaluationSummaryProps {\n result?: EvaluationResult;\n isRunning: boolean;\n}\n\nexport const EvaluationSummary: FunctionalComponent<EvaluationSummaryProps> = ({\n result,\n isRunning,\n}) => {\n return (\n <div class=\"evaluation-summary\">\n {result ? (\n <div class=\"evaluation-summary__result\">\n <div\n class={`evaluation-summary__result-status evaluation-summary__result-status--${result.passed ? 'passed' : 'failed'}`}\n >\n {result.passed ? '✅ PASSED' : '❌ FAILED'}\n </div>\n <div class=\"evaluation-summary__details\">\n Keywords: {result.keywordMatches.filter(m => m.found).length}/\n {result.keywordMatches.length} found\n </div>\n </div>\n ) : (\n <div class=\"evaluation-summary__placeholder\">\n {isRunning ? 'Evaluating...' : ''}\n </div>\n )}\n </div>\n );\n};\n"]}
@@ -0,0 +1,42 @@
1
+ /* Test Case Row Block */
2
+ .test-case-row {
3
+ display: grid;
4
+ grid-template-columns: 1fr 1.5fr 0.5fr 120px;
5
+ gap: var(--border-width);
6
+ border-bottom: var(--border-width) solid var(--border);
7
+ min-height: 200px;
8
+ }
9
+
10
+ .test-case-row:hover {
11
+ background: var(--muted);
12
+ }
13
+
14
+ /* Input Column Element */
15
+ .test-case-row__input-column {
16
+ padding: var(--spacing-5);
17
+ background: var(--background);
18
+ border-right: var(--border-width) solid var(--border);
19
+ }
20
+
21
+ /* Responsive Design */
22
+ @media (max-width: 1200px) {
23
+ .test-case-row {
24
+ grid-template-columns: 1fr;
25
+ gap: 0;
26
+ }
27
+
28
+ .test-case-row__input-column {
29
+ border-right: none;
30
+ border-bottom: var(--border-width) solid var(--border);
31
+ }
32
+ }
33
+
34
+ @media (max-width: 768px) {
35
+ .test-case-row__input-column {
36
+ padding: var(--spacing-4);
37
+ }
38
+
39
+ .test-case-row {
40
+ min-height: auto;
41
+ }
42
+ }
@@ -0,0 +1,39 @@
1
+ import { h } from "@stencil/core";
2
+ import { EvaluationApproach, EvaluationApproachValues, } from "../../../lib/evaluation/constants";
3
+ import { ResponseOutput } from "./output/response-output";
4
+ import { EvaluationSummary } from "./evaluation/evaluation-summary";
5
+ import { RowActions } from "./actions/row-actions";
6
+ import { FormFieldType } from "../../../lib/form/schema";
7
+ const formFields = [
8
+ {
9
+ name: 'question',
10
+ fieldType: FormFieldType.TEXT_AREA,
11
+ type: 'text',
12
+ label: 'Question',
13
+ placeholder: 'Enter your question here...',
14
+ required: true,
15
+ rows: 3,
16
+ },
17
+ {
18
+ name: 'expectedOutcome',
19
+ fieldType: FormFieldType.TEXT_AREA,
20
+ type: 'text',
21
+ label: 'Expected outcome',
22
+ placeholder: 'Enter expected outcome...',
23
+ required: false,
24
+ rows: 2,
25
+ },
26
+ {
27
+ name: 'EvaluationApproach',
28
+ fieldType: FormFieldType.SELECT,
29
+ label: 'Evaluation',
30
+ placeholder: 'Select evaluation approach…',
31
+ required: true,
32
+ optionList: EvaluationApproachValues,
33
+ defaultValue: EvaluationApproach.EXACT,
34
+ },
35
+ ];
36
+ export const LLMTestCaseRow = ({ testCase, onRun, onDelete, onUpdateApproach, handleTestCaseChange, addChip, removeChip, }) => {
37
+ return (h("div", { class: "test-case-row", key: testCase.id }, h("div", { class: "test-case-row__input-column" }, h("form-builder", { fields: formFields, testCase: testCase, onUpdateApproach: onUpdateApproach, handleTestCaseChange: handleTestCaseChange, addChip: addChip, removeChip: removeChip })), h(ResponseOutput, { output: testCase.output, isRunning: testCase.isRunning }), h(EvaluationSummary, { result: testCase.evaluationResult, isRunning: testCase.isRunning }), h(RowActions, { isRunning: testCase.isRunning, canRun: !!testCase.question.trim(), onRun: () => onRun(testCase), onDelete: () => onDelete(testCase.id) })));
38
+ };
39
+ //# sourceMappingURL=llm-test-case-row.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"llm-test-case-row.js","sourceRoot":"","sources":["../../../../src/components/llm-test-runner/test-cases/llm-test-case-row.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAuB,MAAM,eAAe,CAAC;AAEvD,OAAO,EACL,kBAAkB,EAClB,wB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BAAoB,EAAE,oBAAoB,EAC1C,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,UAAU,GACtB,CACE;QAEN,EAAC,cAAc,IAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,EAAE,SAAS,EAAE,QAAQ,CAAC,SAAS,GAAI;QAE1E,EAAC,iBAAiB,IAChB,MAAM,EAAE,QAAQ,CAAC,gBAAgB,EACjC,SAAS,EAAE,QAAQ,CAAC,SAAS,GAC7B;QAEF,EAAC,UAAU,IACT,SAAS,EAAE,QAAQ,CAAC,SAAS,EAC7B,MAAM,EAAE,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,EAAE,EAClC,KAAK,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,EAC5B,QAAQ,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,GACrC,CACE,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { h, FunctionalComponent } from '@stencil/core';\nimport { TestCase } from '../../../types/llm-test-runner';\nimport {\n EvaluationApproach,\n EvaluationApproachValues,\n} from '../../../lib/evaluation/constants';\nimport { ResponseOutput } from './output/response-output';\nimport { EvaluationSummary } from './evaluation/evaluation-summary';\nimport { RowActions } from './actions/row-actions';\nimport { FieldConfig, FormFieldType } from '../../../lib/form/schema';\n\nexport interface LLMTestCaseRowProps {\n testCase: TestCase;\n onRun: (testCase: TestCase) => void;\n onDelete: (id: string) => void;\n onUpdateApproach: (testCase: TestCase, approach: EvaluationApproach) => void;\n handleTestCaseChange: (\n e: CustomEvent<{ testCaseId: string; key: string; value: string }>,\n ) => void;\n addChip: (\n e: CustomEvent<{ testCaseId: string; key: string; value: string }>,\n ) => void;\n removeChip: (\n e: CustomEvent<{ testCaseId: string; key: string; index: number }>,\n ) => void;\n}\n\nconst formFields: FieldConfig[] = [\n {\n name: 'question',\n fieldType: FormFieldType.TEXT_AREA,\n type: 'text',\n label: 'Question',\n placeholder: 'Enter your question here...',\n required: true,\n rows: 3,\n },\n {\n name: 'expectedOutcome',\n fieldType: FormFieldType.TEXT_AREA,\n type: 'text',\n label: 'Expected outcome',\n placeholder: 'Enter expected outcome...',\n required: false,\n rows: 2,\n },\n {\n name: 'EvaluationApproach',\n fieldType: FormFieldType.SELECT,\n label: 'Evaluation',\n placeholder: 'Select evaluation approach…',\n required: true,\n optionList: EvaluationApproachValues,\n defaultValue: EvaluationApproach.EXACT,\n },\n];\n\nexport const LLMTestCaseRow: FunctionalComponent<LLMTestCaseRowProps> = ({\n testCase,\n onRun,\n onDelete,\n onUpdateApproach,\n handleTestCaseChange,\n addChip,\n removeChip,\n}) => {\n return (\n <div class=\"test-case-row\" key={testCase.id}>\n <div class=\"test-case-row__input-column\">\n <form-builder\n fields={formFields}\n testCase={testCase}\n onUpdateApproach={onUpdateApproach}\n handleTestCaseChange={handleTestCaseChange}\n addChip={addChip}\n removeChip={removeChip}\n />\n </div>\n\n <ResponseOutput output={testCase.output} isRunning={testCase.isRunning} />\n\n <EvaluationSummary\n result={testCase.evaluationResult}\n isRunning={testCase.isRunning}\n />\n\n <RowActions\n isRunning={testCase.isRunning}\n canRun={!!testCase.question.trim()}\n onRun={() => onRun(testCase)}\n onDelete={() => onDelete(testCase.id)}\n />\n </div>\n );\n};\n"]}
@@ -0,0 +1,39 @@
1
+ /* Test Cases Block */
2
+ .test-cases {
3
+ background: var(--background);
4
+ }
5
+
6
+ /* Column Headers Element */
7
+ .test-cases__column-headers {
8
+ display: grid;
9
+ grid-template-columns: 1fr 1.5fr 0.5fr 120px;
10
+ gap: var(--border-width);
11
+ background: var(--border);
12
+ border-bottom: 2px solid var(--border);
13
+ }
14
+
15
+ .test-cases__column-header {
16
+ background: var(--muted);
17
+ padding: var(--spacing-4) var(--spacing-5);
18
+ font-weight: var(--font-weight-semibold);
19
+ color: var(--foreground);
20
+ font-size: var(--font-size-sm);
21
+ text-transform: uppercase;
22
+ letter-spacing: var(--letter-spacing-wide);
23
+ }
24
+
25
+ /* Add Test Case Element */
26
+ .test-cases__add-section {
27
+ padding: var(--spacing-6);
28
+ text-align: center;
29
+ background: var(--muted);
30
+ border-top: var(--border-width) solid var(--border);
31
+ }
32
+
33
+ /* Responsive Design */
34
+ @media (max-width: 1200px) {
35
+ .test-cases__column-headers {
36
+ display: none;
37
+ }
38
+ }
39
+
@@ -0,0 +1,7 @@
1
+ import { h } from "@stencil/core";
2
+ import { LLMTestCaseRow } from "./llm-test-case-row";
3
+ import { Button } from "../../../lib/ui/button/index";
4
+ export const LLMTestCases = ({ testCases, onRun, onDelete, onUpdateApproach, onAddTestCase, handleTestCaseChange, addChip, removeChip, }) => {
5
+ return (h("div", { class: "test-cases" }, h("div", { class: "test-cases__column-headers" }, h("div", { class: "test-cases__column-header" }, "Input"), h("div", { class: "test-cases__column-header" }, "Output"), h("div", { class: "test-cases__column-header" }, "Evaluation"), h("div", { class: "test-cases__column-header" }, "Actions")), testCases.map(testCase => (h(LLMTestCaseRow, { testCase: testCase, onRun: onRun, onDelete: onDelete, onUpdateApproach: onUpdateApproach, handleTestCaseChange: handleTestCaseChange, addChip: addChip, removeChip: removeChip }))), h("div", { class: "test-cases__add-section" }, h(Button, { variant: "outline", size: "md", onClick: onAddTestCase }, "+ Add Question"))));
6
+ };
7
+ //# sourceMappingURL=llm-test-cases.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"llm-test-cases.js","sourceRoot":"","sources":["../../../../src/components/llm-test-runner/test-cases/llm-test-cases.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAuB,MAAM,eAAe,CAAC;AAGvD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AAmBtD,MAAM,CAAC,MAAM,YAAY,GAA2C,CAAC,EACnE,SAAS,EACT,KAAK,EACL,QAAQ,EACR,gBAAgB,EAChB,aAAa,EACb,oBAAoB,EACpB,OAAO,EACP,UAAU,GACX,EAAE,EAAE;IACH,OAAO,CACL,WAAK,KAAK,EAAC,YAAY;QACrB,WAAK,KAAK,EAAC,4BAA4B;YACrC,WAAK,KAAK,EAAC,2BAA2B,YAAY;YAClD,WAAK,KAAK,EAAC,2BAA2B,aAAa;YACnD,WAAK,KAAK,EAAC,2BAA2B,iBAAiB;YACvD,WAAK,KAAK,EAAC,2BAA2B,cAAc,CAChD;QAEL,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC,CACzB,EAAC,cAAc,IACb,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,EAClB,gBAAgB,EAAE,gBAAgB,EAClC,oBAAoB,EAAE,oBAAoB,EAC1C,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,UAAU,GACtB,CACH,CAAC;QAEF,WAAK,KAAK,EAAC,yBAAyB;YAClC,EAAC,MAAM,IAAC,OAAO,EAAC,SAAS,EAAC,IAAI,EAAC,IAAI,EAAC,OAAO,EAAE,aAAa,qBAEjD,CACL,CACF,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { h, FunctionalComponent } from '@stencil/core';\nimport { TestCase } from '../../../types/llm-test-runner';\nimport { EvaluationApproach } from '../../../lib/evaluation/constants';\nimport { LLMTestCaseRow } from './llm-test-case-row';\nimport { Button } from '../../../lib/ui/button/index';\n\nexport interface LLMTestCasesProps {\n testCases: TestCase[];\n onRun: (testCase: TestCase) => void;\n onDelete: (id: string) => void;\n onUpdateApproach: (testCase: TestCase, approach: EvaluationApproach) => void;\n onAddTestCase: () => void;\n handleTestCaseChange: (\n e: CustomEvent<{ testCaseId: string; key: string; value: string }>,\n ) => void;\n addChip: (\n e: CustomEvent<{ testCaseId: string; key: string; value: string }>,\n ) => void;\n removeChip: (\n e: CustomEvent<{ testCaseId: string; key: string; index: number }>,\n ) => void;\n}\n\nexport const LLMTestCases: FunctionalComponent<LLMTestCasesProps> = ({\n testCases,\n onRun,\n onDelete,\n onUpdateApproach,\n onAddTestCase,\n handleTestCaseChange,\n addChip,\n removeChip,\n}) => {\n return (\n <div class=\"test-cases\">\n <div class=\"test-cases__column-headers\">\n <div class=\"test-cases__column-header\">Input</div>\n <div class=\"test-cases__column-header\">Output</div>\n <div class=\"test-cases__column-header\">Evaluation</div>\n <div class=\"test-cases__column-header\">Actions</div>\n </div>\n\n {testCases.map(testCase => (\n <LLMTestCaseRow\n testCase={testCase}\n onRun={onRun}\n onDelete={onDelete}\n onUpdateApproach={onUpdateApproach}\n handleTestCaseChange={handleTestCaseChange}\n addChip={addChip}\n removeChip={removeChip}\n />\n ))}\n\n <div class=\"test-cases__add-section\">\n <Button variant=\"outline\" size=\"md\" onClick={onAddTestCase}>\n + Add Question\n </Button>\n </div>\n </div>\n );\n};\n"]}
@@ -0,0 +1,51 @@
1
+ /* Response Output Block */
2
+ .response-output {
3
+ padding: var(--spacing-5);
4
+ background: var(--background);
5
+ border-right: var(--border-width) solid var(--border);
6
+ display: flex;
7
+ flex-direction: column;
8
+ }
9
+
10
+ .response-output__content {
11
+ background: var(--muted);
12
+ border: var(--border-width) solid var(--border);
13
+ border-radius: var(--radius);
14
+ padding: var(--spacing-4);
15
+ font-size: var(--font-size-sm);
16
+ line-height: var(--line-height-relaxed);
17
+ color: var(--foreground);
18
+ white-space: pre-wrap;
19
+ word-wrap: break-word;
20
+ flex: 1;
21
+ overflow-y: auto;
22
+ max-height: 250px;
23
+ overflow-x: scroll;
24
+ }
25
+
26
+ .response-output__placeholder {
27
+ display: flex;
28
+ align-items: center;
29
+ justify-content: center;
30
+ color: var(--muted-foreground);
31
+ font-style: italic;
32
+ flex: 1;
33
+ background: var(--muted);
34
+ border: 2px dashed var(--border);
35
+ border-radius: var(--radius);
36
+ }
37
+
38
+ /* Responsive Design */
39
+ @media (max-width: 1200px) {
40
+ .response-output {
41
+ border-right: none;
42
+ border-bottom: var(--border-width) solid var(--border);
43
+ }
44
+ }
45
+
46
+ @media (max-width: 768px) {
47
+ .response-output {
48
+ padding: var(--spacing-4);
49
+ }
50
+ }
51
+
@@ -0,0 +1,5 @@
1
+ import { h } from "@stencil/core";
2
+ export const ResponseOutput = ({ output, isRunning, }) => {
3
+ return (h("div", { class: "response-output" }, output ? (h("div", { class: "response-output__content" }, output)) : (h("div", { class: "response-output__placeholder" }, isRunning ? 'Running...' : ''))));
4
+ };
5
+ //# sourceMappingURL=response-output.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"response-output.js","sourceRoot":"","sources":["../../../../../src/components/llm-test-runner/test-cases/output/response-output.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAuB,MAAM,eAAe,CAAC;AAOvD,MAAM,CAAC,MAAM,cAAc,GAA6C,CAAC,EACvE,MAAM,EACN,SAAS,GACV,EAAE,EAAE;IACH,OAAO,CACL,WAAK,KAAK,EAAC,iBAAiB,IACzB,MAAM,CAAC,CAAC,CAAC,CACR,WAAK,KAAK,EAAC,0BAA0B,IAAE,MAAM,CAAO,CACrD,CAAC,CAAC,CAAC,CACF,WAAK,KAAK,EAAC,8BAA8B,IAAE,SAAS,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,CAAO,CAChF,CACG,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { h, FunctionalComponent } from '@stencil/core';\n\nexport interface ResponseOutputProps {\n output?: string;\n isRunning: boolean;\n}\n\nexport const ResponseOutput: FunctionalComponent<ResponseOutputProps> = ({\n output,\n isRunning,\n}) => {\n return (\n <div class=\"response-output\">\n {output ? (\n <div class=\"response-output__content\">{output}</div>\n ) : (\n <div class=\"response-output__placeholder\">{isRunning ? 'Running...' : ''}</div>\n )}\n </div>\n );\n};\n\n"]}
@@ -1,6 +1,8 @@
1
+ import { GeminiAdapter } from "../services/models/gemini";
1
2
  export default function () {
2
3
  window.env = {
3
- API_KEY: '__GEMINI_API_KEY__'
4
+ API_KEY: '__GEMINI_API_KEY__',
4
5
  };
6
+ window.GeminiAdapter = GeminiAdapter;
5
7
  }
6
8
  //# sourceMappingURL=env.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"env.js","sourceRoot":"","sources":["../../src/global/env.ts"],"names":[],"mappings":"AAQA,MAAM,CAAC,OAAO;IACZ,MAAM,CAAC,GAAG,GAAG;QACX,OAAO,EAAE,oBAAoB;KAC9B,CAAC;AACJ,CAAC","sourcesContent":["declare global {\n interface Window {\n env: {\n API_KEY: string;\n };\n }\n}\n\nexport default function () {\n window.env = {\n API_KEY: '__GEMINI_API_KEY__'\n };\n}"]}
1
+ {"version":3,"file":"env.js","sourceRoot":"","sources":["../../src/global/env.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAW1D,MAAM,CAAC,OAAO;IACZ,MAAM,CAAC,GAAG,GAAG;QACX,OAAO,EAAE,oBAAoB;KAC9B,CAAC;IAEF,MAAM,CAAC,aAAa,GAAG,aAAa,CAAC;AACvC,CAAC","sourcesContent":["import { GeminiAdapter } from '../services/models/gemini';\n\ndeclare global {\n interface Window {\n env: {\n API_KEY: string;\n };\n GeminiAdapter: typeof GeminiAdapter;\n }\n}\n\nexport default function () {\n window.env = {\n API_KEY: '__GEMINI_API_KEY__',\n };\n\n window.GeminiAdapter = GeminiAdapter;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,8CAA8C,CAAC","sourcesContent":["export { LLMTestRunner } from './components/llm-test-runner/llm-test-runner';\nexport type { TestCase } from './components/llm-test-runner/llm-test-runner';\nexport type * from './components.d.ts';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,8CAA8C,CAAC","sourcesContent":["export { LLMTestRunner } from './components/llm-test-runner/llm-test-runner';\nexport type { TestCase, LLMRequestPayload } from './types/llm-test-runner';\nexport type * from './components.d.ts';\n"]}
@@ -0,0 +1,14 @@
1
+ export var EvaluationApproach;
2
+ (function (EvaluationApproach) {
3
+ EvaluationApproach["EXACT"] = "exact";
4
+ EvaluationApproach["SEMANTIC"] = "semantic";
5
+ EvaluationApproach["ROUGE_1"] = "rouge-1";
6
+ EvaluationApproach["ROUGE_L"] = "rouge-L";
7
+ EvaluationApproach["BLEU"] = "bleu";
8
+ })(EvaluationApproach || (EvaluationApproach = {}));
9
+ // Array of all evaluation approach values for UI components
10
+ export const EvaluationApproachValues = Object.values(EvaluationApproach);
11
+ export const DEFAULT_ROUGE_PASS_SCORE = 0.7;
12
+ export const DEFAULT_SEMANTIC_PASS_SCORE = 0.7;
13
+ export const DEFAULT_BLEU_PASS_SCORE = 0.7;
14
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/lib/evaluation/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,kBAMX;AAND,WAAY,kBAAkB;IAC5B,qCAAe,CAAA;IACf,2CAAqB,CAAA;IACrB,yCAAmB,CAAA;IACnB,yCAAmB,CAAA;IACnB,mCAAa,CAAA;AACf,CAAC,EANW,kBAAkB,KAAlB,kBAAkB,QAM7B;AAED,4DAA4D;AAC5D,MAAM,CAAC,MAAM,wBAAwB,GAAG,MAAM,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC;AAE1E,MAAM,CAAC,MAAM,wBAAwB,GAAG,GAAG,CAAC;AAC5C,MAAM,CAAC,MAAM,2BAA2B,GAAG,GAAG,CAAC;AAC/C,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAAG,CAAC","sourcesContent":["export enum EvaluationApproach {\n EXACT = 'exact',\n SEMANTIC = 'semantic',\n ROUGE_1 = 'rouge-1',\n ROUGE_L = 'rouge-L',\n BLEU = 'bleu',\n}\n\n// Array of all evaluation approach values for UI components\nexport const EvaluationApproachValues = Object.values(EvaluationApproach);\n\nexport const DEFAULT_ROUGE_PASS_SCORE = 0.7;\nexport const DEFAULT_SEMANTIC_PASS_SCORE = 0.7;\nexport const DEFAULT_BLEU_PASS_SCORE = 0.7;\n"]}