hermium 0.1.7 → 0.1.9
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 +6 -5
- package/dist/public/assets/{IconAlertCircle-C98Iam1j.js → IconAlertCircle-BHkmI3j7.js} +1 -1
- package/dist/public/assets/{IconAlertTriangle-DdD7_dc8.js → IconAlertTriangle-wCJudlVg.js} +1 -1
- package/dist/public/assets/{IconCheck-CYZ4_524.js → IconCheck-CFuEh_p7.js} +1 -1
- package/dist/public/assets/{IconLoader2-DkEhzUxZ.js → IconLoader2-BIx3OuF9.js} +1 -1
- package/dist/public/assets/{IconRefresh-CCXMrUxO.js → IconRefresh-Dgm93w3T.js} +1 -1
- package/dist/public/assets/index-Bbz3abmO.js +14 -0
- package/dist/public/assets/index-CWUaRwcE.js +1 -0
- package/dist/public/assets/index-CinLq3cd.js +1 -0
- package/dist/public/assets/{index-DCT13_ZI.js → index-CrQs9n6q.js} +1 -1
- package/dist/public/assets/{index-zFJdOj6P.js → index-CtacpN3I.js} +1 -1
- package/dist/public/assets/{index-C0ivmMuU.js → index-DY7aE-9s.js} +1 -1
- package/dist/public/assets/index-DkYGodJj.js +94 -0
- package/dist/public/assets/{index-DhCVawEl.js → index-DvDLadUx.js} +1 -1
- package/dist/public/assets/index-U6RcWedt.js +1 -0
- package/dist/public/assets/index-_6iFZ0fh.js +1 -0
- package/dist/public/assets/index-enFS26SU.js +1 -0
- package/dist/public/assets/input-eNcwlDHp.js +1 -0
- package/dist/public/assets/queries-iHRgZzw2.js +1 -0
- package/dist/public/assets/styles-KcflDlA_.css +1 -0
- package/dist/public/assets/{switch-BKlJnOab.js → switch-B1DcZLwL.js} +1 -1
- package/dist/public/assets/{syntax-highlighter-BuOqgzbp.js → syntax-highlighter-DWPF-A_h.js} +2 -2
- package/dist/public/assets/{textarea-a9VUYAmJ.js → textarea-Di_syYTS.js} +1 -1
- package/dist/server/index.mjs +130 -129
- package/dist/web-server/_libs/tabler__icons-react.mjs +171 -165
- package/dist/web-server/_ssr/{index-KGEq7IhY.mjs → index-0n2Z3BPQ.mjs} +2 -2
- package/dist/web-server/_ssr/{index-DxgfsEKM.mjs → index-6itDALOw.mjs} +39 -20
- package/dist/web-server/_ssr/{index-BFCBaZTA.mjs → index-BIRTrOmp.mjs} +3 -3
- package/dist/web-server/_ssr/{index-BVtbpy73.mjs → index-BPzfADac.mjs} +1 -1
- package/dist/web-server/_ssr/{index-CmwSlgGR.mjs → index-BQE3bF14.mjs} +42 -20
- package/dist/web-server/_ssr/index-C5HpvlUP.mjs +190 -0
- package/dist/web-server/_ssr/{index-BT-fOdbN.mjs → index-C_ZxnypN.mjs} +2 -2
- package/dist/web-server/_ssr/{index-B_d-ca5z.mjs → index-Ca8JFH8f.mjs} +4 -4
- package/dist/web-server/_ssr/{index-D4rgpZTm.mjs → index-DNVESZiA.mjs} +4 -4
- package/dist/web-server/_ssr/index.mjs +2 -2
- package/dist/web-server/_ssr/{input-CZtNKDXd.mjs → input-CqXjTRQg.mjs} +1 -1
- package/dist/web-server/_ssr/{queries-ixVDom0l.mjs → queries-3H_19mUt.mjs} +1 -1
- package/dist/web-server/_ssr/{router-CrULUyXB.mjs → router-sbsNus0Y.mjs} +186 -91
- package/dist/web-server/_ssr/{switch-Bd3Khe3S.mjs → switch-usf2F1UM.mjs} +1 -1
- package/dist/web-server/_ssr/{textarea-ClM2KXId.mjs → textarea-DfRheWY0.mjs} +1 -1
- package/dist/web-server/_tanstack-start-manifest_v-DqW-pKEH.mjs +4 -0
- package/dist/web-server/index.mjs +135 -142
- package/package.json +1 -1
- package/dist/public/assets/index-BTiEWEax.js +0 -1
- package/dist/public/assets/index-Bfadg8tB.js +0 -1
- package/dist/public/assets/index-CQCxtJMS.js +0 -14
- package/dist/public/assets/index-D6B0cdTJ.js +0 -1
- package/dist/public/assets/index-KT0CxDFc.js +0 -1
- package/dist/public/assets/index-qsvsww7-.js +0 -1
- package/dist/public/assets/index-twHXYGSY.js +0 -90
- package/dist/public/assets/input-C_TtyOcH.js +0 -1
- package/dist/public/assets/queries-DuZAFrOY.js +0 -1
- package/dist/public/assets/styles-Bc7sFPhq.css +0 -1
- package/dist/public/assets/useQuery-ByTdbkfi.js +0 -1
- package/dist/web-server/_ssr/index-ClGONv4K.mjs +0 -189
- package/dist/web-server/_tanstack-start-manifest_v-cNUQI9I2.mjs +0 -4
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as reactExports, j as jsxRuntimeExports } from "../_libs/react.mjs";
|
|
2
|
-
import { a as cn, g as get, p as post } from "./router-
|
|
3
|
-
import { S as Switch } from "./switch-
|
|
4
|
-
import {
|
|
2
|
+
import { a as cn, g as get, p as post } from "./router-sbsNus0Y.mjs";
|
|
3
|
+
import { S as Switch } from "./switch-usf2F1UM.mjs";
|
|
4
|
+
import { C as IconLoader2, F as IconAlertCircle, E as IconRefresh, m as IconPuzzle, I as IconSearch, a as IconX, j as IconChevronDown, G as IconVersions, H as IconTag, J as IconLink } from "../_libs/tabler__icons-react.mjs";
|
|
5
5
|
import { M as Markdown } from "../_libs/react-markdown.mjs";
|
|
6
6
|
import { r as remarkGfm } from "../_libs/remark-gfm.mjs";
|
|
7
7
|
import "../_libs/tanstack__react-router.mjs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as reactExports, j as jsxRuntimeExports } from "../_libs/react.mjs";
|
|
2
2
|
import { d as useNavigate } from "../_libs/tanstack__react-router.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import { h as useChatStore, c as createSession } from "./router-sbsNus0Y.mjs";
|
|
4
4
|
import "../_libs/tanstack__router-core.mjs";
|
|
5
5
|
import "../_libs/tanstack__history.mjs";
|
|
6
6
|
import "../_libs/cookie-es.mjs";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { r as reactExports, j as jsxRuntimeExports } from "../_libs/react.mjs";
|
|
2
2
|
import { u as useShallow } from "../_libs/zustand.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import { T as Textarea } from "./textarea-
|
|
5
|
-
import { u as useModels } from "./queries-
|
|
3
|
+
import { n as Route, h as useChatStore, c as createSession, D as DropdownMenu, b as DropdownMenuTrigger, d as DropdownMenuContent, e as DropdownMenuItem, r as renameSession, B as Button, u as updateModelConfig, a as cn, l as deleteSessionApi, m as respondApproval } from "./router-sbsNus0Y.mjs";
|
|
4
|
+
import { T as Textarea } from "./textarea-DfRheWY0.mjs";
|
|
5
|
+
import { u as useModels } from "./queries-3H_19mUt.mjs";
|
|
6
6
|
import { d as useNavigate } from "../_libs/tanstack__react-router.mjs";
|
|
7
|
-
import {
|
|
7
|
+
import { T as IconPlus, v as IconTrash, r as IconDots, s as IconPencil, I as IconSearch, Z as IconBell, _ as IconMail, z as IconCode, U as IconClock, $ as IconChartLine, a0 as IconShieldCheck, R as IconAlertTriangle, O as IconCheck, a as IconX, a1 as IconCommand, a2 as IconPaperclip, B as IconCloud, C as IconLoader2, a3 as IconPlayerStop, D as IconArrowUp, a4 as IconPhoto, a5 as IconFile, Y as IconChevronRight, u as IconCopy } from "../_libs/tabler__icons-react.mjs";
|
|
8
8
|
import { M as Markdown } from "../_libs/react-markdown.mjs";
|
|
9
9
|
import { r as remarkGfm } from "../_libs/remark-gfm.mjs";
|
|
10
10
|
import "../_libs/tanstack__query-core.mjs";
|
|
@@ -247,7 +247,7 @@ function uid() {
|
|
|
247
247
|
return Date.now().toString(36) + Math.random().toString(36).slice(2, 8);
|
|
248
248
|
}
|
|
249
249
|
const ChatInput = reactExports.forwardRef(
|
|
250
|
-
function ChatInput2({ isLoading, onSubmit, onAbort }, ref) {
|
|
250
|
+
function ChatInput2({ sessionId, model, isLoading, onSubmit, onAbort }, ref) {
|
|
251
251
|
const [input, setInput] = reactExports.useState("");
|
|
252
252
|
const [isComposing, setIsComposing] = reactExports.useState(false);
|
|
253
253
|
const [slashMenuOpen, setSlashMenuOpen] = reactExports.useState(false);
|
|
@@ -263,11 +263,30 @@ const ChatInput = reactExports.forwardRef(
|
|
|
263
263
|
const [selectedModelId, setSelectedModelId] = reactExports.useState("");
|
|
264
264
|
reactExports.useEffect(() => {
|
|
265
265
|
if (!models.length) return;
|
|
266
|
-
|
|
267
|
-
const
|
|
268
|
-
if (
|
|
269
|
-
|
|
266
|
+
const sessionModelValid = model && models.some((m) => m.id === model);
|
|
267
|
+
const selectedValid = selectedModelId && models.some((m) => m.id === selectedModelId);
|
|
268
|
+
if (sessionModelValid) {
|
|
269
|
+
if (selectedModelId !== model) {
|
|
270
|
+
setSelectedModelId(model);
|
|
271
|
+
}
|
|
272
|
+
return;
|
|
273
|
+
}
|
|
274
|
+
if (!selectedValid) {
|
|
275
|
+
const target = modelsData?.default_model || models[0]?.id;
|
|
276
|
+
if (target) setSelectedModelId(target);
|
|
277
|
+
}
|
|
278
|
+
}, [models, modelsData?.default_model, model]);
|
|
270
279
|
const selectedModel = models.find((m) => m.id === selectedModelId);
|
|
280
|
+
const handleModelChange = reactExports.useCallback(
|
|
281
|
+
async (nextModelId) => {
|
|
282
|
+
setSelectedModelId(nextModelId);
|
|
283
|
+
try {
|
|
284
|
+
await updateModelConfig({ model: nextModelId, session_id: sessionId });
|
|
285
|
+
} catch {
|
|
286
|
+
}
|
|
287
|
+
},
|
|
288
|
+
[sessionId]
|
|
289
|
+
);
|
|
271
290
|
const autoResize = reactExports.useCallback(() => {
|
|
272
291
|
const el = inputRef.current;
|
|
273
292
|
if (!el) return;
|
|
@@ -410,7 +429,7 @@ const ChatInput = reactExports.forwardRef(
|
|
|
410
429
|
if (!text || isLoading) return;
|
|
411
430
|
setSlashMenuOpen(false);
|
|
412
431
|
clearAfterSend(text);
|
|
413
|
-
onSubmit(text, attachments);
|
|
432
|
+
onSubmit(text, selectedModelId, attachments);
|
|
414
433
|
setAttachments([]);
|
|
415
434
|
}
|
|
416
435
|
function handleSlashSelect(cmd) {
|
|
@@ -418,7 +437,7 @@ const ChatInput = reactExports.forwardRef(
|
|
|
418
437
|
if (cmd.local || cmd.category === "info") {
|
|
419
438
|
setInput("");
|
|
420
439
|
if (inputRef.current) inputRef.current.style.height = "auto";
|
|
421
|
-
onSubmit(cmd.name);
|
|
440
|
+
onSubmit(cmd.name, selectedModelId);
|
|
422
441
|
return;
|
|
423
442
|
}
|
|
424
443
|
setInput(cmd.name + " ");
|
|
@@ -569,20 +588,20 @@ const ChatInput = reactExports.forwardRef(
|
|
|
569
588
|
modelsLoading && /* @__PURE__ */ jsxRuntimeExports.jsx(IconLoader2, { className: "h-3.5 w-3.5 animate-spin shrink-0" }),
|
|
570
589
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: cn(modelsLoading && "opacity-60"), children: modelsLoading ? "Loading…" : selectedModel ? displayName(selectedModel) : "Select model" })
|
|
571
590
|
] }),
|
|
572
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(DropdownMenuContent, { align: "start", className: "max-h-[300px] overflow-y-auto min-w-48", children: models.map((
|
|
591
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(DropdownMenuContent, { align: "start", className: "max-h-[300px] overflow-y-auto min-w-48", children: models.map((model2) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
573
592
|
DropdownMenuItem,
|
|
574
593
|
{
|
|
575
|
-
onClick: () =>
|
|
594
|
+
onClick: () => handleModelChange(model2.id),
|
|
576
595
|
className: cn(
|
|
577
596
|
"flex-col items-start py-2",
|
|
578
|
-
|
|
597
|
+
model2.id === selectedModelId && "bg-muted"
|
|
579
598
|
),
|
|
580
599
|
children: [
|
|
581
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-sm", children: displayName(
|
|
582
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-muted-foreground text-xs", children:
|
|
600
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-sm", children: displayName(model2) }),
|
|
601
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-muted-foreground text-xs", children: model2.provider_name })
|
|
583
602
|
]
|
|
584
603
|
},
|
|
585
|
-
|
|
604
|
+
model2.id
|
|
586
605
|
)) })
|
|
587
606
|
] }),
|
|
588
607
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "ml-auto flex items-center gap-2", children: isLoading ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -1186,7 +1205,7 @@ function useChatScroll(messages) {
|
|
|
1186
1205
|
}, [messages, scrollToBottom]);
|
|
1187
1206
|
return { containerRef, bottomRef, onScroll };
|
|
1188
1207
|
}
|
|
1189
|
-
const BASE_URL = "http://localhost:
|
|
1208
|
+
const BASE_URL = "http://localhost:47474";
|
|
1190
1209
|
async function* postChatStream(options) {
|
|
1191
1210
|
const { input, conversation, model, signal } = options;
|
|
1192
1211
|
const body = { input };
|
|
@@ -1292,6 +1311,7 @@ function useChatStream() {
|
|
|
1292
1311
|
(sx) => sx.id === sessionId ? {
|
|
1293
1312
|
...sx,
|
|
1294
1313
|
messages: [...sx.messages, userMsg],
|
|
1314
|
+
model: model || sx.model || "",
|
|
1295
1315
|
title: !sx.title || sx.title === "New Conversation" || sx.title === "Untitled" ? text.slice(0, 64) : sx.title
|
|
1296
1316
|
} : sx
|
|
1297
1317
|
)
|
|
@@ -1515,7 +1535,7 @@ function useChatActions({
|
|
|
1515
1535
|
const isLoadingRef = reactExports.useRef(isLoading);
|
|
1516
1536
|
isLoadingRef.current = isLoading;
|
|
1517
1537
|
const handleSend = reactExports.useCallback(
|
|
1518
|
-
async (text, attachments) => {
|
|
1538
|
+
async (text, modelId, attachments) => {
|
|
1519
1539
|
const trimmed = text.trim();
|
|
1520
1540
|
if (!trimmed || isLoadingRef.current) return;
|
|
1521
1541
|
if (isLocalCommand(trimmed)) {
|
|
@@ -1575,7 +1595,7 @@ ${lines}`,
|
|
|
1575
1595
|
}));
|
|
1576
1596
|
return;
|
|
1577
1597
|
}
|
|
1578
|
-
await sendMessage(trimmed, sessionId, model, { attachments });
|
|
1598
|
+
await sendMessage(trimmed, sessionId, modelId || model, { attachments });
|
|
1579
1599
|
},
|
|
1580
1600
|
[sessionId, model, sendMessage, navigate]
|
|
1581
1601
|
);
|
|
@@ -1791,6 +1811,8 @@ function Chat({
|
|
|
1791
1811
|
ChatInput,
|
|
1792
1812
|
{
|
|
1793
1813
|
ref: chatInputRef,
|
|
1814
|
+
sessionId,
|
|
1815
|
+
model,
|
|
1794
1816
|
isLoading,
|
|
1795
1817
|
onSubmit: actions.handleSend,
|
|
1796
1818
|
onAbort: actions.handleAbort
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
import { j as jsxRuntimeExports } from "../_libs/react.mjs";
|
|
2
|
+
import { R as Route$5, f as useTheme } from "./router-sbsNus0Y.mjs";
|
|
3
|
+
import { f as IconBrandGithub, e as IconPaint, K as IconArrowUpRight, L as IconWorld, M as IconBrandTelegram } from "../_libs/tabler__icons-react.mjs";
|
|
4
|
+
import "../_libs/tanstack__react-router.mjs";
|
|
5
|
+
import "../_libs/tanstack__router-core.mjs";
|
|
6
|
+
import "../_libs/tanstack__history.mjs";
|
|
7
|
+
import "../_libs/cookie-es.mjs";
|
|
8
|
+
import "../_libs/seroval.mjs";
|
|
9
|
+
import "../_libs/seroval-plugins.mjs";
|
|
10
|
+
import "node:stream/web";
|
|
11
|
+
import "node:stream";
|
|
12
|
+
import "../_libs/react-dom.mjs";
|
|
13
|
+
import "util";
|
|
14
|
+
import "crypto";
|
|
15
|
+
import "async_hooks";
|
|
16
|
+
import "stream";
|
|
17
|
+
import "../_libs/isbot.mjs";
|
|
18
|
+
import "../_libs/tanstack__query-core.mjs";
|
|
19
|
+
import "../_libs/tanstack__react-query.mjs";
|
|
20
|
+
import "../_libs/clsx.mjs";
|
|
21
|
+
import "../_libs/class-variance-authority.mjs";
|
|
22
|
+
import "../_libs/zustand.mjs";
|
|
23
|
+
import "../_libs/base-ui__react.mjs";
|
|
24
|
+
import "../_libs/base-ui__utils.mjs";
|
|
25
|
+
import "../_libs/use-sync-external-store.mjs";
|
|
26
|
+
import "../_libs/floating-ui__utils.mjs";
|
|
27
|
+
import "../_libs/floating-ui__react-dom.mjs";
|
|
28
|
+
import "../_libs/floating-ui__dom.mjs";
|
|
29
|
+
import "../_libs/floating-ui__core.mjs";
|
|
30
|
+
import "../_libs/zod.mjs";
|
|
31
|
+
const settingsMap = {
|
|
32
|
+
appearance: {
|
|
33
|
+
icon: IconPaint,
|
|
34
|
+
title: "Appearance",
|
|
35
|
+
description: "Choose your preferred theme",
|
|
36
|
+
get content() {
|
|
37
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(AppearanceSettings, {});
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
about: {
|
|
41
|
+
icon: IconBrandGithub,
|
|
42
|
+
title: "About",
|
|
43
|
+
description: "Links and community",
|
|
44
|
+
content: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-2", children: [
|
|
45
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
46
|
+
"a",
|
|
47
|
+
{
|
|
48
|
+
href: "https://github.com/abboskhonov/hermium",
|
|
49
|
+
target: "_blank",
|
|
50
|
+
rel: "noopener noreferrer",
|
|
51
|
+
className: "group flex items-center gap-3.5 rounded-xl border border-border bg-background px-4 py-3 text-sm text-foreground shadow-sm hover:border-foreground/20 hover:shadow-md transition-all",
|
|
52
|
+
children: [
|
|
53
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex size-9 shrink-0 items-center justify-center rounded-lg bg-neutral-100 dark:bg-neutral-800", children: /* @__PURE__ */ jsxRuntimeExports.jsx(IconBrandGithub, { className: "size-5 text-neutral-700 dark:text-neutral-300" }) }),
|
|
54
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
55
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "font-medium", children: "GitHub" }),
|
|
56
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs text-muted-foreground truncate", children: "abboskhonov/hermium" })
|
|
57
|
+
] }),
|
|
58
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(IconArrowUpRight, { className: "size-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity shrink-0" })
|
|
59
|
+
]
|
|
60
|
+
}
|
|
61
|
+
),
|
|
62
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
63
|
+
"a",
|
|
64
|
+
{
|
|
65
|
+
href: "https://hermium.vercel.app",
|
|
66
|
+
target: "_blank",
|
|
67
|
+
rel: "noopener noreferrer",
|
|
68
|
+
className: "group flex items-center gap-3.5 rounded-xl border border-border bg-background px-4 py-3 text-sm text-foreground shadow-sm hover:border-foreground/20 hover:shadow-md transition-all",
|
|
69
|
+
children: [
|
|
70
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex size-9 shrink-0 items-center justify-center rounded-lg bg-emerald-50 dark:bg-emerald-950/40", children: /* @__PURE__ */ jsxRuntimeExports.jsx(IconWorld, { className: "size-5 text-emerald-600 dark:text-emerald-400" }) }),
|
|
71
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
72
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "font-medium", children: "Website" }),
|
|
73
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs text-muted-foreground truncate", children: "hermium.vercel.app" })
|
|
74
|
+
] }),
|
|
75
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(IconArrowUpRight, { className: "size-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity shrink-0" })
|
|
76
|
+
]
|
|
77
|
+
}
|
|
78
|
+
),
|
|
79
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
80
|
+
"a",
|
|
81
|
+
{
|
|
82
|
+
href: "https://t.me/hermium_chat",
|
|
83
|
+
target: "_blank",
|
|
84
|
+
rel: "noopener noreferrer",
|
|
85
|
+
className: "group flex items-center gap-3.5 rounded-xl border border-border bg-background px-4 py-3 text-sm text-foreground shadow-sm hover:border-foreground/20 hover:shadow-md transition-all",
|
|
86
|
+
children: [
|
|
87
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex size-9 shrink-0 items-center justify-center rounded-lg bg-sky-50 dark:bg-sky-950/40", children: /* @__PURE__ */ jsxRuntimeExports.jsx(IconBrandTelegram, { className: "size-5 text-sky-500 dark:text-sky-400" }) }),
|
|
88
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
89
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "font-medium", children: "Telegram" }),
|
|
90
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs text-muted-foreground truncate", children: "@hermium_chat" })
|
|
91
|
+
] }),
|
|
92
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(IconArrowUpRight, { className: "size-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity shrink-0" })
|
|
93
|
+
]
|
|
94
|
+
}
|
|
95
|
+
)
|
|
96
|
+
] })
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
function ThemePreview({ variant }) {
|
|
100
|
+
const isLight = variant === "light";
|
|
101
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "relative w-full aspect-[16/10] overflow-hidden rounded-lg", children: variant === "system" ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex h-full w-full", children: [
|
|
102
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex h-full w-1/2 bg-neutral-100", children: [
|
|
103
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(MiniSidebar, { light: true }),
|
|
104
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(MiniContent, { light: true })
|
|
105
|
+
] }),
|
|
106
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex h-full w-1/2 bg-neutral-900", children: [
|
|
107
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(MiniSidebar, { light: false }),
|
|
108
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(MiniContent, { light: false })
|
|
109
|
+
] })
|
|
110
|
+
] }) : /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: cn("flex h-full w-full", isLight ? "bg-neutral-100" : "bg-neutral-900"), children: [
|
|
111
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(MiniSidebar, { light: isLight }),
|
|
112
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(MiniContent, { light: isLight })
|
|
113
|
+
] }) });
|
|
114
|
+
}
|
|
115
|
+
function MiniSidebar({ light }) {
|
|
116
|
+
const bg = light ? "bg-white" : "bg-neutral-800";
|
|
117
|
+
const line = light ? "bg-neutral-200" : "bg-neutral-700";
|
|
118
|
+
const accent = light ? "bg-neutral-300" : "bg-neutral-600";
|
|
119
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: cn("flex w-[28%] flex-col gap-1.5 p-1.5", bg), children: [
|
|
120
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: cn("h-1.5 w-4 rounded-sm", accent) }),
|
|
121
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: cn("mt-1 h-0.5 w-full rounded-sm", line) }),
|
|
122
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: cn("h-0.5 w-3/4 rounded-sm", line) }),
|
|
123
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: cn("h-0.5 w-5/6 rounded-sm", line) }),
|
|
124
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: cn("mt-auto h-0.5 w-2/3 rounded-sm", line) })
|
|
125
|
+
] });
|
|
126
|
+
}
|
|
127
|
+
function MiniContent({ light }) {
|
|
128
|
+
const bg = light ? "bg-neutral-50" : "bg-neutral-950";
|
|
129
|
+
const msgUser = light ? "bg-neutral-200" : "bg-neutral-700";
|
|
130
|
+
const msgBot = light ? "bg-neutral-100" : "bg-neutral-800";
|
|
131
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: cn("flex flex-1 flex-col gap-1.5 p-1.5", bg), children: [
|
|
132
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: cn("h-2 w-full rounded-sm", msgBot) }),
|
|
133
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: cn("ml-auto h-2 w-2/3 rounded-sm", msgUser) }),
|
|
134
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: cn("h-2 w-5/6 rounded-sm", msgBot) }),
|
|
135
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: cn("ml-auto h-2 w-1/2 rounded-sm", msgUser) }),
|
|
136
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: cn("mt-auto h-1.5 w-full rounded-sm", light ? "bg-white" : "bg-neutral-800") })
|
|
137
|
+
] });
|
|
138
|
+
}
|
|
139
|
+
function AppearanceSettings() {
|
|
140
|
+
const { theme, setTheme } = useTheme();
|
|
141
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-1.5", children: [
|
|
142
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("label", { className: "text-sm font-medium text-foreground", children: "Theme" }),
|
|
143
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-muted-foreground", children: "Choose how Hermium looks for you." }),
|
|
144
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "grid grid-cols-3 gap-3 pt-1", children: [
|
|
145
|
+
{ id: "light", label: "Light" },
|
|
146
|
+
{ id: "dark", label: "Dark" },
|
|
147
|
+
{ id: "system", label: "System" }
|
|
148
|
+
].map((t) => {
|
|
149
|
+
const isActive = t.id === theme;
|
|
150
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
151
|
+
"button",
|
|
152
|
+
{
|
|
153
|
+
onClick: () => setTheme(t.id),
|
|
154
|
+
className: cn(
|
|
155
|
+
"flex flex-col items-center gap-2 rounded-xl border p-2 text-xs font-medium transition-all",
|
|
156
|
+
isActive ? "border-[#2563eb] bg-primary/5 text-foreground ring-1 ring-[#2563eb]" : "border-border text-muted-foreground hover:border-foreground/20 hover:text-foreground"
|
|
157
|
+
),
|
|
158
|
+
children: [
|
|
159
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ThemePreview, { variant: t.id }),
|
|
160
|
+
t.label
|
|
161
|
+
]
|
|
162
|
+
},
|
|
163
|
+
t.id
|
|
164
|
+
);
|
|
165
|
+
}) })
|
|
166
|
+
] });
|
|
167
|
+
}
|
|
168
|
+
function cn(...classes) {
|
|
169
|
+
return classes.filter(Boolean).join(" ");
|
|
170
|
+
}
|
|
171
|
+
function SettingsPage({ section }) {
|
|
172
|
+
const currentSectionId = section && section in settingsMap ? section : "appearance";
|
|
173
|
+
const current = settingsMap[currentSectionId];
|
|
174
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1 overflow-y-auto", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mx-auto max-w-2xl px-8 py-8", children: [
|
|
175
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mb-6", children: [
|
|
176
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("h2", { className: "text-lg font-semibold text-foreground", children: current.title }),
|
|
177
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-muted-foreground mt-0.5", children: current.description })
|
|
178
|
+
] }),
|
|
179
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "rounded-xl border border-border bg-card p-6", children: current.content })
|
|
180
|
+
] }) });
|
|
181
|
+
}
|
|
182
|
+
function SettingsRoute() {
|
|
183
|
+
const {
|
|
184
|
+
section
|
|
185
|
+
} = Route$5.useSearch();
|
|
186
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(SettingsPage, { section });
|
|
187
|
+
}
|
|
188
|
+
export {
|
|
189
|
+
SettingsRoute as component
|
|
190
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as reactExports, j as jsxRuntimeExports } from "../_libs/react.mjs";
|
|
2
|
-
import { a as cn, g as get } from "./router-
|
|
3
|
-
import {
|
|
2
|
+
import { a as cn, g as get } from "./router-sbsNus0Y.mjs";
|
|
3
|
+
import { E as IconRefresh, p as IconChartBar } from "../_libs/tabler__icons-react.mjs";
|
|
4
4
|
import "../_libs/tanstack__react-router.mjs";
|
|
5
5
|
import "../_libs/tanstack__router-core.mjs";
|
|
6
6
|
import "../_libs/tanstack__history.mjs";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { r as reactExports, j as jsxRuntimeExports } from "../_libs/react.mjs";
|
|
2
2
|
import { u as useQueryClient, b as useMutation, a as useQuery } from "../_libs/tanstack__react-query.mjs";
|
|
3
|
-
import { B as Button, a as cn,
|
|
4
|
-
import { I as Input } from "./input-
|
|
5
|
-
import { T as Textarea } from "./textarea-
|
|
6
|
-
import {
|
|
3
|
+
import { B as Button, a as cn, j as patch, p as post, k as del, g as get } from "./router-sbsNus0Y.mjs";
|
|
4
|
+
import { I as Input } from "./input-CqXjTRQg.mjs";
|
|
5
|
+
import { T as Textarea } from "./textarea-DfRheWY0.mjs";
|
|
6
|
+
import { T as IconPlus, E as IconRefresh, U as IconClock, V as IconPower, s as IconPencil, v as IconTrash, W as IconPlayerPlay, X as IconCalendar, Y as IconChevronRight, C as IconLoader2 } from "../_libs/tabler__icons-react.mjs";
|
|
7
7
|
import "../_libs/tanstack__query-core.mjs";
|
|
8
8
|
import "../_libs/tanstack__react-router.mjs";
|
|
9
9
|
import "../_libs/tanstack__router-core.mjs";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { r as reactExports, j as jsxRuntimeExports } from "../_libs/react.mjs";
|
|
2
|
-
import { S as Switch } from "./switch-
|
|
3
|
-
import { I as Input } from "./input-
|
|
2
|
+
import { S as Switch } from "./switch-usf2F1UM.mjs";
|
|
3
|
+
import { I as Input } from "./input-CqXjTRQg.mjs";
|
|
4
4
|
import { u as useQueryClient, a as useQuery, b as useMutation } from "../_libs/tanstack__react-query.mjs";
|
|
5
|
-
import { a as cn,
|
|
6
|
-
import {
|
|
5
|
+
import { a as cn, i as put, g as get } from "./router-sbsNus0Y.mjs";
|
|
6
|
+
import { C as IconLoader2, P as IconSparkles, Q as IconPlugConnected, R as IconAlertTriangle, S as IconPlug, j as IconChevronDown, O as IconCheck } from "../_libs/tabler__icons-react.mjs";
|
|
7
7
|
import "../_libs/base-ui__react.mjs";
|
|
8
8
|
import "../_libs/base-ui__utils.mjs";
|
|
9
9
|
import "../_libs/use-sync-external-store.mjs";
|
|
@@ -365,7 +365,7 @@ function getResponse() {
|
|
|
365
365
|
}
|
|
366
366
|
var HEADERS = { TSS_SHELL: "X-TSS_SHELL" };
|
|
367
367
|
async function getStartManifest(matchedRoutes) {
|
|
368
|
-
const { tsrStartManifest } = await import("../_tanstack-start-manifest_v-
|
|
368
|
+
const { tsrStartManifest } = await import("../_tanstack-start-manifest_v-DqW-pKEH.mjs");
|
|
369
369
|
const startManifest = tsrStartManifest();
|
|
370
370
|
const rootRoute = startManifest.routes[rootRouteId] = startManifest.routes[rootRouteId] || {};
|
|
371
371
|
rootRoute.assets = rootRoute.assets || [];
|
|
@@ -1194,7 +1194,7 @@ var baseManifestPromise;
|
|
|
1194
1194
|
var cachedFinalManifestPromise;
|
|
1195
1195
|
async function loadEntries() {
|
|
1196
1196
|
const [routerEntry, startEntry, pluginAdapters] = await Promise.all([
|
|
1197
|
-
import("./router-
|
|
1197
|
+
import("./router-sbsNus0Y.mjs").then((n) => n.q),
|
|
1198
1198
|
import("./start-HYkvq4Ni.mjs"),
|
|
1199
1199
|
import("../__23tanstack-start-plugin-adapters-Cwee5PKy.mjs")
|
|
1200
1200
|
]);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { j as jsxRuntimeExports } from "../_libs/react.mjs";
|
|
2
|
-
import { a as cn } from "./router-
|
|
2
|
+
import { a as cn } from "./router-sbsNus0Y.mjs";
|
|
3
3
|
import { I as Input$1 } from "../_libs/base-ui__react.mjs";
|
|
4
4
|
function Input({ className, type, ...props }) {
|
|
5
5
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|