hermium 0.3.2 → 0.3.4
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.
- package/bin/hermium.mjs +9 -11
- package/dist/public/assets/js/ChatInputBlock-BNWxaUZs.js +1 -0
- package/dist/public/assets/js/MarkdownMessage-Dj4H-Hot.js +1 -0
- package/dist/public/assets/js/chat._sessionId-CdFGOM3V.js +1 -0
- package/dist/public/assets/js/chat.index-BjoDk7Pf.js +1 -0
- package/dist/public/assets/js/index-CGA2_Unz.js +1 -0
- package/dist/public/assets/js/index-C_aaviLR.js +60 -0
- package/dist/public/assets/js/memory-BE78tPkH.js +3 -0
- package/dist/public/assets/js/settings-RFphMDu9.js +1 -0
- package/dist/public/assets/js/skills-BNq1laCc.js +1 -0
- package/dist/public/assets/js/usage-CLJFoVEz.js +1 -0
- package/dist/server/_libs/h3.mjs +117 -0
- package/dist/server/_libs/ufo.mjs +158 -1
- package/dist/server/_ssr/{ChatInputBlock-BTSt3ldw.mjs → ChatInputBlock-CrbSl9-U.mjs} +1 -1
- package/dist/server/_ssr/{MarkdownMessage-DzImLKnw.mjs → MarkdownMessage-DXbASNGx.mjs} +1 -1
- package/dist/server/_ssr/{chat._sessionId-CUSsvbBX.mjs → chat._sessionId-iub1hqTX.mjs} +4 -4
- package/dist/server/_ssr/{chat.index-YqIyLr2b.mjs → chat.index-QiK175_4.mjs} +1 -1
- package/dist/server/_ssr/{index--T6rScER.mjs → index-B981awUw.mjs} +2 -2
- package/dist/server/_ssr/{index-Be17Jodh.mjs → index-CKVADumM.mjs} +2 -2
- package/dist/server/_ssr/{memory-DLVdk8UN.mjs → memory-C1B4dJi_.mjs} +3 -3
- package/dist/server/_ssr/{router-C0m-TE_e.mjs → router-BNU46tgz.mjs} +35 -10
- package/dist/server/_ssr/{skills-DAVualEA.mjs → skills-BK-0zOm1.mjs} +5 -34
- package/dist/server/_ssr/{usage-CCOujow3.mjs → usage-DEWJSXAs.mjs} +1 -1
- package/dist/server/_tanstack-start-manifest_v-DZ_z1QIO.mjs +4 -0
- package/dist/server/index.mjs +131 -104
- package/dist/server/public/assets/js/ChatInputBlock-BNWxaUZs.js +1 -0
- package/dist/server/public/assets/js/MarkdownMessage-Dj4H-Hot.js +1 -0
- package/dist/server/public/assets/js/chat._sessionId-CdFGOM3V.js +1 -0
- package/dist/server/public/assets/js/chat.index-BjoDk7Pf.js +1 -0
- package/dist/server/public/assets/js/index-CGA2_Unz.js +1 -0
- package/dist/server/public/assets/js/index-C_aaviLR.js +60 -0
- package/dist/server/public/assets/js/memory-BE78tPkH.js +3 -0
- package/dist/server/public/assets/js/settings-RFphMDu9.js +1 -0
- package/dist/server/public/assets/js/skills-BNq1laCc.js +1 -0
- package/dist/server/public/assets/js/usage-CLJFoVEz.js +1 -0
- package/package.json +1 -1
- package/dist/public/assets/js/ChatInputBlock-D4CYR2D_.js +0 -1
- package/dist/public/assets/js/MarkdownMessage-Bu4diQAT.js +0 -1
- package/dist/public/assets/js/base-ui-DKZpRETY.js +0 -1
- package/dist/public/assets/js/chat._sessionId-IyYhnI65.js +0 -1
- package/dist/public/assets/js/chat.index-CdO1bi1g.js +0 -1
- package/dist/public/assets/js/index-CGq67I5U.js +0 -60
- package/dist/public/assets/js/index-CYDXRqze.js +0 -1
- package/dist/public/assets/js/memory-BC-tVM26.js +0 -3
- package/dist/public/assets/js/router-Cdi9aGOg.js +0 -1
- package/dist/public/assets/js/settings-CthZPCPZ.js +0 -1
- package/dist/public/assets/js/skills-COr12qk7.js +0 -1
- package/dist/public/assets/js/usage-oWmLZ5Lt.js +0 -1
- package/dist/server/_tanstack-start-manifest_v-wG3l04YA.mjs +0 -4
- package/dist/server/public/assets/js/ChatInputBlock-D4CYR2D_.js +0 -1
- package/dist/server/public/assets/js/MarkdownMessage-Bu4diQAT.js +0 -1
- package/dist/server/public/assets/js/base-ui-DKZpRETY.js +0 -1
- package/dist/server/public/assets/js/chat._sessionId-IyYhnI65.js +0 -1
- package/dist/server/public/assets/js/chat.index-CdO1bi1g.js +0 -1
- package/dist/server/public/assets/js/index-CGq67I5U.js +0 -60
- package/dist/server/public/assets/js/index-CYDXRqze.js +0 -1
- package/dist/server/public/assets/js/memory-BC-tVM26.js +0 -3
- package/dist/server/public/assets/js/router-Cdi9aGOg.js +0 -1
- package/dist/server/public/assets/js/settings-CthZPCPZ.js +0 -1
- package/dist/server/public/assets/js/skills-COr12qk7.js +0 -1
- package/dist/server/public/assets/js/usage-oWmLZ5Lt.js +0 -1
package/dist/server/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
globalThis.__nitro_main__ = import.meta.url;
|
|
2
2
|
import { N as NodeResponse, s as serve } from "./_libs/srvx.mjs";
|
|
3
|
-
import { a as HTTPError, d as defineHandler, t as toEventHandler, b as defineLazyEventHandler, H as H3Core } from "./_libs/h3.mjs";
|
|
4
|
-
import {
|
|
3
|
+
import { a as HTTPError, p as proxyRequest, d as defineHandler, t as toEventHandler, b as defineLazyEventHandler, H as H3Core } from "./_libs/h3.mjs";
|
|
4
|
+
import { b as withoutBase, j as joinURL, a as withQuery, d as decodePath, w as withLeadingSlash, c as withoutTrailingSlash } from "./_libs/ufo.mjs";
|
|
5
5
|
import { promises } from "node:fs";
|
|
6
6
|
import { fileURLToPath } from "node:url";
|
|
7
7
|
import { dirname, resolve } from "node:path";
|
|
@@ -26,7 +26,7 @@ function lazyService(loader) {
|
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
28
|
const services = {
|
|
29
|
-
["ssr"]: lazyService(() => import("./_ssr/index-
|
|
29
|
+
["ssr"]: lazyService(() => import("./_ssr/index-CKVADumM.mjs"))
|
|
30
30
|
};
|
|
31
31
|
globalThis.__nitro_vite_envs__ = services;
|
|
32
32
|
const errorHandler$1 = (error, event) => {
|
|
@@ -84,172 +84,190 @@ const headers = ((m) => function headersRouteRule(event) {
|
|
|
84
84
|
event.res.headers.set(key2, value);
|
|
85
85
|
}
|
|
86
86
|
});
|
|
87
|
+
const proxy = ((m) => function proxyRouteRule(event) {
|
|
88
|
+
let target = m.options?.to;
|
|
89
|
+
if (!target) {
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
if (target.endsWith("/**")) {
|
|
93
|
+
let targetPath = event.url.pathname + event.url.search;
|
|
94
|
+
const strpBase = m.options._proxyStripBase;
|
|
95
|
+
if (strpBase) {
|
|
96
|
+
if (!isPathInScope(event.url.pathname, strpBase)) {
|
|
97
|
+
throw new HTTPError({ status: 400 });
|
|
98
|
+
}
|
|
99
|
+
targetPath = withoutBase(targetPath, strpBase);
|
|
100
|
+
} else if (targetPath.startsWith("//")) {
|
|
101
|
+
targetPath = targetPath.replace(/^\/+/, "/");
|
|
102
|
+
}
|
|
103
|
+
target = joinURL(target.slice(0, -3), targetPath);
|
|
104
|
+
} else if (event.url.search) {
|
|
105
|
+
target = withQuery(target, Object.fromEntries(event.url.searchParams));
|
|
106
|
+
}
|
|
107
|
+
return proxyRequest(event, target, { ...m.options });
|
|
108
|
+
});
|
|
109
|
+
function isPathInScope(pathname, base) {
|
|
110
|
+
let canonical;
|
|
111
|
+
try {
|
|
112
|
+
const pre = pathname.replace(/%2f/gi, "/").replace(/%5c/gi, "\\");
|
|
113
|
+
canonical = new URL(pre, "http://_").pathname;
|
|
114
|
+
} catch {
|
|
115
|
+
return false;
|
|
116
|
+
}
|
|
117
|
+
return !base || canonical === base || canonical.startsWith(base + "/");
|
|
118
|
+
}
|
|
87
119
|
const assets = {
|
|
88
120
|
"/favicon.ico": {
|
|
89
121
|
"type": "image/vnd.microsoft.icon",
|
|
90
122
|
"etag": '"f1e-ESBTjHetHyiokkO0tT/irBbMO8Y"',
|
|
91
|
-
"mtime": "2026-05-
|
|
123
|
+
"mtime": "2026-05-17T08:12:37.007Z",
|
|
92
124
|
"size": 3870,
|
|
93
125
|
"path": "../public/favicon.ico"
|
|
94
126
|
},
|
|
95
|
-
"/manifest.json": {
|
|
96
|
-
"type": "application/json",
|
|
97
|
-
"etag": '"1f2-Oqn/x1R1hBTtEjA8nFhpBeFJJNg"',
|
|
98
|
-
"mtime": "2026-05-17T07:35:57.053Z",
|
|
99
|
-
"size": 498,
|
|
100
|
-
"path": "../public/manifest.json"
|
|
101
|
-
},
|
|
102
127
|
"/robots.txt": {
|
|
103
128
|
"type": "text/plain; charset=utf-8",
|
|
104
129
|
"etag": '"43-BEzmj4PuhUNHX+oW9uOnPSihxtU"',
|
|
105
|
-
"mtime": "2026-05-
|
|
130
|
+
"mtime": "2026-05-17T08:12:37.007Z",
|
|
106
131
|
"size": 67,
|
|
107
132
|
"path": "../public/robots.txt"
|
|
108
133
|
},
|
|
109
134
|
"/assets/css/index-Dfs9RUU9.css": {
|
|
110
135
|
"type": "text/css; charset=utf-8",
|
|
111
136
|
"etag": '"429-auB1gSdvHWOpUkgakyObE/IliVA"',
|
|
112
|
-
"mtime": "2026-05-
|
|
137
|
+
"mtime": "2026-05-17T08:12:35.606Z",
|
|
113
138
|
"size": 1065,
|
|
114
139
|
"path": "../public/assets/css/index-Dfs9RUU9.css"
|
|
115
140
|
},
|
|
116
|
-
"/
|
|
117
|
-
"type": "
|
|
118
|
-
"etag": '"
|
|
119
|
-
"mtime": "2026-05-
|
|
120
|
-
"size":
|
|
121
|
-
"path": "../public/
|
|
122
|
-
},
|
|
123
|
-
"/assets/js/ChatInputBlock-D4CYR2D_.js": {
|
|
124
|
-
"type": "text/javascript; charset=utf-8",
|
|
125
|
-
"etag": '"1364-FqE9f33IgJsAhrf7P27HlZyRsLY"',
|
|
126
|
-
"mtime": "2026-05-17T07:35:54.999Z",
|
|
127
|
-
"size": 4964,
|
|
128
|
-
"path": "../public/assets/js/ChatInputBlock-D4CYR2D_.js"
|
|
141
|
+
"/manifest.json": {
|
|
142
|
+
"type": "application/json",
|
|
143
|
+
"etag": '"1f2-Oqn/x1R1hBTtEjA8nFhpBeFJJNg"',
|
|
144
|
+
"mtime": "2026-05-17T08:12:37.007Z",
|
|
145
|
+
"size": 498,
|
|
146
|
+
"path": "../public/manifest.json"
|
|
129
147
|
},
|
|
130
|
-
"/assets/js/
|
|
148
|
+
"/assets/js/ChatInputBlock-BNWxaUZs.js": {
|
|
131
149
|
"type": "text/javascript; charset=utf-8",
|
|
132
|
-
"etag": '"
|
|
133
|
-
"mtime": "2026-05-
|
|
134
|
-
"size":
|
|
135
|
-
"path": "../public/assets/js/
|
|
150
|
+
"etag": '"135c-ZAfNo8z/xAQTiq0NPstXSF13slQ"',
|
|
151
|
+
"mtime": "2026-05-17T08:12:35.607Z",
|
|
152
|
+
"size": 4956,
|
|
153
|
+
"path": "../public/assets/js/ChatInputBlock-BNWxaUZs.js"
|
|
136
154
|
},
|
|
137
|
-
"/assets/js/
|
|
155
|
+
"/assets/js/MarkdownMessage-Dj4H-Hot.js": {
|
|
138
156
|
"type": "text/javascript; charset=utf-8",
|
|
139
|
-
"etag": '"
|
|
140
|
-
"mtime": "2026-05-
|
|
141
|
-
"size":
|
|
142
|
-
"path": "../public/assets/js/
|
|
157
|
+
"etag": '"a1e-nkEifMV6XmOaA/xR4SIm2B1Amso"',
|
|
158
|
+
"mtime": "2026-05-17T08:12:35.607Z",
|
|
159
|
+
"size": 2590,
|
|
160
|
+
"path": "../public/assets/js/MarkdownMessage-Dj4H-Hot.js"
|
|
143
161
|
},
|
|
144
|
-
"/assets/js/chat._sessionId-
|
|
162
|
+
"/assets/js/chat._sessionId-CdFGOM3V.js": {
|
|
145
163
|
"type": "text/javascript; charset=utf-8",
|
|
146
|
-
"etag": '"
|
|
147
|
-
"mtime": "2026-05-
|
|
148
|
-
"size":
|
|
149
|
-
"path": "../public/assets/js/chat._sessionId-
|
|
164
|
+
"etag": '"272b-SgDaW/A6mlTA96DT62TKnIPYXgY"',
|
|
165
|
+
"mtime": "2026-05-17T08:12:35.607Z",
|
|
166
|
+
"size": 10027,
|
|
167
|
+
"path": "../public/assets/js/chat._sessionId-CdFGOM3V.js"
|
|
150
168
|
},
|
|
151
|
-
"/assets/
|
|
152
|
-
"type": "text/
|
|
153
|
-
"etag": '"
|
|
154
|
-
"mtime": "2026-05-
|
|
155
|
-
"size":
|
|
156
|
-
"path": "../public/assets/
|
|
169
|
+
"/assets/css/styles-B8p6jk5Z.css": {
|
|
170
|
+
"type": "text/css; charset=utf-8",
|
|
171
|
+
"etag": '"1a414-AEgDOOmvAte00dxPjn+Fb3xg2cQ"',
|
|
172
|
+
"mtime": "2026-05-17T08:12:35.606Z",
|
|
173
|
+
"size": 107540,
|
|
174
|
+
"path": "../public/assets/css/styles-B8p6jk5Z.css"
|
|
157
175
|
},
|
|
158
|
-
"/assets/js/chat.index-
|
|
176
|
+
"/assets/js/chat.index-BjoDk7Pf.js": {
|
|
159
177
|
"type": "text/javascript; charset=utf-8",
|
|
160
|
-
"etag": '"
|
|
161
|
-
"mtime": "2026-05-
|
|
162
|
-
"size":
|
|
163
|
-
"path": "../public/assets/js/chat.index-
|
|
178
|
+
"etag": '"279-Ok8PoSyIxCOr4UBwurRqF5VHi8c"',
|
|
179
|
+
"mtime": "2026-05-17T08:12:35.606Z",
|
|
180
|
+
"size": 633,
|
|
181
|
+
"path": "../public/assets/js/chat.index-BjoDk7Pf.js"
|
|
164
182
|
},
|
|
165
|
-
"/assets/js/
|
|
183
|
+
"/assets/js/index-CGA2_Unz.js": {
|
|
166
184
|
"type": "text/javascript; charset=utf-8",
|
|
167
|
-
"etag": '"
|
|
168
|
-
"mtime": "2026-05-
|
|
169
|
-
"size":
|
|
170
|
-
"path": "../public/assets/js/
|
|
185
|
+
"etag": '"25b-fxN7gGwfHgVMHDoeV5e/0IyHBWY"',
|
|
186
|
+
"mtime": "2026-05-17T08:12:35.606Z",
|
|
187
|
+
"size": 603,
|
|
188
|
+
"path": "../public/assets/js/index-CGA2_Unz.js"
|
|
171
189
|
},
|
|
172
|
-
"/assets/js/
|
|
190
|
+
"/assets/js/memory-BE78tPkH.js": {
|
|
173
191
|
"type": "text/javascript; charset=utf-8",
|
|
174
|
-
"etag": '"
|
|
175
|
-
"mtime": "2026-05-
|
|
176
|
-
"size":
|
|
177
|
-
"path": "../public/assets/js/
|
|
192
|
+
"etag": '"1260-9tkYxWdwKkq3nnr02ABCs1g43O8"',
|
|
193
|
+
"mtime": "2026-05-17T08:12:35.606Z",
|
|
194
|
+
"size": 4704,
|
|
195
|
+
"path": "../public/assets/js/memory-BE78tPkH.js"
|
|
178
196
|
},
|
|
179
|
-
"/assets/js/settings-
|
|
197
|
+
"/assets/js/settings-RFphMDu9.js": {
|
|
180
198
|
"type": "text/javascript; charset=utf-8",
|
|
181
|
-
"etag": '"
|
|
182
|
-
"mtime": "2026-05-
|
|
183
|
-
"size":
|
|
184
|
-
"path": "../public/assets/js/settings-
|
|
199
|
+
"etag": '"130-6wtuqClA39X5E6nqUHiVbgnuPCY"',
|
|
200
|
+
"mtime": "2026-05-17T08:12:35.607Z",
|
|
201
|
+
"size": 304,
|
|
202
|
+
"path": "../public/assets/js/settings-RFphMDu9.js"
|
|
185
203
|
},
|
|
186
|
-
"/assets/js/skills-
|
|
204
|
+
"/assets/js/skills-BNq1laCc.js": {
|
|
187
205
|
"type": "text/javascript; charset=utf-8",
|
|
188
|
-
"etag": '"
|
|
189
|
-
"mtime": "2026-05-
|
|
190
|
-
"size":
|
|
191
|
-
"path": "../public/assets/js/skills-
|
|
206
|
+
"etag": '"29cb-/AzunaWrbwdqf+kVjgGynWinjVM"',
|
|
207
|
+
"mtime": "2026-05-17T08:12:35.606Z",
|
|
208
|
+
"size": 10699,
|
|
209
|
+
"path": "../public/assets/js/skills-BNq1laCc.js"
|
|
192
210
|
},
|
|
193
211
|
"/assets/js/theme-CPkdkpaj.js": {
|
|
194
212
|
"type": "text/javascript; charset=utf-8",
|
|
195
213
|
"etag": '"245-JWXBP1zFNJpiVT0wBqxD0nTaUio"',
|
|
196
|
-
"mtime": "2026-05-
|
|
214
|
+
"mtime": "2026-05-17T08:12:35.607Z",
|
|
197
215
|
"size": 581,
|
|
198
216
|
"path": "../public/assets/js/theme-CPkdkpaj.js"
|
|
199
217
|
},
|
|
200
|
-
"/assets/js/usage-
|
|
218
|
+
"/assets/js/usage-CLJFoVEz.js": {
|
|
201
219
|
"type": "text/javascript; charset=utf-8",
|
|
202
|
-
"etag": '"
|
|
203
|
-
"mtime": "2026-05-
|
|
204
|
-
"size":
|
|
205
|
-
"path": "../public/assets/js/usage-
|
|
220
|
+
"etag": '"2503-0G5AOwFkDon2jgRhwYpRX74ucpI"',
|
|
221
|
+
"mtime": "2026-05-17T08:12:35.605Z",
|
|
222
|
+
"size": 9475,
|
|
223
|
+
"path": "../public/assets/js/usage-CLJFoVEz.js"
|
|
206
224
|
},
|
|
207
225
|
"/assets/woff2/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2": {
|
|
208
226
|
"type": "font/woff2",
|
|
209
227
|
"etag": '"1cfc-yYSDXNlt/tTRaj6rJo8ZMqvY7pQ"',
|
|
210
|
-
"mtime": "2026-05-
|
|
228
|
+
"mtime": "2026-05-17T08:12:35.605Z",
|
|
211
229
|
"size": 7420,
|
|
212
230
|
"path": "../public/assets/woff2/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2"
|
|
213
231
|
},
|
|
214
|
-
"/assets/woff2/geist-cyrillic-wght-normal-BEAKL7Jp.woff2": {
|
|
215
|
-
"type": "font/woff2",
|
|
216
|
-
"etag": '"3aec-5kpQSZEtAzzU5kdiuro3Zr2YR54"',
|
|
217
|
-
"mtime": "2026-05-17T07:35:54.999Z",
|
|
218
|
-
"size": 15084,
|
|
219
|
-
"path": "../public/assets/woff2/geist-cyrillic-wght-normal-BEAKL7Jp.woff2"
|
|
220
|
-
},
|
|
221
|
-
"/assets/woff2/geist-vietnamese-wght-normal-6IgcOCM7.woff2": {
|
|
222
|
-
"type": "font/woff2",
|
|
223
|
-
"etag": '"1f44-6MZ7/PEEOeDVF0eHI650KpwKQV8"',
|
|
224
|
-
"mtime": "2026-05-17T07:35:54.999Z",
|
|
225
|
-
"size": 8004,
|
|
226
|
-
"path": "../public/assets/woff2/geist-vietnamese-wght-normal-6IgcOCM7.woff2"
|
|
227
|
-
},
|
|
228
232
|
"/assets/woff2/geist-latin-ext-wght-normal-DC-KSUi6.woff2": {
|
|
229
233
|
"type": "font/woff2",
|
|
230
234
|
"etag": '"4080-mZu3Z7sOWqglha+kefNbUA9Pp+Q"',
|
|
231
|
-
"mtime": "2026-05-
|
|
235
|
+
"mtime": "2026-05-17T08:12:35.606Z",
|
|
232
236
|
"size": 16512,
|
|
233
237
|
"path": "../public/assets/woff2/geist-latin-ext-wght-normal-DC-KSUi6.woff2"
|
|
234
238
|
},
|
|
239
|
+
"/assets/woff2/geist-cyrillic-wght-normal-BEAKL7Jp.woff2": {
|
|
240
|
+
"type": "font/woff2",
|
|
241
|
+
"etag": '"3aec-5kpQSZEtAzzU5kdiuro3Zr2YR54"',
|
|
242
|
+
"mtime": "2026-05-17T08:12:35.606Z",
|
|
243
|
+
"size": 15084,
|
|
244
|
+
"path": "../public/assets/woff2/geist-cyrillic-wght-normal-BEAKL7Jp.woff2"
|
|
245
|
+
},
|
|
235
246
|
"/assets/woff2/geist-latin-wght-normal-BgDaEnEv.woff2": {
|
|
236
247
|
"type": "font/woff2",
|
|
237
248
|
"etag": '"72d8-9J+D7/6th5UzRxIgoFX9awJv47A"',
|
|
238
|
-
"mtime": "2026-05-
|
|
249
|
+
"mtime": "2026-05-17T08:12:35.606Z",
|
|
239
250
|
"size": 29400,
|
|
240
251
|
"path": "../public/assets/woff2/geist-latin-wght-normal-BgDaEnEv.woff2"
|
|
241
252
|
},
|
|
242
|
-
"/assets/
|
|
253
|
+
"/assets/woff2/geist-vietnamese-wght-normal-6IgcOCM7.woff2": {
|
|
254
|
+
"type": "font/woff2",
|
|
255
|
+
"etag": '"1f44-6MZ7/PEEOeDVF0eHI650KpwKQV8"',
|
|
256
|
+
"mtime": "2026-05-17T08:12:35.606Z",
|
|
257
|
+
"size": 8004,
|
|
258
|
+
"path": "../public/assets/woff2/geist-vietnamese-wght-normal-6IgcOCM7.woff2"
|
|
259
|
+
},
|
|
260
|
+
"/assets/js/index-C_aaviLR.js": {
|
|
243
261
|
"type": "text/javascript; charset=utf-8",
|
|
244
|
-
"etag": '"
|
|
245
|
-
"mtime": "2026-05-
|
|
246
|
-
"size":
|
|
247
|
-
"path": "../public/assets/js/index-
|
|
262
|
+
"etag": '"dce36-4QKEzS4Y1n848pZGpALiMbDoOhQ"',
|
|
263
|
+
"mtime": "2026-05-17T08:12:35.607Z",
|
|
264
|
+
"size": 904758,
|
|
265
|
+
"path": "../public/assets/js/index-C_aaviLR.js"
|
|
248
266
|
},
|
|
249
267
|
"/logo.png": {
|
|
250
268
|
"type": "image/png",
|
|
251
269
|
"etag": '"142435-x+cWIod8BP5RPjbiISayulI5r7I"',
|
|
252
|
-
"mtime": "2026-05-
|
|
270
|
+
"mtime": "2026-05-17T08:12:37.008Z",
|
|
253
271
|
"size": 1319989,
|
|
254
272
|
"path": "../public/logo.png"
|
|
255
273
|
}
|
|
@@ -338,14 +356,23 @@ const _uHHM1p = defineHandler((event) => {
|
|
|
338
356
|
return readAsset(id);
|
|
339
357
|
});
|
|
340
358
|
const findRouteRules = /* @__PURE__ */ (() => {
|
|
341
|
-
const $0 = [{ name: "headers", route: "/assets/**", handler: headers, options: { "cache-control": "public, max-age=31536000, immutable" } }];
|
|
359
|
+
const $0 = [{ name: "proxy", route: "/health", handler: proxy, options: { "to": "http://127.0.0.1:47474/health" } }], $1 = [{ name: "proxy", route: "/webhook", handler: proxy, options: { "to": "http://127.0.0.1:47474/webhook" } }], $2 = [{ name: "proxy", route: "/api/**", handler: proxy, options: { "to": "http://127.0.0.1:47474/api/**", "_proxyStripBase": "/api" } }], $3 = [{ name: "proxy", route: "/upload/**", handler: proxy, options: { "to": "http://127.0.0.1:47474/upload/**", "_proxyStripBase": "/upload" } }], $4 = [{ name: "headers", route: "/assets/**", handler: headers, options: { "cache-control": "public, max-age=31536000, immutable" } }];
|
|
342
360
|
return (m, p) => {
|
|
343
361
|
let r = [];
|
|
344
362
|
if (p.charCodeAt(p.length - 1) === 47) p = p.slice(0, -1) || "/";
|
|
363
|
+
if (p === "/health") {
|
|
364
|
+
r.unshift({ data: $0 });
|
|
365
|
+
} else if (p === "/webhook") {
|
|
366
|
+
r.unshift({ data: $1 });
|
|
367
|
+
}
|
|
345
368
|
let s = p.split("/"), l = s.length;
|
|
346
369
|
if (l > 1) {
|
|
347
|
-
if (s[1] === "
|
|
348
|
-
r.unshift({ data: $
|
|
370
|
+
if (s[1] === "api") {
|
|
371
|
+
r.unshift({ data: $2, params: { "_": s.slice(2).join("/") } });
|
|
372
|
+
} else if (s[1] === "upload") {
|
|
373
|
+
r.unshift({ data: $3, params: { "_": s.slice(2).join("/") } });
|
|
374
|
+
} else if (s[1] === "assets") {
|
|
375
|
+
r.unshift({ data: $4, params: { "_": s.slice(2).join("/") } });
|
|
349
376
|
}
|
|
350
377
|
}
|
|
351
378
|
return r;
|
|
@@ -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-C_aaviLR.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-C_aaviLR.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-C_aaviLR.js";import{M as g}from"./MarkdownMessage-Dj4H-Hot.js";import{C as T}from"./ChatInputBlock-BNWxaUZs.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-C_aaviLR.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-C_aaviLR.js";import{C as n}from"./ChatInputBlock-BNWxaUZs.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};
|