@burdenoff/microfe-botmanor 2026.1108.1 → 2026.1109.2

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 (335) hide show
  1. package/dist/botlit/BotlitRoutes.d.ts +2 -0
  2. package/dist/botlit/BotlitRoutes.js +40 -52
  3. package/dist/botlit/BotlitRoutes.js.map +1 -1
  4. package/dist/botlit/BotmanorRoot.d.ts +3 -0
  5. package/dist/botlit/BotmanorRoot.js +1 -2
  6. package/dist/botlit/BotmanorRoot.js.map +1 -1
  7. package/dist/botlit/BotmanorRootInner.d.ts +3 -0
  8. package/dist/botlit/BotmanorRootInner.js +9 -10
  9. package/dist/botlit/BotmanorRootInner.js.map +1 -1
  10. package/dist/botlit/components/AgentApprovalPanel.d.ts +20 -0
  11. package/dist/botlit/components/AgentApprovalPanel.js +49 -50
  12. package/dist/botlit/components/AgentApprovalPanel.js.map +1 -1
  13. package/dist/botlit/components/AiOperationsPanel.d.ts +14 -0
  14. package/dist/botlit/components/AiOperationsPanel.js +54 -55
  15. package/dist/botlit/components/AiOperationsPanel.js.map +1 -1
  16. package/dist/botlit/components/AssistantChannelPanel.d.ts +3 -0
  17. package/dist/botlit/components/AssistantChannelPanel.js +12 -13
  18. package/dist/botlit/components/AssistantChannelPanel.js.map +1 -1
  19. package/dist/botlit/components/AssistantRuntimeSetupPanel.d.ts +4 -0
  20. package/dist/botlit/components/AssistantRuntimeSetupPanel.js +14 -14
  21. package/dist/botlit/components/AssistantRuntimeSetupPanel.js.map +1 -1
  22. package/dist/botlit/components/AssistantWebsitePanel.d.ts +5 -0
  23. package/dist/botlit/components/AssistantWebsitePanel.js +15 -16
  24. package/dist/botlit/components/AssistantWebsitePanel.js.map +1 -1
  25. package/dist/botlit/components/Badge.d.ts +9 -0
  26. package/dist/botlit/components/Badge.js +1 -2
  27. package/dist/botlit/components/Badge.js.map +1 -1
  28. package/dist/botlit/components/Button.d.ts +10 -0
  29. package/dist/botlit/components/Button.js +1 -2
  30. package/dist/botlit/components/Button.js.map +1 -1
  31. package/dist/botlit/components/Card.d.ts +16 -0
  32. package/dist/botlit/components/Card.js +1 -2
  33. package/dist/botlit/components/Card.js.map +1 -1
  34. package/dist/botlit/components/ChannelSelectorSheet.d.ts +23 -0
  35. package/dist/botlit/components/ChannelSelectorSheet.js +1 -2
  36. package/dist/botlit/components/ChannelSelectorSheet.js.map +1 -1
  37. package/dist/botlit/components/EmptyState.d.ts +12 -0
  38. package/dist/botlit/components/EmptyState.js +1 -2
  39. package/dist/botlit/components/EmptyState.js.map +1 -1
  40. package/dist/botlit/components/ErrorState.d.ts +10 -0
  41. package/dist/botlit/components/ErrorState.js +5 -6
  42. package/dist/botlit/components/ErrorState.js.map +1 -1
  43. package/dist/botlit/components/Input.d.ts +27 -0
  44. package/dist/botlit/components/Input.js +1 -2
  45. package/dist/botlit/components/Input.js.map +1 -1
  46. package/dist/botlit/components/KnowledgeSourceImportPanel.d.ts +3 -0
  47. package/dist/botlit/components/KnowledgeSourceImportPanel.js +12 -13
  48. package/dist/botlit/components/KnowledgeSourceImportPanel.js.map +1 -1
  49. package/dist/botlit/components/ModelRegistrationPanel.d.ts +5 -0
  50. package/dist/botlit/components/ModelRegistrationPanel.js +1 -2
  51. package/dist/botlit/components/ModelRegistrationPanel.js.map +1 -1
  52. package/dist/botlit/components/PageLayout.d.ts +12 -0
  53. package/dist/botlit/components/PageLayout.js +1 -2
  54. package/dist/botlit/components/PageLayout.js.map +1 -1
  55. package/dist/botlit/components/QuotaExhaustedDialog.d.ts +9 -0
  56. package/dist/botlit/components/QuotaExhaustedDialog.js +1 -2
  57. package/dist/botlit/components/QuotaExhaustedDialog.js.map +1 -1
  58. package/dist/botlit/components/RetentionStatusPanel.d.ts +2 -0
  59. package/dist/botlit/components/RetentionStatusPanel.js +18 -19
  60. package/dist/botlit/components/RetentionStatusPanel.js.map +1 -1
  61. package/dist/botlit/components/RouteLoader.d.ts +23 -0
  62. package/dist/botlit/components/RouteLoader.js +1 -2
  63. package/dist/botlit/components/RouteLoader.js.map +1 -1
  64. package/dist/botlit/components/VersionHistoryPanel.d.ts +12 -0
  65. package/dist/botlit/components/VersionHistoryPanel.js +23 -24
  66. package/dist/botlit/components/VersionHistoryPanel.js.map +1 -1
  67. package/dist/botlit/components/WorkspaceRequired.d.ts +18 -0
  68. package/dist/botlit/components/WorkspaceRequired.js +1 -2
  69. package/dist/botlit/components/WorkspaceRequired.js.map +1 -1
  70. package/dist/botlit/components/index.d.ts +14 -0
  71. package/dist/botlit/hooks/index.d.ts +35 -0
  72. package/dist/botlit/hooks/index.js +16 -16
  73. package/dist/botlit/hooks/internal/mutationInput.d.ts +56 -0
  74. package/dist/botlit/hooks/internal/mutationInput.js +1 -2
  75. package/dist/botlit/hooks/internal/mutationInput.js.map +1 -1
  76. package/dist/botlit/hooks/internal/workspaceGateway.d.ts +54 -0
  77. package/dist/botlit/hooks/internal/workspaceGateway.js +17 -19
  78. package/dist/botlit/hooks/internal/workspaceGateway.js.map +1 -1
  79. package/dist/botlit/hooks/useA2A.d.ts +104 -0
  80. package/dist/botlit/hooks/useA2A.js +45 -45
  81. package/dist/botlit/hooks/useA2A.js.map +1 -1
  82. package/dist/botlit/hooks/useAgentApprovals.d.ts +62 -0
  83. package/dist/botlit/hooks/useAgentApprovals.js +38 -39
  84. package/dist/botlit/hooks/useAgentApprovals.js.map +1 -1
  85. package/dist/botlit/hooks/useAgents.d.ts +105 -0
  86. package/dist/botlit/hooks/useAgents.js +53 -54
  87. package/dist/botlit/hooks/useAgents.js.map +1 -1
  88. package/dist/botlit/hooks/useAiOperations.d.ts +95 -0
  89. package/dist/botlit/hooks/useAiOperations.js +20 -19
  90. package/dist/botlit/hooks/useAiOperations.js.map +1 -1
  91. package/dist/botlit/hooks/useAssistantChannels.d.ts +16 -0
  92. package/dist/botlit/hooks/useAssistantChannels.js +1 -2
  93. package/dist/botlit/hooks/useAssistantChannels.js.map +1 -1
  94. package/dist/botlit/hooks/useAssistantRuntimeSetup.d.ts +17 -0
  95. package/dist/botlit/hooks/useAssistantRuntimeSetup.js +1 -2
  96. package/dist/botlit/hooks/useAssistantRuntimeSetup.js.map +1 -1
  97. package/dist/botlit/hooks/useAssistantWebsites.d.ts +18 -0
  98. package/dist/botlit/hooks/useAssistantWebsites.js +1 -2
  99. package/dist/botlit/hooks/useAssistantWebsites.js.map +1 -1
  100. package/dist/botlit/hooks/useBotWorkflow.d.ts +22 -0
  101. package/dist/botlit/hooks/useBotWorkflow.js +1 -2
  102. package/dist/botlit/hooks/useBotWorkflow.js.map +1 -1
  103. package/dist/botlit/hooks/useBots.d.ts +68 -0
  104. package/dist/botlit/hooks/useBots.js +32 -33
  105. package/dist/botlit/hooks/useBots.js.map +1 -1
  106. package/dist/botlit/hooks/useBuckets.d.ts +62 -0
  107. package/dist/botlit/hooks/useBuckets.js +91 -58
  108. package/dist/botlit/hooks/useBuckets.js.map +1 -1
  109. package/dist/botlit/hooks/useChannels.d.ts +87 -0
  110. package/dist/botlit/hooks/useChannels.js +73 -73
  111. package/dist/botlit/hooks/useChannels.js.map +1 -1
  112. package/dist/botlit/hooks/useExecutions.d.ts +87 -0
  113. package/dist/botlit/hooks/useExecutions.js +37 -37
  114. package/dist/botlit/hooks/useExecutions.js.map +1 -1
  115. package/dist/botlit/hooks/useKnowledgeBases.d.ts +79 -0
  116. package/dist/botlit/hooks/useKnowledgeBases.js +40 -39
  117. package/dist/botlit/hooks/useKnowledgeBases.js.map +1 -1
  118. package/dist/botlit/hooks/useKnowledgeSourceImports.d.ts +21 -0
  119. package/dist/botlit/hooks/useKnowledgeSourceImports.js +1 -2
  120. package/dist/botlit/hooks/useKnowledgeSourceImports.js.map +1 -1
  121. package/dist/botlit/hooks/useLLMProviders.d.ts +66 -0
  122. package/dist/botlit/hooks/useLLMProviders.js +25 -26
  123. package/dist/botlit/hooks/useLLMProviders.js.map +1 -1
  124. package/dist/botlit/hooks/useMCPServers.d.ts +71 -0
  125. package/dist/botlit/hooks/useMCPServers.js +40 -38
  126. package/dist/botlit/hooks/useMCPServers.js.map +1 -1
  127. package/dist/botlit/hooks/usePolicies.d.ts +60 -0
  128. package/dist/botlit/hooks/usePolicies.js +49 -49
  129. package/dist/botlit/hooks/usePolicies.js.map +1 -1
  130. package/dist/botlit/hooks/usePromptTemplates.d.ts +88 -0
  131. package/dist/botlit/hooks/usePromptTemplates.js +57 -57
  132. package/dist/botlit/hooks/usePromptTemplates.js.map +1 -1
  133. package/dist/botlit/hooks/useRetention.d.ts +26 -0
  134. package/dist/botlit/hooks/useRetention.js +3 -3
  135. package/dist/botlit/hooks/useRetention.js.map +1 -1
  136. package/dist/botlit/hooks/useRetrievalProfiles.d.ts +75 -0
  137. package/dist/botlit/hooks/useRetrievalProfiles.js +47 -47
  138. package/dist/botlit/hooks/useRetrievalProfiles.js.map +1 -1
  139. package/dist/botlit/hooks/useSkills.d.ts +64 -0
  140. package/dist/botlit/hooks/useSkills.js +53 -53
  141. package/dist/botlit/hooks/useSkills.js.map +1 -1
  142. package/dist/botlit/hooks/useStore.d.ts +112 -0
  143. package/dist/botlit/hooks/useStore.js +55 -55
  144. package/dist/botlit/hooks/useStore.js.map +1 -1
  145. package/dist/botlit/hooks/useUserPlatformConnection.d.ts +80 -0
  146. package/dist/botlit/hooks/useUserPlatformConnection.js +19 -19
  147. package/dist/botlit/hooks/useUserPlatformConnection.js.map +1 -1
  148. package/dist/botlit/index.d.ts +15 -0
  149. package/dist/botlit/index.js +11 -11
  150. package/dist/botlit/pages/A2AAgentDetailPage.d.ts +6 -0
  151. package/dist/botlit/pages/A2AAgentDetailPage.js +171 -178
  152. package/dist/botlit/pages/A2AAgentDetailPage.js.map +1 -1
  153. package/dist/botlit/pages/A2ARegistryPage.d.ts +2 -0
  154. package/dist/botlit/pages/A2ARegistryPage.js +25 -26
  155. package/dist/botlit/pages/A2ARegistryPage.js.map +1 -1
  156. package/dist/botlit/pages/AgentApprovalsPage.d.ts +2 -0
  157. package/dist/botlit/pages/AgentApprovalsPage.js +32 -33
  158. package/dist/botlit/pages/AgentApprovalsPage.js.map +1 -1
  159. package/dist/botlit/pages/AgentBuilderPage.d.ts +2 -0
  160. package/dist/botlit/pages/AgentBuilderPage.js +59 -60
  161. package/dist/botlit/pages/AgentBuilderPage.js.map +1 -1
  162. package/dist/botlit/pages/AgentDetailPage.d.ts +2 -0
  163. package/dist/botlit/pages/AgentDetailPage.js +83 -84
  164. package/dist/botlit/pages/AgentDetailPage.js.map +1 -1
  165. package/dist/botlit/pages/AgentsListPage.d.ts +2 -0
  166. package/dist/botlit/pages/AgentsListPage.js +71 -72
  167. package/dist/botlit/pages/AgentsListPage.js.map +1 -1
  168. package/dist/botlit/pages/AiOperationsPage.d.ts +2 -0
  169. package/dist/botlit/pages/AiOperationsPage.js +52 -53
  170. package/dist/botlit/pages/AiOperationsPage.js.map +1 -1
  171. package/dist/botlit/pages/BotChannelsTab.d.ts +7 -0
  172. package/dist/botlit/pages/BotChannelsTab.js +120 -122
  173. package/dist/botlit/pages/BotChannelsTab.js.map +1 -1
  174. package/dist/botlit/pages/BotDetailPage.d.ts +7 -0
  175. package/dist/botlit/pages/BotDetailPage.js +353 -358
  176. package/dist/botlit/pages/BotDetailPage.js.map +1 -1
  177. package/dist/botlit/pages/BotWorkflowTab.d.ts +11 -0
  178. package/dist/botlit/pages/BotWorkflowTab.js +20 -21
  179. package/dist/botlit/pages/BotWorkflowTab.js.map +1 -1
  180. package/dist/botlit/pages/BotsListPage.d.ts +2 -0
  181. package/dist/botlit/pages/BotsListPage.js +52 -53
  182. package/dist/botlit/pages/BotsListPage.js.map +1 -1
  183. package/dist/botlit/pages/BucketDetailPage.d.ts +2 -0
  184. package/dist/botlit/pages/BucketDetailPage.js +251 -0
  185. package/dist/botlit/pages/BucketDetailPage.js.map +1 -0
  186. package/dist/botlit/pages/BucketsPage.d.ts +2 -0
  187. package/dist/botlit/pages/BucketsPage.js +260 -261
  188. package/dist/botlit/pages/BucketsPage.js.map +1 -1
  189. package/dist/botlit/pages/ChannelDetailPage.d.ts +6 -0
  190. package/dist/botlit/pages/ChannelDetailPage.js +97 -96
  191. package/dist/botlit/pages/ChannelDetailPage.js.map +1 -1
  192. package/dist/botlit/pages/ChannelRoutesPage.d.ts +2 -0
  193. package/dist/botlit/pages/ChannelRoutesPage.js +23 -24
  194. package/dist/botlit/pages/ChannelRoutesPage.js.map +1 -1
  195. package/dist/botlit/pages/ChannelsPage.d.ts +2 -0
  196. package/dist/botlit/pages/ChannelsPage.js +44 -45
  197. package/dist/botlit/pages/ChannelsPage.js.map +1 -1
  198. package/dist/botlit/pages/ChatPage.d.ts +1 -0
  199. package/dist/botlit/pages/ChatPage.js +10 -11
  200. package/dist/botlit/pages/ChatPage.js.map +1 -1
  201. package/dist/botlit/pages/DashboardPage.d.ts +2 -0
  202. package/dist/botlit/pages/DashboardPage.js +37 -38
  203. package/dist/botlit/pages/DashboardPage.js.map +1 -1
  204. package/dist/botlit/pages/ExecutionDetailPage.d.ts +2 -0
  205. package/dist/botlit/pages/ExecutionDetailPage.js +47 -48
  206. package/dist/botlit/pages/ExecutionDetailPage.js.map +1 -1
  207. package/dist/botlit/pages/ExecutionsPage.d.ts +2 -0
  208. package/dist/botlit/pages/ExecutionsPage.js +72 -70
  209. package/dist/botlit/pages/ExecutionsPage.js.map +1 -1
  210. package/dist/botlit/pages/InstalledPackagesPage.d.ts +2 -0
  211. package/dist/botlit/pages/InstalledPackagesPage.js +77 -78
  212. package/dist/botlit/pages/InstalledPackagesPage.js.map +1 -1
  213. package/dist/botlit/pages/KnowledgeBaseDetailPage.d.ts +6 -0
  214. package/dist/botlit/pages/KnowledgeBaseDetailPage.js +171 -181
  215. package/dist/botlit/pages/KnowledgeBaseDetailPage.js.map +1 -1
  216. package/dist/botlit/pages/KnowledgeBasesPage.d.ts +2 -0
  217. package/dist/botlit/pages/KnowledgeBasesPage.js +30 -31
  218. package/dist/botlit/pages/KnowledgeBasesPage.js.map +1 -1
  219. package/dist/botlit/pages/MCPServerDetailPage.d.ts +6 -0
  220. package/dist/botlit/pages/MCPServerDetailPage.js +82 -83
  221. package/dist/botlit/pages/MCPServerDetailPage.js.map +1 -1
  222. package/dist/botlit/pages/MCPServersPage.d.ts +2 -0
  223. package/dist/botlit/pages/MCPServersPage.js +54 -55
  224. package/dist/botlit/pages/MCPServersPage.js.map +1 -1
  225. package/dist/botlit/pages/PoliciesPage.d.ts +2 -0
  226. package/dist/botlit/pages/PoliciesPage.js +25 -26
  227. package/dist/botlit/pages/PoliciesPage.js.map +1 -1
  228. package/dist/botlit/pages/PolicyDetailPage.d.ts +6 -0
  229. package/dist/botlit/pages/PolicyDetailPage.js +257 -259
  230. package/dist/botlit/pages/PolicyDetailPage.js.map +1 -1
  231. package/dist/botlit/pages/PromptStudioPage.d.ts +2 -0
  232. package/dist/botlit/pages/PromptStudioPage.js +35 -35
  233. package/dist/botlit/pages/PromptStudioPage.js.map +1 -1
  234. package/dist/botlit/pages/PromptTemplateDetailPage.d.ts +6 -0
  235. package/dist/botlit/pages/PromptTemplateDetailPage.js +363 -362
  236. package/dist/botlit/pages/PromptTemplateDetailPage.js.map +1 -1
  237. package/dist/botlit/pages/PromptTemplatesPage.d.ts +2 -0
  238. package/dist/botlit/pages/PromptTemplatesPage.js +26 -27
  239. package/dist/botlit/pages/PromptTemplatesPage.js.map +1 -1
  240. package/dist/botlit/pages/RetrievalProfileDetailPage.d.ts +6 -0
  241. package/dist/botlit/pages/RetrievalProfileDetailPage.js +150 -158
  242. package/dist/botlit/pages/RetrievalProfileDetailPage.js.map +1 -1
  243. package/dist/botlit/pages/RetrievalProfilesPage.d.ts +2 -0
  244. package/dist/botlit/pages/RetrievalProfilesPage.js +24 -25
  245. package/dist/botlit/pages/RetrievalProfilesPage.js.map +1 -1
  246. package/dist/botlit/pages/SettingsPage.d.ts +2 -0
  247. package/dist/botlit/pages/SettingsPage.js +124 -125
  248. package/dist/botlit/pages/SettingsPage.js.map +1 -1
  249. package/dist/botlit/pages/SkillDetailPage.d.ts +6 -0
  250. package/dist/botlit/pages/SkillDetailPage.js +216 -217
  251. package/dist/botlit/pages/SkillDetailPage.js.map +1 -1
  252. package/dist/botlit/pages/SkillsPage.d.ts +2 -0
  253. package/dist/botlit/pages/SkillsPage.js +24 -25
  254. package/dist/botlit/pages/SkillsPage.js.map +1 -1
  255. package/dist/botlit/pages/StorePackageDetailPage.d.ts +2 -0
  256. package/dist/botlit/pages/StorePackageDetailPage.js +38 -39
  257. package/dist/botlit/pages/StorePackageDetailPage.js.map +1 -1
  258. package/dist/botlit/pages/StorePage.d.ts +2 -0
  259. package/dist/botlit/pages/StorePage.js +135 -136
  260. package/dist/botlit/pages/StorePage.js.map +1 -1
  261. package/dist/botlit/pages/index.d.ts +38 -0
  262. package/dist/botlit/permissions/PermissionRequired.d.ts +20 -0
  263. package/dist/botlit/permissions/PermissionRequired.js +10 -11
  264. package/dist/botlit/permissions/PermissionRequired.js.map +1 -1
  265. package/dist/botlit/permissions/botmanorPermissions.d.ts +82 -0
  266. package/dist/botlit/permissions/botmanorPermissions.js +1 -2
  267. package/dist/botlit/permissions/botmanorPermissions.js.map +1 -1
  268. package/dist/botlit/permissions/index.d.ts +7 -0
  269. package/dist/botlit/permissions/index.js +4 -3
  270. package/dist/botlit/permissions/useBotmanorPermissions.d.ts +41 -0
  271. package/dist/botlit/permissions/useBotmanorPermissions.js +1 -2
  272. package/dist/botlit/permissions/useBotmanorPermissions.js.map +1 -1
  273. package/dist/botlit/providers/BotlitProvider.d.ts +14 -0
  274. package/dist/botlit/providers/BotlitProvider.js +3 -3
  275. package/dist/botlit/providers/BotlitProvider.js.map +1 -1
  276. package/dist/botlit/store/botlitStore.d.ts +85 -0
  277. package/dist/botlit/store/botlitStore.js +1 -2
  278. package/dist/botlit/store/botlitStore.js.map +1 -1
  279. package/dist/botlit/store/renamedKeyStorage.d.ts +13 -0
  280. package/dist/botlit/store/renamedKeyStorage.js +1 -2
  281. package/dist/botlit/store/renamedKeyStorage.js.map +1 -1
  282. package/dist/botlit/types/index.d.ts +1008 -0
  283. package/dist/botlit/utils/cn.d.ts +2 -0
  284. package/dist/botlit/utils/cn.js +1 -2
  285. package/dist/botlit/utils/cn.js.map +1 -1
  286. package/dist/botlit/utils/embedding-models.d.ts +9 -0
  287. package/dist/botlit/utils/embedding-models.js +1 -2
  288. package/dist/botlit/utils/embedding-models.js.map +1 -1
  289. package/dist/botlit/utils/errors.d.ts +19 -0
  290. package/dist/botlit/utils/errors.js +1 -2
  291. package/dist/botlit/utils/errors.js.map +1 -1
  292. package/dist/botlit/utils/formatters.d.ts +38 -0
  293. package/dist/botlit/utils/formatters.js +0 -1
  294. package/dist/botlit/utils/formatters.js.map +1 -1
  295. package/dist/botlit/utils/navigation.d.ts +19 -0
  296. package/dist/botlit/utils/navigation.js +1 -2
  297. package/dist/botlit/utils/navigation.js.map +1 -1
  298. package/dist/botlit/utils/policyConfig.d.ts +68 -0
  299. package/dist/botlit/utils/policyConfig.js +2 -3
  300. package/dist/botlit/utils/policyConfig.js.map +1 -1
  301. package/dist/botlit/utils/unions.d.ts +25 -0
  302. package/dist/botlit/utils/unions.js +1 -2
  303. package/dist/botlit/utils/unions.js.map +1 -1
  304. package/dist/dev/App.d.ts +2 -0
  305. package/dist/dev/main.d.ts +0 -0
  306. package/dist/generated/global-operations.d.ts +197 -0
  307. package/dist/generated/global-operations.js +1 -2
  308. package/dist/generated/global-operations.js.map +1 -1
  309. package/dist/generated/global-types.d.ts +27678 -0
  310. package/dist/generated/global-types.js +1 -2
  311. package/dist/generated/global-types.js.map +1 -1
  312. package/dist/generated/wspace-operations.d.ts +5489 -0
  313. package/dist/generated/wspace-operations.js +88 -84
  314. package/dist/generated/wspace-operations.js.map +1 -1
  315. package/dist/generated/wspace-types.d.ts +152017 -0
  316. package/dist/generated/wspace-types.js +1 -2
  317. package/dist/generated/wspace-types.js.map +1 -1
  318. package/dist/index.d.ts +5 -0
  319. package/dist/index.js +5 -6
  320. package/dist/shared/hooks/useTr.d.ts +16 -0
  321. package/dist/shared/hooks/useTr.js +1 -2
  322. package/dist/shared/hooks/useTr.js.map +1 -1
  323. package/dist/stories/Badge.stories.d.ts +11 -0
  324. package/dist/stories/Button.stories.d.ts +13 -0
  325. package/dist/stories/EmptyState.stories.d.ts +8 -0
  326. package/dist/stories/StatusBadge.stories.d.ts +9 -0
  327. package/dist/test/fixtures.d.ts +39 -0
  328. package/dist/test/happydom.d.ts +1 -0
  329. package/dist/test/renderPage.d.ts +18 -0
  330. package/dist/test/setup.d.ts +9 -0
  331. package/dist/utils/nativeBridge.d.ts +2 -0
  332. package/dist/utils/nativeBridge.js +1 -2
  333. package/package.json +87 -60
  334. package/dist/botlit/hooks/useConversations.js +0 -64
  335. package/dist/botlit/hooks/useConversations.js.map +0 -1
@@ -1,38 +1,38 @@
1
1
  import { useBotlit as e } from "../providers/BotlitProvider.js";
2
- import { graphqlErrorMessage as t } from "../utils/errors.js";
3
- import { formatRelativeTime as n } from "../utils/formatters.js";
4
- import { BOTMANOR_PERMISSIONS as r } from "../permissions/botmanorPermissions.js";
5
- import { BotmanorPermissionGate as i } from "../permissions/useBotmanorPermissions.js";
2
+ import { isNative as t, nativeCopyText as n, nativeImpact as r, nativeNotify as i, nativeToast as ee } from "../../utils/nativeBridge.js";
6
3
  import { PageLayout as a } from "../components/PageLayout.js";
7
- import { Button as o } from "../components/Button.js";
8
- import "../permissions/index.js";
9
- import { Card as s, CardContent as c, CardDescription as l, CardHeader as u, CardTitle as d } from "../components/Card.js";
10
- import { Badge as f, StatusBadge as ee } from "../components/Badge.js";
11
- import { isNative as p, nativeCopyText as te, nativeImpact as ne, nativeNotify as m, nativeToast as re } from "../../utils/nativeBridge.js";
12
- import { EmptyState as ie } from "../components/EmptyState.js";
13
- import { FormField as h, Input as g, Textarea as _ } from "../components/Input.js";
14
- import { toUnion as v } from "../utils/unions.js";
15
- import { promptTemplateExamples as ae, promptTemplateVariables as oe, useCreatePromptTemplate as se, useDeletePromptTemplate as ce, usePromptTemplate as le, useRenderPromptTemplate as ue, useUpdatePromptTemplate as de } from "../hooks/usePromptTemplates.js";
4
+ import { BOTMANOR_PERMISSIONS as o } from "../permissions/botmanorPermissions.js";
5
+ import { BotmanorPermissionGate as s } from "../permissions/useBotmanorPermissions.js";
6
+ import { EmptyState as te } from "../components/EmptyState.js";
7
+ import { Card as c, CardContent as l, CardDescription as u, CardHeader as d, CardTitle as f } from "../components/Card.js";
8
+ import { Button as p } from "../components/Button.js";
9
+ import { FormField as m, Input as h, Textarea as g } from "../components/Input.js";
10
+ import { Badge as _, StatusBadge as ne } from "../components/Badge.js";
16
11
  import "../hooks/index.js";
17
- import { useMemo as fe, useState as y } from "react";
18
- import { PagePurpose as pe } from "@burdenoff/fe-libs/ui";
19
- import { Fragment as b, jsx as x, jsxs as S } from "react/jsx-runtime";
20
- import { useParams as me } from "react-router";
21
- import { ArrowLeft as he, Check as ge, Code as C, Copy as _e, Edit3 as ve, Eye as w, FileText as T, Play as E, Save as D, Settings as ye, Trash2 as O, Variable as k } from "lucide-react";
22
- import { toast as A } from "sonner";
23
- //#region src/botlit/pages/PromptTemplateDetailPage.tsx
24
- var j = [
12
+ import { promptTemplateExamples as v, promptTemplateVariables as y, useCreatePromptTemplate as re, useDeletePromptTemplate as ie, usePromptTemplate as ae, useRenderPromptTemplate as oe, useUpdatePromptTemplate as se } from "../hooks/usePromptTemplates.js";
13
+ import { formatRelativeTime as ce } from "../utils/formatters.js";
14
+ import { graphqlErrorMessage as le } from "../utils/errors.js";
15
+ import { toUnion as b } from "../utils/unions.js";
16
+ import "../permissions/index.js";
17
+ import { useMemo as ue, useState as x } from "react";
18
+ import { PagePurpose as de } from "@burdenoff/fe-libs/ui";
19
+ import { Fragment as S, jsx as C, jsxs as w } from "react/jsx-runtime";
20
+ import { useParams as fe } from "react-router";
21
+ import { ArrowLeft as pe, Check as me, Code as T, Copy as he, Edit3 as ge, Eye as E, FileText as D, Play as O, Save as k, Settings as _e, Trash2 as A, Variable as j } from "lucide-react";
22
+ import { toast as M } from "sonner";
23
+ // src/botlit/pages/PromptTemplateDetailPage.tsx
24
+ var N = [
25
25
  "string",
26
26
  "number",
27
27
  "boolean",
28
28
  "array",
29
29
  "object"
30
- ], be = [
30
+ ], ve = [
31
31
  "PRIVATE",
32
32
  "WORKSPACE",
33
33
  "PUBLIC"
34
- ], M = ({ isNew: M }) => {
35
- let { templateId: xe } = me(), { navigateTo: N } = e(), { data: P, loading: Se } = le(M ? void 0 : xe), { create: Ce, loading: we } = se(), { update: Te, loading: Ee } = de(), { remove: De, loading: Oe } = ce(), { render: ke, loading: Ae } = ue(), [F, I] = y("edit"), [L, R] = y(!1), [z, je] = y({}), [B, V] = y(null), [H, U] = y(null), [W, G] = y(!1), [Me, K] = y(!1), [q, J] = y({
34
+ ], P = ({ isNew: P }) => {
35
+ let { templateId: ye } = fe(), { navigateTo: F } = e(), { data: I, loading: be } = ae(P ? void 0 : ye), { create: xe, loading: Se } = re(), { update: Ce, loading: we } = se(), { remove: Te, loading: Ee } = ie(), { render: De, loading: Oe } = oe(), [L, R] = x("edit"), [z, B] = x(!1), [V, ke] = x({}), [H, U] = x(null), [W, G] = x(null), [K, q] = x(!1), [Ae, je] = x(!1), [J, Y] = x({
36
36
  name: "",
37
37
  slug: "",
38
38
  description: "",
@@ -40,192 +40,194 @@ var j = [
40
40
  templateText: "",
41
41
  variables: [],
42
42
  exampleInputs: [{}]
43
- }), Y = fe(() => {
44
- let e = M ? q.templateText : P?.templateText || "", t = /\{\{(\w+)\}\}/g, n = /* @__PURE__ */ new Set(), r;
43
+ }), X = ue(() => {
44
+ let e = P ? J.templateText : I?.templateText || "", t = /\{\{(\w+)\}\}/g, n = /* @__PURE__ */ new Set(), r;
45
45
  for (; (r = t.exec(e)) !== null;) n.add(r[1]);
46
46
  return Array.from(n);
47
47
  }, [
48
- M,
49
- q.templateText,
50
- P?.templateText
51
- ]), Ne = async () => {
52
- if (!(!q.name || !q.slug)) {
48
+ P,
49
+ J.templateText,
50
+ I?.templateText
51
+ ]), Me = async () => {
52
+ if (J.name && J.slug) {
53
53
  try {
54
- await Ce({
55
- name: q.name,
56
- slug: q.slug,
57
- description: q.description,
58
- visibility: q.visibility,
59
- templateText: q.templateText,
60
- variables: q.variables,
61
- exampleInputs: q.exampleInputs
54
+ await xe({
55
+ name: J.name,
56
+ slug: J.slug,
57
+ description: J.description,
58
+ visibility: J.visibility,
59
+ templateText: J.templateText,
60
+ variables: J.variables,
61
+ exampleInputs: J.exampleInputs
62
62
  });
63
63
  } catch (e) {
64
- A.error(e instanceof Error ? e.message : "Failed to create prompt template");
64
+ M.error(e instanceof Error ? e.message : "Failed to create prompt template");
65
65
  return;
66
66
  }
67
- A.success(`Template "${q.name}" created`), N("prompt-templates");
67
+ M.success(`Template "${J.name}" created`), F("prompt-templates");
68
68
  }
69
- }, Pe = () => {
70
- J({
71
- ...q,
72
- variables: [...q.variables, {
69
+ }, Ne = () => {
70
+ Y({
71
+ ...J,
72
+ variables: [...J.variables, {
73
73
  name: "",
74
74
  type: "string",
75
75
  required: !0,
76
76
  defaultValue: void 0
77
77
  }]
78
78
  });
79
- }, X = (e, t) => {
80
- let n = [...q.variables];
79
+ }, Z = (e, t) => {
80
+ let n = [...J.variables];
81
81
  n[e] = {
82
82
  ...n[e],
83
83
  ...t
84
- }, J({
85
- ...q,
84
+ }, Y({
85
+ ...J,
86
86
  variables: n
87
87
  });
88
- }, Fe = (e) => {
89
- J({
90
- ...q,
91
- variables: q.variables.filter((t, n) => n !== e)
88
+ }, Pe = (e) => {
89
+ Y({
90
+ ...J,
91
+ variables: J.variables.filter((t, n) => n !== e)
92
92
  });
93
- }, Ie = async () => {
94
- if (P) {
95
- U(null);
93
+ }, Fe = async () => {
94
+ if (I) {
95
+ G(null);
96
96
  try {
97
- V(await ke({
98
- templateId: P.id,
99
- variables: z
100
- }));
97
+ let e = await De({
98
+ templateId: I.id,
99
+ variables: V
100
+ });
101
+ U(e);
101
102
  } catch (e) {
102
- let n = t(e, "Failed to render prompt template");
103
- V(null), U(n), A.error(n);
103
+ let t = le(e, "Failed to render prompt template");
104
+ U(null), G(t), M.error(t);
104
105
  }
105
106
  }
106
- }, Le = async () => {
107
- await te(P?.templateText || q.templateText), R(!0), p() && re("Copied"), setTimeout(() => R(!1), 2e3);
108
- }, Re = () => {
109
- P && (J({
110
- name: P.name,
111
- slug: P.slug,
112
- description: P.description || "",
113
- visibility: v(P.visibility, be, "PRIVATE"),
114
- templateText: P.templateText,
115
- variables: oe(P),
116
- exampleInputs: ae(P)
117
- }), G(!0));
118
- }, ze = async () => {
119
- if (!(!P || !q.name || !q.slug)) {
107
+ }, Ie = async () => {
108
+ let e = I?.templateText || J.templateText;
109
+ await n(e), B(!0), t() && ee("Copied"), setTimeout(() => B(!1), 2e3);
110
+ }, Le = () => {
111
+ I && (Y({
112
+ name: I.name,
113
+ slug: I.slug,
114
+ description: I.description || "",
115
+ visibility: b(I.visibility, ve, "PRIVATE"),
116
+ templateText: I.templateText,
117
+ variables: y(I),
118
+ exampleInputs: v(I)
119
+ }), q(!0));
120
+ }, Re = async () => {
121
+ if (I && J.name && J.slug) {
120
122
  try {
121
- await Te({
122
- templateId: P.id,
123
+ await Ce({
124
+ templateId: I.id,
123
125
  input: {
124
- name: q.name,
125
- slug: q.slug,
126
- description: q.description,
127
- visibility: q.visibility,
128
- templateText: q.templateText,
129
- variables: q.variables,
130
- exampleInputs: q.exampleInputs
126
+ name: J.name,
127
+ slug: J.slug,
128
+ description: J.description,
129
+ visibility: J.visibility,
130
+ templateText: J.templateText,
131
+ variables: J.variables,
132
+ exampleInputs: J.exampleInputs
131
133
  }
132
134
  });
133
135
  } catch (e) {
134
- A.error(e instanceof Error ? e.message : "Failed to update prompt template");
136
+ M.error(e instanceof Error ? e.message : "Failed to update prompt template");
135
137
  return;
136
138
  }
137
- A.success("Template updated"), G(!1);
139
+ M.success("Template updated"), q(!1);
138
140
  }
139
- }, Be = async () => {
140
- if (P) try {
141
- await De(P.id), p() && m("success"), N("prompt-templates");
141
+ }, ze = async () => {
142
+ if (I) try {
143
+ await Te(I.id), t() && i("success"), F("prompt-templates");
142
144
  } catch (e) {
143
- throw p() && m("error"), e;
145
+ throw t() && i("error"), e;
144
146
  }
145
- }, Z = (e) => e.replace(/\{\{(\w+)\}\}/g, "<span class=\"bg-action-primary-bg/20 text-primary px-1 rounded font-mono\">{{$1}}</span>");
146
- if (M) return /* @__PURE__ */ x(a, {
147
+ }, Be = (e) => e.replace(/\{\{(\w+)\}\}/g, "<span class=\"bg-action-primary-bg/20 text-primary px-1 rounded font-mono\">{{$1}}</span>");
148
+ if (P) return /* @__PURE__ */ C(a, {
147
149
  title: "Create Prompt Template",
148
150
  description: "Define a reusable prompt template with variables",
149
- actions: /* @__PURE__ */ S("div", {
151
+ actions: /* @__PURE__ */ w("div", {
150
152
  className: "flex gap-2",
151
- children: [/* @__PURE__ */ x(o, {
153
+ children: [/* @__PURE__ */ C(p, {
152
154
  variant: "outline",
153
- onClick: () => N("prompt-templates"),
155
+ onClick: () => F("prompt-templates"),
154
156
  children: "Cancel"
155
- }), /* @__PURE__ */ x(o, {
156
- leftIcon: /* @__PURE__ */ x(D, { size: 16 }),
157
- onClick: Ne,
158
- isLoading: we,
159
- disabled: !q.name || !q.slug,
157
+ }), /* @__PURE__ */ C(p, {
158
+ leftIcon: /* @__PURE__ */ C(k, { size: 16 }),
159
+ onClick: Me,
160
+ isLoading: Se,
161
+ disabled: !J.name || !J.slug,
160
162
  children: "Create Template"
161
163
  })]
162
164
  }),
163
- children: /* @__PURE__ */ S("div", {
165
+ children: /* @__PURE__ */ w("div", {
164
166
  className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
165
- children: [/* @__PURE__ */ S("div", {
167
+ children: [/* @__PURE__ */ w("div", {
166
168
  className: "lg:col-span-2 space-y-6",
167
169
  children: [
168
- /* @__PURE__ */ S(s, { children: [/* @__PURE__ */ x(u, { children: /* @__PURE__ */ x(d, { children: "Basic Information" }) }), /* @__PURE__ */ S(c, {
170
+ /* @__PURE__ */ w(c, { children: [/* @__PURE__ */ C(d, { children: /* @__PURE__ */ C(f, { children: "Basic Information" }) }), /* @__PURE__ */ w(l, {
169
171
  className: "space-y-4",
170
172
  children: [
171
- /* @__PURE__ */ S("div", {
173
+ /* @__PURE__ */ w("div", {
172
174
  className: "grid grid-cols-2 gap-4",
173
- children: [/* @__PURE__ */ x(h, {
175
+ children: [/* @__PURE__ */ C(m, {
174
176
  label: "Template Name",
175
177
  required: !0,
176
- children: /* @__PURE__ */ x(g, {
178
+ children: /* @__PURE__ */ C(h, {
177
179
  placeholder: "e.g., Technical Support Template",
178
- value: q.name,
179
- onChange: (e) => J({
180
- ...q,
180
+ value: J.name,
181
+ onChange: (e) => Y({
182
+ ...J,
181
183
  name: e.target.value
182
184
  })
183
185
  })
184
- }), /* @__PURE__ */ x(h, {
186
+ }), /* @__PURE__ */ C(m, {
185
187
  label: "Slug",
186
188
  required: !0,
187
189
  description: "Unique identifier (lowercase, dashes)",
188
- children: /* @__PURE__ */ x(g, {
190
+ children: /* @__PURE__ */ C(h, {
189
191
  placeholder: "e.g., technical-support",
190
- value: q.slug,
191
- onChange: (e) => J({
192
- ...q,
192
+ value: J.slug,
193
+ onChange: (e) => Y({
194
+ ...J,
193
195
  slug: e.target.value.toLowerCase().replace(/[^a-z0-9-]/g, "-")
194
196
  })
195
197
  })
196
198
  })]
197
199
  }),
198
- /* @__PURE__ */ x(h, {
200
+ /* @__PURE__ */ C(m, {
199
201
  label: "Description",
200
- children: /* @__PURE__ */ x(_, {
202
+ children: /* @__PURE__ */ C(g, {
201
203
  placeholder: "What is this template used for?",
202
- value: q.description,
203
- onChange: (e) => J({
204
- ...q,
204
+ value: J.description,
205
+ onChange: (e) => Y({
206
+ ...J,
205
207
  description: e.target.value
206
208
  }),
207
209
  rows: 2
208
210
  })
209
211
  }),
210
- /* @__PURE__ */ x(h, {
212
+ /* @__PURE__ */ C(m, {
211
213
  label: "Visibility",
212
- children: /* @__PURE__ */ S("select", {
214
+ children: /* @__PURE__ */ w("select", {
213
215
  className: "flex h-10 w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm",
214
- value: q.visibility,
215
- onChange: (e) => J({
216
- ...q,
216
+ value: J.visibility,
217
+ onChange: (e) => Y({
218
+ ...J,
217
219
  visibility: e.target.value
218
220
  }),
219
221
  children: [
220
- /* @__PURE__ */ x("option", {
222
+ /* @__PURE__ */ C("option", {
221
223
  value: "PRIVATE",
222
224
  children: "Private"
223
225
  }),
224
- /* @__PURE__ */ x("option", {
226
+ /* @__PURE__ */ C("option", {
225
227
  value: "WORKSPACE",
226
228
  children: "Workspace"
227
229
  }),
228
- /* @__PURE__ */ x("option", {
230
+ /* @__PURE__ */ C("option", {
229
231
  value: "PUBLIC",
230
232
  children: "Public"
231
233
  })
@@ -234,116 +236,116 @@ var j = [
234
236
  })
235
237
  ]
236
238
  })] }),
237
- /* @__PURE__ */ S(s, { children: [/* @__PURE__ */ S(u, { children: [/* @__PURE__ */ S(d, {
239
+ /* @__PURE__ */ w(c, { children: [/* @__PURE__ */ w(d, { children: [/* @__PURE__ */ w(f, {
238
240
  className: "flex items-center gap-2",
239
- children: [/* @__PURE__ */ x(C, { size: 18 }), "Template Content"]
240
- }), /* @__PURE__ */ S(l, { children: [
241
+ children: [/* @__PURE__ */ C(T, { size: 18 }), "Template Content"]
242
+ }), /* @__PURE__ */ w(u, { children: [
241
243
  "Use ",
242
244
  "{{variable_name}}",
243
245
  " syntax for variables"
244
- ] })] }), /* @__PURE__ */ S(c, { children: [/* @__PURE__ */ x(_, {
246
+ ] })] }), /* @__PURE__ */ w(l, { children: [/* @__PURE__ */ C(g, {
245
247
  className: "font-mono text-sm min-h-[300px]",
246
248
  placeholder: "You are a helpful assistant for {{company_name}}.\n\nYour role is to help users with {{task_type}}.\n\nGuidelines:\n- Be helpful and friendly\n- Provide accurate information\n- Reference: {{docs_url}}",
247
- value: q.templateText,
248
- onChange: (e) => J({
249
- ...q,
249
+ value: J.templateText,
250
+ onChange: (e) => Y({
251
+ ...J,
250
252
  templateText: e.target.value
251
253
  })
252
- }), Y.length > 0 && /* @__PURE__ */ S("div", {
254
+ }), X.length > 0 && /* @__PURE__ */ w("div", {
253
255
  className: "mt-3 flex items-center gap-2",
254
- children: [/* @__PURE__ */ x("span", {
256
+ children: [/* @__PURE__ */ C("span", {
255
257
  className: "text-sm text-text-secondary",
256
258
  children: "Detected variables:"
257
- }), Y.map((e) => /* @__PURE__ */ x(f, {
259
+ }), X.map((e) => /* @__PURE__ */ C(_, {
258
260
  variant: "secondary",
259
261
  className: "font-mono",
260
262
  children: e
261
263
  }, e))]
262
264
  })] })] }),
263
- /* @__PURE__ */ S(s, { children: [/* @__PURE__ */ S(u, { children: [/* @__PURE__ */ S(d, {
265
+ /* @__PURE__ */ w(c, { children: [/* @__PURE__ */ w(d, { children: [/* @__PURE__ */ w(f, {
264
266
  className: "flex items-center justify-between",
265
- children: [/* @__PURE__ */ S("span", {
267
+ children: [/* @__PURE__ */ w("span", {
266
268
  className: "flex items-center gap-2",
267
- children: [/* @__PURE__ */ x(k, { size: 18 }), "Variables"]
268
- }), /* @__PURE__ */ x(o, {
269
+ children: [/* @__PURE__ */ C(j, { size: 18 }), "Variables"]
270
+ }), /* @__PURE__ */ C(p, {
269
271
  variant: "outline",
270
272
  size: "sm",
271
- onClick: Pe,
273
+ onClick: Ne,
272
274
  children: "Add Variable"
273
275
  })]
274
- }), /* @__PURE__ */ x(l, { children: "Define the variables used in your template" })] }), /* @__PURE__ */ x(c, { children: q.variables.length > 0 ? /* @__PURE__ */ x("div", {
276
+ }), /* @__PURE__ */ C(u, { children: "Define the variables used in your template" })] }), /* @__PURE__ */ C(l, { children: J.variables.length > 0 ? /* @__PURE__ */ C("div", {
275
277
  className: "space-y-4",
276
- children: q.variables.map((e, t) => /* @__PURE__ */ S("div", {
278
+ children: J.variables.map((e, t) => /* @__PURE__ */ w("div", {
277
279
  className: "p-4 border rounded-lg bg-bg-sunken/30 space-y-3",
278
- children: [/* @__PURE__ */ S("div", {
280
+ children: [/* @__PURE__ */ w("div", {
279
281
  className: "grid grid-cols-4 gap-3",
280
282
  children: [
281
- /* @__PURE__ */ x(h, {
283
+ /* @__PURE__ */ C(m, {
282
284
  label: "Name",
283
- children: /* @__PURE__ */ x(g, {
285
+ children: /* @__PURE__ */ C(h, {
284
286
  className: "font-mono",
285
287
  placeholder: "variable_name",
286
288
  value: e.name,
287
- onChange: (e) => X(t, { name: e.target.value })
289
+ onChange: (e) => Z(t, { name: e.target.value })
288
290
  })
289
291
  }),
290
- /* @__PURE__ */ x(h, {
292
+ /* @__PURE__ */ C(m, {
291
293
  label: "Type",
292
- children: /* @__PURE__ */ x("select", {
294
+ children: /* @__PURE__ */ C("select", {
293
295
  className: "flex h-10 w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm",
294
296
  value: e.type,
295
- onChange: (e) => X(t, { type: v(e.target.value, j, "string") }),
296
- children: j.map((e) => /* @__PURE__ */ x("option", {
297
+ onChange: (e) => Z(t, { type: b(e.target.value, N, "string") }),
298
+ children: N.map((e) => /* @__PURE__ */ C("option", {
297
299
  value: e,
298
300
  children: e
299
301
  }, e))
300
302
  })
301
303
  }),
302
- /* @__PURE__ */ x(h, {
304
+ /* @__PURE__ */ C(m, {
303
305
  label: "Default Value",
304
- children: /* @__PURE__ */ x(g, {
306
+ children: /* @__PURE__ */ C(h, {
305
307
  placeholder: "Optional",
306
308
  value: String(e.defaultValue || ""),
307
- onChange: (e) => X(t, { defaultValue: e.target.value || void 0 })
309
+ onChange: (e) => Z(t, { defaultValue: e.target.value || void 0 })
308
310
  })
309
311
  }),
310
- /* @__PURE__ */ S("div", {
312
+ /* @__PURE__ */ w("div", {
311
313
  className: "flex items-end gap-2",
312
- children: [/* @__PURE__ */ S("label", {
314
+ children: [/* @__PURE__ */ w("label", {
313
315
  className: "flex items-center gap-2 h-10",
314
- children: [/* @__PURE__ */ x("input", {
316
+ children: [/* @__PURE__ */ C("input", {
315
317
  type: "checkbox",
316
318
  checked: e.required,
317
- onChange: (e) => X(t, { required: e.target.checked }),
319
+ onChange: (e) => Z(t, { required: e.target.checked }),
318
320
  className: "h-4 w-4"
319
- }), /* @__PURE__ */ x("span", {
321
+ }), /* @__PURE__ */ C("span", {
320
322
  className: "text-sm",
321
323
  children: "Required"
322
324
  })]
323
- }), /* @__PURE__ */ x(o, {
325
+ }), /* @__PURE__ */ C(p, {
324
326
  variant: "ghost",
325
327
  size: "sm",
326
328
  className: "text-status-error-text",
327
- onClick: () => Fe(t),
329
+ onClick: () => Pe(t),
328
330
  children: "Remove"
329
331
  })]
330
332
  })
331
333
  ]
332
- }), /* @__PURE__ */ x(h, {
334
+ }), /* @__PURE__ */ C(m, {
333
335
  label: "Description",
334
- children: /* @__PURE__ */ x(g, {
336
+ children: /* @__PURE__ */ C(h, {
335
337
  placeholder: "What is this variable for?",
336
338
  value: e.description || "",
337
- onChange: (e) => X(t, { description: e.target.value })
339
+ onChange: (e) => Z(t, { description: e.target.value })
338
340
  })
339
341
  })]
340
342
  }, t))
341
- }) : /* @__PURE__ */ S("div", {
343
+ }) : /* @__PURE__ */ w("div", {
342
344
  className: "text-center py-8 text-text-secondary",
343
345
  children: [
344
- /* @__PURE__ */ x(k, { className: "h-8 w-8 mx-auto mb-2 opacity-50" }),
345
- /* @__PURE__ */ x("p", { children: "No variables defined yet" }),
346
- /* @__PURE__ */ S("p", {
346
+ /* @__PURE__ */ C(j, { className: "h-8 w-8 mx-auto mb-2 opacity-50" }),
347
+ /* @__PURE__ */ C("p", { children: "No variables defined yet" }),
348
+ /* @__PURE__ */ w("p", {
347
349
  className: "text-sm",
348
350
  children: [
349
351
  "Variables are automatically detected from ",
@@ -354,31 +356,31 @@ var j = [
354
356
  ]
355
357
  }) })] })
356
358
  ]
357
- }), /* @__PURE__ */ S("div", {
359
+ }), /* @__PURE__ */ w("div", {
358
360
  className: "space-y-6",
359
- children: [/* @__PURE__ */ S(s, { children: [/* @__PURE__ */ x(u, { children: /* @__PURE__ */ S(d, {
361
+ children: [/* @__PURE__ */ w(c, { children: [/* @__PURE__ */ C(d, { children: /* @__PURE__ */ w(f, {
360
362
  className: "flex items-center gap-2",
361
- children: [/* @__PURE__ */ x(w, { size: 18 }), "Preview"]
362
- }) }), /* @__PURE__ */ x(c, { children: /* @__PURE__ */ x("div", {
363
+ children: [/* @__PURE__ */ C(E, { size: 18 }), "Preview"]
364
+ }) }), /* @__PURE__ */ C(l, { children: /* @__PURE__ */ C("div", {
363
365
  className: "p-4 bg-bg-sunken rounded-lg text-sm whitespace-pre-wrap font-mono",
364
- dangerouslySetInnerHTML: { __html: Z(q.templateText || "Enter template text...") }
365
- }) })] }), /* @__PURE__ */ S(s, { children: [/* @__PURE__ */ x(u, { children: /* @__PURE__ */ x(d, { children: "Quick Tips" }) }), /* @__PURE__ */ S(c, {
366
+ dangerouslySetInnerHTML: { __html: Be(J.templateText || "Enter template text...") }
367
+ }) })] }), /* @__PURE__ */ w(c, { children: [/* @__PURE__ */ C(d, { children: /* @__PURE__ */ C(f, { children: "Quick Tips" }) }), /* @__PURE__ */ w(l, {
366
368
  className: "text-sm space-y-2",
367
369
  children: [
368
- /* @__PURE__ */ S("p", { children: [
369
- /* @__PURE__ */ x("strong", { children: "Variables:" }),
370
+ /* @__PURE__ */ w("p", { children: [
371
+ /* @__PURE__ */ C("strong", { children: "Variables:" }),
370
372
  " Use ",
371
373
  "{{name}}",
372
374
  " syntax"
373
375
  ] }),
374
- /* @__PURE__ */ x("p", { children: /* @__PURE__ */ x("strong", { children: "Best Practices:" }) }),
375
- /* @__PURE__ */ S("ul", {
376
+ /* @__PURE__ */ C("p", { children: /* @__PURE__ */ C("strong", { children: "Best Practices:" }) }),
377
+ /* @__PURE__ */ w("ul", {
376
378
  className: "list-disc list-inside text-text-secondary space-y-1",
377
379
  children: [
378
- /* @__PURE__ */ x("li", { children: "Use descriptive variable names" }),
379
- /* @__PURE__ */ x("li", { children: "Provide default values when possible" }),
380
- /* @__PURE__ */ x("li", { children: "Include example inputs for testing" }),
381
- /* @__PURE__ */ x("li", { children: "Version your templates for changes" })
380
+ /* @__PURE__ */ C("li", { children: "Use descriptive variable names" }),
381
+ /* @__PURE__ */ C("li", { children: "Provide default values when possible" }),
382
+ /* @__PURE__ */ C("li", { children: "Include example inputs for testing" }),
383
+ /* @__PURE__ */ C("li", { children: "Version your templates for changes" })
382
384
  ]
383
385
  })
384
386
  ]
@@ -386,202 +388,202 @@ var j = [
386
388
  })]
387
389
  })
388
390
  });
389
- if (Se) return /* @__PURE__ */ x(a, {
391
+ if (be) return /* @__PURE__ */ C(a, {
390
392
  title: "Loading...",
391
- children: /* @__PURE__ */ x("div", { className: "h-96 bg-bg-sunken motion-safe:animate-vc-shimmer rounded-lg" })
393
+ children: /* @__PURE__ */ C("div", { className: "h-96 bg-bg-sunken motion-safe:animate-vc-shimmer rounded-lg" })
392
394
  });
393
- if (!P) return /* @__PURE__ */ x(a, {
395
+ if (!I) return /* @__PURE__ */ C(a, {
394
396
  title: "Template Not Found",
395
- children: /* @__PURE__ */ x(ie, {
397
+ children: /* @__PURE__ */ C(te, {
396
398
  illustration: "empty-files",
397
399
  title: "Template Not Found",
398
400
  description: "This prompt template doesn't exist.",
399
- action: /* @__PURE__ */ x(o, {
400
- onClick: () => N("prompt-templates"),
401
+ action: /* @__PURE__ */ C(p, {
402
+ onClick: () => F("prompt-templates"),
401
403
  children: "Back to Templates"
402
404
  })
403
405
  })
404
406
  });
405
- let Q = oe(P), $ = ae(P);
406
- return /* @__PURE__ */ x(a, {
407
- title: /* @__PURE__ */ S("div", {
407
+ let Q = y(I), $ = v(I);
408
+ return /* @__PURE__ */ C(a, {
409
+ title: /* @__PURE__ */ w("div", {
408
410
  className: "flex items-center gap-3",
409
411
  children: [
410
- /* @__PURE__ */ x(o, {
412
+ /* @__PURE__ */ C(p, {
411
413
  variant: "ghost",
412
414
  size: "icon",
413
- onClick: () => N("prompt-templates"),
414
- children: /* @__PURE__ */ x(he, { size: 20 })
415
+ onClick: () => F("prompt-templates"),
416
+ children: /* @__PURE__ */ C(pe, { size: 20 })
415
417
  }),
416
- /* @__PURE__ */ x("div", {
418
+ /* @__PURE__ */ C("div", {
417
419
  className: "p-2 rounded-lg bg-action-primary-bg/10",
418
- children: /* @__PURE__ */ x(T, { className: "h-6 w-6 text-primary" })
420
+ children: /* @__PURE__ */ C(D, { className: "h-6 w-6 text-primary" })
419
421
  }),
420
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ S("div", {
422
+ /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ w("div", {
421
423
  className: "flex items-center gap-2",
422
424
  children: [
423
- /* @__PURE__ */ x("span", { children: P.name }),
424
- /* @__PURE__ */ x(ee, { status: P.status }),
425
- /* @__PURE__ */ S(f, {
425
+ /* @__PURE__ */ C("span", { children: I.name }),
426
+ /* @__PURE__ */ C(ne, { status: I.status }),
427
+ /* @__PURE__ */ w(_, {
426
428
  variant: "secondary",
427
429
  className: "font-mono",
428
- children: ["v", P.version]
430
+ children: ["v", I.version]
429
431
  })
430
432
  ]
431
- }), /* @__PURE__ */ S("p", {
433
+ }), /* @__PURE__ */ w("p", {
432
434
  className: "text-sm font-normal text-text-secondary",
433
435
  children: [
434
- P.slug,
436
+ I.slug,
435
437
  " - ",
436
- P.description
438
+ I.description
437
439
  ]
438
440
  })] })
439
441
  ]
440
442
  }),
441
- actions: /* @__PURE__ */ S("div", {
443
+ actions: /* @__PURE__ */ w("div", {
442
444
  className: "flex gap-2",
443
- children: [/* @__PURE__ */ x(o, {
445
+ children: [/* @__PURE__ */ C(p, {
444
446
  variant: "outline",
445
- leftIcon: x(L ? ge : _e, { size: 16 }),
446
- onClick: Le,
447
- children: L ? "Copied!" : "Copy"
448
- }), W ? /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ x(o, {
447
+ leftIcon: C(z ? me : he, { size: 16 }),
448
+ onClick: Ie,
449
+ children: z ? "Copied!" : "Copy"
450
+ }), K ? /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ C(p, {
449
451
  variant: "outline",
450
- onClick: () => G(!1),
452
+ onClick: () => q(!1),
451
453
  children: "Cancel"
452
- }), /* @__PURE__ */ x(o, {
453
- leftIcon: /* @__PURE__ */ x(D, { size: 16 }),
454
- onClick: ze,
455
- isLoading: Ee,
456
- disabled: !q.name || !q.slug,
454
+ }), /* @__PURE__ */ C(p, {
455
+ leftIcon: /* @__PURE__ */ C(k, { size: 16 }),
456
+ onClick: Re,
457
+ isLoading: we,
458
+ disabled: !J.name || !J.slug,
457
459
  children: "Save Changes"
458
- })] }) : Me ? /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ x(o, {
460
+ })] }) : Ae ? /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ C(p, {
459
461
  variant: "outline",
460
- onClick: () => K(!1),
462
+ onClick: () => je(!1),
461
463
  children: "Cancel"
462
- }), /* @__PURE__ */ x(o, {
464
+ }), /* @__PURE__ */ C(p, {
463
465
  variant: "destructive",
464
- leftIcon: /* @__PURE__ */ x(O, { size: 16 }),
466
+ leftIcon: /* @__PURE__ */ C(A, { size: 16 }),
465
467
  onClick: () => {
466
- ne("medium"), Be();
468
+ r("medium"), ze();
467
469
  },
468
- isLoading: Oe,
470
+ isLoading: Ee,
469
471
  children: "Confirm Delete"
470
- })] }) : /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ x(i, {
471
- permission: r.PROMPT_TEMPLATE_UPDATE,
472
- children: /* @__PURE__ */ x(o, {
472
+ })] }) : /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ C(s, {
473
+ permission: o.PROMPT_TEMPLATE_UPDATE,
474
+ children: /* @__PURE__ */ C(p, {
473
475
  variant: "outline",
474
- leftIcon: /* @__PURE__ */ x(ve, { size: 16 }),
475
- onClick: Re,
476
+ leftIcon: /* @__PURE__ */ C(ge, { size: 16 }),
477
+ onClick: Le,
476
478
  children: "Edit Template"
477
479
  })
478
- }), /* @__PURE__ */ x(i, {
479
- permission: r.PROMPT_TEMPLATE_DELETE,
480
- children: /* @__PURE__ */ x(o, {
480
+ }), /* @__PURE__ */ C(s, {
481
+ permission: o.PROMPT_TEMPLATE_DELETE,
482
+ children: /* @__PURE__ */ C(p, {
481
483
  variant: "outline",
482
- leftIcon: /* @__PURE__ */ x(O, { size: 16 }),
483
- onClick: () => K(!0),
484
+ leftIcon: /* @__PURE__ */ C(A, { size: 16 }),
485
+ onClick: () => je(!0),
484
486
  children: "Delete"
485
487
  })
486
488
  })] })]
487
489
  }),
488
- children: /* @__PURE__ */ S("div", {
490
+ children: /* @__PURE__ */ w("div", {
489
491
  className: "space-y-6",
490
492
  children: [
491
- /* @__PURE__ */ S(pe, {
492
- icon: /* @__PURE__ */ x(T, { size: 18 }),
493
+ /* @__PURE__ */ w(de, {
494
+ icon: /* @__PURE__ */ C(D, { size: 18 }),
493
495
  children: [
494
496
  "This is a single reusable prompt template — its content with",
495
497
  " ",
496
- /* @__PURE__ */ x("code", { children: "{{variables}}" }),
498
+ /* @__PURE__ */ C("code", { children: "{{variables}}" }),
497
499
  ", its declared variables and example inputs, and its version history. Edit and preview it here to perfect the instructions, then reuse it across agents so they share consistent, version-controlled behaviour."
498
500
  ]
499
501
  }),
500
- W && /* @__PURE__ */ S(s, { children: [/* @__PURE__ */ S(u, { children: [/* @__PURE__ */ x(d, { children: "Edit Template" }), /* @__PURE__ */ x(l, { children: "Update template details and content" })] }), /* @__PURE__ */ S(c, {
502
+ K && /* @__PURE__ */ w(c, { children: [/* @__PURE__ */ w(d, { children: [/* @__PURE__ */ C(f, { children: "Edit Template" }), /* @__PURE__ */ C(u, { children: "Update template details and content" })] }), /* @__PURE__ */ w(l, {
501
503
  className: "space-y-4",
502
504
  children: [
503
- /* @__PURE__ */ S("div", {
505
+ /* @__PURE__ */ w("div", {
504
506
  className: "grid grid-cols-2 gap-4",
505
- children: [/* @__PURE__ */ x(h, {
507
+ children: [/* @__PURE__ */ C(m, {
506
508
  label: "Template Name",
507
509
  required: !0,
508
- children: /* @__PURE__ */ x(g, {
510
+ children: /* @__PURE__ */ C(h, {
509
511
  placeholder: "e.g., Technical Support Template",
510
- value: q.name,
511
- onChange: (e) => J({
512
- ...q,
512
+ value: J.name,
513
+ onChange: (e) => Y({
514
+ ...J,
513
515
  name: e.target.value
514
516
  })
515
517
  })
516
- }), /* @__PURE__ */ x(h, {
518
+ }), /* @__PURE__ */ C(m, {
517
519
  label: "Slug",
518
520
  required: !0,
519
521
  description: "Unique identifier (lowercase, dashes)",
520
- children: /* @__PURE__ */ x(g, {
522
+ children: /* @__PURE__ */ C(h, {
521
523
  placeholder: "e.g., technical-support",
522
- value: q.slug,
523
- onChange: (e) => J({
524
- ...q,
524
+ value: J.slug,
525
+ onChange: (e) => Y({
526
+ ...J,
525
527
  slug: e.target.value.toLowerCase().replace(/[^a-z0-9-]/g, "-")
526
528
  })
527
529
  })
528
530
  })]
529
531
  }),
530
- /* @__PURE__ */ x(h, {
532
+ /* @__PURE__ */ C(m, {
531
533
  label: "Description",
532
- children: /* @__PURE__ */ x(_, {
534
+ children: /* @__PURE__ */ C(g, {
533
535
  placeholder: "What is this template used for?",
534
- value: q.description,
535
- onChange: (e) => J({
536
- ...q,
536
+ value: J.description,
537
+ onChange: (e) => Y({
538
+ ...J,
537
539
  description: e.target.value
538
540
  }),
539
541
  rows: 2
540
542
  })
541
543
  }),
542
- /* @__PURE__ */ x(h, {
544
+ /* @__PURE__ */ C(m, {
543
545
  label: "Visibility",
544
- children: /* @__PURE__ */ S("select", {
546
+ children: /* @__PURE__ */ w("select", {
545
547
  className: "flex h-10 w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm",
546
- value: q.visibility,
547
- onChange: (e) => J({
548
- ...q,
548
+ value: J.visibility,
549
+ onChange: (e) => Y({
550
+ ...J,
549
551
  visibility: e.target.value
550
552
  }),
551
553
  children: [
552
- /* @__PURE__ */ x("option", {
554
+ /* @__PURE__ */ C("option", {
553
555
  value: "PRIVATE",
554
556
  children: "Private"
555
557
  }),
556
- /* @__PURE__ */ x("option", {
558
+ /* @__PURE__ */ C("option", {
557
559
  value: "WORKSPACE",
558
560
  children: "Workspace"
559
561
  }),
560
- /* @__PURE__ */ x("option", {
562
+ /* @__PURE__ */ C("option", {
561
563
  value: "PUBLIC",
562
564
  children: "Public"
563
565
  })
564
566
  ]
565
567
  })
566
568
  }),
567
- /* @__PURE__ */ x(h, {
569
+ /* @__PURE__ */ C(m, {
568
570
  label: "Template Content",
569
571
  description: "Use {{variable_name}} syntax for variables",
570
- children: /* @__PURE__ */ x(_, {
572
+ children: /* @__PURE__ */ C(g, {
571
573
  className: "font-mono text-sm min-h-[200px]",
572
- value: q.templateText,
573
- onChange: (e) => J({
574
- ...q,
574
+ value: J.templateText,
575
+ onChange: (e) => Y({
576
+ ...J,
575
577
  templateText: e.target.value
576
578
  })
577
579
  })
578
580
  }),
579
- Y.length > 0 && /* @__PURE__ */ S("div", {
581
+ X.length > 0 && /* @__PURE__ */ w("div", {
580
582
  className: "flex items-center gap-2",
581
- children: [/* @__PURE__ */ x("span", {
583
+ children: [/* @__PURE__ */ C("span", {
582
584
  className: "text-sm text-text-secondary",
583
585
  children: "Detected variables:"
584
- }), Y.map((e) => /* @__PURE__ */ x(f, {
586
+ }), X.map((e) => /* @__PURE__ */ C(_, {
585
587
  variant: "secondary",
586
588
  className: "font-mono",
587
589
  children: e
@@ -589,124 +591,124 @@ var j = [
589
591
  })
590
592
  ]
591
593
  })] }),
592
- /* @__PURE__ */ S("div", {
594
+ /* @__PURE__ */ w("div", {
593
595
  className: "grid grid-cols-2 md:grid-cols-4 gap-4",
594
596
  children: [
595
- /* @__PURE__ */ x(s, {
597
+ /* @__PURE__ */ C(c, {
596
598
  treatment: "glass",
597
599
  glow: !0,
598
- children: /* @__PURE__ */ S(c, {
600
+ children: /* @__PURE__ */ w(l, {
599
601
  className: "pt-6 text-center",
600
- children: [/* @__PURE__ */ x("p", {
602
+ children: [/* @__PURE__ */ C("p", {
601
603
  className: "text-3xl font-bold text-text-primary",
602
604
  children: Q.length
603
- }), /* @__PURE__ */ x("p", {
605
+ }), /* @__PURE__ */ C("p", {
604
606
  className: "text-sm text-text-secondary",
605
607
  children: "Variables"
606
608
  })]
607
609
  })
608
610
  }),
609
- /* @__PURE__ */ x(s, { children: /* @__PURE__ */ S(c, {
611
+ /* @__PURE__ */ C(c, { children: /* @__PURE__ */ w(l, {
610
612
  className: "pt-6 text-center",
611
- children: [/* @__PURE__ */ x("p", {
613
+ children: [/* @__PURE__ */ C("p", {
612
614
  className: "text-3xl font-bold text-text-primary",
613
615
  children: $.length
614
- }), /* @__PURE__ */ x("p", {
616
+ }), /* @__PURE__ */ C("p", {
615
617
  className: "text-sm text-text-secondary",
616
618
  children: "Examples"
617
619
  })]
618
620
  }) }),
619
- /* @__PURE__ */ x(s, { children: /* @__PURE__ */ S(c, {
621
+ /* @__PURE__ */ C(c, { children: /* @__PURE__ */ w(l, {
620
622
  className: "pt-6 text-center",
621
- children: [/* @__PURE__ */ x("p", {
623
+ children: [/* @__PURE__ */ C("p", {
622
624
  className: "text-3xl font-bold text-text-primary",
623
- children: P.revision
624
- }), /* @__PURE__ */ x("p", {
625
+ children: I.revision
626
+ }), /* @__PURE__ */ C("p", {
625
627
  className: "text-sm text-text-secondary",
626
628
  children: "Revision"
627
629
  })]
628
630
  }) }),
629
- /* @__PURE__ */ x(s, { children: /* @__PURE__ */ S(c, {
631
+ /* @__PURE__ */ C(c, { children: /* @__PURE__ */ w(l, {
630
632
  className: "pt-6 text-center",
631
- children: [/* @__PURE__ */ x("p", {
633
+ children: [/* @__PURE__ */ C("p", {
632
634
  className: "text-lg font-bold text-text-primary capitalize",
633
- children: P.visibility.toLowerCase()
634
- }), /* @__PURE__ */ x("p", {
635
+ children: I.visibility.toLowerCase()
636
+ }), /* @__PURE__ */ C("p", {
635
637
  className: "text-sm text-text-secondary",
636
638
  children: "Visibility"
637
639
  })]
638
640
  }) })
639
641
  ]
640
642
  }),
641
- /* @__PURE__ */ S("div", {
643
+ /* @__PURE__ */ w("div", {
642
644
  className: "flex gap-2 border-b",
643
645
  children: [
644
- /* @__PURE__ */ S(o, {
645
- variant: F === "edit" ? "default" : "ghost",
646
- onClick: () => I("edit"),
647
- children: [/* @__PURE__ */ x(C, { className: "h-4 w-4 mr-2" }), "Template"]
646
+ /* @__PURE__ */ w(p, {
647
+ variant: L === "edit" ? "default" : "ghost",
648
+ onClick: () => R("edit"),
649
+ children: [/* @__PURE__ */ C(T, { className: "h-4 w-4 mr-2" }), "Template"]
648
650
  }),
649
- /* @__PURE__ */ S(o, {
650
- variant: F === "preview" ? "default" : "ghost",
651
- onClick: () => I("preview"),
652
- children: [/* @__PURE__ */ x(w, { className: "h-4 w-4 mr-2" }), "Preview"]
651
+ /* @__PURE__ */ w(p, {
652
+ variant: L === "preview" ? "default" : "ghost",
653
+ onClick: () => R("preview"),
654
+ children: [/* @__PURE__ */ C(E, { className: "h-4 w-4 mr-2" }), "Preview"]
653
655
  }),
654
- /* @__PURE__ */ S(o, {
655
- variant: F === "test" ? "default" : "ghost",
656
- onClick: () => I("test"),
657
- children: [/* @__PURE__ */ x(E, { className: "h-4 w-4 mr-2" }), "Test"]
656
+ /* @__PURE__ */ w(p, {
657
+ variant: L === "test" ? "default" : "ghost",
658
+ onClick: () => R("test"),
659
+ children: [/* @__PURE__ */ C(O, { className: "h-4 w-4 mr-2" }), "Test"]
658
660
  })
659
661
  ]
660
662
  }),
661
- F === "edit" && /* @__PURE__ */ S("div", {
663
+ L === "edit" && /* @__PURE__ */ w("div", {
662
664
  className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
663
- children: [/* @__PURE__ */ x("div", {
665
+ children: [/* @__PURE__ */ C("div", {
664
666
  className: "lg:col-span-2",
665
- children: /* @__PURE__ */ S(s, { children: [/* @__PURE__ */ x(u, { children: /* @__PURE__ */ x(d, { children: "Template Content" }) }), /* @__PURE__ */ x(c, { children: /* @__PURE__ */ x("div", {
667
+ children: /* @__PURE__ */ w(c, { children: [/* @__PURE__ */ C(d, { children: /* @__PURE__ */ C(f, { children: "Template Content" }) }), /* @__PURE__ */ C(l, { children: /* @__PURE__ */ C("div", {
666
668
  className: "p-4 bg-bg-sunken rounded-lg font-mono text-sm whitespace-pre-wrap",
667
- children: /* @__PURE__ */ x("div", { dangerouslySetInnerHTML: { __html: Z(P.templateText) } })
669
+ children: /* @__PURE__ */ C("div", { dangerouslySetInnerHTML: { __html: Be(I.templateText) } })
668
670
  }) })] })
669
- }), /* @__PURE__ */ x("div", { children: /* @__PURE__ */ S(s, { children: [/* @__PURE__ */ x(u, { children: /* @__PURE__ */ S(d, {
671
+ }), /* @__PURE__ */ C("div", { children: /* @__PURE__ */ w(c, { children: [/* @__PURE__ */ C(d, { children: /* @__PURE__ */ w(f, {
670
672
  className: "flex items-center gap-2",
671
673
  children: [
672
- /* @__PURE__ */ x(k, { size: 18 }),
674
+ /* @__PURE__ */ C(j, { size: 18 }),
673
675
  "Variables (",
674
676
  Q.length,
675
677
  ")"
676
678
  ]
677
- }) }), /* @__PURE__ */ x(c, { children: Q.length > 0 ? /* @__PURE__ */ x("div", {
679
+ }) }), /* @__PURE__ */ C(l, { children: Q.length > 0 ? /* @__PURE__ */ C("div", {
678
680
  className: "space-y-3",
679
- children: Q.map((e, t) => /* @__PURE__ */ S("div", {
681
+ children: Q.map((e, t) => /* @__PURE__ */ w("div", {
680
682
  className: "p-3 border rounded-lg",
681
683
  children: [
682
- /* @__PURE__ */ S("div", {
684
+ /* @__PURE__ */ w("div", {
683
685
  className: "flex items-center justify-between mb-1",
684
- children: [/* @__PURE__ */ x("span", {
686
+ children: [/* @__PURE__ */ C("span", {
685
687
  className: "font-mono font-medium",
686
688
  children: e.name
687
- }), /* @__PURE__ */ S("div", {
689
+ }), /* @__PURE__ */ w("div", {
688
690
  className: "flex gap-1",
689
- children: [/* @__PURE__ */ x(f, {
691
+ children: [/* @__PURE__ */ C(_, {
690
692
  variant: "outline",
691
693
  className: "text-xs",
692
694
  children: e.type
693
- }), e.required && /* @__PURE__ */ x(f, {
695
+ }), e.required && /* @__PURE__ */ C(_, {
694
696
  variant: "destructive",
695
697
  className: "text-xs",
696
698
  children: "required"
697
699
  })]
698
700
  })]
699
701
  }),
700
- e.description && /* @__PURE__ */ x("p", {
702
+ e.description && /* @__PURE__ */ C("p", {
701
703
  className: "text-sm text-text-secondary",
702
704
  children: e.description
703
705
  }),
704
- e.defaultValue !== void 0 && /* @__PURE__ */ S("p", {
706
+ e.defaultValue !== void 0 && /* @__PURE__ */ w("p", {
705
707
  className: "text-xs text-text-secondary mt-1",
706
708
  children: [
707
709
  "Default:",
708
710
  " ",
709
- /* @__PURE__ */ x("code", {
711
+ /* @__PURE__ */ C("code", {
710
712
  className: "bg-bg-sunken px-1",
711
713
  children: String(e.defaultValue)
712
714
  })
@@ -714,76 +716,76 @@ var j = [
714
716
  })
715
717
  ]
716
718
  }, t))
717
- }) : /* @__PURE__ */ x("p", {
719
+ }) : /* @__PURE__ */ C("p", {
718
720
  className: "text-text-secondary text-center py-4",
719
721
  children: "No variables defined"
720
722
  }) })] }) })]
721
723
  }),
722
- F === "preview" && /* @__PURE__ */ S(s, { children: [/* @__PURE__ */ S(u, { children: [/* @__PURE__ */ x(d, { children: "Rendered Preview" }), /* @__PURE__ */ x(l, { children: "Preview with example inputs (first example set)" })] }), /* @__PURE__ */ x(c, { children: /* @__PURE__ */ x("div", {
724
+ L === "preview" && /* @__PURE__ */ w(c, { children: [/* @__PURE__ */ w(d, { children: [/* @__PURE__ */ C(f, { children: "Rendered Preview" }), /* @__PURE__ */ C(u, { children: "Preview with example inputs (first example set)" })] }), /* @__PURE__ */ C(l, { children: /* @__PURE__ */ C("div", {
723
725
  className: "p-4 bg-bg-sunken rounded-lg font-mono text-sm whitespace-pre-wrap",
724
- children: $[0] ? P.templateText.replace(/\{\{(\w+)\}\}/g, (e, t) => {
726
+ children: $[0] ? I.templateText.replace(/\{\{(\w+)\}\}/g, (e, t) => {
725
727
  let n = $[0][t];
726
728
  return n === void 0 ? `{{${t}}}` : String(n);
727
- }) : /* @__PURE__ */ x("span", {
729
+ }) : /* @__PURE__ */ C("span", {
728
730
  className: "text-text-secondary",
729
731
  children: "No example inputs defined. Add examples to preview rendered output."
730
732
  })
731
733
  }) })] }),
732
- F === "test" && /* @__PURE__ */ S("div", {
734
+ L === "test" && /* @__PURE__ */ w("div", {
733
735
  className: "grid grid-cols-1 lg:grid-cols-2 gap-6",
734
- children: [/* @__PURE__ */ S(s, { children: [/* @__PURE__ */ S(u, { children: [/* @__PURE__ */ x(d, { children: "Test Inputs" }), /* @__PURE__ */ x(l, { children: "Enter values to test the template" })] }), /* @__PURE__ */ S(c, {
736
+ children: [/* @__PURE__ */ w(c, { children: [/* @__PURE__ */ w(d, { children: [/* @__PURE__ */ C(f, { children: "Test Inputs" }), /* @__PURE__ */ C(u, { children: "Enter values to test the template" })] }), /* @__PURE__ */ w(l, {
735
737
  className: "space-y-4",
736
- children: [Q.map((e) => /* @__PURE__ */ S(h, {
738
+ children: [Q.map((e) => /* @__PURE__ */ w(m, {
737
739
  label: e.name,
738
740
  required: e.required,
739
- children: [/* @__PURE__ */ x(g, {
741
+ children: [/* @__PURE__ */ C(h, {
740
742
  placeholder: e.defaultValue ? String(e.defaultValue) : `Enter ${e.name}`,
741
- value: z[e.name] || "",
742
- onChange: (t) => je({
743
- ...z,
743
+ value: V[e.name] || "",
744
+ onChange: (t) => ke({
745
+ ...V,
744
746
  [e.name]: t.target.value
745
747
  })
746
- }), e.description && /* @__PURE__ */ x("p", {
748
+ }), e.description && /* @__PURE__ */ C("p", {
747
749
  className: "text-xs text-text-secondary mt-1",
748
750
  children: e.description
749
751
  })]
750
- }, e.name)), /* @__PURE__ */ x(i, {
751
- permission: r.PROMPT_TEMPLATE_EXECUTE,
752
- children: /* @__PURE__ */ x(o, {
752
+ }, e.name)), /* @__PURE__ */ C(s, {
753
+ permission: o.PROMPT_TEMPLATE_EXECUTE,
754
+ children: /* @__PURE__ */ C(p, {
753
755
  className: "w-full",
754
- leftIcon: /* @__PURE__ */ x(E, { size: 16 }),
755
- onClick: Ie,
756
- isLoading: Ae,
756
+ leftIcon: /* @__PURE__ */ C(O, { size: 16 }),
757
+ onClick: Fe,
758
+ isLoading: Oe,
757
759
  children: "Render Template"
758
760
  })
759
761
  })]
760
- })] }), /* @__PURE__ */ S(s, { children: [/* @__PURE__ */ x(u, { children: /* @__PURE__ */ x(d, { children: "Output" }) }), /* @__PURE__ */ x(c, { children: H ? /* @__PURE__ */ x("div", {
762
+ })] }), /* @__PURE__ */ w(c, { children: [/* @__PURE__ */ C(d, { children: /* @__PURE__ */ C(f, { children: "Output" }) }), /* @__PURE__ */ C(l, { children: W ? /* @__PURE__ */ C("div", {
761
763
  role: "alert",
762
764
  className: "flex items-start gap-2 rounded-lg border border-status-error-border/40 bg-status-error-bg/10 px-3 py-2 text-sm text-status-error-text",
763
- children: /* @__PURE__ */ x("p", { children: H })
764
- }) : B ? /* @__PURE__ */ x("div", {
765
+ children: /* @__PURE__ */ C("p", { children: W })
766
+ }) : H ? /* @__PURE__ */ C("div", {
765
767
  className: "p-4 bg-bg-sunken rounded-lg font-mono text-sm whitespace-pre-wrap",
766
- children: B
767
- }) : /* @__PURE__ */ S("div", {
768
+ children: H
769
+ }) : /* @__PURE__ */ w("div", {
768
770
  className: "p-8 text-center text-text-secondary",
769
- children: [/* @__PURE__ */ x(E, { className: "h-8 w-8 mx-auto mb-2 opacity-50" }), /* @__PURE__ */ x("p", { children: "Enter inputs and click \"Render Template\" to see output" })]
771
+ children: [/* @__PURE__ */ C(O, { className: "h-8 w-8 mx-auto mb-2 opacity-50" }), /* @__PURE__ */ C("p", { children: "Enter inputs and click \"Render Template\" to see output" })]
770
772
  }) })] })]
771
773
  }),
772
- $.length > 0 && F === "edit" && /* @__PURE__ */ S(s, { children: [/* @__PURE__ */ S(u, { children: [/* @__PURE__ */ x(d, { children: "Example Inputs" }), /* @__PURE__ */ x(l, { children: "Pre-defined inputs for testing and documentation" })] }), /* @__PURE__ */ x(c, { children: /* @__PURE__ */ x("div", {
774
+ $.length > 0 && L === "edit" && /* @__PURE__ */ w(c, { children: [/* @__PURE__ */ w(d, { children: [/* @__PURE__ */ C(f, { children: "Example Inputs" }), /* @__PURE__ */ C(u, { children: "Pre-defined inputs for testing and documentation" })] }), /* @__PURE__ */ C(l, { children: /* @__PURE__ */ C("div", {
773
775
  className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",
774
- children: $.map((e, t) => /* @__PURE__ */ S("div", {
776
+ children: $.map((e, t) => /* @__PURE__ */ w("div", {
775
777
  className: "p-4 border rounded-lg bg-bg-sunken/30",
776
- children: [/* @__PURE__ */ S("p", {
778
+ children: [/* @__PURE__ */ w("p", {
777
779
  className: "text-sm font-medium mb-2",
778
780
  children: ["Example ", t + 1]
779
- }), /* @__PURE__ */ x("div", {
781
+ }), /* @__PURE__ */ C("div", {
780
782
  className: "space-y-1 text-sm",
781
- children: Object.entries(e).map(([e, t]) => /* @__PURE__ */ S("div", {
783
+ children: Object.entries(e).map(([e, t]) => /* @__PURE__ */ w("div", {
782
784
  className: "flex justify-between",
783
- children: [/* @__PURE__ */ S("span", {
785
+ children: [/* @__PURE__ */ w("span", {
784
786
  className: "font-mono text-text-secondary",
785
787
  children: [e, ":"]
786
- }), /* @__PURE__ */ x("span", {
788
+ }), /* @__PURE__ */ C("span", {
787
789
  className: "font-mono truncate max-w-[60%]",
788
790
  children: String(t)
789
791
  })]
@@ -791,36 +793,36 @@ var j = [
791
793
  })]
792
794
  }, t))
793
795
  }) })] }),
794
- /* @__PURE__ */ S(s, { children: [/* @__PURE__ */ x(u, { children: /* @__PURE__ */ S(d, {
796
+ /* @__PURE__ */ w(c, { children: [/* @__PURE__ */ C(d, { children: /* @__PURE__ */ w(f, {
795
797
  className: "flex items-center gap-2",
796
- children: [/* @__PURE__ */ x(ye, { size: 18 }), "Metadata"]
797
- }) }), /* @__PURE__ */ x(c, { children: /* @__PURE__ */ S("div", {
798
+ children: [/* @__PURE__ */ C(_e, { size: 18 }), "Metadata"]
799
+ }) }), /* @__PURE__ */ C(l, { children: /* @__PURE__ */ w("div", {
798
800
  className: "grid grid-cols-2 md:grid-cols-4 gap-6 text-sm",
799
801
  children: [
800
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
802
+ /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("p", {
801
803
  className: "text-text-secondary",
802
804
  children: "Created"
803
- }), /* @__PURE__ */ x("p", {
805
+ }), /* @__PURE__ */ C("p", {
804
806
  className: "font-medium",
805
- children: n(P.createdAt)
807
+ children: ce(I.createdAt)
806
808
  })] }),
807
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
809
+ /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("p", {
808
810
  className: "text-text-secondary",
809
811
  children: "Updated"
810
- }), /* @__PURE__ */ x("p", {
812
+ }), /* @__PURE__ */ C("p", {
811
813
  className: "font-medium",
812
- children: n(P.updatedAt)
814
+ children: ce(I.updatedAt)
813
815
  })] }),
814
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
816
+ /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("p", {
815
817
  className: "text-text-secondary",
816
818
  children: "Tags"
817
- }), /* @__PURE__ */ x("div", {
819
+ }), /* @__PURE__ */ C("div", {
818
820
  className: "flex gap-1",
819
- children: P.tags.length > 0 ? P.tags.map((e) => /* @__PURE__ */ x(f, {
821
+ children: I.tags.length > 0 ? I.tags.map((e) => /* @__PURE__ */ C(_, {
820
822
  variant: "secondary",
821
823
  className: "text-xs",
822
824
  children: e
823
- }, e)) : /* @__PURE__ */ x("span", {
825
+ }, e)) : /* @__PURE__ */ C("span", {
824
826
  className: "text-text-secondary",
825
827
  children: "None"
826
828
  })
@@ -831,7 +833,6 @@ var j = [
831
833
  })
832
834
  });
833
835
  };
834
- //#endregion
835
- export { M as PromptTemplateDetailPage };
836
+ export { P as PromptTemplateDetailPage };
836
837
 
837
838
  //# sourceMappingURL=PromptTemplateDetailPage.js.map