research-agent-ui 0.1.261 → 0.1.263

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.
@@ -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-C8k2m66R.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(/&nbsp;/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.z,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.V,exports.configureResearchAgentUI=t.configureResearchAgentUI,exports.formatMessageTime=n.H,exports.formatTimeDifference=n.U,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.B,exports.useHistoryState=n.x,exports.useKokoroTTS=n.l,exports.useMainView=n._,exports.useSession=n.F,exports.useTextToSpeech=n.R;
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-CuxqmQKW.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(/&nbsp;/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.z,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.V,exports.configureResearchAgentUI=t.configureResearchAgentUI,exports.formatMessageTime=n.H,exports.formatTimeDifference=n.U,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.B,exports.useHistoryState=n.x,exports.useKokoroTTS=n.l,exports.useMainView=n._,exports.useSession=n.F,exports.useTextToSpeech=n.R;
@@ -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, B as r, C as i, D as a, E as o, F as s, H as c, I 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, V 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, r as I, s as ee, t as L, u as te, v as R, w as ne, x as re, y as z, z as B } from "./src-bkq29w_T.js";
4
+ import { A as n, B as r, C as i, D as a, E as o, F as s, H as c, I 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, V 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, r as I, s as ee, t as L, u as te, v as R, w as ne, x as re, y as z, z as B } from "./src-DER-QylP.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";
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.261",
4
+ "version": "0.1.263",
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.394",
93
+ "chat-agent-toolkit": "^1.2.396",
94
94
  "class-variance-authority": "^0.7.1",
95
95
  "clsx": "^2.1.1",
96
- "domain-rank": "^0.1.383",
96
+ "domain-rank": "^0.1.385",
97
97
  "dompurify": "^3.4.15",
98
98
  "drizzle-orm": "^0.45.2",
99
- "extract-webpage": "^1.2.388",
99
+ "extract-webpage": "^1.2.390",
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.71",
105
+ "legal-terms-privacy-policy": "^0.1.73",
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.66",
110
+ "qwksearch-api-client": "^1.0.68",
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.246",
115
- "shadcn-app-dock": "^0.1.244",
114
+ "search-web-api": "^1.0.248",
115
+ "shadcn-app-dock": "^0.1.246",
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.122",
121
+ "trending-news-api": "^0.1.124",
122
122
  "turndown": "^7.2.4",
123
123
  "use-voice-control": "^0.1.95",
124
- "use-weather-forecast": "^0.1.208"
124
+ "use-weather-forecast": "^0.1.210"
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.196",
144
- "react-reason-editor-sidebar": "^0.1.113",
143
+ "react-reason-editor": "^1.0.198",
144
+ "react-reason-editor-sidebar": "^0.1.115",
145
145
  "storybook": "^10.6.0",
146
146
  "tailwindcss": "^4.3.3",
147
147
  "typescript": "^7.0.2",
@@ -263,5 +263,15 @@
263
263
  "description": "Show article thumbnail images in the trending news widget.",
264
264
  "default": true,
265
265
  "scope": "client"
266
+ },
267
+ {
268
+ "name": "My News Topics",
269
+ "key": "trendingNewsCustomTopics",
270
+ "type": "textarea",
271
+ "required": false,
272
+ "description": "Follow your own topics instead of the daily trending list. Enter one topic per line (or separate them with commas) \u2014 for example: fusion power, semiconductor supply chain. Leave blank to see what the site shows by default.",
273
+ "placeholder": "fusion power\nsemiconductor supply chain\nlocal elections",
274
+ "scope": "client",
275
+ "default": ""
266
276
  }
267
277
  ]