hermium 0.3.3 → 0.3.5

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 (58) hide show
  1. package/dist/public/assets/js/ChatInputBlock-DtDwhu-o.js +1 -0
  2. package/dist/public/assets/js/MarkdownMessage-HqtkizAq.js +1 -0
  3. package/dist/public/assets/js/chat._sessionId-CQhAWRie.js +1 -0
  4. package/dist/public/assets/js/chat.index-Rey-yJNu.js +1 -0
  5. package/dist/public/assets/js/index-DaPM5Pp6.js +1 -0
  6. package/dist/public/assets/js/index-lcPGeFiu.js +60 -0
  7. package/dist/public/assets/js/memory-hKlWOmsk.js +3 -0
  8. package/dist/public/assets/js/settings-CgEeK7SY.js +1 -0
  9. package/dist/public/assets/js/skills-Os0vuATW.js +1 -0
  10. package/dist/public/assets/js/usage-Bkxk-UWX.js +1 -0
  11. package/dist/server/_ssr/{ChatInputBlock-BTSt3ldw.mjs → ChatInputBlock-Dax0BiWA.mjs} +1 -1
  12. package/dist/server/_ssr/{MarkdownMessage-DzImLKnw.mjs → MarkdownMessage-Cwh9eBP2.mjs} +1 -1
  13. package/dist/server/_ssr/{chat._sessionId-CUSsvbBX.mjs → chat._sessionId-CI4x2myS.mjs} +4 -4
  14. package/dist/server/_ssr/{chat.index-YqIyLr2b.mjs → chat.index-CkW4HXDE.mjs} +1 -1
  15. package/dist/server/_ssr/{index-Be17Jodh.mjs → index-CZIkem83.mjs} +2 -2
  16. package/dist/server/_ssr/{index--T6rScER.mjs → index-Cnfau46H.mjs} +2 -2
  17. package/dist/server/_ssr/{memory-DLVdk8UN.mjs → memory-DNXYkaz6.mjs} +3 -3
  18. package/dist/server/_ssr/{router-C0m-TE_e.mjs → router-BHawbDFJ.mjs} +39 -20
  19. package/dist/server/_ssr/{skills-DAVualEA.mjs → skills-De5OAjih.mjs} +5 -34
  20. package/dist/server/_ssr/{usage-CCOujow3.mjs → usage-CDQOB3tW.mjs} +1 -1
  21. package/dist/server/_tanstack-start-manifest_v-CZgpkRLi.mjs +4 -0
  22. package/dist/server/index.mjs +103 -117
  23. package/dist/server/public/assets/js/ChatInputBlock-DtDwhu-o.js +1 -0
  24. package/dist/server/public/assets/js/MarkdownMessage-HqtkizAq.js +1 -0
  25. package/dist/server/public/assets/js/chat._sessionId-CQhAWRie.js +1 -0
  26. package/dist/server/public/assets/js/chat.index-Rey-yJNu.js +1 -0
  27. package/dist/server/public/assets/js/index-DaPM5Pp6.js +1 -0
  28. package/dist/server/public/assets/js/index-lcPGeFiu.js +60 -0
  29. package/dist/server/public/assets/js/memory-hKlWOmsk.js +3 -0
  30. package/dist/server/public/assets/js/settings-CgEeK7SY.js +1 -0
  31. package/dist/server/public/assets/js/skills-Os0vuATW.js +1 -0
  32. package/dist/server/public/assets/js/usage-Bkxk-UWX.js +1 -0
  33. package/package.json +1 -1
  34. package/dist/public/assets/js/ChatInputBlock-D4CYR2D_.js +0 -1
  35. package/dist/public/assets/js/MarkdownMessage-Bu4diQAT.js +0 -1
  36. package/dist/public/assets/js/base-ui-DKZpRETY.js +0 -1
  37. package/dist/public/assets/js/chat._sessionId-IyYhnI65.js +0 -1
  38. package/dist/public/assets/js/chat.index-CdO1bi1g.js +0 -1
  39. package/dist/public/assets/js/index-CGq67I5U.js +0 -60
  40. package/dist/public/assets/js/index-CYDXRqze.js +0 -1
  41. package/dist/public/assets/js/memory-BC-tVM26.js +0 -3
  42. package/dist/public/assets/js/router-Cdi9aGOg.js +0 -1
  43. package/dist/public/assets/js/settings-CthZPCPZ.js +0 -1
  44. package/dist/public/assets/js/skills-COr12qk7.js +0 -1
  45. package/dist/public/assets/js/usage-oWmLZ5Lt.js +0 -1
  46. package/dist/server/_tanstack-start-manifest_v-wG3l04YA.mjs +0 -4
  47. package/dist/server/public/assets/js/ChatInputBlock-D4CYR2D_.js +0 -1
  48. package/dist/server/public/assets/js/MarkdownMessage-Bu4diQAT.js +0 -1
  49. package/dist/server/public/assets/js/base-ui-DKZpRETY.js +0 -1
  50. package/dist/server/public/assets/js/chat._sessionId-IyYhnI65.js +0 -1
  51. package/dist/server/public/assets/js/chat.index-CdO1bi1g.js +0 -1
  52. package/dist/server/public/assets/js/index-CGq67I5U.js +0 -60
  53. package/dist/server/public/assets/js/index-CYDXRqze.js +0 -1
  54. package/dist/server/public/assets/js/memory-BC-tVM26.js +0 -3
  55. package/dist/server/public/assets/js/router-Cdi9aGOg.js +0 -1
  56. package/dist/server/public/assets/js/settings-CthZPCPZ.js +0 -1
  57. package/dist/server/public/assets/js/skills-COr12qk7.js +0 -1
  58. package/dist/server/public/assets/js/usage-oWmLZ5Lt.js +0 -1
@@ -26,7 +26,7 @@ function lazyService(loader) {
26
26
  };
27
27
  }
28
28
  const services = {
29
- ["ssr"]: lazyService(() => import("./_ssr/index-Be17Jodh.mjs"))
29
+ ["ssr"]: lazyService(() => import("./_ssr/index-CZIkem83.mjs"))
30
30
  };
31
31
  globalThis.__nitro_vite_envs__ = services;
32
32
  const errorHandler$1 = (error, event) => {
@@ -117,171 +117,157 @@ function isPathInScope(pathname, base) {
117
117
  return !base || canonical === base || canonical.startsWith(base + "/");
118
118
  }
119
119
  const assets = {
120
- "/robots.txt": {
121
- "type": "text/plain; charset=utf-8",
122
- "etag": '"43-BEzmj4PuhUNHX+oW9uOnPSihxtU"',
123
- "mtime": "2026-05-17T07:43:16.450Z",
124
- "size": 67,
125
- "path": "../public/robots.txt"
120
+ "/favicon.ico": {
121
+ "type": "image/vnd.microsoft.icon",
122
+ "etag": '"f1e-ESBTjHetHyiokkO0tT/irBbMO8Y"',
123
+ "mtime": "2026-05-17T08:18:30.558Z",
124
+ "size": 3870,
125
+ "path": "../public/favicon.ico"
126
126
  },
127
127
  "/manifest.json": {
128
128
  "type": "application/json",
129
129
  "etag": '"1f2-Oqn/x1R1hBTtEjA8nFhpBeFJJNg"',
130
- "mtime": "2026-05-17T07:43:16.450Z",
130
+ "mtime": "2026-05-17T08:18:30.558Z",
131
131
  "size": 498,
132
132
  "path": "../public/manifest.json"
133
133
  },
134
+ "/robots.txt": {
135
+ "type": "text/plain; charset=utf-8",
136
+ "etag": '"43-BEzmj4PuhUNHX+oW9uOnPSihxtU"',
137
+ "mtime": "2026-05-17T08:18:30.558Z",
138
+ "size": 67,
139
+ "path": "../public/robots.txt"
140
+ },
134
141
  "/assets/css/index-Dfs9RUU9.css": {
135
142
  "type": "text/css; charset=utf-8",
136
143
  "etag": '"429-auB1gSdvHWOpUkgakyObE/IliVA"',
137
- "mtime": "2026-05-17T07:43:14.153Z",
144
+ "mtime": "2026-05-17T08:18:30.028Z",
138
145
  "size": 1065,
139
146
  "path": "../public/assets/css/index-Dfs9RUU9.css"
140
147
  },
141
- "/assets/woff2/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2": {
142
- "type": "font/woff2",
143
- "etag": '"1cfc-yYSDXNlt/tTRaj6rJo8ZMqvY7pQ"',
144
- "mtime": "2026-05-17T07:43:14.153Z",
145
- "size": 7420,
146
- "path": "../public/assets/woff2/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2"
147
- },
148
- "/assets/woff2/geist-cyrillic-wght-normal-BEAKL7Jp.woff2": {
149
- "type": "font/woff2",
150
- "etag": '"3aec-5kpQSZEtAzzU5kdiuro3Zr2YR54"',
151
- "mtime": "2026-05-17T07:43:14.150Z",
152
- "size": 15084,
153
- "path": "../public/assets/woff2/geist-cyrillic-wght-normal-BEAKL7Jp.woff2"
154
- },
155
- "/assets/woff2/geist-latin-ext-wght-normal-DC-KSUi6.woff2": {
156
- "type": "font/woff2",
157
- "etag": '"4080-mZu3Z7sOWqglha+kefNbUA9Pp+Q"',
158
- "mtime": "2026-05-17T07:43:14.153Z",
159
- "size": 16512,
160
- "path": "../public/assets/woff2/geist-latin-ext-wght-normal-DC-KSUi6.woff2"
161
- },
162
148
  "/assets/css/styles-B8p6jk5Z.css": {
163
149
  "type": "text/css; charset=utf-8",
164
150
  "etag": '"1a414-AEgDOOmvAte00dxPjn+Fb3xg2cQ"',
165
- "mtime": "2026-05-17T07:43:14.151Z",
151
+ "mtime": "2026-05-17T08:18:30.028Z",
166
152
  "size": 107540,
167
153
  "path": "../public/assets/css/styles-B8p6jk5Z.css"
168
154
  },
169
- "/assets/woff2/geist-vietnamese-wght-normal-6IgcOCM7.woff2": {
170
- "type": "font/woff2",
171
- "etag": '"1f44-6MZ7/PEEOeDVF0eHI650KpwKQV8"',
172
- "mtime": "2026-05-17T07:43:14.153Z",
173
- "size": 8004,
174
- "path": "../public/assets/woff2/geist-vietnamese-wght-normal-6IgcOCM7.woff2"
175
- },
176
- "/assets/woff2/geist-latin-wght-normal-BgDaEnEv.woff2": {
177
- "type": "font/woff2",
178
- "etag": '"72d8-9J+D7/6th5UzRxIgoFX9awJv47A"',
179
- "mtime": "2026-05-17T07:43:14.153Z",
180
- "size": 29400,
181
- "path": "../public/assets/woff2/geist-latin-wght-normal-BgDaEnEv.woff2"
182
- },
183
- "/assets/js/ChatInputBlock-D4CYR2D_.js": {
184
- "type": "text/javascript; charset=utf-8",
185
- "etag": '"1364-FqE9f33IgJsAhrf7P27HlZyRsLY"',
186
- "mtime": "2026-05-17T07:43:14.153Z",
187
- "size": 4964,
188
- "path": "../public/assets/js/ChatInputBlock-D4CYR2D_.js"
189
- },
190
- "/assets/js/MarkdownMessage-Bu4diQAT.js": {
155
+ "/assets/js/ChatInputBlock-DtDwhu-o.js": {
191
156
  "type": "text/javascript; charset=utf-8",
192
- "etag": '"a21-8XU81Ttyh9KATGGVuJmH8rLr4CM"',
193
- "mtime": "2026-05-17T07:43:14.153Z",
194
- "size": 2593,
195
- "path": "../public/assets/js/MarkdownMessage-Bu4diQAT.js"
157
+ "etag": '"135c-RASPhkqUvwggEKjP3QrylvkfN/A"',
158
+ "mtime": "2026-05-17T08:18:30.028Z",
159
+ "size": 4956,
160
+ "path": "../public/assets/js/ChatInputBlock-DtDwhu-o.js"
196
161
  },
197
- "/assets/js/chat._sessionId-IyYhnI65.js": {
162
+ "/assets/js/MarkdownMessage-HqtkizAq.js": {
198
163
  "type": "text/javascript; charset=utf-8",
199
- "etag": '"276a-zya7fXsy6AJo+RKujq+ZBEwag+o"',
200
- "mtime": "2026-05-17T07:43:14.153Z",
201
- "size": 10090,
202
- "path": "../public/assets/js/chat._sessionId-IyYhnI65.js"
164
+ "etag": '"a1e-3DyzZy40zCTQF94M/PJu0X0Hsp8"',
165
+ "mtime": "2026-05-17T08:18:30.028Z",
166
+ "size": 2590,
167
+ "path": "../public/assets/js/MarkdownMessage-HqtkizAq.js"
203
168
  },
204
- "/assets/js/chat.index-CdO1bi1g.js": {
169
+ "/assets/js/chat._sessionId-CQhAWRie.js": {
205
170
  "type": "text/javascript; charset=utf-8",
206
- "etag": '"2bc-JOtCuJmZFviPoFwrT24DCXcHwQY"',
207
- "mtime": "2026-05-17T07:43:14.153Z",
208
- "size": 700,
209
- "path": "../public/assets/js/chat.index-CdO1bi1g.js"
171
+ "etag": '"272b-McHXUDBuhUfUn7M1SvHgkLN8L50"',
172
+ "mtime": "2026-05-17T08:18:30.028Z",
173
+ "size": 10027,
174
+ "path": "../public/assets/js/chat._sessionId-CQhAWRie.js"
210
175
  },
211
- "/assets/js/base-ui-DKZpRETY.js": {
176
+ "/assets/js/chat.index-Rey-yJNu.js": {
212
177
  "type": "text/javascript; charset=utf-8",
213
- "etag": '"23136-hvhmcqpJi+hXFszkcRaG5uSB360"',
214
- "mtime": "2026-05-17T07:43:14.153Z",
215
- "size": 143670,
216
- "path": "../public/assets/js/base-ui-DKZpRETY.js"
178
+ "etag": '"279-Iofhk2FD689icp8RcM3zzkZqY8w"',
179
+ "mtime": "2026-05-17T08:18:30.028Z",
180
+ "size": 633,
181
+ "path": "../public/assets/js/chat.index-Rey-yJNu.js"
217
182
  },
218
- "/assets/js/index-CYDXRqze.js": {
183
+ "/assets/js/index-DaPM5Pp6.js": {
219
184
  "type": "text/javascript; charset=utf-8",
220
- "etag": '"29c-5jlykBIu4k2dH58NXxfjPvwjR5U"',
221
- "mtime": "2026-05-17T07:43:14.153Z",
222
- "size": 668,
223
- "path": "../public/assets/js/index-CYDXRqze.js"
185
+ "etag": '"25b-IDAV/fIuX02J7i3SFpF/2uyhwnk"',
186
+ "mtime": "2026-05-17T08:18:30.028Z",
187
+ "size": 603,
188
+ "path": "../public/assets/js/index-DaPM5Pp6.js"
224
189
  },
225
- "/assets/js/memory-BC-tVM26.js": {
190
+ "/assets/js/memory-hKlWOmsk.js": {
226
191
  "type": "text/javascript; charset=utf-8",
227
- "etag": '"129f-XO5LtGKoOtbs1TL9mQL+p0jcpkg"',
228
- "mtime": "2026-05-17T07:43:14.153Z",
229
- "size": 4767,
230
- "path": "../public/assets/js/memory-BC-tVM26.js"
192
+ "etag": '"1260-P9RJ2fARNmET9irs4fPhbGpXRLM"',
193
+ "mtime": "2026-05-17T08:18:30.028Z",
194
+ "size": 4704,
195
+ "path": "../public/assets/js/memory-hKlWOmsk.js"
231
196
  },
232
- "/assets/js/router-Cdi9aGOg.js": {
197
+ "/assets/js/settings-CgEeK7SY.js": {
233
198
  "type": "text/javascript; charset=utf-8",
234
- "etag": '"5560-V72toq6u4rGXRMfd59VgiC/qr7s"',
235
- "mtime": "2026-05-17T07:43:14.153Z",
236
- "size": 21856,
237
- "path": "../public/assets/js/router-Cdi9aGOg.js"
199
+ "etag": '"130-WbBYVWT+6xaJdn8LeXySHPJfavQ"',
200
+ "mtime": "2026-05-17T08:18:30.028Z",
201
+ "size": 304,
202
+ "path": "../public/assets/js/settings-CgEeK7SY.js"
238
203
  },
239
- "/assets/js/settings-CthZPCPZ.js": {
204
+ "/assets/js/skills-Os0vuATW.js": {
240
205
  "type": "text/javascript; charset=utf-8",
241
- "etag": '"16c-nkhcKPeOwanukwmWEZrl1U1L8TQ"',
242
- "mtime": "2026-05-17T07:43:14.153Z",
243
- "size": 364,
244
- "path": "../public/assets/js/settings-CthZPCPZ.js"
245
- },
246
- "/assets/js/skills-COr12qk7.js": {
247
- "type": "text/javascript; charset=utf-8",
248
- "etag": '"2bd9-oxq5eb4s7J3fGlrepereGxcr8Pw"',
249
- "mtime": "2026-05-17T07:43:14.153Z",
250
- "size": 11225,
251
- "path": "../public/assets/js/skills-COr12qk7.js"
206
+ "etag": '"29cb-ligPZ9hadWJFwQWS+zV2h8J27tc"',
207
+ "mtime": "2026-05-17T08:18:30.028Z",
208
+ "size": 10699,
209
+ "path": "../public/assets/js/skills-Os0vuATW.js"
252
210
  },
253
211
  "/assets/js/theme-CPkdkpaj.js": {
254
212
  "type": "text/javascript; charset=utf-8",
255
213
  "etag": '"245-JWXBP1zFNJpiVT0wBqxD0nTaUio"',
256
- "mtime": "2026-05-17T07:43:14.153Z",
214
+ "mtime": "2026-05-17T08:18:30.028Z",
257
215
  "size": 581,
258
216
  "path": "../public/assets/js/theme-CPkdkpaj.js"
259
217
  },
260
- "/assets/js/usage-oWmLZ5Lt.js": {
218
+ "/assets/js/usage-Bkxk-UWX.js": {
261
219
  "type": "text/javascript; charset=utf-8",
262
- "etag": '"2541-nrqiwsbK3hgSQKh9COEMgVFprDg"',
263
- "mtime": "2026-05-17T07:43:14.153Z",
264
- "size": 9537,
265
- "path": "../public/assets/js/usage-oWmLZ5Lt.js"
220
+ "etag": '"2503-IB3o2fl6NKesErj2M0l4hapSqeY"',
221
+ "mtime": "2026-05-17T08:18:30.028Z",
222
+ "size": 9475,
223
+ "path": "../public/assets/js/usage-Bkxk-UWX.js"
266
224
  },
267
- "/favicon.ico": {
268
- "type": "image/vnd.microsoft.icon",
269
- "etag": '"f1e-ESBTjHetHyiokkO0tT/irBbMO8Y"',
270
- "mtime": "2026-05-17T07:43:16.450Z",
271
- "size": 3870,
272
- "path": "../public/favicon.ico"
225
+ "/assets/woff2/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2": {
226
+ "type": "font/woff2",
227
+ "etag": '"1cfc-yYSDXNlt/tTRaj6rJo8ZMqvY7pQ"',
228
+ "mtime": "2026-05-17T08:18:30.028Z",
229
+ "size": 7420,
230
+ "path": "../public/assets/woff2/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2"
231
+ },
232
+ "/assets/woff2/geist-cyrillic-wght-normal-BEAKL7Jp.woff2": {
233
+ "type": "font/woff2",
234
+ "etag": '"3aec-5kpQSZEtAzzU5kdiuro3Zr2YR54"',
235
+ "mtime": "2026-05-17T08:18:30.028Z",
236
+ "size": 15084,
237
+ "path": "../public/assets/woff2/geist-cyrillic-wght-normal-BEAKL7Jp.woff2"
238
+ },
239
+ "/assets/woff2/geist-latin-ext-wght-normal-DC-KSUi6.woff2": {
240
+ "type": "font/woff2",
241
+ "etag": '"4080-mZu3Z7sOWqglha+kefNbUA9Pp+Q"',
242
+ "mtime": "2026-05-17T08:18:30.028Z",
243
+ "size": 16512,
244
+ "path": "../public/assets/woff2/geist-latin-ext-wght-normal-DC-KSUi6.woff2"
245
+ },
246
+ "/assets/woff2/geist-latin-wght-normal-BgDaEnEv.woff2": {
247
+ "type": "font/woff2",
248
+ "etag": '"72d8-9J+D7/6th5UzRxIgoFX9awJv47A"',
249
+ "mtime": "2026-05-17T08:18:30.028Z",
250
+ "size": 29400,
251
+ "path": "../public/assets/woff2/geist-latin-wght-normal-BgDaEnEv.woff2"
252
+ },
253
+ "/assets/woff2/geist-vietnamese-wght-normal-6IgcOCM7.woff2": {
254
+ "type": "font/woff2",
255
+ "etag": '"1f44-6MZ7/PEEOeDVF0eHI650KpwKQV8"',
256
+ "mtime": "2026-05-17T08:18:30.028Z",
257
+ "size": 8004,
258
+ "path": "../public/assets/woff2/geist-vietnamese-wght-normal-6IgcOCM7.woff2"
273
259
  },
274
- "/assets/js/index-CGq67I5U.js": {
260
+ "/assets/js/index-lcPGeFiu.js": {
275
261
  "type": "text/javascript; charset=utf-8",
276
- "etag": '"b48f5-JUWg8bwUt85x7vPgnOtDF2gjGGk"',
277
- "mtime": "2026-05-17T07:43:14.153Z",
278
- "size": 739573,
279
- "path": "../public/assets/js/index-CGq67I5U.js"
262
+ "etag": '"dcd74-pFmE6YyPXAvCoiT7p5tQeG7yt4g"',
263
+ "mtime": "2026-05-17T08:18:30.029Z",
264
+ "size": 904564,
265
+ "path": "../public/assets/js/index-lcPGeFiu.js"
280
266
  },
281
267
  "/logo.png": {
282
268
  "type": "image/png",
283
269
  "etag": '"142435-x+cWIod8BP5RPjbiISayulI5r7I"',
284
- "mtime": "2026-05-17T07:43:16.450Z",
270
+ "mtime": "2026-05-17T08:18:30.558Z",
285
271
  "size": 1319989,
286
272
  "path": "../public/logo.png"
287
273
  }
@@ -0,0 +1 @@
1
+ import{C as t,x,D as n,J as o,g as R,s as B,B as g,i as L,k as U,m as F,a as K}from"./index-lcPGeFiu.js";function M({className:d,...i}){return t.jsx("textarea",{"data-slot":"textarea",className:x("flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-transparent px-2.5 py-2 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",d),...i})}function E({onCreateSession:d}){const[i,m]=n.useState(""),[a,u]=n.useState([]),[j,p]=n.useState(!1),l=n.useRef(null),f=n.useRef(null),h=o(e=>e.sendMessage),w=o(e=>e.abortStream),N=o(e=>e.isStreaming),y=o(e=>e.activeSessionId),v=n.useCallback(e=>{if(!e)return;const s=[];for(const r of Array.from(e))s.push({id:Math.random().toString(36).slice(2),name:r.name,type:r.type||"application/octet-stream",size:r.size,url:URL.createObjectURL(r),file:r});u(r=>[...r,...s])},[]),k=n.useCallback(e=>{u(s=>{const r=s.find(c=>c.id===e);return r&&URL.revokeObjectURL(r.url),s.filter(c=>c.id!==e)})},[]),b=async()=>{const e=i.trim();if(!e&&a.length===0)return;if(d){const r=await o.getState().createNewSession();if(r){d(r),m(""),l.current&&(l.current.value="");const c=a.length>0?a:void 0;u([]),await h(e,void 0,c)}return}if(!y&&!await o.getState().createNewSession())return;m(""),l.current&&(l.current.value="");const s=a.length>0?a:void 0;u([]),await h(e,void 0,s)},S=e=>{e.key==="Enter"&&!e.shiftKey&&(e.preventDefault(),b())},D=e=>{e.preventDefault(),p(!0)},I=e=>{e.preventDefault(),p(!1)},z=e=>{e.preventDefault(),p(!1),v(e.dataTransfer.files)},C=e=>e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`,A=e=>e.startsWith("image/");return t.jsx("div",{className:"flex flex-col gap-2 w-full",children:t.jsxs("div",{className:x("flex min-h-[120px] flex-col rounded-2xl cursor-text bg-card border border-border shadow-lg transition-colors",j&&"border-primary ring-2 ring-primary/20"),onDragOver:D,onDragLeave:I,onDrop:z,children:[a.length>0&&t.jsx("div",{className:"flex flex-wrap gap-2 p-3 pb-0",children:a.map(e=>t.jsxs("div",{className:"group relative flex items-center gap-2 rounded-lg border bg-muted/50 px-2 py-1.5 pr-7 text-xs",children:[A(e.type)?t.jsx("img",{src:e.url,alt:e.name,className:"h-6 w-6 rounded object-cover"}):t.jsx(R,{className:"size-4 text-muted-foreground shrink-0"}),t.jsx("span",{className:"truncate max-w-[120px]",children:e.name}),t.jsx("span",{className:"text-muted-foreground/60",children:C(e.size)}),t.jsx("button",{onClick:()=>k(e.id),className:"absolute right-1 top-1/2 -translate-y-1/2 flex items-center justify-center rounded p-0.5 text-muted-foreground hover:text-foreground opacity-0 group-hover:opacity-100 transition-opacity",children:t.jsx(B,{className:"size-3"})})]},e.id))}),t.jsx("div",{className:"flex-1 relative overflow-y-auto max-h-[258px]",children:t.jsx(M,{ref:l,value:i,onChange:e=>m(e.target.value),onKeyDown:S,placeholder:"Ask anything",className:"w-full border-0 p-3 transition-[padding] duration-200 ease-in-out min-h-[48.4px] outline-none text-[16px] text-foreground resize-none shadow-none focus-visible:ring-0 focus-visible:ring-offset-0 bg-transparent! whitespace-pre-wrap break-words"})}),t.jsxs("div",{className:"flex min-h-[40px] items-center gap-2 p-2 pb-1",children:[t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx("input",{ref:f,type:"file",multiple:!0,className:"hidden",onChange:e=>v(e.target.files)}),t.jsx(g,{variant:"ghost",size:"icon-sm",className:"text-muted-foreground hover:text-foreground transition-colors duration-100 ease-out",title:"Attach files","aria-label":"Attach files",onClick:()=>f.current?.click(),children:t.jsx(L,{className:"h-5 w-5"})}),t.jsx(g,{variant:"ghost",size:"icon-sm",className:"text-muted-foreground hover:text-foreground transition-colors duration-100 ease-out",title:"Attach images","aria-label":"Attach images",onClick:()=>f.current?.click(),children:t.jsx(U,{className:"h-5 w-5"})})]}),t.jsx("div",{className:"ml-auto flex items-center gap-3",children:N?t.jsx(g,{variant:"ghost",size:"icon-sm",onClick:w,className:"rounded-full bg-destructive hover:bg-destructive/90 text-destructive-foreground transition-colors cursor-pointer",title:"Stop generating","aria-label":"Stop generating",children:t.jsx(F,{className:"h-4 w-4"})}):t.jsx(g,{variant:"ghost",size:"icon-sm",onClick:b,className:x("rounded-full transition-colors duration-100 ease-out cursor-pointer bg-primary",(i||a.length>0)&&"bg-primary hover:bg-primary/90!"),disabled:!i&&a.length===0,"aria-label":"Send message",children:t.jsx(K,{className:"h-4 w-4 text-primary-foreground"})})})]})]})})}export{E as C};
@@ -0,0 +1 @@
1
+ import{C as s,M as m,E as d,F as n}from"./index-lcPGeFiu.js";function c({content:a,isStreaming:l}){return s.jsxs("div",{className:"prose prose-sm dark:prose-invert max-w-none leading-relaxed",children:[s.jsx(m,{remarkPlugins:[n],rehypePlugins:[d],components:{p:({children:e})=>s.jsx("p",{className:"mb-3 last:mb-0",children:e}),h1:({children:e})=>s.jsx("h1",{className:"text-xl font-semibold mt-4 mb-2",children:e}),h2:({children:e})=>s.jsx("h2",{className:"text-lg font-semibold mt-3 mb-2",children:e}),h3:({children:e})=>s.jsx("h3",{className:"text-base font-semibold mt-2 mb-1",children:e}),ul:({children:e})=>s.jsx("ul",{className:"list-disc pl-5 mb-3 space-y-1",children:e}),ol:({children:e})=>s.jsx("ol",{className:"list-decimal pl-5 mb-3 space-y-1",children:e}),li:({children:e})=>s.jsx("li",{className:"marker:text-muted-foreground",children:e}),code:({className:e,children:r,...t})=>{if(!(e?.includes("hljs")||e?.includes("language-")))return s.jsx("code",{className:"rounded bg-muted px-1.5 py-0.5 text-sm font-mono text-foreground",...t,children:r});const o=e?.match(/language-(\w+)/)?.[1];return s.jsxs("div",{className:"relative my-3 rounded-lg border bg-muted/50 overflow-hidden",children:[o&&s.jsx("div",{className:"flex items-center justify-between px-3 py-1.5 bg-muted border-b text-[10px] text-muted-foreground font-mono uppercase",children:s.jsx("span",{children:o})}),s.jsx("pre",{className:"p-3 overflow-x-auto text-sm leading-relaxed m-0",children:s.jsx("code",{className:e,...t,children:r})})]})},blockquote:({children:e})=>s.jsx("blockquote",{className:"border-l-2 border-muted-foreground/30 pl-4 italic text-muted-foreground my-3",children:e}),a:({href:e,children:r})=>s.jsx("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline underline-offset-2 hover:text-primary/80 transition-colors",children:r}),table:({children:e})=>s.jsx("div",{className:"overflow-x-auto my-3 rounded-lg border",children:s.jsx("table",{className:"w-full text-sm border-collapse",children:e})}),thead:({children:e})=>s.jsx("thead",{className:"bg-muted border-b",children:e}),th:({children:e})=>s.jsx("th",{className:"px-3 py-2 text-left font-medium text-foreground",children:e}),td:({children:e})=>s.jsx("td",{className:"px-3 py-2 border-b border-muted",children:e}),hr:()=>s.jsx("hr",{className:"my-4 border-border"}),strong:({children:e})=>s.jsx("strong",{className:"font-semibold text-foreground",children:e})},children:a}),l&&s.jsx("span",{className:"inline-block w-0.5 h-4 bg-foreground/70 ml-0.5 align-text-bottom animate-pulse"})]})}export{c as M};
@@ -0,0 +1 @@
1
+ import{J as m,C as e,g as w,D as d,e as v,x as p,h as f,c as y,f as C,L as k,S,u as I}from"./index-lcPGeFiu.js";import{M as g}from"./MarkdownMessage-HqtkizAq.js";import{C as T}from"./ChatInputBlock-DtDwhu-o.js";function M({text:t}){const[s,r]=d.useState(!1),a=async()=>{await navigator.clipboard.writeText(t),r(!0),setTimeout(()=>r(!1),2e3)};return e.jsxs("button",{onClick:a,className:"inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[10px] text-muted-foreground/50 hover:text-foreground hover:bg-muted transition-colors","aria-label":"Copy message",children:[s?e.jsx(y,{className:"size-3"}):e.jsx(C,{className:"size-3"}),s?"Copied":"Copy"]})}function E(t){const s=Math.floor(t/1e3);if(s<60)return`${s}s`;const r=Math.floor(s/60),a=s%60;return a===0?`${r}m`:`${r}m ${a}s`}function j({reasoning:t,isStreaming:s,startedAt:r,endedAt:a}){const[o,l]=d.useState(s??!1),[n,u]=d.useState(Date.now()),i=d.useRef(null);if(d.useEffect(()=>{l(s??!1)},[s]),d.useEffect(()=>{if(s&&r&&!a)return i.current=setInterval(()=>u(Date.now()),1e3),()=>{i.current&&clearInterval(i.current)};i.current&&(clearInterval(i.current),i.current=null)},[s,r,a]),!t.trim())return null;const x=r?Math.max(0,(a??(s?n:r))-r):null,h=[...t].length,c=s&&r&&!a;return e.jsxs("div",{className:"mb-1",children:[e.jsxs("button",{onClick:()=>l(!o),className:p("inline-flex items-center gap-1.5 text-[11px] transition-colors",c?"text-amber-500 dark:text-amber-400 font-medium":"text-muted-foreground/70 hover:text-foreground"),children:[e.jsx(v,{className:p("size-3 shrink-0 transition-transform",o&&"rotate-90")}),c?e.jsxs("span",{className:"inline-flex items-center gap-1",children:[e.jsx(f,{className:"size-2.5 animate-spin"}),"thinking…"]}):e.jsx("span",{children:"thought"}),x!==null&&x>0&&e.jsxs("span",{className:"text-muted-foreground/60 tabular-nums",children:["· ",E(x)]}),e.jsxs("span",{className:"text-muted-foreground/60",children:["· ",h.toLocaleString()," chars"]})]}),o&&e.jsx("div",{className:"mt-1 rounded-md bg-amber-50 dark:bg-amber-950/20 px-2.5 py-1.5 text-[11px] text-muted-foreground leading-relaxed whitespace-pre-wrap font-mono border border-amber-200 dark:border-amber-800/30",children:t})]})}function N(t){if(!t)return null;try{const s=JSON.parse(t);return{text:JSON.stringify(s,null,2),isJson:!0}}catch{return{text:t,isJson:!1}}}function b({tools:t}){const[s,r]=d.useState(!1);if(!t?.length)return null;const a=t.filter(n=>n.status==="running").length,o=t.filter(n=>n.status==="done").length,l=t.filter(n=>n.status==="error").length;return e.jsxs("div",{className:"mb-1",children:[e.jsxs("button",{onClick:()=>r(!s),className:"inline-flex items-center gap-1 text-[11px] text-muted-foreground/70 hover:text-foreground transition-colors",children:[e.jsx(v,{className:p("size-3 shrink-0 transition-transform",s&&"rotate-90")}),e.jsxs("span",{children:["used ",t.length," tool",t.length>1?"s":""]}),a>0&&e.jsxs("span",{className:"inline-flex items-center gap-0.5 text-amber-500",children:[e.jsx(f,{className:"size-2.5 animate-spin"}),a]}),o>0&&e.jsxs("span",{className:"text-emerald-500",children:[o," done"]}),l>0&&e.jsxs("span",{className:"text-red-500",children:[l," error"]}),t.length>0&&a===0&&e.jsxs("span",{className:"text-muted-foreground/50 truncate max-w-[200px]",children:["— ",t.map(n=>n.name).join(", ")]})]}),s&&e.jsx("div",{className:"mt-1 flex flex-col gap-1.5",children:t.map((n,u)=>{const i=N(n.preview),x=N(n.output);return e.jsxs("div",{className:"rounded-md bg-muted/40 border border-border/50 overflow-hidden",children:[e.jsxs("div",{className:"flex items-center gap-2 px-2.5 py-1.5",children:[e.jsx("span",{className:"text-[11px] font-semibold text-foreground/80 font-mono",children:n.name}),n.status==="running"&&e.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] text-amber-500",children:[e.jsx(f,{className:"size-2.5 animate-spin"}),"running"]}),n.status==="done"&&e.jsx("span",{className:"text-[10px] text-emerald-500",children:"✓ done"}),n.status==="error"&&e.jsx("span",{className:"text-[10px] text-red-500",children:"✗ error"})]}),i&&e.jsxs("div",{className:"border-t border-border/30",children:[e.jsx("div",{className:"px-2.5 py-0.5 text-[9px] uppercase tracking-wider text-muted-foreground/60",children:"Arguments"}),e.jsx("div",{className:"px-2.5 pb-1.5",children:e.jsx("pre",{className:p("text-[10px] leading-relaxed overflow-x-auto font-mono whitespace-pre-wrap max-h-[200px] overflow-y-auto rounded",i.isJson?"bg-slate-900/10 dark:bg-slate-900/40 text-foreground/80 px-2 py-1":"text-muted-foreground/70"),children:i.text})})]}),x&&e.jsxs("div",{className:"border-t border-border/30",children:[e.jsx("div",{className:"px-2.5 py-0.5 text-[9px] uppercase tracking-wider text-muted-foreground/60",children:"Result"}),e.jsx("div",{className:"px-2.5 pb-1.5",children:e.jsx("pre",{className:p("text-[10px] leading-relaxed overflow-x-auto font-mono whitespace-pre-wrap max-h-[200px] overflow-y-auto rounded",x.isJson?"bg-slate-900/10 dark:bg-slate-900/40 text-foreground/80 px-2 py-1":"text-muted-foreground/70"),children:x.text})})]})]},n.callId||`${n.name}-${u}`)})})]})}function z({content:t,isStreaming:s,isAssistant:r}){return r&&!s&&t?e.jsx(g,{content:t}):s&&t?e.jsx("div",{className:"text-base leading-relaxed",children:e.jsx(g,{content:t,isStreaming:!0})}):s&&!t?e.jsxs("span",{className:"inline-flex items-center gap-1.5 text-sm text-muted-foreground",children:[e.jsx(f,{className:"h-3.5 w-3.5 animate-spin"}),"Thinking…"]}):e.jsx("div",{className:"text-base leading-relaxed whitespace-pre-wrap",children:t})}function L(t){if(!t||isNaN(t))return null;try{return new Date(t).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}catch{return null}}function D(){const t=m(s=>s.messages);return t.length===0?e.jsx("div",{className:"flex items-center justify-center py-12 text-muted-foreground",children:"Start a conversation"}):e.jsx("div",{className:"flex flex-col",children:t.map(s=>{const r=s.role==="user",a=s.role==="system",o=s.role==="tool",l=!!s.content?.trim(),n=!!s.reasoning?.trim(),u=!!s.toolCalls?.length,i=L(s.timestamp),x=o||!r&&!l&&(n||u);if(a)return e.jsx("div",{className:"px-4 py-2",children:e.jsx("div",{className:"mx-auto max-w-3xl rounded-lg border border-destructive/30 bg-destructive/10 px-4 py-2.5 text-sm text-destructive",children:s.content})},s.id);if(x)return e.jsxs("div",{className:"px-4 py-1",children:[e.jsxs("div",{className:"mx-auto max-w-3xl flex flex-col gap-1",children:[n&&e.jsx(j,{reasoning:s.reasoning,isStreaming:s.isStreaming,startedAt:s.reasoningStartedAt,endedAt:s.reasoningEndedAt}),!o&&u&&e.jsx(b,{tools:s.toolCalls}),o&&e.jsx("div",{className:"rounded-md bg-muted/40 px-2.5 py-1.5 text-xs text-muted-foreground leading-relaxed whitespace-pre-wrap font-mono border border-border/50",children:s.content})]}),i&&e.jsx("div",{className:"mx-auto max-w-3xl",children:e.jsx("span",{className:"mt-0.5 text-[10px] text-muted-foreground/40",children:i})})]},s.id);if(r){const h=!!s.attachments?.length;return e.jsx("div",{className:"flex px-4 py-2 justify-end",children:e.jsxs("div",{className:"flex min-w-0 flex-col max-w-[80%] items-end gap-1.5",children:[h&&e.jsx("div",{className:"flex flex-wrap justify-end gap-1.5",children:s.attachments.map(c=>c.type.startsWith("image/")?e.jsx("a",{href:c.url,target:"_blank",rel:"noopener noreferrer",className:"block rounded-xl overflow-hidden border border-border/50 hover:border-border transition-colors",children:e.jsx("img",{src:c.url,alt:c.name,className:"max-h-[200px] max-w-[260px] object-cover"})},c.id):e.jsxs("a",{href:c.url,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1.5 rounded-lg border bg-card px-2.5 py-1.5 text-xs text-foreground hover:bg-muted transition-colors",children:[e.jsx(w,{className:"size-3.5 text-muted-foreground shrink-0"}),e.jsx("span",{className:"truncate max-w-[180px]",children:c.name})]},c.id))}),e.jsx("div",{className:"rounded-2xl px-4 py-2.5 text-sm leading-relaxed bg-primary text-primary-foreground",children:e.jsx("div",{className:"whitespace-pre-wrap",children:s.content})}),i&&e.jsx("span",{className:"text-[10px] text-muted-foreground/50 px-1",children:i})]})},s.id)}return e.jsx("div",{className:"flex px-4 py-4 justify-start",children:e.jsxs("div",{className:"flex min-w-0 flex-col w-full max-w-3xl gap-1",children:[n&&e.jsx(j,{reasoning:s.reasoning,isStreaming:s.isStreaming,startedAt:s.reasoningStartedAt,endedAt:s.reasoningEndedAt}),u&&e.jsx(b,{tools:s.toolCalls}),e.jsx(z,{content:s.content,isStreaming:s.isStreaming,isAssistant:!0}),l&&e.jsx("div",{className:"mt-1 flex items-center gap-2 px-1",children:e.jsx(M,{text:s.content})}),i&&e.jsx("span",{className:"mt-0.5 text-[10px] text-muted-foreground/50 px-1",children:i})]})},s.id)})})}function J(){const{activeSessionId:t,isStreaming:s}=m(),r=m(l=>l.syncFromDb),{state:a}=k(),o=a==="collapsed";return d.useEffect(()=>{if(!t||!s)return;const l=setInterval(()=>{r(t)},2e3);return()=>clearInterval(l)},[t,s,r]),e.jsxs("div",{className:"flex h-full flex-col ",children:[e.jsx("header",{className:"flex items-center justify-between border-b px-4 py-3 shrink-0",children:e.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[o&&e.jsx(S,{className:p("mr-1 -ml-1 text-muted-foreground hover:text-foreground hover:bg-muted transition-colors shrink-0")}),e.jsx("h2",{className:"truncate font-medium",children:t?`Chat ${t.slice(0,8)}`:"New Chat"}),s&&e.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:"Streaming…"})]})}),e.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto",children:e.jsx("div",{className:"mx-auto max-w-3xl",children:e.jsx(D,{})})}),e.jsx("div",{className:"shrink-0 bg-background px-4 py-3",children:e.jsx("div",{className:"mx-auto max-w-3xl",children:e.jsx(T,{})})})]})}function B(){const{sessionId:t}=I.useParams(),s=m(o=>o.switchSession),r=m(o=>o.loadSessions),a=m(o=>o.sessionsLoaded);return d.useEffect(()=>{a||r()},[a,r]),d.useEffect(()=>{t&&s(t)},[t,s]),e.jsx(J,{})}export{B as component};
@@ -0,0 +1 @@
1
+ import{K as c,J as a,D as o,y as u,C as i}from"./index-lcPGeFiu.js";function f(){const s=c(),n=a(e=>e.sessionsLoaded),t=a(e=>e.sessions),r=o.useRef(!1);return o.useEffect(()=>{if(n)if(t.length>0)s({to:"/chat/$sessionId",params:{sessionId:t[0].id},replace:!0});else{if(r.current)return;r.current=!0,u({title:"",source:"api_server"}).then(e=>{s({to:"/chat/$sessionId",params:{sessionId:e.id},replace:!0})}).catch(()=>{r.current=!1})}},[n,t,s]),i.jsx("div",{className:"flex flex-1 items-center justify-center",children:i.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading conversations…"})})}export{f as component};
@@ -0,0 +1 @@
1
+ import{K as a,C as e}from"./index-lcPGeFiu.js";import{C as n}from"./ChatInputBlock-DtDwhu-o.js";function o(){const t=a();return e.jsx("div",{className:"flex flex-1 flex-col items-center justify-center px-4",children:e.jsxs("div",{className:"flex flex-col items-center gap-6 w-full max-w-2xl mx-auto",children:[e.jsx("h1",{className:"text-3xl md:text-4xl font-semibold tracking-tight text-foreground text-center",children:"What can I help you with?"}),e.jsx("div",{className:"w-full",children:e.jsx(n,{onCreateSession:s=>{t({to:"/chat/$sessionId",params:{sessionId:s}})}})})]})})}export{o as component};