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,343 +0,0 @@
|
|
|
1
|
-
import { R as React } from "./react.mjs";
|
|
2
|
-
const createStoreImpl = (createState) => {
|
|
3
|
-
let state;
|
|
4
|
-
const listeners = /* @__PURE__ */ new Set();
|
|
5
|
-
const setState = (partial, replace) => {
|
|
6
|
-
const nextState = typeof partial === "function" ? partial(state) : partial;
|
|
7
|
-
if (!Object.is(nextState, state)) {
|
|
8
|
-
const previousState = state;
|
|
9
|
-
state = (replace != null ? replace : typeof nextState !== "object" || nextState === null) ? nextState : Object.assign({}, state, nextState);
|
|
10
|
-
listeners.forEach((listener) => listener(state, previousState));
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
const getState = () => state;
|
|
14
|
-
const getInitialState = () => initialState;
|
|
15
|
-
const subscribe = (listener) => {
|
|
16
|
-
listeners.add(listener);
|
|
17
|
-
return () => listeners.delete(listener);
|
|
18
|
-
};
|
|
19
|
-
const api = { setState, getState, getInitialState, subscribe };
|
|
20
|
-
const initialState = state = createState(setState, getState, api);
|
|
21
|
-
return api;
|
|
22
|
-
};
|
|
23
|
-
const createStore = ((createState) => createState ? createStoreImpl(createState) : createStoreImpl);
|
|
24
|
-
const identity = (arg) => arg;
|
|
25
|
-
function useStore(api, selector = identity) {
|
|
26
|
-
const slice = React.useSyncExternalStore(
|
|
27
|
-
api.subscribe,
|
|
28
|
-
React.useCallback(() => selector(api.getState()), [api, selector]),
|
|
29
|
-
React.useCallback(() => selector(api.getInitialState()), [api, selector])
|
|
30
|
-
);
|
|
31
|
-
React.useDebugValue(slice);
|
|
32
|
-
return slice;
|
|
33
|
-
}
|
|
34
|
-
const createImpl = (createState) => {
|
|
35
|
-
const api = createStore(createState);
|
|
36
|
-
const useBoundStore = (selector) => useStore(api, selector);
|
|
37
|
-
Object.assign(useBoundStore, api);
|
|
38
|
-
return useBoundStore;
|
|
39
|
-
};
|
|
40
|
-
const create = ((createState) => createImpl);
|
|
41
|
-
const __vite_import_meta_env__ = { "BASE_URL": "/", "DEV": false, "MODE": "production", "PROD": true, "SSR": true, "TSS_DEV_SERVER": "false", "TSS_DEV_SSR_STYLES_BASEPATH": "/", "TSS_DEV_SSR_STYLES_ENABLED": "true", "TSS_INLINE_CSS_ENABLED": "false", "TSS_ROUTER_BASEPATH": "", "TSS_SERVER_FN_BASE": "/_serverFn/" };
|
|
42
|
-
const shouldDispatchFromDevtools = (api) => !!api.dispatchFromDevtools && typeof api.dispatch === "function";
|
|
43
|
-
const trackedConnections = /* @__PURE__ */ new Map();
|
|
44
|
-
const getTrackedConnectionState = (name) => {
|
|
45
|
-
const api = trackedConnections.get(name);
|
|
46
|
-
if (!api) return {};
|
|
47
|
-
return Object.fromEntries(
|
|
48
|
-
Object.entries(api.stores).map(([key, api2]) => [key, api2.getState()])
|
|
49
|
-
);
|
|
50
|
-
};
|
|
51
|
-
const extractConnectionInformation = (store, extensionConnector, options) => {
|
|
52
|
-
if (store === void 0) {
|
|
53
|
-
return {
|
|
54
|
-
type: "untracked",
|
|
55
|
-
connection: extensionConnector.connect(options)
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
const existingConnection = trackedConnections.get(options.name);
|
|
59
|
-
if (existingConnection) {
|
|
60
|
-
return { type: "tracked", store, ...existingConnection };
|
|
61
|
-
}
|
|
62
|
-
const newConnection = {
|
|
63
|
-
connection: extensionConnector.connect(options),
|
|
64
|
-
stores: {}
|
|
65
|
-
};
|
|
66
|
-
trackedConnections.set(options.name, newConnection);
|
|
67
|
-
return { type: "tracked", store, ...newConnection };
|
|
68
|
-
};
|
|
69
|
-
const removeStoreFromTrackedConnections = (name, store) => {
|
|
70
|
-
if (store === void 0) return;
|
|
71
|
-
const connectionInfo = trackedConnections.get(name);
|
|
72
|
-
if (!connectionInfo) return;
|
|
73
|
-
delete connectionInfo.stores[store];
|
|
74
|
-
if (Object.keys(connectionInfo.stores).length === 0) {
|
|
75
|
-
trackedConnections.delete(name);
|
|
76
|
-
}
|
|
77
|
-
};
|
|
78
|
-
const v8StackLineRe = /.+ (.+) .+/;
|
|
79
|
-
const geckoStackLineRe = /^([^@]+)@/;
|
|
80
|
-
function findCallerName(stack) {
|
|
81
|
-
var _a, _b, _c;
|
|
82
|
-
if (!stack) return void 0;
|
|
83
|
-
const traceLines = stack.split("\n");
|
|
84
|
-
const apiSetStateLineIndex = traceLines.findIndex(
|
|
85
|
-
(traceLine) => traceLine.includes("api.setState")
|
|
86
|
-
);
|
|
87
|
-
if (apiSetStateLineIndex < 0) return void 0;
|
|
88
|
-
const callerLine = ((_a = traceLines[apiSetStateLineIndex + 1]) == null ? void 0 : _a.trim()) || "";
|
|
89
|
-
return ((_b = v8StackLineRe.exec(callerLine)) == null ? void 0 : _b[1]) || ((_c = geckoStackLineRe.exec(callerLine)) == null ? void 0 : _c[1]);
|
|
90
|
-
}
|
|
91
|
-
const devtoolsImpl = (fn, devtoolsOptions = {}) => (set, get, api) => {
|
|
92
|
-
const { enabled, anonymousActionType, store, ...options } = devtoolsOptions;
|
|
93
|
-
let extensionConnector;
|
|
94
|
-
try {
|
|
95
|
-
extensionConnector = (enabled != null ? enabled : (__vite_import_meta_env__ ? "production" : void 0) !== "production") && window.__REDUX_DEVTOOLS_EXTENSION__;
|
|
96
|
-
} catch (e) {
|
|
97
|
-
}
|
|
98
|
-
if (!extensionConnector) {
|
|
99
|
-
return fn(set, get, api);
|
|
100
|
-
}
|
|
101
|
-
const { connection, ...connectionInformation } = extractConnectionInformation(store, extensionConnector, options);
|
|
102
|
-
let isRecording = true;
|
|
103
|
-
api.setState = ((state, replace, nameOrAction) => {
|
|
104
|
-
const r = set(state, replace);
|
|
105
|
-
if (!isRecording) return r;
|
|
106
|
-
const action = nameOrAction === void 0 ? {
|
|
107
|
-
type: anonymousActionType || findCallerName(new Error().stack) || "anonymous"
|
|
108
|
-
} : typeof nameOrAction === "string" ? { type: nameOrAction } : nameOrAction;
|
|
109
|
-
if (store === void 0) {
|
|
110
|
-
connection == null ? void 0 : connection.send(action, get());
|
|
111
|
-
return r;
|
|
112
|
-
}
|
|
113
|
-
connection == null ? void 0 : connection.send(
|
|
114
|
-
{
|
|
115
|
-
...action,
|
|
116
|
-
type: `${store}/${action.type}`
|
|
117
|
-
},
|
|
118
|
-
{
|
|
119
|
-
...getTrackedConnectionState(options.name),
|
|
120
|
-
[store]: api.getState()
|
|
121
|
-
}
|
|
122
|
-
);
|
|
123
|
-
return r;
|
|
124
|
-
});
|
|
125
|
-
api.devtools = {
|
|
126
|
-
cleanup: () => {
|
|
127
|
-
if (connection && typeof connection.unsubscribe === "function") {
|
|
128
|
-
connection.unsubscribe();
|
|
129
|
-
}
|
|
130
|
-
removeStoreFromTrackedConnections(options.name, store);
|
|
131
|
-
}
|
|
132
|
-
};
|
|
133
|
-
const setStateFromDevtools = (...a) => {
|
|
134
|
-
const originalIsRecording = isRecording;
|
|
135
|
-
isRecording = false;
|
|
136
|
-
set(...a);
|
|
137
|
-
isRecording = originalIsRecording;
|
|
138
|
-
};
|
|
139
|
-
const initialState = fn(api.setState, get, api);
|
|
140
|
-
if (connectionInformation.type === "untracked") {
|
|
141
|
-
connection == null ? void 0 : connection.init(initialState);
|
|
142
|
-
} else {
|
|
143
|
-
connectionInformation.stores[connectionInformation.store] = api;
|
|
144
|
-
connection == null ? void 0 : connection.init(
|
|
145
|
-
Object.fromEntries(
|
|
146
|
-
Object.entries(connectionInformation.stores).map(([key, store2]) => [
|
|
147
|
-
key,
|
|
148
|
-
key === connectionInformation.store ? initialState : store2.getState()
|
|
149
|
-
])
|
|
150
|
-
)
|
|
151
|
-
);
|
|
152
|
-
}
|
|
153
|
-
if (shouldDispatchFromDevtools(api)) {
|
|
154
|
-
let didWarnAboutReservedActionType = false;
|
|
155
|
-
const originalDispatch = api.dispatch;
|
|
156
|
-
api.dispatch = (...args) => {
|
|
157
|
-
if ((__vite_import_meta_env__ ? "production" : void 0) !== "production" && args[0].type === "__setState" && !didWarnAboutReservedActionType) {
|
|
158
|
-
console.warn(
|
|
159
|
-
'[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'
|
|
160
|
-
);
|
|
161
|
-
didWarnAboutReservedActionType = true;
|
|
162
|
-
}
|
|
163
|
-
originalDispatch(...args);
|
|
164
|
-
};
|
|
165
|
-
}
|
|
166
|
-
connection.subscribe((message) => {
|
|
167
|
-
var _a;
|
|
168
|
-
switch (message.type) {
|
|
169
|
-
case "ACTION":
|
|
170
|
-
if (typeof message.payload !== "string") {
|
|
171
|
-
console.error(
|
|
172
|
-
"[zustand devtools middleware] Unsupported action format"
|
|
173
|
-
);
|
|
174
|
-
return;
|
|
175
|
-
}
|
|
176
|
-
return parseJsonThen(
|
|
177
|
-
message.payload,
|
|
178
|
-
(action) => {
|
|
179
|
-
if (action.type === "__setState") {
|
|
180
|
-
if (store === void 0) {
|
|
181
|
-
setStateFromDevtools(action.state);
|
|
182
|
-
return;
|
|
183
|
-
}
|
|
184
|
-
if (Object.keys(action.state).length !== 1) {
|
|
185
|
-
console.error(
|
|
186
|
-
`
|
|
187
|
-
[zustand devtools middleware] Unsupported __setState action format.
|
|
188
|
-
When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(),
|
|
189
|
-
and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } }
|
|
190
|
-
`
|
|
191
|
-
);
|
|
192
|
-
}
|
|
193
|
-
const stateFromDevtools = action.state[store];
|
|
194
|
-
if (stateFromDevtools === void 0 || stateFromDevtools === null) {
|
|
195
|
-
return;
|
|
196
|
-
}
|
|
197
|
-
if (JSON.stringify(api.getState()) !== JSON.stringify(stateFromDevtools)) {
|
|
198
|
-
setStateFromDevtools(stateFromDevtools);
|
|
199
|
-
}
|
|
200
|
-
return;
|
|
201
|
-
}
|
|
202
|
-
if (shouldDispatchFromDevtools(api)) {
|
|
203
|
-
api.dispatch(action);
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
);
|
|
207
|
-
case "DISPATCH":
|
|
208
|
-
switch (message.payload.type) {
|
|
209
|
-
case "RESET":
|
|
210
|
-
setStateFromDevtools(initialState);
|
|
211
|
-
if (store === void 0) {
|
|
212
|
-
return connection == null ? void 0 : connection.init(api.getState());
|
|
213
|
-
}
|
|
214
|
-
return connection == null ? void 0 : connection.init(getTrackedConnectionState(options.name));
|
|
215
|
-
case "COMMIT":
|
|
216
|
-
if (store === void 0) {
|
|
217
|
-
connection == null ? void 0 : connection.init(api.getState());
|
|
218
|
-
return;
|
|
219
|
-
}
|
|
220
|
-
return connection == null ? void 0 : connection.init(getTrackedConnectionState(options.name));
|
|
221
|
-
case "ROLLBACK":
|
|
222
|
-
return parseJsonThen(message.state, (state) => {
|
|
223
|
-
if (store === void 0) {
|
|
224
|
-
setStateFromDevtools(state);
|
|
225
|
-
connection == null ? void 0 : connection.init(api.getState());
|
|
226
|
-
return;
|
|
227
|
-
}
|
|
228
|
-
setStateFromDevtools(state[store]);
|
|
229
|
-
connection == null ? void 0 : connection.init(getTrackedConnectionState(options.name));
|
|
230
|
-
});
|
|
231
|
-
case "JUMP_TO_STATE":
|
|
232
|
-
case "JUMP_TO_ACTION":
|
|
233
|
-
return parseJsonThen(message.state, (state) => {
|
|
234
|
-
if (store === void 0) {
|
|
235
|
-
setStateFromDevtools(state);
|
|
236
|
-
return;
|
|
237
|
-
}
|
|
238
|
-
if (JSON.stringify(api.getState()) !== JSON.stringify(state[store])) {
|
|
239
|
-
setStateFromDevtools(state[store]);
|
|
240
|
-
}
|
|
241
|
-
});
|
|
242
|
-
case "IMPORT_STATE": {
|
|
243
|
-
const { nextLiftedState } = message.payload;
|
|
244
|
-
const lastComputedState = (_a = nextLiftedState.computedStates.slice(-1)[0]) == null ? void 0 : _a.state;
|
|
245
|
-
if (!lastComputedState) return;
|
|
246
|
-
if (store === void 0) {
|
|
247
|
-
setStateFromDevtools(lastComputedState);
|
|
248
|
-
} else {
|
|
249
|
-
setStateFromDevtools(lastComputedState[store]);
|
|
250
|
-
}
|
|
251
|
-
connection == null ? void 0 : connection.send(
|
|
252
|
-
null,
|
|
253
|
-
// FIXME no-any
|
|
254
|
-
nextLiftedState
|
|
255
|
-
);
|
|
256
|
-
return;
|
|
257
|
-
}
|
|
258
|
-
case "PAUSE_RECORDING":
|
|
259
|
-
return isRecording = !isRecording;
|
|
260
|
-
}
|
|
261
|
-
return;
|
|
262
|
-
}
|
|
263
|
-
});
|
|
264
|
-
return initialState;
|
|
265
|
-
};
|
|
266
|
-
const devtools = devtoolsImpl;
|
|
267
|
-
const parseJsonThen = (stringified, fn) => {
|
|
268
|
-
let parsed;
|
|
269
|
-
try {
|
|
270
|
-
parsed = JSON.parse(stringified);
|
|
271
|
-
} catch (e) {
|
|
272
|
-
console.error(
|
|
273
|
-
"[zustand devtools middleware] Could not parse the received json",
|
|
274
|
-
e
|
|
275
|
-
);
|
|
276
|
-
}
|
|
277
|
-
if (parsed !== void 0) fn(parsed);
|
|
278
|
-
};
|
|
279
|
-
const isIterable = (obj) => Symbol.iterator in obj;
|
|
280
|
-
const hasIterableEntries = (value) => (
|
|
281
|
-
// HACK: avoid checking entries type
|
|
282
|
-
"entries" in value
|
|
283
|
-
);
|
|
284
|
-
const compareEntries = (valueA, valueB) => {
|
|
285
|
-
const mapA = valueA instanceof Map ? valueA : new Map(valueA.entries());
|
|
286
|
-
const mapB = valueB instanceof Map ? valueB : new Map(valueB.entries());
|
|
287
|
-
if (mapA.size !== mapB.size) {
|
|
288
|
-
return false;
|
|
289
|
-
}
|
|
290
|
-
for (const [key, value] of mapA) {
|
|
291
|
-
if (!mapB.has(key) || !Object.is(value, mapB.get(key))) {
|
|
292
|
-
return false;
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
return true;
|
|
296
|
-
};
|
|
297
|
-
const compareIterables = (valueA, valueB) => {
|
|
298
|
-
const iteratorA = valueA[Symbol.iterator]();
|
|
299
|
-
const iteratorB = valueB[Symbol.iterator]();
|
|
300
|
-
let nextA = iteratorA.next();
|
|
301
|
-
let nextB = iteratorB.next();
|
|
302
|
-
while (!nextA.done && !nextB.done) {
|
|
303
|
-
if (!Object.is(nextA.value, nextB.value)) {
|
|
304
|
-
return false;
|
|
305
|
-
}
|
|
306
|
-
nextA = iteratorA.next();
|
|
307
|
-
nextB = iteratorB.next();
|
|
308
|
-
}
|
|
309
|
-
return !!nextA.done && !!nextB.done;
|
|
310
|
-
};
|
|
311
|
-
function shallow(valueA, valueB) {
|
|
312
|
-
if (Object.is(valueA, valueB)) {
|
|
313
|
-
return true;
|
|
314
|
-
}
|
|
315
|
-
if (typeof valueA !== "object" || valueA === null || typeof valueB !== "object" || valueB === null) {
|
|
316
|
-
return false;
|
|
317
|
-
}
|
|
318
|
-
if (Object.getPrototypeOf(valueA) !== Object.getPrototypeOf(valueB)) {
|
|
319
|
-
return false;
|
|
320
|
-
}
|
|
321
|
-
if (isIterable(valueA) && isIterable(valueB)) {
|
|
322
|
-
if (hasIterableEntries(valueA) && hasIterableEntries(valueB)) {
|
|
323
|
-
return compareEntries(valueA, valueB);
|
|
324
|
-
}
|
|
325
|
-
return compareIterables(valueA, valueB);
|
|
326
|
-
}
|
|
327
|
-
return compareEntries(
|
|
328
|
-
{ entries: () => Object.entries(valueA) },
|
|
329
|
-
{ entries: () => Object.entries(valueB) }
|
|
330
|
-
);
|
|
331
|
-
}
|
|
332
|
-
function useShallow(selector) {
|
|
333
|
-
const prev = React.useRef(void 0);
|
|
334
|
-
return (state) => {
|
|
335
|
-
const next = selector(state);
|
|
336
|
-
return shallow(prev.current, next) ? prev.current : prev.current = next;
|
|
337
|
-
};
|
|
338
|
-
}
|
|
339
|
-
export {
|
|
340
|
-
create as c,
|
|
341
|
-
devtools as d,
|
|
342
|
-
useShallow as u
|
|
343
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1,277 +0,0 @@
|
|
|
1
|
-
import { r as reactExports, j as jsxRuntimeExports } from "../_libs/react.mjs";
|
|
2
|
-
import { d as useNavigate } from "../_libs/tanstack__react-router.mjs";
|
|
3
|
-
import { c as createSession, B as Button, a as cn } from "./router-CS6Zq3md.mjs";
|
|
4
|
-
import { x as IconChevronLeft, s as IconPencil, y as IconBook, z as IconCode, A as IconHeart, B as IconCloud, C as IconArrowUp } from "../_libs/tabler__icons-react.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 PROMPT_CARDS = [
|
|
32
|
-
{
|
|
33
|
-
icon: IconPencil,
|
|
34
|
-
label: "Write",
|
|
35
|
-
title: "Write",
|
|
36
|
-
description: "Articles, stories, documentation, and all kinds of written content.",
|
|
37
|
-
prompts: [
|
|
38
|
-
"Write a short story about a robot learning to paint — make it emotional and reflective, around 500 words.",
|
|
39
|
-
"Draft a professional email template for following up with clients after a meeting.",
|
|
40
|
-
"Write a persuasive blog post on why companies should adopt a 4-day work week.",
|
|
41
|
-
"Create a product description for a smart water bottle that tracks hydration, 3 sentences max per feature.",
|
|
42
|
-
"Rewrite this paragraph to be more concise and impactful: [paste text]"
|
|
43
|
-
]
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
icon: IconBook,
|
|
47
|
-
label: "Learn",
|
|
48
|
-
title: "Learn",
|
|
49
|
-
description: "Explore new topics, get clear explanations, and dive deep into any subject.",
|
|
50
|
-
prompts: [
|
|
51
|
-
"Explain quantum computing like I'm 10 years old — simple but accurate with fun analogies.",
|
|
52
|
-
"Teach me the basics of investing: stocks, bonds, ETFs, and how to start with $500.",
|
|
53
|
-
"Give me a 5-minute summary of the French Revolution — key dates, people, and outcomes.",
|
|
54
|
-
"Explain how large language models like you actually work under the hood.",
|
|
55
|
-
"Walk me through the core principles of color theory for UI design."
|
|
56
|
-
]
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
icon: IconCode,
|
|
60
|
-
label: "Code",
|
|
61
|
-
title: "Code",
|
|
62
|
-
description: "Build, debug, refactor, and architect software with AI assistance.",
|
|
63
|
-
prompts: [
|
|
64
|
-
"Build a Python script that monitors a directory for new files and uploads them to S3. Include error handling, logging, and a config file.",
|
|
65
|
-
"Review this code for performance bottlenecks and suggest specific improvements: [paste code]",
|
|
66
|
-
"Create a React hook that debounces a value and returns loading/error states.",
|
|
67
|
-
"Write a SQL query to find the top 5 customers by revenue this month, with their last order date.",
|
|
68
|
-
"Explain the difference between REST and GraphQL — when would you choose one over the other, with a real example."
|
|
69
|
-
]
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
icon: IconHeart,
|
|
73
|
-
label: "Life stuff",
|
|
74
|
-
title: "Life Stuff",
|
|
75
|
-
description: "Productivity, habits, health, relationships, and everyday advice.",
|
|
76
|
-
prompts: [
|
|
77
|
-
"Give me a daily routine that balances deep work, exercise, social time, and rest. I work from home and tend to overwork.",
|
|
78
|
-
"How do I start a regular meditation practice? Suggest a beginner-friendly 10-minute routine.",
|
|
79
|
-
"I want to read more books — help me set up a sustainable reading habit and pick my first 5.",
|
|
80
|
-
"What are 3 evidence-backed techniques to reduce anxiety before a big presentation?",
|
|
81
|
-
"Help me plan a weekly meal prep routine that's healthy, affordable, and takes under 2 hours on Sunday."
|
|
82
|
-
]
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
icon: IconCloud,
|
|
86
|
-
label: "Weather",
|
|
87
|
-
title: "Weather",
|
|
88
|
-
description: "Forecasts, climate insights, and weather patterns anywhere in the world.",
|
|
89
|
-
prompts: [
|
|
90
|
-
"What's the weather like today in my area? Give me a detailed forecast with temperature, humidity, and chance of rain.",
|
|
91
|
-
"What's the best time of year to visit Tokyo for mild weather and fewer crowds?",
|
|
92
|
-
"Explain how hurricanes form and how their intensity is categorized.",
|
|
93
|
-
"Compare the climates of San Francisco and New York — which one has milder winters?",
|
|
94
|
-
"What does 'dew point' actually mean and why does it matter for comfort?"
|
|
95
|
-
]
|
|
96
|
-
}
|
|
97
|
-
];
|
|
98
|
-
function useGreeting() {
|
|
99
|
-
const [greeting, setGreeting] = reactExports.useState("");
|
|
100
|
-
reactExports.useEffect(() => {
|
|
101
|
-
const hour = (/* @__PURE__ */ new Date()).getHours();
|
|
102
|
-
if (hour < 12) setGreeting("Good morning");
|
|
103
|
-
else if (hour < 17) setGreeting("Good afternoon");
|
|
104
|
-
else if (hour < 21) setGreeting("Good evening");
|
|
105
|
-
else setGreeting("Good night");
|
|
106
|
-
}, []);
|
|
107
|
-
return greeting;
|
|
108
|
-
}
|
|
109
|
-
function DashboardInput({
|
|
110
|
-
onSubmit,
|
|
111
|
-
disabled
|
|
112
|
-
}) {
|
|
113
|
-
const [value, setValue] = reactExports.useState("");
|
|
114
|
-
const textareaRef = reactExports.useRef(null);
|
|
115
|
-
const autoResize = reactExports.useCallback(() => {
|
|
116
|
-
const el = textareaRef.current;
|
|
117
|
-
if (!el) return;
|
|
118
|
-
el.style.height = "auto";
|
|
119
|
-
el.style.height = `${Math.min(el.scrollHeight, 200)}px`;
|
|
120
|
-
}, []);
|
|
121
|
-
reactExports.useEffect(() => {
|
|
122
|
-
autoResize();
|
|
123
|
-
}, [value, autoResize]);
|
|
124
|
-
reactExports.useEffect(() => {
|
|
125
|
-
textareaRef.current?.focus();
|
|
126
|
-
}, []);
|
|
127
|
-
const handleSend = reactExports.useCallback(() => {
|
|
128
|
-
const text = value.trim();
|
|
129
|
-
if (!text || disabled) return;
|
|
130
|
-
setValue("");
|
|
131
|
-
if (textareaRef.current) textareaRef.current.style.height = "auto";
|
|
132
|
-
onSubmit(text);
|
|
133
|
-
}, [value, disabled, onSubmit]);
|
|
134
|
-
function handleKeyDown(e) {
|
|
135
|
-
if (e.key === "Enter" && !e.shiftKey) {
|
|
136
|
-
e.preventDefault();
|
|
137
|
-
handleSend();
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
const canSend = value.trim().length > 0;
|
|
141
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex min-h-[80px] flex-col rounded-2xl border border-border bg-card shadow-sm transition-colors cursor-text hover:border-border/80", children: [
|
|
142
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
143
|
-
"textarea",
|
|
144
|
-
{
|
|
145
|
-
ref: textareaRef,
|
|
146
|
-
value,
|
|
147
|
-
onChange: (e) => setValue(e.target.value),
|
|
148
|
-
onKeyDown: handleKeyDown,
|
|
149
|
-
placeholder: "Ask anything…",
|
|
150
|
-
rows: 1,
|
|
151
|
-
disabled,
|
|
152
|
-
className: cn(
|
|
153
|
-
"w-full rounded-none border-0 p-4 text-[15px] text-foreground resize-none shadow-none outline-none bg-transparent whitespace-pre-wrap break-words placeholder:text-muted-foreground disabled:opacity-50",
|
|
154
|
-
"min-h-[56px] max-h-[200px]"
|
|
155
|
-
)
|
|
156
|
-
}
|
|
157
|
-
),
|
|
158
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex min-h-[40px] items-center justify-end p-2 pb-1", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
159
|
-
Button,
|
|
160
|
-
{
|
|
161
|
-
variant: "ghost",
|
|
162
|
-
size: "icon-sm",
|
|
163
|
-
className: cn(
|
|
164
|
-
"rounded-full transition-colors cursor-pointer",
|
|
165
|
-
canSend && !disabled ? "bg-primary hover:bg-primary/90 text-primary-foreground" : "bg-primary text-primary-foreground opacity-40"
|
|
166
|
-
),
|
|
167
|
-
disabled: !canSend || disabled,
|
|
168
|
-
onClick: handleSend,
|
|
169
|
-
title: "Send message",
|
|
170
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(IconArrowUp, { className: "h-4 w-4" })
|
|
171
|
-
}
|
|
172
|
-
) })
|
|
173
|
-
] });
|
|
174
|
-
}
|
|
175
|
-
function DashboardPage() {
|
|
176
|
-
const navigate = useNavigate();
|
|
177
|
-
const greeting = useGreeting();
|
|
178
|
-
const [selectedPrompt, setSelectedPrompt] = reactExports.useState(null);
|
|
179
|
-
const [isSubmitting, setIsSubmitting] = reactExports.useState(false);
|
|
180
|
-
const submittingRef = reactExports.useRef(false);
|
|
181
|
-
const handleNewChat = reactExports.useCallback(
|
|
182
|
-
async (initialMessage) => {
|
|
183
|
-
if (submittingRef.current) return;
|
|
184
|
-
submittingRef.current = true;
|
|
185
|
-
setIsSubmitting(true);
|
|
186
|
-
try {
|
|
187
|
-
const session = await createSession();
|
|
188
|
-
if (initialMessage) {
|
|
189
|
-
sessionStorage.setItem(`hermium_pending_msg_${session.id}`, initialMessage);
|
|
190
|
-
}
|
|
191
|
-
navigate({
|
|
192
|
-
to: "/chat/$sessionId",
|
|
193
|
-
params: { sessionId: session.id }
|
|
194
|
-
});
|
|
195
|
-
} catch {
|
|
196
|
-
submittingRef.current = false;
|
|
197
|
-
setIsSubmitting(false);
|
|
198
|
-
}
|
|
199
|
-
},
|
|
200
|
-
[navigate]
|
|
201
|
-
);
|
|
202
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-1 flex-col items-center justify-center px-4 overflow-hidden", children: [
|
|
203
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mb-10 text-center", children: /* @__PURE__ */ jsxRuntimeExports.jsx("h1", { className: "text-5xl font-semibold tracking-tight", children: greeting }) }),
|
|
204
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-full max-w-3xl", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
205
|
-
DashboardInput,
|
|
206
|
-
{
|
|
207
|
-
onSubmit: handleNewChat,
|
|
208
|
-
disabled: isSubmitting
|
|
209
|
-
}
|
|
210
|
-
) }),
|
|
211
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mt-6 w-full max-w-3xl", children: selectedPrompt ? /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
212
|
-
"div",
|
|
213
|
-
{
|
|
214
|
-
className: "rounded-2xl border bg-card p-6",
|
|
215
|
-
style: { animation: "fadeSlideIn 0.2s ease-out" },
|
|
216
|
-
children: [
|
|
217
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
218
|
-
"button",
|
|
219
|
-
{
|
|
220
|
-
disabled: isSubmitting,
|
|
221
|
-
onClick: () => setSelectedPrompt(null),
|
|
222
|
-
className: "mb-4 flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors disabled:opacity-50",
|
|
223
|
-
children: [
|
|
224
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(IconChevronLeft, { className: "size-3.5" }),
|
|
225
|
-
"Back to suggestions"
|
|
226
|
-
]
|
|
227
|
-
}
|
|
228
|
-
),
|
|
229
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("ul", { className: "space-y-2", children: selectedPrompt.prompts.map((prompt, i) => /* @__PURE__ */ jsxRuntimeExports.jsx("li", { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
230
|
-
"button",
|
|
231
|
-
{
|
|
232
|
-
disabled: isSubmitting,
|
|
233
|
-
onClick: () => handleNewChat(prompt),
|
|
234
|
-
className: "group w-full rounded-xl border border-border bg-muted/30 px-4 py-3 text-left text-sm leading-relaxed text-foreground transition-colors hover:bg-muted/60 hover:border-foreground/20 disabled:opacity-50",
|
|
235
|
-
children: [
|
|
236
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "mr-2 text-xs font-medium text-muted-foreground", children: [
|
|
237
|
-
i + 1,
|
|
238
|
-
"."
|
|
239
|
-
] }),
|
|
240
|
-
prompt
|
|
241
|
-
]
|
|
242
|
-
}
|
|
243
|
-
) }, i)) })
|
|
244
|
-
]
|
|
245
|
-
},
|
|
246
|
-
"prompt-card"
|
|
247
|
-
) : /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
248
|
-
"div",
|
|
249
|
-
{
|
|
250
|
-
className: "flex flex-wrap justify-center gap-2",
|
|
251
|
-
style: { animation: "fadeSlideIn 0.2s ease-out" },
|
|
252
|
-
children: PROMPT_CARDS.map((meta) => {
|
|
253
|
-
const Icon = meta.icon;
|
|
254
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
255
|
-
Button,
|
|
256
|
-
{
|
|
257
|
-
variant: "ghost",
|
|
258
|
-
disabled: isSubmitting,
|
|
259
|
-
className: "group flex items-center gap-2 rounded-lg border border-border bg-muted/40 dark:bg-muted/40 px-3 py-1.5 text-sm text-foreground transition-colors duration-200 ease-out hover:bg-muted/60 h-auto disabled:opacity-50",
|
|
260
|
-
onClick: () => setSelectedPrompt(meta),
|
|
261
|
-
children: [
|
|
262
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Icon, { className: "h-5 w-5 text-muted-foreground transition-colors group-hover:text-foreground" }),
|
|
263
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-[15px]", children: meta.label })
|
|
264
|
-
]
|
|
265
|
-
},
|
|
266
|
-
meta.label
|
|
267
|
-
);
|
|
268
|
-
})
|
|
269
|
-
},
|
|
270
|
-
"chips"
|
|
271
|
-
) })
|
|
272
|
-
] });
|
|
273
|
-
}
|
|
274
|
-
const SplitComponent = DashboardPage;
|
|
275
|
-
export {
|
|
276
|
-
SplitComponent as component
|
|
277
|
-
};
|