research-agent-ui 0.1.152 → 0.1.154
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/components/ArticleReader/ArticleActionButtons.d.ts +10 -10
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/lib/site-links.d.ts +14 -0
- package/dist/lib/site-links.test.d.ts +1 -0
- package/dist/{src-BgiTkBp6.cjs → src-Cp0UerpM.cjs} +4 -4
- package/dist/{src-CsHfnztO.js → src-ZX94CB2B.js} +54 -44
- package/dist/ui/badge.d.ts +1 -1
- package/dist/ui/button.d.ts +2 -2
- package/dist/workspace.cjs +1 -1
- package/dist/workspace.mjs +2 -2
- package/package.json +50 -50
|
@@ -1034,7 +1034,7 @@ var yn = cn.filter((e) => [
|
|
|
1034
1034
|
l,
|
|
1035
1035
|
g
|
|
1036
1036
|
]), P = async (e) => {
|
|
1037
|
-
if (
|
|
1037
|
+
if (e !== n && t) {
|
|
1038
1038
|
r(e), s(!0), h(1), _(!0);
|
|
1039
1039
|
try {
|
|
1040
1040
|
let { data: n } = await Ke({ query: {
|
|
@@ -3671,7 +3671,7 @@ function Di() {
|
|
|
3671
3671
|
}
|
|
3672
3672
|
function Oi(e = 10) {
|
|
3673
3673
|
let [t, n] = p([]), [r, i] = p(!1), { isAuthenticated: a, isLoading: o } = or(), s = f(!1), l = c(async (e = !1) => {
|
|
3674
|
-
if (!o && !
|
|
3674
|
+
if (!o && (!s.current || e)) {
|
|
3675
3675
|
s.current = !0, i(!0);
|
|
3676
3676
|
try {
|
|
3677
3677
|
if (a) {
|
|
@@ -4466,7 +4466,7 @@ var Li = [
|
|
|
4466
4466
|
h.current && (h.current.style.height = "auto", h.current.style.height = Math.min(h.current.scrollHeight, 384) + "px");
|
|
4467
4467
|
}, [d]);
|
|
4468
4468
|
let _e = () => {
|
|
4469
|
-
t ||
|
|
4469
|
+
t || (d.trim() || _.length !== 0 || y.length !== 0) && (n(d), O());
|
|
4470
4470
|
}, ve = (e) => {
|
|
4471
4471
|
if (ce && V > 0) {
|
|
4472
4472
|
if (e.key === "ArrowDown") {
|
|
@@ -7012,16 +7012,26 @@ function Ka() {
|
|
|
7012
7012
|
});
|
|
7013
7013
|
}
|
|
7014
7014
|
//#endregion
|
|
7015
|
+
//#region src/lib/site-links.ts
|
|
7016
|
+
function qa(e, t) {
|
|
7017
|
+
if (!e.startsWith("/") || e.includes("#") || e.includes("?")) return !1;
|
|
7018
|
+
let n = e.replace(/\/+$/, "") || "/", r = t.replace(/\/+$/, "") || "/";
|
|
7019
|
+
return n === "/" ? r === "/" : r === n || r.startsWith(`${n}/`);
|
|
7020
|
+
}
|
|
7021
|
+
function Ja(e, t) {
|
|
7022
|
+
return t ? e.filter((e) => !qa(e.url, t)) : e;
|
|
7023
|
+
}
|
|
7024
|
+
//#endregion
|
|
7015
7025
|
//#region src/app/MainViewProvider.tsx
|
|
7016
|
-
var
|
|
7017
|
-
function
|
|
7026
|
+
var Ya = a(null), Xa = "qwksearch-main-view";
|
|
7027
|
+
function Za({ children: e, docsEnabled: t = !0 }) {
|
|
7018
7028
|
let [n, r] = p("research"), [i, a] = p(0), o = c((e) => r(t ? e : "research"), [t]);
|
|
7019
7029
|
u(() => {
|
|
7020
7030
|
if (typeof window > "u" || !t) return;
|
|
7021
|
-
let e = window.localStorage.getItem(
|
|
7031
|
+
let e = window.localStorage.getItem(Xa);
|
|
7022
7032
|
(e === "research" || e === "docs") && r(e);
|
|
7023
7033
|
}, [t]), u(() => {
|
|
7024
|
-
typeof window < "u" && t && window.localStorage.setItem(
|
|
7034
|
+
typeof window < "u" && t && window.localStorage.setItem(Xa, n);
|
|
7025
7035
|
}, [n, t]);
|
|
7026
7036
|
let s = d(() => ({
|
|
7027
7037
|
activeView: n,
|
|
@@ -7037,23 +7047,23 @@ function Ya({ children: e, docsEnabled: t = !0 }) {
|
|
|
7037
7047
|
t,
|
|
7038
7048
|
i
|
|
7039
7049
|
]);
|
|
7040
|
-
return /* @__PURE__ */ U(
|
|
7050
|
+
return /* @__PURE__ */ U(Ya.Provider, {
|
|
7041
7051
|
value: s,
|
|
7042
7052
|
children: e
|
|
7043
7053
|
});
|
|
7044
7054
|
}
|
|
7045
|
-
function
|
|
7046
|
-
let e = l(
|
|
7055
|
+
function Qa() {
|
|
7056
|
+
let e = l(Ya);
|
|
7047
7057
|
if (!e) throw Error("useMainView must be used within a MainViewProvider");
|
|
7048
7058
|
return e;
|
|
7049
7059
|
}
|
|
7050
7060
|
//#endregion
|
|
7051
7061
|
//#region src/icons/icon-read.svg
|
|
7052
|
-
var
|
|
7062
|
+
var $a = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='iso-8859-1'?%3e%3csvg%20height='800px'%20width='800px'%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0%200%20512%20512'%20xml:space='preserve'%3e%3cpath%20style='fill:%23FE5022;'%20d='M438.802,390.609V278.595h55.174c9.938,0,18.023,8.085,18.023,18.023v75.967%20c0,9.938-8.086,18.024-18.023,18.024L438.802,390.609L438.802,390.609z'/%3e%3cpath%20style='fill:%23ECE5DD;'%20d='M28.107,511.637C12.609,511.637,0,499.027,0,483.529V134.326c0-1.441,0-12.123,0-12.123%20L121.715,0.363c0,0,10.8,0,12.248,0h271.569c15.498,0,28.107,12.609,28.107,28.106v455.059c0,15.499-12.609,28.108-28.107,28.108%20H28.107V511.637z'/%3e%3cpath%20style='fill:%23D9CBBD;'%20d='M405.533,0.363h-31.991c15.498,0,28.107,12.609,28.107,28.107v455.059%20c0,15.499-12.609,28.108-28.107,28.108h31.991c15.498,0,28.107-12.609,28.107-28.108V28.469%20C433.64,12.972,421.031,0.363,405.533,0.363z'/%3e%3cg%3e%3cpath%20style='fill:%23BABABA;'%20d='M167.639,132.2h133.086c4.594,0,8.318-3.723,8.318-8.318c0-4.595-3.724-8.318-8.318-8.318H167.639%20c-4.594,0-8.318,3.723-8.318,8.318C159.321,128.477,163.045,132.2,167.639,132.2z'/%3e%3cpath%20style='fill:%23BABABA;'%20d='M356.178,132.2h22.181c4.594,0,8.318-3.723,8.318-8.318c0-4.595-3.724-8.318-8.318-8.318h-22.181%20c-4.594,0-8.318,3.723-8.318,8.318C347.86,128.477,351.584,132.2,356.178,132.2z'/%3e%3cpath%20style='fill:%23BABABA;'%20d='M242.5,212.606c0-4.595-3.724-8.318-8.318-8.318H56.734c-4.594,0-8.318,3.723-8.318,8.318%20s3.724,8.318,8.318,8.318h177.449C238.776,220.924,242.5,217.201,242.5,212.606z'/%3e%3cpath%20style='fill:%23BABABA;'%20d='M378.359,204.288h-99.815c-4.594,0-8.318,3.723-8.318,8.318s3.724,8.318,8.318,8.318h99.815%20c4.594,0,8.318-3.723,8.318-8.318S382.953,204.288,378.359,204.288z'/%3e%3c/g%3e%3cpath%20style='fill:%23D9CBBD;'%20d='M0.726,123.171L122.442,1.331l1.39,105.939c0,9.465-7.7,17.166-17.166,17.166L0.726,123.171z'/%3e%3cpath%20style='fill:%23FFB656;'%20d='M270.226,401.7V267.504H456.87c5.938,0,10.768,4.83,10.768,10.768v112.659%20c0,5.938-4.83,10.769-10.768,10.769H270.226z'/%3e%3cpath%20style='fill:%23D9CBBD;'%20d='M367.785,335.156c-12.822,0-23.252-10.431-23.252-23.254v-44.399h89.833v44.399%20c0,12.823-10.431,23.254-23.252,23.254H367.785z'/%3e%3cg%3e%3cpath%20style='fill:%23BABABA;'%20d='M167.639,132.2h133.086c4.594,0,8.318-3.723,8.318-8.318c0-4.595-3.724-8.318-8.318-8.318H167.639%20c-4.594,0-8.318,3.723-8.318,8.318C159.321,128.477,163.045,132.2,167.639,132.2z'/%3e%3cpath%20style='fill:%23BABABA;'%20d='M356.178,132.2h22.181c4.594,0,8.318-3.723,8.318-8.318c0-4.595-3.724-8.318-8.318-8.318h-22.181%20c-4.594,0-8.318,3.723-8.318,8.318C347.86,128.477,351.584,132.2,356.178,132.2z'/%3e%3cpath%20style='fill:%23BABABA;'%20d='M242.5,212.606c0-4.595-3.724-8.318-8.318-8.318H56.734c-4.594,0-8.318,3.723-8.318,8.318%20s3.724,8.318,8.318,8.318h177.449C238.776,220.924,242.5,217.201,242.5,212.606z'/%3e%3cpath%20style='fill:%23BABABA;'%20d='M378.359,204.288h-99.815c-4.594,0-8.318,3.723-8.318,8.318s3.724,8.318,8.318,8.318h99.815%20c4.594,0,8.318-3.723,8.318-8.318S382.953,204.288,378.359,204.288z'/%3e%3cpath%20style='fill:%23BABABA;'%20d='M345.087,448.28H101.096c-4.594,0-8.318,3.723-8.318,8.318c0,4.595,3.724,8.318,8.318,8.318h243.992%20c4.594,0,8.318-3.723,8.318-8.318C353.405,452.003,349.681,448.28,345.087,448.28z'/%3e%3c/g%3e%3cpath%20style='fill:%23FE5022;'%20d='M163.689,357.337c-3.692,0-6.094-3.886-4.443-7.189l16.225-32.451%20c1.799-3.597,5.416-5.833,9.438-5.833h44.282v45.471h-65.503V357.337z'/%3e%3cpolygon%20style='fill:%23FFB656;'%20points='256.918,278.252%20211.447,300.988%20211.447,368.216%20256.918,390.953%20284.321,390.953%20284.321,278.214%20'/%3e%3cg%3e%3cpath%20style='fill:%23FE5022;'%20d='M268.64,401.7c-7.075,0-12.832-5.756-12.832-12.832V280.336c0-7.075,5.756-12.831,12.832-12.831%20h19.808c7.075,0,12.832,5.756,12.832,12.831v108.532c0,7.076-5.756,12.832-12.832,12.832H268.64z'/%3e%3cpath%20style='fill:%23FE5022;'%20d='M104.156,379.377H26.143V301.33h91.398c8.546,0,14.88,7.936,12.986,16.27l-11.313,49.758%20C117.615,374.388,111.366,379.377,104.156,379.377z'/%3e%3c/g%3e%3c/svg%3e", eo = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3csvg%20height='800px'%20width='800px'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0%200%2064%2064'%20xml:space='preserve'%3e%3cstyle%20type='text/css'%3e%20.st0{fill:%2376C2AF;}%20.st1{fill:%234F5D73;}%20.st2{opacity:0.2;}%20.st3{fill:%23231F20;}%20.st4{fill:%23FFFFFF;}%20%3c/style%3e%3cg%20id='Layer_1'%3e%3cg%3e%3ccircle%20class='st0'%20cx='32'%20cy='32'%20r='32'/%3e%3c/g%3e%3cg%3e%3cpath%20class='st1'%20d='M32,52c-1.1,0-2-0.9-2-2V18c0-1.1,0.9-2,2-2l0,0c1.1,0,2,0.9,2,2v32C34,51.1,33.1,52,32,52L32,52z'/%3e%3c/g%3e%3cg%3e%3cpath%20class='st1'%20d='M46,52c-1.1,0-2-0.9-2-2V18c0-1.1,0.9-2,2-2l0,0c1.1,0,2,0.9,2,2v32C48,51.1,47.1,52,46,52L46,52z'/%3e%3c/g%3e%3cg%3e%3cpath%20class='st1'%20d='M18,52c-1.1,0-2-0.9-2-2V18c0-1.1,0.9-2,2-2l0,0c1.1,0,2,0.9,2,2v32C20,51.1,19.1,52,18,52L18,52z'/%3e%3c/g%3e%3cg%20class='st2'%3e%3ccircle%20class='st3'%20cx='45.9'%20cy='38'%20r='4'/%3e%3c/g%3e%3cg%20class='st2'%3e%3ccircle%20class='st3'%20cx='32'%20cy='27'%20r='4'/%3e%3c/g%3e%3cg%20class='st2'%3e%3ccircle%20class='st3'%20cx='18'%20cy='44'%20r='4'/%3e%3c/g%3e%3cg%3e%3ccircle%20class='st4'%20cx='45.9'%20cy='36'%20r='4'/%3e%3c/g%3e%3cg%3e%3ccircle%20class='st4'%20cx='32'%20cy='25'%20r='4'/%3e%3c/g%3e%3cg%3e%3ccircle%20class='st4'%20cx='18'%20cy='42'%20r='4'/%3e%3c/g%3e%3c/g%3e%3cg%20id='Layer_2'%3e%3c/g%3e%3c/svg%3e";
|
|
7053
7063
|
//#endregion
|
|
7054
7064
|
//#region src/app/CategoryDock.tsx
|
|
7055
|
-
function
|
|
7056
|
-
let e = h(), n = g(), { isAuthenticated: r, signIn: i, signOut: a } = or(), { newChat: o } = J(), { activeView: s, setActiveView: c, docsEnabled: l, requestFilesSidebar: u } =
|
|
7065
|
+
function to() {
|
|
7066
|
+
let e = h(), n = g(), { isAuthenticated: r, signIn: i, signOut: a } = or(), { newChat: o } = J(), { activeView: s, setActiveView: c, docsEnabled: l, requestFilesSidebar: u } = Qa(), d = [{
|
|
7057
7067
|
href: "/",
|
|
7058
7068
|
label: "Research",
|
|
7059
7069
|
icon: t.appIconUrl
|
|
@@ -7061,13 +7071,13 @@ function $a() {
|
|
|
7061
7071
|
href: "/workspace",
|
|
7062
7072
|
label: "Docs",
|
|
7063
7073
|
icon: /* @__PURE__ */ U(qt, {
|
|
7064
|
-
src:
|
|
7074
|
+
src: $a,
|
|
7065
7075
|
alt: "Docs",
|
|
7066
7076
|
width: 24,
|
|
7067
7077
|
height: 24,
|
|
7068
7078
|
className: "w-full h-full"
|
|
7069
7079
|
})
|
|
7070
|
-
}] : []], f = e === "/" || e.startsWith("/c"), p = [
|
|
7080
|
+
}] : []], f = e === "/" || e.startsWith("/c"), p = Ja(t.footerLinks, e), m = [
|
|
7071
7081
|
...d.map(({ href: e, label: t, icon: n }) => ({
|
|
7072
7082
|
key: e,
|
|
7073
7083
|
label: t,
|
|
@@ -7093,7 +7103,7 @@ function $a() {
|
|
|
7093
7103
|
key: "settings",
|
|
7094
7104
|
label: "Settings",
|
|
7095
7105
|
icon: /* @__PURE__ */ U(qt, {
|
|
7096
|
-
src:
|
|
7106
|
+
src: eo,
|
|
7097
7107
|
alt: "Settings",
|
|
7098
7108
|
width: 24,
|
|
7099
7109
|
height: 24,
|
|
@@ -7116,7 +7126,7 @@ function $a() {
|
|
|
7116
7126
|
className: "text-sm",
|
|
7117
7127
|
children: "Site Links"
|
|
7118
7128
|
})]
|
|
7119
|
-
}), /* @__PURE__ */ U(Wt, { children:
|
|
7129
|
+
}), /* @__PURE__ */ U(Wt, { children: p.map(({ url: e, text: t, icon: n }) => {
|
|
7120
7130
|
let r = n ? x[n] : null, i = e.startsWith("http");
|
|
7121
7131
|
return /* @__PURE__ */ U(Vt, {
|
|
7122
7132
|
asChild: !0,
|
|
@@ -7157,7 +7167,7 @@ function $a() {
|
|
|
7157
7167
|
/* @__PURE__ */ U(Kt, {})
|
|
7158
7168
|
] }) }
|
|
7159
7169
|
}
|
|
7160
|
-
],
|
|
7170
|
+
], _ = m.filter((e) => e.key !== "files"), v = (e, t, n) => /* @__PURE__ */ U(qt, {
|
|
7161
7171
|
src: e,
|
|
7162
7172
|
alt: t,
|
|
7163
7173
|
width: n,
|
|
@@ -7166,26 +7176,26 @@ function $a() {
|
|
|
7166
7176
|
className: "w-full h-full"
|
|
7167
7177
|
});
|
|
7168
7178
|
return /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(zt, {
|
|
7169
|
-
items:
|
|
7179
|
+
items: _,
|
|
7170
7180
|
enableKeyboardShortcuts: !0,
|
|
7171
7181
|
placements: {
|
|
7172
7182
|
desktop: !0,
|
|
7173
7183
|
mobile: !1
|
|
7174
7184
|
},
|
|
7175
|
-
renderImage:
|
|
7185
|
+
renderImage: v
|
|
7176
7186
|
}), /* @__PURE__ */ U(zt, {
|
|
7177
|
-
items:
|
|
7187
|
+
items: m,
|
|
7178
7188
|
placements: {
|
|
7179
7189
|
desktop: !1,
|
|
7180
7190
|
mobile: !0
|
|
7181
7191
|
},
|
|
7182
7192
|
mobileAlign: s === "docs" ? "end" : "center",
|
|
7183
|
-
renderImage:
|
|
7193
|
+
renderImage: v
|
|
7184
7194
|
})] });
|
|
7185
7195
|
}
|
|
7186
7196
|
//#endregion
|
|
7187
7197
|
//#region src/app/CookieConsent.tsx
|
|
7188
|
-
function
|
|
7198
|
+
function no() {
|
|
7189
7199
|
let [e, n] = p(!1), r = f(null);
|
|
7190
7200
|
return u(() => {
|
|
7191
7201
|
localStorage.getItem("cookie-consent") || n(!0);
|
|
@@ -7272,11 +7282,11 @@ function eo() {
|
|
|
7272
7282
|
}
|
|
7273
7283
|
//#endregion
|
|
7274
7284
|
//#region src/app/useChunkErrorReload.ts
|
|
7275
|
-
var
|
|
7276
|
-
function
|
|
7285
|
+
var ro = "qwk:chunk-error-reload", io = (e) => typeof e == "string" && /Loading (chunk|CSS chunk)|ChunkLoadError/i.test(e);
|
|
7286
|
+
function ao() {
|
|
7277
7287
|
u(() => {
|
|
7278
7288
|
let e = (e) => {
|
|
7279
|
-
|
|
7289
|
+
io(e) && (sessionStorage.getItem(ro) || (sessionStorage.setItem(ro, "1"), window.location.reload()));
|
|
7280
7290
|
}, t = (t) => e(t.message), n = (t) => e(t.reason?.message ?? t.reason);
|
|
7281
7291
|
return window.addEventListener("error", t), window.addEventListener("unhandledrejection", n), () => {
|
|
7282
7292
|
window.removeEventListener("error", t), window.removeEventListener("unhandledrejection", n);
|
|
@@ -7285,8 +7295,8 @@ function ro() {
|
|
|
7285
7295
|
}
|
|
7286
7296
|
//#endregion
|
|
7287
7297
|
//#region src/app/QwkSearchProviders.tsx
|
|
7288
|
-
var
|
|
7289
|
-
function
|
|
7298
|
+
var oo = ({ children: e }) => /* @__PURE__ */ U(H, { children: e });
|
|
7299
|
+
function so(e) {
|
|
7290
7300
|
let [t, n] = p(e === !0);
|
|
7291
7301
|
return u(() => {
|
|
7292
7302
|
if (e !== "auto") {
|
|
@@ -7303,10 +7313,10 @@ function ao(e) {
|
|
|
7303
7313
|
};
|
|
7304
7314
|
}, [e]), t;
|
|
7305
7315
|
}
|
|
7306
|
-
function
|
|
7316
|
+
function co({ children: t, authClient: n, config: r, googleOneTap: i = "auto", docsEnabled: a = !0, ChromeProvider: o = oo, showDock: s = !0, showCookieConsent: c = !0, showToaster: l = !0 }) {
|
|
7307
7317
|
r && e(r);
|
|
7308
|
-
let u =
|
|
7309
|
-
return
|
|
7318
|
+
let u = so(i);
|
|
7319
|
+
return ao(), /* @__PURE__ */ U(Rt, {
|
|
7310
7320
|
attribute: "class",
|
|
7311
7321
|
defaultTheme: "system",
|
|
7312
7322
|
enableSystem: !0,
|
|
@@ -7315,12 +7325,12 @@ function oo({ children: t, authClient: n, config: r, googleOneTap: i = "auto", d
|
|
|
7315
7325
|
authClient: n,
|
|
7316
7326
|
enableGoogleOneTap: u,
|
|
7317
7327
|
children: /* @__PURE__ */ U($t, { children: /* @__PURE__ */ W(sr, { children: [
|
|
7318
|
-
/* @__PURE__ */ U(Bt, { children: /* @__PURE__ */ U(o, { children: /* @__PURE__ */ U(
|
|
7328
|
+
/* @__PURE__ */ U(Bt, { children: /* @__PURE__ */ U(o, { children: /* @__PURE__ */ U(Za, {
|
|
7319
7329
|
docsEnabled: a,
|
|
7320
7330
|
children: /* @__PURE__ */ W("div", {
|
|
7321
7331
|
id: "app-scroll-root",
|
|
7322
7332
|
className: "w-screen h-screen overflow-y-auto overflow-x-hidden pb-[calc(60px+env(safe-area-inset-bottom,0px))] md:pb-0",
|
|
7323
|
-
children: [s && /* @__PURE__ */ U(
|
|
7333
|
+
children: [s && /* @__PURE__ */ U(to, {}), /* @__PURE__ */ U("main", {
|
|
7324
7334
|
className: "bg-light-primary dark:bg-dark-primary min-h-screen",
|
|
7325
7335
|
children: t
|
|
7326
7336
|
})]
|
|
@@ -7330,15 +7340,15 @@ function oo({ children: t, authClient: n, config: r, googleOneTap: i = "auto", d
|
|
|
7330
7340
|
unstyled: !0,
|
|
7331
7341
|
classNames: { toast: "bg-light-secondary dark:bg-dark-secondary dark:text-white/70 text-black-70 rounded-lg p-4 flex flex-row items-center space-x-2" }
|
|
7332
7342
|
} }),
|
|
7333
|
-
c && /* @__PURE__ */ U(
|
|
7343
|
+
c && /* @__PURE__ */ U(no, {})
|
|
7334
7344
|
] }) })
|
|
7335
7345
|
})
|
|
7336
7346
|
});
|
|
7337
7347
|
}
|
|
7338
7348
|
//#endregion
|
|
7339
7349
|
//#region src/app/QwkSearchApp.tsx
|
|
7340
|
-
function
|
|
7341
|
-
return /* @__PURE__ */ U(
|
|
7350
|
+
function lo(e) {
|
|
7351
|
+
return /* @__PURE__ */ U(co, {
|
|
7342
7352
|
...e,
|
|
7343
7353
|
docsEnabled: !1,
|
|
7344
7354
|
children: /* @__PURE__ */ U(Ha, {})
|
|
@@ -7346,23 +7356,23 @@ function so(e) {
|
|
|
7346
7356
|
}
|
|
7347
7357
|
//#endregion
|
|
7348
7358
|
//#region src/app/useChatTabs.ts
|
|
7349
|
-
var
|
|
7350
|
-
function
|
|
7359
|
+
var uo = "qwksearch-open-chat-tabs", fo = 50;
|
|
7360
|
+
function po() {
|
|
7351
7361
|
if (typeof window > "u") return [];
|
|
7352
7362
|
try {
|
|
7353
|
-
let e = window.localStorage.getItem(
|
|
7363
|
+
let e = window.localStorage.getItem(uo);
|
|
7354
7364
|
return e ? JSON.parse(e) : [];
|
|
7355
7365
|
} catch {
|
|
7356
7366
|
return [];
|
|
7357
7367
|
}
|
|
7358
7368
|
}
|
|
7359
|
-
function
|
|
7360
|
-
let { chatId: e, chatTurns: t, startNewChat: n, switchToChat: r } = J(), [i, a] = p(
|
|
7369
|
+
function mo() {
|
|
7370
|
+
let { chatId: e, chatTurns: t, startNewChat: n, switchToChat: r } = J(), [i, a] = p(po);
|
|
7361
7371
|
u(() => {
|
|
7362
|
-
window.localStorage.setItem(
|
|
7372
|
+
window.localStorage.setItem(uo, JSON.stringify(i));
|
|
7363
7373
|
}, [i]), u(() => {
|
|
7364
7374
|
if (!e) return;
|
|
7365
|
-
let n = t[0]?.content?.slice(0,
|
|
7375
|
+
let n = t[0]?.content?.slice(0, fo), r = t.length > 0;
|
|
7366
7376
|
a((t) => {
|
|
7367
7377
|
let i = t.find((t) => t.id === e);
|
|
7368
7378
|
return i ? n && i.title !== n || i.hasMessages !== r ? t.map((t) => t.id === e ? {
|
|
@@ -7422,4 +7432,4 @@ function fo() {
|
|
|
7422
7432
|
};
|
|
7423
7433
|
}
|
|
7424
7434
|
//#endregion
|
|
7425
|
-
export { J as A, Xi as C, sr as D, Bi as E, q as F, Jt as I, Yt as L, In as M, $t as N, ar as O, Qt as P, Gi as S, Hi as T, ta as _,
|
|
7435
|
+
export { J as A, Xi as C, sr as D, Bi as E, q as F, Jt as I, Yt as L, In as M, $t as N, ar as O, Qt as P, Gi as S, Hi as T, ta as _, no as a, Qi as b, Qa as c, Ua as d, Ha as f, da as g, Ta as h, ao as i, tr as j, or as k, Ka as l, ka as m, lo as n, to as o, Ma as p, co as r, Za as s, mo as t, Ga as u, ea as v, qi as w, Zi as x, $i as y };
|
package/dist/ui/badge.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { type VariantProps } from "class-variance-authority";
|
|
3
3
|
declare const badgeVariants: (props?: {
|
|
4
|
-
variant?: "
|
|
4
|
+
variant?: "beta" | "default" | "destructive" | "highlight" | "new" | "outline" | "secondary";
|
|
5
5
|
} & import("class-variance-authority/types").ClassProp) => string;
|
|
6
6
|
declare function Badge({ className, variant, asChild, ...props }: React.ComponentProps<"span"> & VariantProps<typeof badgeVariants> & {
|
|
7
7
|
asChild?: boolean;
|
package/dist/ui/button.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { type VariantProps } from "class-variance-authority";
|
|
3
3
|
declare const buttonVariants: (props?: {
|
|
4
|
-
variant?: "default" | "
|
|
5
|
-
size?: "default" | "icon" | "
|
|
4
|
+
variant?: "default" | "destructive" | "ghost" | "link" | "outline" | "secondary";
|
|
5
|
+
size?: "default" | "icon" | "lg" | "sm";
|
|
6
6
|
} & import("class-variance-authority/types").ClassProp) => string;
|
|
7
7
|
export interface ButtonProps extends React.ComponentProps<"button">, VariantProps<typeof buttonVariants> {
|
|
8
8
|
asChild?: boolean;
|
package/dist/workspace.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./rolldown-runtime-BocRIvOZ.cjs"),t=require("./config.cjs"),n=require("./src-
|
|
1
|
+
"use client";"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./rolldown-runtime-BocRIvOZ.cjs"),t=require("./config.cjs"),n=require("./src-Cp0UerpM.cjs");let r=require("react"),i=require("next/navigation"),a=require("react/jsx-runtime"),o=require("grab-url");o=e.t(o,1);let s=require("react-reason-editor/reason-docs"),c=require("react-reason-editor/theme"),l=require("react-reason-editor/locale-bundle"),u=require("react-reason-editor-sidebar");require("katex/dist/katex.min.css"),require("easydrawer/styles.css"),require("katex/contrib/mhchem");function d(e){return e.replace(/<(script|style)[^>]*>[\s\S]*?<\/\1>/gi,` `).replace(/<[^>]+>/g,` `).replace(/ /g,` `).replace(/\s+/g,` `).trim()}var f=async(e,t)=>{try{let n=await(0,o.default)(`agent/page-tips`,{method:`POST`,body:JSON.stringify({title:e,content:t})});return Array.isArray(n.tips)?n.tips:[]}catch{return[]}},p=async(e,t)=>{try{let n=await(0,o.default)(`agent/topic-searches`,{method:`POST`,body:JSON.stringify({title:e,content:t})});return Array.isArray(n.topics)?n.topics:[]}catch{return[]}};function m(){let{activeView:e,toggleToDocs:o,toggleToResearch:m,filesSidebarRequestId:h}=n.c(),{chatTabs:g,activeChatId:_,openChat:v,newChat:y,closeChat:b,closeChats:x}=n.t(),{sendMessage:S}=n.A(),{signIn:C}=n.k(),w=(0,i.useSearchParams)(),[T,E]=(0,r.useState)(null),[D,O]=(0,r.useState)(null),[k,A]=(0,r.useState)(!1),[j,M]=(0,r.useState)(null);(0,r.useEffect)(()=>{l.localeActions.setLang(`en`),c.themeActions.setColor(`default`)},[]);let N=(0,r.useRef)(!1);(0,r.useEffect)(()=>{if(N.current)return;N.current=!0;let e=w.get(`docs`),t=w.get(`chat`);e?(O(e),o()):t&&(v(t),m()),A(!0)},[]),(0,r.useEffect)(()=>{if(typeof window>`u`||!k)return;let t=new URL(window.location.href);t.searchParams.set(`chat`,e===`research`?_??``:``),t.searchParams.set(`docs`,e===`docs`?T??``:``);let n=`${t.pathname}?${t.searchParams.toString()}${t.hash}`;n!==`${window.location.pathname}${window.location.search}${window.location.hash}`&&window.history.replaceState(null,``,n)},[e,_,T,k]);let P=g.map(e=>({id:e.id,title:e.title,kind:`chat`})),F=e=>{v(e),m()},I=e=>{let{closedWasActive:t,nextActiveId:n}=b(e);t&&!n&&o()},L=e=>{let{closedWasActive:t,nextActiveId:n}=x(e);t&&!n&&o()},R=()=>{y(),m()},z=(0,r.useCallback)(e=>(v(e),m(),!0),[v,m]);(0,r.useEffect)(()=>(t.configureResearchAgentUI({onOpenChat:z}),()=>t.configureResearchAgentUI({onOpenChat:void 0})),[z]);let B=async(e,t)=>f(e,d(t)),V=async(e,t)=>p(e,d(t)),H=(0,r.useCallback)(e=>{y(),m(),M(e)},[y,m]);(0,r.useEffect)(()=>{j&&_&&(S(j),M(null))},[j,_,S]);let U={extraTabs:P,activeExtraTabId:e===`research`?_??void 0:void 0,onExtraTabSelect:F,onExtraTabClose:I,onExtraTabsClose:L,onExtraTabAdd:R,onFileTabSelect:o,initialDocId:D,onActiveDocumentChange:E,onGenerateTips:B,onGenerateTopics:V,onSearchTopic:H,onSignIn:C};return e===`docs`?(0,a.jsx)(s.ReasonDocs,{SidebarComponent:u.Sidebar,SidebarContentComponent:u.SidebarContent,belowMainContent:(0,a.jsx)(n.E,{}),openFilesSidebarSignal:h,...U}):(0,a.jsx)(s.ReasonDocs,{SidebarComponent:u.Sidebar,SidebarContentComponent:u.SidebarContent,mainContent:(0,a.jsx)(n.f,{}),openFilesSidebarSignal:h,...U})}function h(e){return(0,a.jsx)(n.r,{...e,docsEnabled:!0,children:(0,a.jsx)(m,{})})}exports.ARTICLE_TOOLBAR_SHORTCUTS=n.S,exports.ArticleAIResponse=n.y,exports.ArticleActionButtons=n.C,exports.ArticleContent=n._,exports.ArticleFollowupQuestions=n.b,exports.ArticlePanelHeader=n.T,exports.ArticlePromptInput=n.x,exports.CategoryDock=n.o,exports.ChatInputBox=n.E,exports.ChatProvider=n.D,exports.ChatWindow=n.f,exports.CookieConsent=n.a,exports.ExtractPanelProvider=n.N,exports.HistoryDialogs=n.m,exports.HistoryDropdown=n.p,exports.KokoroVoiceSelector=n.u,exports.LexicalArticleViewer=n.v,exports.MainViewProvider=n.s,exports.QwkSearchApp=n.n,exports.QwkSearchProviders=n.r,exports.QwkSearchWorkspaceApp=h,exports.ResearchWorkspaceView=m,exports.SessionProvider=n.O,exports.UnifiedMarkdown=n.g,exports.VoiceSettingsPanel=n.l,exports.cn=n.F,exports.configureResearchAgentUI=t.configureResearchAgentUI,exports.formatMessageTime=n.I,exports.formatTimeDifference=n.L,exports.formatToolbarShortcut=n.w,exports.getPageTips=f,exports.getTopicSearches=p,exports.htmlToPlainText=d,exports.researchAgentUIConfig=t.researchAgentUIConfig,exports.useChat=n.A,exports.useChatState=n.j,exports.useChatTabs=n.t,exports.useChunkErrorReload=n.i,exports.useExtractPanel=n.P,exports.useHistoryState=n.h,exports.useKokoroTTS=n.d,exports.useMainView=n.c,exports.useSession=n.k,exports.useTextToSpeech=n.M;
|
package/dist/workspace.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use client";
|
|
3
3
|
import { configureResearchAgentUI as e, researchAgentUIConfig as t } from "./config.mjs";
|
|
4
|
-
import { A as n, C as r, D as i, E as a, F as o, I as s, L as c, M as l, N as u, O as d, P as f, S as p, T as m, _ as h, a as g, b as _, c as v, d as y, f as b, g as x, h as S, i as C, j as w, k as T, l as E, m as D, n as O, o as k, p as A, r as j, s as M, t as N, u as P, v as F, w as I, x as L, y as R } from "./src-
|
|
4
|
+
import { A as n, C as r, D as i, E as a, F as o, I as s, L as c, M as l, N as u, O as d, P as f, S as p, T as m, _ as h, a as g, b as _, c as v, d as y, f as b, g as x, h as S, i as C, j as w, k as T, l as E, m as D, n as O, o as k, p as A, r as j, s as M, t as N, u as P, v as F, w as I, x as L, y as R } from "./src-ZX94CB2B.js";
|
|
5
5
|
import { useCallback as z, useEffect as B, useRef as V, useState as H } from "react";
|
|
6
6
|
import { useSearchParams as U } from "next/navigation";
|
|
7
7
|
import { jsx as W } from "react/jsx-runtime";
|
|
@@ -89,7 +89,7 @@ function $() {
|
|
|
89
89
|
u(), i(), E(e);
|
|
90
90
|
}, [u, i]);
|
|
91
91
|
B(() => {
|
|
92
|
-
|
|
92
|
+
w && c && (p(w), E(null));
|
|
93
93
|
}, [
|
|
94
94
|
w,
|
|
95
95
|
c,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "research-agent-ui",
|
|
3
3
|
"description": "The QwkSearch app UI: conversation window, article reader, search config, file uploads, chat history, and the app shell — exported both with and without the REASON editor and its sidebar",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.154",
|
|
5
5
|
"author": "vtempest",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -83,71 +83,71 @@
|
|
|
83
83
|
"react-reason-editor-sidebar": ">=0.1"
|
|
84
84
|
},
|
|
85
85
|
"dependencies": {
|
|
86
|
-
"@huggingface/transformers": "^
|
|
87
|
-
"@radix-ui/react-dialog": "^1.1.
|
|
88
|
-
"@radix-ui/react-dropdown-menu": "^2.1.
|
|
89
|
-
"@radix-ui/react-popover": "^1.1.
|
|
90
|
-
"@radix-ui/react-slot": "^1.
|
|
91
|
-
"@radix-ui/react-tooltip": "^1.2.
|
|
86
|
+
"@huggingface/transformers": "^4.2.0",
|
|
87
|
+
"@radix-ui/react-dialog": "^1.1.23",
|
|
88
|
+
"@radix-ui/react-dropdown-menu": "^2.1.24",
|
|
89
|
+
"@radix-ui/react-popover": "^1.1.23",
|
|
90
|
+
"@radix-ui/react-slot": "^1.3.3",
|
|
91
|
+
"@radix-ui/react-tooltip": "^1.2.16",
|
|
92
92
|
"@ricky0123/vad-web": "^0.0.30",
|
|
93
|
-
"ai": "^
|
|
94
|
-
"chat-agent-toolkit": "^1.2.
|
|
93
|
+
"ai": "^7.0.94",
|
|
94
|
+
"chat-agent-toolkit": "^1.2.285",
|
|
95
95
|
"class-variance-authority": "^0.7.1",
|
|
96
96
|
"clsx": "^2.1.1",
|
|
97
|
-
"domain-rank": "^0.1.
|
|
98
|
-
"dompurify": "^3.4.
|
|
97
|
+
"domain-rank": "^0.1.274",
|
|
98
|
+
"dompurify": "^3.4.15",
|
|
99
99
|
"drizzle-orm": "^0.45.2",
|
|
100
|
-
"extract-webpage": "^1.2.
|
|
101
|
-
"framer-motion": "^
|
|
102
|
-
"fuse.js": "^7.
|
|
100
|
+
"extract-webpage": "^1.2.281",
|
|
101
|
+
"framer-motion": "^13.2.0",
|
|
102
|
+
"fuse.js": "^7.5.0",
|
|
103
103
|
"grab-url": "^1.6.22",
|
|
104
104
|
"html2canvas": "^1.4.1",
|
|
105
105
|
"kokoro-js": "^1.2.1",
|
|
106
|
-
"lucide-react": "^1.
|
|
107
|
-
"markdown-to-jsx": "^9.
|
|
108
|
-
"motion": "^
|
|
106
|
+
"lucide-react": "^1.43.0",
|
|
107
|
+
"markdown-to-jsx": "^9.10.2",
|
|
108
|
+
"motion": "^13.2.0",
|
|
109
109
|
"quantum-sphere-loading-icon": "^1.0.3",
|
|
110
|
-
"qwksearch-api-client": "^0.9.
|
|
111
|
-
"react-icons": "^5.
|
|
110
|
+
"qwksearch-api-client": "^0.9.229",
|
|
111
|
+
"react-icons": "^5.7.0",
|
|
112
112
|
"react-native-app-buttons": "^0.1.4",
|
|
113
113
|
"react-textarea-autosize": "^8.5.9",
|
|
114
|
-
"search-web-api": "^1.0.
|
|
115
|
-
"shadcn-app-dock": "^0.1.
|
|
116
|
-
"shadcn-theme-menu": "^1.1.
|
|
117
|
-
"sonner": "^2.0.
|
|
118
|
-
"streamdown": "^2.
|
|
114
|
+
"search-web-api": "^1.0.138",
|
|
115
|
+
"shadcn-app-dock": "^0.1.137",
|
|
116
|
+
"shadcn-theme-menu": "^1.1.47",
|
|
117
|
+
"sonner": "^2.0.8",
|
|
118
|
+
"streamdown": "^2.6.0",
|
|
119
119
|
"tailwind-merge": "^3.6.0",
|
|
120
|
-
"tldts": "^7.4.
|
|
121
|
-
"trending-news-api": "^0.1.
|
|
120
|
+
"tldts": "^7.4.12",
|
|
121
|
+
"trending-news-api": "^0.1.12",
|
|
122
122
|
"turndown": "^7.2.4",
|
|
123
|
-
"use-voice-control": "^0.1.
|
|
124
|
-
"use-weather-forecast": "^0.1.
|
|
123
|
+
"use-voice-control": "^0.1.95",
|
|
124
|
+
"use-weather-forecast": "^0.1.98"
|
|
125
125
|
},
|
|
126
126
|
"devDependencies": {
|
|
127
|
-
"@cloudflare/workers-types": "^
|
|
128
|
-
"@storybook/react-vite": "^
|
|
129
|
-
"@tailwindcss/vite": "^4.3.
|
|
130
|
-
"@testing-library/react": "^16.
|
|
131
|
-
"@types/react": "^19.
|
|
132
|
-
"@types/react-dom": "^19.
|
|
133
|
-
"@types/turndown": "^5.0.
|
|
134
|
-
"@vitejs/plugin-react": "^6.
|
|
135
|
-
"@vitest/coverage-v8": "^
|
|
127
|
+
"@cloudflare/workers-types": "^5.20260908.1",
|
|
128
|
+
"@storybook/react-vite": "^10.6.0",
|
|
129
|
+
"@tailwindcss/vite": "^4.3.3",
|
|
130
|
+
"@testing-library/react": "^16.3.3",
|
|
131
|
+
"@types/react": "^19.2.18",
|
|
132
|
+
"@types/react-dom": "^19.2.7",
|
|
133
|
+
"@types/turndown": "^5.0.6",
|
|
134
|
+
"@vitejs/plugin-react": "^6.1.1",
|
|
135
|
+
"@vitest/coverage-v8": "^5.0.0",
|
|
136
136
|
"easydrawer": "^0.0.18",
|
|
137
137
|
"itty-router": "^5.0.24",
|
|
138
|
-
"jsdom": "^
|
|
139
|
-
"katex": "^0.
|
|
140
|
-
"next": "^16.
|
|
141
|
-
"react": "^19.2.
|
|
142
|
-
"react-dom": "^19.2.
|
|
143
|
-
"react-reason-editor": "^1.0.
|
|
144
|
-
"react-reason-editor-sidebar": "^0.1.
|
|
145
|
-
"storybook": "^
|
|
146
|
-
"tailwindcss": "^4.3.
|
|
147
|
-
"typescript": "^
|
|
148
|
-
"vite": "^8.
|
|
149
|
-
"vitest": "^
|
|
150
|
-
"wrangler": "^
|
|
138
|
+
"jsdom": "^30.0.1",
|
|
139
|
+
"katex": "^0.18.7",
|
|
140
|
+
"next": "^16.3.4",
|
|
141
|
+
"react": "^19.2.8",
|
|
142
|
+
"react-dom": "^19.2.8",
|
|
143
|
+
"react-reason-editor": "^1.0.87",
|
|
144
|
+
"react-reason-editor-sidebar": "^0.1.6",
|
|
145
|
+
"storybook": "^10.6.0",
|
|
146
|
+
"tailwindcss": "^4.3.3",
|
|
147
|
+
"typescript": "^7.0.2",
|
|
148
|
+
"vite": "^8.2.2",
|
|
149
|
+
"vitest": "^5.0.0",
|
|
150
|
+
"wrangler": "^4.130.0"
|
|
151
151
|
},
|
|
152
152
|
"license": "rights.institute/PROSPER",
|
|
153
153
|
"peerDependenciesMeta": {
|