research-agent-ui 0.1.283 → 0.1.285
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/DownloadsDialog-BCyJ3KFd.cjs +1 -0
- package/dist/DownloadsDialog-DL1If-cj.js +38 -0
- package/dist/components/UserMenu.d.ts +7 -0
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +2 -2
- package/dist/{src-DER-QylP.js → src-BlbmfJoE.js} +2170 -2157
- package/dist/src-DJ_ygiOp.cjs +51 -0
- package/dist/workspace.cjs +1 -1
- package/dist/workspace.mjs +13 -13
- package/package.json +12 -12
- package/dist/src-CuxqmQKW.cjs +0 -51
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-DJ_ygiOp.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._(),{chatTabs:g,activeChatId:_,openChat:v,newChat:y,closeChat:b,closeChats:x}=n.t(),{sendMessage:S}=n.I(),{signIn:C}=n.F(),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.M,{}),openFilesSidebarSignal:h,...U}):(0,a.jsx)(s.ReasonDocs,{SidebarComponent:u.Sidebar,SidebarContentComponent:u.SidebarContent,mainContent:(0,a.jsx)(n.v,{}),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.O,exports.ArticleAIResponse=n.T,exports.ArticleActionButtons=n.k,exports.ArticleContent=n.C,exports.ArticleFollowupQuestions=n.E,exports.ArticlePanelHeader=n.j,exports.ArticlePromptInput=n.D,exports.CategoryDock=n.o,exports.ChatInputBox=n.M,exports.ChatProvider=n.N,exports.ChatWindow=n.v,exports.CookieConsent=n.a,exports.ExtractPanelProvider=n.U,exports.HistoryDialogs=n.b,exports.HistoryDropdown=n.y,exports.KokoroVoiceSelector=n.c,exports.LexicalArticleViewer=n.w,exports.MainViewProvider=n.g,exports.QwkSearchApp=n.n,exports.QwkSearchProviders=n.r,exports.QwkSearchWorkspaceApp=h,exports.ResearchWorkspaceView=m,exports.SPOTLIGHT_LINKS=n.h,exports.SPOTLIGHT_PREFIXES=n.f,exports.SessionProvider=n.P,exports.SpotlightPalette=n.u,exports.UnifiedMarkdown=n.S,exports.VoiceSettingsPanel=n.s,exports.cn=n.G,exports.configureResearchAgentUI=t.configureResearchAgentUI,exports.formatMessageTime=n.K,exports.formatTimeDifference=n.q,exports.formatToolbarShortcut=n.A,exports.getPageTips=f,exports.getTopicSearches=p,exports.htmlToPlainText=d,exports.matchSpotlight=n.p,exports.openSpotlight=n.d,exports.parsePrefix=n.m,exports.researchAgentUIConfig=t.researchAgentUIConfig,exports.useChat=n.I,exports.useChatState=n.L,exports.useChatTabs=n.t,exports.useChunkErrorReload=n.i,exports.useExtractPanel=n.W,exports.useHistoryState=n.x,exports.useKokoroTTS=n.l,exports.useMainView=n._,exports.useSession=n.F,exports.useTextToSpeech=n.R;
|
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,
|
|
4
|
+
import { A as n, C as r, D as i, E as a, F as o, G as s, I as c, K as l, L as u, M as d, N as f, O as p, P as m, R as h, S as g, T as _, U as v, W as y, _ as b, a as x, b as S, c as C, d as w, f as T, g as E, h as D, i as O, j as k, k as A, l as j, m as M, n as N, o as P, p as F, q as I, r as L, s as ee, t as R, u as z, v as B, w as te, x as ne, y as re } from "./src-BlbmfJoE.js";
|
|
5
5
|
import { useCallback as V, useEffect as H, useRef as ie, useState as U } from "react";
|
|
6
6
|
import { useSearchParams as ae } from "next/navigation";
|
|
7
7
|
import { jsx as W } from "react/jsx-runtime";
|
|
@@ -47,7 +47,7 @@ var Z = async (e, t) => {
|
|
|
47
47
|
//#endregion
|
|
48
48
|
//#region src/workspace/ResearchWorkspaceView.tsx
|
|
49
49
|
function $() {
|
|
50
|
-
let { activeView: t, toggleToDocs: n, toggleToResearch: r, filesSidebarRequestId: i } = b(), { chatTabs: a, activeChatId:
|
|
50
|
+
let { activeView: t, toggleToDocs: n, toggleToResearch: r, filesSidebarRequestId: i } = b(), { chatTabs: a, activeChatId: s, openChat: l, newChat: u, closeChat: f, closeChats: p } = R(), { sendMessage: m } = c(), { signIn: h } = o(), g = ae(), [_, v] = U(null), [y, x] = U(null), [S, C] = U(!1), [w, T] = U(null);
|
|
51
51
|
H(() => {
|
|
52
52
|
oe.setLang("en"), q.setColor("default");
|
|
53
53
|
}, []);
|
|
@@ -56,16 +56,16 @@ function $() {
|
|
|
56
56
|
if (E.current) return;
|
|
57
57
|
E.current = !0;
|
|
58
58
|
let e = g.get("docs"), t = g.get("chat");
|
|
59
|
-
e ? (x(e), n()) : t && (
|
|
59
|
+
e ? (x(e), n()) : t && (l(t), r()), C(!0);
|
|
60
60
|
}, []), H(() => {
|
|
61
61
|
if (typeof window > "u" || !S) return;
|
|
62
62
|
let e = new URL(window.location.href);
|
|
63
|
-
e.searchParams.set("chat", t === "research" ?
|
|
63
|
+
e.searchParams.set("chat", t === "research" ? s ?? "" : ""), e.searchParams.set("docs", t === "docs" ? _ ?? "" : "");
|
|
64
64
|
let n = `${e.pathname}?${e.searchParams.toString()}${e.hash}`;
|
|
65
65
|
n !== `${window.location.pathname}${window.location.search}${window.location.hash}` && window.history.replaceState(null, "", n);
|
|
66
66
|
}, [
|
|
67
67
|
t,
|
|
68
|
-
|
|
68
|
+
s,
|
|
69
69
|
_,
|
|
70
70
|
S
|
|
71
71
|
]);
|
|
@@ -74,7 +74,7 @@ function $() {
|
|
|
74
74
|
title: e.title,
|
|
75
75
|
kind: "chat"
|
|
76
76
|
})), O = (e) => {
|
|
77
|
-
|
|
77
|
+
l(e), r();
|
|
78
78
|
}, k = (e) => {
|
|
79
79
|
let { closedWasActive: t, nextActiveId: r } = f(e);
|
|
80
80
|
t && !r && n();
|
|
@@ -83,21 +83,21 @@ function $() {
|
|
|
83
83
|
t && !r && n();
|
|
84
84
|
}, j = () => {
|
|
85
85
|
u(), r();
|
|
86
|
-
}, M = V((e) => (
|
|
86
|
+
}, M = V((e) => (l(e), r(), !0), [l, r]);
|
|
87
87
|
H(() => (e({ onOpenChat: M }), () => e({ onOpenChat: void 0 })), [M]);
|
|
88
88
|
let N = async (e, t) => Z(e, X(t)), P = async (e, t) => Q(e, X(t)), F = V((e) => {
|
|
89
89
|
u(), r(), T(e);
|
|
90
90
|
}, [u, r]);
|
|
91
91
|
H(() => {
|
|
92
|
-
w &&
|
|
92
|
+
w && s && (m(w), T(null));
|
|
93
93
|
}, [
|
|
94
94
|
w,
|
|
95
|
-
|
|
95
|
+
s,
|
|
96
96
|
m
|
|
97
97
|
]);
|
|
98
98
|
let I = {
|
|
99
99
|
extraTabs: D,
|
|
100
|
-
activeExtraTabId: t === "research" ?
|
|
100
|
+
activeExtraTabId: t === "research" ? s ?? void 0 : void 0,
|
|
101
101
|
onExtraTabSelect: O,
|
|
102
102
|
onExtraTabClose: k,
|
|
103
103
|
onExtraTabsClose: A,
|
|
@@ -119,7 +119,7 @@ function $() {
|
|
|
119
119
|
}) : /* @__PURE__ */ W(K, {
|
|
120
120
|
SidebarComponent: J,
|
|
121
121
|
SidebarContentComponent: Y,
|
|
122
|
-
mainContent: /* @__PURE__ */ W(
|
|
122
|
+
mainContent: /* @__PURE__ */ W(B, {}),
|
|
123
123
|
openFilesSidebarSignal: i,
|
|
124
124
|
...I
|
|
125
125
|
});
|
|
@@ -127,11 +127,11 @@ function $() {
|
|
|
127
127
|
//#endregion
|
|
128
128
|
//#region src/workspace/QwkSearchWorkspaceApp.tsx
|
|
129
129
|
function se(e) {
|
|
130
|
-
return /* @__PURE__ */ W(
|
|
130
|
+
return /* @__PURE__ */ W(L, {
|
|
131
131
|
...e,
|
|
132
132
|
docsEnabled: !0,
|
|
133
133
|
children: /* @__PURE__ */ W($, {})
|
|
134
134
|
});
|
|
135
135
|
}
|
|
136
136
|
//#endregion
|
|
137
|
-
export { p as ARTICLE_TOOLBAR_SHORTCUTS, _ as ArticleAIResponse, A as ArticleActionButtons,
|
|
137
|
+
export { p as ARTICLE_TOOLBAR_SHORTCUTS, _ as ArticleAIResponse, A as ArticleActionButtons, r as ArticleContent, a as ArticleFollowupQuestions, k as ArticlePanelHeader, i as ArticlePromptInput, P as CategoryDock, d as ChatInputBox, f as ChatProvider, B as ChatWindow, x as CookieConsent, v as ExtractPanelProvider, S as HistoryDialogs, re as HistoryDropdown, C as KokoroVoiceSelector, te as LexicalArticleViewer, E as MainViewProvider, N as QwkSearchApp, L as QwkSearchProviders, se as QwkSearchWorkspaceApp, $ as ResearchWorkspaceView, D as SPOTLIGHT_LINKS, T as SPOTLIGHT_PREFIXES, m as SessionProvider, z as SpotlightPalette, g as UnifiedMarkdown, ee as VoiceSettingsPanel, s as cn, e as configureResearchAgentUI, l as formatMessageTime, I as formatTimeDifference, n as formatToolbarShortcut, Z as getPageTips, Q as getTopicSearches, X as htmlToPlainText, F as matchSpotlight, w as openSpotlight, M as parsePrefix, t as researchAgentUIConfig, c as useChat, u as useChatState, R as useChatTabs, O as useChunkErrorReload, y as useExtractPanel, ne as useHistoryState, j as useKokoroTTS, b as useMainView, o as useSession, h as useTextToSpeech };
|
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.285",
|
|
5
5
|
"author": "vtempest",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -90,38 +90,38 @@
|
|
|
90
90
|
"@radix-ui/react-tooltip": "^1.2.16",
|
|
91
91
|
"@ricky0123/vad-web": "^0.0.30",
|
|
92
92
|
"ai": "^7.0.94",
|
|
93
|
-
"chat-agent-toolkit": "^1.2.
|
|
93
|
+
"chat-agent-toolkit": "^1.2.418",
|
|
94
94
|
"class-variance-authority": "^0.7.1",
|
|
95
95
|
"clsx": "^2.1.1",
|
|
96
|
-
"domain-rank": "^0.1.
|
|
96
|
+
"domain-rank": "^0.1.407",
|
|
97
97
|
"dompurify": "^3.4.15",
|
|
98
98
|
"drizzle-orm": "^0.45.2",
|
|
99
|
-
"extract-webpage": "^1.2.
|
|
99
|
+
"extract-webpage": "^1.2.412",
|
|
100
100
|
"framer-motion": "^13.2.0",
|
|
101
101
|
"fuse.js": "^7.5.0",
|
|
102
102
|
"grab-url": "^1.6.22",
|
|
103
103
|
"html2canvas": "^1.4.1",
|
|
104
104
|
"kokoro-js": "^1.2.1",
|
|
105
|
-
"legal-terms-privacy-policy": "^0.1.
|
|
105
|
+
"legal-terms-privacy-policy": "^0.1.95",
|
|
106
106
|
"lucide-react": "^1.43.0",
|
|
107
107
|
"markdown-to-jsx": "^9.10.2",
|
|
108
108
|
"motion": "^13.2.0",
|
|
109
109
|
"quantum-sphere-loading-icon": "^1.0.3",
|
|
110
|
-
"qwksearch-api-client": "^1.0.
|
|
110
|
+
"qwksearch-api-client": "^1.0.90",
|
|
111
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.
|
|
114
|
+
"search-web-api": "^1.0.270",
|
|
115
|
+
"shadcn-app-dock": "^0.1.268",
|
|
116
116
|
"shadcn-theme-menu": "^1.1.47",
|
|
117
117
|
"sonner": "^2.0.8",
|
|
118
118
|
"streamdown": "^2.6.0",
|
|
119
119
|
"tailwind-merge": "^3.6.0",
|
|
120
120
|
"tldts": "^7.4.12",
|
|
121
|
-
"trending-news-api": "^0.1.
|
|
121
|
+
"trending-news-api": "^0.1.146",
|
|
122
122
|
"turndown": "^7.2.4",
|
|
123
123
|
"use-voice-control": "^0.1.95",
|
|
124
|
-
"use-weather-forecast": "^0.1.
|
|
124
|
+
"use-weather-forecast": "^0.1.232"
|
|
125
125
|
},
|
|
126
126
|
"devDependencies": {
|
|
127
127
|
"@cloudflare/workers-types": "^5.20260908.1",
|
|
@@ -140,8 +140,8 @@
|
|
|
140
140
|
"next": "^16.3.4",
|
|
141
141
|
"react": "^19.2.8",
|
|
142
142
|
"react-dom": "^19.2.8",
|
|
143
|
-
"react-reason-editor": "^1.0.
|
|
144
|
-
"react-reason-editor-sidebar": "^0.1.
|
|
143
|
+
"react-reason-editor": "^1.0.220",
|
|
144
|
+
"react-reason-editor-sidebar": "^0.1.137",
|
|
145
145
|
"storybook": "^10.6.0",
|
|
146
146
|
"tailwindcss": "^4.3.3",
|
|
147
147
|
"typescript": "^7.0.2",
|