claude-code-workflow 7.2.27 → 7.2.29

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 (416) hide show
  1. package/.ccw/specs/architecture-constraints.md +5 -0
  2. package/.claude/skills/_shared/SKILL-DESIGN-SPEC.md +140 -0
  3. package/.claude/skills/investigate/SKILL.md +110 -0
  4. package/.claude/skills/investigate/phases/01-root-cause-investigation.md +132 -0
  5. package/.claude/skills/investigate/phases/02-pattern-analysis.md +126 -0
  6. package/.claude/skills/investigate/phases/03-hypothesis-testing.md +177 -0
  7. package/.claude/skills/investigate/phases/04-implementation.md +139 -0
  8. package/.claude/skills/investigate/phases/05-verification-report.md +153 -0
  9. package/.claude/skills/investigate/specs/debug-report-format.md +226 -0
  10. package/.claude/skills/investigate/specs/iron-law.md +101 -0
  11. package/.claude/skills/security-audit/SKILL.md +125 -0
  12. package/.claude/skills/security-audit/phases/01-supply-chain-scan.md +139 -0
  13. package/.claude/skills/security-audit/phases/02-owasp-review.md +156 -0
  14. package/.claude/skills/security-audit/phases/03-threat-modeling.md +180 -0
  15. package/.claude/skills/security-audit/phases/04-report-tracking.md +177 -0
  16. package/.claude/skills/security-audit/specs/owasp-checklist.md +442 -0
  17. package/.claude/skills/security-audit/specs/scoring-gates.md +141 -0
  18. package/.claude/skills/ship/SKILL.md +105 -0
  19. package/.claude/skills/ship/phases/01-preflight-checks.md +121 -0
  20. package/.claude/skills/ship/phases/02-code-review.md +137 -0
  21. package/.claude/skills/ship/phases/03-version-bump.md +171 -0
  22. package/.claude/skills/ship/phases/04-changelog-commit.md +167 -0
  23. package/.claude/skills/ship/phases/05-pr-creation.md +163 -0
  24. package/.claude/skills/skill-generator/templates/sequential-phase.md +10 -0
  25. package/.claude/skills/skill-generator/templates/skill-md.md +4 -0
  26. package/.claude/skills/team-interactive-craft/SKILL.md +127 -0
  27. package/.claude/skills/team-interactive-craft/roles/a11y-tester/role.md +159 -0
  28. package/.claude/skills/team-interactive-craft/roles/builder/role.md +216 -0
  29. package/.claude/skills/team-interactive-craft/roles/coordinator/commands/analyze.md +71 -0
  30. package/.claude/skills/team-interactive-craft/roles/coordinator/commands/dispatch.md +192 -0
  31. package/.claude/skills/team-interactive-craft/roles/coordinator/commands/monitor.md +183 -0
  32. package/.claude/skills/team-interactive-craft/roles/coordinator/role.md +166 -0
  33. package/.claude/skills/team-interactive-craft/roles/interaction-designer/role.md +144 -0
  34. package/.claude/skills/team-interactive-craft/roles/researcher/role.md +131 -0
  35. package/.claude/skills/team-interactive-craft/specs/interaction-patterns.md +362 -0
  36. package/.claude/skills/team-interactive-craft/specs/pipelines.md +85 -0
  37. package/.claude/skills/team-interactive-craft/specs/team-config.json +105 -0
  38. package/.claude/skills/team-interactive-craft/specs/vanilla-constraints.md +83 -0
  39. package/.claude/skills/team-motion-design/SKILL.md +129 -0
  40. package/.claude/skills/team-motion-design/roles/animator/role.md +194 -0
  41. package/.claude/skills/team-motion-design/roles/choreographer/role.md +164 -0
  42. package/.claude/skills/team-motion-design/roles/coordinator/commands/analyze.md +64 -0
  43. package/.claude/skills/team-motion-design/roles/coordinator/commands/dispatch.md +203 -0
  44. package/.claude/skills/team-motion-design/roles/coordinator/commands/monitor.md +184 -0
  45. package/.claude/skills/team-motion-design/roles/coordinator/role.md +167 -0
  46. package/.claude/skills/team-motion-design/roles/motion-researcher/role.md +115 -0
  47. package/.claude/skills/team-motion-design/roles/motion-tester/role.md +175 -0
  48. package/.claude/skills/team-motion-design/specs/gpu-constraints.md +114 -0
  49. package/.claude/skills/team-motion-design/specs/motion-tokens.md +128 -0
  50. package/.claude/skills/team-motion-design/specs/pipelines.md +74 -0
  51. package/.claude/skills/team-motion-design/specs/reduced-motion.md +129 -0
  52. package/.claude/skills/team-motion-design/specs/team-config.json +99 -0
  53. package/.claude/skills/team-ui-polish/SKILL.md +127 -0
  54. package/.claude/skills/team-ui-polish/roles/coordinator/commands/analyze.md +77 -0
  55. package/.claude/skills/team-ui-polish/roles/coordinator/commands/dispatch.md +194 -0
  56. package/.claude/skills/team-ui-polish/roles/coordinator/commands/monitor.md +180 -0
  57. package/.claude/skills/team-ui-polish/roles/coordinator/role.md +170 -0
  58. package/.claude/skills/team-ui-polish/roles/diagnostician/role.md +160 -0
  59. package/.claude/skills/team-ui-polish/roles/optimizer/role.md +225 -0
  60. package/.claude/skills/team-ui-polish/roles/scanner/role.md +356 -0
  61. package/.claude/skills/team-ui-polish/roles/verifier/role.md +142 -0
  62. package/.claude/skills/team-ui-polish/specs/anti-patterns.md +141 -0
  63. package/.claude/skills/team-ui-polish/specs/design-standards.md +356 -0
  64. package/.claude/skills/team-ui-polish/specs/fix-strategies.md +235 -0
  65. package/.claude/skills/team-ui-polish/specs/pipelines.md +81 -0
  66. package/.claude/skills/team-ui-polish/specs/scoring-guide.md +162 -0
  67. package/.claude/skills/team-ui-polish/specs/team-config.json +73 -0
  68. package/.claude/skills/team-uidesign/SKILL.md +6 -1
  69. package/.claude/skills/team-uidesign/roles/designer/role.md +28 -4
  70. package/.claude/skills/team-uidesign/roles/implementer/role.md +25 -3
  71. package/.claude/skills/team-uidesign/roles/researcher/role.md +21 -2
  72. package/.claude/skills/team-uidesign/roles/reviewer/role.md +19 -17
  73. package/.claude/skills/team-uidesign/specs/anti-patterns.md +211 -0
  74. package/.claude/skills/team-uidesign/specs/design-standards.md +329 -0
  75. package/.claude/skills/team-uidesign/specs/scoring-guide.md +114 -0
  76. package/.claude/skills/team-uidesign/specs/team-config.json +1 -1
  77. package/.claude/skills/team-uidesign/specs/ux-writing.md +86 -0
  78. package/.claude/skills/team-ux-improve/SKILL.md +3 -0
  79. package/.claude/skills/team-ux-improve/roles/designer/role.md +30 -0
  80. package/.claude/skills/team-ux-improve/roles/diagnoser/role.md +16 -1
  81. package/.claude/skills/team-ux-improve/roles/scanner/role.md +43 -1
  82. package/.claude/skills/team-ux-improve/specs/anti-patterns.md +103 -0
  83. package/.claude/skills/team-ux-improve/specs/design-standards.md +54 -0
  84. package/.claude/skills/team-ux-improve/specs/heuristics.md +88 -0
  85. package/.claude/skills/team-ux-improve/wisdom/anti-patterns/common-ux-pitfalls.md +40 -8
  86. package/.claude/skills/team-ux-improve/wisdom/patterns/state-management.md +32 -12
  87. package/.claude/skills/team-ux-improve/wisdom/patterns/ui-feedback.md +35 -11
  88. package/.claude/skills/team-ux-improve/wisdom/principles/general-ux.md +36 -9
  89. package/.claude/skills/team-visual-a11y/SKILL.md +143 -0
  90. package/.claude/skills/team-visual-a11y/roles/color-auditor/role.md +178 -0
  91. package/.claude/skills/team-visual-a11y/roles/coordinator/commands/analyze.md +72 -0
  92. package/.claude/skills/team-visual-a11y/roles/coordinator/commands/dispatch.md +250 -0
  93. package/.claude/skills/team-visual-a11y/roles/coordinator/commands/monitor.md +204 -0
  94. package/.claude/skills/team-visual-a11y/roles/coordinator/role.md +169 -0
  95. package/.claude/skills/team-visual-a11y/roles/fix-implementer/role.md +246 -0
  96. package/.claude/skills/team-visual-a11y/roles/focus-auditor/role.md +222 -0
  97. package/.claude/skills/team-visual-a11y/roles/remediation-planner/role.md +206 -0
  98. package/.claude/skills/team-visual-a11y/roles/typo-auditor/role.md +185 -0
  99. package/.claude/skills/team-visual-a11y/specs/focus-patterns.md +325 -0
  100. package/.claude/skills/team-visual-a11y/specs/oklch-standards.md +130 -0
  101. package/.claude/skills/team-visual-a11y/specs/pipelines.md +98 -0
  102. package/.claude/skills/team-visual-a11y/specs/team-config.json +109 -0
  103. package/.claude/skills/team-visual-a11y/specs/typography-scale.md +165 -0
  104. package/.claude/skills/team-visual-a11y/specs/wcag-matrix.md +133 -0
  105. package/.codex/skills/brainstorm/SKILL.md +3 -3
  106. package/.codex/skills/clean/SKILL.md +3 -3
  107. package/.codex/skills/investigate/agents/investigator.md +392 -0
  108. package/.codex/skills/investigate/orchestrator.md +362 -0
  109. package/.codex/skills/investigate/phases/01-root-cause-investigation.md +212 -0
  110. package/.codex/skills/investigate/phases/02-pattern-analysis.md +181 -0
  111. package/.codex/skills/investigate/phases/03-hypothesis-testing.md +214 -0
  112. package/.codex/skills/investigate/phases/04-implementation.md +195 -0
  113. package/.codex/skills/investigate/phases/05-verification-report.md +240 -0
  114. package/.codex/skills/issue-discover/SKILL.md +13 -13
  115. package/.codex/skills/issue-discover/phases/02-discover.md +4 -4
  116. package/.codex/skills/issue-discover/phases/03-discover-by-prompt.md +3 -3
  117. package/.codex/skills/parallel-dev-cycle/SKILL.md +4 -4
  118. package/.codex/skills/parallel-dev-cycle/phases/02-agent-execution.md +6 -6
  119. package/.codex/skills/parallel-dev-cycle/phases/03-result-aggregation.md +10 -10
  120. package/.codex/skills/review-cycle/SKILL.md +10 -10
  121. package/.codex/skills/review-cycle/phases/02-parallel-review.md +6 -6
  122. package/.codex/skills/review-cycle/phases/04-iterative-deep-dive.md +4 -4
  123. package/.codex/skills/review-cycle/phases/07-fix-parallel-planning.md +4 -4
  124. package/.codex/skills/review-cycle/phases/08-fix-execution.md +2 -2
  125. package/.codex/skills/roadmap-with-file/SKILL.md +14 -14
  126. package/.codex/skills/security-audit/agents/security-auditor.md +341 -0
  127. package/.codex/skills/security-audit/orchestrator.md +384 -0
  128. package/.codex/skills/security-audit/phases/01-supply-chain-scan.md +226 -0
  129. package/.codex/skills/security-audit/phases/02-owasp-review.md +232 -0
  130. package/.codex/skills/security-audit/phases/03-threat-modeling.md +249 -0
  131. package/.codex/skills/security-audit/phases/04-report-tracking.md +300 -0
  132. package/.codex/skills/ship/agents/ship-operator.md +318 -0
  133. package/.codex/skills/ship/orchestrator.md +426 -0
  134. package/.codex/skills/ship/phases/01-preflight-checks.md +198 -0
  135. package/.codex/skills/ship/phases/02-code-review.md +228 -0
  136. package/.codex/skills/ship/phases/03-version-bump.md +259 -0
  137. package/.codex/skills/ship/phases/04-changelog-commit.md +263 -0
  138. package/.codex/skills/ship/phases/05-pr-creation.md +280 -0
  139. package/.codex/skills/spec-generator/README.md +1 -1
  140. package/.codex/skills/spec-generator/SKILL.md +184 -88
  141. package/.codex/skills/spec-generator/phases/01-5-requirement-clarification.md +4 -7
  142. package/.codex/skills/spec-generator/phases/01-discovery.md +30 -11
  143. package/.codex/skills/spec-generator/phases/02-product-brief.md +2 -5
  144. package/.codex/skills/spec-generator/phases/03-requirements.md +4 -6
  145. package/.codex/skills/spec-generator/phases/04-architecture.md +4 -6
  146. package/.codex/skills/spec-generator/phases/05-epics-stories.md +4 -6
  147. package/.codex/skills/spec-generator/phases/06-5-auto-fix.md +4 -5
  148. package/.codex/skills/spec-generator/phases/06-readiness-check.md +8 -8
  149. package/.codex/skills/spec-generator/phases/07-issue-export.md +2 -2
  150. package/.codex/skills/spec-setup/SKILL.md +4 -4
  151. package/.codex/skills/team-interactive-craft/SKILL.md +220 -0
  152. package/.codex/skills/team-interactive-craft/roles/a11y-tester/role.md +159 -0
  153. package/.codex/skills/team-interactive-craft/roles/builder/role.md +216 -0
  154. package/.codex/skills/team-interactive-craft/roles/coordinator/commands/analyze.md +71 -0
  155. package/.codex/skills/team-interactive-craft/roles/coordinator/commands/dispatch.md +162 -0
  156. package/.codex/skills/team-interactive-craft/roles/coordinator/commands/monitor.md +233 -0
  157. package/.codex/skills/team-interactive-craft/roles/coordinator/role.md +209 -0
  158. package/.codex/skills/team-interactive-craft/roles/interaction-designer/role.md +144 -0
  159. package/.codex/skills/team-interactive-craft/roles/researcher/role.md +131 -0
  160. package/.codex/skills/team-interactive-craft/specs/interaction-patterns.md +362 -0
  161. package/.codex/skills/team-interactive-craft/specs/pipelines.md +85 -0
  162. package/.codex/skills/team-interactive-craft/specs/team-config.json +105 -0
  163. package/.codex/skills/team-interactive-craft/specs/vanilla-constraints.md +83 -0
  164. package/.codex/skills/team-motion-design/SKILL.md +222 -0
  165. package/.codex/skills/team-motion-design/roles/animator/role.md +194 -0
  166. package/.codex/skills/team-motion-design/roles/choreographer/role.md +164 -0
  167. package/.codex/skills/team-motion-design/roles/coordinator/commands/analyze.md +64 -0
  168. package/.codex/skills/team-motion-design/roles/coordinator/commands/dispatch.md +168 -0
  169. package/.codex/skills/team-motion-design/roles/coordinator/commands/monitor.md +242 -0
  170. package/.codex/skills/team-motion-design/roles/coordinator/role.md +210 -0
  171. package/.codex/skills/team-motion-design/roles/motion-researcher/role.md +115 -0
  172. package/.codex/skills/team-motion-design/roles/motion-tester/role.md +175 -0
  173. package/.codex/skills/team-motion-design/specs/gpu-constraints.md +114 -0
  174. package/.codex/skills/team-motion-design/specs/motion-tokens.md +128 -0
  175. package/.codex/skills/team-motion-design/specs/pipelines.md +74 -0
  176. package/.codex/skills/team-motion-design/specs/reduced-motion.md +129 -0
  177. package/.codex/skills/team-motion-design/specs/team-config.json +99 -0
  178. package/.codex/skills/team-ui-polish/SKILL.md +218 -0
  179. package/.codex/skills/team-ui-polish/roles/coordinator/commands/analyze.md +77 -0
  180. package/.codex/skills/team-ui-polish/roles/coordinator/commands/dispatch.md +167 -0
  181. package/.codex/skills/team-ui-polish/roles/coordinator/commands/monitor.md +230 -0
  182. package/.codex/skills/team-ui-polish/roles/coordinator/role.md +213 -0
  183. package/.codex/skills/team-ui-polish/roles/diagnostician/role.md +164 -0
  184. package/.codex/skills/team-ui-polish/roles/optimizer/role.md +229 -0
  185. package/.codex/skills/team-ui-polish/roles/scanner/role.md +360 -0
  186. package/.codex/skills/team-ui-polish/roles/verifier/role.md +142 -0
  187. package/.codex/skills/team-ui-polish/specs/anti-patterns.md +141 -0
  188. package/.codex/skills/team-ui-polish/specs/design-standards.md +356 -0
  189. package/.codex/skills/team-ui-polish/specs/fix-strategies.md +235 -0
  190. package/.codex/skills/team-ui-polish/specs/pipelines.md +81 -0
  191. package/.codex/skills/team-ui-polish/specs/scoring-guide.md +162 -0
  192. package/.codex/skills/team-ui-polish/specs/team-config.json +73 -0
  193. package/.codex/skills/team-visual-a11y/SKILL.md +319 -0
  194. package/.codex/skills/team-visual-a11y/roles/color-auditor/role.md +178 -0
  195. package/.codex/skills/team-visual-a11y/roles/coordinator/commands/analyze.md +72 -0
  196. package/.codex/skills/team-visual-a11y/roles/coordinator/commands/dispatch.md +188 -0
  197. package/.codex/skills/team-visual-a11y/roles/coordinator/commands/monitor.md +281 -0
  198. package/.codex/skills/team-visual-a11y/roles/coordinator/role.md +213 -0
  199. package/.codex/skills/team-visual-a11y/roles/fix-implementer/role.md +246 -0
  200. package/.codex/skills/team-visual-a11y/roles/focus-auditor/role.md +222 -0
  201. package/.codex/skills/team-visual-a11y/roles/remediation-planner/role.md +206 -0
  202. package/.codex/skills/team-visual-a11y/roles/typo-auditor/role.md +185 -0
  203. package/.codex/skills/team-visual-a11y/specs/focus-patterns.md +325 -0
  204. package/.codex/skills/team-visual-a11y/specs/oklch-standards.md +130 -0
  205. package/.codex/skills/team-visual-a11y/specs/pipelines.md +98 -0
  206. package/.codex/skills/team-visual-a11y/specs/team-config.json +109 -0
  207. package/.codex/skills/team-visual-a11y/specs/typography-scale.md +165 -0
  208. package/.codex/skills/team-visual-a11y/specs/wcag-matrix.md +133 -0
  209. package/.codex/skills/workflow-plan/SKILL.md +6 -6
  210. package/.codex/skills/workflow-tdd-plan/SKILL.md +5 -5
  211. package/.codex/skills/workflow-test-fix-cycle/SKILL.md +19 -19
  212. package/.codex/skills/workflow-test-fix-cycle/phases/01-test-fix-gen.md +5 -5
  213. package/.codex/skills/workflow-test-fix-cycle/phases/02-test-cycle-execute.md +5 -5
  214. package/README.md +8 -0
  215. package/ccw/dist/core/hooks/hook-templates.d.ts.map +1 -1
  216. package/ccw/dist/core/hooks/hook-templates.js +114 -1
  217. package/ccw/dist/core/hooks/hook-templates.js.map +1 -1
  218. package/ccw/dist/core/routes/cli-routes.d.ts.map +1 -1
  219. package/ccw/dist/core/routes/cli-routes.js +34 -0
  220. package/ccw/dist/core/routes/cli-routes.js.map +1 -1
  221. package/ccw/dist/core/routes/system-routes.js +2 -2
  222. package/ccw/dist/core/routes/system-routes.js.map +1 -1
  223. package/ccw/frontend/dist/assets/{AlertDialog-Bf1jdqax.js → AlertDialog-exlTDW81.js} +3 -3
  224. package/ccw/frontend/dist/assets/{AlertDialog-Bf1jdqax.js.map → AlertDialog-exlTDW81.js.map} +1 -1
  225. package/ccw/frontend/dist/assets/{AnalysisPage-C8niKdp4.js → AnalysisPage-cgV9LfAI.js} +2 -2
  226. package/ccw/frontend/dist/assets/{AnalysisPage-C8niKdp4.js.map → AnalysisPage-cgV9LfAI.js.map} +1 -1
  227. package/ccw/frontend/dist/assets/{ApiSettingsPage-BL2c3UNS.js → ApiSettingsPage-Dk5jJdWt.js} +2 -2
  228. package/ccw/frontend/dist/assets/{ApiSettingsPage-BL2c3UNS.js.map → ApiSettingsPage-Dk5jJdWt.js.map} +1 -1
  229. package/ccw/frontend/dist/assets/{CliModeToggle-BePBFynD.js → CliModeToggle-Be9xsPiv.js} +2 -2
  230. package/ccw/frontend/dist/assets/{CliModeToggle-BePBFynD.js.map → CliModeToggle-Be9xsPiv.js.map} +1 -1
  231. package/ccw/frontend/dist/assets/{CliSessionSharePage-7cYtX6FT.js → CliSessionSharePage-Bh9jBtPI.js} +2 -2
  232. package/ccw/frontend/dist/assets/{CliSessionSharePage-7cYtX6FT.js.map → CliSessionSharePage-Bh9jBtPI.js.map} +1 -1
  233. package/ccw/frontend/dist/assets/{CliViewerPage-CBwg1mPL.js → CliViewerPage-BrE-oyEq.js} +2 -2
  234. package/ccw/frontend/dist/assets/{CliViewerPage-CBwg1mPL.js.map → CliViewerPage-BrE-oyEq.js.map} +1 -1
  235. package/ccw/frontend/dist/assets/{CodexLensPage-Bt74xORP.js → CodexLensPage-Cd3nrC93.js} +2 -2
  236. package/ccw/frontend/dist/assets/{CodexLensPage-Bt74xORP.js.map → CodexLensPage-Cd3nrC93.js.map} +1 -1
  237. package/ccw/frontend/dist/assets/{Collapsible-Wrs87QT7.js → Collapsible-DXFl3VKF.js} +2 -2
  238. package/ccw/frontend/dist/assets/{Collapsible-Wrs87QT7.js.map → Collapsible-DXFl3VKF.js.map} +1 -1
  239. package/ccw/frontend/dist/assets/{CommandsManagerPage-ChQjmPWZ.js → CommandsManagerPage-IV8zpjgX.js} +2 -2
  240. package/ccw/frontend/dist/assets/{CommandsManagerPage-ChQjmPWZ.js.map → CommandsManagerPage-IV8zpjgX.js.map} +1 -1
  241. package/ccw/frontend/dist/assets/{DeepWikiPage-dEO5wi6X.js → DeepWikiPage-CpDxtmRX.js} +2 -2
  242. package/ccw/frontend/dist/assets/{DeepWikiPage-dEO5wi6X.js.map → DeepWikiPage-CpDxtmRX.js.map} +1 -1
  243. package/ccw/frontend/dist/assets/{EndpointsPage-4zq269xY.js → EndpointsPage-BchjWe7s.js} +2 -2
  244. package/ccw/frontend/dist/assets/{EndpointsPage-4zq269xY.js.map → EndpointsPage-BchjWe7s.js.map} +1 -1
  245. package/ccw/frontend/dist/assets/{ExplorerPage-B0YTENhA.js → ExplorerPage-CbWvaJ0y.js} +2 -2
  246. package/ccw/frontend/dist/assets/{ExplorerPage-B0YTENhA.js.map → ExplorerPage-CbWvaJ0y.js.map} +1 -1
  247. package/ccw/frontend/dist/assets/{FixSessionPage-CwGs6dhz.js → FixSessionPage-YMjVRiCk.js} +2 -2
  248. package/ccw/frontend/dist/assets/{FixSessionPage-CwGs6dhz.js.map → FixSessionPage-YMjVRiCk.js.map} +1 -1
  249. package/ccw/frontend/dist/assets/{FloatingFileBrowser-COZRBslc.js → FloatingFileBrowser-JW2ehYY_.js} +2 -2
  250. package/ccw/frontend/dist/assets/{FloatingFileBrowser-COZRBslc.js.map → FloatingFileBrowser-JW2ehYY_.js.map} +1 -1
  251. package/ccw/frontend/dist/assets/{FloatingPanel-DYvgQZRD.js → FloatingPanel-BtqzqDVq.js} +2 -2
  252. package/ccw/frontend/dist/assets/{FloatingPanel-DYvgQZRD.js.map → FloatingPanel-BtqzqDVq.js.map} +1 -1
  253. package/ccw/frontend/dist/assets/{GraphExplorerPage-ewMHQGem.js → GraphExplorerPage-BsJL_W4d.js} +3 -3
  254. package/ccw/frontend/dist/assets/{GraphExplorerPage-ewMHQGem.js.map → GraphExplorerPage-BsJL_W4d.js.map} +1 -1
  255. package/ccw/frontend/dist/assets/{HistoryPage-BMeR0PrK.js → HistoryPage-BuWpQ7k5.js} +2 -2
  256. package/ccw/frontend/dist/assets/{HistoryPage-BMeR0PrK.js.map → HistoryPage-BuWpQ7k5.js.map} +1 -1
  257. package/ccw/frontend/dist/assets/{HookManagerPage-DBW2LnRm.js → HookManagerPage-D0BtMIWy.js} +2 -2
  258. package/ccw/frontend/dist/assets/{HookManagerPage-DBW2LnRm.js.map → HookManagerPage-D0BtMIWy.js.map} +1 -1
  259. package/ccw/frontend/dist/assets/{InstallationsPage--pMj0QEH.js → InstallationsPage-C7dwsAKG.js} +2 -2
  260. package/ccw/frontend/dist/assets/{InstallationsPage--pMj0QEH.js.map → InstallationsPage-C7dwsAKG.js.map} +1 -1
  261. package/ccw/frontend/dist/assets/{IssueHubPage-C_QMpQSR.js → IssueHubPage-D0nCNaeB.js} +2 -2
  262. package/ccw/frontend/dist/assets/{IssueHubPage-C_QMpQSR.js.map → IssueHubPage-D0nCNaeB.js.map} +1 -1
  263. package/ccw/frontend/dist/assets/{LiteTasksPage-CSWFdQ2-.js → LiteTasksPage-B5c2Kb9r.js} +3 -3
  264. package/ccw/frontend/dist/assets/{LiteTasksPage-CSWFdQ2-.js.map → LiteTasksPage-B5c2Kb9r.js.map} +1 -1
  265. package/ccw/frontend/dist/assets/{McpManagerPage-Dvv8NtGy.js → McpManagerPage-C-S5CehM.js} +2 -2
  266. package/ccw/frontend/dist/assets/{McpManagerPage-Dvv8NtGy.js.map → McpManagerPage-C-S5CehM.js.map} +1 -1
  267. package/ccw/frontend/dist/assets/{MemoryPage-YO8WZzZO.js → MemoryPage-P_B0JVUQ.js} +2 -2
  268. package/ccw/frontend/dist/assets/{MemoryPage-YO8WZzZO.js.map → MemoryPage-P_B0JVUQ.js.map} +1 -1
  269. package/ccw/frontend/dist/assets/{NotFoundPage-quUJw0CD.js → NotFoundPage-S4Jn9LUE.js} +2 -2
  270. package/ccw/frontend/dist/assets/{NotFoundPage-quUJw0CD.js.map → NotFoundPage-S4Jn9LUE.js.map} +1 -1
  271. package/ccw/frontend/dist/assets/{OrchestratorPage-tuThWPID.js → OrchestratorPage-C2Zlr7AC.js} +2 -2
  272. package/ccw/frontend/dist/assets/{OrchestratorPage-tuThWPID.js.map → OrchestratorPage-C2Zlr7AC.js.map} +1 -1
  273. package/ccw/frontend/dist/assets/{ProjectOverviewPage-shTilwiT.js → ProjectOverviewPage-CMVfz8s5.js} +2 -2
  274. package/ccw/frontend/dist/assets/{ProjectOverviewPage-shTilwiT.js.map → ProjectOverviewPage-CMVfz8s5.js.map} +1 -1
  275. package/ccw/frontend/dist/assets/{PromptHistoryPage-6rQnsI8l.js → PromptHistoryPage-YEMjFARX.js} +3 -3
  276. package/ccw/frontend/dist/assets/{PromptHistoryPage-6rQnsI8l.js.map → PromptHistoryPage-YEMjFARX.js.map} +1 -1
  277. package/ccw/frontend/dist/assets/{ReviewSessionPage-JOmzjVbT.js → ReviewSessionPage-DnTm55nG.js} +2 -2
  278. package/ccw/frontend/dist/assets/{ReviewSessionPage-JOmzjVbT.js.map → ReviewSessionPage-DnTm55nG.js.map} +1 -1
  279. package/ccw/frontend/dist/assets/{RulesManagerPage-Cayfywqi.js → RulesManagerPage-CUwebtO2.js} +2 -2
  280. package/ccw/frontend/dist/assets/{RulesManagerPage-Cayfywqi.js.map → RulesManagerPage-CUwebtO2.js.map} +1 -1
  281. package/ccw/frontend/dist/assets/{SessionDetailPage-iMn0k84i.js → SessionDetailPage-0qyH1Z5P.js} +2 -2
  282. package/ccw/frontend/dist/assets/{SessionDetailPage-iMn0k84i.js.map → SessionDetailPage-0qyH1Z5P.js.map} +1 -1
  283. package/ccw/frontend/dist/assets/{SessionsPage-Ciqjy9kz.js → SessionsPage-BpgP4087.js} +2 -2
  284. package/ccw/frontend/dist/assets/{SessionsPage-Ciqjy9kz.js.map → SessionsPage-BpgP4087.js.map} +1 -1
  285. package/ccw/frontend/dist/assets/SettingsPage-C3SJajeT.js +150 -0
  286. package/ccw/frontend/dist/assets/SettingsPage-C3SJajeT.js.map +1 -0
  287. package/ccw/frontend/dist/assets/SkillsManagerPage-vD9PTsmy.js +7 -0
  288. package/ccw/frontend/dist/assets/SkillsManagerPage-vD9PTsmy.js.map +1 -0
  289. package/ccw/frontend/dist/assets/{SpecsSettingsPage-BpkJctzo.js → SpecsSettingsPage-DT-yTVkD.js} +4 -4
  290. package/ccw/frontend/dist/assets/{SpecsSettingsPage-BpkJctzo.js.map → SpecsSettingsPage-DT-yTVkD.js.map} +1 -1
  291. package/ccw/frontend/dist/assets/{Switch-BpB9h__9.js → Switch-CYSPdqWk.js} +2 -2
  292. package/ccw/frontend/dist/assets/{Switch-BpB9h__9.js.map → Switch-CYSPdqWk.js.map} +1 -1
  293. package/ccw/frontend/dist/assets/{TabsNavigation-BGsKy7DO.js → TabsNavigation-CPh6Zor1.js} +2 -2
  294. package/ccw/frontend/dist/assets/{TabsNavigation-BGsKy7DO.js.map → TabsNavigation-CPh6Zor1.js.map} +1 -1
  295. package/ccw/frontend/dist/assets/{TaskDrawer-bYIlbM0Q.js → TaskDrawer-Ds-8830B.js} +2 -2
  296. package/ccw/frontend/dist/assets/{TaskDrawer-bYIlbM0Q.js.map → TaskDrawer-Ds-8830B.js.map} +1 -1
  297. package/ccw/frontend/dist/assets/{TeamPage-CihtQ6LQ.js → TeamPage-CJODUxBk.js} +2 -2
  298. package/ccw/frontend/dist/assets/{TeamPage-CihtQ6LQ.js.map → TeamPage-CJODUxBk.js.map} +1 -1
  299. package/ccw/frontend/dist/assets/{TerminalDashboardPage-BDnNF_ud.js → TerminalDashboardPage-Cn3fGUuO.js} +3 -3
  300. package/ccw/frontend/dist/assets/{TerminalDashboardPage-BDnNF_ud.js.map → TerminalDashboardPage-Cn3fGUuO.js.map} +1 -1
  301. package/ccw/frontend/dist/assets/{archive-CQJ86bQp.js → archive-CjwVpw6k.js} +2 -2
  302. package/ccw/frontend/dist/assets/{archive-CQJ86bQp.js.map → archive-CjwVpw6k.js.map} +1 -1
  303. package/ccw/frontend/dist/assets/{archive-restore-BhTfDbPU.js → archive-restore-2vZa9Ic3.js} +2 -2
  304. package/ccw/frontend/dist/assets/{archive-restore-BhTfDbPU.js.map → archive-restore-2vZa9Ic3.js.map} +1 -1
  305. package/ccw/frontend/dist/assets/{arrow-right-eUAZnT9C.js → arrow-right-CUU5XDgT.js} +2 -2
  306. package/ccw/frontend/dist/assets/{arrow-right-eUAZnT9C.js.map → arrow-right-CUU5XDgT.js.map} +1 -1
  307. package/ccw/frontend/dist/assets/{bookmark-plus-ilF5-V-k.js → bookmark-plus-Cc3nKRZ5.js} +2 -2
  308. package/ccw/frontend/dist/assets/{bookmark-plus-ilF5-V-k.js.map → bookmark-plus-Cc3nKRZ5.js.map} +1 -1
  309. package/ccw/frontend/dist/assets/{bot-BLkaQscs.js → bot-BwpSRDUa.js} +2 -2
  310. package/ccw/frontend/dist/assets/{bot-BLkaQscs.js.map → bot-BwpSRDUa.js.map} +1 -1
  311. package/ccw/frontend/dist/assets/{braces-D9HdgsO6.js → braces-DBzUW1XC.js} +2 -2
  312. package/ccw/frontend/dist/assets/{braces-D9HdgsO6.js.map → braces-DBzUW1XC.js.map} +1 -1
  313. package/ccw/frontend/dist/assets/{circle-stop-C3ZF1okQ.js → circle-stop-CGNNsjvE.js} +2 -2
  314. package/ccw/frontend/dist/assets/{circle-stop-C3ZF1okQ.js.map → circle-stop-CGNNsjvE.js.map} +1 -1
  315. package/ccw/frontend/dist/assets/{cpu-B-QjaSjm.js → cpu-D27G86Ul.js} +2 -2
  316. package/ccw/frontend/dist/assets/{cpu-B-QjaSjm.js.map → cpu-D27G86Ul.js.map} +1 -1
  317. package/ccw/frontend/dist/assets/{ellipsis-vertical-CbNlw2gS.js → ellipsis-vertical-C1Ij47Yz.js} +2 -2
  318. package/ccw/frontend/dist/assets/{ellipsis-vertical-CbNlw2gS.js.map → ellipsis-vertical-C1Ij47Yz.js.map} +1 -1
  319. package/ccw/frontend/dist/assets/{eye-yAy69Cnn.js → eye-C6MOB7Au.js} +2 -2
  320. package/ccw/frontend/dist/assets/{eye-yAy69Cnn.js.map → eye-C6MOB7Au.js.map} +1 -1
  321. package/ccw/frontend/dist/assets/{eye-off-D5uzLZyP.js → eye-off-BxfBlZ26.js} +2 -2
  322. package/ccw/frontend/dist/assets/{eye-off-D5uzLZyP.js.map → eye-off-BxfBlZ26.js.map} +1 -1
  323. package/ccw/frontend/dist/assets/{file-json-rwo1NowL.js → file-json-NI237wA-.js} +2 -2
  324. package/ccw/frontend/dist/assets/{file-json-rwo1NowL.js.map → file-json-NI237wA-.js.map} +1 -1
  325. package/ccw/frontend/dist/assets/{file-text-DRkrjie9.js → file-text-Byn2_2v6.js} +2 -2
  326. package/ccw/frontend/dist/assets/{file-text-DRkrjie9.js.map → file-text-Byn2_2v6.js.map} +1 -1
  327. package/ccw/frontend/dist/assets/{filter-BOe-OTu1.js → filter-D-7PhZjx.js} +2 -2
  328. package/ccw/frontend/dist/assets/{filter-BOe-OTu1.js.map → filter-D-7PhZjx.js.map} +1 -1
  329. package/ccw/frontend/dist/assets/{folder-BaWZWn_r.js → folder-BoAsK_FL.js} +2 -2
  330. package/ccw/frontend/dist/assets/{folder-BaWZWn_r.js.map → folder-BoAsK_FL.js.map} +1 -1
  331. package/ccw/frontend/dist/assets/{gauge-kazFexTr.js → gauge-DCSxJIS4.js} +2 -2
  332. package/ccw/frontend/dist/assets/{gauge-kazFexTr.js.map → gauge-DCSxJIS4.js.map} +1 -1
  333. package/ccw/frontend/dist/assets/{globe-BuHeEjxd.js → globe-CHS3prza.js} +2 -2
  334. package/ccw/frontend/dist/assets/{globe-BuHeEjxd.js.map → globe-CHS3prza.js.map} +1 -1
  335. package/ccw/frontend/dist/assets/{grid-3x3-DbhuUu4V.js → grid-3x3-D7K35U7S.js} +2 -2
  336. package/ccw/frontend/dist/assets/{grid-3x3-DbhuUu4V.js.map → grid-3x3-D7K35U7S.js.map} +1 -1
  337. package/ccw/frontend/dist/assets/{hard-drive-AoLGL0z4.js → hard-drive-eq9xE07G.js} +2 -2
  338. package/ccw/frontend/dist/assets/{hard-drive-AoLGL0z4.js.map → hard-drive-eq9xE07G.js.map} +1 -1
  339. package/ccw/frontend/dist/assets/{hash-Dpo1exMB.js → hash-C1DMpBua.js} +2 -2
  340. package/ccw/frontend/dist/assets/{hash-Dpo1exMB.js.map → hash-C1DMpBua.js.map} +1 -1
  341. package/ccw/frontend/dist/assets/{history-ujQnmMC9.js → history-Di5SBCY-.js} +2 -2
  342. package/ccw/frontend/dist/assets/{history-ujQnmMC9.js.map → history-Di5SBCY-.js.map} +1 -1
  343. package/ccw/frontend/dist/assets/{index-C_Yf5fZ4.js → index--_R7COnA.js} +2 -2
  344. package/ccw/frontend/dist/assets/{index-C_Yf5fZ4.js.map → index--_R7COnA.js.map} +1 -1
  345. package/ccw/frontend/dist/assets/{index-Dff4bg3u.js → index-BUol9HDD.js} +3 -3
  346. package/ccw/frontend/dist/assets/{index-Dff4bg3u.js.map → index-BUol9HDD.js.map} +1 -1
  347. package/ccw/frontend/dist/assets/{index-B76AGix5.js → index-CT9oykfw.js} +2 -2
  348. package/ccw/frontend/dist/assets/{index-B76AGix5.js.map → index-CT9oykfw.js.map} +1 -1
  349. package/ccw/frontend/dist/assets/{index-CxzXz6o1.js → index-Ddwvf87H.js} +2 -2
  350. package/ccw/frontend/dist/assets/{index-CxzXz6o1.js.map → index-Ddwvf87H.js.map} +1 -1
  351. package/ccw/frontend/dist/assets/{layout-grid-CBdE4K8h.js → layout-grid-LiX0qZbN.js} +2 -2
  352. package/ccw/frontend/dist/assets/{layout-grid-CBdE4K8h.js.map → layout-grid-LiX0qZbN.js.map} +1 -1
  353. package/ccw/frontend/dist/assets/{lightbulb-B9K6ZgRp.js → lightbulb-CL3DVEwb.js} +2 -2
  354. package/ccw/frontend/dist/assets/{lightbulb-B9K6ZgRp.js.map → lightbulb-CL3DVEwb.js.map} +1 -1
  355. package/ccw/frontend/dist/assets/{link-2-Oea4xHJl.js → link-2-CC5cFeq6.js} +2 -2
  356. package/ccw/frontend/dist/assets/{link-2-Oea4xHJl.js.map → link-2-CC5cFeq6.js.map} +1 -1
  357. package/ccw/frontend/dist/assets/{link-5yXdZBch.js → link-ngFQ9bs0.js} +2 -2
  358. package/ccw/frontend/dist/assets/{link-5yXdZBch.js.map → link-ngFQ9bs0.js.map} +1 -1
  359. package/ccw/frontend/dist/assets/{list-9lHhC_U_.js → list-BEU6I0KK.js} +2 -2
  360. package/ccw/frontend/dist/assets/{list-9lHhC_U_.js.map → list-BEU6I0KK.js.map} +1 -1
  361. package/ccw/frontend/dist/assets/{map-pin-B6Io5kmB.js → map-pin-BWZdLA6y.js} +2 -2
  362. package/ccw/frontend/dist/assets/{map-pin-B6Io5kmB.js.map → map-pin-BWZdLA6y.js.map} +1 -1
  363. package/ccw/frontend/dist/assets/{messages-square-BT000aD3.js → messages-square-K6_Chm7n.js} +2 -2
  364. package/ccw/frontend/dist/assets/{messages-square-BT000aD3.js.map → messages-square-K6_Chm7n.js.map} +1 -1
  365. package/ccw/frontend/dist/assets/{minimize-2-DO-zbT3a.js → minimize-2-CWkphauf.js} +2 -2
  366. package/ccw/frontend/dist/assets/{minimize-2-DO-zbT3a.js.map → minimize-2-CWkphauf.js.map} +1 -1
  367. package/ccw/frontend/dist/assets/{package-BjOw1ldU.js → package-DrNgkamn.js} +2 -2
  368. package/ccw/frontend/dist/assets/{package-BjOw1ldU.js.map → package-DrNgkamn.js.map} +1 -1
  369. package/ccw/frontend/dist/assets/{plug-9dAARpE1.js → plug-CMo3sw5_.js} +2 -2
  370. package/ccw/frontend/dist/assets/{plug-9dAARpE1.js.map → plug-CMo3sw5_.js.map} +1 -1
  371. package/ccw/frontend/dist/assets/{power-K2S39x7f.js → power-DppNTW5e.js} +2 -2
  372. package/ccw/frontend/dist/assets/{power-K2S39x7f.js.map → power-DppNTW5e.js.map} +1 -1
  373. package/ccw/frontend/dist/assets/{save-D9-CoT3x.js → save-CD8aPMbZ.js} +2 -2
  374. package/ccw/frontend/dist/assets/{save-D9-CoT3x.js.map → save-CD8aPMbZ.js.map} +1 -1
  375. package/ccw/frontend/dist/assets/{send-Bunw9NtC.js → send-B4z90fQD.js} +2 -2
  376. package/ccw/frontend/dist/assets/{send-Bunw9NtC.js.map → send-B4z90fQD.js.map} +1 -1
  377. package/ccw/frontend/dist/assets/{settings-2-osl4EXFf.js → settings-2-CAKRU_QC.js} +2 -2
  378. package/ccw/frontend/dist/assets/{settings-2-osl4EXFf.js.map → settings-2-CAKRU_QC.js.map} +1 -1
  379. package/ccw/frontend/dist/assets/{square-check-big-Dl5gYkjR.js → square-check-big-KhI3HrzX.js} +2 -2
  380. package/ccw/frontend/dist/assets/{square-check-big-Dl5gYkjR.js.map → square-check-big-KhI3HrzX.js.map} +1 -1
  381. package/ccw/frontend/dist/assets/{square-pen-Bue1chJR.js → square-pen-BtdGIpuq.js} +2 -2
  382. package/ccw/frontend/dist/assets/{square-pen-Bue1chJR.js.map → square-pen-BtdGIpuq.js.map} +1 -1
  383. package/ccw/frontend/dist/assets/{star-Bk7EC7FB.js → star-ZoBUkXoD.js} +2 -2
  384. package/ccw/frontend/dist/assets/{star-Bk7EC7FB.js.map → star-ZoBUkXoD.js.map} +1 -1
  385. package/ccw/frontend/dist/assets/{style-BbREPmRj.js → style-CltxQP-P.js} +2 -2
  386. package/ccw/frontend/dist/assets/{style-BbREPmRj.js.map → style-CltxQP-P.js.map} +1 -1
  387. package/ccw/frontend/dist/assets/{target-CElrCVhR.js → target-C32OUSGf.js} +2 -2
  388. package/ccw/frontend/dist/assets/{target-CElrCVhR.js.map → target-C32OUSGf.js.map} +1 -1
  389. package/ccw/frontend/dist/assets/{test-tube-wciJaoas.js → test-tube-0IxoyAVZ.js} +2 -2
  390. package/ccw/frontend/dist/assets/{test-tube-wciJaoas.js.map → test-tube-0IxoyAVZ.js.map} +1 -1
  391. package/ccw/frontend/dist/assets/{upload-BD1F07wG.js → upload-4eKCkyBn.js} +2 -2
  392. package/ccw/frontend/dist/assets/{upload-BD1F07wG.js.map → upload-4eKCkyBn.js.map} +1 -1
  393. package/ccw/frontend/dist/assets/{useApiSettings-D23HVEt8.js → useApiSettings-zLTUWqhi.js} +2 -2
  394. package/ccw/frontend/dist/assets/{useApiSettings-D23HVEt8.js.map → useApiSettings-zLTUWqhi.js.map} +1 -1
  395. package/ccw/frontend/dist/assets/{useCli-BGDd_lXD.js → useCli-BtN2vpOX.js} +2 -2
  396. package/ccw/frontend/dist/assets/{useCli-BGDd_lXD.js.map → useCli-BtN2vpOX.js.map} +1 -1
  397. package/ccw/frontend/dist/assets/{useCommands-B-m_HxPB.js → useCommands-_spj49qL.js} +2 -2
  398. package/ccw/frontend/dist/assets/{useCommands-B-m_HxPB.js.map → useCommands-_spj49qL.js.map} +1 -1
  399. package/ccw/frontend/dist/assets/{useDebounce-Z18-PHZr.js → useDebounce-Bm9KFZvd.js} +2 -2
  400. package/ccw/frontend/dist/assets/{useDebounce-Z18-PHZr.js.map → useDebounce-Bm9KFZvd.js.map} +1 -1
  401. package/ccw/frontend/dist/assets/{useFileExplorer-D4gPp-LB.js → useFileExplorer-DOmpm6v9.js} +2 -2
  402. package/ccw/frontend/dist/assets/{useFileExplorer-D4gPp-LB.js.map → useFileExplorer-DOmpm6v9.js.map} +1 -1
  403. package/ccw/frontend/dist/assets/{useLocale-DJ62jjFa.js → useLocale-D2rj4rea.js} +2 -2
  404. package/ccw/frontend/dist/assets/{useLocale-DJ62jjFa.js.map → useLocale-D2rj4rea.js.map} +1 -1
  405. package/ccw/frontend/dist/assets/{useSkills-B8NPs9__.js → useSkills-OskEpomF.js} +3 -3
  406. package/ccw/frontend/dist/assets/{useSkills-B8NPs9__.js.map → useSkills-OskEpomF.js.map} +1 -1
  407. package/ccw/frontend/dist/assets/{useSystemSettings-CVi7nKGJ.js → useSystemSettings-BjMgsNSF.js} +2 -2
  408. package/ccw/frontend/dist/assets/{useSystemSettings-CVi7nKGJ.js.map → useSystemSettings-BjMgsNSF.js.map} +1 -1
  409. package/ccw/frontend/dist/assets/{wand-sparkles-CLjPiU5w.js → wand-sparkles-CLhyYWa7.js} +2 -2
  410. package/ccw/frontend/dist/assets/{wand-sparkles-CLjPiU5w.js.map → wand-sparkles-CLhyYWa7.js.map} +1 -1
  411. package/ccw/frontend/dist/index.html +1 -1
  412. package/package.json +105 -105
  413. package/ccw/frontend/dist/assets/SettingsPage-BPDbXPSM.js +0 -150
  414. package/ccw/frontend/dist/assets/SettingsPage-BPDbXPSM.js.map +0 -1
  415. package/ccw/frontend/dist/assets/SkillsManagerPage-D3LzbpJY.js +0 -7
  416. package/ccw/frontend/dist/assets/SkillsManagerPage-D3LzbpJY.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import{O as ne,j as e,C as oe,a as ie,c as u,dO as as,bK as Te,u as S,B as z,r as P,ai as Fe,bf as qe,i as ns,ak as os,l as Le,e as C,am as is,T as xe,cy as ls,ap as cs,aj as ds,U as R,N as ue,R as Ae,aw as Qe,aV as ms,aF as Z,a9 as $,aa as B,ab as he,aC as h,aH as le,dP as ps,dQ as us,dR as xs,dS as hs,dT as gs,dU as fs,dV as js,X as E,aQ as bs,a0 as He,m as ys,b as Ns,I as vs,D as ws,d as Cs,f as Ds,v as Ne,h as se,g as X,aU as ks,x as ve,y as we,z as Ce,A as De,E as ke,G as Pe,dW as Ps}from"./index-Dff4bg3u.js";import{H as Ss}from"./hash-Dpo1exMB.js";import{S as Is}from"./star-Bk7EC7FB.js";import{L as ce}from"./lightbulb-B9K6ZgRp.js";import{W as $e}from"./wand-sparkles-CLjPiU5w.js";import{C as Be}from"./cpu-B-QjaSjm.js";import{B as Oe}from"./bot-BLkaQscs.js";import{F as Ms}from"./file-text-DRkrjie9.js";import{H as zs}from"./history-ujQnmMC9.js";import{F as Ts}from"./filter-BOe-OTu1.js";/**
1
+ import{O as ne,j as e,C as oe,a as ie,c as u,dP as as,bL as Te,u as S,B as z,r as P,ai as Fe,bf as qe,i as ns,ak as os,l as Le,e as C,am as is,T as xe,cz as ls,ap as cs,aj as ds,U as R,N as ue,R as Ae,aw as Qe,aV as ms,aF as Z,a9 as $,aa as B,ab as he,aC as h,aH as le,dQ as ps,dR as us,dS as xs,dT as hs,dU as gs,dV as fs,dW as js,X as E,aQ as bs,a0 as He,m as ys,b as Ns,I as vs,D as ws,d as Cs,f as Ds,v as Ne,h as se,g as X,aU as ks,x as ve,y as we,z as Ce,A as De,E as ke,G as Pe,dX as Ps}from"./index-BUol9HDD.js";import{H as Ss}from"./hash-C1DMpBua.js";import{S as Is}from"./star-ZoBUkXoD.js";import{L as ce}from"./lightbulb-CL3DVEwb.js";import{W as $e}from"./wand-sparkles-CLhyYWa7.js";import{C as Be}from"./cpu-D27G86Ul.js";import{B as Oe}from"./bot-BwpSRDUa.js";import{F as Ms}from"./file-text-Byn2_2v6.js";import{H as zs}from"./history-Di5SBCY-.js";import{F as Ts}from"./filter-D-7PhZjx.js";/**
2
2
  * @license lucide-react v0.460.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -18,5 +18,5 @@ import{O as ne,j as e,C as oe,a as ie,c as u,dO as as,bK as Te,u as S,B as z,r a
18
18
  *
19
19
  * This source code is licensed under the ISC license.
20
20
  * See the LICENSE file in the root directory of this source tree.
21
- */const As=ne("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]),Qs=Te("transition-all duration-200 hover:shadow-md hover-glow",{variants:{variant:{default:"border-border",primary:"border-primary/30 bg-primary/5",success:"border-success/30 bg-success/5",warning:"border-warning/30 bg-warning/5",danger:"border-destructive/30 bg-destructive/5",info:"border-info/30 bg-info/5"}},defaultVariants:{variant:"default"}}),Hs=Te("flex h-10 w-10 items-center justify-center rounded-lg",{variants:{variant:{default:"bg-muted text-muted-foreground",primary:"bg-primary/10 text-primary",success:"bg-success/10 text-success",warning:"bg-warning/10 text-warning",danger:"bg-destructive/10 text-destructive",info:"bg-info/10 text-info"}},defaultVariants:{variant:"default"}});function te({className:s,variant:t,title:n,value:a,icon:i,trend:r,trendValue:o,isLoading:d=!1,description:l,sparklineData:j,showSparkline:m=!1,...y}){const N=r==="up"?As:r==="down"?Ls:qs,D=r==="up"?"text-success":r==="down"?"text-destructive":"text-muted-foreground";return e.jsx(oe,{className:u(Qs({variant:t}),s),...y,children:e.jsx(ie,{className:"p-4",children:e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-sm font-medium text-muted-foreground truncate",children:n}),e.jsxs("div",{className:"mt-2 flex items-baseline gap-2",children:[d?e.jsx("div",{className:"h-8 w-16 animate-pulse rounded bg-muted"}):e.jsx("p",{className:"text-2xl font-semibold text-card-foreground",children:typeof a=="number"?a.toLocaleString():a}),r&&o&&!d&&e.jsxs("span",{className:u("flex items-center text-xs font-medium",D),children:[e.jsx(N,{className:"mr-0.5 h-3 w-3"}),o]})]}),l&&e.jsx("p",{className:"mt-1 text-xs text-muted-foreground truncate",children:l}),m&&j&&j.length>0&&e.jsx("div",{className:"mt-3 -mx-2",children:e.jsx(as,{data:j,height:40,strokeWidth:2})})]}),i&&e.jsx("div",{className:u(Hs({variant:t})),children:e.jsx(i,{className:"h-5 w-5"})})]})})})}function re({className:s}){return e.jsx(oe,{className:u("animate-pulse",s),children:e.jsx(ie,{className:"p-4",children:e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{className:"flex-1",children:[e.jsx("div",{className:"h-4 w-20 rounded bg-muted"}),e.jsx("div",{className:"mt-3 h-8 w-16 rounded bg-muted"})]}),e.jsx("div",{className:"h-10 w-10 rounded-lg bg-muted"})]})})})}function $s(s){return s==null?"none":s>=80?"high":s>=60?"medium":"low"}function Bs(s){switch(s){case"high":return"success";case"medium":return"warning";case"low":return"secondary";default:return"outline"}}function Os({qualityScore:s,className:t}){const{formatMessage:n}=S(),a=$s(s),i=Bs(a),r=`prompts.quality.${a}`,o=n({id:r});return a==="none"?null:e.jsxs(z,{variant:i,className:t,children:[s!==void 0&&`${s} `,o]})}function Ks(s){return new Date(s).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function _s(s){return s>=1e3?`${(s/1e3).toFixed(1)}k chars`:`${s} chars`}function Es({prompt:s,onDelete:t,className:n,actionsDisabled:a=!1,defaultExpanded:i=!1,selected:r=!1,onSelectChange:o,selectionMode:d=!1}){const{formatMessage:l}=S(),[j,m]=P.useState(i),[y,N]=P.useState(!1),D=async v=>{v.stopPropagation();try{await navigator.clipboard.writeText(s.content),N(!0),setTimeout(()=>N(!1),2e3)}catch{console.error("Failed to copy prompt")}},I=v=>{v.stopPropagation(),t==null||t(s.id)},F=()=>{m(v=>!v)},k=v=>{o==null||o(s.id,v)},T=v=>{d&&v.target.closest(".prompt-card-checkbox")||d&&k(!r)};return e.jsxs(oe,{className:u("transition-all duration-200",r&&"ring-2 ring-primary",d&&"cursor-pointer",n),onClick:T,children:[e.jsxs(Fe,{className:"p-4",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[d&&e.jsx("div",{className:"prompt-card-checkbox",children:e.jsx(qe,{checked:r,onCheckedChange:k,className:"mt-1"})}),e.jsxs("div",{className:u("flex-1 min-w-0",!d&&"ml-0"),children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:s.title||l({id:"prompts.card.untitled"})}),s.category&&e.jsx(z,{variant:"secondary",className:"text-xs",children:s.category}),e.jsx(Os,{qualityScore:s.quality_score,className:"text-xs"})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-3 text-xs text-muted-foreground",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(ns,{className:"h-3 w-3"}),Ks(s.createdAt)]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(os,{className:"h-3 w-3"}),_s(s.content.length)]}),s.useCount!==void 0&&s.useCount>0&&e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(Le,{className:"h-3 w-3"}),l({id:"prompts.card.used"},{count:s.useCount})]})]}),s.tags&&s.tags.length>0&&e.jsxs("div",{className:"flex flex-wrap gap-1 mt-2",children:[s.tags.slice(0,3).map(v=>e.jsx(z,{variant:"outline",className:"text-xs",children:v},v)),s.tags.length>3&&e.jsxs(z,{variant:"outline",className:"text-xs",children:["+",s.tags.length-3]})]})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsxs(C,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:D,disabled:a,title:l({id:"prompts.actions.copy"}),children:[e.jsx(is,{className:"h-4 w-4"}),e.jsx("span",{className:"sr-only",children:l({id:"prompts.actions.copy"})})]}),e.jsxs(C,{variant:"ghost",size:"icon",className:"h-8 w-8 text-destructive hover:text-destructive",onClick:I,disabled:a,title:l({id:"prompts.actions.delete"}),children:[e.jsx(xe,{className:"h-4 w-4"}),e.jsx("span",{className:"sr-only",children:l({id:"prompts.actions.delete"})})]}),e.jsxs(C,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:F,title:l(j?{id:"prompts.actions.collapse"}:{id:"prompts.actions.expand"}),children:[j?e.jsx(ls,{className:"h-4 w-4"}):e.jsx(cs,{className:"h-4 w-4"}),e.jsx("span",{className:"sr-only",children:j?"Collapse":"Expand"})]})]})]}),y&&e.jsx("p",{className:"text-xs text-success mt-2",children:l({id:"prompts.actions.copied"})})]}),j&&e.jsx(ie,{className:"px-4 pb-4 pt-0",children:e.jsx("div",{className:"rounded-lg bg-muted/50 p-3",children:e.jsx("pre",{className:"text-sm whitespace-pre-wrap break-words text-foreground",children:s.content})})})]})}const ae={gemini:{label:"Gemini",color:"text-blue-500",bgColor:"bg-blue-500/10"},qwen:{label:"Qwen",color:"text-purple-500",bgColor:"bg-purple-500/10"},codex:{label:"Codex",color:"text-green-500",bgColor:"bg-green-500/10"}};function Rs({insight:s}){const{formatMessage:t}=S(),a={suggestion:{icon:ce,variant:"info",color:"text-blue-500"},optimization:{icon:R,variant:"success",color:"text-green-500"},warning:{icon:Qe,variant:"warning",color:"text-orange-500"}}[s.type],i=a.icon;return e.jsxs("div",{className:"flex items-start gap-3 p-3 rounded-lg bg-muted/50",children:[e.jsx("div",{className:u("flex-shrink-0",a.color),children:e.jsx(i,{className:"h-4 w-4"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-sm text-foreground",children:s.content}),e.jsx("div",{className:"flex items-center gap-2 mt-1",children:e.jsxs(z,{variant:"outline",className:"text-xs",children:[Math.round(s.confidence*100),"% ",t({id:"prompts.insights.confidence"})]})})]})]})}function Vs({pattern:s}){return e.jsxs("div",{className:"flex items-start gap-3 p-3 rounded-lg bg-muted/50",children:[e.jsx("div",{className:"flex-shrink-0 text-purple-500",children:e.jsx($e,{className:"h-4 w-4"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-sm font-medium text-foreground",children:s.name}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:s.description}),s.example&&e.jsx("code",{className:"block mt-2 text-xs bg-background rounded p-2 overflow-x-auto",children:s.example}),s.severity&&e.jsx(z,{variant:s.severity==="error"?"destructive":s.severity==="warning"?"warning":"secondary",className:"mt-2 text-xs",children:s.severity})]})]})}function Us({suggestion:s}){const{formatMessage:t}=S(),a={refactor:{color:"text-blue-500",label:t({id:"prompts.suggestions.types.refactor"})},optimize:{color:"text-green-500",label:t({id:"prompts.suggestions.types.optimize"})},fix:{color:"text-orange-500",label:t({id:"prompts.suggestions.types.fix"})},document:{color:"text-purple-500",label:t({id:"prompts.suggestions.types.document"})}}[s.type];return e.jsxs("div",{className:"flex items-start gap-3 p-3 rounded-lg bg-muted/50",children:[e.jsx("div",{className:u("flex-shrink-0",a.color),children:e.jsx(ce,{className:"h-4 w-4"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("p",{className:"text-sm font-medium text-foreground",children:s.title}),e.jsx(z,{variant:"outline",className:"text-xs",children:a.label})]}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:s.description}),s.code&&e.jsx("code",{className:"block mt-2 text-xs bg-background rounded p-2 overflow-x-auto",children:s.code}),s.effort&&e.jsxs(z,{variant:"secondary",className:"mt-2 text-xs",children:[t({id:"prompts.suggestions.effort"}),": ",s.effort]})]})]})}function Gs({insights:s=[],patterns:t=[],suggestions:n=[],selectedTool:a,onToolChange:i,onAnalyze:r,isAnalyzing:o=!1,className:d}){const{formatMessage:l}=S(),j=s.length>0||t.length>0||n.length>0;return e.jsxs(oe,{className:u("flex flex-col h-full",d),children:[e.jsxs(Fe,{className:"pb-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs(ds,{className:"text-lg flex items-center gap-2",children:[e.jsx(R,{className:"h-5 w-5 text-primary"}),l({id:"prompts.insights.title"})]}),e.jsxs(C,{variant:"outline",size:"sm",onClick:()=>r(),disabled:o,className:"gap-2",children:[o?e.jsx(ue,{className:"h-4 w-4 animate-spin"}):e.jsx(Ae,{className:"h-4 w-4"}),l({id:"prompts.insights.analyze"})]})]}),e.jsxs("div",{className:"flex items-center gap-2 mt-3",children:[e.jsxs("span",{className:"text-sm text-muted-foreground",children:[l({id:"prompts.insights.selectTool"}),":"]}),e.jsx("div",{className:"flex gap-1",children:Object.keys(ae).map(m=>e.jsx("button",{onClick:()=>i(m),className:u("px-3 py-1.5 rounded-md text-sm font-medium transition-colors",a===m?u(ae[m].bgColor,ae[m].color):"bg-muted text-muted-foreground hover:bg-muted/80"),children:ae[m].label},m))})]})]}),e.jsx(ie,{className:"flex-1 overflow-y-auto",children:!j&&!o?e.jsxs("div",{className:"flex flex-col items-center justify-center py-12 px-4 text-center",children:[e.jsx(R,{className:"h-12 w-12 text-muted-foreground/50 mb-4"}),e.jsx("h3",{className:"text-sm font-medium text-foreground mb-1",children:l({id:"prompts.insights.empty.title"})}),e.jsx("p",{className:"text-xs text-muted-foreground max-w-sm",children:l({id:"prompts.insights.empty.message"})})]}):e.jsxs("div",{className:"space-y-4",children:[s.length>0&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-sm font-medium text-foreground mb-2 flex items-center gap-2",children:[e.jsx(ce,{className:"h-4 w-4"}),l({id:"prompts.insights.sections.insights"})]}),e.jsx("div",{className:"space-y-2",children:s.map(m=>e.jsx(Rs,{insight:m},m.id))})]}),t.length>0&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-sm font-medium text-foreground mb-2 flex items-center gap-2",children:[e.jsx($e,{className:"h-4 w-4"}),l({id:"prompts.insights.sections.patterns"})]}),e.jsx("div",{className:"space-y-2",children:t.map(m=>e.jsx(Vs,{pattern:m},m.id))})]}),n.length>0&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-sm font-medium text-foreground mb-2 flex items-center gap-2",children:[e.jsx(R,{className:"h-4 w-4"}),l({id:"prompts.insights.sections.suggestions"})]}),e.jsx("div",{className:"space-y-2",children:n.map(m=>e.jsx(Us,{suggestion:m},m.id))})]}),o&&e.jsxs("div",{className:"flex items-center justify-center py-8",children:[e.jsx(ue,{className:"h-6 w-6 animate-spin text-muted-foreground"}),e.jsx("span",{className:"ml-2 text-sm text-muted-foreground",children:l({id:"prompts.insights.analyzing"})})]})]})})]})}function Ws({totalCount:s,avgLength:t,topIntent:n,avgQualityScore:a,qualityDistribution:i,isLoading:r=!1}){const{formatMessage:o}=S(),d=l=>l>=1e3?`${(l/1e3).toFixed(1)}k`:l.toString();return e.jsxs("div",{className:"grid gap-4 grid-cols-1 md:grid-cols-4",children:[e.jsx(te,{title:o({id:"prompts.stats.totalCount"}),value:s,icon:ms,variant:"primary",isLoading:r,description:o({id:"prompts.stats.totalCountDesc"})}),e.jsx(te,{title:o({id:"prompts.stats.avgLength"}),value:d(t),icon:Fs,variant:"info",isLoading:r,description:o({id:"prompts.stats.avgLengthDesc"})}),e.jsx(te,{title:o({id:"prompts.stats.topIntent"}),value:n||o({id:"prompts.stats.noIntent"}),icon:Ss,variant:"success",isLoading:r,description:o({id:"prompts.stats.topIntentDesc"})}),e.jsx(te,{title:o({id:"prompts.stats.avgQuality"}),value:a!==void 0?Math.round(a):"N/A",icon:Is,variant:"warning",isLoading:r,description:i?`${o({id:"prompts.quality.high"})}: ${i.high} | ${o({id:"prompts.quality.medium"})}: ${i.medium} | ${o({id:"prompts.quality.low"})}: ${i.low}`:o({id:"prompts.stats.avgQualityDesc"})})]})}function Xs(){return e.jsxs("div",{className:"grid gap-4 grid-cols-1 md:grid-cols-4",children:[e.jsx(re,{}),e.jsx(re,{}),e.jsx(re,{}),e.jsx(re,{})]})}const ge=30*1e3;function Zs(s={}){var q,V,K,J,U;const{filter:t,staleTime:n=ge,enabled:a=!0}=s,i=Z(),r=$(B),o=a&&!!r,d=he({queryKey:h.promptsList(r),queryFn:()=>gs(r),staleTime:n,enabled:o,retry:2}),l=((q=d.data)==null?void 0:q.prompts)??[],j=((V=d.data)==null?void 0:V.total)??0,m=(()=>{var w,Q;let p=l;if(t!=null&&t.search){const g=t.search.toLowerCase();p=p.filter(A=>{var L,H;return((L=A.title)==null?void 0:L.toLowerCase().includes(g))||A.content.toLowerCase().includes(g)||((H=A.tags)==null?void 0:H.some(_=>_.toLowerCase().includes(g)))})}return t!=null&&t.intent&&(p=p.filter(g=>g.category===t.intent)),t!=null&&t.project&&(p=p.filter(g=>g.project===t.project)),((w=t==null?void 0:t.dateRange)!=null&&w.start||(Q=t==null?void 0:t.dateRange)!=null&&Q.end)&&(p=p.filter(g=>{var _,Y;const A=new Date(g.createdAt),L=(_=t.dateRange)==null?void 0:_.start,H=(Y=t.dateRange)==null?void 0:Y.end;return!(L&&A<L||H&&A>H)})),p})(),y={};for(const p of l){const w=((J=(K=p.tags)==null?void 0:K.find(Q=>Q.startsWith("session:")))==null?void 0:J.replace("session:",""))||"ungrouped";y[w]||(y[w]=[]),y[w].push(p)}const N=l.length>0?Math.round(l.reduce((p,w)=>p+w.content.length,0)/l.length):0,D={};for(const p of l){const w=p.category||"uncategorized";D[w]=(D[w]||0)+1}const I=((U=Object.entries(D).sort((p,w)=>w[1]-p[1])[0])==null?void 0:U[0])||null,F={high:0,medium:0,low:0};let k=0,T=0;for(const p of l)p.quality_score!==void 0&&p.quality_score!==null&&(k+=p.quality_score,T++,p.quality_score>=80?F.high++:p.quality_score>=60?F.medium++:F.low++);const v=T>0?k/T:void 0,O=async()=>{await d.refetch()},de=async()=>{await i.invalidateQueries({queryKey:h.prompts(r)})};return{prompts:m,allPrompts:l,totalPrompts:j,promptsBySession:y,stats:{totalCount:l.length,avgLength:N,topIntent:I,avgQualityScore:v,qualityDistribution:F},isLoading:d.isLoading,isFetching:d.isFetching,error:d.error,refetch:O,invalidate:de}}function Js(s={}){const{enabled:t=!0,staleTime:n=ge}=s,a=$(B),i=t&&!!a;return he({queryKey:h.promptsInsights(a),queryFn:()=>fs(a),staleTime:n,enabled:i,retry:2})}function Ys(s={}){const{limit:t=20,enabled:n=!0,staleTime:a=ge}=s,i=$(B),r=n&&!!i;return he({queryKey:h.promptsInsightsHistory(i),queryFn:()=>js(i,t),staleTime:a,enabled:r,retry:2})}function et(){const s=Z(),t=$(B),n=le({mutationFn:ps,onSuccess:()=>{s.invalidateQueries({queryKey:h.promptsInsights(t)})}});return{analyzePrompts:n.mutateAsync,isAnalyzing:n.isPending,error:n.error}}function st(){const s=Z(),t=$(B),n=le({mutationFn:us,onMutate:async a=>{await s.cancelQueries({queryKey:h.prompts(t)});const i=s.getQueryData(h.promptsList(t));return s.setQueryData(h.promptsList(t),r=>r&&{...r,prompts:r.prompts.filter(o=>o.id!==a),total:r.total-1}),{previousPrompts:i}},onError:(a,i,r)=>{r!=null&&r.previousPrompts&&s.setQueryData(h.promptsList(t),r.previousPrompts)},onSettled:()=>{s.invalidateQueries({queryKey:h.prompts(t)})}});return{deletePrompt:n.mutateAsync,isDeleting:n.isPending,error:n.error}}function tt(){const s=Z(),t=$(B),n=le({mutationFn:xs,onMutate:async a=>{await s.cancelQueries({queryKey:h.prompts(t)});const i=s.getQueryData(h.promptsList(t));return s.setQueryData(h.promptsList(t),r=>r&&{...r,prompts:r.prompts.filter(o=>!a.includes(o.id)),total:r.total-a.length}),{previousPrompts:i}},onError:(a,i,r)=>{r!=null&&r.previousPrompts&&s.setQueryData(h.promptsList(t),r.previousPrompts)},onSettled:()=>{s.invalidateQueries({queryKey:h.prompts(t)})}});return{batchDeletePrompts:n.mutateAsync,isBatchDeleting:n.isPending,error:n.error}}function rt(){const s=Z(),t=$(B),n=le({mutationFn:a=>hs(a,t),onMutate:async a=>{await s.cancelQueries({queryKey:h.promptsInsightsHistory(t)});const i=s.getQueryData(h.promptsInsightsHistory(t));return s.setQueryData(h.promptsInsightsHistory(t),r=>r&&{...r,insights:r.insights.filter(o=>o.id!==a)}),{previousInsights:i}},onError:(a,i,r)=>{r!=null&&r.previousInsights&&s.setQueryData(h.promptsInsightsHistory(t),r.previousInsights)},onSettled:()=>{s.invalidateQueries({queryKey:h.promptsInsightsHistory(t)})}});return{deleteInsight:n.mutateAsync,isDeleting:n.isPending,error:n.error}}function at(){const s=et(),t=st(),n=tt();return{analyzePrompts:s.analyzePrompts,deletePrompt:t.deletePrompt,batchDeletePrompts:n.batchDeletePrompts,isAnalyzing:s.isAnalyzing,isDeleting:t.isDeleting,isBatchDeleting:n.isBatchDeleting,isMutating:s.isAnalyzing||t.isDeleting||n.isBatchDeleting}}function nt(s){const t=new Set;for(const n of s)n.project&&t.add(n.project);return Array.from(t).sort()}function ot({selectedCount:s,allSelected:t,onSelectAll:n,onClearSelection:a,onDelete:i,isDeleting:r=!1,className:o}){const{formatMessage:d}=S();return s===0?null:e.jsxs("div",{className:u("flex items-center justify-between gap-4 p-3 bg-primary/10 rounded-lg border border-primary/20",o),children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(qe,{checked:t,onCheckedChange:l=>n(l===!0),"aria-label":d({id:"prompts.batch.selectAll"})}),e.jsx("span",{className:"text-sm font-medium text-foreground",children:d({id:"prompts.batch.selected"},{count:s})})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(C,{variant:"ghost",size:"sm",onClick:a,disabled:r,children:[e.jsx(E,{className:"h-4 w-4 mr-1"}),d({id:"prompts.batch.clearSelection"})]}),e.jsxs(C,{variant:"destructive",size:"sm",onClick:i,disabled:r,children:[e.jsx(xe,{className:"h-4 w-4 mr-1"}),d({id:"prompts.batch.deleteSelected"})]})]})]})}const Se={gemini:{icon:R,color:"text-blue-500",bgColor:"bg-blue-500/10",label:"Gemini"},qwen:{icon:Oe,color:"text-purple-500",bgColor:"bg-purple-500/10",label:"Qwen"},codex:{icon:He,color:"text-green-500",bgColor:"bg-green-500/10",label:"Codex"},default:{icon:Be,color:"text-gray-500",bgColor:"bg-gray-500/10",label:"CLI"}};function it(s,t){const n=new Date(s),i=new Date().getTime()-n.getTime(),r=Math.floor(i/6e4),o=Math.floor(i/36e5),d=Math.floor(i/864e5),l=t==="zh";return r<1?l?"刚刚":"Just now":r<60?l?`${r} 分钟前`:`${r}m ago`:o<24?l?`${o} 小时前`:`${o}h ago`:d<7?l?`${d} 天前`:`${d}d ago`:n.toLocaleDateString()}function lt(s){if(!s||s.length===0)return"low";const t=s.some(a=>a.severity==="error"),n=s.some(a=>a.severity==="warning");return t?"high":n?"medium":"low"}const ct={low:{border:"border-l-4 border-l-green-500"},medium:{border:"border-l-4 border-l-yellow-500"},high:{border:"border-l-4 border-l-red-500"}};function dt({insight:s,locale:t,onClick:n}){var m,y,N,D;const{formatMessage:a}=S(),i=lt(s.patterns),r=Se[s.tool]??Se.default,o=r.icon,d=it(s.created_at,t),l=((m=s.patterns)==null?void 0:m.length)??0,j=((y=s.suggestions)==null?void 0:y.length)??0;return e.jsxs("div",{onClick:n,className:u("p-3 rounded-lg border border-border bg-card hover:bg-muted/50 cursor-pointer transition-colors","border-l-4",ct[i].border),children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsxs("div",{className:u("flex items-center gap-1.5",r.color),children:[e.jsx(o,{className:"h-3.5 w-3.5"}),e.jsx("span",{className:"text-xs font-medium",children:r.label})]}),e.jsx("div",{className:"text-xs text-muted-foreground",children:d})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("div",{className:"flex items-baseline gap-1",children:[e.jsx("span",{className:"text-sm font-semibold text-foreground",children:l}),e.jsx("span",{className:"text-xs text-muted-foreground",children:a({id:"prompts.insightsHistory.patterns"})})]}),e.jsxs("div",{className:"flex items-baseline gap-1",children:[e.jsx("span",{className:"text-sm font-semibold text-foreground",children:j}),e.jsx("span",{className:"text-xs text-muted-foreground",children:a({id:"prompts.insightsHistory.suggestions"})})]}),e.jsxs("div",{className:"flex items-baseline gap-1",children:[e.jsx("span",{className:"text-sm font-semibold text-foreground",children:s.prompt_count}),e.jsx("span",{className:"text-xs text-muted-foreground",children:a({id:"prompts.insightsHistory.prompts"})})]})]}),s.patterns&&s.patterns.length>0&&e.jsx("div",{className:"mt-2 pt-2 border-t border-border/50",children:e.jsxs("div",{className:u("flex items-start gap-1.5 text-xs",s.patterns[0].severity==="error"?"text-red-500":s.patterns[0].severity==="warning"?"text-yellow-600":"text-blue-500"),children:[e.jsx("span",{className:"font-medium uppercase",children:((N=s.patterns[0].name)==null?void 0:N.split(" ")[0])||"Pattern"}),e.jsxs("span",{className:"text-muted-foreground truncate flex-1",children:[(D=s.patterns[0].description)==null?void 0:D.slice(0,50),s.patterns[0].description&&s.patterns[0].description.length>50?"...":""]})]})})]})}function mt({insights:s=[],isLoading:t=!1,onInsightSelect:n,className:a}){const{formatMessage:i}=S(),r=S().locale;return t?e.jsx("div",{className:u("rounded-lg border border-border bg-card p-4",a),children:e.jsxs("div",{className:"flex items-center justify-center py-8",children:[e.jsx(ue,{className:"h-5 w-5 animate-spin text-muted-foreground mr-2"}),e.jsx("span",{className:"text-sm text-muted-foreground",children:i({id:"prompts.insightsHistory.loading"})})]})}):s.length===0?e.jsx("div",{className:u("rounded-lg border border-border bg-card p-4",a),children:e.jsxs("div",{className:"flex flex-col items-center justify-center py-8 px-4 text-center",children:[e.jsx(bs,{className:"h-10 w-10 text-muted-foreground/50 mb-3"}),e.jsx("h3",{className:"text-sm font-medium text-foreground mb-1",children:i({id:"prompts.insightsHistory.empty.title"})}),e.jsx("p",{className:"text-xs text-muted-foreground max-w-xs",children:i({id:"prompts.insightsHistory.empty.message"})})]})}):e.jsx("div",{className:u("space-y-2",a),children:s.map(o=>e.jsx(dt,{insight:o,locale:r,onClick:()=>n==null?void 0:n(o.id)},o.id))})}const Ie={gemini:{icon:R,color:"text-blue-500",bgColor:"bg-blue-500/10",label:"Gemini"},qwen:{icon:Oe,color:"text-purple-500",bgColor:"bg-purple-500/10",label:"Qwen"},codex:{icon:He,color:"text-green-500",bgColor:"bg-green-500/10",label:"Codex"},default:{icon:Be,color:"text-gray-500",bgColor:"bg-gray-500/10",label:"CLI"}},Me={error:{badge:"bg-red-500/10 text-red-500 border-red-500/20",border:"border-l-red-500",dot:"bg-red-500"},warning:{badge:"bg-yellow-500/10 text-yellow-600 border-yellow-500/20",border:"border-l-yellow-500",dot:"bg-yellow-500"},info:{badge:"bg-blue-500/10 text-blue-500 border-blue-500/20",border:"border-l-blue-500",dot:"bg-blue-500"},default:{badge:"bg-gray-500/10 text-gray-500 border-gray-500/20",border:"border-l-gray-500",dot:"bg-gray-500"}},ze={refactor:{badge:"bg-purple-500/10 text-purple-500 border-purple-500/20",icon:"refactor"},optimize:{badge:"bg-green-500/10 text-green-500 border-green-500/20",icon:"optimize"},fix:{badge:"bg-red-500/10 text-red-500 border-red-500/20",icon:"fix"},document:{badge:"bg-blue-500/10 text-blue-500 border-blue-500/20",icon:"document"}};function pt(s,t){const n=new Date(s),i=new Date().getTime()-n.getTime(),r=Math.floor(i/6e4),o=Math.floor(i/36e5),d=Math.floor(i/864e5);return t==="zh"?r<1?"刚刚":r<60?`${r}分钟前`:o<24?`${o}小时前`:`${d}天前`:r<1?"just now":r<60?`${r}m ago`:o<24?`${o}h ago`:`${d}d ago`}function ut({pattern:s}){var a;const t=s.severity??"info",n=Me[t]??Me.default;return e.jsxs("div",{className:u("p-3 rounded-md border bg-card","border-l-4",n.border),children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx("span",{className:u("px-2 py-0.5 text-xs font-medium rounded border",n.badge),children:((a=s.name)==null?void 0:a.split(" ")[0])||"Pattern"}),e.jsx("span",{className:u("px-2 py-0.5 text-xs font-medium rounded border uppercase",n.badge),children:t})]}),e.jsx("p",{className:"text-sm text-foreground mb-2",children:s.description}),s.example&&e.jsx("div",{className:"mt-2 p-2 bg-muted rounded text-xs font-mono overflow-x-auto",children:e.jsx("code",{className:"text-muted-foreground",children:s.example})})]})}function xt({suggestion:s}){const{formatMessage:t}=S(),n=ze[s.type]??ze.refactor,a=t({id:`prompts.suggestions.types.${s.type}`});return e.jsxs("div",{className:"p-3 rounded-md border border-border bg-card",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx("span",{className:u("px-2 py-0.5 text-xs font-medium rounded border",n.badge),children:a}),s.effort&&e.jsxs("span",{className:"text-xs text-muted-foreground",children:[t({id:"prompts.suggestions.effort"}),": ",s.effort]})]}),e.jsx("h4",{className:"text-sm font-medium text-foreground mb-1",children:s.title}),e.jsx("p",{className:"text-sm text-muted-foreground mb-2",children:s.description}),s.code&&e.jsx("div",{className:"mt-2 p-2 bg-muted rounded text-xs font-mono overflow-x-auto",children:e.jsx("code",{className:"text-muted-foreground",children:s.code})})]})}function ht({insight:s,onClose:t,onDelete:n,isDeleting:a=!1,className:i}){var N,D;const{formatMessage:r}=S(),o=S().locale;if(!s)return null;const d=Ie[s.tool]??Ie.default,l=d.icon,j=pt(s.created_at,o),m=((N=s.patterns)==null?void 0:N.length)??0,y=((D=s.suggestions)==null?void 0:D.length)??0;return e.jsxs("div",{className:u("fixed inset-y-0 right-0 w-full max-w-md bg-background border-l border-border shadow-lg","flex flex-col","animate-in slide-in-from-right",i),children:[e.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-border",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(l,{className:u("h-5 w-5",d.color)}),e.jsx("h2",{className:"text-lg font-semibold text-card-foreground",children:r({id:"prompts.insightDetail.title"})})]}),e.jsx("button",{onClick:t,className:"p-1 rounded-md hover:bg-accent transition-colors","aria-label":r({id:"common.actions.close"}),children:e.jsx(E,{className:"h-5 w-5 text-muted-foreground"})})]}),e.jsxs("div",{className:"flex-1 overflow-y-auto p-4 space-y-6",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-4 text-sm text-muted-foreground",children:[e.jsxs("div",{className:u("flex items-center gap-1.5",d.color),children:[e.jsx(l,{className:"h-3.5 w-3.5"}),e.jsx("span",{className:"font-medium",children:d.label})]}),e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(Le,{className:"h-3.5 w-3.5"}),e.jsx("span",{children:j})]}),e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(Ms,{className:"h-3.5 w-3.5"}),e.jsxs("span",{children:[s.prompt_count," ",r({id:"prompts.insightDetail.promptsAnalyzed"})]})]})]}),s.patterns&&s.patterns.length>0&&e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Qe,{className:"h-4 w-4 text-muted-foreground"}),e.jsxs("h3",{className:"text-sm font-semibold text-card-foreground",children:[r({id:"prompts.insightDetail.patterns"})," (",m,")"]})]}),e.jsx("div",{className:"space-y-2",children:s.patterns.map(I=>e.jsx(ut,{pattern:I,locale:o},I.id))})]}),s.suggestions&&s.suggestions.length>0&&e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ce,{className:"h-4 w-4 text-muted-foreground"}),e.jsxs("h3",{className:"text-sm font-semibold text-card-foreground",children:[r({id:"prompts.insightDetail.suggestions"})," (",y,")"]})]}),e.jsx("div",{className:"space-y-2",children:s.suggestions.map(I=>e.jsx(xt,{suggestion:I,locale:o},I.id))})]}),(!s.patterns||s.patterns.length===0)&&(!s.suggestions||s.suggestions.length===0)&&e.jsx("div",{className:"text-center py-8 text-muted-foreground text-sm",children:r({id:"prompts.insightDetail.noContent"})})]}),n&&e.jsx("div",{className:"p-4 border-t border-border",children:e.jsxs(C,{variant:"destructive",size:"sm",onClick:()=>n(s.id),disabled:a,className:"w-full",children:[e.jsx(xe,{className:"h-4 w-4 mr-2"}),r(a?{id:"prompts.insightDetail.deleting"}:{id:"common.actions.delete"})]})})]})}function gt({insight:s,onClose:t,onDelete:n,isDeleting:a=!1,showOverlay:i=!0,className:r}){return s?e.jsxs(e.Fragment,{children:[i&&e.jsx("div",{className:"fixed inset-0 bg-black/60 z-40 animate-in fade-in",onClick:t}),e.jsx(ht,{insight:s,onClose:t,onDelete:n,isDeleting:a,className:u("z-50",r)})]}):null}function Pt(){const{formatMessage:s}=S(),[t,n]=P.useState(""),[a,i]=P.useState("all"),[r,o]=P.useState("all"),[d,l]=P.useState("gemini"),[j,m]=P.useState(!1),[y,N]=P.useState(null),[D,I]=P.useState(null),[,F]=P.useState(!1),[k,T]=P.useState(new Set),[v,O]=P.useState(!1),de=P.useMemo(()=>({search:t,intent:a==="all"?void 0:a,project:r==="all"?void 0:r}),[t,a,r]),{prompts:q,allPrompts:V,promptsBySession:K,stats:J,isLoading:U,isFetching:p,error:w,refetch:Q}=Zs({filter:de}),{data:g,isLoading:A}=Js(),{data:L,isLoading:H}=Ys({limit:20}),{analyzePrompts:_,deletePrompt:Y,batchDeletePrompts:Ke,isAnalyzing:me,isBatchDeleting:G}=at(),{deleteInsight:_e,isDeleting:Ee}=rt(),Re=me||G,Ve=P.useMemo(()=>nt(V),[V]),Ue=async()=>{try{await _({tool:d})}catch(c){console.error("Failed to analyze prompts:",c)}},Ge=c=>{N(c),m(!0)},We=async()=>{if(y)try{await Y(y),m(!1),N(null)}catch(c){console.error("Failed to delete prompt:",c)}},fe=()=>{n("")},Xe=async c=>{try{const x=await Ps(c);I(x),F(!0)}catch(x){console.error("Failed to fetch insight detail:",x)}},Ze=async c=>{const x=S().locale,f=x==="zh"?"确定要删除此分析吗?此操作无法撤销。":"Are you sure you want to delete this insight? This action cannot be undone.";if(window.confirm(f))try{await _e(c),F(!1),I(null);const b=x==="zh"?"洞察已删除":"Insight deleted";window.showToast&&window.showToast(b,"success")}catch(b){console.error("Failed to delete insight:",b);const M=x==="zh"?"删除洞察失败":"Failed to delete insight";window.showToast&&window.showToast(M,"error")}},Je=c=>{i(x=>x===c?"all":c)},pe=()=>{n(""),i("all"),o("all")},Ye=(c,x)=>{T(f=>{const b=new Set(f);return x?b.add(c):b.delete(c),b})},es=c=>{T(c?new Set(q.map(x=>x.id)):new Set)},ss=()=>{T(new Set)},ts=()=>{k.size>0&&O(!0)},rs=async()=>{if(k.size!==0)try{await Ke(Array.from(k)),O(!1),T(new Set)}catch(c){console.error("Failed to batch delete prompts:",c)}},W=t.length>0||a!=="all"||r!=="all",je=P.useMemo(()=>{const c=[],x=Object.keys(K);if(x.length>0&&x.some(f=>f!=="ungrouped"))for(const[f,b]of Object.entries(K)){const M=b.filter(be=>q.some(ee=>ee.id===be.id));M.length>0&&c.push({key:f,label:f==="ungrouped"?s({id:"prompts.timeline.ungrouped"}):s({id:"prompts.timeline.session"},{session:f}),prompts:M})}else{const f={};for(const b of q){const M=new Date(b.createdAt).toLocaleDateString();f[M]||(f[M]=[]),f[M].push(b)}for(const[b,M]of Object.entries(f))c.push({key:b,label:b,prompts:M})}return c.sort((f,b)=>{var ee,ye;const M=(ee=f.prompts[0])!=null&&ee.createdAt?new Date(f.prompts[0].createdAt).getTime():0;return((ye=b.prompts[0])!=null&&ye.createdAt?new Date(b.prompts[0].createdAt).getTime():0)-M})},[q,K,s]);return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[e.jsxs("div",{children:[e.jsxs("h1",{className:"text-2xl font-semibold text-foreground flex items-center gap-2",children:[e.jsx(zs,{className:"h-6 w-6"}),s({id:"prompts.title"})]}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:s({id:"prompts.description"})})]}),e.jsx("div",{className:"flex items-center gap-2",children:e.jsxs(C,{variant:"outline",size:"sm",onClick:()=>Q(),disabled:p,children:[e.jsx(Ae,{className:u("h-4 w-4 mr-2",p&&"animate-spin")}),s({id:"common.actions.refresh"})]})})]}),w&&e.jsxs("div",{className:"flex items-center gap-2 p-4 rounded-lg bg-destructive/10 border border-destructive/30 text-destructive",children:[e.jsx(ys,{className:"h-5 w-5 flex-shrink-0"}),e.jsxs("div",{className:"flex-1",children:[e.jsx("p",{className:"text-sm font-medium",children:s({id:"common.errors.loadFailed"})}),e.jsx("p",{className:"text-xs mt-0.5",children:w.message})]}),e.jsx(C,{variant:"outline",size:"sm",onClick:()=>Q(),children:s({id:"home.errors.retry"})})]}),U?e.jsx(Xs,{}):e.jsx(Ws,{...J}),e.jsxs("div",{className:"grid gap-6 grid-cols-1 lg:grid-cols-3",children:[e.jsxs("div",{className:"lg:col-span-2 space-y-4",children:[e.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center",children:[e.jsxs("div",{className:"flex-1 max-w-sm relative",children:[e.jsx(Ns,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),e.jsx(vs,{placeholder:s({id:"prompts.searchPlaceholder"}),value:t,onChange:c=>n(c.target.value),className:"pl-9 pr-9"}),t&&e.jsx("button",{onClick:fe,className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",children:e.jsx(E,{className:"h-4 w-4"})})]}),e.jsxs(ws,{children:[e.jsx(Cs,{asChild:!0,children:e.jsxs(C,{variant:"outline",size:"sm",className:"gap-2",children:[e.jsx(Ts,{className:"h-4 w-4"}),s({id:"common.actions.filter"}),(a!=="all"||r!=="all")&&e.jsx(z,{variant:"secondary",className:"ml-1 h-5 min-w-5 px-1",children:(a!=="all"?1:0)+(r!=="all"?1:0)})]})}),e.jsxs(Ds,{align:"end",className:"w-48",children:[e.jsx(Ne,{children:s({id:"prompts.filterByIntent"})}),e.jsx(se,{}),e.jsxs(X,{onClick:()=>i("all"),className:"justify-between",children:[e.jsx("span",{children:s({id:"prompts.intents.all"})}),a==="all"&&e.jsx("span",{className:"text-primary",children:"✓"})]}),["bug-fix","feature","refactor","document","analyze"].map(c=>e.jsxs(X,{onClick:()=>Je(c),className:"justify-between",children:[e.jsx("span",{children:s({id:`prompts.intents.${c}`})}),a===c&&e.jsx("span",{className:"text-primary",children:"✓"})]},c)),e.jsx(se,{}),e.jsx(Ne,{children:s({id:"prompts.filterByProject"})}),e.jsx(se,{}),e.jsxs(X,{onClick:()=>o("all"),className:"justify-between",children:[e.jsx("span",{children:s({id:"prompts.projects.all"})}),r==="all"&&e.jsx("span",{className:"text-primary",children:"✓"})]}),Ve.map(c=>e.jsxs(X,{onClick:()=>o(c),className:"justify-between",children:[e.jsx("span",{className:"truncate max-w-32",title:c,children:c}),r===c&&e.jsx("span",{className:"text-primary",children:"✓"})]},c)),W&&e.jsxs(e.Fragment,{children:[e.jsx(se,{}),e.jsx(X,{onClick:pe,className:"text-destructive",children:s({id:"common.actions.clearFilters"})})]})]})]})]}),W&&e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsxs("span",{className:"text-sm text-muted-foreground",children:[s({id:"common.actions.filters"}),":"]}),a!=="all"&&e.jsxs(z,{variant:"secondary",className:"cursor-pointer",onClick:()=>i("all"),children:[s({id:"prompts.intents.intent"}),": ",a,e.jsx(E,{className:"ml-1 h-3 w-3"})]}),r!=="all"&&e.jsxs(z,{variant:"secondary",className:"cursor-pointer",onClick:()=>o("all"),children:[s({id:"prompts.projects.project"}),": ",r,e.jsx(E,{className:"ml-1 h-3 w-3"})]}),t&&e.jsxs(z,{variant:"secondary",className:"cursor-pointer",onClick:fe,children:[s({id:"common.actions.search"}),": ",t,e.jsx(E,{className:"ml-1 h-3 w-3"})]}),e.jsx(C,{variant:"ghost",size:"sm",onClick:pe,className:"h-6 text-xs",children:s({id:"common.actions.clearAll"})})]}),e.jsx(ot,{selectedCount:k.size,allSelected:q.length>0&&k.size===q.length,onSelectAll:es,onClearSelection:ss,onDelete:ts,isDeleting:G}),U?e.jsx("div",{className:"space-y-4",children:[1,2,3].map(c=>e.jsxs("div",{className:"p-4 rounded-lg border border-border animate-pulse",children:[e.jsx("div",{className:"h-4 w-32 bg-muted rounded mb-2"}),e.jsx("div",{className:"h-20 bg-muted rounded"})]},c))}):je.length===0?e.jsxs("div",{className:"flex flex-col items-center justify-center py-16 px-4 border border-dashed border-border rounded-lg",children:[e.jsx(ks,{className:"h-12 w-12 text-muted-foreground mb-4"}),e.jsx("h3",{className:"text-lg font-medium text-foreground mb-1",children:s(W?{id:"prompts.emptyState.title"}:{id:"prompts.emptyState.noPrompts"})}),e.jsx("p",{className:"text-sm text-muted-foreground text-center max-w-sm mb-4",children:s(W?{id:"prompts.emptyState.message"}:{id:"prompts.emptyState.createFirst"})}),W&&e.jsx(C,{variant:"outline",onClick:pe,children:s({id:"common.actions.clearFilters"})})]}):e.jsx("div",{className:"space-y-6",children:je.map(c=>e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"h-px bg-border flex-1"}),e.jsx("h3",{className:"text-sm font-medium text-muted-foreground px-2",children:c.label}),e.jsx("div",{className:"h-px bg-border flex-1"})]}),e.jsx("div",{className:"space-y-2",children:c.prompts.map(x=>e.jsx(Es,{prompt:x,onDelete:Ge,actionsDisabled:Re,selected:k.has(x.id),onSelectChange:Ye,selectionMode:k.size>0||q.some(f=>k.has(f.id))},x.id))})]},c.key))})]}),e.jsxs("div",{className:"lg:col-span-1 space-y-4",children:[e.jsx(Gs,{insights:g==null?void 0:g.insights,patterns:g==null?void 0:g.patterns,suggestions:g==null?void 0:g.suggestions,selectedTool:d,onToolChange:l,onAnalyze:Ue,isAnalyzing:me||A,className:"sticky top-4"}),e.jsx(mt,{insights:L==null?void 0:L.insights,isLoading:H,onInsightSelect:Xe})]})]}),e.jsx(ve,{open:j,onOpenChange:m,children:e.jsxs(we,{children:[e.jsxs(Ce,{children:[e.jsx(De,{children:s({id:"prompts.dialog.deleteTitle"})}),e.jsx(ke,{children:s({id:"prompts.dialog.deleteConfirm"})})]}),e.jsxs(Pe,{children:[e.jsx(C,{variant:"outline",onClick:()=>{m(!1),N(null)},children:s({id:"common.actions.cancel"})}),e.jsx(C,{variant:"destructive",onClick:We,disabled:me,children:s({id:"common.actions.delete"})})]})]})}),e.jsx(ve,{open:v,onOpenChange:O,children:e.jsxs(we,{children:[e.jsxs(Ce,{children:[e.jsx(De,{children:s({id:"prompts.dialog.batchDeleteTitle"})}),e.jsx(ke,{children:s({id:"prompts.dialog.batchDeleteConfirm"},{count:k.size})})]}),e.jsxs(Pe,{children:[e.jsx(C,{variant:"outline",onClick:()=>{O(!1)},disabled:G,children:s({id:"common.actions.cancel"})}),e.jsx(C,{variant:"destructive",onClick:rs,disabled:G,children:G?s({id:"common.actions.deleting"},{defaultValue:"Deleting..."}):s({id:"common.actions.delete"})})]})]})}),e.jsx(gt,{insight:D,onClose:()=>{F(!1),I(null)},onDelete:Ze,isDeleting:Ee,showOverlay:!0})]})}export{Pt as PromptHistoryPage,Pt as default};
22
- //# sourceMappingURL=PromptHistoryPage-6rQnsI8l.js.map
21
+ */const As=ne("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]),Qs=Te("transition-all duration-200 hover:shadow-md hover-glow",{variants:{variant:{default:"border-border",primary:"border-primary/30 bg-primary/5",success:"border-success/30 bg-success/5",warning:"border-warning/30 bg-warning/5",danger:"border-destructive/30 bg-destructive/5",info:"border-info/30 bg-info/5"}},defaultVariants:{variant:"default"}}),Hs=Te("flex h-10 w-10 items-center justify-center rounded-lg",{variants:{variant:{default:"bg-muted text-muted-foreground",primary:"bg-primary/10 text-primary",success:"bg-success/10 text-success",warning:"bg-warning/10 text-warning",danger:"bg-destructive/10 text-destructive",info:"bg-info/10 text-info"}},defaultVariants:{variant:"default"}});function te({className:s,variant:t,title:n,value:a,icon:i,trend:r,trendValue:o,isLoading:d=!1,description:l,sparklineData:j,showSparkline:m=!1,...y}){const N=r==="up"?As:r==="down"?Ls:qs,D=r==="up"?"text-success":r==="down"?"text-destructive":"text-muted-foreground";return e.jsx(oe,{className:u(Qs({variant:t}),s),...y,children:e.jsx(ie,{className:"p-4",children:e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-sm font-medium text-muted-foreground truncate",children:n}),e.jsxs("div",{className:"mt-2 flex items-baseline gap-2",children:[d?e.jsx("div",{className:"h-8 w-16 animate-pulse rounded bg-muted"}):e.jsx("p",{className:"text-2xl font-semibold text-card-foreground",children:typeof a=="number"?a.toLocaleString():a}),r&&o&&!d&&e.jsxs("span",{className:u("flex items-center text-xs font-medium",D),children:[e.jsx(N,{className:"mr-0.5 h-3 w-3"}),o]})]}),l&&e.jsx("p",{className:"mt-1 text-xs text-muted-foreground truncate",children:l}),m&&j&&j.length>0&&e.jsx("div",{className:"mt-3 -mx-2",children:e.jsx(as,{data:j,height:40,strokeWidth:2})})]}),i&&e.jsx("div",{className:u(Hs({variant:t})),children:e.jsx(i,{className:"h-5 w-5"})})]})})})}function re({className:s}){return e.jsx(oe,{className:u("animate-pulse",s),children:e.jsx(ie,{className:"p-4",children:e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{className:"flex-1",children:[e.jsx("div",{className:"h-4 w-20 rounded bg-muted"}),e.jsx("div",{className:"mt-3 h-8 w-16 rounded bg-muted"})]}),e.jsx("div",{className:"h-10 w-10 rounded-lg bg-muted"})]})})})}function $s(s){return s==null?"none":s>=80?"high":s>=60?"medium":"low"}function Bs(s){switch(s){case"high":return"success";case"medium":return"warning";case"low":return"secondary";default:return"outline"}}function Os({qualityScore:s,className:t}){const{formatMessage:n}=S(),a=$s(s),i=Bs(a),r=`prompts.quality.${a}`,o=n({id:r});return a==="none"?null:e.jsxs(z,{variant:i,className:t,children:[s!==void 0&&`${s} `,o]})}function _s(s){return new Date(s).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function Ks(s){return s>=1e3?`${(s/1e3).toFixed(1)}k chars`:`${s} chars`}function Es({prompt:s,onDelete:t,className:n,actionsDisabled:a=!1,defaultExpanded:i=!1,selected:r=!1,onSelectChange:o,selectionMode:d=!1}){const{formatMessage:l}=S(),[j,m]=P.useState(i),[y,N]=P.useState(!1),D=async v=>{v.stopPropagation();try{await navigator.clipboard.writeText(s.content),N(!0),setTimeout(()=>N(!1),2e3)}catch{console.error("Failed to copy prompt")}},I=v=>{v.stopPropagation(),t==null||t(s.id)},F=()=>{m(v=>!v)},k=v=>{o==null||o(s.id,v)},T=v=>{d&&v.target.closest(".prompt-card-checkbox")||d&&k(!r)};return e.jsxs(oe,{className:u("transition-all duration-200",r&&"ring-2 ring-primary",d&&"cursor-pointer",n),onClick:T,children:[e.jsxs(Fe,{className:"p-4",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[d&&e.jsx("div",{className:"prompt-card-checkbox",children:e.jsx(qe,{checked:r,onCheckedChange:k,className:"mt-1"})}),e.jsxs("div",{className:u("flex-1 min-w-0",!d&&"ml-0"),children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:s.title||l({id:"prompts.card.untitled"})}),s.category&&e.jsx(z,{variant:"secondary",className:"text-xs",children:s.category}),e.jsx(Os,{qualityScore:s.quality_score,className:"text-xs"})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-3 text-xs text-muted-foreground",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(ns,{className:"h-3 w-3"}),_s(s.createdAt)]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(os,{className:"h-3 w-3"}),Ks(s.content.length)]}),s.useCount!==void 0&&s.useCount>0&&e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(Le,{className:"h-3 w-3"}),l({id:"prompts.card.used"},{count:s.useCount})]})]}),s.tags&&s.tags.length>0&&e.jsxs("div",{className:"flex flex-wrap gap-1 mt-2",children:[s.tags.slice(0,3).map(v=>e.jsx(z,{variant:"outline",className:"text-xs",children:v},v)),s.tags.length>3&&e.jsxs(z,{variant:"outline",className:"text-xs",children:["+",s.tags.length-3]})]})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsxs(C,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:D,disabled:a,title:l({id:"prompts.actions.copy"}),children:[e.jsx(is,{className:"h-4 w-4"}),e.jsx("span",{className:"sr-only",children:l({id:"prompts.actions.copy"})})]}),e.jsxs(C,{variant:"ghost",size:"icon",className:"h-8 w-8 text-destructive hover:text-destructive",onClick:I,disabled:a,title:l({id:"prompts.actions.delete"}),children:[e.jsx(xe,{className:"h-4 w-4"}),e.jsx("span",{className:"sr-only",children:l({id:"prompts.actions.delete"})})]}),e.jsxs(C,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:F,title:l(j?{id:"prompts.actions.collapse"}:{id:"prompts.actions.expand"}),children:[j?e.jsx(ls,{className:"h-4 w-4"}):e.jsx(cs,{className:"h-4 w-4"}),e.jsx("span",{className:"sr-only",children:j?"Collapse":"Expand"})]})]})]}),y&&e.jsx("p",{className:"text-xs text-success mt-2",children:l({id:"prompts.actions.copied"})})]}),j&&e.jsx(ie,{className:"px-4 pb-4 pt-0",children:e.jsx("div",{className:"rounded-lg bg-muted/50 p-3",children:e.jsx("pre",{className:"text-sm whitespace-pre-wrap break-words text-foreground",children:s.content})})})]})}const ae={gemini:{label:"Gemini",color:"text-blue-500",bgColor:"bg-blue-500/10"},qwen:{label:"Qwen",color:"text-purple-500",bgColor:"bg-purple-500/10"},codex:{label:"Codex",color:"text-green-500",bgColor:"bg-green-500/10"}};function Rs({insight:s}){const{formatMessage:t}=S(),a={suggestion:{icon:ce,variant:"info",color:"text-blue-500"},optimization:{icon:R,variant:"success",color:"text-green-500"},warning:{icon:Qe,variant:"warning",color:"text-orange-500"}}[s.type],i=a.icon;return e.jsxs("div",{className:"flex items-start gap-3 p-3 rounded-lg bg-muted/50",children:[e.jsx("div",{className:u("flex-shrink-0",a.color),children:e.jsx(i,{className:"h-4 w-4"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-sm text-foreground",children:s.content}),e.jsx("div",{className:"flex items-center gap-2 mt-1",children:e.jsxs(z,{variant:"outline",className:"text-xs",children:[Math.round(s.confidence*100),"% ",t({id:"prompts.insights.confidence"})]})})]})]})}function Vs({pattern:s}){return e.jsxs("div",{className:"flex items-start gap-3 p-3 rounded-lg bg-muted/50",children:[e.jsx("div",{className:"flex-shrink-0 text-purple-500",children:e.jsx($e,{className:"h-4 w-4"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-sm font-medium text-foreground",children:s.name}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:s.description}),s.example&&e.jsx("code",{className:"block mt-2 text-xs bg-background rounded p-2 overflow-x-auto",children:s.example}),s.severity&&e.jsx(z,{variant:s.severity==="error"?"destructive":s.severity==="warning"?"warning":"secondary",className:"mt-2 text-xs",children:s.severity})]})]})}function Us({suggestion:s}){const{formatMessage:t}=S(),a={refactor:{color:"text-blue-500",label:t({id:"prompts.suggestions.types.refactor"})},optimize:{color:"text-green-500",label:t({id:"prompts.suggestions.types.optimize"})},fix:{color:"text-orange-500",label:t({id:"prompts.suggestions.types.fix"})},document:{color:"text-purple-500",label:t({id:"prompts.suggestions.types.document"})}}[s.type];return e.jsxs("div",{className:"flex items-start gap-3 p-3 rounded-lg bg-muted/50",children:[e.jsx("div",{className:u("flex-shrink-0",a.color),children:e.jsx(ce,{className:"h-4 w-4"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("p",{className:"text-sm font-medium text-foreground",children:s.title}),e.jsx(z,{variant:"outline",className:"text-xs",children:a.label})]}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:s.description}),s.code&&e.jsx("code",{className:"block mt-2 text-xs bg-background rounded p-2 overflow-x-auto",children:s.code}),s.effort&&e.jsxs(z,{variant:"secondary",className:"mt-2 text-xs",children:[t({id:"prompts.suggestions.effort"}),": ",s.effort]})]})]})}function Gs({insights:s=[],patterns:t=[],suggestions:n=[],selectedTool:a,onToolChange:i,onAnalyze:r,isAnalyzing:o=!1,className:d}){const{formatMessage:l}=S(),j=s.length>0||t.length>0||n.length>0;return e.jsxs(oe,{className:u("flex flex-col h-full",d),children:[e.jsxs(Fe,{className:"pb-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs(ds,{className:"text-lg flex items-center gap-2",children:[e.jsx(R,{className:"h-5 w-5 text-primary"}),l({id:"prompts.insights.title"})]}),e.jsxs(C,{variant:"outline",size:"sm",onClick:()=>r(),disabled:o,className:"gap-2",children:[o?e.jsx(ue,{className:"h-4 w-4 animate-spin"}):e.jsx(Ae,{className:"h-4 w-4"}),l({id:"prompts.insights.analyze"})]})]}),e.jsxs("div",{className:"flex items-center gap-2 mt-3",children:[e.jsxs("span",{className:"text-sm text-muted-foreground",children:[l({id:"prompts.insights.selectTool"}),":"]}),e.jsx("div",{className:"flex gap-1",children:Object.keys(ae).map(m=>e.jsx("button",{onClick:()=>i(m),className:u("px-3 py-1.5 rounded-md text-sm font-medium transition-colors",a===m?u(ae[m].bgColor,ae[m].color):"bg-muted text-muted-foreground hover:bg-muted/80"),children:ae[m].label},m))})]})]}),e.jsx(ie,{className:"flex-1 overflow-y-auto",children:!j&&!o?e.jsxs("div",{className:"flex flex-col items-center justify-center py-12 px-4 text-center",children:[e.jsx(R,{className:"h-12 w-12 text-muted-foreground/50 mb-4"}),e.jsx("h3",{className:"text-sm font-medium text-foreground mb-1",children:l({id:"prompts.insights.empty.title"})}),e.jsx("p",{className:"text-xs text-muted-foreground max-w-sm",children:l({id:"prompts.insights.empty.message"})})]}):e.jsxs("div",{className:"space-y-4",children:[s.length>0&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-sm font-medium text-foreground mb-2 flex items-center gap-2",children:[e.jsx(ce,{className:"h-4 w-4"}),l({id:"prompts.insights.sections.insights"})]}),e.jsx("div",{className:"space-y-2",children:s.map(m=>e.jsx(Rs,{insight:m},m.id))})]}),t.length>0&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-sm font-medium text-foreground mb-2 flex items-center gap-2",children:[e.jsx($e,{className:"h-4 w-4"}),l({id:"prompts.insights.sections.patterns"})]}),e.jsx("div",{className:"space-y-2",children:t.map(m=>e.jsx(Vs,{pattern:m},m.id))})]}),n.length>0&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-sm font-medium text-foreground mb-2 flex items-center gap-2",children:[e.jsx(R,{className:"h-4 w-4"}),l({id:"prompts.insights.sections.suggestions"})]}),e.jsx("div",{className:"space-y-2",children:n.map(m=>e.jsx(Us,{suggestion:m},m.id))})]}),o&&e.jsxs("div",{className:"flex items-center justify-center py-8",children:[e.jsx(ue,{className:"h-6 w-6 animate-spin text-muted-foreground"}),e.jsx("span",{className:"ml-2 text-sm text-muted-foreground",children:l({id:"prompts.insights.analyzing"})})]})]})})]})}function Ws({totalCount:s,avgLength:t,topIntent:n,avgQualityScore:a,qualityDistribution:i,isLoading:r=!1}){const{formatMessage:o}=S(),d=l=>l>=1e3?`${(l/1e3).toFixed(1)}k`:l.toString();return e.jsxs("div",{className:"grid gap-4 grid-cols-1 md:grid-cols-4",children:[e.jsx(te,{title:o({id:"prompts.stats.totalCount"}),value:s,icon:ms,variant:"primary",isLoading:r,description:o({id:"prompts.stats.totalCountDesc"})}),e.jsx(te,{title:o({id:"prompts.stats.avgLength"}),value:d(t),icon:Fs,variant:"info",isLoading:r,description:o({id:"prompts.stats.avgLengthDesc"})}),e.jsx(te,{title:o({id:"prompts.stats.topIntent"}),value:n||o({id:"prompts.stats.noIntent"}),icon:Ss,variant:"success",isLoading:r,description:o({id:"prompts.stats.topIntentDesc"})}),e.jsx(te,{title:o({id:"prompts.stats.avgQuality"}),value:a!==void 0?Math.round(a):"N/A",icon:Is,variant:"warning",isLoading:r,description:i?`${o({id:"prompts.quality.high"})}: ${i.high} | ${o({id:"prompts.quality.medium"})}: ${i.medium} | ${o({id:"prompts.quality.low"})}: ${i.low}`:o({id:"prompts.stats.avgQualityDesc"})})]})}function Xs(){return e.jsxs("div",{className:"grid gap-4 grid-cols-1 md:grid-cols-4",children:[e.jsx(re,{}),e.jsx(re,{}),e.jsx(re,{}),e.jsx(re,{})]})}const ge=30*1e3;function Zs(s={}){var q,V,_,J,U;const{filter:t,staleTime:n=ge,enabled:a=!0}=s,i=Z(),r=$(B),o=a&&!!r,d=he({queryKey:h.promptsList(r),queryFn:()=>gs(r),staleTime:n,enabled:o,retry:2}),l=((q=d.data)==null?void 0:q.prompts)??[],j=((V=d.data)==null?void 0:V.total)??0,m=(()=>{var w,Q;let p=l;if(t!=null&&t.search){const g=t.search.toLowerCase();p=p.filter(A=>{var L,H;return((L=A.title)==null?void 0:L.toLowerCase().includes(g))||A.content.toLowerCase().includes(g)||((H=A.tags)==null?void 0:H.some(K=>K.toLowerCase().includes(g)))})}return t!=null&&t.intent&&(p=p.filter(g=>g.category===t.intent)),t!=null&&t.project&&(p=p.filter(g=>g.project===t.project)),((w=t==null?void 0:t.dateRange)!=null&&w.start||(Q=t==null?void 0:t.dateRange)!=null&&Q.end)&&(p=p.filter(g=>{var K,Y;const A=new Date(g.createdAt),L=(K=t.dateRange)==null?void 0:K.start,H=(Y=t.dateRange)==null?void 0:Y.end;return!(L&&A<L||H&&A>H)})),p})(),y={};for(const p of l){const w=((J=(_=p.tags)==null?void 0:_.find(Q=>Q.startsWith("session:")))==null?void 0:J.replace("session:",""))||"ungrouped";y[w]||(y[w]=[]),y[w].push(p)}const N=l.length>0?Math.round(l.reduce((p,w)=>p+w.content.length,0)/l.length):0,D={};for(const p of l){const w=p.category||"uncategorized";D[w]=(D[w]||0)+1}const I=((U=Object.entries(D).sort((p,w)=>w[1]-p[1])[0])==null?void 0:U[0])||null,F={high:0,medium:0,low:0};let k=0,T=0;for(const p of l)p.quality_score!==void 0&&p.quality_score!==null&&(k+=p.quality_score,T++,p.quality_score>=80?F.high++:p.quality_score>=60?F.medium++:F.low++);const v=T>0?k/T:void 0,O=async()=>{await d.refetch()},de=async()=>{await i.invalidateQueries({queryKey:h.prompts(r)})};return{prompts:m,allPrompts:l,totalPrompts:j,promptsBySession:y,stats:{totalCount:l.length,avgLength:N,topIntent:I,avgQualityScore:v,qualityDistribution:F},isLoading:d.isLoading,isFetching:d.isFetching,error:d.error,refetch:O,invalidate:de}}function Js(s={}){const{enabled:t=!0,staleTime:n=ge}=s,a=$(B),i=t&&!!a;return he({queryKey:h.promptsInsights(a),queryFn:()=>fs(a),staleTime:n,enabled:i,retry:2})}function Ys(s={}){const{limit:t=20,enabled:n=!0,staleTime:a=ge}=s,i=$(B),r=n&&!!i;return he({queryKey:h.promptsInsightsHistory(i),queryFn:()=>js(i,t),staleTime:a,enabled:r,retry:2})}function et(){const s=Z(),t=$(B),n=le({mutationFn:ps,onSuccess:()=>{s.invalidateQueries({queryKey:h.promptsInsights(t)})}});return{analyzePrompts:n.mutateAsync,isAnalyzing:n.isPending,error:n.error}}function st(){const s=Z(),t=$(B),n=le({mutationFn:us,onMutate:async a=>{await s.cancelQueries({queryKey:h.prompts(t)});const i=s.getQueryData(h.promptsList(t));return s.setQueryData(h.promptsList(t),r=>r&&{...r,prompts:r.prompts.filter(o=>o.id!==a),total:r.total-1}),{previousPrompts:i}},onError:(a,i,r)=>{r!=null&&r.previousPrompts&&s.setQueryData(h.promptsList(t),r.previousPrompts)},onSettled:()=>{s.invalidateQueries({queryKey:h.prompts(t)})}});return{deletePrompt:n.mutateAsync,isDeleting:n.isPending,error:n.error}}function tt(){const s=Z(),t=$(B),n=le({mutationFn:xs,onMutate:async a=>{await s.cancelQueries({queryKey:h.prompts(t)});const i=s.getQueryData(h.promptsList(t));return s.setQueryData(h.promptsList(t),r=>r&&{...r,prompts:r.prompts.filter(o=>!a.includes(o.id)),total:r.total-a.length}),{previousPrompts:i}},onError:(a,i,r)=>{r!=null&&r.previousPrompts&&s.setQueryData(h.promptsList(t),r.previousPrompts)},onSettled:()=>{s.invalidateQueries({queryKey:h.prompts(t)})}});return{batchDeletePrompts:n.mutateAsync,isBatchDeleting:n.isPending,error:n.error}}function rt(){const s=Z(),t=$(B),n=le({mutationFn:a=>hs(a,t),onMutate:async a=>{await s.cancelQueries({queryKey:h.promptsInsightsHistory(t)});const i=s.getQueryData(h.promptsInsightsHistory(t));return s.setQueryData(h.promptsInsightsHistory(t),r=>r&&{...r,insights:r.insights.filter(o=>o.id!==a)}),{previousInsights:i}},onError:(a,i,r)=>{r!=null&&r.previousInsights&&s.setQueryData(h.promptsInsightsHistory(t),r.previousInsights)},onSettled:()=>{s.invalidateQueries({queryKey:h.promptsInsightsHistory(t)})}});return{deleteInsight:n.mutateAsync,isDeleting:n.isPending,error:n.error}}function at(){const s=et(),t=st(),n=tt();return{analyzePrompts:s.analyzePrompts,deletePrompt:t.deletePrompt,batchDeletePrompts:n.batchDeletePrompts,isAnalyzing:s.isAnalyzing,isDeleting:t.isDeleting,isBatchDeleting:n.isBatchDeleting,isMutating:s.isAnalyzing||t.isDeleting||n.isBatchDeleting}}function nt(s){const t=new Set;for(const n of s)n.project&&t.add(n.project);return Array.from(t).sort()}function ot({selectedCount:s,allSelected:t,onSelectAll:n,onClearSelection:a,onDelete:i,isDeleting:r=!1,className:o}){const{formatMessage:d}=S();return s===0?null:e.jsxs("div",{className:u("flex items-center justify-between gap-4 p-3 bg-primary/10 rounded-lg border border-primary/20",o),children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(qe,{checked:t,onCheckedChange:l=>n(l===!0),"aria-label":d({id:"prompts.batch.selectAll"})}),e.jsx("span",{className:"text-sm font-medium text-foreground",children:d({id:"prompts.batch.selected"},{count:s})})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(C,{variant:"ghost",size:"sm",onClick:a,disabled:r,children:[e.jsx(E,{className:"h-4 w-4 mr-1"}),d({id:"prompts.batch.clearSelection"})]}),e.jsxs(C,{variant:"destructive",size:"sm",onClick:i,disabled:r,children:[e.jsx(xe,{className:"h-4 w-4 mr-1"}),d({id:"prompts.batch.deleteSelected"})]})]})]})}const Se={gemini:{icon:R,color:"text-blue-500",bgColor:"bg-blue-500/10",label:"Gemini"},qwen:{icon:Oe,color:"text-purple-500",bgColor:"bg-purple-500/10",label:"Qwen"},codex:{icon:He,color:"text-green-500",bgColor:"bg-green-500/10",label:"Codex"},default:{icon:Be,color:"text-gray-500",bgColor:"bg-gray-500/10",label:"CLI"}};function it(s,t){const n=new Date(s),i=new Date().getTime()-n.getTime(),r=Math.floor(i/6e4),o=Math.floor(i/36e5),d=Math.floor(i/864e5),l=t==="zh";return r<1?l?"刚刚":"Just now":r<60?l?`${r} 分钟前`:`${r}m ago`:o<24?l?`${o} 小时前`:`${o}h ago`:d<7?l?`${d} 天前`:`${d}d ago`:n.toLocaleDateString()}function lt(s){if(!s||s.length===0)return"low";const t=s.some(a=>a.severity==="error"),n=s.some(a=>a.severity==="warning");return t?"high":n?"medium":"low"}const ct={low:{border:"border-l-4 border-l-green-500"},medium:{border:"border-l-4 border-l-yellow-500"},high:{border:"border-l-4 border-l-red-500"}};function dt({insight:s,locale:t,onClick:n}){var m,y,N,D;const{formatMessage:a}=S(),i=lt(s.patterns),r=Se[s.tool]??Se.default,o=r.icon,d=it(s.created_at,t),l=((m=s.patterns)==null?void 0:m.length)??0,j=((y=s.suggestions)==null?void 0:y.length)??0;return e.jsxs("div",{onClick:n,className:u("p-3 rounded-lg border border-border bg-card hover:bg-muted/50 cursor-pointer transition-colors","border-l-4",ct[i].border),children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsxs("div",{className:u("flex items-center gap-1.5",r.color),children:[e.jsx(o,{className:"h-3.5 w-3.5"}),e.jsx("span",{className:"text-xs font-medium",children:r.label})]}),e.jsx("div",{className:"text-xs text-muted-foreground",children:d})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("div",{className:"flex items-baseline gap-1",children:[e.jsx("span",{className:"text-sm font-semibold text-foreground",children:l}),e.jsx("span",{className:"text-xs text-muted-foreground",children:a({id:"prompts.insightsHistory.patterns"})})]}),e.jsxs("div",{className:"flex items-baseline gap-1",children:[e.jsx("span",{className:"text-sm font-semibold text-foreground",children:j}),e.jsx("span",{className:"text-xs text-muted-foreground",children:a({id:"prompts.insightsHistory.suggestions"})})]}),e.jsxs("div",{className:"flex items-baseline gap-1",children:[e.jsx("span",{className:"text-sm font-semibold text-foreground",children:s.prompt_count}),e.jsx("span",{className:"text-xs text-muted-foreground",children:a({id:"prompts.insightsHistory.prompts"})})]})]}),s.patterns&&s.patterns.length>0&&e.jsx("div",{className:"mt-2 pt-2 border-t border-border/50",children:e.jsxs("div",{className:u("flex items-start gap-1.5 text-xs",s.patterns[0].severity==="error"?"text-red-500":s.patterns[0].severity==="warning"?"text-yellow-600":"text-blue-500"),children:[e.jsx("span",{className:"font-medium uppercase",children:((N=s.patterns[0].name)==null?void 0:N.split(" ")[0])||"Pattern"}),e.jsxs("span",{className:"text-muted-foreground truncate flex-1",children:[(D=s.patterns[0].description)==null?void 0:D.slice(0,50),s.patterns[0].description&&s.patterns[0].description.length>50?"...":""]})]})})]})}function mt({insights:s=[],isLoading:t=!1,onInsightSelect:n,className:a}){const{formatMessage:i}=S(),r=S().locale;return t?e.jsx("div",{className:u("rounded-lg border border-border bg-card p-4",a),children:e.jsxs("div",{className:"flex items-center justify-center py-8",children:[e.jsx(ue,{className:"h-5 w-5 animate-spin text-muted-foreground mr-2"}),e.jsx("span",{className:"text-sm text-muted-foreground",children:i({id:"prompts.insightsHistory.loading"})})]})}):s.length===0?e.jsx("div",{className:u("rounded-lg border border-border bg-card p-4",a),children:e.jsxs("div",{className:"flex flex-col items-center justify-center py-8 px-4 text-center",children:[e.jsx(bs,{className:"h-10 w-10 text-muted-foreground/50 mb-3"}),e.jsx("h3",{className:"text-sm font-medium text-foreground mb-1",children:i({id:"prompts.insightsHistory.empty.title"})}),e.jsx("p",{className:"text-xs text-muted-foreground max-w-xs",children:i({id:"prompts.insightsHistory.empty.message"})})]})}):e.jsx("div",{className:u("space-y-2",a),children:s.map(o=>e.jsx(dt,{insight:o,locale:r,onClick:()=>n==null?void 0:n(o.id)},o.id))})}const Ie={gemini:{icon:R,color:"text-blue-500",bgColor:"bg-blue-500/10",label:"Gemini"},qwen:{icon:Oe,color:"text-purple-500",bgColor:"bg-purple-500/10",label:"Qwen"},codex:{icon:He,color:"text-green-500",bgColor:"bg-green-500/10",label:"Codex"},default:{icon:Be,color:"text-gray-500",bgColor:"bg-gray-500/10",label:"CLI"}},Me={error:{badge:"bg-red-500/10 text-red-500 border-red-500/20",border:"border-l-red-500",dot:"bg-red-500"},warning:{badge:"bg-yellow-500/10 text-yellow-600 border-yellow-500/20",border:"border-l-yellow-500",dot:"bg-yellow-500"},info:{badge:"bg-blue-500/10 text-blue-500 border-blue-500/20",border:"border-l-blue-500",dot:"bg-blue-500"},default:{badge:"bg-gray-500/10 text-gray-500 border-gray-500/20",border:"border-l-gray-500",dot:"bg-gray-500"}},ze={refactor:{badge:"bg-purple-500/10 text-purple-500 border-purple-500/20",icon:"refactor"},optimize:{badge:"bg-green-500/10 text-green-500 border-green-500/20",icon:"optimize"},fix:{badge:"bg-red-500/10 text-red-500 border-red-500/20",icon:"fix"},document:{badge:"bg-blue-500/10 text-blue-500 border-blue-500/20",icon:"document"}};function pt(s,t){const n=new Date(s),i=new Date().getTime()-n.getTime(),r=Math.floor(i/6e4),o=Math.floor(i/36e5),d=Math.floor(i/864e5);return t==="zh"?r<1?"刚刚":r<60?`${r}分钟前`:o<24?`${o}小时前`:`${d}天前`:r<1?"just now":r<60?`${r}m ago`:o<24?`${o}h ago`:`${d}d ago`}function ut({pattern:s}){var a;const t=s.severity??"info",n=Me[t]??Me.default;return e.jsxs("div",{className:u("p-3 rounded-md border bg-card","border-l-4",n.border),children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx("span",{className:u("px-2 py-0.5 text-xs font-medium rounded border",n.badge),children:((a=s.name)==null?void 0:a.split(" ")[0])||"Pattern"}),e.jsx("span",{className:u("px-2 py-0.5 text-xs font-medium rounded border uppercase",n.badge),children:t})]}),e.jsx("p",{className:"text-sm text-foreground mb-2",children:s.description}),s.example&&e.jsx("div",{className:"mt-2 p-2 bg-muted rounded text-xs font-mono overflow-x-auto",children:e.jsx("code",{className:"text-muted-foreground",children:s.example})})]})}function xt({suggestion:s}){const{formatMessage:t}=S(),n=ze[s.type]??ze.refactor,a=t({id:`prompts.suggestions.types.${s.type}`});return e.jsxs("div",{className:"p-3 rounded-md border border-border bg-card",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx("span",{className:u("px-2 py-0.5 text-xs font-medium rounded border",n.badge),children:a}),s.effort&&e.jsxs("span",{className:"text-xs text-muted-foreground",children:[t({id:"prompts.suggestions.effort"}),": ",s.effort]})]}),e.jsx("h4",{className:"text-sm font-medium text-foreground mb-1",children:s.title}),e.jsx("p",{className:"text-sm text-muted-foreground mb-2",children:s.description}),s.code&&e.jsx("div",{className:"mt-2 p-2 bg-muted rounded text-xs font-mono overflow-x-auto",children:e.jsx("code",{className:"text-muted-foreground",children:s.code})})]})}function ht({insight:s,onClose:t,onDelete:n,isDeleting:a=!1,className:i}){var N,D;const{formatMessage:r}=S(),o=S().locale;if(!s)return null;const d=Ie[s.tool]??Ie.default,l=d.icon,j=pt(s.created_at,o),m=((N=s.patterns)==null?void 0:N.length)??0,y=((D=s.suggestions)==null?void 0:D.length)??0;return e.jsxs("div",{className:u("fixed inset-y-0 right-0 w-full max-w-md bg-background border-l border-border shadow-lg","flex flex-col","animate-in slide-in-from-right",i),children:[e.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-border",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(l,{className:u("h-5 w-5",d.color)}),e.jsx("h2",{className:"text-lg font-semibold text-card-foreground",children:r({id:"prompts.insightDetail.title"})})]}),e.jsx("button",{onClick:t,className:"p-1 rounded-md hover:bg-accent transition-colors","aria-label":r({id:"common.actions.close"}),children:e.jsx(E,{className:"h-5 w-5 text-muted-foreground"})})]}),e.jsxs("div",{className:"flex-1 overflow-y-auto p-4 space-y-6",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-4 text-sm text-muted-foreground",children:[e.jsxs("div",{className:u("flex items-center gap-1.5",d.color),children:[e.jsx(l,{className:"h-3.5 w-3.5"}),e.jsx("span",{className:"font-medium",children:d.label})]}),e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(Le,{className:"h-3.5 w-3.5"}),e.jsx("span",{children:j})]}),e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(Ms,{className:"h-3.5 w-3.5"}),e.jsxs("span",{children:[s.prompt_count," ",r({id:"prompts.insightDetail.promptsAnalyzed"})]})]})]}),s.patterns&&s.patterns.length>0&&e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Qe,{className:"h-4 w-4 text-muted-foreground"}),e.jsxs("h3",{className:"text-sm font-semibold text-card-foreground",children:[r({id:"prompts.insightDetail.patterns"})," (",m,")"]})]}),e.jsx("div",{className:"space-y-2",children:s.patterns.map(I=>e.jsx(ut,{pattern:I,locale:o},I.id))})]}),s.suggestions&&s.suggestions.length>0&&e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ce,{className:"h-4 w-4 text-muted-foreground"}),e.jsxs("h3",{className:"text-sm font-semibold text-card-foreground",children:[r({id:"prompts.insightDetail.suggestions"})," (",y,")"]})]}),e.jsx("div",{className:"space-y-2",children:s.suggestions.map(I=>e.jsx(xt,{suggestion:I,locale:o},I.id))})]}),(!s.patterns||s.patterns.length===0)&&(!s.suggestions||s.suggestions.length===0)&&e.jsx("div",{className:"text-center py-8 text-muted-foreground text-sm",children:r({id:"prompts.insightDetail.noContent"})})]}),n&&e.jsx("div",{className:"p-4 border-t border-border",children:e.jsxs(C,{variant:"destructive",size:"sm",onClick:()=>n(s.id),disabled:a,className:"w-full",children:[e.jsx(xe,{className:"h-4 w-4 mr-2"}),r(a?{id:"prompts.insightDetail.deleting"}:{id:"common.actions.delete"})]})})]})}function gt({insight:s,onClose:t,onDelete:n,isDeleting:a=!1,showOverlay:i=!0,className:r}){return s?e.jsxs(e.Fragment,{children:[i&&e.jsx("div",{className:"fixed inset-0 bg-black/60 z-40 animate-in fade-in",onClick:t}),e.jsx(ht,{insight:s,onClose:t,onDelete:n,isDeleting:a,className:u("z-50",r)})]}):null}function Pt(){const{formatMessage:s}=S(),[t,n]=P.useState(""),[a,i]=P.useState("all"),[r,o]=P.useState("all"),[d,l]=P.useState("gemini"),[j,m]=P.useState(!1),[y,N]=P.useState(null),[D,I]=P.useState(null),[,F]=P.useState(!1),[k,T]=P.useState(new Set),[v,O]=P.useState(!1),de=P.useMemo(()=>({search:t,intent:a==="all"?void 0:a,project:r==="all"?void 0:r}),[t,a,r]),{prompts:q,allPrompts:V,promptsBySession:_,stats:J,isLoading:U,isFetching:p,error:w,refetch:Q}=Zs({filter:de}),{data:g,isLoading:A}=Js(),{data:L,isLoading:H}=Ys({limit:20}),{analyzePrompts:K,deletePrompt:Y,batchDeletePrompts:_e,isAnalyzing:me,isBatchDeleting:G}=at(),{deleteInsight:Ke,isDeleting:Ee}=rt(),Re=me||G,Ve=P.useMemo(()=>nt(V),[V]),Ue=async()=>{try{await K({tool:d})}catch(c){console.error("Failed to analyze prompts:",c)}},Ge=c=>{N(c),m(!0)},We=async()=>{if(y)try{await Y(y),m(!1),N(null)}catch(c){console.error("Failed to delete prompt:",c)}},fe=()=>{n("")},Xe=async c=>{try{const x=await Ps(c);I(x),F(!0)}catch(x){console.error("Failed to fetch insight detail:",x)}},Ze=async c=>{const x=S().locale,f=x==="zh"?"确定要删除此分析吗?此操作无法撤销。":"Are you sure you want to delete this insight? This action cannot be undone.";if(window.confirm(f))try{await Ke(c),F(!1),I(null);const b=x==="zh"?"洞察已删除":"Insight deleted";window.showToast&&window.showToast(b,"success")}catch(b){console.error("Failed to delete insight:",b);const M=x==="zh"?"删除洞察失败":"Failed to delete insight";window.showToast&&window.showToast(M,"error")}},Je=c=>{i(x=>x===c?"all":c)},pe=()=>{n(""),i("all"),o("all")},Ye=(c,x)=>{T(f=>{const b=new Set(f);return x?b.add(c):b.delete(c),b})},es=c=>{T(c?new Set(q.map(x=>x.id)):new Set)},ss=()=>{T(new Set)},ts=()=>{k.size>0&&O(!0)},rs=async()=>{if(k.size!==0)try{await _e(Array.from(k)),O(!1),T(new Set)}catch(c){console.error("Failed to batch delete prompts:",c)}},W=t.length>0||a!=="all"||r!=="all",je=P.useMemo(()=>{const c=[],x=Object.keys(_);if(x.length>0&&x.some(f=>f!=="ungrouped"))for(const[f,b]of Object.entries(_)){const M=b.filter(be=>q.some(ee=>ee.id===be.id));M.length>0&&c.push({key:f,label:f==="ungrouped"?s({id:"prompts.timeline.ungrouped"}):s({id:"prompts.timeline.session"},{session:f}),prompts:M})}else{const f={};for(const b of q){const M=new Date(b.createdAt).toLocaleDateString();f[M]||(f[M]=[]),f[M].push(b)}for(const[b,M]of Object.entries(f))c.push({key:b,label:b,prompts:M})}return c.sort((f,b)=>{var ee,ye;const M=(ee=f.prompts[0])!=null&&ee.createdAt?new Date(f.prompts[0].createdAt).getTime():0;return((ye=b.prompts[0])!=null&&ye.createdAt?new Date(b.prompts[0].createdAt).getTime():0)-M})},[q,_,s]);return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[e.jsxs("div",{children:[e.jsxs("h1",{className:"text-2xl font-semibold text-foreground flex items-center gap-2",children:[e.jsx(zs,{className:"h-6 w-6"}),s({id:"prompts.title"})]}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:s({id:"prompts.description"})})]}),e.jsx("div",{className:"flex items-center gap-2",children:e.jsxs(C,{variant:"outline",size:"sm",onClick:()=>Q(),disabled:p,children:[e.jsx(Ae,{className:u("h-4 w-4 mr-2",p&&"animate-spin")}),s({id:"common.actions.refresh"})]})})]}),w&&e.jsxs("div",{className:"flex items-center gap-2 p-4 rounded-lg bg-destructive/10 border border-destructive/30 text-destructive",children:[e.jsx(ys,{className:"h-5 w-5 flex-shrink-0"}),e.jsxs("div",{className:"flex-1",children:[e.jsx("p",{className:"text-sm font-medium",children:s({id:"common.errors.loadFailed"})}),e.jsx("p",{className:"text-xs mt-0.5",children:w.message})]}),e.jsx(C,{variant:"outline",size:"sm",onClick:()=>Q(),children:s({id:"home.errors.retry"})})]}),U?e.jsx(Xs,{}):e.jsx(Ws,{...J}),e.jsxs("div",{className:"grid gap-6 grid-cols-1 lg:grid-cols-3",children:[e.jsxs("div",{className:"lg:col-span-2 space-y-4",children:[e.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center",children:[e.jsxs("div",{className:"flex-1 max-w-sm relative",children:[e.jsx(Ns,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),e.jsx(vs,{placeholder:s({id:"prompts.searchPlaceholder"}),value:t,onChange:c=>n(c.target.value),className:"pl-9 pr-9"}),t&&e.jsx("button",{onClick:fe,className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",children:e.jsx(E,{className:"h-4 w-4"})})]}),e.jsxs(ws,{children:[e.jsx(Cs,{asChild:!0,children:e.jsxs(C,{variant:"outline",size:"sm",className:"gap-2",children:[e.jsx(Ts,{className:"h-4 w-4"}),s({id:"common.actions.filter"}),(a!=="all"||r!=="all")&&e.jsx(z,{variant:"secondary",className:"ml-1 h-5 min-w-5 px-1",children:(a!=="all"?1:0)+(r!=="all"?1:0)})]})}),e.jsxs(Ds,{align:"end",className:"w-48",children:[e.jsx(Ne,{children:s({id:"prompts.filterByIntent"})}),e.jsx(se,{}),e.jsxs(X,{onClick:()=>i("all"),className:"justify-between",children:[e.jsx("span",{children:s({id:"prompts.intents.all"})}),a==="all"&&e.jsx("span",{className:"text-primary",children:"✓"})]}),["bug-fix","feature","refactor","document","analyze"].map(c=>e.jsxs(X,{onClick:()=>Je(c),className:"justify-between",children:[e.jsx("span",{children:s({id:`prompts.intents.${c}`})}),a===c&&e.jsx("span",{className:"text-primary",children:"✓"})]},c)),e.jsx(se,{}),e.jsx(Ne,{children:s({id:"prompts.filterByProject"})}),e.jsx(se,{}),e.jsxs(X,{onClick:()=>o("all"),className:"justify-between",children:[e.jsx("span",{children:s({id:"prompts.projects.all"})}),r==="all"&&e.jsx("span",{className:"text-primary",children:"✓"})]}),Ve.map(c=>e.jsxs(X,{onClick:()=>o(c),className:"justify-between",children:[e.jsx("span",{className:"truncate max-w-32",title:c,children:c}),r===c&&e.jsx("span",{className:"text-primary",children:"✓"})]},c)),W&&e.jsxs(e.Fragment,{children:[e.jsx(se,{}),e.jsx(X,{onClick:pe,className:"text-destructive",children:s({id:"common.actions.clearFilters"})})]})]})]})]}),W&&e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsxs("span",{className:"text-sm text-muted-foreground",children:[s({id:"common.actions.filters"}),":"]}),a!=="all"&&e.jsxs(z,{variant:"secondary",className:"cursor-pointer",onClick:()=>i("all"),children:[s({id:"prompts.intents.intent"}),": ",a,e.jsx(E,{className:"ml-1 h-3 w-3"})]}),r!=="all"&&e.jsxs(z,{variant:"secondary",className:"cursor-pointer",onClick:()=>o("all"),children:[s({id:"prompts.projects.project"}),": ",r,e.jsx(E,{className:"ml-1 h-3 w-3"})]}),t&&e.jsxs(z,{variant:"secondary",className:"cursor-pointer",onClick:fe,children:[s({id:"common.actions.search"}),": ",t,e.jsx(E,{className:"ml-1 h-3 w-3"})]}),e.jsx(C,{variant:"ghost",size:"sm",onClick:pe,className:"h-6 text-xs",children:s({id:"common.actions.clearAll"})})]}),e.jsx(ot,{selectedCount:k.size,allSelected:q.length>0&&k.size===q.length,onSelectAll:es,onClearSelection:ss,onDelete:ts,isDeleting:G}),U?e.jsx("div",{className:"space-y-4",children:[1,2,3].map(c=>e.jsxs("div",{className:"p-4 rounded-lg border border-border animate-pulse",children:[e.jsx("div",{className:"h-4 w-32 bg-muted rounded mb-2"}),e.jsx("div",{className:"h-20 bg-muted rounded"})]},c))}):je.length===0?e.jsxs("div",{className:"flex flex-col items-center justify-center py-16 px-4 border border-dashed border-border rounded-lg",children:[e.jsx(ks,{className:"h-12 w-12 text-muted-foreground mb-4"}),e.jsx("h3",{className:"text-lg font-medium text-foreground mb-1",children:s(W?{id:"prompts.emptyState.title"}:{id:"prompts.emptyState.noPrompts"})}),e.jsx("p",{className:"text-sm text-muted-foreground text-center max-w-sm mb-4",children:s(W?{id:"prompts.emptyState.message"}:{id:"prompts.emptyState.createFirst"})}),W&&e.jsx(C,{variant:"outline",onClick:pe,children:s({id:"common.actions.clearFilters"})})]}):e.jsx("div",{className:"space-y-6",children:je.map(c=>e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"h-px bg-border flex-1"}),e.jsx("h3",{className:"text-sm font-medium text-muted-foreground px-2",children:c.label}),e.jsx("div",{className:"h-px bg-border flex-1"})]}),e.jsx("div",{className:"space-y-2",children:c.prompts.map(x=>e.jsx(Es,{prompt:x,onDelete:Ge,actionsDisabled:Re,selected:k.has(x.id),onSelectChange:Ye,selectionMode:k.size>0||q.some(f=>k.has(f.id))},x.id))})]},c.key))})]}),e.jsxs("div",{className:"lg:col-span-1 space-y-4",children:[e.jsx(Gs,{insights:g==null?void 0:g.insights,patterns:g==null?void 0:g.patterns,suggestions:g==null?void 0:g.suggestions,selectedTool:d,onToolChange:l,onAnalyze:Ue,isAnalyzing:me||A,className:"sticky top-4"}),e.jsx(mt,{insights:L==null?void 0:L.insights,isLoading:H,onInsightSelect:Xe})]})]}),e.jsx(ve,{open:j,onOpenChange:m,children:e.jsxs(we,{children:[e.jsxs(Ce,{children:[e.jsx(De,{children:s({id:"prompts.dialog.deleteTitle"})}),e.jsx(ke,{children:s({id:"prompts.dialog.deleteConfirm"})})]}),e.jsxs(Pe,{children:[e.jsx(C,{variant:"outline",onClick:()=>{m(!1),N(null)},children:s({id:"common.actions.cancel"})}),e.jsx(C,{variant:"destructive",onClick:We,disabled:me,children:s({id:"common.actions.delete"})})]})]})}),e.jsx(ve,{open:v,onOpenChange:O,children:e.jsxs(we,{children:[e.jsxs(Ce,{children:[e.jsx(De,{children:s({id:"prompts.dialog.batchDeleteTitle"})}),e.jsx(ke,{children:s({id:"prompts.dialog.batchDeleteConfirm"},{count:k.size})})]}),e.jsxs(Pe,{children:[e.jsx(C,{variant:"outline",onClick:()=>{O(!1)},disabled:G,children:s({id:"common.actions.cancel"})}),e.jsx(C,{variant:"destructive",onClick:rs,disabled:G,children:G?s({id:"common.actions.deleting"},{defaultValue:"Deleting..."}):s({id:"common.actions.delete"})})]})]})}),e.jsx(gt,{insight:D,onClose:()=>{F(!1),I(null)},onDelete:Ze,isDeleting:Ee,showOverlay:!0})]})}export{Pt as PromptHistoryPage,Pt as default};
22
+ //# sourceMappingURL=PromptHistoryPage-YEMjFARX.js.map