hermium 0.1.9 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +56 -0
- package/bin/hermium.mjs +185 -164
- package/dist/api.mjs +3513 -0
- package/dist/public/assets/css/index-Dfs9RUU9.css +1 -0
- package/dist/public/assets/css/styles-B8p6jk5Z.css +1 -0
- package/dist/public/assets/js/ChatInputBlock-Bw7AL70H.js +1 -0
- package/dist/public/assets/js/MarkdownMessage-8d7Y6VL-.js +1 -0
- package/dist/public/assets/js/base-ui-BvQbAt_1.js +1 -0
- package/dist/public/assets/js/chat._sessionId-BG6lVraH.js +1 -0
- package/dist/public/assets/js/chat.index-D2zdMPTT.js +1 -0
- package/dist/public/assets/js/index-C0AK45FU.js +60 -0
- package/dist/public/assets/js/index-Cx5En4FK.js +1 -0
- package/dist/public/assets/js/memory-CeSRdTkW.js +3 -0
- package/dist/public/assets/js/router-8uDKazL-.js +1 -0
- package/dist/public/assets/js/settings-Bc3Y5zXO.js +1 -0
- package/dist/public/assets/js/skills-DZv7sA_5.js +1 -0
- package/dist/public/assets/js/theme-CPkdkpaj.js +1 -0
- package/dist/public/assets/js/usage-DXQsT9_b.js +1 -0
- package/dist/public/assets/woff2/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2 +0 -0
- package/dist/public/assets/woff2/geist-cyrillic-wght-normal-BEAKL7Jp.woff2 +0 -0
- package/dist/public/assets/woff2/geist-latin-ext-wght-normal-DC-KSUi6.woff2 +0 -0
- package/dist/public/assets/woff2/geist-latin-wght-normal-BgDaEnEv.woff2 +0 -0
- package/dist/public/assets/woff2/geist-vietnamese-wght-normal-6IgcOCM7.woff2 +0 -0
- package/dist/public/favicon.ico +0 -0
- package/dist/public/logo.png +0 -0
- package/package.json +1 -1
- package/dist/public/assets/IconAlertCircle-BHkmI3j7.js +0 -1
- package/dist/public/assets/IconAlertTriangle-wCJudlVg.js +0 -1
- package/dist/public/assets/IconCheck-CFuEh_p7.js +0 -1
- package/dist/public/assets/IconLoader2-BIx3OuF9.js +0 -1
- package/dist/public/assets/IconRefresh-Dgm93w3T.js +0 -1
- package/dist/public/assets/geist-cyrillic-wght-normal-CHSlOQsW.woff2 +0 -0
- package/dist/public/assets/geist-latin-ext-wght-normal-DMtmJ5ZE.woff2 +0 -0
- package/dist/public/assets/geist-latin-wght-normal-Dm3htQBi.woff2 +0 -0
- package/dist/public/assets/index-Bbz3abmO.js +0 -14
- package/dist/public/assets/index-CWUaRwcE.js +0 -1
- package/dist/public/assets/index-CinLq3cd.js +0 -1
- package/dist/public/assets/index-CrQs9n6q.js +0 -29
- package/dist/public/assets/index-CtacpN3I.js +0 -1
- package/dist/public/assets/index-DY7aE-9s.js +0 -2
- package/dist/public/assets/index-DkYGodJj.js +0 -94
- package/dist/public/assets/index-DvDLadUx.js +0 -1
- package/dist/public/assets/index-U6RcWedt.js +0 -1
- package/dist/public/assets/index-_6iFZ0fh.js +0 -1
- package/dist/public/assets/index-enFS26SU.js +0 -1
- package/dist/public/assets/input-eNcwlDHp.js +0 -1
- package/dist/public/assets/inter-cyrillic-ext-wght-normal-BOeWTOD4.woff2 +0 -0
- package/dist/public/assets/inter-cyrillic-wght-normal-DqGufNeO.woff2 +0 -0
- package/dist/public/assets/inter-greek-ext-wght-normal-DlzME5K_.woff2 +0 -0
- package/dist/public/assets/inter-greek-wght-normal-CkhJZR-_.woff2 +0 -0
- package/dist/public/assets/inter-latin-ext-wght-normal-DO1Apj_S.woff2 +0 -0
- package/dist/public/assets/inter-latin-wght-normal-Dx4kXJAl.woff2 +0 -0
- package/dist/public/assets/inter-vietnamese-wght-normal-CBcvBZtf.woff2 +0 -0
- package/dist/public/assets/queries-iHRgZzw2.js +0 -1
- package/dist/public/assets/styles-KcflDlA_.css +0 -1
- package/dist/public/assets/switch-B1DcZLwL.js +0 -1
- package/dist/public/assets/syntax-highlighter-DWPF-A_h.js +0 -6
- package/dist/public/assets/textarea-Di_syYTS.js +0 -1
- package/dist/public/favicon.png +0 -0
- package/dist/public/nous-logo.png +0 -0
- package/dist/server/index.mjs +0 -244
- package/dist/web-server/__23tanstack-start-plugin-adapters-Cwee5PKy.mjs +0 -6
- package/dist/web-server/_chunks/ssr-renderer.mjs +0 -22
- package/dist/web-server/_libs/babel__runtime.mjs +0 -237
- package/dist/web-server/_libs/bail.mjs +0 -8
- package/dist/web-server/_libs/base-ui__react.mjs +0 -9554
- package/dist/web-server/_libs/base-ui__utils.mjs +0 -1101
- package/dist/web-server/_libs/ccount.mjs +0 -16
- package/dist/web-server/_libs/character-entities-legacy.mjs +0 -111
- package/dist/web-server/_libs/character-entities.mjs +0 -2130
- package/dist/web-server/_libs/character-reference-invalid.mjs +0 -33
- package/dist/web-server/_libs/class-variance-authority.mjs +0 -44
- package/dist/web-server/_libs/clsx.mjs +0 -16
- package/dist/web-server/_libs/comma-separated-tokens.mjs +0 -31
- package/dist/web-server/_libs/cookie-es.mjs +0 -44
- package/dist/web-server/_libs/croner.mjs +0 -1
- package/dist/web-server/_libs/crossws.mjs +0 -1
- package/dist/web-server/_libs/decode-named-character-reference+[...].mjs +0 -8
- package/dist/web-server/_libs/devlop.mjs +0 -8
- package/dist/web-server/_libs/escape-string-regexp.mjs +0 -9
- package/dist/web-server/_libs/estree-util-is-identifier-name.mjs +0 -11
- package/dist/web-server/_libs/extend.mjs +0 -97
- package/dist/web-server/_libs/fault.mjs +0 -1
- package/dist/web-server/_libs/floating-ui__core.mjs +0 -663
- package/dist/web-server/_libs/floating-ui__dom.mjs +0 -624
- package/dist/web-server/_libs/floating-ui__react-dom.mjs +0 -279
- package/dist/web-server/_libs/floating-ui__utils.mjs +0 -322
- package/dist/web-server/_libs/format.mjs +0 -1
- package/dist/web-server/_libs/h3.mjs +0 -408
- package/dist/web-server/_libs/hast-util-parse-selector.mjs +0 -39
- package/dist/web-server/_libs/hast-util-to-jsx-runtime.mjs +0 -388
- package/dist/web-server/_libs/hast-util-whitespace.mjs +0 -10
- package/dist/web-server/_libs/hastscript.mjs +0 -200
- package/dist/web-server/_libs/highlight.js.mjs +0 -1
- package/dist/web-server/_libs/hookable.mjs +0 -1
- package/dist/web-server/_libs/html-url-attributes.mjs +0 -26
- package/dist/web-server/_libs/inline-style-parser.mjs +0 -142
- package/dist/web-server/_libs/is-alphabetical.mjs +0 -7
- package/dist/web-server/_libs/is-alphanumerical.mjs +0 -8
- package/dist/web-server/_libs/is-decimal.mjs +0 -7
- package/dist/web-server/_libs/is-hexadecimal.mjs +0 -7
- package/dist/web-server/_libs/is-plain-obj.mjs +0 -10
- package/dist/web-server/_libs/isbot.mjs +0 -21
- package/dist/web-server/_libs/longest-streak.mjs +0 -25
- package/dist/web-server/_libs/lowlight.mjs +0 -1
- package/dist/web-server/_libs/markdown-table.mjs +0 -142
- package/dist/web-server/_libs/mdast-util-find-and-replace.mjs +0 -109
- package/dist/web-server/_libs/mdast-util-from-markdown.mjs +0 -717
- package/dist/web-server/_libs/mdast-util-gfm-autolink-literal+[...].mjs +0 -156
- package/dist/web-server/_libs/mdast-util-gfm-footnote.mjs +0 -117
- package/dist/web-server/_libs/mdast-util-gfm-strikethrough.mjs +0 -54
- package/dist/web-server/_libs/mdast-util-gfm-table.mjs +0 -157
- package/dist/web-server/_libs/mdast-util-gfm-task-list-item.mjs +0 -77
- package/dist/web-server/_libs/mdast-util-gfm.mjs +0 -29
- package/dist/web-server/_libs/mdast-util-phrasing.mjs +0 -30
- package/dist/web-server/_libs/mdast-util-to-hast.mjs +0 -710
- package/dist/web-server/_libs/mdast-util-to-markdown.mjs +0 -798
- package/dist/web-server/_libs/mdast-util-to-string.mjs +0 -38
- package/dist/web-server/_libs/micromark-core-commonmark.mjs +0 -2259
- package/dist/web-server/_libs/micromark-extension-gfm-autolink-literal+[...].mjs +0 -344
- package/dist/web-server/_libs/micromark-extension-gfm-footnote+[...].mjs +0 -279
- package/dist/web-server/_libs/micromark-extension-gfm-strikethrough+[...].mjs +0 -98
- package/dist/web-server/_libs/micromark-extension-gfm-table.mjs +0 -491
- package/dist/web-server/_libs/micromark-extension-gfm-tagfilter+[...].mjs +0 -1
- package/dist/web-server/_libs/micromark-extension-gfm-task-list-item+[...].mjs +0 -77
- package/dist/web-server/_libs/micromark-extension-gfm.mjs +0 -18
- package/dist/web-server/_libs/micromark-factory-destination.mjs +0 -94
- package/dist/web-server/_libs/micromark-factory-label.mjs +0 -63
- package/dist/web-server/_libs/micromark-factory-space.mjs +0 -24
- package/dist/web-server/_libs/micromark-factory-title.mjs +0 -65
- package/dist/web-server/_libs/micromark-factory-whitespace.mjs +0 -22
- package/dist/web-server/_libs/micromark-util-character.mjs +0 -44
- package/dist/web-server/_libs/micromark-util-chunked.mjs +0 -36
- package/dist/web-server/_libs/micromark-util-classify-character+[...].mjs +0 -12
- package/dist/web-server/_libs/micromark-util-combine-extensions+[...].mjs +0 -41
- package/dist/web-server/_libs/micromark-util-decode-numeric-character-reference+[...].mjs +0 -19
- package/dist/web-server/_libs/micromark-util-decode-string.mjs +0 -21
- package/dist/web-server/_libs/micromark-util-encode.mjs +0 -1
- package/dist/web-server/_libs/micromark-util-html-tag-name.mjs +0 -69
- package/dist/web-server/_libs/micromark-util-normalize-identifier+[...].mjs +0 -6
- package/dist/web-server/_libs/micromark-util-resolve-all.mjs +0 -15
- package/dist/web-server/_libs/micromark-util-sanitize-uri.mjs +0 -41
- package/dist/web-server/_libs/micromark-util-subtokenize.mjs +0 -346
- package/dist/web-server/_libs/micromark.mjs +0 -906
- package/dist/web-server/_libs/ocache.mjs +0 -1
- package/dist/web-server/_libs/ohash.mjs +0 -1
- package/dist/web-server/_libs/parse-entities.mjs +0 -245
- package/dist/web-server/_libs/property-information.mjs +0 -1210
- package/dist/web-server/_libs/react-dom.mjs +0 -10779
- package/dist/web-server/_libs/react-markdown.mjs +0 -147
- package/dist/web-server/_libs/react-syntax-highlighter.mjs +0 -941
- package/dist/web-server/_libs/react.mjs +0 -513
- package/dist/web-server/_libs/refractor.mjs +0 -2425
- package/dist/web-server/_libs/remark-gfm.mjs +0 -20
- package/dist/web-server/_libs/remark-parse.mjs +0 -19
- package/dist/web-server/_libs/remark-rehype.mjs +0 -21
- package/dist/web-server/_libs/reselect.mjs +0 -1
- package/dist/web-server/_libs/rou3.mjs +0 -8
- package/dist/web-server/_libs/seroval-plugins.mjs +0 -58
- package/dist/web-server/_libs/seroval.mjs +0 -1775
- package/dist/web-server/_libs/space-separated-tokens.mjs +0 -11
- package/dist/web-server/_libs/srvx.mjs +0 -781
- package/dist/web-server/_libs/style-to-js.mjs +0 -72
- package/dist/web-server/_libs/style-to-object.mjs +0 -38
- package/dist/web-server/_libs/tabler__icons-react.mjs +0 -230
- package/dist/web-server/_libs/tanstack__history.mjs +0 -204
- package/dist/web-server/_libs/tanstack__query-core.mjs +0 -2552
- package/dist/web-server/_libs/tanstack__react-query.mjs +0 -190
- package/dist/web-server/_libs/tanstack__react-router.mjs +0 -1120
- package/dist/web-server/_libs/tanstack__react-store.mjs +0 -2
- package/dist/web-server/_libs/tanstack__router-core.mjs +0 -4288
- package/dist/web-server/_libs/tanstack__store.mjs +0 -1
- package/dist/web-server/_libs/trim-lines.mjs +0 -41
- package/dist/web-server/_libs/trough.mjs +0 -85
- package/dist/web-server/_libs/ufo.mjs +0 -54
- package/dist/web-server/_libs/unctx.mjs +0 -1
- package/dist/web-server/_libs/ungap__structured-clone.mjs +0 -224
- package/dist/web-server/_libs/unified.mjs +0 -661
- package/dist/web-server/_libs/unist-util-is.mjs +0 -100
- package/dist/web-server/_libs/unist-util-position.mjs +0 -27
- package/dist/web-server/_libs/unist-util-stringify-position.mjs +0 -27
- package/dist/web-server/_libs/unist-util-visit-parents.mjs +0 -83
- package/dist/web-server/_libs/unist-util-visit.mjs +0 -24
- package/dist/web-server/_libs/unstorage.mjs +0 -1
- package/dist/web-server/_libs/use-sync-external-store.mjs +0 -139
- package/dist/web-server/_libs/vfile-message.mjs +0 -138
- package/dist/web-server/_libs/vfile.mjs +0 -467
- package/dist/web-server/_libs/zod.mjs +0 -3915
- package/dist/web-server/_libs/zustand.mjs +0 -343
- package/dist/web-server/_libs/zwitch.mjs +0 -1
- package/dist/web-server/_ssr/index-0n2Z3BPQ.mjs +0 -369
- package/dist/web-server/_ssr/index-6itDALOw.mjs +0 -339
- package/dist/web-server/_ssr/index-BIRTrOmp.mjs +0 -449
- package/dist/web-server/_ssr/index-BPzfADac.mjs +0 -66
- package/dist/web-server/_ssr/index-BQE3bF14.mjs +0 -1870
- package/dist/web-server/_ssr/index-C5HpvlUP.mjs +0 -190
- package/dist/web-server/_ssr/index-C_ZxnypN.mjs +0 -213
- package/dist/web-server/_ssr/index-Ca8JFH8f.mjs +0 -612
- package/dist/web-server/_ssr/index-DNVESZiA.mjs +0 -513
- package/dist/web-server/_ssr/index.mjs +0 -1558
- package/dist/web-server/_ssr/input-CqXjTRQg.mjs +0 -20
- package/dist/web-server/_ssr/queries-3H_19mUt.mjs +0 -16
- package/dist/web-server/_ssr/router-sbsNus0Y.mjs +0 -2093
- package/dist/web-server/_ssr/start-HYkvq4Ni.mjs +0 -4
- package/dist/web-server/_ssr/switch-usf2F1UM.mjs +0 -33
- package/dist/web-server/_ssr/syntax-highlighter-5vezNTce.mjs +0 -62
- package/dist/web-server/_ssr/textarea-DfRheWY0.mjs +0 -18
- package/dist/web-server/_tanstack-start-manifest_v-DqW-pKEH.mjs +0 -4
- package/dist/web-server/index.mjs +0 -597
|
@@ -1,190 +0,0 @@
|
|
|
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,213 +0,0 @@
|
|
|
1
|
-
import { r as reactExports, j as jsxRuntimeExports } from "../_libs/react.mjs";
|
|
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
|
-
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
|
-
function fetchUsage(days = 30) {
|
|
32
|
-
return get(`/api/hermes/insights?days=${days}`);
|
|
33
|
-
}
|
|
34
|
-
const PERIODS = [
|
|
35
|
-
{ label: "7d", days: 7 },
|
|
36
|
-
{ label: "30d", days: 30 },
|
|
37
|
-
{ label: "90d", days: 90 }
|
|
38
|
-
];
|
|
39
|
-
function fmt(n) {
|
|
40
|
-
if (n >= 1e6) return `${(n / 1e6).toFixed(1)}M`;
|
|
41
|
-
if (n >= 1e3) return `${(n / 1e3).toFixed(1)}K`;
|
|
42
|
-
return String(n);
|
|
43
|
-
}
|
|
44
|
-
function fmtCost(n) {
|
|
45
|
-
if (n >= 1) return `$${n.toFixed(2)}`;
|
|
46
|
-
if (n >= 0.01) return `$${n.toFixed(4)}`;
|
|
47
|
-
return n > 0 ? `$${n.toFixed(6)}` : "$0.00";
|
|
48
|
-
}
|
|
49
|
-
function fmtPct(n) {
|
|
50
|
-
return `${(n * 100).toFixed(1)}%`;
|
|
51
|
-
}
|
|
52
|
-
function fmtDate(day) {
|
|
53
|
-
try {
|
|
54
|
-
const d = /* @__PURE__ */ new Date(day + "T00:00:00");
|
|
55
|
-
return d.toLocaleDateString(void 0, { month: "short", day: "numeric" });
|
|
56
|
-
} catch {
|
|
57
|
-
return day;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
function StatCard({
|
|
61
|
-
label,
|
|
62
|
-
value,
|
|
63
|
-
sub
|
|
64
|
-
}) {
|
|
65
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "rounded-xl border border-border bg-card p-4 flex flex-col gap-1", children: [
|
|
66
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs text-muted-foreground/70", children: label }),
|
|
67
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xl font-semibold text-foreground tracking-tight", children: value }),
|
|
68
|
-
sub && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs text-muted-foreground/50", children: sub })
|
|
69
|
-
] });
|
|
70
|
-
}
|
|
71
|
-
function ModelBreakdown({ models }) {
|
|
72
|
-
if (models.length === 0) return null;
|
|
73
|
-
const total = models.reduce((s, m) => s + m.sessions, 0);
|
|
74
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "rounded-xl border border-border bg-card p-4", children: [
|
|
75
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: "text-sm font-medium text-foreground mb-3", children: "Model Breakdown" }),
|
|
76
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "space-y-2.5", children: models.map((m) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center gap-3", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
77
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between mb-1", children: [
|
|
78
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-sm text-foreground truncate", children: m.model }),
|
|
79
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-sm text-muted-foreground tabular-nums ml-3", children: m.sessions })
|
|
80
|
-
] }),
|
|
81
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "h-1.5 rounded-full bg-muted overflow-hidden", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
82
|
-
"div",
|
|
83
|
-
{
|
|
84
|
-
className: "h-full rounded-full bg-primary/50 transition-all",
|
|
85
|
-
style: { width: `${total > 0 ? m.sessions / total * 100 : 0}%` }
|
|
86
|
-
}
|
|
87
|
-
) })
|
|
88
|
-
] }) }, m.model)) })
|
|
89
|
-
] });
|
|
90
|
-
}
|
|
91
|
-
function DailyTable({ daily }) {
|
|
92
|
-
if (daily.length === 0) return null;
|
|
93
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "rounded-xl border border-border bg-card", children: [
|
|
94
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2 px-4 pt-4 pb-3", children: [
|
|
95
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(IconChartBar, { className: "size-4 text-muted-foreground" }),
|
|
96
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: "text-sm font-medium text-foreground", children: "Daily Usage (Last 30 Days)" })
|
|
97
|
-
] }),
|
|
98
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "overflow-x-auto", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("table", { className: "w-full text-xs", children: [
|
|
99
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("thead", { children: /* @__PURE__ */ jsxRuntimeExports.jsxs("tr", { className: "border-t border-border text-muted-foreground/60", children: [
|
|
100
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("th", { className: "text-left px-4 py-2 font-medium", children: "Date" }),
|
|
101
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("th", { className: "text-right px-2 py-2 font-medium", children: "Input" }),
|
|
102
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("th", { className: "text-right px-2 py-2 font-medium", children: "Output" }),
|
|
103
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("th", { className: "text-right px-2 py-2 font-medium", children: "Cache Hit Rate" }),
|
|
104
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("th", { className: "text-right px-2 py-2 font-medium", children: "Sessions" })
|
|
105
|
-
] }) }),
|
|
106
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("tbody", { children: daily.map((d) => /* @__PURE__ */ jsxRuntimeExports.jsxs("tr", { className: "border-t border-border/50 hover:bg-muted/30 transition-colors", children: [
|
|
107
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("td", { className: "px-4 py-2.5 text-foreground font-medium whitespace-nowrap", children: fmtDate(d.date) }),
|
|
108
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("td", { className: "px-2 py-2.5 text-right text-muted-foreground tabular-nums", children: d.input_tokens > 0 ? fmt(d.input_tokens) : "—" }),
|
|
109
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("td", { className: "px-2 py-2.5 text-right text-muted-foreground tabular-nums", children: d.output_tokens > 0 ? fmt(d.output_tokens) : "—" }),
|
|
110
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
111
|
-
"td",
|
|
112
|
-
{
|
|
113
|
-
className: "px-2 py-2.5 text-right tabular-nums",
|
|
114
|
-
style: { color: d.cache_hit_rate > 0.8 ? "#22c55e" : d.cache_hit_rate > 0.5 ? "#eab308" : "inherit" },
|
|
115
|
-
children: d.cache_hit_rate > 0 ? fmtPct(d.cache_hit_rate) : "—"
|
|
116
|
-
}
|
|
117
|
-
),
|
|
118
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("td", { className: "px-2 py-2.5 text-right text-muted-foreground tabular-nums", children: d.sessions })
|
|
119
|
-
] }, d.date)) })
|
|
120
|
-
] }) })
|
|
121
|
-
] });
|
|
122
|
-
}
|
|
123
|
-
function UsagePage() {
|
|
124
|
-
const [days, setDays] = reactExports.useState(30);
|
|
125
|
-
const [data, setData] = reactExports.useState(null);
|
|
126
|
-
const [loading, setLoading] = reactExports.useState(true);
|
|
127
|
-
const [error, setError] = reactExports.useState(null);
|
|
128
|
-
const load = reactExports.useCallback(() => {
|
|
129
|
-
setLoading(true);
|
|
130
|
-
setError(null);
|
|
131
|
-
fetchUsage(days).then(setData).catch((err) => setError(err instanceof Error ? err.message : "Failed to load")).finally(() => setLoading(false));
|
|
132
|
-
}, [days]);
|
|
133
|
-
reactExports.useEffect(() => {
|
|
134
|
-
load();
|
|
135
|
-
}, [load]);
|
|
136
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1 min-w-0 overflow-y-auto", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mx-auto max-w-3xl px-6 py-6 flex flex-col gap-5", children: [
|
|
137
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
138
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("h1", { className: "text-lg font-semibold text-foreground", children: "Usage" }),
|
|
139
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
140
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center gap-0.5 rounded-lg border border-border p-0.5", children: PERIODS.map((p) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
141
|
-
"button",
|
|
142
|
-
{
|
|
143
|
-
onClick: () => setDays(p.days),
|
|
144
|
-
className: cn(
|
|
145
|
-
"rounded-md px-2.5 py-1 text-xs font-medium transition-colors",
|
|
146
|
-
days === p.days ? "bg-muted text-foreground" : "text-muted-foreground hover:text-foreground"
|
|
147
|
-
),
|
|
148
|
-
children: p.label
|
|
149
|
-
},
|
|
150
|
-
p.label
|
|
151
|
-
)) }),
|
|
152
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
153
|
-
"button",
|
|
154
|
-
{
|
|
155
|
-
onClick: load,
|
|
156
|
-
disabled: loading,
|
|
157
|
-
className: "flex items-center justify-center rounded-md size-7 text-muted-foreground hover:text-foreground hover:bg-muted transition-colors disabled:opacity-50",
|
|
158
|
-
"aria-label": "Refresh",
|
|
159
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(IconRefresh, { className: cn("size-3.5", loading && "animate-spin") })
|
|
160
|
-
}
|
|
161
|
-
)
|
|
162
|
-
] })
|
|
163
|
-
] }),
|
|
164
|
-
loading && !data && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center justify-center py-20", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "size-5 rounded-full border-2 border-muted-foreground/30 border-t-foreground animate-spin" }) }),
|
|
165
|
-
error && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "rounded-lg border border-destructive/30 bg-destructive/5 px-4 py-3", children: /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-destructive", children: error }) }),
|
|
166
|
-
data && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
167
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "grid grid-cols-2 sm:grid-cols-4 gap-3", children: [
|
|
168
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
169
|
-
StatCard,
|
|
170
|
-
{
|
|
171
|
-
label: "Total Tokens",
|
|
172
|
-
value: data.total_tokens > 0 ? fmt(data.total_tokens) : "—",
|
|
173
|
-
sub: data.total_tokens > 0 ? `${fmt(data.total_input_tokens)} Input / ${fmt(data.total_output_tokens)} Output` : void 0
|
|
174
|
-
}
|
|
175
|
-
),
|
|
176
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
177
|
-
StatCard,
|
|
178
|
-
{
|
|
179
|
-
label: "Total Sessions",
|
|
180
|
-
value: String(data.total_sessions),
|
|
181
|
-
sub: data.total_sessions > 0 ? `~${(data.total_sessions / days).toFixed(1)}/day avg` : void 0
|
|
182
|
-
}
|
|
183
|
-
),
|
|
184
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
185
|
-
StatCard,
|
|
186
|
-
{
|
|
187
|
-
label: "Est. Cost",
|
|
188
|
-
value: fmtCost(data.total_cost)
|
|
189
|
-
}
|
|
190
|
-
),
|
|
191
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
192
|
-
StatCard,
|
|
193
|
-
{
|
|
194
|
-
label: "Cache Hit Rate",
|
|
195
|
-
value: data.cache_hit_rate > 0 ? fmtPct(data.cache_hit_rate) : "—",
|
|
196
|
-
sub: data.total_cache_read > 0 ? `${fmt(data.total_cache_read)} Tokens` : void 0
|
|
197
|
-
}
|
|
198
|
-
)
|
|
199
|
-
] }),
|
|
200
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(ModelBreakdown, { models: data.models }),
|
|
201
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(DailyTable, { daily: data.daily_tokens }),
|
|
202
|
-
data.daily_tokens.length === 0 && data.models.length === 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col items-center py-20 text-muted-foreground", children: [
|
|
203
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(IconChartBar, { className: "size-8 mb-3 opacity-40" }),
|
|
204
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm font-medium", children: "No usage data available" }),
|
|
205
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs mt-1 text-muted-foreground/60", children: "Start a conversation to see usage stats." })
|
|
206
|
-
] })
|
|
207
|
-
] })
|
|
208
|
-
] }) });
|
|
209
|
-
}
|
|
210
|
-
const SplitComponent = UsagePage;
|
|
211
|
-
export {
|
|
212
|
-
SplitComponent as component
|
|
213
|
-
};
|