hermium 0.1.10 → 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-BW147gsG.js +0 -1
- package/dist/public/assets/IconAlertTriangle-DCoTLVSd.js +0 -1
- package/dist/public/assets/IconCheck-DAO7Fpl9.js +0 -1
- package/dist/public/assets/IconCode-BqfTl5wU.js +0 -1
- package/dist/public/assets/IconLoader2-B_pehSXN.js +0 -1
- package/dist/public/assets/IconRefresh-BbMGoMV8.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-BL9a2Xg9.js +0 -1
- package/dist/public/assets/index-BSwXjgjr.js +0 -1
- package/dist/public/assets/index-BWl8tn18.js +0 -1
- package/dist/public/assets/index-CQh8SXb2.js +0 -94
- package/dist/public/assets/index-Cxd-kSUY.js +0 -1
- package/dist/public/assets/index-DA5SH--7.js +0 -2
- package/dist/public/assets/index-DCHbvtBS.js +0 -1
- package/dist/public/assets/index-DCYXJZEe.js +0 -1
- package/dist/public/assets/index-DFDfp0ca.js +0 -1
- package/dist/public/assets/index-GuAAqSCJ.js +0 -14
- package/dist/public/assets/index-WIDirTHx.js +0 -29
- package/dist/public/assets/index-X3XZcAzy.js +0 -1
- package/dist/public/assets/input-7TQEEJq6.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/models-BlUb1eaf.js +0 -1
- package/dist/public/assets/styles-PHtUFHUr.css +0 -1
- package/dist/public/assets/switch-B_iYUUM3.js +0 -1
- package/dist/public/assets/syntax-highlighter-DcBYfnEK.js +0 -6
- package/dist/public/assets/textarea-Dm4aaRqS.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 -233
- 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--Bo2_ipW.mjs +0 -277
- package/dist/web-server/_ssr/index-BEvygh5x.mjs +0 -612
- package/dist/web-server/_ssr/index-BFaKxYfN.mjs +0 -40
- package/dist/web-server/_ssr/index-BdrMzRTd.mjs +0 -513
- package/dist/web-server/_ssr/index-CoDfv1vI.mjs +0 -66
- package/dist/web-server/_ssr/index-Cwp8Gyl1.mjs +0 -1812
- package/dist/web-server/_ssr/index-DQsfKYjV.mjs +0 -449
- package/dist/web-server/_ssr/index-Dbs9k8Ea.mjs +0 -251
- package/dist/web-server/_ssr/index-Dk93oyZD.mjs +0 -213
- package/dist/web-server/_ssr/index-KNJ7huw_.mjs +0 -369
- package/dist/web-server/_ssr/index.mjs +0 -1558
- package/dist/web-server/_ssr/input-BV1DMASc.mjs +0 -20
- package/dist/web-server/_ssr/models-MzrvbL2i.mjs +0 -43
- package/dist/web-server/_ssr/router-CS6Zq3md.mjs +0 -2134
- package/dist/web-server/_ssr/start-HYkvq4Ni.mjs +0 -4
- package/dist/web-server/_ssr/switch-Bd-Sg0HG.mjs +0 -33
- package/dist/web-server/_ssr/syntax-highlighter-5vezNTce.mjs +0 -62
- package/dist/web-server/_ssr/textarea-CB4kQp9w.mjs +0 -18
- package/dist/web-server/_tanstack-start-manifest_v-m5lY48LR.mjs +0 -4
- package/dist/web-server/index.mjs +0 -611
|
@@ -1,369 +0,0 @@
|
|
|
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-CS6Zq3md.mjs";
|
|
3
|
-
import { f as IconBrain, K as IconUser, E as IconLoader2, F as IconAlertCircle, D as IconRefresh, a as IconX, L as IconCheck, s as IconPencil } from "../_libs/tabler__icons-react.mjs";
|
|
4
|
-
import { M as Markdown } from "../_libs/react-markdown.mjs";
|
|
5
|
-
import { r as remarkGfm } from "../_libs/remark-gfm.mjs";
|
|
6
|
-
import "../_libs/tanstack__react-router.mjs";
|
|
7
|
-
import "../_libs/tanstack__router-core.mjs";
|
|
8
|
-
import "../_libs/tanstack__history.mjs";
|
|
9
|
-
import "../_libs/cookie-es.mjs";
|
|
10
|
-
import "../_libs/seroval.mjs";
|
|
11
|
-
import "../_libs/seroval-plugins.mjs";
|
|
12
|
-
import "node:stream/web";
|
|
13
|
-
import "node:stream";
|
|
14
|
-
import "../_libs/react-dom.mjs";
|
|
15
|
-
import "util";
|
|
16
|
-
import "crypto";
|
|
17
|
-
import "async_hooks";
|
|
18
|
-
import "stream";
|
|
19
|
-
import "../_libs/isbot.mjs";
|
|
20
|
-
import "../_libs/tanstack__query-core.mjs";
|
|
21
|
-
import "../_libs/tanstack__react-query.mjs";
|
|
22
|
-
import "../_libs/clsx.mjs";
|
|
23
|
-
import "../_libs/class-variance-authority.mjs";
|
|
24
|
-
import "../_libs/zustand.mjs";
|
|
25
|
-
import "../_libs/base-ui__react.mjs";
|
|
26
|
-
import "../_libs/base-ui__utils.mjs";
|
|
27
|
-
import "../_libs/use-sync-external-store.mjs";
|
|
28
|
-
import "../_libs/floating-ui__utils.mjs";
|
|
29
|
-
import "../_libs/floating-ui__react-dom.mjs";
|
|
30
|
-
import "../_libs/floating-ui__dom.mjs";
|
|
31
|
-
import "../_libs/floating-ui__core.mjs";
|
|
32
|
-
import "../_libs/zod.mjs";
|
|
33
|
-
import "../_libs/devlop.mjs";
|
|
34
|
-
import "../_libs/unified.mjs";
|
|
35
|
-
import "../_libs/bail.mjs";
|
|
36
|
-
import "../_libs/extend.mjs";
|
|
37
|
-
import "../_libs/is-plain-obj.mjs";
|
|
38
|
-
import "../_libs/trough.mjs";
|
|
39
|
-
import "../_libs/vfile.mjs";
|
|
40
|
-
import "../_libs/vfile-message.mjs";
|
|
41
|
-
import "../_libs/unist-util-stringify-position.mjs";
|
|
42
|
-
import "node:process";
|
|
43
|
-
import "node:path";
|
|
44
|
-
import "node:url";
|
|
45
|
-
import "../_libs/remark-parse.mjs";
|
|
46
|
-
import "../_libs/mdast-util-from-markdown.mjs";
|
|
47
|
-
import "../_libs/micromark-util-decode-numeric-character-reference+[...].mjs";
|
|
48
|
-
import "../_libs/micromark-util-decode-string.mjs";
|
|
49
|
-
import "../_libs/decode-named-character-reference+[...].mjs";
|
|
50
|
-
import "../_libs/character-entities.mjs";
|
|
51
|
-
import "../_libs/micromark-util-normalize-identifier+[...].mjs";
|
|
52
|
-
import "../_libs/micromark.mjs";
|
|
53
|
-
import "../_libs/micromark-util-combine-extensions+[...].mjs";
|
|
54
|
-
import "../_libs/micromark-util-chunked.mjs";
|
|
55
|
-
import "../_libs/micromark-factory-space.mjs";
|
|
56
|
-
import "../_libs/micromark-util-character.mjs";
|
|
57
|
-
import "../_libs/micromark-core-commonmark.mjs";
|
|
58
|
-
import "../_libs/micromark-util-classify-character+[...].mjs";
|
|
59
|
-
import "../_libs/micromark-util-resolve-all.mjs";
|
|
60
|
-
import "../_libs/micromark-util-subtokenize.mjs";
|
|
61
|
-
import "../_libs/micromark-factory-destination.mjs";
|
|
62
|
-
import "../_libs/micromark-factory-label.mjs";
|
|
63
|
-
import "../_libs/micromark-factory-title.mjs";
|
|
64
|
-
import "../_libs/micromark-factory-whitespace.mjs";
|
|
65
|
-
import "../_libs/micromark-util-html-tag-name.mjs";
|
|
66
|
-
import "../_libs/mdast-util-to-string.mjs";
|
|
67
|
-
import "../_libs/remark-rehype.mjs";
|
|
68
|
-
import "../_libs/mdast-util-to-hast.mjs";
|
|
69
|
-
import "../_libs/ungap__structured-clone.mjs";
|
|
70
|
-
import "../_libs/micromark-util-sanitize-uri.mjs";
|
|
71
|
-
import "../_libs/unist-util-position.mjs";
|
|
72
|
-
import "../_libs/trim-lines.mjs";
|
|
73
|
-
import "../_libs/unist-util-visit.mjs";
|
|
74
|
-
import "../_libs/unist-util-visit-parents.mjs";
|
|
75
|
-
import "../_libs/unist-util-is.mjs";
|
|
76
|
-
import "../_libs/hast-util-to-jsx-runtime.mjs";
|
|
77
|
-
import "../_libs/comma-separated-tokens.mjs";
|
|
78
|
-
import "../_libs/property-information.mjs";
|
|
79
|
-
import "../_libs/space-separated-tokens.mjs";
|
|
80
|
-
import "../_libs/style-to-js.mjs";
|
|
81
|
-
import "../_libs/style-to-object.mjs";
|
|
82
|
-
import "../_libs/inline-style-parser.mjs";
|
|
83
|
-
import "../_libs/hast-util-whitespace.mjs";
|
|
84
|
-
import "../_libs/estree-util-is-identifier-name.mjs";
|
|
85
|
-
import "../_libs/html-url-attributes.mjs";
|
|
86
|
-
import "../_libs/micromark-extension-gfm.mjs";
|
|
87
|
-
import "../_libs/micromark-extension-gfm-autolink-literal+[...].mjs";
|
|
88
|
-
import "../_libs/micromark-extension-gfm-footnote+[...].mjs";
|
|
89
|
-
import "../_libs/micromark-extension-gfm-strikethrough+[...].mjs";
|
|
90
|
-
import "../_libs/micromark-extension-gfm-table.mjs";
|
|
91
|
-
import "../_libs/micromark-extension-gfm-task-list-item+[...].mjs";
|
|
92
|
-
import "../_libs/mdast-util-gfm.mjs";
|
|
93
|
-
import "../_libs/mdast-util-gfm-autolink-literal+[...].mjs";
|
|
94
|
-
import "../_libs/ccount.mjs";
|
|
95
|
-
import "../_libs/mdast-util-find-and-replace.mjs";
|
|
96
|
-
import "../_libs/escape-string-regexp.mjs";
|
|
97
|
-
import "../_libs/mdast-util-gfm-footnote.mjs";
|
|
98
|
-
import "../_libs/mdast-util-gfm-strikethrough.mjs";
|
|
99
|
-
import "../_libs/mdast-util-gfm-table.mjs";
|
|
100
|
-
import "../_libs/markdown-table.mjs";
|
|
101
|
-
import "../_libs/mdast-util-to-markdown.mjs";
|
|
102
|
-
import "../_libs/longest-streak.mjs";
|
|
103
|
-
import "../_libs/mdast-util-phrasing.mjs";
|
|
104
|
-
import "../_libs/mdast-util-gfm-task-list-item.mjs";
|
|
105
|
-
async function fetchMemory() {
|
|
106
|
-
return get("/api/hermes/memory");
|
|
107
|
-
}
|
|
108
|
-
async function saveMemory(section, content) {
|
|
109
|
-
return post("/api/hermes/memory/write", { section, content });
|
|
110
|
-
}
|
|
111
|
-
const SECTIONS = [
|
|
112
|
-
{ key: "memory", label: "My Notes", icon: IconBrain, desc: "Personal notes & knowledge", emptyLabel: "No notes yet — click Edit to start writing." },
|
|
113
|
-
{ key: "user", label: "User Profile", icon: IconUser, desc: "About you & your context", emptyLabel: "No profile yet — click Edit to add details about yourself." }
|
|
114
|
-
];
|
|
115
|
-
const markdownComponents = {
|
|
116
|
-
a({ href, children }) {
|
|
117
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("a", { href, target: "_blank", rel: "noopener noreferrer", className: "text-blue-600 dark:text-blue-400 underline underline-offset-2 decoration-blue-400/30 hover:decoration-blue-600/60 transition-colors", children });
|
|
118
|
-
},
|
|
119
|
-
img({ src, alt }) {
|
|
120
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("img", { src, alt, className: "rounded-xl max-w-full my-4", loading: "lazy" });
|
|
121
|
-
}
|
|
122
|
-
};
|
|
123
|
-
function MemoryPage() {
|
|
124
|
-
const [data, setData] = reactExports.useState(null);
|
|
125
|
-
const [loading, setLoading] = reactExports.useState(true);
|
|
126
|
-
const [error, setError] = reactExports.useState(null);
|
|
127
|
-
const [activeSection, setActiveSection] = reactExports.useState("memory");
|
|
128
|
-
const [editing, setEditing] = reactExports.useState(false);
|
|
129
|
-
const [editContent, setEditContent] = reactExports.useState("");
|
|
130
|
-
const [saving, setSaving] = reactExports.useState(false);
|
|
131
|
-
const [saveError, setSaveError] = reactExports.useState(null);
|
|
132
|
-
const load = reactExports.useCallback(async () => {
|
|
133
|
-
setLoading(true);
|
|
134
|
-
setError(null);
|
|
135
|
-
try {
|
|
136
|
-
const result = await fetchMemory();
|
|
137
|
-
setData(result);
|
|
138
|
-
} catch (e) {
|
|
139
|
-
setError(e instanceof Error ? e.message : "Failed to load memory");
|
|
140
|
-
} finally {
|
|
141
|
-
setLoading(false);
|
|
142
|
-
}
|
|
143
|
-
}, []);
|
|
144
|
-
reactExports.useEffect(() => {
|
|
145
|
-
load();
|
|
146
|
-
}, [load]);
|
|
147
|
-
const activeContent = data ? activeSection === "memory" ? data.memory : data.user : "";
|
|
148
|
-
const activeMtime = data ? activeSection === "memory" ? data.memory_mtime : data.user_mtime : null;
|
|
149
|
-
const activeMeta = SECTIONS.find((s) => s.key === activeSection);
|
|
150
|
-
const handleEdit = () => {
|
|
151
|
-
setEditContent(activeContent);
|
|
152
|
-
setSaveError(null);
|
|
153
|
-
setEditing(true);
|
|
154
|
-
};
|
|
155
|
-
const handleCancel = () => {
|
|
156
|
-
setEditing(false);
|
|
157
|
-
setSaveError(null);
|
|
158
|
-
};
|
|
159
|
-
const handleSave = async () => {
|
|
160
|
-
setSaving(true);
|
|
161
|
-
setSaveError(null);
|
|
162
|
-
try {
|
|
163
|
-
await saveMemory(activeSection, editContent);
|
|
164
|
-
const updated = await fetchMemory();
|
|
165
|
-
setData(updated);
|
|
166
|
-
setEditing(false);
|
|
167
|
-
} catch (e) {
|
|
168
|
-
setSaveError(e instanceof Error ? e.message : "Failed to save");
|
|
169
|
-
} finally {
|
|
170
|
-
setSaving(false);
|
|
171
|
-
}
|
|
172
|
-
};
|
|
173
|
-
const switchSection = (section) => {
|
|
174
|
-
if (editing) {
|
|
175
|
-
if (!confirm("You have unsaved changes. Discard them?")) return;
|
|
176
|
-
setEditing(false);
|
|
177
|
-
}
|
|
178
|
-
setActiveSection(section);
|
|
179
|
-
setSaveError(null);
|
|
180
|
-
};
|
|
181
|
-
if (loading) {
|
|
182
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex flex-1 items-center justify-center", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col items-center gap-3 text-muted-foreground", children: [
|
|
183
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(IconLoader2, { className: "size-6 animate-spin" }),
|
|
184
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-sm", children: "Loading memory..." })
|
|
185
|
-
] }) });
|
|
186
|
-
}
|
|
187
|
-
if (error) {
|
|
188
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex flex-1 items-center justify-center", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col items-center gap-3 text-muted-foreground", children: [
|
|
189
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(IconAlertCircle, { className: "size-8 text-red-500" }),
|
|
190
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-sm", children: error }),
|
|
191
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
192
|
-
"button",
|
|
193
|
-
{
|
|
194
|
-
onClick: load,
|
|
195
|
-
className: "inline-flex items-center gap-1.5 rounded-lg px-3 py-1.5 text-xs font-medium bg-muted hover:bg-muted/80 transition-colors",
|
|
196
|
-
children: [
|
|
197
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(IconRefresh, { className: "size-3.5" }),
|
|
198
|
-
"Retry"
|
|
199
|
-
]
|
|
200
|
-
}
|
|
201
|
-
)
|
|
202
|
-
] }) });
|
|
203
|
-
}
|
|
204
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-1 overflow-hidden", children: [
|
|
205
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("aside", { className: "flex w-56 shrink-0 flex-col border-r border-border", children: [
|
|
206
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2.5 px-3 py-3.5", children: [
|
|
207
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(IconBrain, { className: "size-5 text-muted-foreground" }),
|
|
208
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-sm font-semibold text-foreground", children: "Memory" })
|
|
209
|
-
] }),
|
|
210
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("nav", { className: "flex-1 overflow-y-auto space-y-1 px-2 py-1", children: SECTIONS.map((s) => {
|
|
211
|
-
const Icon = s.icon;
|
|
212
|
-
const isActive = activeSection === s.key;
|
|
213
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
214
|
-
"button",
|
|
215
|
-
{
|
|
216
|
-
onClick: () => switchSection(s.key),
|
|
217
|
-
className: cn(
|
|
218
|
-
"flex w-full items-center gap-2.5 rounded-lg px-2.5 py-2.5 text-left transition-colors",
|
|
219
|
-
isActive ? "bg-muted text-foreground" : "text-muted-foreground hover:bg-muted hover:text-foreground"
|
|
220
|
-
),
|
|
221
|
-
children: [
|
|
222
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Icon, { className: cn("size-4 shrink-0", isActive ? "text-foreground" : "text-muted-foreground/60") }),
|
|
223
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "min-w-0", children: [
|
|
224
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "truncate text-sm font-medium", children: s.label }),
|
|
225
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "truncate text-[10px] text-muted-foreground/70", children: s.desc })
|
|
226
|
-
] })
|
|
227
|
-
]
|
|
228
|
-
},
|
|
229
|
-
s.key
|
|
230
|
-
);
|
|
231
|
-
}) })
|
|
232
|
-
] }),
|
|
233
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex flex-1 flex-col min-w-0 overflow-y-auto", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mx-auto w-full max-w-3xl px-8 py-8", children: [
|
|
234
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mb-6", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between gap-4", children: [
|
|
235
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
|
236
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("h2", { className: "text-lg font-semibold text-foreground", children: activeMeta.label }),
|
|
237
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-muted-foreground mt-0.5", children: activeMeta.desc }),
|
|
238
|
-
activeMtime && !editing && /* @__PURE__ */ jsxRuntimeExports.jsxs("p", { className: "text-[11px] text-muted-foreground/60 mt-1", children: [
|
|
239
|
-
"Last modified ",
|
|
240
|
-
new Date(activeMtime * 1e3).toLocaleString()
|
|
241
|
-
] })
|
|
242
|
-
] }),
|
|
243
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center gap-2 shrink-0", children: editing ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
244
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
245
|
-
"button",
|
|
246
|
-
{
|
|
247
|
-
onClick: handleCancel,
|
|
248
|
-
disabled: saving,
|
|
249
|
-
className: "inline-flex items-center gap-1.5 rounded-lg px-3 py-1.5 text-sm font-medium text-muted-foreground hover:text-foreground hover:bg-muted transition-colors",
|
|
250
|
-
children: [
|
|
251
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(IconX, { className: "size-4" }),
|
|
252
|
-
"Cancel"
|
|
253
|
-
]
|
|
254
|
-
}
|
|
255
|
-
),
|
|
256
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
257
|
-
"button",
|
|
258
|
-
{
|
|
259
|
-
onClick: handleSave,
|
|
260
|
-
disabled: saving,
|
|
261
|
-
className: cn(
|
|
262
|
-
"inline-flex items-center gap-1.5 rounded-lg px-4 py-1.5 text-sm font-medium transition-colors",
|
|
263
|
-
"bg-primary text-primary-foreground hover:bg-primary/90",
|
|
264
|
-
saving && "opacity-60 cursor-not-allowed"
|
|
265
|
-
),
|
|
266
|
-
children: [
|
|
267
|
-
saving ? /* @__PURE__ */ jsxRuntimeExports.jsx(IconLoader2, { className: "size-4 animate-spin" }) : /* @__PURE__ */ jsxRuntimeExports.jsx(IconCheck, { className: "size-4" }),
|
|
268
|
-
saving ? "Saving..." : "Save"
|
|
269
|
-
]
|
|
270
|
-
}
|
|
271
|
-
)
|
|
272
|
-
] }) : /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
273
|
-
"button",
|
|
274
|
-
{
|
|
275
|
-
onClick: handleEdit,
|
|
276
|
-
className: "inline-flex items-center gap-1.5 rounded-lg px-4 py-1.5 text-sm font-medium bg-muted text-muted-foreground hover:text-foreground hover:bg-muted/80 transition-colors",
|
|
277
|
-
children: [
|
|
278
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(IconPencil, { className: "size-4" }),
|
|
279
|
-
"Edit"
|
|
280
|
-
]
|
|
281
|
-
}
|
|
282
|
-
) })
|
|
283
|
-
] }) }),
|
|
284
|
-
saveError && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mb-6 rounded-lg border border-red-200 dark:border-red-800/40 bg-red-50 dark:bg-red-950/20 px-4 py-2.5", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("p", { className: "text-xs text-red-700 dark:text-red-300 flex items-center gap-1.5", children: [
|
|
285
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(IconAlertCircle, { className: "size-3.5 shrink-0" }),
|
|
286
|
-
saveError
|
|
287
|
-
] }) }),
|
|
288
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "rounded-xl border border-border bg-card p-8", children: editing ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-3", children: [
|
|
289
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
290
|
-
"textarea",
|
|
291
|
-
{
|
|
292
|
-
value: editContent,
|
|
293
|
-
onChange: (e) => setEditContent(e.target.value),
|
|
294
|
-
className: cn(
|
|
295
|
-
"w-full min-h-[420px] rounded-lg border border-border bg-background p-4 font-mono text-sm leading-relaxed",
|
|
296
|
-
"focus:outline-none focus:ring-2 focus:ring-primary/15 focus:border-primary/40",
|
|
297
|
-
"resize-y placeholder:text-muted-foreground/30"
|
|
298
|
-
),
|
|
299
|
-
placeholder: `Write your ${activeMeta.label.toLowerCase()} using Markdown...`,
|
|
300
|
-
spellCheck: false,
|
|
301
|
-
autoFocus: true
|
|
302
|
-
}
|
|
303
|
-
),
|
|
304
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-[11px] text-muted-foreground/50", children: "Markdown formatting is supported — headers, lists, code blocks, links, and more." })
|
|
305
|
-
] }) : activeContent ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
306
|
-
"div",
|
|
307
|
-
{
|
|
308
|
-
className: cn(
|
|
309
|
-
"max-w-none",
|
|
310
|
-
// Headings — generous spacing for readability
|
|
311
|
-
"[&_h1]:mt-8 [&_h1]:mb-4 [&_h1]:text-2xl [&_h1]:font-bold [&_h1]:tracking-tight [&_h1]:text-foreground",
|
|
312
|
-
"[&_h2]:mt-7 [&_h2]:mb-3 [&_h2]:text-xl [&_h2]:font-semibold [&_h2]:tracking-tight [&_h2]:text-foreground",
|
|
313
|
-
"[&_h3]:mt-6 [&_h3]:mb-2.5 [&_h3]:text-lg [&_h3]:font-semibold [&_h3]:text-foreground",
|
|
314
|
-
"[&_h4]:mt-5 [&_h4]:mb-2 [&_h4]:text-base [&_h4]:font-medium [&_h4]:text-foreground",
|
|
315
|
-
"[&_h5]:mt-4 [&_h5]:mb-1.5 [&_h5]:text-sm [&_h5]:font-medium [&_h5]:text-foreground/90",
|
|
316
|
-
"[&_h6]:mt-4 [&_h6]:mb-1.5 [&_h6]:text-sm [&_h6]:font-medium [&_h6]:text-muted-foreground",
|
|
317
|
-
// Paragraphs
|
|
318
|
-
"[&_p]:my-4 [&_p]:leading-[1.75] [&_p]:text-foreground/85",
|
|
319
|
-
// Lists — proper indentation and spacing
|
|
320
|
-
"[&_ul]:my-4 [&_ul]:pl-6 [&_ul]:list-disc [&_ul]:space-y-1.5 [&_ul]:marker:text-muted-foreground/40",
|
|
321
|
-
"[&_ol]:my-4 [&_ol]:pl-6 [&_ol]:list-decimal [&_ol]:space-y-1.5 [&_ol]:marker:text-muted-foreground/40",
|
|
322
|
-
"[&_li]:leading-relaxed [&_li]:text-foreground/85",
|
|
323
|
-
// Inline code
|
|
324
|
-
"[&_:not(pre)>code]:rounded-md [&_:not(pre)>code]:bg-muted/70 [&_:not(pre)>code]:px-1.5 [&_:not(pre)>code]:py-0.5 [&_:not(pre)>code]:text-[13px] [&_:not(pre)>code]:font-mono [&_:not(pre)>code]:text-foreground/90 [&_:not(pre)>code]:border [&_:not(pre)>code]:border-border/50",
|
|
325
|
-
// Code blocks
|
|
326
|
-
"[&_pre]:my-5 [&_pre]:rounded-xl [&_pre]:bg-muted/50 [&_pre]:border [&_pre]:border-border/60 [&_pre]:px-5 [&_pre]:py-4 [&_pre]:text-[13px] [&_pre]:leading-relaxed [&_pre]:overflow-x-auto [&_pre]:font-mono [&_pre]:whitespace-pre-wrap",
|
|
327
|
-
// Blockquotes
|
|
328
|
-
"[&_blockquote]:my-5 [&_blockquote]:border-l-[3px] [&_blockquote]:border-amber-400 dark:[&_blockquote]:border-amber-500 [&_blockquote]:pl-4 [&_blockquote]:text-muted-foreground [&_blockquote]:italic [&_blockquote]:leading-relaxed",
|
|
329
|
-
// Horizontal rules
|
|
330
|
-
"[&_hr]:my-8 [&_hr]:border-border/40",
|
|
331
|
-
// Tables
|
|
332
|
-
"[&_table]:w-full [&_table]:my-4 [&_table]:text-sm",
|
|
333
|
-
"[&_th]:border [&_th]:border-border [&_th]:bg-muted/60 [&_th]:px-4 [&_th]:py-2.5 [&_th]:text-left [&_th]:font-medium [&_th]:text-foreground/80 [&_th]:text-xs [&_th]:uppercase [&_th]:tracking-wider",
|
|
334
|
-
"[&_td]:border [&_td]:border-border [&_td]:px-4 [&_td]:py-2.5 [&_td]:text-foreground/80",
|
|
335
|
-
// Images
|
|
336
|
-
"[&_img]:rounded-xl [&_img]:my-5 [&_img]:max-w-full",
|
|
337
|
-
// First/last margin reset
|
|
338
|
-
"[&>*:first-child]:mt-0 [&>*:last-child]:mb-0"
|
|
339
|
-
),
|
|
340
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Markdown, { remarkPlugins: [remarkGfm], components: markdownComponents, children: activeContent })
|
|
341
|
-
}
|
|
342
|
-
) : (
|
|
343
|
-
/* ── Empty state ── */
|
|
344
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col items-center justify-center py-16 gap-4", children: [
|
|
345
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex size-14 items-center justify-center rounded-2xl bg-muted/50 border border-border/50", children: /* @__PURE__ */ jsxRuntimeExports.jsx(activeMeta.icon, { className: "size-6 text-muted-foreground/30" }) }),
|
|
346
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-center max-w-xs", children: [
|
|
347
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm font-medium text-foreground/70", children: activeMeta.emptyLabel }),
|
|
348
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-muted-foreground/50 mt-1.5", children: "You can format your content with Markdown — headers, lists, code blocks, and more." })
|
|
349
|
-
] }),
|
|
350
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
351
|
-
"button",
|
|
352
|
-
{
|
|
353
|
-
onClick: handleEdit,
|
|
354
|
-
className: "inline-flex items-center gap-1.5 rounded-lg px-4 py-2 text-sm font-medium bg-muted hover:bg-muted/80 text-foreground/80 transition-colors",
|
|
355
|
-
children: [
|
|
356
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(IconPencil, { className: "size-3.5" }),
|
|
357
|
-
"Start Editing"
|
|
358
|
-
]
|
|
359
|
-
}
|
|
360
|
-
)
|
|
361
|
-
] })
|
|
362
|
-
) })
|
|
363
|
-
] }) })
|
|
364
|
-
] });
|
|
365
|
-
}
|
|
366
|
-
const SplitComponent = MemoryPage;
|
|
367
|
-
export {
|
|
368
|
-
SplitComponent as component
|
|
369
|
-
};
|