@versini/sassysaint 8.33.5 → 8.34.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/dist/chunks/{AboutChangelog.DaPMOsYg.js → AboutChangelog.cIy_LdZE.js} +2 -2
- package/dist/chunks/{AboutEntry.nDJqOOii.js → AboutEntry.CMvo-j5s.js} +5 -5
- package/dist/chunks/{App.HkhGwSuN.js → App.CxyIxMAe.js} +30 -18
- package/dist/chunks/{Chart.C00a9mBD.js → Chart.CYfLEQow.js} +2 -2
- package/dist/chunks/{ChatBubbleAssistant.ob8UickE.js → ChatBubbleAssistant.Q0TKW7i_.js} +3 -3
- package/dist/chunks/HistoryEntry.C5m-7h3b.js +446 -0
- package/dist/chunks/{LNWAZHJI.BA8xEJS9.js → LNWAZHJI.COg-zQKp.js} +1 -1
- package/dist/chunks/{ProfileEntry.CYDZFShl.js → ProfileEntry.BtERQFK4.js} +2 -2
- package/dist/chunks/{SettingsEntry.DuDxToUb.js → SettingsEntry.CHj1q4Pe.js} +2 -2
- package/dist/chunks/{UsageEntry.CkDPuqmA.js → UsageEntry.BglkGISL.js} +3 -3
- package/dist/chunks/{index.Cpj3pXr5.js → index.ALcXlUu1.js} +1 -1
- package/dist/chunks/{index.M53gDba0.js → index.CeAv-M6m.js} +1 -1
- package/dist/chunks/{index.B8_rjxw5.js → index.DK5aa0OB.js} +2 -2
- package/dist/chunks/{index.DcWfjwBJ.js → index.DNY9KnJU.js} +1 -1
- package/dist/chunks/{index.DBys9y5Q.js → index.DakkVauF.js} +3 -3
- package/dist/chunks/{index.DZ1qvog4.js → index.Tr_z3XM6.js} +2 -2
- package/dist/chunks/{useMarkdown.DdL1VDPQ.js → useMarkdown.wo8gOuZw.js} +6 -6
- package/dist/components/SassySaint/SassySaint.js +1 -1
- package/dist/index.js +4 -4
- package/package.json +3 -3
- package/dist/chunks/HistoryEntry.BVkVfmMS.js +0 -423
@@ -1,7 +1,7 @@
|
|
1
1
|
import { jsxs as s, jsx as r } from "react/jsx-runtime";
|
2
|
-
import { b as m, ButtonScroll as n } from "./App.
|
2
|
+
import { b as m, ButtonScroll as n } from "./App.CxyIxMAe.js";
|
3
3
|
import { useRef as f, useCallback as u, useLayoutEffect as p } from "react";
|
4
|
-
import { useMarkdown as d } from "./useMarkdown.
|
4
|
+
import { useMarkdown as d } from "./useMarkdown.wo8gOuZw.js";
|
5
5
|
const v = ({ content: o }) => {
|
6
6
|
const [l, t] = d(), { ref: a, inViewport: c } = m(), e = f(null), i = u(() => {
|
7
7
|
e.current && e.current.scrollIntoView({
|
@@ -1,12 +1,12 @@
|
|
1
1
|
import { jsxs as g, Fragment as n, jsx as e } from "react/jsx-runtime";
|
2
|
-
import { i as c, useServerCapabilities as u, useChangelogs as A, rr as E } from "./App.
|
3
|
-
import { S as a, renderDataAsList as d, CARDS as r, pluralize as I, isProbablyMobile as S, ABOUT_TITLE as O } from "./index.
|
2
|
+
import { i as c, useServerCapabilities as u, useChangelogs as A, rr as E } from "./App.CxyIxMAe.js";
|
3
|
+
import { S as a, renderDataAsList as d, CARDS as r, pluralize as I, isProbablyMobile as S, ABOUT_TITLE as O } from "./index.DK5aa0OB.js";
|
4
4
|
import B from "clsx";
|
5
5
|
import { Suspense as C, lazy as U } from "react";
|
6
6
|
const L = U(
|
7
7
|
() => import(
|
8
8
|
/* webpackChunkName: "LazyAboutChangelog" */
|
9
|
-
"./AboutChangelog.
|
9
|
+
"./AboutChangelog.cIy_LdZE.js"
|
10
10
|
)
|
11
11
|
), N = () => {
|
12
12
|
const s = c(), i = c(), { data: t, isSuccess: m } = u(), { data: h, isSuccess: T } = A(), b = t?.version || "", o = t?.models || [], p = t?.buildTime || "";
|
@@ -17,8 +17,8 @@ const L = U(
|
|
17
17
|
header: r.ABOUT.TITLE_CLIENT,
|
18
18
|
className: "prose-dark dark:prose-lighter mb-4",
|
19
19
|
children: d(s, {
|
20
|
-
[r.ABOUT.VERSION]: "8.
|
21
|
-
[r.ABOUT.BUILD_TIMESTAMP]: "08/04/2025
|
20
|
+
[r.ABOUT.VERSION]: "8.34.0",
|
21
|
+
[r.ABOUT.BUILD_TIMESTAMP]: "08/04/2025 10:24 PM EDT"
|
22
22
|
})
|
23
23
|
}
|
24
24
|
),
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { jsx as i, jsxs as T, Fragment as ue } from "react/jsx-runtime";
|
2
|
-
import { Subscribable as ho, pendingThenable as Ea, resolveEnabled as ke, shallowEqualObjects as kr, resolveStaleTime as gt, noop as _r, isServer as Sr, isValidTimeout as ka, focusManager as fo, fetchState as mo, replaceData as _a, notifyManager as Sn, timeUntilStale as po, shouldThrowError as go, useQueryClient as yo, I as re, ACTION_SORT as bo, ACTION_SEARCH as vo, ACTION_RESET_PROMPT as Tn, ACTION_TOGGLE_PROMPT as Cn, le as Ce, DEFAULT_ICON_ACTION_SIZE as Te, isTauri as Wt, n as Ve, isProbablyiPhone as Ae, L as In, j as yt, C as Sa, LOCAL_STORAGE_PREFIX as jt, LOCAL_STORAGE_PRIVATE_DISCLOSURE as wo, LOCAL_STORAGE_REASONING_DISCLOSURE as Eo, TOAST_CHAT_SAVED as ko, TOAST_PROVIDER_CHANGED as _o, PROMPT_CLASSNAME as So, PROMPT_EDITABLE_AREA_CLASSNAME as To, ERROR_MESSAGE as Co, ROLE_INTERNAL as Tr, CLIPBOARD_PROMPT as Ta, isProbablyMobile as Je, INPUT_PLACEHOLDER_TEXT_MOBILE as Ca, INPUT_PLACEHOLDER_TEXT_ENTER as Ia, INPUT_PLACEHOLDER_TEXT_CMD_ENTER as xa, FOOTER_DISCLAIMERS as Ra, INPUT_BOTTOM_OFFSET_EXTRA as Io, INPUT_BOTTOM_OFFSET_IPHONE as xo, INPUT_BOTTOM_OFFSET as xn, LOG_OUT as Aa, getMessageContaintWrapperClass as Ro, UI_FOOTER_BUFFER as Rn, UI_BUTTON_SCROLL_BUFFER as Ao, Logo as No, UI_DEFAULT_MAIN_HEIGHT as Na, APP_CLASSNAME as Oo, getMainPaddingClass as Oa, r as $o, LOCAL_STORAGE_SORT as Po, LOCAL_STORAGE_SEARCH as Mo } from "./index.
|
2
|
+
import { Subscribable as ho, pendingThenable as Ea, resolveEnabled as ke, shallowEqualObjects as kr, resolveStaleTime as gt, noop as _r, isServer as Sr, isValidTimeout as ka, focusManager as fo, fetchState as mo, replaceData as _a, notifyManager as Sn, timeUntilStale as po, shouldThrowError as go, useQueryClient as yo, I as re, ACTION_SORT as bo, ACTION_SEARCH as vo, ACTION_RESET_PROMPT as Tn, ACTION_TOGGLE_PROMPT as Cn, le as Ce, DEFAULT_ICON_ACTION_SIZE as Te, isTauri as Wt, n as Ve, isProbablyiPhone as Ae, L as In, j as yt, C as Sa, LOCAL_STORAGE_PREFIX as jt, LOCAL_STORAGE_PRIVATE_DISCLOSURE as wo, LOCAL_STORAGE_REASONING_DISCLOSURE as Eo, TOAST_CHAT_SAVED as ko, TOAST_PROVIDER_CHANGED as _o, PROMPT_CLASSNAME as So, PROMPT_EDITABLE_AREA_CLASSNAME as To, ERROR_MESSAGE as Co, ROLE_INTERNAL as Tr, CLIPBOARD_PROMPT as Ta, isProbablyMobile as Je, INPUT_PLACEHOLDER_TEXT_MOBILE as Ca, INPUT_PLACEHOLDER_TEXT_ENTER as Ia, INPUT_PLACEHOLDER_TEXT_CMD_ENTER as xa, FOOTER_DISCLAIMERS as Ra, INPUT_BOTTOM_OFFSET_EXTRA as Io, INPUT_BOTTOM_OFFSET_IPHONE as xo, INPUT_BOTTOM_OFFSET as xn, LOG_OUT as Aa, getMessageContaintWrapperClass as Ro, UI_FOOTER_BUFFER as Rn, UI_BUTTON_SCROLL_BUFFER as Ao, Logo as No, UI_DEFAULT_MAIN_HEIGHT as Na, APP_CLASSNAME as Oo, getMainPaddingClass as Oa, r as $o, LOCAL_STORAGE_SORT as Po, LOCAL_STORAGE_SEARCH as Mo } from "./index.DK5aa0OB.js";
|
3
3
|
import * as Y from "react";
|
4
4
|
import Z, { useEffect as $, useRef as R, useState as z, useCallback as V, useSyncExternalStore as Lo, useMemo as he, useId as Kr, useContext as X, useLayoutEffect as Oe, createContext as An, useDebugValue as Do, forwardRef as Nn, Suspense as On, lazy as it, useReducer as St } from "react";
|
5
5
|
import p from "clsx";
|
@@ -2164,7 +2164,7 @@ const za = ({
|
|
2164
2164
|
privateChat: r,
|
2165
2165
|
reasoning: a,
|
2166
2166
|
provider: e.provider,
|
2167
|
-
tokenUsage: 0,
|
2167
|
+
tokenUsage: t.payload.preserveTokenUsage ? e.tokenUsage : 0,
|
2168
2168
|
attachments: e.attachments,
|
2169
2169
|
streaming: !1,
|
2170
2170
|
loading: !1,
|
@@ -2223,17 +2223,20 @@ const za = ({
|
|
2223
2223
|
$searchString: String,
|
2224
2224
|
$limit: Float,
|
2225
2225
|
$direction: String,
|
2226
|
+
$sortBy: String,
|
2226
2227
|
$truncateSize: Float) {
|
2227
2228
|
chats(
|
2228
2229
|
user: $user,
|
2229
2230
|
searchString: $searchString,
|
2230
2231
|
limit: $limit,
|
2231
2232
|
direction: $direction,
|
2233
|
+
sortBy: $sortBy,
|
2232
2234
|
truncateSize: $truncateSize) {
|
2233
2235
|
timestamp
|
2234
2236
|
id
|
2235
2237
|
model
|
2236
2238
|
summary
|
2239
|
+
tokenUsage
|
2237
2240
|
messages {
|
2238
2241
|
content
|
2239
2242
|
}
|
@@ -2501,23 +2504,25 @@ const za = ({
|
|
2501
2504
|
user: e,
|
2502
2505
|
searchString: t,
|
2503
2506
|
sortDirection: r,
|
2504
|
-
|
2505
|
-
|
2507
|
+
sortedCell: a,
|
2508
|
+
getAccessToken: n,
|
2509
|
+
enabled: s = !0
|
2506
2510
|
}) => ct({
|
2507
|
-
enabled:
|
2511
|
+
enabled: s,
|
2508
2512
|
staleTime: 60 * 1e3,
|
2509
2513
|
// 1 minute
|
2510
|
-
queryKey: [dt.CHATS, e, t, r],
|
2514
|
+
queryKey: [dt.CHATS, e, t, r, a],
|
2511
2515
|
queryFn: async () => await ut({
|
2512
2516
|
params: {
|
2513
2517
|
user: e,
|
2514
2518
|
searchString: t,
|
2515
2519
|
direction: r,
|
2520
|
+
sortBy: a,
|
2516
2521
|
limit: 1,
|
2517
2522
|
truncateSize: 100
|
2518
2523
|
},
|
2519
2524
|
type: ze.GET_CHATS,
|
2520
|
-
getAccessToken:
|
2525
|
+
getAccessToken: n
|
2521
2526
|
})
|
2522
2527
|
}), Zf = ({
|
2523
2528
|
user: e,
|
@@ -6945,7 +6950,7 @@ const Ye = ({
|
|
6945
6950
|
});
|
6946
6951
|
};
|
6947
6952
|
return /* @__PURE__ */ T(ue, { children: [
|
6948
|
-
l && /* @__PURE__ */
|
6953
|
+
l && /* @__PURE__ */ T(
|
6949
6954
|
Ye,
|
6950
6955
|
{
|
6951
6956
|
showConfirmation: l,
|
@@ -6956,7 +6961,10 @@ const Ye = ({
|
|
6956
6961
|
cancelAction: "Cancel",
|
6957
6962
|
title: "Private Chat"
|
6958
6963
|
},
|
6959
|
-
children:
|
6964
|
+
children: [
|
6965
|
+
/* @__PURE__ */ i("p", { children: "Toggling private chat will start a new chat session." }),
|
6966
|
+
/* @__PURE__ */ i("p", { children: "Your current chat will be automatically saved to your chat history and can be restored or deleted from there if needed." })
|
6967
|
+
]
|
6960
6968
|
}
|
6961
6969
|
),
|
6962
6970
|
o && /* @__PURE__ */ i(
|
@@ -6997,6 +7005,7 @@ const Ye = ({
|
|
6997
7005
|
g && g.preventDefault(), f ? r > 0 ? d(!l) : h() : (u("true"), c(!o));
|
6998
7006
|
},
|
6999
7007
|
className: "text-sm",
|
7008
|
+
disabled: t && r > 0,
|
7000
7009
|
children: t ? /* @__PURE__ */ i(ki, { size: Te }) : /* @__PURE__ */ i(Ni, { size: Te })
|
7001
7010
|
}
|
7002
7011
|
)
|
@@ -7455,7 +7464,7 @@ const nh = (e) => {
|
|
7455
7464
|
] });
|
7456
7465
|
};
|
7457
7466
|
let yr = null, br = null;
|
7458
|
-
const qs = async () => (yr || (yr = import("./index.B8EJY2WR.js")), yr), Ys = async () => (br || (br = import("./index.
|
7467
|
+
const qs = async () => (yr || (yr = import("./index.B8EJY2WR.js")), yr), Ys = async () => (br || (br = import("./index.DK5aa0OB.js").then((e) => e.utilities)), br), oh = async () => {
|
7459
7468
|
try {
|
7460
7469
|
await Promise.all([qs(), Ys()]);
|
7461
7470
|
} catch {
|
@@ -7487,6 +7496,7 @@ const qs = async () => (yr || (yr = import("./index.B8EJY2WR.js")), yr), Ys = as
|
|
7487
7496
|
user: t?.username || "",
|
7488
7497
|
searchString: d.searchString,
|
7489
7498
|
sortDirection: d.sortDirection,
|
7499
|
+
sortedCell: d.sortedCell,
|
7490
7500
|
getAccessToken: r
|
7491
7501
|
}), [u, h] = z(!1), [m, g] = z(!1), y = async () => {
|
7492
7502
|
try {
|
@@ -7509,7 +7519,8 @@ const qs = async () => (yr || (yr = import("./index.B8EJY2WR.js")), yr), Ys = as
|
|
7509
7519
|
}), a({
|
7510
7520
|
type: Qe,
|
7511
7521
|
payload: {
|
7512
|
-
privateChat: !1
|
7522
|
+
privateChat: !1,
|
7523
|
+
preserveTokenUsage: !0
|
7513
7524
|
}
|
7514
7525
|
}), f(), await Xs(ko, {
|
7515
7526
|
containerId: "toggle-save"
|
@@ -7830,6 +7841,7 @@ const qs = async () => (yr || (yr = import("./index.B8EJY2WR.js")), yr), Ys = as
|
|
7830
7841
|
user: e?.username || "",
|
7831
7842
|
searchString: C.searchString,
|
7832
7843
|
sortDirection: C.sortDirection,
|
7844
|
+
sortedCell: C.sortedCell,
|
7833
7845
|
getAccessToken: t
|
7834
7846
|
}), { data: O } = Xt({
|
7835
7847
|
user: e?.username,
|
@@ -8190,17 +8202,17 @@ const qs = async () => (yr || (yr = import("./index.B8EJY2WR.js")), yr), Ys = as
|
|
8190
8202
|
}
|
8191
8203
|
);
|
8192
8204
|
}, Rh = it(
|
8193
|
-
() => import("./ProfileEntry.
|
8205
|
+
() => import("./ProfileEntry.BtERQFK4.js").then((e) => ({ default: e.Profile }))
|
8194
8206
|
), Ah = it(
|
8195
|
-
() => import("./SettingsEntry.
|
8207
|
+
() => import("./SettingsEntry.CHj1q4Pe.js").then((e) => ({
|
8196
8208
|
default: e.SettingsPanel
|
8197
8209
|
}))
|
8198
8210
|
), Nh = it(
|
8199
|
-
() => import("./HistoryEntry.
|
8211
|
+
() => import("./HistoryEntry.C5m-7h3b.js").then((e) => ({ default: e.HistoryPanel }))
|
8200
8212
|
), Oh = it(
|
8201
|
-
() => import("./AboutEntry.
|
8213
|
+
() => import("./AboutEntry.CMvo-j5s.js").then((e) => ({ default: e.About }))
|
8202
8214
|
), $h = it(
|
8203
|
-
() => import("./UsageEntry.
|
8215
|
+
() => import("./UsageEntry.BglkGISL.js").then((e) => ({ default: e.Usage }))
|
8204
8216
|
), Ph = ({ type: e, open: t, onOpenChange: r }) => t ? /* @__PURE__ */ i(On, { fallback: /* @__PURE__ */ i("div", {}), children: (() => {
|
8205
8217
|
switch (e) {
|
8206
8218
|
case "profile":
|
@@ -8220,7 +8232,7 @@ const qs = async () => (yr || (yr = import("./index.B8EJY2WR.js")), yr), Ys = as
|
|
8220
8232
|
isComponent: e = !1
|
8221
8233
|
}) => {
|
8222
8234
|
const { logout: t, getAccessToken: r } = Ve(), [a, n] = z(null), [s, o] = z(!1), [c, l] = z(!1), [d, f] = z(!1), u = V(() => {
|
8223
|
-
d || (import("./ProfileEntry.
|
8235
|
+
d || (import("./ProfileEntry.BtERQFK4.js"), import("./SettingsEntry.CHj1q4Pe.js"), import("./HistoryEntry.C5m-7h3b.js"), import("./AboutEntry.CMvo-j5s.js"), import("./UsageEntry.BglkGISL.js"), f(!0));
|
8224
8236
|
}, [d]), h = V((w) => {
|
8225
8237
|
n(w);
|
8226
8238
|
}, []), m = V(() => {
|
@@ -9820,7 +9832,7 @@ const Pf = ({ content: e }) => /* @__PURE__ */ i(
|
|
9820
9832
|
), _n = 2, Mf = it(
|
9821
9833
|
() => import(
|
9822
9834
|
/* webpackChunkName: "LazyMessageAssistant" */
|
9823
|
-
"./ChatBubbleAssistant.
|
9835
|
+
"./ChatBubbleAssistant.Q0TKW7i_.js"
|
9824
9836
|
)
|
9825
9837
|
), Lf = Z.memo(
|
9826
9838
|
({
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { jsx as Tp } from "react/jsx-runtime";
|
2
|
-
import { getDefaultExportFromCjs as ln } from "./App.
|
2
|
+
import { getDefaultExportFromCjs as ln } from "./App.CxyIxMAe.js";
|
3
3
|
import Ap, { useState as Cp, useEffect as Pp } from "react";
|
4
|
-
import { TRIMESTERS as rn, TRIMESTERS_SHORT as Op, isProbablyMobile as Lp } from "./index.
|
4
|
+
import { TRIMESTERS as rn, TRIMESTERS_SHORT as Op, isProbablyMobile as Lp } from "./index.DK5aa0OB.js";
|
5
5
|
var ls = { exports: {} }, Ep = ls.exports, on;
|
6
6
|
function Ip() {
|
7
7
|
return on || (on = 1, function(ve, ne) {
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import { jsx as T } from "react/jsx-runtime";
|
2
|
-
import { ChatContext as b, E as _, Me as N, Oe as S } from "./App.
|
2
|
+
import { ChatContext as b, E as _, Me as N, Oe as S } from "./App.CxyIxMAe.js";
|
3
3
|
import L from "clsx";
|
4
4
|
import k, { useState as E, useRef as g, useEffect as O, useContext as w } from "react";
|
5
|
-
import { LOCAL_STORAGE_PREFIX as F, LOCAL_STORAGE_CHAT_DETAILS as G, convertCamelCaseToReadable as U, numberFormatter as I, pluralize as P, ROLE_INTERNAL as v } from "./index.
|
6
|
-
import { useMarkdown as y } from "./useMarkdown.
|
5
|
+
import { LOCAL_STORAGE_PREFIX as F, LOCAL_STORAGE_CHAT_DETAILS as G, convertCamelCaseToReadable as U, numberFormatter as I, pluralize as P, ROLE_INTERNAL as v } from "./index.DK5aa0OB.js";
|
6
|
+
import { useMarkdown as y } from "./useMarkdown.wo8gOuZw.js";
|
7
7
|
const D = 2, j = D * 1e3, h = "", q = (e) => e * (2 - e);
|
8
8
|
function V(e, a = !0) {
|
9
9
|
const [i, C] = E(0), [c, p] = E(0), [t, A] = E(e), r = g(0), s = g(0);
|
@@ -0,0 +1,446 @@
|
|
1
|
+
import { jsxs as a, jsx as e, Fragment as te } from "react/jsx-runtime";
|
2
|
+
import { I as H, n as j, INFINITE_SCROLL_LIMIT as P, INFINITE_SCROLL_THRESHOLD as V, LOCAL_STORAGE_PREFIX as q, LOCAL_STORAGE_SORT as se, APP_CLASSNAME as ae, numberFormatter as re, le as z, CARDS as oe, pluralize as ne, ACTION_SORT as $, isProbablyMobile as ce, TOAST_CHAT_DELETED as ie, TOAST_PROVIDER_CHANGED as le, LOCAL_STORAGE_SEARCH as de, HISTORY_TITLE as me, fe as he, debounce as ue, ACTION_SEARCH as pe } from "./index.DK5aa0OB.js";
|
3
|
+
import { HistoryContext as W, ChatContext as X, useAiChat as Ce, E as J, useUserPreferences as ge, ConfirmationPanel as ye, LazyToastContainerWrapper as Se, He as xe, $e as fe, qe as R, Pe as n, Ye as F, Ge as Te, k as ve, a as we, p as De, p$1 as Ne, at as U, Fe as Ee, mutateCall as G, SERVICE_TYPES as Y, showErrorToast as Ae, R as f, O as Ie, n as be, o as ke, setNewProvider as Re, CHAT_SET_PROVIDER as ze, showSuccessToast as _e, CHAT_SET_STATUS as Le, useChatsHistory as He, rr as Oe, a$1 as Me } from "./App.CxyIxMAe.js";
|
4
|
+
import { useRef as _, useState as A, useContext as I, useCallback as Be, useEffect as L, Fragment as Pe } from "react";
|
5
|
+
const Ve = ({
|
6
|
+
className: r,
|
7
|
+
viewBox: c,
|
8
|
+
title: l,
|
9
|
+
monotone: d,
|
10
|
+
...o
|
11
|
+
}) => /* @__PURE__ */ a(
|
12
|
+
H,
|
13
|
+
{
|
14
|
+
defaultViewBox: "0 0 448 512",
|
15
|
+
size: "size-5",
|
16
|
+
viewBox: c,
|
17
|
+
className: r,
|
18
|
+
title: l || "Delete",
|
19
|
+
...o,
|
20
|
+
children: [
|
21
|
+
/* @__PURE__ */ e(
|
22
|
+
"path",
|
23
|
+
{
|
24
|
+
d: "M32 96v352c0 35.3 28.7 64 64 64h256c35.3 0 64-28.7 64-64V96zm80 80c0-8.8 7.2-16 16-16s16 7.2 16 16v224c0 8.8-7.2 16-16 16s-16-7.2-16-16zm96 0c0-8.8 7.2-16 16-16s16 7.2 16 16v224c0 8.8-7.2 16-16 16s-16-7.2-16-16zm96 0c0-8.8 7.2-16 16-16s16 7.2 16 16v224c0 8.8-7.2 16-16 16s-16-7.2-16-16z",
|
25
|
+
opacity: d ? "1" : "0.4"
|
26
|
+
}
|
27
|
+
),
|
28
|
+
/* @__PURE__ */ e("path", { d: "M163.8 0c-12.1 0-23.2 6.8-28.6 17.7L128 32H32C14.3 32 0 46.3 0 64s14.3 32 32 32h384c17.7 0 32-14.3 32-32s-14.3-32-32-32h-96l-7.2-14.3C307.4 6.8 296.3 0 284.2 0z" })
|
29
|
+
]
|
30
|
+
}
|
31
|
+
), $e = ({
|
32
|
+
className: r,
|
33
|
+
viewBox: c,
|
34
|
+
title: l,
|
35
|
+
monotone: d,
|
36
|
+
...o
|
37
|
+
}) => /* @__PURE__ */ a(
|
38
|
+
H,
|
39
|
+
{
|
40
|
+
defaultViewBox: "0 0 512 512",
|
41
|
+
size: "size-5",
|
42
|
+
viewBox: c,
|
43
|
+
className: r,
|
44
|
+
title: l || "Restore",
|
45
|
+
...o,
|
46
|
+
children: [
|
47
|
+
/* @__PURE__ */ e(
|
48
|
+
"path",
|
49
|
+
{
|
50
|
+
d: "M128 80v16h64V80c0-8.8 7.2-16 16-16h224c8.8 0 16 7.2 16 16v224c0 8.8-7.2 16-16 16h-16v64h16c44.2 0 80-35.8 80-80V80c0-44.2-35.8-80-80-80H208c-44.2 0-80 35.8-80 80",
|
51
|
+
opacity: d ? "1" : "0.4"
|
52
|
+
}
|
53
|
+
),
|
54
|
+
/* @__PURE__ */ e("path", { d: "M64 128c-35.3 0-64 28.7-64 64v256c0 35.3 28.7 64 64 64h256c35.3 0 64-28.7 64-64V192c0-35.3-28.7-64-64-64zm32 64h192c17.7 0 32 14.3 32 32s-14.3 32-32 32H96c-17.7 0-32-14.3-32-32s14.3-32 32-32" })
|
55
|
+
]
|
56
|
+
}
|
57
|
+
), Fe = ({
|
58
|
+
className: r,
|
59
|
+
viewBox: c,
|
60
|
+
title: l,
|
61
|
+
monotone: d,
|
62
|
+
...o
|
63
|
+
}) => /* @__PURE__ */ a(
|
64
|
+
H,
|
65
|
+
{
|
66
|
+
defaultViewBox: "0 0 512 512",
|
67
|
+
size: "size-5",
|
68
|
+
viewBox: c,
|
69
|
+
className: r,
|
70
|
+
title: l || "Search",
|
71
|
+
...o,
|
72
|
+
children: [
|
73
|
+
/* @__PURE__ */ e(
|
74
|
+
"path",
|
75
|
+
{
|
76
|
+
d: "M0 208a208 208 0 1 0 416 0 208 208 0 1 0-416 0m352 0a144 144 0 1 1-288 0 144 144 0 1 1 288 0",
|
77
|
+
opacity: d ? "1" : "0.4"
|
78
|
+
}
|
79
|
+
),
|
80
|
+
/* @__PURE__ */ e("path", { d: "m330.7 376 126.7 126.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L376 330.7c-12.7 17.3-28 32.6-45.3 45.3" })
|
81
|
+
]
|
82
|
+
}
|
83
|
+
), Ue = {
|
84
|
+
[ke]: Ne,
|
85
|
+
[be]: De,
|
86
|
+
[Ie]: we
|
87
|
+
}, Ge = ({
|
88
|
+
filteredHistory: r,
|
89
|
+
dispatch: c,
|
90
|
+
onOpenChange: l,
|
91
|
+
mutate: d
|
92
|
+
}) => {
|
93
|
+
const { user: o, getAccessToken: y } = j(), T = ce(), h = _(null), s = _({
|
94
|
+
id: "",
|
95
|
+
timestamp: "",
|
96
|
+
message: ""
|
97
|
+
}), [v, C] = A(!1), [w, S] = A(
|
98
|
+
P + V
|
99
|
+
), { state: u, dispatch: D } = I(W), {
|
100
|
+
state: { provider: N },
|
101
|
+
setChatId: b,
|
102
|
+
setInitialMessages: O
|
103
|
+
} = I(X), { setInput: p } = Ce(), [, M] = J({
|
104
|
+
key: q + se,
|
105
|
+
initialValue: u.sortDirection
|
106
|
+
}), { refetch: K } = ge({
|
107
|
+
user: o?.username,
|
108
|
+
getAccessToken: y
|
109
|
+
}), B = (t) => {
|
110
|
+
switch (u.sortDirection) {
|
111
|
+
case f.ASC:
|
112
|
+
M(f.DESC), D({
|
113
|
+
type: $,
|
114
|
+
payload: {
|
115
|
+
sortedCell: t,
|
116
|
+
sortDirection: f.DESC
|
117
|
+
}
|
118
|
+
});
|
119
|
+
break;
|
120
|
+
default:
|
121
|
+
M(f.ASC), D({
|
122
|
+
type: $,
|
123
|
+
payload: {
|
124
|
+
sortedCell: t,
|
125
|
+
sortDirection: f.ASC
|
126
|
+
}
|
127
|
+
});
|
128
|
+
break;
|
129
|
+
}
|
130
|
+
}, Q = async () => {
|
131
|
+
const t = s.current;
|
132
|
+
try {
|
133
|
+
await G({
|
134
|
+
accessToken: await y(),
|
135
|
+
type: Y.DELETE_CHAT,
|
136
|
+
params: {
|
137
|
+
userId: o?.username || "",
|
138
|
+
id: t.id
|
139
|
+
}
|
140
|
+
}), d(""), await Ae(ie, {
|
141
|
+
autoClose: 2e3,
|
142
|
+
containerId: "history-table"
|
143
|
+
});
|
144
|
+
} catch {
|
145
|
+
}
|
146
|
+
}, Z = async (t, i, x, g, E, k) => {
|
147
|
+
try {
|
148
|
+
const m = await G({
|
149
|
+
accessToken: g,
|
150
|
+
type: Y.GET_CHAT,
|
151
|
+
params: {
|
152
|
+
id: t.id
|
153
|
+
}
|
154
|
+
});
|
155
|
+
m.status === 200 && (m.data.provider !== k && (await Re({
|
156
|
+
provider: m.data.provider,
|
157
|
+
accessToken: g,
|
158
|
+
username: E
|
159
|
+
}), i({
|
160
|
+
type: ze,
|
161
|
+
payload: {
|
162
|
+
provider: m.data.provider
|
163
|
+
}
|
164
|
+
}), K(), await _e(
|
165
|
+
`${le} ${m.data.provider}`,
|
166
|
+
{
|
167
|
+
containerId: "toggle-provider"
|
168
|
+
}
|
169
|
+
)), i({
|
170
|
+
type: Le,
|
171
|
+
payload: {
|
172
|
+
restoring: !0,
|
173
|
+
restoredModel: m.data?.model || "",
|
174
|
+
restoredUsage: m.data?.tokenUsage || 0
|
175
|
+
}
|
176
|
+
}), p(""), b(t.id), O(m.data.messages), x(!1));
|
177
|
+
} catch {
|
178
|
+
}
|
179
|
+
}, ee = Be((t) => {
|
180
|
+
t[0].isIntersecting && S((x) => x + P);
|
181
|
+
}, []);
|
182
|
+
return L(() => {
|
183
|
+
const t = {
|
184
|
+
// root: null,
|
185
|
+
rootMargin: "20px"
|
186
|
+
}, i = new IntersectionObserver(ee, t);
|
187
|
+
h.current && i.observe(h.current);
|
188
|
+
}), /* @__PURE__ */ a(te, { children: [
|
189
|
+
/* @__PURE__ */ a(
|
190
|
+
ye,
|
191
|
+
{
|
192
|
+
showConfirmation: v,
|
193
|
+
setShowConfirmation: C,
|
194
|
+
action: Q,
|
195
|
+
customStrings: {
|
196
|
+
confirmAction: "Delete",
|
197
|
+
cancelAction: "Cancel",
|
198
|
+
title: "Delete chat"
|
199
|
+
},
|
200
|
+
children: [
|
201
|
+
/* @__PURE__ */ e("p", { className: "m-0", children: "Are you sure you want to delete the following chat:" }),
|
202
|
+
/* @__PURE__ */ a("ul", { className: "m-0", children: [
|
203
|
+
/* @__PURE__ */ a("li", { children: [
|
204
|
+
"Timestamp:",
|
205
|
+
" ",
|
206
|
+
/* @__PURE__ */ e("span", { className: "text-lg", children: s.current && s.current.timestamp })
|
207
|
+
] }),
|
208
|
+
/* @__PURE__ */ a("li", { children: [
|
209
|
+
"First message:",
|
210
|
+
" ",
|
211
|
+
/* @__PURE__ */ e("span", { className: "text-lg", children: s.current?.message })
|
212
|
+
] })
|
213
|
+
] })
|
214
|
+
]
|
215
|
+
}
|
216
|
+
),
|
217
|
+
/* @__PURE__ */ e("div", { className: ae, children: /* @__PURE__ */ e(Se, { containerId: "history-table" }) }),
|
218
|
+
/* @__PURE__ */ a(xe, { stickyHeader: !0, stickyFooter: !0, compact: !0, children: [
|
219
|
+
/* @__PURE__ */ e(fe, { children: /* @__PURE__ */ a(R, { children: [
|
220
|
+
/* @__PURE__ */ e(n, { className: "sr-only", children: "Row" }),
|
221
|
+
/* @__PURE__ */ e(
|
222
|
+
F,
|
223
|
+
{
|
224
|
+
buttonClassName: "text-xs sm:text-sm",
|
225
|
+
cellId: "timestamp",
|
226
|
+
align: "left",
|
227
|
+
sortDirection: u.sortDirection,
|
228
|
+
sortedCell: u.sortedCell,
|
229
|
+
onClick: () => {
|
230
|
+
B("timestamp");
|
231
|
+
},
|
232
|
+
children: "Date"
|
233
|
+
}
|
234
|
+
),
|
235
|
+
/* @__PURE__ */ e(n, { className: "text-xs sm:text-sm", children: "Summary" }),
|
236
|
+
/* @__PURE__ */ e(n, { className: "text-xs sm:text-sm", children: "Provider" }),
|
237
|
+
!T && /* @__PURE__ */ e(
|
238
|
+
F,
|
239
|
+
{
|
240
|
+
buttonClassName: "text-xs sm:text-sm",
|
241
|
+
cellId: "tokenUsage",
|
242
|
+
align: "right",
|
243
|
+
sortDirection: u.sortDirection,
|
244
|
+
sortedCell: u.sortedCell,
|
245
|
+
onClick: () => {
|
246
|
+
B("tokenUsage");
|
247
|
+
},
|
248
|
+
children: "Tokens"
|
249
|
+
}
|
250
|
+
),
|
251
|
+
/* @__PURE__ */ e(n, { className: "text-xs sm:text-sm text-right", children: "Actions" })
|
252
|
+
] }) }),
|
253
|
+
/* @__PURE__ */ e(Te, { children: r.slice(0, w).map((t, i) => {
|
254
|
+
const x = t.summary || (t.messages.length > 0 ? t.messages[0]?.content : ""), g = t.model ? ve(t.model) : null, E = g ? Ue[g] : null;
|
255
|
+
return t?.messages?.length > 0 ? /* @__PURE__ */ a(Pe, { children: [
|
256
|
+
i === w - V && /* @__PURE__ */ e("tr", { ref: h }),
|
257
|
+
/* @__PURE__ */ a(R, { children: [
|
258
|
+
/* @__PURE__ */ e(n, { children: i + 1 }),
|
259
|
+
/* @__PURE__ */ e(
|
260
|
+
n,
|
261
|
+
{
|
262
|
+
component: "th",
|
263
|
+
scope: "row",
|
264
|
+
className: "text-gray-400 sm:whitespace-nowrap text-xs sm:text-sm max-w-20 sm:max-w-none",
|
265
|
+
children: t.timestamp.split(",")[0]
|
266
|
+
}
|
267
|
+
),
|
268
|
+
/* @__PURE__ */ e(
|
269
|
+
n,
|
270
|
+
{
|
271
|
+
className: "max-w-[100px] text-white sm:max-w-full text-xs sm:text-sm",
|
272
|
+
style: {
|
273
|
+
wordBreak: "break-word"
|
274
|
+
},
|
275
|
+
children: x
|
276
|
+
}
|
277
|
+
),
|
278
|
+
/* @__PURE__ */ e(
|
279
|
+
n,
|
280
|
+
{
|
281
|
+
component: "th",
|
282
|
+
scope: "row",
|
283
|
+
className: "text-gray-400",
|
284
|
+
align: "center",
|
285
|
+
children: E ? /* @__PURE__ */ e(
|
286
|
+
E,
|
287
|
+
{
|
288
|
+
size: "size-4 sm:size-5",
|
289
|
+
semantic: !0,
|
290
|
+
title: t.model || g
|
291
|
+
}
|
292
|
+
) : null
|
293
|
+
}
|
294
|
+
),
|
295
|
+
!T && /* @__PURE__ */ e(
|
296
|
+
n,
|
297
|
+
{
|
298
|
+
className: "text-gray-400 text-xs sm:text-sm",
|
299
|
+
align: "right",
|
300
|
+
children: t.tokenUsage ? re.format(t.tokenUsage) : "0"
|
301
|
+
}
|
302
|
+
),
|
303
|
+
/* @__PURE__ */ a(n, { align: "right", children: [
|
304
|
+
/* @__PURE__ */ e(
|
305
|
+
U,
|
306
|
+
{
|
307
|
+
label: "Restore chat",
|
308
|
+
mode: "alt-system",
|
309
|
+
placement: "top",
|
310
|
+
trigger: /* @__PURE__ */ e(
|
311
|
+
z,
|
312
|
+
{
|
313
|
+
className: "mr-2",
|
314
|
+
focusMode: "alt-system",
|
315
|
+
noBorder: !0,
|
316
|
+
label: "Restore chat",
|
317
|
+
onClick: async () => {
|
318
|
+
const k = await y();
|
319
|
+
Z(
|
320
|
+
t,
|
321
|
+
c,
|
322
|
+
l,
|
323
|
+
k,
|
324
|
+
o?.username || "",
|
325
|
+
N
|
326
|
+
);
|
327
|
+
},
|
328
|
+
children: /* @__PURE__ */ e($e, { size: "size-3", monotone: !0 })
|
329
|
+
}
|
330
|
+
)
|
331
|
+
}
|
332
|
+
),
|
333
|
+
/* @__PURE__ */ e(
|
334
|
+
U,
|
335
|
+
{
|
336
|
+
label: "Delete chat",
|
337
|
+
mode: "alt-system",
|
338
|
+
placement: "top",
|
339
|
+
trigger: /* @__PURE__ */ e(
|
340
|
+
z,
|
341
|
+
{
|
342
|
+
focusMode: "alt-system",
|
343
|
+
noBorder: !0,
|
344
|
+
label: "Delete chat",
|
345
|
+
onClick: () => {
|
346
|
+
s.current = {
|
347
|
+
id: t.id,
|
348
|
+
timestamp: t.timestamp,
|
349
|
+
message: t.messages.length > 0 ? t.messages[0]?.content : ""
|
350
|
+
}, C(!v);
|
351
|
+
},
|
352
|
+
children: /* @__PURE__ */ e("div", { className: "text-red-400", children: /* @__PURE__ */ e(Ve, { size: "size-3", monotone: !0 }) })
|
353
|
+
}
|
354
|
+
)
|
355
|
+
}
|
356
|
+
)
|
357
|
+
] })
|
358
|
+
] })
|
359
|
+
] }, `${oe.HISTORY.TITLE}-${t.id}-${i}`) : null;
|
360
|
+
}) }),
|
361
|
+
/* @__PURE__ */ e(Ee, { children: /* @__PURE__ */ e(R, { children: /* @__PURE__ */ e(n, { colSpan: 1e3, children: /* @__PURE__ */ e("div", { children: ne(
|
362
|
+
`${r.length} chat`,
|
363
|
+
r.length
|
364
|
+
) }) }) }) })
|
365
|
+
] })
|
366
|
+
] });
|
367
|
+
}, Xe = ({
|
368
|
+
open: r,
|
369
|
+
onOpenChange: c
|
370
|
+
}) => {
|
371
|
+
const { getAccessToken: l, user: d } = j(), { dispatch: o } = I(X), [y, T] = A([]), h = _(null), { state: s, dispatch: v } = I(W), [C, w] = A(
|
372
|
+
s.sortDirection
|
373
|
+
), { data: S, refetch: u } = He({
|
374
|
+
enabled: r,
|
375
|
+
user: d?.username || "",
|
376
|
+
searchString: s.searchString,
|
377
|
+
sortDirection: C,
|
378
|
+
sortedCell: s.sortedCell,
|
379
|
+
getAccessToken: l
|
380
|
+
}), [, D] = J({
|
381
|
+
key: q + de,
|
382
|
+
initialValue: s.searchString
|
383
|
+
});
|
384
|
+
L(() => {
|
385
|
+
s.sortDirection !== C && w(s.sortDirection);
|
386
|
+
}, [s, C]), L(() => {
|
387
|
+
S && T(S);
|
388
|
+
}, [S]);
|
389
|
+
const N = async (p) => {
|
390
|
+
D(p), v({
|
391
|
+
type: pe,
|
392
|
+
payload: { searchString: p }
|
393
|
+
});
|
394
|
+
}, b = ue((p) => {
|
395
|
+
N(p.target.value.trim());
|
396
|
+
}, 500);
|
397
|
+
return /* @__PURE__ */ a(Oe, { open: r, onOpenChange: c, title: me, children: [
|
398
|
+
/* @__PURE__ */ e("form", { autoComplete: "off", onSubmit: async (p) => {
|
399
|
+
p.preventDefault();
|
400
|
+
}, children: /* @__PURE__ */ e(
|
401
|
+
he,
|
402
|
+
{
|
403
|
+
placeholder: "Search",
|
404
|
+
labelHidden: !0,
|
405
|
+
noBorder: !0,
|
406
|
+
autoCapitalize: "off",
|
407
|
+
autoComplete: "off",
|
408
|
+
autoCorrect: "off",
|
409
|
+
ref: h,
|
410
|
+
defaultValue: s.searchString,
|
411
|
+
focusMode: "light",
|
412
|
+
mode: "light",
|
413
|
+
name: "Search",
|
414
|
+
label: "Search",
|
415
|
+
onChange: b,
|
416
|
+
className: "my-2",
|
417
|
+
rightElement: /* @__PURE__ */ e("div", { className: "text-copy-dark", children: /* @__PURE__ */ e(
|
418
|
+
z,
|
419
|
+
{
|
420
|
+
mode: "dark",
|
421
|
+
focusMode: "dark",
|
422
|
+
label: "Search",
|
423
|
+
size: "small",
|
424
|
+
onClick: () => {
|
425
|
+
N(""), h.current?.value && (h.current.value = "", h.current.focus());
|
426
|
+
},
|
427
|
+
disabled: s.searchString === "",
|
428
|
+
children: s.searchString !== "" ? /* @__PURE__ */ e(Me, { monotone: !0, size: "size-3" }) : /* @__PURE__ */ e(Fe, { monotone: !0, size: "size-3" })
|
429
|
+
}
|
430
|
+
) })
|
431
|
+
}
|
432
|
+
) }),
|
433
|
+
/* @__PURE__ */ e("div", { className: "flex flex-col sm:flex-row max-h-[60vh] min-h-[60vh]", children: /* @__PURE__ */ e(
|
434
|
+
Ge,
|
435
|
+
{
|
436
|
+
mutate: u,
|
437
|
+
filteredHistory: y,
|
438
|
+
dispatch: o,
|
439
|
+
onOpenChange: c
|
440
|
+
}
|
441
|
+
) })
|
442
|
+
] });
|
443
|
+
};
|
444
|
+
export {
|
445
|
+
Xe as HistoryPanel
|
446
|
+
};
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { createContext as xe, createSignal as z, onMount as Dt, createEffect as B, createMemo as q, createComponent as m, Portal as qo, memo as me, Show as R, template as _, insert as k, createRenderEffect as N, className as A, clearDelegatedEvents as bs, delegateEvents as ir, useContext as we, onCleanup as U, sortFns as Hn, mutationSortFns as Vn, on as ct, setAttribute as D, getSidedProp as xs, use as Dn, batch as ws, getQueryStatusLabel as Ot, getMutationStatusColor as Rt, getQueryStatusColor as $s, getQueryStatusColorByLabel as Cs, displayValue as xn, For as Ss, convertRemToPixels as Kr, untrack as Kt, useTransition as ks, spread as Es, mergeProps as j, createRoot as Br, serialize as Ms, Index as Ds, updateNestedDataByPath as sr, addEventListener as As, stringify as Ts, Match as zn, Switch as Fs, deleteNestedDataByPath as Is, createUniqueId as Be, splitProps as X, Dynamic as Ps, createComputed as Ls, getPreferredColorScheme as Os } from "./index.
|
1
|
+
import { createContext as xe, createSignal as z, onMount as Dt, createEffect as B, createMemo as q, createComponent as m, Portal as qo, memo as me, Show as R, template as _, insert as k, createRenderEffect as N, className as A, clearDelegatedEvents as bs, delegateEvents as ir, useContext as we, onCleanup as U, sortFns as Hn, mutationSortFns as Vn, on as ct, setAttribute as D, getSidedProp as xs, use as Dn, batch as ws, getQueryStatusLabel as Ot, getMutationStatusColor as Rt, getQueryStatusColor as $s, getQueryStatusColorByLabel as Cs, displayValue as xn, For as Ss, convertRemToPixels as Kr, untrack as Kt, useTransition as ks, spread as Es, mergeProps as j, createRoot as Br, serialize as Ms, Index as Ds, updateNestedDataByPath as sr, addEventListener as As, stringify as Ts, Match as zn, Switch as Fs, deleteNestedDataByPath as Is, createUniqueId as Be, splitProps as X, Dynamic as Ps, createComputed as Ls, getPreferredColorScheme as Os } from "./index.DK5aa0OB.js";
|
2
2
|
var qs = (e) => e != null, _s = (e) => e.filter(qs);
|
3
3
|
function Rs(e) {
|
4
4
|
return (...t) => {
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { jsxs as s, Fragment as m, jsx as e } from "react/jsx-runtime";
|
2
|
-
import { i as h, nt as S, rr as R } from "./App.
|
3
|
-
import { n as N, S as l, renderDataAsList as P, CARDS as r, isTauri as T, le as p, l as E, L as u, j as a, PROFILE_TITLE as C } from "./index.
|
2
|
+
import { i as h, nt as S, rr as R } from "./App.CxyIxMAe.js";
|
3
|
+
import { n as N, S as l, renderDataAsList as P, CARDS as r, isTauri as T, le as p, l as E, L as u, j as a, PROFILE_TITLE as C } from "./index.DK5aa0OB.js";
|
4
4
|
const A = () => {
|
5
5
|
const { isAuthenticated: n, user: i, registeringForPasskey: c, authenticationType: o } = N(), d = h(), t = i?.username || "";
|
6
6
|
return n && t ? /* @__PURE__ */ s(m, { children: [
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { jsxs as N, jsx as l } from "react/jsx-runtime";
|
2
|
-
import { n as ve, LOCAL_STORAGE_PREFIX as se, LOCAL_STORAGE_CHAT_DETAILS as _e, LOCAL_STORAGE_SERVICE_WORKER as we, isServiceWorkerEnabled as Ce, SETTINGS_TITLE as Se, S as U, CARDS as P, APP_NAME as Ie, C as ae, PROMPTS_DESCRIPTION as Ae, L as Re, j as ce, getCurrentGeoLocation as Le, handleServiceWorkerToggle as Oe } from "./index.
|
3
|
-
import { useUserPreferences as Me, E as ie, rr as De, mutateCall as de, SERVICE_TYPES as ue } from "./App.
|
2
|
+
import { n as ve, LOCAL_STORAGE_PREFIX as se, LOCAL_STORAGE_CHAT_DETAILS as _e, LOCAL_STORAGE_SERVICE_WORKER as we, isServiceWorkerEnabled as Ce, SETTINGS_TITLE as Se, S as U, CARDS as P, APP_NAME as Ie, C as ae, PROMPTS_DESCRIPTION as Ae, L as Re, j as ce, getCurrentGeoLocation as Le, handleServiceWorkerToggle as Oe } from "./index.DK5aa0OB.js";
|
3
|
+
import { useUserPreferences as Me, E as ie, rr as De, mutateCall as de, SERVICE_TYPES as ue } from "./App.CxyIxMAe.js";
|
4
4
|
import Pe, { useRef as v, useState as y, useLayoutEffect as z, useMemo as pe, useEffect as j, useId as Ge, useReducer as Be, useCallback as He } from "react";
|
5
5
|
import i from "clsx";
|
6
6
|
const he = "av-text-area", Ve = "av-text-area-wrapper", oe = "av-text-area-helper-text", Ue = "av-text-area__control--right", $e = "av-text-area__control--left";
|
@@ -1,10 +1,10 @@
|
|
1
1
|
import { jsxs as l, jsx as e } from "react/jsx-runtime";
|
2
|
-
import { n as f, USAGE_TITLE as U, S as T, renderDataAsList as v, CARDS as n, L as E, j as L, C as S, pluralize as i } from "./index.
|
3
|
-
import { i as M, useUserChatStats as _, useChatsUsage as D, rr as z } from "./App.
|
2
|
+
import { n as f, USAGE_TITLE as U, S as T, renderDataAsList as v, CARDS as n, L as E, j as L, C as S, pluralize as i } from "./index.DK5aa0OB.js";
|
3
|
+
import { i as M, useUserChatStats as _, useChatsUsage as D, rr as z } from "./App.CxyIxMAe.js";
|
4
4
|
import { useState as O, Suspense as P, lazy as j } from "react";
|
5
5
|
const s = [0, 3, 6, 9], G = j(() => import(
|
6
6
|
/* webpackChunkName: "LazyChart" */
|
7
|
-
"./Chart.
|
7
|
+
"./Chart.CYfLEQow.js"
|
8
8
|
)), w = ({
|
9
9
|
open: m,
|
10
10
|
onOpenChange: I
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { convert as se, visitParents as Me, unicodeWhitespace as I, unicodePunctuation as N, normalizeIdentifier as _, classifyCharacter as W, visit as _e, toString as ce, EXIT as Oe, asciiAlphanumeric as Z, asciiAlpha as P, markdownLineEndingOrSpace as A, asciiControl as je, blankLine as Be, factorySpace as S, splice as q, resolveAll as We, markdownLineEnding as R, markdownSpace as T, combineExtensions as $e } from "./useMarkdown.
|
1
|
+
import { convert as se, visitParents as Me, unicodeWhitespace as I, unicodePunctuation as N, normalizeIdentifier as _, classifyCharacter as W, visit as _e, toString as ce, EXIT as Oe, asciiAlphanumeric as Z, asciiAlpha as P, markdownLineEndingOrSpace as A, asciiControl as je, blankLine as Be, factorySpace as S, splice as q, resolveAll as We, markdownLineEnding as R, markdownSpace as T, combineExtensions as $e } from "./useMarkdown.wo8gOuZw.js";
|
2
2
|
import { longestStreak as qe } from "./index.Cyw5OC0t.js";
|
3
3
|
function ne(e, n) {
|
4
4
|
const t = String(e);
|
@@ -3078,7 +3078,7 @@ var gu = (e, t = !1) => {
|
|
3078
3078
|
const t = Li(() => {
|
3079
3079
|
const r = this, [n] = this.#i, [s] = this.#c, [i] = this.#l, [a] = this.#u, [o] = this.#f, [c] = this.#e;
|
3080
3080
|
let d;
|
3081
|
-
return this.#d ? d = this.#d : (d = Ii(() => import("./LNWAZHJI.
|
3081
|
+
return this.#d ? d = this.#d : (d = Ii(() => import("./LNWAZHJI.COg-zQKp.js")), this.#d = d), Ca(this.#o, this.#a), Ei(d, Ti({
|
3082
3082
|
get queryFlavor() {
|
3083
3083
|
return r.#r;
|
3084
3084
|
},
|
@@ -7310,7 +7310,7 @@ Press Ctrl+Enter to send it or Enter for new line.`, ud = "{{clipboard}}", L = "
|
|
7310
7310
|
);
|
7311
7311
|
}, Fl = new URL(document.location.href).searchParams, on = !!Fl.get("debug") || !1, Kl = Ds(() => import(
|
7312
7312
|
/* webpackChunkName: "LazyApp" */
|
7313
|
-
"./App.
|
7313
|
+
"./App.CxyIxMAe.js"
|
7314
7314
|
).then((e) => e.App)), Hl = new si(), cn = ({
|
7315
7315
|
isComponent: e,
|
7316
7316
|
headerHeight: t
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import { getDefaultExportFromCjs as kn } from "./App.
|
2
|
-
import { visit as In } from "./useMarkdown.
|
3
|
-
import { toText as Cn } from "./index.
|
1
|
+
import { getDefaultExportFromCjs as kn } from "./App.CxyIxMAe.js";
|
2
|
+
import { visit as In } from "./useMarkdown.wo8gOuZw.js";
|
3
|
+
import { toText as Cn } from "./index.CeAv-M6m.js";
|
4
4
|
function xn(e) {
|
5
5
|
const t = e.regex, i = e.COMMENT("//", "$", { contains: [{ begin: /\\\n/ }] }), a = "decltype\\(auto\\)", r = "[a-zA-Z_]\\w*::", d = "(?!struct)(" + a + "|" + t.optional(r) + "[a-zA-Z_]\\w*" + t.optional("<[^<>]+>") + ")", c = {
|
6
6
|
className: "type",
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { find as Aa, parse as Ft, parse$1 as Ht, normalize as Pt, html as Ta, svg as Ba, visitParents as Na, SKIP as Da } from "./useMarkdown.
|
2
|
-
import { toText as Ca } from "./index.
|
1
|
+
import { find as Aa, parse as Ft, parse$1 as Ht, normalize as Pt, html as Ta, svg as Ba, visitParents as Na, SKIP as Da } from "./useMarkdown.wo8gOuZw.js";
|
2
|
+
import { toText as Ca } from "./index.CeAv-M6m.js";
|
3
3
|
const Gt = /[#.]/g;
|
4
4
|
function qa(r, e) {
|
5
5
|
const t = r || "", a = {};
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import * as rn from "react/jsx-runtime";
|
2
2
|
import { jsx as ae, jsxs as Pn, Fragment as Ir } from "react/jsx-runtime";
|
3
|
-
import { le as Tr, isTauri as Pr, unObfuscate as Ar, obfuscate as zr } from "./index.
|
3
|
+
import { le as Tr, isTauri as Pr, unObfuscate as Ar, obfuscate as zr } from "./index.DK5aa0OB.js";
|
4
4
|
import Lr, { useState as Lt, useEffect as _t, useCallback as vt, useRef as Re } from "react";
|
5
|
-
import { getDefaultExportFromCjs as Nt } from "./App.
|
5
|
+
import { getDefaultExportFromCjs as Nt } from "./App.CxyIxMAe.js";
|
6
6
|
import _r from "clsx";
|
7
7
|
const Rt = ({
|
8
8
|
children: e,
|
@@ -6897,7 +6897,7 @@ class su {
|
|
6897
6897
|
if (!this.remarkGfm) {
|
6898
6898
|
const { default: n } = await import(
|
6899
6899
|
/* webpackChunkName: "LazyRemarkGfm" */
|
6900
|
-
"./index.
|
6900
|
+
"./index.ALcXlUu1.js"
|
6901
6901
|
);
|
6902
6902
|
this.remarkGfm = n;
|
6903
6903
|
}
|
@@ -6908,7 +6908,7 @@ class su {
|
|
6908
6908
|
mu("https://cdn.jsdelivr.net/npm/katex@latest/dist/katex.min.css");
|
6909
6909
|
const { default: n } = await import(
|
6910
6910
|
/* webpackChunkName: "LazyRehypeKatex" */
|
6911
|
-
"./index.
|
6911
|
+
"./index.Tr_z3XM6.js"
|
6912
6912
|
);
|
6913
6913
|
this.rehypeKatex = n;
|
6914
6914
|
}
|
@@ -6918,7 +6918,7 @@ class su {
|
|
6918
6918
|
if (!this.remarkMath) {
|
6919
6919
|
const { default: n } = await import(
|
6920
6920
|
/* webpackChunkName: "LazyRemarkMath" */
|
6921
|
-
"./index.
|
6921
|
+
"./index.DNY9KnJU.js"
|
6922
6922
|
);
|
6923
6923
|
this.remarkMath = n;
|
6924
6924
|
}
|
@@ -6928,7 +6928,7 @@ class su {
|
|
6928
6928
|
if (!this.rehypeHighlight) {
|
6929
6929
|
const { default: n } = await import(
|
6930
6930
|
/* webpackChunkName: "LazyRehypeHighlight" */
|
6931
|
-
"./index.
|
6931
|
+
"./index.DakkVauF.js"
|
6932
6932
|
);
|
6933
6933
|
this.rehypeHighlight = n;
|
6934
6934
|
}
|
package/dist/index.js
CHANGED
@@ -1,12 +1,12 @@
|
|
1
|
-
import { SassySaint as r } from "./chunks/index.
|
1
|
+
import { SassySaint as r } from "./chunks/index.DK5aa0OB.js";
|
2
2
|
/*!
|
3
|
-
@sassysaint/client v8.
|
3
|
+
@sassysaint/client v8.34.0
|
4
4
|
© 2025 gizmette.com
|
5
5
|
*/
|
6
6
|
try {
|
7
7
|
window.__VERSINI_SASSY_GLOBAL__ || (window.__VERSINI_SASSY_GLOBAL__ = {
|
8
|
-
version: "8.
|
9
|
-
buildTime: "08/04/2025
|
8
|
+
version: "8.34.0",
|
9
|
+
buildTime: "08/04/2025 10:24 PM EDT",
|
10
10
|
license: "MIT"
|
11
11
|
});
|
12
12
|
} catch {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@versini/sassysaint",
|
3
|
-
"version": "8.
|
3
|
+
"version": "8.34.0",
|
4
4
|
"license": "MIT",
|
5
5
|
"author": "Arno Versini",
|
6
6
|
"publishConfig": {
|
@@ -31,7 +31,7 @@
|
|
31
31
|
"react-dom": "^18.3.1 || ^19.0.0"
|
32
32
|
},
|
33
33
|
"devDependencies": {
|
34
|
-
"@sassysaint/client": "8.
|
34
|
+
"@sassysaint/client": "8.34.0",
|
35
35
|
"@tailwindcss/vite": "4.1.11",
|
36
36
|
"@versini/ui-styles": "5.0.7"
|
37
37
|
},
|
@@ -43,5 +43,5 @@
|
|
43
43
|
"sideEffects": [
|
44
44
|
"**/*.css"
|
45
45
|
],
|
46
|
-
"gitHead": "
|
46
|
+
"gitHead": "1bc9915131e84f173f4d855377e233346e6c84e3"
|
47
47
|
}
|
@@ -1,423 +0,0 @@
|
|
1
|
-
import { jsxs as s, jsx as e, Fragment as Z } from "react/jsx-runtime";
|
2
|
-
import { I as H, n as G, INFINITE_SCROLL_LIMIT as M, INFINITE_SCROLL_THRESHOLD as B, LOCAL_STORAGE_PREFIX as U, LOCAL_STORAGE_SORT as ee, APP_CLASSNAME as te, le as b, CARDS as se, pluralize as ae, ACTION_SORT as V, TOAST_CHAT_DELETED as re, TOAST_PROVIDER_CHANGED as oe, LOCAL_STORAGE_SEARCH as ce, HISTORY_TITLE as ne, fe as ie, debounce as le, ACTION_SEARCH as de } from "./index.B8_rjxw5.js";
|
3
|
-
import { HistoryContext as Y, ChatContext as j, useAiChat as me, E as q, useUserPreferences as he, ConfirmationPanel as ue, LazyToastContainerWrapper as pe, He as Ce, $e as Se, qe as _, Pe as l, Ye as ge, Ge as ye, k as fe, a as xe, p as Te, p$1 as ve, at as $, Fe as we, mutateCall as P, SERVICE_TYPES as F, showErrorToast as Ee, R as x, O as De, n as Ne, o as Ae, setNewProvider as Ie, CHAT_SET_PROVIDER as Re, showSuccessToast as ze, CHAT_SET_STATUS as _e, useChatsHistory as be, rr as ke, a$1 as Le } from "./App.HkhGwSuN.js";
|
4
|
-
import { useRef as k, useState as D, useContext as N, useCallback as He, useEffect as L, Fragment as Oe } from "react";
|
5
|
-
const Me = ({
|
6
|
-
className: a,
|
7
|
-
viewBox: c,
|
8
|
-
title: d,
|
9
|
-
monotone: m,
|
10
|
-
...o
|
11
|
-
}) => /* @__PURE__ */ s(
|
12
|
-
H,
|
13
|
-
{
|
14
|
-
defaultViewBox: "0 0 448 512",
|
15
|
-
size: "size-5",
|
16
|
-
viewBox: c,
|
17
|
-
className: a,
|
18
|
-
title: d || "Delete",
|
19
|
-
...o,
|
20
|
-
children: [
|
21
|
-
/* @__PURE__ */ e(
|
22
|
-
"path",
|
23
|
-
{
|
24
|
-
d: "M32 96v352c0 35.3 28.7 64 64 64h256c35.3 0 64-28.7 64-64V96zm80 80c0-8.8 7.2-16 16-16s16 7.2 16 16v224c0 8.8-7.2 16-16 16s-16-7.2-16-16zm96 0c0-8.8 7.2-16 16-16s16 7.2 16 16v224c0 8.8-7.2 16-16 16s-16-7.2-16-16zm96 0c0-8.8 7.2-16 16-16s16 7.2 16 16v224c0 8.8-7.2 16-16 16s-16-7.2-16-16z",
|
25
|
-
opacity: m ? "1" : "0.4"
|
26
|
-
}
|
27
|
-
),
|
28
|
-
/* @__PURE__ */ e("path", { d: "M163.8 0c-12.1 0-23.2 6.8-28.6 17.7L128 32H32C14.3 32 0 46.3 0 64s14.3 32 32 32h384c17.7 0 32-14.3 32-32s-14.3-32-32-32h-96l-7.2-14.3C307.4 6.8 296.3 0 284.2 0z" })
|
29
|
-
]
|
30
|
-
}
|
31
|
-
), Be = ({
|
32
|
-
className: a,
|
33
|
-
viewBox: c,
|
34
|
-
title: d,
|
35
|
-
monotone: m,
|
36
|
-
...o
|
37
|
-
}) => /* @__PURE__ */ s(
|
38
|
-
H,
|
39
|
-
{
|
40
|
-
defaultViewBox: "0 0 512 512",
|
41
|
-
size: "size-5",
|
42
|
-
viewBox: c,
|
43
|
-
className: a,
|
44
|
-
title: d || "Restore",
|
45
|
-
...o,
|
46
|
-
children: [
|
47
|
-
/* @__PURE__ */ e(
|
48
|
-
"path",
|
49
|
-
{
|
50
|
-
d: "M128 80v16h64V80c0-8.8 7.2-16 16-16h224c8.8 0 16 7.2 16 16v224c0 8.8-7.2 16-16 16h-16v64h16c44.2 0 80-35.8 80-80V80c0-44.2-35.8-80-80-80H208c-44.2 0-80 35.8-80 80",
|
51
|
-
opacity: m ? "1" : "0.4"
|
52
|
-
}
|
53
|
-
),
|
54
|
-
/* @__PURE__ */ e("path", { d: "M64 128c-35.3 0-64 28.7-64 64v256c0 35.3 28.7 64 64 64h256c35.3 0 64-28.7 64-64V192c0-35.3-28.7-64-64-64zm32 64h192c17.7 0 32 14.3 32 32s-14.3 32-32 32H96c-17.7 0-32-14.3-32-32s14.3-32 32-32" })
|
55
|
-
]
|
56
|
-
}
|
57
|
-
), Ve = ({
|
58
|
-
className: a,
|
59
|
-
viewBox: c,
|
60
|
-
title: d,
|
61
|
-
monotone: m,
|
62
|
-
...o
|
63
|
-
}) => /* @__PURE__ */ s(
|
64
|
-
H,
|
65
|
-
{
|
66
|
-
defaultViewBox: "0 0 512 512",
|
67
|
-
size: "size-5",
|
68
|
-
viewBox: c,
|
69
|
-
className: a,
|
70
|
-
title: d || "Search",
|
71
|
-
...o,
|
72
|
-
children: [
|
73
|
-
/* @__PURE__ */ e(
|
74
|
-
"path",
|
75
|
-
{
|
76
|
-
d: "M0 208a208 208 0 1 0 416 0 208 208 0 1 0-416 0m352 0a144 144 0 1 1-288 0 144 144 0 1 1 288 0",
|
77
|
-
opacity: m ? "1" : "0.4"
|
78
|
-
}
|
79
|
-
),
|
80
|
-
/* @__PURE__ */ e("path", { d: "m330.7 376 126.7 126.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L376 330.7c-12.7 17.3-28 32.6-45.3 45.3" })
|
81
|
-
]
|
82
|
-
}
|
83
|
-
), $e = {
|
84
|
-
[Ae]: ve,
|
85
|
-
[Ne]: Te,
|
86
|
-
[De]: xe
|
87
|
-
}, Pe = ({
|
88
|
-
filteredHistory: a,
|
89
|
-
dispatch: c,
|
90
|
-
onOpenChange: d,
|
91
|
-
mutate: m
|
92
|
-
}) => {
|
93
|
-
const { user: o, getAccessToken: g } = G(), y = k(null), n = k({
|
94
|
-
id: "",
|
95
|
-
timestamp: "",
|
96
|
-
message: ""
|
97
|
-
}), [r, T] = D(!1), [C, A] = D(
|
98
|
-
M + B
|
99
|
-
), { state: p, dispatch: v } = N(Y), {
|
100
|
-
state: { provider: I },
|
101
|
-
setChatId: w,
|
102
|
-
setInitialMessages: R
|
103
|
-
} = N(j), { setInput: O } = me(), [, h] = q({
|
104
|
-
key: U + ee,
|
105
|
-
initialValue: p.sortDirection
|
106
|
-
}), { refetch: W } = he({
|
107
|
-
user: o?.username,
|
108
|
-
getAccessToken: g
|
109
|
-
}), X = (t) => {
|
110
|
-
switch (p.sortDirection) {
|
111
|
-
case x.ASC:
|
112
|
-
h(x.DESC), v({
|
113
|
-
type: V,
|
114
|
-
payload: {
|
115
|
-
sortedCell: t,
|
116
|
-
sortDirection: x.DESC
|
117
|
-
}
|
118
|
-
});
|
119
|
-
break;
|
120
|
-
default:
|
121
|
-
h(x.ASC), v({
|
122
|
-
type: V,
|
123
|
-
payload: {
|
124
|
-
sortedCell: t,
|
125
|
-
sortDirection: x.ASC
|
126
|
-
}
|
127
|
-
});
|
128
|
-
break;
|
129
|
-
}
|
130
|
-
}, J = async () => {
|
131
|
-
const t = n.current;
|
132
|
-
try {
|
133
|
-
await P({
|
134
|
-
accessToken: await g(),
|
135
|
-
type: F.DELETE_CHAT,
|
136
|
-
params: {
|
137
|
-
userId: o?.username || "",
|
138
|
-
id: t.id
|
139
|
-
}
|
140
|
-
}), m(""), await Ee(re, {
|
141
|
-
autoClose: 2e3,
|
142
|
-
containerId: "history-table"
|
143
|
-
});
|
144
|
-
} catch {
|
145
|
-
}
|
146
|
-
}, K = async (t, i, f, S, E, z) => {
|
147
|
-
try {
|
148
|
-
const u = await P({
|
149
|
-
accessToken: S,
|
150
|
-
type: F.GET_CHAT,
|
151
|
-
params: {
|
152
|
-
id: t.id
|
153
|
-
}
|
154
|
-
});
|
155
|
-
u.status === 200 && (u.data.provider !== z && (await Ie({
|
156
|
-
provider: u.data.provider,
|
157
|
-
accessToken: S,
|
158
|
-
username: E
|
159
|
-
}), i({
|
160
|
-
type: Re,
|
161
|
-
payload: {
|
162
|
-
provider: u.data.provider
|
163
|
-
}
|
164
|
-
}), W(), await ze(
|
165
|
-
`${oe} ${u.data.provider}`,
|
166
|
-
{
|
167
|
-
containerId: "toggle-provider"
|
168
|
-
}
|
169
|
-
)), i({
|
170
|
-
type: _e,
|
171
|
-
payload: {
|
172
|
-
restoring: !0,
|
173
|
-
restoredModel: u.data?.model || "",
|
174
|
-
restoredUsage: u.data?.tokenUsage || 0
|
175
|
-
}
|
176
|
-
}), O(""), w(t.id), R(u.data.messages), f(!1));
|
177
|
-
} catch {
|
178
|
-
}
|
179
|
-
}, Q = He((t) => {
|
180
|
-
t[0].isIntersecting && A((f) => f + M);
|
181
|
-
}, []);
|
182
|
-
return L(() => {
|
183
|
-
const t = {
|
184
|
-
// root: null,
|
185
|
-
rootMargin: "20px"
|
186
|
-
}, i = new IntersectionObserver(Q, t);
|
187
|
-
y.current && i.observe(y.current);
|
188
|
-
}), /* @__PURE__ */ s(Z, { children: [
|
189
|
-
/* @__PURE__ */ s(
|
190
|
-
ue,
|
191
|
-
{
|
192
|
-
showConfirmation: r,
|
193
|
-
setShowConfirmation: T,
|
194
|
-
action: J,
|
195
|
-
customStrings: {
|
196
|
-
confirmAction: "Delete",
|
197
|
-
cancelAction: "Cancel",
|
198
|
-
title: "Delete chat"
|
199
|
-
},
|
200
|
-
children: [
|
201
|
-
/* @__PURE__ */ e("p", { className: "m-0", children: "Are you sure you want to delete the following chat:" }),
|
202
|
-
/* @__PURE__ */ s("ul", { className: "m-0", children: [
|
203
|
-
/* @__PURE__ */ s("li", { children: [
|
204
|
-
"Timestamp:",
|
205
|
-
" ",
|
206
|
-
/* @__PURE__ */ e("span", { className: "text-lg", children: n.current && n.current.timestamp })
|
207
|
-
] }),
|
208
|
-
/* @__PURE__ */ s("li", { children: [
|
209
|
-
"First message:",
|
210
|
-
" ",
|
211
|
-
/* @__PURE__ */ e("span", { className: "text-lg", children: n.current?.message })
|
212
|
-
] })
|
213
|
-
] })
|
214
|
-
]
|
215
|
-
}
|
216
|
-
),
|
217
|
-
/* @__PURE__ */ e("div", { className: te, children: /* @__PURE__ */ e(pe, { containerId: "history-table" }) }),
|
218
|
-
/* @__PURE__ */ s(Ce, { stickyHeader: !0, stickyFooter: !0, compact: !0, children: [
|
219
|
-
/* @__PURE__ */ e(Se, { children: /* @__PURE__ */ s(_, { children: [
|
220
|
-
/* @__PURE__ */ e(l, { className: "sr-only", children: "Row" }),
|
221
|
-
/* @__PURE__ */ e(
|
222
|
-
ge,
|
223
|
-
{
|
224
|
-
buttonClassName: "text-xs sm:text-sm",
|
225
|
-
cellId: "timestamp",
|
226
|
-
align: "left",
|
227
|
-
sortDirection: p.sortDirection,
|
228
|
-
sortedCell: p.sortedCell,
|
229
|
-
onClick: () => {
|
230
|
-
X("timestamp");
|
231
|
-
},
|
232
|
-
children: "Date"
|
233
|
-
}
|
234
|
-
),
|
235
|
-
/* @__PURE__ */ e(l, { className: "text-xs sm:text-sm", children: "Summary" }),
|
236
|
-
/* @__PURE__ */ e(l, { className: "text-xs sm:text-sm", children: "Provider" }),
|
237
|
-
/* @__PURE__ */ e(l, { className: "text-xs sm:text-sm text-right", children: "Actions" })
|
238
|
-
] }) }),
|
239
|
-
/* @__PURE__ */ e(ye, { children: a.slice(0, C).map((t, i) => {
|
240
|
-
const f = t.summary || (t.messages.length > 0 ? t.messages[0]?.content : ""), S = t.model ? fe(t.model) : null, E = S ? $e[S] : null;
|
241
|
-
return t?.messages?.length > 0 ? /* @__PURE__ */ s(Oe, { children: [
|
242
|
-
i === C - B && /* @__PURE__ */ e("tr", { ref: y }),
|
243
|
-
/* @__PURE__ */ s(_, { children: [
|
244
|
-
/* @__PURE__ */ e(l, { children: i + 1 }),
|
245
|
-
/* @__PURE__ */ e(
|
246
|
-
l,
|
247
|
-
{
|
248
|
-
component: "th",
|
249
|
-
scope: "row",
|
250
|
-
className: "text-gray-400 sm:whitespace-nowrap text-xs sm:text-sm max-w-20 sm:max-w-none",
|
251
|
-
children: t.timestamp.split(",")[0]
|
252
|
-
}
|
253
|
-
),
|
254
|
-
/* @__PURE__ */ e(
|
255
|
-
l,
|
256
|
-
{
|
257
|
-
className: "max-w-[100px] text-white sm:max-w-full text-xs sm:text-sm",
|
258
|
-
style: {
|
259
|
-
wordBreak: "break-word"
|
260
|
-
},
|
261
|
-
children: f
|
262
|
-
}
|
263
|
-
),
|
264
|
-
/* @__PURE__ */ e(
|
265
|
-
l,
|
266
|
-
{
|
267
|
-
component: "th",
|
268
|
-
scope: "row",
|
269
|
-
className: "text-gray-400",
|
270
|
-
align: "center",
|
271
|
-
children: E ? /* @__PURE__ */ e(
|
272
|
-
E,
|
273
|
-
{
|
274
|
-
size: "size-4 sm:size-5",
|
275
|
-
semantic: !0,
|
276
|
-
title: t.model || S
|
277
|
-
}
|
278
|
-
) : null
|
279
|
-
}
|
280
|
-
),
|
281
|
-
/* @__PURE__ */ s(l, { align: "right", children: [
|
282
|
-
/* @__PURE__ */ e(
|
283
|
-
$,
|
284
|
-
{
|
285
|
-
label: "Restore chat",
|
286
|
-
mode: "alt-system",
|
287
|
-
placement: "top",
|
288
|
-
trigger: /* @__PURE__ */ e(
|
289
|
-
b,
|
290
|
-
{
|
291
|
-
className: "mr-2",
|
292
|
-
focusMode: "alt-system",
|
293
|
-
noBorder: !0,
|
294
|
-
label: "Restore chat",
|
295
|
-
onClick: async () => {
|
296
|
-
const z = await g();
|
297
|
-
K(
|
298
|
-
t,
|
299
|
-
c,
|
300
|
-
d,
|
301
|
-
z,
|
302
|
-
o?.username || "",
|
303
|
-
I
|
304
|
-
);
|
305
|
-
},
|
306
|
-
children: /* @__PURE__ */ e(Be, { size: "size-3", monotone: !0 })
|
307
|
-
}
|
308
|
-
)
|
309
|
-
}
|
310
|
-
),
|
311
|
-
/* @__PURE__ */ e(
|
312
|
-
$,
|
313
|
-
{
|
314
|
-
label: "Delete chat",
|
315
|
-
mode: "alt-system",
|
316
|
-
placement: "top",
|
317
|
-
trigger: /* @__PURE__ */ e(
|
318
|
-
b,
|
319
|
-
{
|
320
|
-
focusMode: "alt-system",
|
321
|
-
noBorder: !0,
|
322
|
-
label: "Delete chat",
|
323
|
-
onClick: () => {
|
324
|
-
n.current = {
|
325
|
-
id: t.id,
|
326
|
-
timestamp: t.timestamp,
|
327
|
-
message: t.messages.length > 0 ? t.messages[0]?.content : ""
|
328
|
-
}, T(!r);
|
329
|
-
},
|
330
|
-
children: /* @__PURE__ */ e("div", { className: "text-red-400", children: /* @__PURE__ */ e(Me, { size: "size-3", monotone: !0 }) })
|
331
|
-
}
|
332
|
-
)
|
333
|
-
}
|
334
|
-
)
|
335
|
-
] })
|
336
|
-
] })
|
337
|
-
] }, `${se.HISTORY.TITLE}-${t.id}-${i}`) : null;
|
338
|
-
}) }),
|
339
|
-
/* @__PURE__ */ e(we, { children: /* @__PURE__ */ e(_, { children: /* @__PURE__ */ e(l, { colSpan: 1e3, children: /* @__PURE__ */ e("div", { children: ae(
|
340
|
-
`${a.length} chat`,
|
341
|
-
a.length
|
342
|
-
) }) }) }) })
|
343
|
-
] })
|
344
|
-
] });
|
345
|
-
}, je = ({
|
346
|
-
open: a,
|
347
|
-
onOpenChange: c
|
348
|
-
}) => {
|
349
|
-
const { getAccessToken: d, user: m } = G(), { dispatch: o } = N(j), [g, y] = D([]), n = k(null), { state: r, dispatch: T } = N(Y), [C, A] = D(
|
350
|
-
r.sortDirection
|
351
|
-
), { data: p, refetch: v } = be({
|
352
|
-
enabled: a,
|
353
|
-
user: m?.username || "",
|
354
|
-
searchString: r.searchString,
|
355
|
-
sortDirection: C,
|
356
|
-
getAccessToken: d
|
357
|
-
}), [, I] = q({
|
358
|
-
key: U + ce,
|
359
|
-
initialValue: r.searchString
|
360
|
-
});
|
361
|
-
L(() => {
|
362
|
-
r.sortDirection !== C && A(r.sortDirection);
|
363
|
-
}, [r, C]), L(() => {
|
364
|
-
p && y(p);
|
365
|
-
}, [p]);
|
366
|
-
const w = async (h) => {
|
367
|
-
I(h), T({
|
368
|
-
type: de,
|
369
|
-
payload: { searchString: h }
|
370
|
-
});
|
371
|
-
}, R = le((h) => {
|
372
|
-
w(h.target.value.trim());
|
373
|
-
}, 500);
|
374
|
-
return /* @__PURE__ */ s(ke, { open: a, onOpenChange: c, title: ne, children: [
|
375
|
-
/* @__PURE__ */ e("form", { autoComplete: "off", onSubmit: async (h) => {
|
376
|
-
h.preventDefault();
|
377
|
-
}, children: /* @__PURE__ */ e(
|
378
|
-
ie,
|
379
|
-
{
|
380
|
-
placeholder: "Search",
|
381
|
-
labelHidden: !0,
|
382
|
-
noBorder: !0,
|
383
|
-
autoCapitalize: "off",
|
384
|
-
autoComplete: "off",
|
385
|
-
autoCorrect: "off",
|
386
|
-
ref: n,
|
387
|
-
defaultValue: r.searchString,
|
388
|
-
focusMode: "light",
|
389
|
-
mode: "light",
|
390
|
-
name: "Search",
|
391
|
-
label: "Search",
|
392
|
-
onChange: R,
|
393
|
-
className: "my-2",
|
394
|
-
rightElement: /* @__PURE__ */ e("div", { className: "text-copy-dark", children: /* @__PURE__ */ e(
|
395
|
-
b,
|
396
|
-
{
|
397
|
-
mode: "dark",
|
398
|
-
focusMode: "dark",
|
399
|
-
label: "Search",
|
400
|
-
size: "small",
|
401
|
-
onClick: () => {
|
402
|
-
w(""), n.current?.value && (n.current.value = "", n.current.focus());
|
403
|
-
},
|
404
|
-
disabled: r.searchString === "",
|
405
|
-
children: r.searchString !== "" ? /* @__PURE__ */ e(Le, { monotone: !0, size: "size-3" }) : /* @__PURE__ */ e(Ve, { monotone: !0, size: "size-3" })
|
406
|
-
}
|
407
|
-
) })
|
408
|
-
}
|
409
|
-
) }),
|
410
|
-
/* @__PURE__ */ e("div", { className: "flex flex-col sm:flex-row max-h-[60vh] min-h-[60vh]", children: /* @__PURE__ */ e(
|
411
|
-
Pe,
|
412
|
-
{
|
413
|
-
mutate: v,
|
414
|
-
filteredHistory: g,
|
415
|
-
dispatch: o,
|
416
|
-
onOpenChange: c
|
417
|
-
}
|
418
|
-
) })
|
419
|
-
] });
|
420
|
-
};
|
421
|
-
export {
|
422
|
-
je as HistoryPanel
|
423
|
-
};
|