@allbluecn/admin-app 0.2.6 → 0.3.0

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 (204) hide show
  1. package/package.json +16 -12
  2. package/src/components/admin/admin-user-menu.tsx +2 -4
  3. package/src/components/admin/developer-log.tsx +3 -5
  4. package/src/components/ai-memory/memory-facts-panel.tsx +383 -0
  5. package/src/components/ai-prompts/preview-panel.tsx +165 -0
  6. package/src/components/ai-prompts/prompt-editor.tsx +328 -0
  7. package/src/components/ai-prompts/prompt-table.tsx +141 -0
  8. package/src/components/ai-prompts/prompt-utils.ts +124 -0
  9. package/src/components/ai-prompts/section-editor.tsx +135 -0
  10. package/src/components/ai-prompts/variable-panel.tsx +128 -0
  11. package/src/components/ai-prompts/version-history.tsx +157 -0
  12. package/src/components/ai-provider/provider-form.tsx +6 -10
  13. package/src/components/ai-provider/provider-table.tsx +33 -13
  14. package/src/components/auth/admin-login-form.tsx +1 -1
  15. package/src/components/component/component-form-dialog.tsx +4 -4
  16. package/src/components/component/component-import-dialog.tsx +2 -2
  17. package/src/components/dependency/changelog-dialog.tsx +2 -4
  18. package/src/components/dependency/columns.tsx +4 -8
  19. package/src/components/dependency/dependency-table.tsx +2 -2
  20. package/src/components/dependency/edit-dialog.tsx +7 -11
  21. package/src/components/invitations/invitations-page.tsx +4 -8
  22. package/src/components/knowledge-public/bookmark-form-dialog.tsx +1 -1
  23. package/src/components/knowledge-public/compliance-form-dialog.tsx +1 -1
  24. package/src/components/knowledge-public/legal-form-dialog.tsx +2 -2
  25. package/src/components/layout/sidebar-02/app-sidebar.tsx +17 -9
  26. package/src/components/layout/sidebar-02/nav-main.tsx +6 -14
  27. package/src/components/layout/sidebar-02/nav-notifications.tsx +3 -7
  28. package/src/components/magicui/rainbow-button.tsx +2 -2
  29. package/src/components/market/columns.tsx +2 -4
  30. package/src/components/market/market-app-form.tsx +2 -2
  31. package/src/components/market/market-app-list.tsx +1 -1
  32. package/src/components/oauth-providers/provider-page.tsx +1 -1
  33. package/src/components/ui/alert-dialog.tsx +28 -57
  34. package/src/components/ui/alert.tsx +3 -4
  35. package/src/components/ui/avatar.tsx +5 -28
  36. package/src/components/ui/badge.tsx +19 -34
  37. package/src/components/ui/button.tsx +14 -41
  38. package/src/components/ui/card.tsx +6 -24
  39. package/src/components/ui/checkbox.tsx +4 -26
  40. package/src/components/ui/collapsible.tsx +6 -37
  41. package/src/components/ui/dialog.tsx +30 -60
  42. package/src/components/ui/dropdown-menu.tsx +118 -137
  43. package/src/components/ui/field.tsx +8 -27
  44. package/src/components/ui/input-group.tsx +13 -26
  45. package/src/components/ui/input.tsx +4 -21
  46. package/src/components/ui/label.tsx +3 -27
  47. package/src/components/ui/pagination.tsx +17 -31
  48. package/src/components/ui/select.tsx +101 -76
  49. package/src/components/ui/separator.tsx +4 -27
  50. package/src/components/ui/sheet.tsx +29 -58
  51. package/src/components/ui/sidebar.tsx +119 -117
  52. package/src/components/ui/skeleton.tsx +1 -18
  53. package/src/components/ui/switch.tsx +5 -24
  54. package/src/components/ui/table.tsx +1 -19
  55. package/src/components/ui/textarea.tsx +2 -20
  56. package/src/components/ui/toast.tsx +282 -0
  57. package/src/components/ui/tooltip.tsx +34 -45
  58. package/src/components/user/settings-activity-log.tsx +1 -1
  59. package/src/components/user/user-create-dialog.tsx +2 -2
  60. package/src/components/user/user-filters.tsx +2 -2
  61. package/src/hooks/use-mobile.ts +0 -17
  62. package/src/lib/pacer.ts +21 -0
  63. package/src/lib/utils.ts +1 -23
  64. package/src/paraglide/messages/_index.js +95 -0
  65. package/src/paraglide/messages/admin_ai_memory_action_clearuser1.js +30 -0
  66. package/src/paraglide/messages/admin_ai_memory_action_query.js +30 -0
  67. package/src/paraglide/messages/admin_ai_memory_clear_cancel.js +30 -0
  68. package/src/paraglide/messages/admin_ai_memory_clear_confirm_action.js +30 -0
  69. package/src/paraglide/messages/admin_ai_memory_clear_confirm_description.js +30 -0
  70. package/src/paraglide/messages/admin_ai_memory_clear_confirm_title.js +30 -0
  71. package/src/paraglide/messages/admin_ai_memory_columns_actions.js +30 -0
  72. package/src/paraglide/messages/admin_ai_memory_columns_content.js +30 -0
  73. package/src/paraglide/messages/admin_ai_memory_columns_createdat1.js +30 -0
  74. package/src/paraglide/messages/admin_ai_memory_columns_threadid1.js +30 -0
  75. package/src/paraglide/messages/admin_ai_memory_delete_cancel.js +30 -0
  76. package/src/paraglide/messages/admin_ai_memory_delete_confirm_action.js +30 -0
  77. package/src/paraglide/messages/admin_ai_memory_delete_confirm_description.js +30 -0
  78. package/src/paraglide/messages/admin_ai_memory_delete_confirm_title.js +30 -0
  79. package/src/paraglide/messages/admin_ai_memory_empty.js +30 -0
  80. package/src/paraglide/messages/admin_ai_memory_emptyhint1.js +30 -0
  81. package/src/paraglide/messages/admin_ai_memory_error_nouserid2.js +30 -0
  82. package/src/paraglide/messages/admin_ai_memory_error_query.js +30 -0
  83. package/src/paraglide/messages/admin_ai_memory_error_title.js +30 -0
  84. package/src/paraglide/messages/admin_ai_memory_form_user.js +30 -0
  85. package/src/paraglide/messages/admin_ai_memory_page_description.js +30 -0
  86. package/src/paraglide/messages/admin_ai_memory_page_title.js +30 -0
  87. package/src/paraglide/messages/admin_ai_memory_placeholder_user.js +30 -0
  88. package/src/paraglide/messages/admin_ai_memory_stat_count.js +30 -0
  89. package/src/paraglide/messages/admin_ai_memory_stat_lastwrite1.js +30 -0
  90. package/src/paraglide/messages/admin_ai_memory_toast_cleared.js +30 -0
  91. package/src/paraglide/messages/admin_ai_memory_toast_deleted.js +30 -0
  92. package/src/paraglide/messages/admin_ai_prompts_active.js +30 -0
  93. package/src/paraglide/messages/admin_ai_prompts_back.js +30 -0
  94. package/src/paraglide/messages/admin_ai_prompts_badge_protected.js +30 -0
  95. package/src/paraglide/messages/admin_ai_prompts_cache_hint.js +30 -0
  96. package/src/paraglide/messages/admin_ai_prompts_columns_active.js +30 -0
  97. package/src/paraglide/messages/admin_ai_prompts_columns_key.js +30 -0
  98. package/src/paraglide/messages/admin_ai_prompts_columns_name.js +30 -0
  99. package/src/paraglide/messages/admin_ai_prompts_columns_protected.js +30 -0
  100. package/src/paraglide/messages/admin_ai_prompts_columns_updatedat1.js +30 -0
  101. package/src/paraglide/messages/admin_ai_prompts_columns_version.js +30 -0
  102. package/src/paraglide/messages/admin_ai_prompts_description.js +30 -0
  103. package/src/paraglide/messages/admin_ai_prompts_description_placeholder.js +30 -0
  104. package/src/paraglide/messages/admin_ai_prompts_edit.js +30 -0
  105. package/src/paraglide/messages/admin_ai_prompts_name.js +30 -0
  106. package/src/paraglide/messages/admin_ai_prompts_name_placeholder.js +30 -0
  107. package/src/paraglide/messages/admin_ai_prompts_note_placeholder.js +30 -0
  108. package/src/paraglide/messages/admin_ai_prompts_page_description.js +30 -0
  109. package/src/paraglide/messages/admin_ai_prompts_page_title.js +30 -0
  110. package/src/paraglide/messages/admin_ai_prompts_preview_empty.js +30 -0
  111. package/src/paraglide/messages/admin_ai_prompts_preview_generating.js +30 -0
  112. package/src/paraglide/messages/admin_ai_prompts_preview_hint.js +30 -0
  113. package/src/paraglide/messages/admin_ai_prompts_preview_nocontent1.js +30 -0
  114. package/src/paraglide/messages/admin_ai_prompts_preview_placeholder.js +30 -0
  115. package/src/paraglide/messages/admin_ai_prompts_preview_section.js +30 -0
  116. package/src/paraglide/messages/admin_ai_prompts_preview_title.js +30 -0
  117. package/src/paraglide/messages/admin_ai_prompts_protected_hint.js +30 -0
  118. package/src/paraglide/messages/admin_ai_prompts_rollback.js +30 -0
  119. package/src/paraglide/messages/admin_ai_prompts_rollback_confirm_action.js +30 -0
  120. package/src/paraglide/messages/admin_ai_prompts_rollback_confirm_description.js +30 -0
  121. package/src/paraglide/messages/admin_ai_prompts_rollback_confirm_title.js +30 -0
  122. package/src/paraglide/messages/admin_ai_prompts_save.js +30 -0
  123. package/src/paraglide/messages/admin_ai_prompts_section_add.js +30 -0
  124. package/src/paraglide/messages/admin_ai_prompts_section_id.js +30 -0
  125. package/src/paraglide/messages/admin_ai_prompts_section_movedown1.js +30 -0
  126. package/src/paraglide/messages/admin_ai_prompts_section_moveup1.js +30 -0
  127. package/src/paraglide/messages/admin_ai_prompts_section_order.js +30 -0
  128. package/src/paraglide/messages/admin_ai_prompts_section_remove.js +30 -0
  129. package/src/paraglide/messages/admin_ai_prompts_section_template_placeholder.js +30 -0
  130. package/src/paraglide/messages/admin_ai_prompts_sections_empty.js +30 -0
  131. package/src/paraglide/messages/admin_ai_prompts_sections_hint.js +30 -0
  132. package/src/paraglide/messages/admin_ai_prompts_sections_title.js +30 -0
  133. package/src/paraglide/messages/admin_ai_prompts_toast_activated.js +30 -0
  134. package/src/paraglide/messages/admin_ai_prompts_toast_failed.js +30 -0
  135. package/src/paraglide/messages/admin_ai_prompts_toast_protected_locked.js +30 -0
  136. package/src/paraglide/messages/admin_ai_prompts_toast_rolled_back.js +30 -0
  137. package/src/paraglide/messages/admin_ai_prompts_toast_save_failed.js +30 -0
  138. package/src/paraglide/messages/admin_ai_prompts_toast_saved.js +30 -0
  139. package/src/paraglide/messages/admin_ai_prompts_variable_add.js +30 -0
  140. package/src/paraglide/messages/admin_ai_prompts_variable_declarehint1.js +30 -0
  141. package/src/paraglide/messages/admin_ai_prompts_variable_description_placeholder.js +30 -0
  142. package/src/paraglide/messages/admin_ai_prompts_variable_name_placeholder.js +30 -0
  143. package/src/paraglide/messages/admin_ai_prompts_variable_remove.js +30 -0
  144. package/src/paraglide/messages/admin_ai_prompts_variable_undeclared.js +30 -0
  145. package/src/paraglide/messages/admin_ai_prompts_variables_empty.js +30 -0
  146. package/src/paraglide/messages/admin_ai_prompts_variables_title.js +30 -0
  147. package/src/paraglide/messages/admin_ai_prompts_versions_current.js +30 -0
  148. package/src/paraglide/messages/admin_ai_prompts_versions_empty.js +30 -0
  149. package/src/paraglide/messages/admin_ai_prompts_versions_hint.js +30 -0
  150. package/src/paraglide/messages/admin_ai_prompts_versions_nonote1.js +30 -0
  151. package/src/paraglide/messages/admin_ai_prompts_versions_title.js +30 -0
  152. package/src/paraglide/messages/admin_ai_prompts_versions_unknowncreator1.js +30 -0
  153. package/src/paraglide/messages/admin_ai_table_seedfromseed2.js +30 -0
  154. package/src/paraglide/messages/admin_ai_table_toast_seedcreated1.js +30 -0
  155. package/src/paraglide/messages/admin_ai_table_toast_seedfailed1.js +30 -0
  156. package/src/paraglide/messages/admin_ai_table_toast_seednonew2.js +30 -0
  157. package/src/paraglide/messages/common_monitoring_aiusage_sandbox1.js +30 -0
  158. package/src/paraglide/messages/common_monitoring_aiusage_sandboxvalue2.js +30 -0
  159. package/src/paraglide/messages/common_nav_aiprompts1.js +30 -0
  160. package/src/routeTree.gen.ts +101 -0
  161. package/src/routes/__root.tsx +2 -2
  162. package/src/{components/ui/sonner.tsx → routes/_nav/ai-memory/route.lazy.tsx} +24 -16
  163. package/src/routes/_nav/ai-memory/route.tsx +31 -0
  164. package/src/routes/_nav/ai-prompts/$key/route.lazy.tsx +32 -0
  165. package/src/routes/_nav/ai-prompts/$key/route.tsx +37 -0
  166. package/src/routes/_nav/ai-prompts/index/route.lazy.tsx +47 -0
  167. package/src/routes/_nav/ai-prompts/route.lazy.tsx +26 -0
  168. package/src/routes/_nav/ai-prompts/route.tsx +31 -0
  169. package/src/routes/_nav/compliance/route.lazy.tsx +2 -4
  170. package/src/routes/_nav/components/route.lazy.tsx +1 -1
  171. package/src/routes/_nav/knowledge-public/bookmarks/route.lazy.tsx +1 -1
  172. package/src/routes/_nav/knowledge-public/compliance/route.lazy.tsx +1 -1
  173. package/src/routes/_nav/knowledge-public/legal/route.lazy.tsx +1 -1
  174. package/src/routes/_nav/licenses/$licenseId/route.lazy.tsx +1 -1
  175. package/src/routes/_nav/monitoring/ai-usage/route.lazy.tsx +10 -1
  176. package/src/routes/_nav/monitoring/errors/route.lazy.tsx +1 -1
  177. package/src/routes/_nav/monitoring/health/route.lazy.tsx +1 -1
  178. package/src/routes/_nav/monitoring/logs/route.lazy.tsx +1 -1
  179. package/src/routes/_nav/monitoring/metrics/route.lazy.tsx +1 -1
  180. package/src/routes/_nav/monitoring/sentry/route.lazy.tsx +1 -1
  181. package/src/routes/_nav/permissions/route.lazy.tsx +2 -2
  182. package/src/routes/_nav/sso/route.lazy.tsx +1 -1
  183. package/src/routes/_nav/users/$userId/route.lazy.tsx +3 -3
  184. package/src/routes/setup/route.lazy.tsx +1 -1
  185. package/src/server/__tests__/prompt-defaults.test.ts +139 -0
  186. package/src/server/admin-ai-usage.ts +22 -4
  187. package/src/server/ai-memory/store.ts +103 -0
  188. package/src/server/serverFns/ai-memory/clear.ts +31 -0
  189. package/src/server/serverFns/ai-memory/delete.ts +31 -0
  190. package/src/server/serverFns/ai-memory/list-users.ts +40 -0
  191. package/src/server/serverFns/ai-memory/list.ts +54 -0
  192. package/src/server/serverFns/ai-prompts/activate.ts +53 -0
  193. package/src/server/serverFns/ai-prompts/get.ts +74 -0
  194. package/src/server/serverFns/ai-prompts/list.ts +55 -0
  195. package/src/server/serverFns/ai-prompts/preview.ts +66 -0
  196. package/src/server/serverFns/ai-prompts/prompt-defaults.ts +63 -0
  197. package/src/server/serverFns/ai-prompts/prompt-schemas.ts +47 -0
  198. package/src/server/serverFns/ai-prompts/rollback.ts +86 -0
  199. package/src/server/serverFns/ai-prompts/save.ts +129 -0
  200. package/src/server/serverFns/ai-provider/seed-from-seed.ts +64 -0
  201. package/src/styles/globals.css +92 -77
  202. package/src/components/layout/sidebar-02/logo.tsx +0 -40
  203. package/src/components/layout/sidebar-02/team-switcher.tsx +0 -106
  204. package/src/components/providers/theme-toggle.tsx +0 -59
@@ -0,0 +1,282 @@
1
+ import * as React from "react"
2
+ import { Toast as ToastPrimitive } from "@base-ui/react/toast"
3
+ import { cn } from "cn"
4
+
5
+ import { Button } from "@/components/ui/button"
6
+ import { XIcon, CircleCheckIcon, InfoIcon, TriangleAlertIcon, OctagonXIcon, Loader2Icon } from "lucide-react"
7
+
8
+ const toastManager = ToastPrimitive.createToastManager()
9
+
10
+ interface SonnerToastOptions {
11
+ description?: React.ReactNode
12
+ duration?: number
13
+ action?: { label: React.ReactNode; onClick?: () => void }
14
+ }
15
+
16
+ function buildOptions(message: React.ReactNode, type: string | undefined, opts?: SonnerToastOptions) {
17
+ return {
18
+ type,
19
+ title: message,
20
+ description: opts?.description,
21
+ timeout: opts?.duration,
22
+ actionProps: opts?.action
23
+ ? { children: opts.action.label, onClick: opts.action.onClick }
24
+ : undefined,
25
+ }
26
+ }
27
+
28
+ const toast = Object.assign(
29
+ (message: React.ReactNode, opts?: SonnerToastOptions) =>
30
+ toastManager.add(buildOptions(message, undefined, opts)),
31
+ {
32
+ success: (message: React.ReactNode, opts?: SonnerToastOptions) =>
33
+ toastManager.add(buildOptions(message, "success", opts)),
34
+ error: (message: React.ReactNode, opts?: SonnerToastOptions) =>
35
+ toastManager.add(buildOptions(message, "error", opts)),
36
+ warning: (message: React.ReactNode, opts?: SonnerToastOptions) =>
37
+ toastManager.add(buildOptions(message, "warning", opts)),
38
+ info: (message: React.ReactNode, opts?: SonnerToastOptions) =>
39
+ toastManager.add(buildOptions(message, "info", opts)),
40
+ loading: (message: React.ReactNode, opts?: SonnerToastOptions) =>
41
+ toastManager.add(buildOptions(message, "loading", { ...opts, duration: 0 })),
42
+ message: (message: React.ReactNode, opts?: SonnerToastOptions) =>
43
+ toastManager.add(buildOptions(message, undefined, opts)),
44
+ dismiss: (id?: string) => toastManager.close(id),
45
+ promise: <Value,>(
46
+ promiseValue: Promise<Value>,
47
+ options: {
48
+ loading: string
49
+ success: string | ((result: Value) => string)
50
+ error: string | ((error: unknown) => string)
51
+ },
52
+ ) =>
53
+ toastManager.promise(promiseValue, {
54
+ loading: options.loading,
55
+ success: options.success,
56
+ error: options.error,
57
+ }),
58
+ },
59
+ )
60
+
61
+ function ToastProvider({ ...props }: ToastPrimitive.Provider.Props) {
62
+ return <ToastPrimitive.Provider {...props} />
63
+ }
64
+
65
+ function ToastPortal({ ...props }: ToastPrimitive.Portal.Props) {
66
+ return <ToastPrimitive.Portal data-slot="toast-portal" {...props} />
67
+ }
68
+
69
+ function ToastViewport({ className, ...props }: ToastPrimitive.Viewport.Props) {
70
+ return (
71
+ <ToastPrimitive.Viewport
72
+ data-slot="toast-viewport"
73
+ className={cn(
74
+ "pointer-events-none fixed bottom-4 right-4 z-50 w-full max-w-sm outline-none sm:bottom-6 sm:right-6",
75
+ className
76
+ )}
77
+ {...props}
78
+ />
79
+ )
80
+ }
81
+
82
+ function Toast({ className, ...props }: ToastPrimitive.Root.Props) {
83
+ return (
84
+ <ToastPrimitive.Root
85
+ data-slot="toast"
86
+ className={cn(
87
+ "group/toast pointer-events-auto absolute right-0 bottom-0 z-[calc(1000-var(--toast-index))] w-full origin-bottom rounded-2xl border bg-popover text-popover-foreground shadow-lg will-change-transform outline-none select-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50",
88
+ "[--gap:0.75rem] [--height:var(--toast-frontmost-height,var(--toast-height))] [--offset-y:calc(var(--toast-offset-y)*-1+calc(var(--toast-index)*var(--gap)*-1)+var(--toast-swipe-movement-y))] [--peek:0.75rem] [--scale:calc(max(0,1-(var(--toast-index)*0.1)))] [--shrink:calc(1-var(--scale))]",
89
+ "h-(--height) [transform:translateX(var(--toast-swipe-movement-x))_translateY(calc(var(--toast-swipe-movement-y)-(var(--toast-index)*var(--peek))-(var(--shrink)*var(--height))))_scale(var(--scale))] [transition:transform_500ms_cubic-bezier(0.22,1,0.36,1),opacity_500ms,height_150ms]",
90
+ "after:absolute after:top-full after:left-0 after:h-[calc(var(--gap)+1px)] after:w-full after:content-['']",
91
+ "data-expanded:h-(--toast-height) data-expanded:[transform:translateX(var(--toast-swipe-movement-x))_translateY(var(--offset-y))]",
92
+ "data-limited:opacity-0 data-starting-style:[transform:translateY(150%)]",
93
+ "[&[data-ending-style]:not([data-limited]):not([data-swipe-direction])]:[transform:translateY(150%)]",
94
+ "data-ending-style:data-[swipe-direction=down]:[transform:translateY(calc(var(--toast-swipe-movement-y)+150%))]",
95
+ "data-ending-style:data-[swipe-direction=left]:[transform:translateX(calc(var(--toast-swipe-movement-x)-150%))_translateY(var(--offset-y))]",
96
+ "data-ending-style:data-[swipe-direction=right]:[transform:translateX(calc(var(--toast-swipe-movement-x)+150%))_translateY(var(--offset-y))]",
97
+ "data-ending-style:data-[swipe-direction=up]:[transform:translateY(calc(var(--toast-swipe-movement-y)-150%))]",
98
+ "data-expanded:data-ending-style:data-[swipe-direction=down]:[transform:translateY(calc(var(--toast-swipe-movement-y)+150%))]",
99
+ "data-expanded:data-ending-style:data-[swipe-direction=left]:[transform:translateX(calc(var(--toast-swipe-movement-x)-150%))_translateY(var(--offset-y))]",
100
+ "data-expanded:data-ending-style:data-[swipe-direction=right]:[transform:translateX(calc(var(--toast-swipe-movement-x)+150%))_translateY(var(--offset-y))]",
101
+ "data-expanded:data-ending-style:data-[swipe-direction=up]:[transform:translateY(calc(var(--toast-swipe-movement-y)-150%))]",
102
+ className
103
+ )}
104
+ {...props}
105
+ />
106
+ )
107
+ }
108
+
109
+ function ToastContent({ className, ...props }: ToastPrimitive.Content.Props) {
110
+ return (
111
+ <ToastPrimitive.Content
112
+ data-slot="toast-content"
113
+ className={cn(
114
+ "flex h-full items-center gap-3 overflow-hidden p-4 transition-opacity duration-250 ease-[cubic-bezier(0.22,1,0.36,1)] data-behind:opacity-0 data-expanded:opacity-100",
115
+ className
116
+ )}
117
+ {...props}
118
+ />
119
+ )
120
+ }
121
+
122
+ function ToastTitle({ className, ...props }: ToastPrimitive.Title.Props) {
123
+ return (
124
+ <ToastPrimitive.Title
125
+ data-slot="toast-title"
126
+ className={cn("text-sm font-medium", className)}
127
+ {...props}
128
+ />
129
+ )
130
+ }
131
+
132
+ function ToastDescription({
133
+ className,
134
+ ...props
135
+ }: ToastPrimitive.Description.Props) {
136
+ return (
137
+ <ToastPrimitive.Description
138
+ data-slot="toast-description"
139
+ className={cn("text-sm text-muted-foreground", className)}
140
+ {...props}
141
+ />
142
+ )
143
+ }
144
+
145
+ function ToastAction({
146
+ className,
147
+ render = <Button variant="outline" size="sm" />,
148
+ ...props
149
+ }: ToastPrimitive.Action.Props) {
150
+ return (
151
+ <ToastPrimitive.Action
152
+ data-slot="toast-action"
153
+ render={render}
154
+ className={cn("shrink-0", className)}
155
+ {...props}
156
+ />
157
+ )
158
+ }
159
+
160
+ function ToastClose({
161
+ className,
162
+ children,
163
+ render = <Button variant="ghost" size="icon-sm" />,
164
+ ...props
165
+ }: ToastPrimitive.Close.Props) {
166
+ return (
167
+ <ToastPrimitive.Close
168
+ data-slot="toast-close"
169
+ aria-label="Close toast"
170
+ render={render}
171
+ className={cn(
172
+ "relative shrink-0 text-muted-foreground after:absolute after:-inset-2 after:content-[''] hover:text-foreground",
173
+ className
174
+ )}
175
+ {...props}
176
+ >
177
+ {children ?? (
178
+ <XIcon aria-hidden="true" />
179
+ )}
180
+ </ToastPrimitive.Close>
181
+ )
182
+ }
183
+
184
+ function ToastIcon({ type }: { type: string | undefined }) {
185
+ let icon: React.ReactNode = null
186
+
187
+ if (type === "success") {
188
+ icon = (
189
+ <CircleCheckIcon aria-hidden="true" />
190
+ )
191
+ }
192
+
193
+ if (type === "info") {
194
+ icon = (
195
+ <InfoIcon aria-hidden="true" />
196
+ )
197
+ }
198
+
199
+ if (type === "warning") {
200
+ icon = (
201
+ <TriangleAlertIcon aria-hidden="true" />
202
+ )
203
+ }
204
+
205
+ if (type === "error") {
206
+ icon = (
207
+ <OctagonXIcon className="text-destructive" aria-hidden="true" />
208
+ )
209
+ }
210
+
211
+ if (type === "loading") {
212
+ icon = (
213
+ <Loader2Icon className="animate-spin" aria-hidden="true" />
214
+ )
215
+ }
216
+
217
+ if (!icon) {
218
+ return null
219
+ }
220
+
221
+ return (
222
+ <span
223
+ data-slot="toast-icon"
224
+ className="shrink-0 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4"
225
+ >
226
+ {icon}
227
+ </span>
228
+ )
229
+ }
230
+
231
+ function ToastList() {
232
+ const { toasts } = ToastPrimitive.useToastManager()
233
+
234
+ return toasts.map((toastItem) => (
235
+ <Toast key={toastItem.id} toast={toastItem}>
236
+ <ToastContent>
237
+ <ToastIcon type={toastItem.type} />
238
+ <div className="flex min-w-0 flex-1 flex-col gap-1">
239
+ <ToastTitle />
240
+ <ToastDescription />
241
+ </div>
242
+ <ToastAction />
243
+ <ToastClose />
244
+ </ToastContent>
245
+ </Toast>
246
+ ))
247
+ }
248
+
249
+ function Toaster({
250
+ children,
251
+ ...props
252
+ }: ToastPrimitive.Provider.Props) {
253
+ return (
254
+ <ToastProvider toastManager={toastManager} {...props}>
255
+ {children}
256
+ <ToastPortal>
257
+ <ToastViewport>
258
+ <ToastList />
259
+ </ToastViewport>
260
+ </ToastPortal>
261
+ </ToastProvider>
262
+ )
263
+ }
264
+
265
+ const createToastManager = ToastPrimitive.createToastManager
266
+ const useToastManager = ToastPrimitive.useToastManager
267
+
268
+ export {
269
+ Toaster,
270
+ Toast,
271
+ ToastAction,
272
+ ToastClose,
273
+ ToastContent,
274
+ ToastDescription,
275
+ ToastPortal,
276
+ ToastProvider,
277
+ ToastTitle,
278
+ ToastViewport,
279
+ createToastManager,
280
+ toast,
281
+ useToastManager,
282
+ }
@@ -1,74 +1,63 @@
1
- // SPDX-License-Identifier: AGPL-3.0-or-later
2
- // AllBlue - 理想之海
3
- // Copyright (C) 2026 AllBlue Contributors
4
- //
5
- // This program is free software: you can redistribute it and/or modify
6
- // it under the terms of the GNU Affero General Public License as published by
7
- // the Free Software Foundation, either version 3 of the License, or
8
- // (at your option) any later version.
9
- //
10
- // This program is distributed in the hope that it will be useful,
11
- // but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
- // GNU Affero General Public License for more details.
14
- //
15
- // You should have received a copy of the GNU Affero General Public License
16
- // along with this program. If not, see <https://www.gnu.org/licenses/>.
17
-
18
- "use client"
19
-
20
- import * as React from "react"
21
- import { Tooltip as TooltipPrimitive } from "radix-ui"
22
-
23
- import { cn } from "@/lib/utils"
1
+ import { Tooltip as TooltipPrimitive } from "@base-ui/react/tooltip"
2
+ import { cn } from "cn"
24
3
 
25
4
  function TooltipProvider({
26
- delayDuration = 0,
5
+ delay = 0,
27
6
  ...props
28
- }: React.ComponentProps<typeof TooltipPrimitive.Provider>) {
7
+ }: TooltipPrimitive.Provider.Props) {
29
8
  return (
30
9
  <TooltipPrimitive.Provider
31
10
  data-slot="tooltip-provider"
32
- delayDuration={delayDuration}
11
+ delay={delay}
33
12
  {...props}
34
13
  />
35
14
  )
36
15
  }
37
16
 
38
- function Tooltip({
39
- ...props
40
- }: React.ComponentProps<typeof TooltipPrimitive.Root>) {
17
+ function Tooltip({ ...props }: TooltipPrimitive.Root.Props) {
41
18
  return <TooltipPrimitive.Root data-slot="tooltip" {...props} />
42
19
  }
43
20
 
44
- function TooltipTrigger({
45
- ...props
46
- }: React.ComponentProps<typeof TooltipPrimitive.Trigger>) {
21
+ function TooltipTrigger({ ...props }: TooltipPrimitive.Trigger.Props) {
47
22
  return <TooltipPrimitive.Trigger data-slot="tooltip-trigger" {...props} />
48
23
  }
49
24
 
50
25
  function TooltipContent({
51
26
  className,
52
- sideOffset = 0,
27
+ side = "top",
28
+ sideOffset = 4,
29
+ align = "center",
30
+ alignOffset = 0,
53
31
  children,
54
32
  ...props
55
- }: React.ComponentProps<typeof TooltipPrimitive.Content>) {
33
+ }: TooltipPrimitive.Popup.Props &
34
+ Pick<
35
+ TooltipPrimitive.Positioner.Props,
36
+ "align" | "alignOffset" | "side" | "sideOffset"
37
+ >) {
56
38
  return (
57
39
  <TooltipPrimitive.Portal>
58
- <TooltipPrimitive.Content
59
- data-slot="tooltip-content"
40
+ <TooltipPrimitive.Positioner
41
+ align={align}
42
+ alignOffset={alignOffset}
43
+ side={side}
60
44
  sideOffset={sideOffset}
61
- className={cn(
62
- "z-50 inline-flex w-fit max-w-xs origin-(--radix-tooltip-content-transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
63
- className
64
- )}
65
- {...props}
45
+ className="isolate z-50"
66
46
  >
67
- {children}
68
- <TooltipPrimitive.Arrow className="z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground" />
69
- </TooltipPrimitive.Content>
47
+ <TooltipPrimitive.Popup
48
+ data-slot="tooltip-content"
49
+ className={cn(
50
+ "z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
51
+ className
52
+ )}
53
+ {...props}
54
+ >
55
+ {children}
56
+ <TooltipPrimitive.Arrow className="z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5" />
57
+ </TooltipPrimitive.Popup>
58
+ </TooltipPrimitive.Positioner>
70
59
  </TooltipPrimitive.Portal>
71
60
  )
72
61
  }
73
62
 
74
- export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger }
63
+ export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider }
@@ -216,7 +216,7 @@ export default function SettingsActivityLog({
216
216
  {m.common_activityLog_actionType()}
217
217
  </FieldLabel>
218
218
  </div>
219
- <Select onValueChange={setSelectedType} value={selectedType}>
219
+ <Select onValueChange={(v) => setSelectedType(v ?? "")} value={selectedType}>
220
220
  <SelectTrigger id="action-type">
221
221
  <SelectValue />
222
222
  </SelectTrigger>
@@ -35,7 +35,7 @@ import {
35
35
  SelectValue,
36
36
  } from "@/components/ui/select";
37
37
  import { createUserFn } from "@/server/serverFns/user/create";
38
- import { toast } from '@/components/ui/sonner';
38
+ import { toast } from '@/components/ui/toast';
39
39
 
40
40
  interface UserCreateDialogProps {
41
41
  open: boolean;
@@ -111,7 +111,7 @@ export function UserCreateDialog({ open, onOpenChange }: UserCreateDialogProps)
111
111
  </div>
112
112
  <div className="grid gap-2">
113
113
  <Label>角色</Label>
114
- <Select value={form.role} onValueChange={(v: string) => setForm((f) => ({ ...f, role: v as typeof form.role }))}>
114
+ <Select value={form.role} onValueChange={(v) => setForm((f) => ({ ...f, role: (v ?? "") as typeof form.role }))}>
115
115
  <SelectTrigger>
116
116
  <SelectValue />
117
117
  </SelectTrigger>
@@ -76,7 +76,7 @@ export function UserFilters({ search, role, status }: UserFiltersProps) {
76
76
 
77
77
  <Select
78
78
  value={role || "all"}
79
- onValueChange={(v: string) => updateParam("role", v)}
79
+ onValueChange={(v) => updateParam("role", v ?? "")}
80
80
  >
81
81
  <SelectTrigger className="w-32.5">
82
82
  <SelectValue placeholder={m.common_userFilters_rolePlaceholder()} />
@@ -91,7 +91,7 @@ export function UserFilters({ search, role, status }: UserFiltersProps) {
91
91
 
92
92
  <Select
93
93
  value={status || "all"}
94
- onValueChange={(v: string) => updateParam("status", v)}
94
+ onValueChange={(v) => updateParam("status", v ?? "")}
95
95
  >
96
96
  <SelectTrigger className="w-32.5">
97
97
  <SelectValue placeholder={m.common_userFilters_statusPlaceholder()} />
@@ -1,20 +1,3 @@
1
- // SPDX-License-Identifier: AGPL-3.0-or-later
2
- // AllBlue - 理想之海
3
- // Copyright (C) 2026 AllBlue Contributors
4
- //
5
- // This program is free software: you can redistribute it and/or modify
6
- // it under the terms of the GNU Affero General Public License as published by
7
- // the Free Software Foundation, either version 3 of the License, or
8
- // (at your option) any later version.
9
- //
10
- // This program is distributed in the hope that it will be useful,
11
- // but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
- // GNU Affero General Public License for more details.
14
- //
15
- // You should have received a copy of the GNU Affero General Public License
16
- // along with this program. If not, see <https://www.gnu.org/licenses/>.
17
-
18
1
  import * as React from "react"
19
2
 
20
3
  const MOBILE_BREAKPOINT = 768
@@ -0,0 +1,21 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-or-later
2
+ // AllBlue - 理想之海
3
+ // Copyright (C) 2026 AllBlue Contributors
4
+ //
5
+ // This program is free software: you can redistribute it and/or modify
6
+ // it under the terms of the GNU Affero General Public License as published by
7
+ // the Free Software Foundation, either version 3 of the License, or
8
+ // (at your option) any later version.
9
+ //
10
+ // This program is distributed in the hope that it will be useful,
11
+ // but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ // GNU Affero General Public License for more details.
14
+ //
15
+ // You should have received a copy of the GNU Affero General Public License
16
+ // along with this program. If not, see <https://www.gnu.org/licenses/>.
17
+
18
+ // apps/admin/src/lib/pacer.ts
19
+ export { useDebouncedCallback } from "@tanstack/react-pacer"
20
+
21
+ export const PROMPT_PREVIEW_DEBOUNCE_MS = 300
package/src/lib/utils.ts CHANGED
@@ -1,23 +1 @@
1
- // SPDX-License-Identifier: AGPL-3.0-or-later
2
- // AllBlue - 理想之海
3
- // Copyright (C) 2026 AllBlue Contributors
4
- //
5
- // This program is free software: you can redistribute it and/or modify
6
- // it under the terms of the GNU Affero General Public License as published by
7
- // the Free Software Foundation, either version 3 of the License, or
8
- // (at your option) any later version.
9
- //
10
- // This program is distributed in the hope that it will be useful,
11
- // but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
- // GNU Affero General Public License for more details.
14
- //
15
- // You should have received a copy of the GNU Affero General Public License
16
- // along with this program. If not, see <https://www.gnu.org/licenses/>.
17
-
18
- import { clsx, type ClassValue } from "clsx"
19
- import { twMerge } from "tailwind-merge"
20
-
21
- export function cn(...inputs: ClassValue[]) {
22
- return twMerge(clsx(inputs))
23
- }
1
+ export { cn } from "cn"
@@ -1,5 +1,32 @@
1
1
  /* eslint-disable */
2
2
  /** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
3
+ export * from './admin_ai_memory_action_clearuser1.js'
4
+ export * from './admin_ai_memory_action_query.js'
5
+ export * from './admin_ai_memory_clear_cancel.js'
6
+ export * from './admin_ai_memory_clear_confirm_action.js'
7
+ export * from './admin_ai_memory_clear_confirm_description.js'
8
+ export * from './admin_ai_memory_clear_confirm_title.js'
9
+ export * from './admin_ai_memory_columns_actions.js'
10
+ export * from './admin_ai_memory_columns_content.js'
11
+ export * from './admin_ai_memory_columns_createdat1.js'
12
+ export * from './admin_ai_memory_columns_threadid1.js'
13
+ export * from './admin_ai_memory_delete_cancel.js'
14
+ export * from './admin_ai_memory_delete_confirm_action.js'
15
+ export * from './admin_ai_memory_delete_confirm_description.js'
16
+ export * from './admin_ai_memory_delete_confirm_title.js'
17
+ export * from './admin_ai_memory_empty.js'
18
+ export * from './admin_ai_memory_emptyhint1.js'
19
+ export * from './admin_ai_memory_error_nouserid2.js'
20
+ export * from './admin_ai_memory_error_query.js'
21
+ export * from './admin_ai_memory_error_title.js'
22
+ export * from './admin_ai_memory_form_user.js'
23
+ export * from './admin_ai_memory_page_description.js'
24
+ export * from './admin_ai_memory_page_title.js'
25
+ export * from './admin_ai_memory_placeholder_user.js'
26
+ export * from './admin_ai_memory_stat_count.js'
27
+ export * from './admin_ai_memory_stat_lastwrite1.js'
28
+ export * from './admin_ai_memory_toast_cleared.js'
29
+ export * from './admin_ai_memory_toast_deleted.js'
3
30
  export * from './admin_ai_action_addprovider1.js'
4
31
  export * from './admin_ai_action_editprovider1.js'
5
32
  export * from './admin_ai_action_managemodels1.js'
@@ -61,6 +88,67 @@ export * from './admin_ai_page_create.js'
61
88
  export * from './admin_ai_page_description.js'
62
89
  export * from './admin_ai_page_edit.js'
63
90
  export * from './admin_ai_page_title.js'
91
+ export * from './admin_ai_prompts_active.js'
92
+ export * from './admin_ai_prompts_back.js'
93
+ export * from './admin_ai_prompts_badge_protected.js'
94
+ export * from './admin_ai_prompts_cache_hint.js'
95
+ export * from './admin_ai_prompts_columns_active.js'
96
+ export * from './admin_ai_prompts_columns_key.js'
97
+ export * from './admin_ai_prompts_columns_name.js'
98
+ export * from './admin_ai_prompts_columns_protected.js'
99
+ export * from './admin_ai_prompts_columns_updatedat1.js'
100
+ export * from './admin_ai_prompts_columns_version.js'
101
+ export * from './admin_ai_prompts_description.js'
102
+ export * from './admin_ai_prompts_description_placeholder.js'
103
+ export * from './admin_ai_prompts_edit.js'
104
+ export * from './admin_ai_prompts_name.js'
105
+ export * from './admin_ai_prompts_name_placeholder.js'
106
+ export * from './admin_ai_prompts_note_placeholder.js'
107
+ export * from './admin_ai_prompts_page_description.js'
108
+ export * from './admin_ai_prompts_page_title.js'
109
+ export * from './admin_ai_prompts_preview_empty.js'
110
+ export * from './admin_ai_prompts_preview_generating.js'
111
+ export * from './admin_ai_prompts_preview_hint.js'
112
+ export * from './admin_ai_prompts_preview_nocontent1.js'
113
+ export * from './admin_ai_prompts_preview_placeholder.js'
114
+ export * from './admin_ai_prompts_preview_section.js'
115
+ export * from './admin_ai_prompts_preview_title.js'
116
+ export * from './admin_ai_prompts_protected_hint.js'
117
+ export * from './admin_ai_prompts_rollback.js'
118
+ export * from './admin_ai_prompts_rollback_confirm_action.js'
119
+ export * from './admin_ai_prompts_rollback_confirm_description.js'
120
+ export * from './admin_ai_prompts_rollback_confirm_title.js'
121
+ export * from './admin_ai_prompts_save.js'
122
+ export * from './admin_ai_prompts_section_add.js'
123
+ export * from './admin_ai_prompts_section_id.js'
124
+ export * from './admin_ai_prompts_section_movedown1.js'
125
+ export * from './admin_ai_prompts_section_moveup1.js'
126
+ export * from './admin_ai_prompts_section_order.js'
127
+ export * from './admin_ai_prompts_section_remove.js'
128
+ export * from './admin_ai_prompts_section_template_placeholder.js'
129
+ export * from './admin_ai_prompts_sections_empty.js'
130
+ export * from './admin_ai_prompts_sections_hint.js'
131
+ export * from './admin_ai_prompts_sections_title.js'
132
+ export * from './admin_ai_prompts_toast_activated.js'
133
+ export * from './admin_ai_prompts_toast_failed.js'
134
+ export * from './admin_ai_prompts_toast_protected_locked.js'
135
+ export * from './admin_ai_prompts_toast_rolled_back.js'
136
+ export * from './admin_ai_prompts_toast_save_failed.js'
137
+ export * from './admin_ai_prompts_toast_saved.js'
138
+ export * from './admin_ai_prompts_variable_add.js'
139
+ export * from './admin_ai_prompts_variable_declarehint1.js'
140
+ export * from './admin_ai_prompts_variable_description_placeholder.js'
141
+ export * from './admin_ai_prompts_variable_name_placeholder.js'
142
+ export * from './admin_ai_prompts_variable_remove.js'
143
+ export * from './admin_ai_prompts_variable_undeclared.js'
144
+ export * from './admin_ai_prompts_variables_empty.js'
145
+ export * from './admin_ai_prompts_variables_title.js'
146
+ export * from './admin_ai_prompts_versions_current.js'
147
+ export * from './admin_ai_prompts_versions_empty.js'
148
+ export * from './admin_ai_prompts_versions_hint.js'
149
+ export * from './admin_ai_prompts_versions_nonote1.js'
150
+ export * from './admin_ai_prompts_versions_title.js'
151
+ export * from './admin_ai_prompts_versions_unknowncreator1.js'
64
152
  export * from './admin_ai_provider_apikey1.js'
65
153
  export * from './admin_ai_provider_baseurl1.js'
66
154
  export * from './admin_ai_provider_brandcolor1.js'
@@ -101,8 +189,12 @@ export * from './admin_ai_table_edit.js'
101
189
  export * from './admin_ai_table_enabledtoggle1.js'
102
190
  export * from './admin_ai_table_pagedescription1.js'
103
191
  export * from './admin_ai_table_pagetitle1.js'
192
+ export * from './admin_ai_table_seedfromseed2.js'
104
193
  export * from './admin_ai_table_toast_deletefailed1.js'
105
194
  export * from './admin_ai_table_toast_deleted.js'
195
+ export * from './admin_ai_table_toast_seedcreated1.js'
196
+ export * from './admin_ai_table_toast_seedfailed1.js'
197
+ export * from './admin_ai_table_toast_seednonew2.js'
106
198
  export * from './admin_ai_table_toast_updated.js'
107
199
  export * from './admin_billing_action_cancel.js'
108
200
  export * from './admin_billing_action_downgrade.js'
@@ -659,6 +751,8 @@ export * from './common_monitoring_aiusage_cost1.js'
659
751
  export * from './common_monitoring_aiusage_count1.js'
660
752
  export * from './common_monitoring_aiusage_dailytrend2.js'
661
753
  export * from './common_monitoring_aiusage_description1.js'
754
+ export * from './common_monitoring_aiusage_sandbox1.js'
755
+ export * from './common_monitoring_aiusage_sandboxvalue2.js'
662
756
  export * from './common_monitoring_aiusage_title1.js'
663
757
  export * from './common_monitoring_aiusage_top10users2.js'
664
758
  export * from './common_monitoring_aiusage_top10workspaces2.js'
@@ -806,6 +900,7 @@ export * from './common_monitoring_sentry_verify_note.js'
806
900
  export * from './common_monitoring_sentry_verify_success.js'
807
901
  export * from './common_monitoring_sentry_verify_timeout.js'
808
902
  export * from './common_monitoring_sentry_verify_title.js'
903
+ export * from './common_nav_aiprompts1.js'
809
904
  export * from './common_nav_aiproviders1.js'
810
905
  export * from './common_nav_apps.js'
811
906
  export * from './common_nav_billing_invoices.js'
@@ -0,0 +1,30 @@
1
+ /* eslint-disable */
2
+ import { getLocale, experimentalStaticLocale } from '../runtime.js';
3
+
4
+ /** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
5
+
6
+ /** @typedef {{}} Admin_Ai_Memory_Action_Clearuser1Inputs */
7
+
8
+ const zh_admin_ai_memory_action_clearuser1 = /** @type {(inputs: Admin_Ai_Memory_Action_Clearuser1Inputs) => LocalizedString} */ () => {
9
+ return /** @type {LocalizedString} */ (`清空该用户记忆`)
10
+ };
11
+
12
+ const en_admin_ai_memory_action_clearuser1 = /** @type {(inputs: Admin_Ai_Memory_Action_Clearuser1Inputs) => LocalizedString} */ () => {
13
+ return /** @type {LocalizedString} */ (`Clear User Memory`)
14
+ };
15
+
16
+ /**
17
+ * | output |
18
+ * | --- |
19
+ * | "Clear User Memory" |
20
+ *
21
+ * @param {Admin_Ai_Memory_Action_Clearuser1Inputs} inputs
22
+ * @param {{ locale?: "zh" | "en" }} options
23
+ * @returns {LocalizedString}
24
+ */
25
+ const admin_ai_memory_action_clearuser1 = /** @type {((inputs?: Admin_Ai_Memory_Action_Clearuser1Inputs, options?: { locale?: "zh" | "en" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Admin_Ai_Memory_Action_Clearuser1Inputs, { locale?: "zh" | "en" }, {}>} */ ((inputs = {}, options = {}) => {
26
+ const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
27
+ if (locale === "en") return en_admin_ai_memory_action_clearuser1(inputs)
28
+ return zh_admin_ai_memory_action_clearuser1(inputs)
29
+ });
30
+ export { admin_ai_memory_action_clearuser1 as "admin-ai-memory_action_clearUser" }