@btst/stack 1.3.1 → 1.4.1

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 (238) hide show
  1. package/README.md +85 -37
  2. package/dist/node_modules/.pnpm/@radix-ui_react-accordion@1.2.12_@types_react-dom@19.2.3_@types_react@19.2.6__@types_re_947719a27ff11ec6f09710dd9e85efc5/node_modules/@radix-ui/react-accordion/dist/index.cjs +321 -0
  3. package/dist/node_modules/.pnpm/@radix-ui_react-accordion@1.2.12_@types_react-dom@19.2.3_@types_react@19.2.6__@types_re_947719a27ff11ec6f09710dd9e85efc5/node_modules/@radix-ui/react-accordion/dist/index.mjs +306 -0
  4. package/dist/node_modules/.pnpm/{@radix-ui_react-alert-dialog@1.1.15_@types_react-dom@19.2.2_@types_react@19.2.2__@types_ec789942cd38340bd7362c09e7d34384 → @radix-ui_react-alert-dialog@1.1.15_@types_react-dom@19.2.3_@types_react@19.2.6__@types_4f58c757aa677e233cf96d60fda2f1da}/node_modules/@radix-ui/react-alert-dialog/dist/index.cjs +2 -2
  5. package/dist/node_modules/.pnpm/{@radix-ui_react-alert-dialog@1.1.15_@types_react-dom@19.2.2_@types_react@19.2.2__@types_ec789942cd38340bd7362c09e7d34384 → @radix-ui_react-alert-dialog@1.1.15_@types_react-dom@19.2.3_@types_react@19.2.6__@types_4f58c757aa677e233cf96d60fda2f1da}/node_modules/@radix-ui/react-alert-dialog/dist/index.mjs +2 -2
  6. package/dist/node_modules/.pnpm/{@radix-ui_react-arrow@1.1.7_@types_react-dom@19.2.2_@types_react@19.2.2__@types_react@1_9e04309f365863673e44407648bb0cb6 → @radix-ui_react-arrow@1.1.7_@types_react-dom@19.2.3_@types_react@19.2.6__@types_react@1_35df44f6d87656c1401686c91d770dbb}/node_modules/@radix-ui/react-arrow/dist/index.cjs +1 -1
  7. package/dist/node_modules/.pnpm/{@radix-ui_react-arrow@1.1.7_@types_react-dom@19.2.2_@types_react@19.2.2__@types_react@1_9e04309f365863673e44407648bb0cb6 → @radix-ui_react-arrow@1.1.7_@types_react-dom@19.2.3_@types_react@19.2.6__@types_react@1_35df44f6d87656c1401686c91d770dbb}/node_modules/@radix-ui/react-arrow/dist/index.mjs +1 -1
  8. package/dist/node_modules/.pnpm/@radix-ui_react-collapsible@1.1.12_@types_react-dom@19.2.3_@types_react@19.2.6__@types__d025a77f62ee83ca6bd8b0ea1f9de738/node_modules/@radix-ui/react-collapsible/dist/index.cjs +168 -0
  9. package/dist/node_modules/.pnpm/@radix-ui_react-collapsible@1.1.12_@types_react-dom@19.2.3_@types_react@19.2.6__@types__d025a77f62ee83ca6bd8b0ea1f9de738/node_modules/@radix-ui/react-collapsible/dist/index.mjs +146 -0
  10. package/dist/node_modules/.pnpm/{@radix-ui_react-collection@1.1.7_@types_react-dom@19.2.2_@types_react@19.2.2__@types_re_6d7c277722b3619c9ee7e64e9a822c45 → @radix-ui_react-collection@1.1.7_@types_react-dom@19.2.3_@types_react@19.2.6__@types_re_59aa5e150e70a3e7bfb1567148b021b5}/node_modules/@radix-ui/react-collection/dist/index.cjs +2 -2
  11. package/dist/node_modules/.pnpm/{@radix-ui_react-collection@1.1.7_@types_react-dom@19.2.2_@types_react@19.2.2__@types_re_6d7c277722b3619c9ee7e64e9a822c45 → @radix-ui_react-collection@1.1.7_@types_react-dom@19.2.3_@types_react@19.2.6__@types_re_59aa5e150e70a3e7bfb1567148b021b5}/node_modules/@radix-ui/react-collection/dist/index.mjs +2 -2
  12. package/dist/node_modules/.pnpm/{@radix-ui_react-dismissable-layer@1.1.11_@types_react-dom@19.2.2_@types_react@19.2.2__@_ca5522e5d45d4722cb9eb5ce53defa61 → @radix-ui_react-dismissable-layer@1.1.11_@types_react-dom@19.2.3_@types_react@19.2.6__@_9ee1db7daf927866cf505b31d40047ad}/node_modules/@radix-ui/react-dismissable-layer/dist/index.cjs +4 -4
  13. package/dist/node_modules/.pnpm/{@radix-ui_react-dismissable-layer@1.1.11_@types_react-dom@19.2.2_@types_react@19.2.2__@_ca5522e5d45d4722cb9eb5ce53defa61 → @radix-ui_react-dismissable-layer@1.1.11_@types_react-dom@19.2.3_@types_react@19.2.6__@_9ee1db7daf927866cf505b31d40047ad}/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs +4 -4
  14. package/dist/node_modules/.pnpm/@radix-ui_react-dropdown-menu@2.1.16_@types_react-dom@19.2.3_@types_react@19.2.6__@type_a50051c7210b6fbd5be09388bda08578/node_modules/@radix-ui/react-dropdown-menu/dist/index.cjs +282 -0
  15. package/dist/node_modules/.pnpm/@radix-ui_react-dropdown-menu@2.1.16_@types_react-dom@19.2.3_@types_react@19.2.6__@type_a50051c7210b6fbd5be09388bda08578/node_modules/@radix-ui/react-dropdown-menu/dist/index.mjs +247 -0
  16. package/dist/node_modules/.pnpm/{@radix-ui_react-focus-scope@1.1.7_@types_react-dom@19.2.2_@types_react@19.2.2__@types_r_93de389b3f622f9f764acc8e59ec80c0 → @radix-ui_react-focus-scope@1.1.7_@types_react-dom@19.2.3_@types_react@19.2.6__@types_r_0a31b7f987af9482d13505312e1a1be9}/node_modules/@radix-ui/react-focus-scope/dist/index.cjs +3 -3
  17. package/dist/node_modules/.pnpm/{@radix-ui_react-focus-scope@1.1.7_@types_react-dom@19.2.2_@types_react@19.2.2__@types_r_93de389b3f622f9f764acc8e59ec80c0 → @radix-ui_react-focus-scope@1.1.7_@types_react-dom@19.2.3_@types_react@19.2.6__@types_r_0a31b7f987af9482d13505312e1a1be9}/node_modules/@radix-ui/react-focus-scope/dist/index.mjs +3 -3
  18. package/dist/node_modules/.pnpm/{@radix-ui_react-id@1.1.1_@types_react@19.2.2_react@19.2.0 → @radix-ui_react-id@1.1.1_@types_react@19.2.6_react@19.2.0}/node_modules/@radix-ui/react-id/dist/index.cjs +1 -1
  19. package/dist/node_modules/.pnpm/{@radix-ui_react-id@1.1.1_@types_react@19.2.2_react@19.2.0 → @radix-ui_react-id@1.1.1_@types_react@19.2.6_react@19.2.0}/node_modules/@radix-ui/react-id/dist/index.mjs +1 -1
  20. package/dist/node_modules/.pnpm/@radix-ui_react-menu@2.1.16_@types_react-dom@19.2.3_@types_react@19.2.6__@types_react@1_82ed1fcd848b6984d9291a784d477cf4/node_modules/@radix-ui/react-menu/dist/index.cjs +845 -0
  21. package/dist/node_modules/.pnpm/@radix-ui_react-menu@2.1.16_@types_react-dom@19.2.3_@types_react@19.2.6__@types_react@1_82ed1fcd848b6984d9291a784d477cf4/node_modules/@radix-ui/react-menu/dist/index.mjs +799 -0
  22. package/dist/node_modules/.pnpm/{@radix-ui_react-popper@1.2.8_@types_react-dom@19.2.2_@types_react@19.2.2__@types_react@_d6285b8269ea5d6b59b300f5be279a0c → @radix-ui_react-popper@1.2.8_@types_react-dom@19.2.3_@types_react@19.2.6__@types_react@_7ac2caae1e39f9ba93d5015614525161}/node_modules/@radix-ui/react-popper/dist/index.cjs +7 -7
  23. package/dist/node_modules/.pnpm/{@radix-ui_react-popper@1.2.8_@types_react-dom@19.2.2_@types_react@19.2.2__@types_react@_d6285b8269ea5d6b59b300f5be279a0c → @radix-ui_react-popper@1.2.8_@types_react-dom@19.2.3_@types_react@19.2.6__@types_react@_7ac2caae1e39f9ba93d5015614525161}/node_modules/@radix-ui/react-popper/dist/index.mjs +7 -7
  24. package/dist/node_modules/.pnpm/{@radix-ui_react-portal@1.1.9_@types_react-dom@19.2.2_@types_react@19.2.2__@types_react@_478b3d5dd4afab1a3dcce7ed1748cb95 → @radix-ui_react-portal@1.1.9_@types_react-dom@19.2.3_@types_react@19.2.6__@types_react@_1bb4e0f97f86496802d28a2e74e2a8b9}/node_modules/@radix-ui/react-portal/dist/index.cjs +2 -2
  25. package/dist/node_modules/.pnpm/{@radix-ui_react-portal@1.1.9_@types_react-dom@19.2.2_@types_react@19.2.2__@types_react@_478b3d5dd4afab1a3dcce7ed1748cb95 → @radix-ui_react-portal@1.1.9_@types_react-dom@19.2.3_@types_react@19.2.6__@types_react@_1bb4e0f97f86496802d28a2e74e2a8b9}/node_modules/@radix-ui/react-portal/dist/index.mjs +2 -2
  26. package/dist/node_modules/.pnpm/@radix-ui_react-presence@1.1.5_@types_react-dom@19.2.3_@types_react@19.2.6__@types_reac_90f8e5c12233caef3399d5fd66452a13/node_modules/@radix-ui/react-presence/dist/index.cjs +147 -0
  27. package/dist/node_modules/.pnpm/@radix-ui_react-presence@1.1.5_@types_react-dom@19.2.3_@types_react@19.2.6__@types_reac_90f8e5c12233caef3399d5fd66452a13/node_modules/@radix-ui/react-presence/dist/index.mjs +131 -0
  28. package/dist/node_modules/.pnpm/@radix-ui_react-roving-focus@1.1.11_@types_react-dom@19.2.3_@types_react@19.2.6__@types_fe1151d1f393bbc1072b24a86dff3a23/node_modules/@radix-ui/react-roving-focus/dist/index.cjs +244 -0
  29. package/dist/node_modules/.pnpm/@radix-ui_react-roving-focus@1.1.11_@types_react-dom@19.2.3_@types_react@19.2.6__@types_fe1151d1f393bbc1072b24a86dff3a23/node_modules/@radix-ui/react-roving-focus/dist/index.mjs +224 -0
  30. package/dist/node_modules/.pnpm/@radix-ui_react-scroll-area@1.2.10_@types_react-dom@19.2.3_@types_react@19.2.6__@types__e3f7735e9b444a10b3bbfd9fe97d44d0/node_modules/@radix-ui/react-scroll-area/dist/index.cjs +742 -0
  31. package/dist/node_modules/.pnpm/@radix-ui_react-scroll-area@1.2.10_@types_react-dom@19.2.3_@types_react@19.2.6__@types__e3f7735e9b444a10b3bbfd9fe97d44d0/node_modules/@radix-ui/react-scroll-area/dist/index.mjs +719 -0
  32. package/dist/node_modules/.pnpm/{@radix-ui_react-select@2.2.6_@types_react-dom@19.2.2_@types_react@19.2.2__@types_react@_802c3d414c85063bee785fcc98a39c07 → @radix-ui_react-select@2.2.6_@types_react-dom@19.2.3_@types_react@19.2.6__@types_react@_38dc681bb1f2bcfeb5249d8ca2bc01f5}/node_modules/@radix-ui/react-select/dist/index.cjs +17 -17
  33. package/dist/node_modules/.pnpm/{@radix-ui_react-select@2.2.6_@types_react-dom@19.2.2_@types_react@19.2.2__@types_react@_802c3d414c85063bee785fcc98a39c07 → @radix-ui_react-select@2.2.6_@types_react-dom@19.2.3_@types_react@19.2.6__@types_react@_38dc681bb1f2bcfeb5249d8ca2bc01f5}/node_modules/@radix-ui/react-select/dist/index.mjs +17 -17
  34. package/dist/node_modules/.pnpm/{@radix-ui_react-use-controllable-state@1.2.2_@types_react@19.2.2_react@19.2.0 → @radix-ui_react-use-controllable-state@1.2.2_@types_react@19.2.6_react@19.2.0}/node_modules/@radix-ui/react-use-controllable-state/dist/index.cjs +1 -1
  35. package/dist/node_modules/.pnpm/{@radix-ui_react-use-controllable-state@1.2.2_@types_react@19.2.2_react@19.2.0 → @radix-ui_react-use-controllable-state@1.2.2_@types_react@19.2.6_react@19.2.0}/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs +1 -1
  36. package/dist/node_modules/.pnpm/{@radix-ui_react-use-escape-keydown@1.1.1_@types_react@19.2.2_react@19.2.0 → @radix-ui_react-use-escape-keydown@1.1.1_@types_react@19.2.6_react@19.2.0}/node_modules/@radix-ui/react-use-escape-keydown/dist/index.cjs +1 -1
  37. package/dist/node_modules/.pnpm/{@radix-ui_react-use-escape-keydown@1.1.1_@types_react@19.2.2_react@19.2.0 → @radix-ui_react-use-escape-keydown@1.1.1_@types_react@19.2.6_react@19.2.0}/node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs +1 -1
  38. package/dist/node_modules/.pnpm/{@radix-ui_react-use-size@1.1.1_@types_react@19.2.2_react@19.2.0 → @radix-ui_react-use-size@1.1.1_@types_react@19.2.6_react@19.2.0}/node_modules/@radix-ui/react-use-size/dist/index.cjs +1 -1
  39. package/dist/node_modules/.pnpm/{@radix-ui_react-use-size@1.1.1_@types_react@19.2.2_react@19.2.0 → @radix-ui_react-use-size@1.1.1_@types_react@19.2.6_react@19.2.0}/node_modules/@radix-ui/react-use-size/dist/index.mjs +1 -1
  40. package/dist/node_modules/.pnpm/{@radix-ui_react-visually-hidden@1.2.3_@types_react-dom@19.2.2_@types_react@19.2.2__@typ_a84e98a44624c31e835a98d4b8b0c30d → @radix-ui_react-visually-hidden@1.2.3_@types_react-dom@19.2.3_@types_react@19.2.6__@typ_f453379bbd5a4932ec515167f81be42a}/node_modules/@radix-ui/react-visually-hidden/dist/index.cjs +1 -1
  41. package/dist/node_modules/.pnpm/{@radix-ui_react-visually-hidden@1.2.3_@types_react-dom@19.2.2_@types_react@19.2.2__@typ_a84e98a44624c31e835a98d4b8b0c30d → @radix-ui_react-visually-hidden@1.2.3_@types_react-dom@19.2.3_@types_react@19.2.6__@typ_f453379bbd5a4932ec515167f81be42a}/node_modules/@radix-ui/react-visually-hidden/dist/index.mjs +1 -1
  42. package/dist/node_modules/.pnpm/{react-remove-scroll-bar@2.3.8_@types_react@19.2.2_react@19.2.0 → react-remove-scroll-bar@2.3.8_@types_react@19.2.6_react@19.2.0}/node_modules/react-remove-scroll-bar/dist/es2015/component.cjs +1 -1
  43. package/dist/node_modules/.pnpm/{react-remove-scroll-bar@2.3.8_@types_react@19.2.2_react@19.2.0 → react-remove-scroll-bar@2.3.8_@types_react@19.2.6_react@19.2.0}/node_modules/react-remove-scroll-bar/dist/es2015/component.mjs +1 -1
  44. package/dist/node_modules/.pnpm/{react-remove-scroll@2.7.1_@types_react@19.2.2_react@19.2.0 → react-remove-scroll@2.7.1_@types_react@19.2.6_react@19.2.0}/node_modules/react-remove-scroll/dist/es2015/SideEffect.cjs +2 -2
  45. package/dist/node_modules/.pnpm/{react-remove-scroll@2.7.1_@types_react@19.2.2_react@19.2.0 → react-remove-scroll@2.7.1_@types_react@19.2.6_react@19.2.0}/node_modules/react-remove-scroll/dist/es2015/SideEffect.mjs +2 -2
  46. package/dist/node_modules/.pnpm/{react-remove-scroll@2.7.1_@types_react@19.2.2_react@19.2.0 → react-remove-scroll@2.7.1_@types_react@19.2.6_react@19.2.0}/node_modules/react-remove-scroll/dist/es2015/UI.cjs +2 -2
  47. package/dist/node_modules/.pnpm/{react-remove-scroll@2.7.1_@types_react@19.2.2_react@19.2.0 → react-remove-scroll@2.7.1_@types_react@19.2.6_react@19.2.0}/node_modules/react-remove-scroll/dist/es2015/UI.mjs +2 -2
  48. package/dist/node_modules/.pnpm/{react-remove-scroll@2.7.1_@types_react@19.2.2_react@19.2.0 → react-remove-scroll@2.7.1_@types_react@19.2.6_react@19.2.0}/node_modules/react-remove-scroll/dist/es2015/medium.cjs +1 -1
  49. package/dist/node_modules/.pnpm/{react-remove-scroll@2.7.1_@types_react@19.2.2_react@19.2.0 → react-remove-scroll@2.7.1_@types_react@19.2.6_react@19.2.0}/node_modules/react-remove-scroll/dist/es2015/medium.mjs +1 -1
  50. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.2.6_react@19.2.0/node_modules/react-remove-scroll/dist/es2015/sidecar.cjs +9 -0
  51. package/dist/node_modules/.pnpm/{react-remove-scroll@2.7.1_@types_react@19.2.2_react@19.2.0 → react-remove-scroll@2.7.1_@types_react@19.2.6_react@19.2.0}/node_modules/react-remove-scroll/dist/es2015/sidecar.mjs +1 -1
  52. package/dist/packages/better-stack/src/plugins/ai-chat/api/plugin.cjs +610 -0
  53. package/dist/packages/better-stack/src/plugins/ai-chat/api/plugin.mjs +608 -0
  54. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/chat-input.cjs +221 -0
  55. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/chat-input.mjs +219 -0
  56. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/chat-interface.cjs +341 -0
  57. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/chat-interface.mjs +339 -0
  58. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/chat-layout.cjs +135 -0
  59. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/chat-layout.mjs +133 -0
  60. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/chat-message.cjs +429 -0
  61. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/chat-message.mjs +423 -0
  62. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/chat-sidebar.cjs +227 -0
  63. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/chat-sidebar.mjs +225 -0
  64. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/loading/chat-page-skeleton.cjs +31 -0
  65. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/loading/chat-page-skeleton.mjs +29 -0
  66. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/loading/index.cjs +11 -0
  67. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/loading/index.mjs +8 -0
  68. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/pages/404-page.cjs +18 -0
  69. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/pages/404-page.mjs +16 -0
  70. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/pages/chat-page.cjs +39 -0
  71. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/pages/chat-page.internal.cjs +22 -0
  72. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/pages/chat-page.internal.mjs +20 -0
  73. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/pages/chat-page.mjs +37 -0
  74. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/shared/default-error.cjs +18 -0
  75. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/shared/default-error.mjs +16 -0
  76. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/shared/error-placeholder.cjs +26 -0
  77. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/shared/error-placeholder.mjs +24 -0
  78. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/tool-call-display.cjs +123 -0
  79. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/tool-call-display.mjs +121 -0
  80. package/dist/packages/better-stack/src/plugins/ai-chat/client/hooks/chat-hooks.cjs +199 -0
  81. package/dist/packages/better-stack/src/plugins/ai-chat/client/hooks/chat-hooks.mjs +191 -0
  82. package/dist/packages/better-stack/src/plugins/ai-chat/client/localization/index.cjs +63 -0
  83. package/dist/packages/better-stack/src/plugins/ai-chat/client/localization/index.mjs +61 -0
  84. package/dist/packages/better-stack/src/plugins/ai-chat/client/overrides.cjs +14 -0
  85. package/dist/packages/better-stack/src/plugins/ai-chat/client/overrides.mjs +11 -0
  86. package/dist/packages/better-stack/src/plugins/ai-chat/client/plugin.cjs +241 -0
  87. package/dist/packages/better-stack/src/plugins/ai-chat/client/plugin.mjs +239 -0
  88. package/dist/packages/better-stack/src/plugins/ai-chat/db.cjs +65 -0
  89. package/dist/packages/better-stack/src/plugins/ai-chat/db.mjs +63 -0
  90. package/dist/packages/better-stack/src/plugins/ai-chat/schemas.cjs +42 -0
  91. package/dist/packages/better-stack/src/plugins/ai-chat/schemas.mjs +38 -0
  92. package/dist/packages/better-stack/src/plugins/blog/client/components/shared/markdown-content.cjs +12 -309
  93. package/dist/packages/better-stack/src/plugins/blog/client/components/shared/markdown-content.mjs +13 -303
  94. package/dist/packages/better-stack/src/plugins/blog/client/components/shared/page-wrapper.cjs +2 -2
  95. package/dist/packages/better-stack/src/plugins/blog/client/components/shared/page-wrapper.mjs +2 -2
  96. package/dist/packages/ui/src/components/accordion.cjs +67 -0
  97. package/dist/packages/ui/src/components/accordion.mjs +62 -0
  98. package/dist/packages/ui/src/components/alert-dialog.cjs +1 -1
  99. package/dist/packages/ui/src/components/alert-dialog.mjs +1 -1
  100. package/dist/packages/{better-stack/src/plugins/blog/client/components/shared/better-blog-attribution.cjs → ui/src/components/better-stack-attribution.cjs} +3 -3
  101. package/dist/packages/{better-stack/src/plugins/blog/client/components/shared/better-blog-attribution.mjs → ui/src/components/better-stack-attribution.mjs} +3 -3
  102. package/dist/packages/ui/src/components/dialog.cjs +14 -0
  103. package/dist/packages/ui/src/components/dialog.mjs +14 -1
  104. package/dist/packages/ui/src/components/dropdown-menu.cjs +67 -0
  105. package/dist/packages/ui/src/components/dropdown-menu.mjs +62 -0
  106. package/dist/packages/ui/src/components/markdown-content.cjs +306 -0
  107. package/dist/packages/ui/src/components/markdown-content.mjs +297 -0
  108. package/dist/packages/ui/src/components/scroll-area.cjs +63 -0
  109. package/dist/packages/ui/src/components/scroll-area.mjs +60 -0
  110. package/dist/packages/ui/src/components/select.cjs +1 -1
  111. package/dist/packages/ui/src/components/select.mjs +1 -1
  112. package/dist/packages/ui/src/components/sheet.cjs +87 -0
  113. package/dist/packages/ui/src/components/sheet.mjs +69 -0
  114. package/dist/plugins/ai-chat/api/index.cjs +9 -0
  115. package/dist/plugins/ai-chat/api/index.d.cts +9 -0
  116. package/dist/plugins/ai-chat/api/index.d.mts +9 -0
  117. package/dist/plugins/ai-chat/api/index.d.ts +9 -0
  118. package/dist/plugins/ai-chat/api/index.mjs +2 -0
  119. package/dist/plugins/ai-chat/client/components/index.cjs +29 -0
  120. package/dist/plugins/ai-chat/client/components/index.d.cts +30 -0
  121. package/dist/plugins/ai-chat/client/components/index.d.mts +30 -0
  122. package/dist/plugins/ai-chat/client/components/index.d.ts +30 -0
  123. package/dist/plugins/ai-chat/client/components/index.mjs +12 -0
  124. package/dist/plugins/ai-chat/client/hooks/index.cjs +13 -0
  125. package/dist/plugins/ai-chat/client/hooks/index.d.cts +98 -0
  126. package/dist/plugins/ai-chat/client/hooks/index.d.mts +98 -0
  127. package/dist/plugins/ai-chat/client/hooks/index.d.ts +98 -0
  128. package/dist/plugins/ai-chat/client/hooks/index.mjs +1 -0
  129. package/dist/plugins/ai-chat/client/index.cjs +21 -0
  130. package/dist/plugins/ai-chat/client/index.d.cts +156 -0
  131. package/dist/plugins/ai-chat/client/index.d.mts +156 -0
  132. package/dist/plugins/ai-chat/client/index.d.ts +156 -0
  133. package/dist/plugins/ai-chat/client/index.mjs +8 -0
  134. package/dist/plugins/ai-chat/client.css +6 -0
  135. package/dist/plugins/ai-chat/query-keys.cjs +60 -0
  136. package/dist/plugins/ai-chat/query-keys.d.cts +478 -0
  137. package/dist/plugins/ai-chat/query-keys.d.mts +478 -0
  138. package/dist/plugins/ai-chat/query-keys.d.ts +478 -0
  139. package/dist/plugins/ai-chat/query-keys.mjs +58 -0
  140. package/dist/plugins/ai-chat/style.css +19 -0
  141. package/dist/plugins/blog/api/index.d.cts +1 -1
  142. package/dist/plugins/blog/api/index.d.mts +1 -1
  143. package/dist/plugins/blog/api/index.d.ts +1 -1
  144. package/dist/plugins/blog/client/components/shared/markdown-content-styles.css +91 -62
  145. package/dist/plugins/blog/client/hooks/index.d.cts +4 -4
  146. package/dist/plugins/blog/client/hooks/index.d.mts +4 -4
  147. package/dist/plugins/blog/client/hooks/index.d.ts +4 -4
  148. package/dist/plugins/blog/client/index.d.cts +1 -1
  149. package/dist/plugins/blog/client/index.d.mts +1 -1
  150. package/dist/plugins/blog/client/index.d.ts +1 -1
  151. package/dist/plugins/blog/query-keys.d.cts +7 -7
  152. package/dist/plugins/blog/query-keys.d.mts +7 -7
  153. package/dist/plugins/blog/query-keys.d.ts +7 -7
  154. package/dist/shared/stack.Be1QIHEn.d.cts +23 -0
  155. package/dist/shared/stack.Be1QIHEn.d.mts +23 -0
  156. package/dist/shared/stack.Be1QIHEn.d.ts +23 -0
  157. package/dist/shared/stack.DaOcgmrM.d.cts +323 -0
  158. package/dist/shared/stack.DaOcgmrM.d.mts +323 -0
  159. package/dist/shared/stack.DaOcgmrM.d.ts +323 -0
  160. package/package.json +59 -1
  161. package/src/plugins/ai-chat/api/index.ts +2 -0
  162. package/src/plugins/ai-chat/api/plugin.ts +1083 -0
  163. package/src/plugins/ai-chat/client/components/chat-input.tsx +295 -0
  164. package/src/plugins/ai-chat/client/components/chat-interface.tsx +494 -0
  165. package/src/plugins/ai-chat/client/components/chat-layout.tsx +175 -0
  166. package/src/plugins/ai-chat/client/components/chat-message.tsx +561 -0
  167. package/src/plugins/ai-chat/client/components/chat-sidebar.tsx +296 -0
  168. package/src/plugins/ai-chat/client/components/index.ts +18 -0
  169. package/src/plugins/ai-chat/client/components/loading/chat-page-skeleton.tsx +57 -0
  170. package/src/plugins/ai-chat/client/components/loading/index.tsx +11 -0
  171. package/src/plugins/ai-chat/client/components/pages/404-page.tsx +27 -0
  172. package/src/plugins/ai-chat/client/components/pages/chat-page.internal.tsx +31 -0
  173. package/src/plugins/ai-chat/client/components/pages/chat-page.tsx +46 -0
  174. package/src/plugins/ai-chat/client/components/shared/default-error.tsx +28 -0
  175. package/src/plugins/ai-chat/client/components/shared/error-placeholder.tsx +22 -0
  176. package/src/plugins/ai-chat/client/components/tool-call-display.tsx +197 -0
  177. package/src/plugins/ai-chat/client/hooks/chat-hooks.tsx +349 -0
  178. package/src/plugins/ai-chat/client/hooks/index.tsx +1 -0
  179. package/src/plugins/ai-chat/client/index.ts +25 -0
  180. package/src/plugins/ai-chat/client/localization/index.ts +156 -0
  181. package/src/plugins/ai-chat/client/overrides.ts +241 -0
  182. package/src/plugins/ai-chat/client/plugin.tsx +449 -0
  183. package/src/plugins/ai-chat/client.css +6 -0
  184. package/src/plugins/ai-chat/db.ts +65 -0
  185. package/src/plugins/ai-chat/query-keys.ts +87 -0
  186. package/src/plugins/ai-chat/schemas.ts +40 -0
  187. package/src/plugins/ai-chat/style.css +19 -0
  188. package/src/plugins/ai-chat/types.ts +29 -0
  189. package/src/plugins/blog/client/components/shared/markdown-content-styles.css +91 -62
  190. package/src/plugins/blog/client/components/shared/markdown-content.tsx +19 -427
  191. package/src/plugins/blog/client/components/shared/page-wrapper.tsx +2 -2
  192. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.2.2_react@19.2.0/node_modules/react-remove-scroll/dist/es2015/sidecar.cjs +0 -9
  193. package/src/plugins/blog/client/components/shared/better-blog-attribution.tsx +0 -19
  194. package/dist/node_modules/.pnpm/{@radix-ui_react-compose-refs@1.1.2_@types_react@19.2.2_react@19.2.0 → @radix-ui_react-compose-refs@1.1.2_@types_react@19.2.6_react@19.2.0}/node_modules/@radix-ui/react-compose-refs/dist/index.cjs +0 -0
  195. package/dist/node_modules/.pnpm/{@radix-ui_react-compose-refs@1.1.2_@types_react@19.2.2_react@19.2.0 → @radix-ui_react-compose-refs@1.1.2_@types_react@19.2.6_react@19.2.0}/node_modules/@radix-ui/react-compose-refs/dist/index.mjs +0 -0
  196. package/dist/node_modules/.pnpm/{@radix-ui_react-context@1.1.2_@types_react@19.2.2_react@19.2.0 → @radix-ui_react-context@1.1.2_@types_react@19.2.6_react@19.2.0}/node_modules/@radix-ui/react-context/dist/index.cjs +0 -0
  197. package/dist/node_modules/.pnpm/{@radix-ui_react-context@1.1.2_@types_react@19.2.2_react@19.2.0 → @radix-ui_react-context@1.1.2_@types_react@19.2.6_react@19.2.0}/node_modules/@radix-ui/react-context/dist/index.mjs +0 -0
  198. package/dist/node_modules/.pnpm/{@radix-ui_react-direction@1.1.1_@types_react@19.2.2_react@19.2.0 → @radix-ui_react-direction@1.1.1_@types_react@19.2.6_react@19.2.0}/node_modules/@radix-ui/react-direction/dist/index.cjs +0 -0
  199. package/dist/node_modules/.pnpm/{@radix-ui_react-direction@1.1.1_@types_react@19.2.2_react@19.2.0 → @radix-ui_react-direction@1.1.1_@types_react@19.2.6_react@19.2.0}/node_modules/@radix-ui/react-direction/dist/index.mjs +0 -0
  200. package/dist/node_modules/.pnpm/{@radix-ui_react-focus-guards@1.1.3_@types_react@19.2.2_react@19.2.0 → @radix-ui_react-focus-guards@1.1.3_@types_react@19.2.6_react@19.2.0}/node_modules/@radix-ui/react-focus-guards/dist/index.cjs +0 -0
  201. package/dist/node_modules/.pnpm/{@radix-ui_react-focus-guards@1.1.3_@types_react@19.2.2_react@19.2.0 → @radix-ui_react-focus-guards@1.1.3_@types_react@19.2.6_react@19.2.0}/node_modules/@radix-ui/react-focus-guards/dist/index.mjs +0 -0
  202. package/dist/node_modules/.pnpm/{@radix-ui_react-primitive@2.1.3_@types_react-dom@19.2.2_@types_react@19.2.2__@types_rea_bdc15f10281778271ffcbe8dd3cd491e → @radix-ui_react-primitive@2.1.3_@types_react-dom@19.2.3_@types_react@19.2.6__@types_rea_a92a69cb1cb39305138539e4fa72f596}/node_modules/@radix-ui/react-primitive/dist/index.cjs +0 -0
  203. package/dist/node_modules/.pnpm/{@radix-ui_react-primitive@2.1.3_@types_react-dom@19.2.2_@types_react@19.2.2__@types_rea_bdc15f10281778271ffcbe8dd3cd491e → @radix-ui_react-primitive@2.1.3_@types_react-dom@19.2.3_@types_react@19.2.6__@types_rea_a92a69cb1cb39305138539e4fa72f596}/node_modules/@radix-ui/react-primitive/dist/index.mjs +0 -0
  204. package/dist/node_modules/.pnpm/{@radix-ui_react-use-callback-ref@1.1.1_@types_react@19.2.2_react@19.2.0 → @radix-ui_react-use-callback-ref@1.1.1_@types_react@19.2.6_react@19.2.0}/node_modules/@radix-ui/react-use-callback-ref/dist/index.cjs +0 -0
  205. package/dist/node_modules/.pnpm/{@radix-ui_react-use-callback-ref@1.1.1_@types_react@19.2.2_react@19.2.0 → @radix-ui_react-use-callback-ref@1.1.1_@types_react@19.2.6_react@19.2.0}/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs +0 -0
  206. package/dist/node_modules/.pnpm/{@radix-ui_react-use-layout-effect@1.1.1_@types_react@19.2.2_react@19.2.0 → @radix-ui_react-use-layout-effect@1.1.1_@types_react@19.2.6_react@19.2.0}/node_modules/@radix-ui/react-use-layout-effect/dist/index.cjs +0 -0
  207. package/dist/node_modules/.pnpm/{@radix-ui_react-use-layout-effect@1.1.1_@types_react@19.2.2_react@19.2.0 → @radix-ui_react-use-layout-effect@1.1.1_@types_react@19.2.6_react@19.2.0}/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs +0 -0
  208. package/dist/node_modules/.pnpm/{@radix-ui_react-use-previous@1.1.1_@types_react@19.2.2_react@19.2.0 → @radix-ui_react-use-previous@1.1.1_@types_react@19.2.6_react@19.2.0}/node_modules/@radix-ui/react-use-previous/dist/index.cjs +0 -0
  209. package/dist/node_modules/.pnpm/{@radix-ui_react-use-previous@1.1.1_@types_react@19.2.2_react@19.2.0 → @radix-ui_react-use-previous@1.1.1_@types_react@19.2.6_react@19.2.0}/node_modules/@radix-ui/react-use-previous/dist/index.mjs +0 -0
  210. package/dist/node_modules/.pnpm/{react-remove-scroll-bar@2.3.8_@types_react@19.2.2_react@19.2.0 → react-remove-scroll-bar@2.3.8_@types_react@19.2.6_react@19.2.0}/node_modules/react-remove-scroll-bar/dist/es2015/constants.cjs +0 -0
  211. package/dist/node_modules/.pnpm/{react-remove-scroll-bar@2.3.8_@types_react@19.2.2_react@19.2.0 → react-remove-scroll-bar@2.3.8_@types_react@19.2.6_react@19.2.0}/node_modules/react-remove-scroll-bar/dist/es2015/constants.mjs +0 -0
  212. package/dist/node_modules/.pnpm/{react-remove-scroll-bar@2.3.8_@types_react@19.2.2_react@19.2.0 → react-remove-scroll-bar@2.3.8_@types_react@19.2.6_react@19.2.0}/node_modules/react-remove-scroll-bar/dist/es2015/utils.cjs +0 -0
  213. package/dist/node_modules/.pnpm/{react-remove-scroll-bar@2.3.8_@types_react@19.2.2_react@19.2.0 → react-remove-scroll-bar@2.3.8_@types_react@19.2.6_react@19.2.0}/node_modules/react-remove-scroll-bar/dist/es2015/utils.mjs +0 -0
  214. package/dist/node_modules/.pnpm/{react-remove-scroll@2.7.1_@types_react@19.2.2_react@19.2.0 → react-remove-scroll@2.7.1_@types_react@19.2.6_react@19.2.0}/node_modules/react-remove-scroll/dist/es2015/Combination.cjs +0 -0
  215. package/dist/node_modules/.pnpm/{react-remove-scroll@2.7.1_@types_react@19.2.2_react@19.2.0 → react-remove-scroll@2.7.1_@types_react@19.2.6_react@19.2.0}/node_modules/react-remove-scroll/dist/es2015/Combination.mjs +0 -0
  216. package/dist/node_modules/.pnpm/{react-remove-scroll@2.7.1_@types_react@19.2.2_react@19.2.0 → react-remove-scroll@2.7.1_@types_react@19.2.6_react@19.2.0}/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.cjs +0 -0
  217. package/dist/node_modules/.pnpm/{react-remove-scroll@2.7.1_@types_react@19.2.2_react@19.2.0 → react-remove-scroll@2.7.1_@types_react@19.2.6_react@19.2.0}/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.mjs +0 -0
  218. package/dist/node_modules/.pnpm/{react-remove-scroll@2.7.1_@types_react@19.2.2_react@19.2.0 → react-remove-scroll@2.7.1_@types_react@19.2.6_react@19.2.0}/node_modules/react-remove-scroll/dist/es2015/handleScroll.cjs +0 -0
  219. package/dist/node_modules/.pnpm/{react-remove-scroll@2.7.1_@types_react@19.2.2_react@19.2.0 → react-remove-scroll@2.7.1_@types_react@19.2.6_react@19.2.0}/node_modules/react-remove-scroll/dist/es2015/handleScroll.mjs +0 -0
  220. package/dist/node_modules/.pnpm/{react-style-singleton@2.2.3_@types_react@19.2.2_react@19.2.0 → react-style-singleton@2.2.3_@types_react@19.2.6_react@19.2.0}/node_modules/react-style-singleton/dist/es2015/component.cjs +0 -0
  221. package/dist/node_modules/.pnpm/{react-style-singleton@2.2.3_@types_react@19.2.2_react@19.2.0 → react-style-singleton@2.2.3_@types_react@19.2.6_react@19.2.0}/node_modules/react-style-singleton/dist/es2015/component.mjs +0 -0
  222. package/dist/node_modules/.pnpm/{react-style-singleton@2.2.3_@types_react@19.2.2_react@19.2.0 → react-style-singleton@2.2.3_@types_react@19.2.6_react@19.2.0}/node_modules/react-style-singleton/dist/es2015/hook.cjs +0 -0
  223. package/dist/node_modules/.pnpm/{react-style-singleton@2.2.3_@types_react@19.2.2_react@19.2.0 → react-style-singleton@2.2.3_@types_react@19.2.6_react@19.2.0}/node_modules/react-style-singleton/dist/es2015/hook.mjs +0 -0
  224. package/dist/node_modules/.pnpm/{react-style-singleton@2.2.3_@types_react@19.2.2_react@19.2.0 → react-style-singleton@2.2.3_@types_react@19.2.6_react@19.2.0}/node_modules/react-style-singleton/dist/es2015/singleton.cjs +0 -0
  225. package/dist/node_modules/.pnpm/{react-style-singleton@2.2.3_@types_react@19.2.2_react@19.2.0 → react-style-singleton@2.2.3_@types_react@19.2.6_react@19.2.0}/node_modules/react-style-singleton/dist/es2015/singleton.mjs +0 -0
  226. package/dist/node_modules/.pnpm/{use-callback-ref@1.3.3_@types_react@19.2.2_react@19.2.0 → use-callback-ref@1.3.3_@types_react@19.2.6_react@19.2.0}/node_modules/use-callback-ref/dist/es2015/assignRef.cjs +0 -0
  227. package/dist/node_modules/.pnpm/{use-callback-ref@1.3.3_@types_react@19.2.2_react@19.2.0 → use-callback-ref@1.3.3_@types_react@19.2.6_react@19.2.0}/node_modules/use-callback-ref/dist/es2015/assignRef.mjs +0 -0
  228. package/dist/node_modules/.pnpm/{use-callback-ref@1.3.3_@types_react@19.2.2_react@19.2.0 → use-callback-ref@1.3.3_@types_react@19.2.6_react@19.2.0}/node_modules/use-callback-ref/dist/es2015/useMergeRef.cjs +0 -0
  229. package/dist/node_modules/.pnpm/{use-callback-ref@1.3.3_@types_react@19.2.2_react@19.2.0 → use-callback-ref@1.3.3_@types_react@19.2.6_react@19.2.0}/node_modules/use-callback-ref/dist/es2015/useMergeRef.mjs +0 -0
  230. package/dist/node_modules/.pnpm/{use-callback-ref@1.3.3_@types_react@19.2.2_react@19.2.0 → use-callback-ref@1.3.3_@types_react@19.2.6_react@19.2.0}/node_modules/use-callback-ref/dist/es2015/useRef.cjs +0 -0
  231. package/dist/node_modules/.pnpm/{use-callback-ref@1.3.3_@types_react@19.2.2_react@19.2.0 → use-callback-ref@1.3.3_@types_react@19.2.6_react@19.2.0}/node_modules/use-callback-ref/dist/es2015/useRef.mjs +0 -0
  232. package/dist/node_modules/.pnpm/{use-sidecar@1.1.3_@types_react@19.2.2_react@19.2.0 → use-sidecar@1.1.3_@types_react@19.2.6_react@19.2.0}/node_modules/use-sidecar/dist/es2015/exports.cjs +0 -0
  233. package/dist/node_modules/.pnpm/{use-sidecar@1.1.3_@types_react@19.2.2_react@19.2.0 → use-sidecar@1.1.3_@types_react@19.2.6_react@19.2.0}/node_modules/use-sidecar/dist/es2015/exports.mjs +0 -0
  234. package/dist/node_modules/.pnpm/{use-sidecar@1.1.3_@types_react@19.2.2_react@19.2.0 → use-sidecar@1.1.3_@types_react@19.2.6_react@19.2.0}/node_modules/use-sidecar/dist/es2015/medium.cjs +0 -0
  235. package/dist/node_modules/.pnpm/{use-sidecar@1.1.3_@types_react@19.2.2_react@19.2.0 → use-sidecar@1.1.3_@types_react@19.2.6_react@19.2.0}/node_modules/use-sidecar/dist/es2015/medium.mjs +0 -0
  236. package/dist/shared/{stack.CbuN2zVV.d.ts → stack.CcI4sYJP.d.cts} +3 -3
  237. package/dist/shared/{stack.CbuN2zVV.d.cts → stack.CcI4sYJP.d.mts} +3 -3
  238. package/dist/shared/{stack.CbuN2zVV.d.mts → stack.CcI4sYJP.d.ts} +3 -3
@@ -0,0 +1,63 @@
1
+ 'use strict';
2
+
3
+ const AI_CHAT_LOCALIZATION = {
4
+ // Chat interface
5
+ CHAT_PLACEHOLDER: "Type a message...",
6
+ CHAT_SEND_BUTTON: "Send",
7
+ CHAT_EMPTY_STATE: "Start a conversation...",
8
+ CHAT_LOADING: "Thinking...",
9
+ CHAT_ERROR: "Something went wrong. Please try again.",
10
+ CHAT_RETRY: "Retry",
11
+ // Page errors
12
+ CHAT_GENERIC_ERROR_TITLE: "Something went wrong",
13
+ CHAT_GENERIC_ERROR_MESSAGE: "An error occurred while loading the chat. Please try again.",
14
+ CHAT_PAGE_NOT_FOUND_TITLE: "Chat not found",
15
+ CHAT_PAGE_NOT_FOUND_DESCRIPTION: "The conversation you're looking for doesn't exist or has been deleted.",
16
+ // Sidebar
17
+ SIDEBAR_TITLE: "Conversations",
18
+ SIDEBAR_NEW_CHAT: "New chat",
19
+ SIDEBAR_NO_CONVERSATIONS: "No conversations yet",
20
+ SIDEBAR_SEARCH_PLACEHOLDER: "Search conversations...",
21
+ // Conversation actions
22
+ CONVERSATION_RENAME: "Rename",
23
+ CONVERSATION_RENAME_PLACEHOLDER: "Enter conversation name",
24
+ CONVERSATION_RENAME_SAVE: "Save",
25
+ CONVERSATION_RENAME_CANCEL: "Cancel",
26
+ CONVERSATION_DELETE: "Delete",
27
+ CONVERSATION_DELETE_CONFIRM_TITLE: "Delete conversation",
28
+ CONVERSATION_DELETE_CONFIRM_DESCRIPTION: "Are you sure you want to delete this conversation? This action cannot be undone.",
29
+ CONVERSATION_DELETE_CONFIRM_BUTTON: "Delete",
30
+ CONVERSATION_DELETE_CANCEL: "Cancel",
31
+ // Image upload (legacy)
32
+ IMAGE_UPLOAD_BUTTON: "Attach image",
33
+ IMAGE_UPLOAD_UPLOADING: "Uploading...",
34
+ IMAGE_UPLOAD_ERROR_NOT_IMAGE: "Please select an image file",
35
+ IMAGE_UPLOAD_ERROR_TOO_LARGE: "Image must be less than 4MB",
36
+ IMAGE_UPLOAD_SUCCESS: "Image uploaded",
37
+ IMAGE_UPLOAD_FAILURE: "Failed to upload image",
38
+ // File upload
39
+ FILE_UPLOAD_BUTTON: "Attach file",
40
+ FILE_UPLOAD_ERROR_TOO_LARGE: "File must be less than 10MB",
41
+ FILE_UPLOAD_SUCCESS: "File attached",
42
+ FILE_UPLOAD_FAILURE: "Failed to attach file",
43
+ // Timestamps
44
+ TIME_JUST_NOW: "Just now",
45
+ TIME_MINUTES_AGO: "{count} minutes ago",
46
+ TIME_HOURS_AGO: "{count} hours ago",
47
+ TIME_YESTERDAY: "Yesterday",
48
+ TIME_DAYS_AGO: "{count} days ago",
49
+ // Message actions
50
+ MESSAGE_COPY: "Copy message",
51
+ MESSAGE_COPIED: "Copied!",
52
+ MESSAGE_RETRY: "Retry",
53
+ MESSAGE_EDIT: "Edit message",
54
+ MESSAGE_SAVE: "Save",
55
+ MESSAGE_CANCEL: "Cancel",
56
+ // Accessibility
57
+ A11Y_USER_MESSAGE: "Your message",
58
+ A11Y_ASSISTANT_MESSAGE: "AI response",
59
+ A11Y_COPY_CODE: "Copy code",
60
+ A11Y_CODE_COPIED: "Code copied"
61
+ };
62
+
63
+ exports.AI_CHAT_LOCALIZATION = AI_CHAT_LOCALIZATION;
@@ -0,0 +1,61 @@
1
+ const AI_CHAT_LOCALIZATION = {
2
+ // Chat interface
3
+ CHAT_PLACEHOLDER: "Type a message...",
4
+ CHAT_SEND_BUTTON: "Send",
5
+ CHAT_EMPTY_STATE: "Start a conversation...",
6
+ CHAT_LOADING: "Thinking...",
7
+ CHAT_ERROR: "Something went wrong. Please try again.",
8
+ CHAT_RETRY: "Retry",
9
+ // Page errors
10
+ CHAT_GENERIC_ERROR_TITLE: "Something went wrong",
11
+ CHAT_GENERIC_ERROR_MESSAGE: "An error occurred while loading the chat. Please try again.",
12
+ CHAT_PAGE_NOT_FOUND_TITLE: "Chat not found",
13
+ CHAT_PAGE_NOT_FOUND_DESCRIPTION: "The conversation you're looking for doesn't exist or has been deleted.",
14
+ // Sidebar
15
+ SIDEBAR_TITLE: "Conversations",
16
+ SIDEBAR_NEW_CHAT: "New chat",
17
+ SIDEBAR_NO_CONVERSATIONS: "No conversations yet",
18
+ SIDEBAR_SEARCH_PLACEHOLDER: "Search conversations...",
19
+ // Conversation actions
20
+ CONVERSATION_RENAME: "Rename",
21
+ CONVERSATION_RENAME_PLACEHOLDER: "Enter conversation name",
22
+ CONVERSATION_RENAME_SAVE: "Save",
23
+ CONVERSATION_RENAME_CANCEL: "Cancel",
24
+ CONVERSATION_DELETE: "Delete",
25
+ CONVERSATION_DELETE_CONFIRM_TITLE: "Delete conversation",
26
+ CONVERSATION_DELETE_CONFIRM_DESCRIPTION: "Are you sure you want to delete this conversation? This action cannot be undone.",
27
+ CONVERSATION_DELETE_CONFIRM_BUTTON: "Delete",
28
+ CONVERSATION_DELETE_CANCEL: "Cancel",
29
+ // Image upload (legacy)
30
+ IMAGE_UPLOAD_BUTTON: "Attach image",
31
+ IMAGE_UPLOAD_UPLOADING: "Uploading...",
32
+ IMAGE_UPLOAD_ERROR_NOT_IMAGE: "Please select an image file",
33
+ IMAGE_UPLOAD_ERROR_TOO_LARGE: "Image must be less than 4MB",
34
+ IMAGE_UPLOAD_SUCCESS: "Image uploaded",
35
+ IMAGE_UPLOAD_FAILURE: "Failed to upload image",
36
+ // File upload
37
+ FILE_UPLOAD_BUTTON: "Attach file",
38
+ FILE_UPLOAD_ERROR_TOO_LARGE: "File must be less than 10MB",
39
+ FILE_UPLOAD_SUCCESS: "File attached",
40
+ FILE_UPLOAD_FAILURE: "Failed to attach file",
41
+ // Timestamps
42
+ TIME_JUST_NOW: "Just now",
43
+ TIME_MINUTES_AGO: "{count} minutes ago",
44
+ TIME_HOURS_AGO: "{count} hours ago",
45
+ TIME_YESTERDAY: "Yesterday",
46
+ TIME_DAYS_AGO: "{count} days ago",
47
+ // Message actions
48
+ MESSAGE_COPY: "Copy message",
49
+ MESSAGE_COPIED: "Copied!",
50
+ MESSAGE_RETRY: "Retry",
51
+ MESSAGE_EDIT: "Edit message",
52
+ MESSAGE_SAVE: "Save",
53
+ MESSAGE_CANCEL: "Cancel",
54
+ // Accessibility
55
+ A11Y_USER_MESSAGE: "Your message",
56
+ A11Y_ASSISTANT_MESSAGE: "AI response",
57
+ A11Y_COPY_CODE: "Copy code",
58
+ A11Y_CODE_COPIED: "Code copied"
59
+ };
60
+
61
+ export { AI_CHAT_LOCALIZATION };
@@ -0,0 +1,14 @@
1
+ 'use strict';
2
+
3
+ const DEFAULT_ALLOWED_FILE_TYPES = ["image"];
4
+ const FILE_TYPE_MIME_MAP = {
5
+ image: ["image/*"],
6
+ text: ["text/plain"],
7
+ markdown: ["text/markdown"],
8
+ csv: ["text/csv"],
9
+ pdf: ["application/pdf"],
10
+ json: ["application/json"]
11
+ };
12
+
13
+ exports.DEFAULT_ALLOWED_FILE_TYPES = DEFAULT_ALLOWED_FILE_TYPES;
14
+ exports.FILE_TYPE_MIME_MAP = FILE_TYPE_MIME_MAP;
@@ -0,0 +1,11 @@
1
+ const DEFAULT_ALLOWED_FILE_TYPES = ["image"];
2
+ const FILE_TYPE_MIME_MAP = {
3
+ image: ["image/*"],
4
+ text: ["text/plain"],
5
+ markdown: ["text/markdown"],
6
+ csv: ["text/csv"],
7
+ pdf: ["application/pdf"],
8
+ json: ["application/json"]
9
+ };
10
+
11
+ export { DEFAULT_ALLOWED_FILE_TYPES, FILE_TYPE_MIME_MAP };
@@ -0,0 +1,241 @@
1
+ 'use strict';
2
+
3
+ const jsxRuntime = require('react/jsx-runtime');
4
+ const client = require('@btst/stack/plugins/client');
5
+ const yar = require('@btst/yar');
6
+ const plugins_aiChat_queryKeys = require('../../../../../../plugins/ai-chat/query-keys.cjs');
7
+ const chatLayout = require('./components/chat-layout.cjs');
8
+
9
+ function createConversationsLoader(config) {
10
+ return async () => {
11
+ if (config.mode === "public") {
12
+ return;
13
+ }
14
+ if (typeof window === "undefined") {
15
+ const { queryClient, apiBasePath, apiBaseURL, hooks, headers } = config;
16
+ const context = {
17
+ path: "/chat",
18
+ isSSR: true,
19
+ apiBaseURL,
20
+ apiBasePath,
21
+ headers
22
+ };
23
+ try {
24
+ if (hooks?.beforeLoadConversations) {
25
+ const canLoad = await hooks.beforeLoadConversations(context);
26
+ if (!canLoad) {
27
+ throw new Error("Load prevented by beforeLoadConversations hook");
28
+ }
29
+ }
30
+ const client$1 = client.createApiClient({
31
+ baseURL: apiBaseURL,
32
+ basePath: apiBasePath
33
+ });
34
+ const queries = plugins_aiChat_queryKeys.createAiChatQueryKeys(client$1, headers);
35
+ const listQuery = queries.conversations.list();
36
+ await queryClient.prefetchQuery(listQuery);
37
+ if (hooks?.afterLoadConversations) {
38
+ const conversations = queryClient.getQueryData(
39
+ listQuery.queryKey
40
+ ) || null;
41
+ const canContinue = await hooks.afterLoadConversations(
42
+ conversations,
43
+ context
44
+ );
45
+ if (canContinue === false) {
46
+ throw new Error("Load prevented by afterLoadConversations hook");
47
+ }
48
+ }
49
+ const queryState = queryClient.getQueryState(listQuery.queryKey);
50
+ if (queryState?.error && hooks?.onLoadError) {
51
+ const error = queryState.error instanceof Error ? queryState.error : new Error(String(queryState.error));
52
+ await hooks.onLoadError(error, context);
53
+ }
54
+ } catch (error) {
55
+ if (hooks?.onLoadError) {
56
+ await hooks.onLoadError(error, context);
57
+ }
58
+ }
59
+ }
60
+ };
61
+ }
62
+ function createConversationLoader(id, config) {
63
+ return async () => {
64
+ if (typeof window === "undefined") {
65
+ const { queryClient, apiBasePath, apiBaseURL, hooks, headers } = config;
66
+ const context = {
67
+ path: `/chat/${id}`,
68
+ params: { id },
69
+ isSSR: true,
70
+ apiBaseURL,
71
+ apiBasePath,
72
+ headers
73
+ };
74
+ try {
75
+ if (hooks?.beforeLoadConversation) {
76
+ const canLoad = await hooks.beforeLoadConversation(id, context);
77
+ if (!canLoad) {
78
+ throw new Error("Load prevented by beforeLoadConversation hook");
79
+ }
80
+ }
81
+ const client$1 = client.createApiClient({
82
+ baseURL: apiBaseURL,
83
+ basePath: apiBasePath
84
+ });
85
+ const queries = plugins_aiChat_queryKeys.createAiChatQueryKeys(client$1, headers);
86
+ const conversationQuery = queries.conversations.detail(id);
87
+ const listQuery = queries.conversations.list();
88
+ await Promise.all([
89
+ queryClient.prefetchQuery(conversationQuery),
90
+ queryClient.prefetchQuery(listQuery)
91
+ ]);
92
+ if (hooks?.afterLoadConversation) {
93
+ const conversation = queryClient.getQueryData(conversationQuery.queryKey) || null;
94
+ const canContinue = await hooks.afterLoadConversation(
95
+ conversation,
96
+ id,
97
+ context
98
+ );
99
+ if (canContinue === false) {
100
+ throw new Error("Load prevented by afterLoadConversation hook");
101
+ }
102
+ }
103
+ const queryState = queryClient.getQueryState(
104
+ conversationQuery.queryKey
105
+ );
106
+ if (queryState?.error && hooks?.onLoadError) {
107
+ const error = queryState.error instanceof Error ? queryState.error : new Error(String(queryState.error));
108
+ await hooks.onLoadError(error, context);
109
+ }
110
+ } catch (error) {
111
+ if (hooks?.onLoadError) {
112
+ await hooks.onLoadError(error, context);
113
+ }
114
+ }
115
+ }
116
+ };
117
+ }
118
+ function createChatHomeMeta(config) {
119
+ return () => {
120
+ const { siteBaseURL, siteBasePath, seo } = config;
121
+ const fullUrl = `${siteBaseURL}${siteBasePath}/chat`;
122
+ const title = "Chat";
123
+ const description = seo?.description || "Start a conversation with AI";
124
+ return [
125
+ { title },
126
+ { name: "title", content: title },
127
+ { name: "description", content: description },
128
+ { name: "robots", content: "noindex, nofollow" },
129
+ // Chat pages typically shouldn't be indexed
130
+ // Open Graph
131
+ { property: "og:type", content: "website" },
132
+ { property: "og:title", content: title },
133
+ { property: "og:description", content: description },
134
+ { property: "og:url", content: fullUrl },
135
+ ...seo?.siteName ? [{ property: "og:site_name", content: seo.siteName }] : [],
136
+ ...seo?.locale ? [{ property: "og:locale", content: seo.locale }] : [],
137
+ ...seo?.defaultImage ? [{ property: "og:image", content: seo.defaultImage }] : [],
138
+ // Twitter
139
+ { name: "twitter:card", content: "summary" },
140
+ { name: "twitter:title", content: title },
141
+ { name: "twitter:description", content: description }
142
+ ];
143
+ };
144
+ }
145
+ function createConversationMeta(id, config) {
146
+ return () => {
147
+ const {
148
+ queryClient,
149
+ apiBaseURL,
150
+ apiBasePath,
151
+ siteBaseURL,
152
+ siteBasePath,
153
+ seo
154
+ } = config;
155
+ const queries = plugins_aiChat_queryKeys.createAiChatQueryKeys(
156
+ client.createApiClient({
157
+ baseURL: apiBaseURL,
158
+ basePath: apiBasePath
159
+ })
160
+ );
161
+ const conversation = queryClient.getQueryData(queries.conversations.detail(id).queryKey);
162
+ const fullUrl = `${siteBaseURL}${siteBasePath}/chat/${id}`;
163
+ const title = conversation?.title || "Chat";
164
+ const description = seo?.description || "AI conversation";
165
+ return [
166
+ { title },
167
+ { name: "title", content: title },
168
+ { name: "description", content: description },
169
+ { name: "robots", content: "noindex, nofollow" },
170
+ // Open Graph
171
+ { property: "og:type", content: "website" },
172
+ { property: "og:title", content: title },
173
+ { property: "og:description", content: description },
174
+ { property: "og:url", content: fullUrl },
175
+ ...seo?.siteName ? [{ property: "og:site_name", content: seo.siteName }] : [],
176
+ // Twitter
177
+ { name: "twitter:card", content: "summary" },
178
+ { name: "twitter:title", content: title }
179
+ ];
180
+ };
181
+ }
182
+ const aiChatClientPlugin = (config) => {
183
+ const isPublicMode = config.mode === "public";
184
+ if (isPublicMode) {
185
+ return client.defineClientPlugin({
186
+ name: "ai-chat",
187
+ routes: () => ({
188
+ // Chat home - simple chat interface without history
189
+ chat: yar.createRoute("/chat", () => ({
190
+ PageComponent: () => /* @__PURE__ */ jsxRuntime.jsx(
191
+ chatLayout.ChatLayout,
192
+ {
193
+ apiBaseURL: config.apiBaseURL,
194
+ apiBasePath: config.apiBasePath,
195
+ showSidebar: false
196
+ }
197
+ ),
198
+ loader: createConversationsLoader(config),
199
+ meta: createChatHomeMeta(config)
200
+ }))
201
+ }),
202
+ sitemap: async () => []
203
+ });
204
+ }
205
+ return client.defineClientPlugin({
206
+ name: "ai-chat",
207
+ routes: () => ({
208
+ // Chat home - new conversation or list
209
+ chat: yar.createRoute("/chat", () => ({
210
+ PageComponent: () => /* @__PURE__ */ jsxRuntime.jsx(
211
+ chatLayout.ChatLayout,
212
+ {
213
+ apiBaseURL: config.apiBaseURL,
214
+ apiBasePath: config.apiBasePath
215
+ }
216
+ ),
217
+ loader: createConversationsLoader(config),
218
+ meta: createChatHomeMeta(config)
219
+ })),
220
+ // Existing conversation
221
+ chatConversation: yar.createRoute("/chat/:id", ({ params }) => ({
222
+ PageComponent: () => /* @__PURE__ */ jsxRuntime.jsx(
223
+ chatLayout.ChatLayout,
224
+ {
225
+ apiBaseURL: config.apiBaseURL,
226
+ apiBasePath: config.apiBasePath,
227
+ conversationId: params.id
228
+ }
229
+ ),
230
+ loader: createConversationLoader(params.id, config),
231
+ meta: createConversationMeta(params.id, config)
232
+ }))
233
+ }),
234
+ // Chat pages typically shouldn't be in sitemap, but we provide the option
235
+ sitemap: async () => {
236
+ return [];
237
+ }
238
+ });
239
+ };
240
+
241
+ exports.aiChatClientPlugin = aiChatClientPlugin;
@@ -0,0 +1,239 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import { defineClientPlugin, createApiClient } from '@btst/stack/plugins/client';
3
+ import { createRoute } from '@btst/yar';
4
+ import { createAiChatQueryKeys } from '../../../../../../plugins/ai-chat/query-keys.mjs';
5
+ import { ChatLayout } from './components/chat-layout.mjs';
6
+
7
+ function createConversationsLoader(config) {
8
+ return async () => {
9
+ if (config.mode === "public") {
10
+ return;
11
+ }
12
+ if (typeof window === "undefined") {
13
+ const { queryClient, apiBasePath, apiBaseURL, hooks, headers } = config;
14
+ const context = {
15
+ path: "/chat",
16
+ isSSR: true,
17
+ apiBaseURL,
18
+ apiBasePath,
19
+ headers
20
+ };
21
+ try {
22
+ if (hooks?.beforeLoadConversations) {
23
+ const canLoad = await hooks.beforeLoadConversations(context);
24
+ if (!canLoad) {
25
+ throw new Error("Load prevented by beforeLoadConversations hook");
26
+ }
27
+ }
28
+ const client = createApiClient({
29
+ baseURL: apiBaseURL,
30
+ basePath: apiBasePath
31
+ });
32
+ const queries = createAiChatQueryKeys(client, headers);
33
+ const listQuery = queries.conversations.list();
34
+ await queryClient.prefetchQuery(listQuery);
35
+ if (hooks?.afterLoadConversations) {
36
+ const conversations = queryClient.getQueryData(
37
+ listQuery.queryKey
38
+ ) || null;
39
+ const canContinue = await hooks.afterLoadConversations(
40
+ conversations,
41
+ context
42
+ );
43
+ if (canContinue === false) {
44
+ throw new Error("Load prevented by afterLoadConversations hook");
45
+ }
46
+ }
47
+ const queryState = queryClient.getQueryState(listQuery.queryKey);
48
+ if (queryState?.error && hooks?.onLoadError) {
49
+ const error = queryState.error instanceof Error ? queryState.error : new Error(String(queryState.error));
50
+ await hooks.onLoadError(error, context);
51
+ }
52
+ } catch (error) {
53
+ if (hooks?.onLoadError) {
54
+ await hooks.onLoadError(error, context);
55
+ }
56
+ }
57
+ }
58
+ };
59
+ }
60
+ function createConversationLoader(id, config) {
61
+ return async () => {
62
+ if (typeof window === "undefined") {
63
+ const { queryClient, apiBasePath, apiBaseURL, hooks, headers } = config;
64
+ const context = {
65
+ path: `/chat/${id}`,
66
+ params: { id },
67
+ isSSR: true,
68
+ apiBaseURL,
69
+ apiBasePath,
70
+ headers
71
+ };
72
+ try {
73
+ if (hooks?.beforeLoadConversation) {
74
+ const canLoad = await hooks.beforeLoadConversation(id, context);
75
+ if (!canLoad) {
76
+ throw new Error("Load prevented by beforeLoadConversation hook");
77
+ }
78
+ }
79
+ const client = createApiClient({
80
+ baseURL: apiBaseURL,
81
+ basePath: apiBasePath
82
+ });
83
+ const queries = createAiChatQueryKeys(client, headers);
84
+ const conversationQuery = queries.conversations.detail(id);
85
+ const listQuery = queries.conversations.list();
86
+ await Promise.all([
87
+ queryClient.prefetchQuery(conversationQuery),
88
+ queryClient.prefetchQuery(listQuery)
89
+ ]);
90
+ if (hooks?.afterLoadConversation) {
91
+ const conversation = queryClient.getQueryData(conversationQuery.queryKey) || null;
92
+ const canContinue = await hooks.afterLoadConversation(
93
+ conversation,
94
+ id,
95
+ context
96
+ );
97
+ if (canContinue === false) {
98
+ throw new Error("Load prevented by afterLoadConversation hook");
99
+ }
100
+ }
101
+ const queryState = queryClient.getQueryState(
102
+ conversationQuery.queryKey
103
+ );
104
+ if (queryState?.error && hooks?.onLoadError) {
105
+ const error = queryState.error instanceof Error ? queryState.error : new Error(String(queryState.error));
106
+ await hooks.onLoadError(error, context);
107
+ }
108
+ } catch (error) {
109
+ if (hooks?.onLoadError) {
110
+ await hooks.onLoadError(error, context);
111
+ }
112
+ }
113
+ }
114
+ };
115
+ }
116
+ function createChatHomeMeta(config) {
117
+ return () => {
118
+ const { siteBaseURL, siteBasePath, seo } = config;
119
+ const fullUrl = `${siteBaseURL}${siteBasePath}/chat`;
120
+ const title = "Chat";
121
+ const description = seo?.description || "Start a conversation with AI";
122
+ return [
123
+ { title },
124
+ { name: "title", content: title },
125
+ { name: "description", content: description },
126
+ { name: "robots", content: "noindex, nofollow" },
127
+ // Chat pages typically shouldn't be indexed
128
+ // Open Graph
129
+ { property: "og:type", content: "website" },
130
+ { property: "og:title", content: title },
131
+ { property: "og:description", content: description },
132
+ { property: "og:url", content: fullUrl },
133
+ ...seo?.siteName ? [{ property: "og:site_name", content: seo.siteName }] : [],
134
+ ...seo?.locale ? [{ property: "og:locale", content: seo.locale }] : [],
135
+ ...seo?.defaultImage ? [{ property: "og:image", content: seo.defaultImage }] : [],
136
+ // Twitter
137
+ { name: "twitter:card", content: "summary" },
138
+ { name: "twitter:title", content: title },
139
+ { name: "twitter:description", content: description }
140
+ ];
141
+ };
142
+ }
143
+ function createConversationMeta(id, config) {
144
+ return () => {
145
+ const {
146
+ queryClient,
147
+ apiBaseURL,
148
+ apiBasePath,
149
+ siteBaseURL,
150
+ siteBasePath,
151
+ seo
152
+ } = config;
153
+ const queries = createAiChatQueryKeys(
154
+ createApiClient({
155
+ baseURL: apiBaseURL,
156
+ basePath: apiBasePath
157
+ })
158
+ );
159
+ const conversation = queryClient.getQueryData(queries.conversations.detail(id).queryKey);
160
+ const fullUrl = `${siteBaseURL}${siteBasePath}/chat/${id}`;
161
+ const title = conversation?.title || "Chat";
162
+ const description = seo?.description || "AI conversation";
163
+ return [
164
+ { title },
165
+ { name: "title", content: title },
166
+ { name: "description", content: description },
167
+ { name: "robots", content: "noindex, nofollow" },
168
+ // Open Graph
169
+ { property: "og:type", content: "website" },
170
+ { property: "og:title", content: title },
171
+ { property: "og:description", content: description },
172
+ { property: "og:url", content: fullUrl },
173
+ ...seo?.siteName ? [{ property: "og:site_name", content: seo.siteName }] : [],
174
+ // Twitter
175
+ { name: "twitter:card", content: "summary" },
176
+ { name: "twitter:title", content: title }
177
+ ];
178
+ };
179
+ }
180
+ const aiChatClientPlugin = (config) => {
181
+ const isPublicMode = config.mode === "public";
182
+ if (isPublicMode) {
183
+ return defineClientPlugin({
184
+ name: "ai-chat",
185
+ routes: () => ({
186
+ // Chat home - simple chat interface without history
187
+ chat: createRoute("/chat", () => ({
188
+ PageComponent: () => /* @__PURE__ */ jsx(
189
+ ChatLayout,
190
+ {
191
+ apiBaseURL: config.apiBaseURL,
192
+ apiBasePath: config.apiBasePath,
193
+ showSidebar: false
194
+ }
195
+ ),
196
+ loader: createConversationsLoader(config),
197
+ meta: createChatHomeMeta(config)
198
+ }))
199
+ }),
200
+ sitemap: async () => []
201
+ });
202
+ }
203
+ return defineClientPlugin({
204
+ name: "ai-chat",
205
+ routes: () => ({
206
+ // Chat home - new conversation or list
207
+ chat: createRoute("/chat", () => ({
208
+ PageComponent: () => /* @__PURE__ */ jsx(
209
+ ChatLayout,
210
+ {
211
+ apiBaseURL: config.apiBaseURL,
212
+ apiBasePath: config.apiBasePath
213
+ }
214
+ ),
215
+ loader: createConversationsLoader(config),
216
+ meta: createChatHomeMeta(config)
217
+ })),
218
+ // Existing conversation
219
+ chatConversation: createRoute("/chat/:id", ({ params }) => ({
220
+ PageComponent: () => /* @__PURE__ */ jsx(
221
+ ChatLayout,
222
+ {
223
+ apiBaseURL: config.apiBaseURL,
224
+ apiBasePath: config.apiBasePath,
225
+ conversationId: params.id
226
+ }
227
+ ),
228
+ loader: createConversationLoader(params.id, config),
229
+ meta: createConversationMeta(params.id, config)
230
+ }))
231
+ }),
232
+ // Chat pages typically shouldn't be in sitemap, but we provide the option
233
+ sitemap: async () => {
234
+ return [];
235
+ }
236
+ });
237
+ };
238
+
239
+ export { aiChatClientPlugin };
@@ -0,0 +1,65 @@
1
+ 'use strict';
2
+
3
+ const db = require('@btst/db');
4
+
5
+ const aiChatSchema = db.createDbPlugin("aiChat", {
6
+ conversation: {
7
+ modelName: "conversation",
8
+ fields: {
9
+ id: {
10
+ type: "string",
11
+ required: true,
12
+ unique: true
13
+ },
14
+ userId: {
15
+ type: "string",
16
+ required: false
17
+ },
18
+ title: {
19
+ type: "string",
20
+ required: true
21
+ },
22
+ createdAt: {
23
+ type: "date",
24
+ defaultValue: () => /* @__PURE__ */ new Date()
25
+ },
26
+ updatedAt: {
27
+ type: "date",
28
+ defaultValue: () => /* @__PURE__ */ new Date()
29
+ }
30
+ }
31
+ },
32
+ message: {
33
+ modelName: "message",
34
+ fields: {
35
+ id: {
36
+ type: "string",
37
+ required: true,
38
+ unique: true
39
+ },
40
+ conversationId: {
41
+ type: "string",
42
+ required: true,
43
+ references: {
44
+ model: "conversation",
45
+ field: "id",
46
+ onDelete: "cascade"
47
+ }
48
+ },
49
+ role: {
50
+ type: "string",
51
+ required: true
52
+ },
53
+ content: {
54
+ type: "string",
55
+ required: true
56
+ },
57
+ createdAt: {
58
+ type: "date",
59
+ defaultValue: () => /* @__PURE__ */ new Date()
60
+ }
61
+ }
62
+ }
63
+ });
64
+
65
+ exports.aiChatSchema = aiChatSchema;