research-agent-ui 0.1.296 → 0.1.298

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("./src-Ckb1ciEL.cjs"),n=require("./config.cjs"),r=require("./tooltip-DmUO6ZUz.cjs"),i=require("./dialog-7GDz0sWx.cjs");let a=require("react"),o=require("next/navigation"),s=require("react/jsx-runtime"),c=require("grab-url");c=e.t(c,1);let l=require("react-reason-editor/reason-docs"),u=require("react-reason-editor/theme"),d=require("react-reason-editor/locale-bundle"),f=require("react-reason-editor-sidebar");function p(e){return e.replace(/<(script|style)[^>]*>[\s\S]*?<\/\1>/gi,` `).replace(/<[^>]+>/g,` `).replace(/&nbsp;/g,` `).replace(/\s+/g,` `).trim()}var m=async(e,t)=>{try{let n=await(0,c.default)(`agent/page-tips`,{method:`POST`,body:JSON.stringify({title:e,content:t})});return Array.isArray(n.tips)?n.tips:[]}catch{return[]}},h=async(e,t)=>{try{let n=await(0,c.default)(`agent/topic-searches`,{method:`POST`,body:JSON.stringify({title:e,content:t})});return Array.isArray(n.topics)?n.topics:[]}catch{return[]}},g=`/api/doc/google-docs`,_=`application/vnd.google-apps.document`,v=`application/vnd.google-apps.spreadsheet`,y=`application/vnd.google-apps.presentation`,b=`application/vnd.google-apps.drawing`,x=`application/vnd.google-apps.folder`,S=class extends Error{needsReauth;needsFolderAccess;status;constructor(e,t,n={}){super(e),this.name=`GoogleDriveError`,this.status=t,this.needsReauth=!!n.needsReauth,this.needsFolderAccess=!!n.needsFolderAccess}};async function C(e){let t=await fetch(`${g}${e}`,{credentials:`same-origin`}),n={};try{n=await t.json()}catch{}if(!t.ok||n?.success===!1)throw new S(n?.error||`Google Drive request failed (${t.status})`,t.status,n);return n}function w(e){return e===_||e===`text/plain`||e===`text/markdown`?`editor`:e===`application/pdf`||e===v||e===y?`pdf`:e===b||e.startsWith(`image/`)?`image`:`unsupported`}function T(e){if(e.mimeType===_)return`docx`;if(e.mimeType===v)return`xlsx`;if(e.mimeType===y)return`pptx`;if(e.mimeType===b)return`png`;let t=e.name.lastIndexOf(`.`);if(t>0&&t<e.name.length-1)return e.name.slice(t+1).toLowerCase();if(e.mimeType===`application/pdf`)return`pdf`;let n=e.mimeType.split(`/`)[1];return n&&/^[a-z0-9]{2,5}$/.test(n)?n:void 0}var E=(e,t)=>`${e}:${t}`,D=e=>`${g}/content?fileId=${encodeURIComponent(e)}`;function O(e,t){let n=[],r=new Set,i=(e,t)=>Number(t.mimeType===`application/vnd.google-apps.folder`)-Number(e.mimeType===`application/vnd.google-apps.folder`)||e.name.localeCompare(t.name,void 0,{numeric:!0,sensitivity:`base`});for(let{root:a,items:o}of t){let s=E(e,a.id);if(r.has(s))continue;r.add(s),n.push({id:s,title:a.name,content:``,parentId:null,isFolder:!0,isExpanded:t.length===1,external:{sourceId:e,fileId:a.id,mimeType:x,view:`unsupported`,webViewLink:a.webViewLink}});let c=new Set([a.id,...o.filter(e=>e.mimeType===x).map(e=>e.id)]);for(let t of[...o].sort(i)){let i=E(e,t.id);if(r.has(i))continue;r.add(i);let o=t.parents?.find(e=>c.has(e))??a.id,s=t.mimeType===x,l=s?`unsupported`:w(t.mimeType);n.push({id:i,title:t.name,content:``,parentId:E(e,o),isFolder:s,isExpanded:!1,external:{sourceId:e,fileId:t.id,mimeType:t.mimeType,view:l,extension:s?void 0:T(t),contentUrl:s||l===`unsupported`?void 0:D(t.id),webViewLink:t.webViewLink}})}}return n}function k(e){return e?.folders?.length?e.folders:(e?.folderIds??[]).map(e=>({id:e,name:e===`root`?`My Drive`:e}))}async function A(e){let t=k(e.credentials);if(t.length===0)return[];let n=await Promise.allSettled(t.map(e=>C(`/folder-tree?folderId=${encodeURIComponent(e.id)}`))),r=n.flatMap(e=>e.status===`fulfilled`?[e.value]:[]);if(r.length===0)throw n[0].reason;return O(e.id,r)}function j(e){return e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`)}function M(e){return e.split(/\r?\n\r?\n/).map(e=>e.trim()).filter(Boolean).map(e=>`<p>${j(e).replace(/\r?\n/g,`<br>`)}</p>`).join(``)}function N(e){if(typeof DOMParser>`u`){let t=e.match(/<body[^>]*>([\s\S]*)<\/body>/i);return(t?t[1]:e).replace(/<(script|style)[\s\S]*?<\/\1>/gi,``)}let t=new DOMParser().parseFromString(e,`text/html`),n=new Map;for(let e of Array.from(t.querySelectorAll(`style`)))for(let t of(e.textContent??``).matchAll(/\.([A-Za-z0-9_-]+)\s*\{([^}]*)\}/g))n.set(t[1],`${n.get(t[1])??``};${t[2]}`);t.querySelectorAll(`script, style, meta, link, title`).forEach(e=>e.remove());for(let e of Array.from(t.body.querySelectorAll(`span`))){let r=[...Array.from(e.classList).map(e=>n.get(e)??``),e.getAttribute(`style`)??``].join(`;`),i=Array.from(e.childNodes),a=e=>{let n=t.createElement(e);i.forEach(e=>n.appendChild(e)),i=[n]};/font-weight:\s*(700|800|900|bold)/i.test(r)&&a(`strong`),/font-style:\s*italic/i.test(r)&&a(`em`),/text-decoration[^;]*underline/i.test(r)&&a(`u`),/text-decoration[^;]*line-through/i.test(r)&&a(`s`),e.replaceWith(...i)}for(let e of Array.from(t.body.querySelectorAll(`a[href]`)))try{let t=new URL(e.getAttribute(`href`));t.hostname===`www.google.com`&&t.pathname===`/url`&&t.searchParams.get(`q`)&&e.setAttribute(`href`,t.searchParams.get(`q`))}catch{}for(let e of Array.from(t.body.querySelectorAll(`[class], [style], [id]`)))e.removeAttribute(`class`),e.removeAttribute(`style`),e.removeAttribute(`id`);return t.body.innerHTML.trim()}async function P(e){let t=e.external;if(!t?.contentUrl)return``;let n=await fetch(t.contentUrl,{credentials:`same-origin`});if(!n.ok){let e={};try{e=await n.json()}catch{}throw new S(e?.error||`Couldn't load the file (${n.status})`,n.status,e)}let r=await n.text();return t.mimeType===_?N(r):M(r)}var F={canList:e=>e.type===`gdocs`,listDocuments:e=>A(e),loadDocumentContent:P};function I({SidebarComponent:e=f.Sidebar,SidebarContentComponent:i=f.SidebarContent,openSidebarEvent:c}={}){let{activeView:g,toggleToDocs:_,toggleToResearch:v,filesSidebarRequestId:y,requestFilesSidebar:b}=t.b(),{chatTabs:x,activeChatId:S,openChat:C,newChat:w,closeChat:T,closeChats:E}=t.t(),{sendMessage:D}=r.u(),{signIn:O}=r.c(),k=(0,o.useSearchParams)(),[A,j]=(0,a.useState)(null),[M,N]=(0,a.useState)(null),[P,I]=(0,a.useState)(!1),[L,R]=(0,a.useState)(null);(0,a.useEffect)(()=>{if(c)return window.addEventListener(c,b),()=>window.removeEventListener(c,b)},[c,b]),(0,a.useEffect)(()=>{d.localeActions.setLang(`en`),u.themeActions.setColor(`default`)},[]);let z=(0,a.useRef)(!1);(0,a.useEffect)(()=>{if(z.current)return;z.current=!0;let e=k.get(`docs`),t=k.get(`chat`);e?(N(e),_()):t&&(C(t),v()),I(!0)},[]),(0,a.useEffect)(()=>{if(typeof window>`u`||!P)return;let e=new URL(window.location.href);e.searchParams.set(`chat`,g===`research`?S??``:``),e.searchParams.set(`docs`,g===`docs`?A??``:``);let t=`${e.pathname}?${e.searchParams.toString()}${e.hash}`;t!==`${window.location.pathname}${window.location.search}${window.location.hash}`&&window.history.replaceState(null,``,t)},[g,S,A,P]);let B=x.map(e=>({id:e.id,title:e.title,kind:`chat`})),V=e=>{C(e),v()},H=e=>{let{closedWasActive:t,nextActiveId:n}=T(e);t&&!n&&_()},U=e=>{let{closedWasActive:t,nextActiveId:n}=E(e);t&&!n&&_()},W=()=>{w(),v()},G=(0,a.useCallback)(e=>(C(e),v(),!0),[C,v]);(0,a.useEffect)(()=>(n.configureResearchAgentUI({onOpenChat:G}),()=>n.configureResearchAgentUI({onOpenChat:void 0})),[G]);let K=async(e,t)=>m(e,p(t)),q=async(e,t)=>h(e,p(t)),J=(0,a.useCallback)(e=>{w(),v(),R(e)},[w,v]);(0,a.useEffect)(()=>{L&&S&&(D(L),R(null))},[L,S,D]);let Y={extraTabs:B,activeExtraTabId:g===`research`?S??void 0:void 0,onExtraTabSelect:V,onExtraTabClose:H,onExtraTabsClose:U,onExtraTabAdd:W,onFileTabSelect:_,initialDocId:M,onActiveDocumentChange:j,onGenerateTips:K,onGenerateTopics:q,onSearchTopic:J,onSignIn:O,fileSourceProvider:F};return g===`docs`?(0,s.jsx)(l.ReasonDocs,{SidebarComponent:e,SidebarContentComponent:i,belowMainContent:(0,s.jsx)(t.U,{}),openFilesSidebarSignal:y,...Y}):(0,s.jsx)(l.ReasonDocs,{SidebarComponent:e,SidebarContentComponent:i,mainContent:(0,s.jsx)(t.L,{}),openFilesSidebarSignal:y,...Y})}function L({SidebarComponent:e,SidebarContentComponent:n,openSidebarEvent:r,...i}){return(0,s.jsx)(t.r,{...i,docsEnabled:!0,children:(0,s.jsx)(I,{SidebarComponent:e,SidebarContentComponent:n,openSidebarEvent:r})})}exports.ARTICLE_TOOLBAR_SHORTCUTS=t.D,exports.ArticleAIResponse=t.w,exports.ArticleActionButtons=t.O,exports.ArticleContent=t.S,exports.ArticleFollowupQuestions=t.T,exports.ArticlePanelHeader=t.A,exports.ArticlePromptInput=t.E,exports.ArticleReaderMount=t.R,exports.CategoryDock=t.c,exports.ChatInputBox=t.U,exports.ChatProvider=t.$,exports.ChatWindow=t.L,exports.CookieConsent=t.s,exports.ExtractPanelProvider=r.i,exports.HistoryDialogs=t.B,exports.HistoryDropdown=t.z,exports.KokoroVoiceSelector=t.u,exports.LexicalArticleViewer=t.C,exports.MainViewProvider=t.y,exports.QWKSEARCH_DEFAULT_ORIGIN=t.j,exports.QwkSearchApp=t.n,exports.QwkSearchProviders=t.r,exports.QwkSearchWorkspaceApp=L,exports.ResearchWorkspaceView=I,exports.SPOTLIGHT_LINKS=t.v,exports.SPOTLIGHT_PREFIXES=t.h,exports.SessionProvider=r.s,exports.SpotlightPalette=t.p,exports.UnifiedMarkdown=t.x,exports.VoiceSettingsPanel=t.l,exports.buildConnectStartUrl=t.M,exports.cn=i.o,exports.configureResearchAgentUI=n.configureResearchAgentUI,exports.createQwkSearchConnectAuthClient=t.N,exports.formatMessageTime=i.s,exports.formatTimeDifference=i.c,exports.formatToolbarShortcut=t.k,exports.getPageTips=m,exports.getQwkSearchApiKey=t.P,exports.getTopicSearches=h,exports.htmlToPlainText=p,exports.isChunkLoadError=t.i,exports.isQwkSearchApiRequest=t.F,exports.matchSpotlight=t.g,exports.openSpotlight=t.m,exports.parsePrefix=t._,exports.reloadForChunkError=t.a,exports.researchAgentUIConfig=n.researchAgentUIConfig,exports.setQwkSearchApiKey=t.I,exports.useChat=r.u,exports.useChatState=t.et,exports.useChatTabs=t.t,exports.useChunkErrorReload=t.o,exports.useExtractPanel=r.a,exports.useHistoryState=t.H,exports.useKokoroTTS=t.f,exports.useMainView=t.b,exports.useOptionalExtractPanel=r.o,exports.useSession=r.c,exports.useTextToSpeech=t.d;
1
+ "use client";"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./rolldown-runtime-BocRIvOZ.cjs"),t=require("./src-WYNNidsJ.cjs"),n=require("./config.cjs"),r=require("./tooltip-DmUO6ZUz.cjs"),i=require("./dialog-7GDz0sWx.cjs");let a=require("react"),o=require("next/navigation"),s=require("react/jsx-runtime"),c=require("grab-url");c=e.t(c,1);let l=require("react-reason-editor/reason-docs"),u=require("react-reason-editor/theme"),d=require("react-reason-editor/locale-bundle"),f=require("react-reason-editor-sidebar");function p(e){return e.replace(/<(script|style)[^>]*>[\s\S]*?<\/\1>/gi,` `).replace(/<[^>]+>/g,` `).replace(/&nbsp;/g,` `).replace(/\s+/g,` `).trim()}var m=async(e,t)=>{try{let n=await(0,c.default)(`agent/page-tips`,{method:`POST`,body:JSON.stringify({title:e,content:t})});return Array.isArray(n.tips)?n.tips:[]}catch{return[]}},h=async(e,t)=>{try{let n=await(0,c.default)(`agent/topic-searches`,{method:`POST`,body:JSON.stringify({title:e,content:t})});return Array.isArray(n.topics)?n.topics:[]}catch{return[]}},g=`/api/doc/google-docs`,_=`application/vnd.google-apps.document`,v=`application/vnd.google-apps.spreadsheet`,y=`application/vnd.google-apps.presentation`,b=`application/vnd.google-apps.drawing`,x=`application/vnd.google-apps.folder`,S=class extends Error{needsReauth;needsFolderAccess;status;constructor(e,t,n={}){super(e),this.name=`GoogleDriveError`,this.status=t,this.needsReauth=!!n.needsReauth,this.needsFolderAccess=!!n.needsFolderAccess}};async function C(e){let t=await fetch(`${g}${e}`,{credentials:`same-origin`}),n={};try{n=await t.json()}catch{}if(!t.ok||n?.success===!1)throw new S(n?.error||`Google Drive request failed (${t.status})`,t.status,n);return n}function w(e){return e===_||e===`text/plain`||e===`text/markdown`?`editor`:e===`application/pdf`||e===v||e===y?`pdf`:e===b||e.startsWith(`image/`)?`image`:`unsupported`}function T(e){if(e.mimeType===_)return`docx`;if(e.mimeType===v)return`xlsx`;if(e.mimeType===y)return`pptx`;if(e.mimeType===b)return`png`;let t=e.name.lastIndexOf(`.`);if(t>0&&t<e.name.length-1)return e.name.slice(t+1).toLowerCase();if(e.mimeType===`application/pdf`)return`pdf`;let n=e.mimeType.split(`/`)[1];return n&&/^[a-z0-9]{2,5}$/.test(n)?n:void 0}var E=(e,t)=>`${e}:${t}`,D=e=>`${g}/content?fileId=${encodeURIComponent(e)}`;function O(e,t){let n=[],r=new Set,i=(e,t)=>Number(t.mimeType===`application/vnd.google-apps.folder`)-Number(e.mimeType===`application/vnd.google-apps.folder`)||e.name.localeCompare(t.name,void 0,{numeric:!0,sensitivity:`base`});for(let{root:a,items:o}of t){let s=E(e,a.id);if(r.has(s))continue;r.add(s),n.push({id:s,title:a.name,content:``,parentId:null,isFolder:!0,isExpanded:t.length===1,external:{sourceId:e,fileId:a.id,mimeType:x,view:`unsupported`,webViewLink:a.webViewLink}});let c=new Set([a.id,...o.filter(e=>e.mimeType===x).map(e=>e.id)]);for(let t of[...o].sort(i)){let i=E(e,t.id);if(r.has(i))continue;r.add(i);let o=t.parents?.find(e=>c.has(e))??a.id,s=t.mimeType===x,l=s?`unsupported`:w(t.mimeType);n.push({id:i,title:t.name,content:``,parentId:E(e,o),isFolder:s,isExpanded:!1,external:{sourceId:e,fileId:t.id,mimeType:t.mimeType,view:l,extension:s?void 0:T(t),contentUrl:s||l===`unsupported`?void 0:D(t.id),webViewLink:t.webViewLink}})}}return n}function k(e){return e?.folders?.length?e.folders:(e?.folderIds??[]).map(e=>({id:e,name:e===`root`?`My Drive`:e}))}async function A(e){let t=k(e.credentials);if(t.length===0)return[];let n=await Promise.allSettled(t.map(e=>C(`/folder-tree?folderId=${encodeURIComponent(e.id)}`))),r=n.flatMap(e=>e.status===`fulfilled`?[e.value]:[]);if(r.length===0)throw n[0].reason;return O(e.id,r)}function j(e){return e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`)}function M(e){return e.split(/\r?\n\r?\n/).map(e=>e.trim()).filter(Boolean).map(e=>`<p>${j(e).replace(/\r?\n/g,`<br>`)}</p>`).join(``)}function N(e){if(typeof DOMParser>`u`){let t=e.match(/<body[^>]*>([\s\S]*)<\/body>/i);return(t?t[1]:e).replace(/<(script|style)[\s\S]*?<\/\1>/gi,``)}let t=new DOMParser().parseFromString(e,`text/html`),n=new Map;for(let e of Array.from(t.querySelectorAll(`style`)))for(let t of(e.textContent??``).matchAll(/\.([A-Za-z0-9_-]+)\s*\{([^}]*)\}/g))n.set(t[1],`${n.get(t[1])??``};${t[2]}`);t.querySelectorAll(`script, style, meta, link, title`).forEach(e=>e.remove());for(let e of Array.from(t.body.querySelectorAll(`span`))){let r=[...Array.from(e.classList).map(e=>n.get(e)??``),e.getAttribute(`style`)??``].join(`;`),i=Array.from(e.childNodes),a=e=>{let n=t.createElement(e);i.forEach(e=>n.appendChild(e)),i=[n]};/font-weight:\s*(700|800|900|bold)/i.test(r)&&a(`strong`),/font-style:\s*italic/i.test(r)&&a(`em`),/text-decoration[^;]*underline/i.test(r)&&a(`u`),/text-decoration[^;]*line-through/i.test(r)&&a(`s`),e.replaceWith(...i)}for(let e of Array.from(t.body.querySelectorAll(`a[href]`)))try{let t=new URL(e.getAttribute(`href`));t.hostname===`www.google.com`&&t.pathname===`/url`&&t.searchParams.get(`q`)&&e.setAttribute(`href`,t.searchParams.get(`q`))}catch{}for(let e of Array.from(t.body.querySelectorAll(`[class], [style], [id]`)))e.removeAttribute(`class`),e.removeAttribute(`style`),e.removeAttribute(`id`);return t.body.innerHTML.trim()}async function P(e){let t=e.external;if(!t?.contentUrl)return``;let n=await fetch(t.contentUrl,{credentials:`same-origin`});if(!n.ok){let e={};try{e=await n.json()}catch{}throw new S(e?.error||`Couldn't load the file (${n.status})`,n.status,e)}let r=await n.text();return t.mimeType===_?N(r):M(r)}var F={canList:e=>e.type===`gdocs`,listDocuments:e=>A(e),loadDocumentContent:P};function I({SidebarComponent:e=f.Sidebar,SidebarContentComponent:i=f.SidebarContent,openSidebarEvent:c}={}){let{activeView:g,toggleToDocs:_,toggleToResearch:v,filesSidebarRequestId:y,requestFilesSidebar:b}=t.b(),{chatTabs:x,activeChatId:S,openChat:C,newChat:w,closeChat:T,closeChats:E}=t.t(),{sendMessage:D}=r.u(),{signIn:O}=r.c(),k=(0,o.useSearchParams)(),[A,j]=(0,a.useState)(null),[M,N]=(0,a.useState)(null),[P,I]=(0,a.useState)(!1),[L,R]=(0,a.useState)(null);(0,a.useEffect)(()=>{if(c)return window.addEventListener(c,b),()=>window.removeEventListener(c,b)},[c,b]),(0,a.useEffect)(()=>{d.localeActions.setLang(`en`),u.themeActions.setColor(`default`)},[]);let z=(0,a.useRef)(!1);(0,a.useEffect)(()=>{if(z.current)return;z.current=!0;let e=k.get(`docs`),t=k.get(`chat`);e?(N(e),_()):t&&(C(t),v()),I(!0)},[]),(0,a.useEffect)(()=>{if(typeof window>`u`||!P)return;let e=new URL(window.location.href);e.searchParams.set(`chat`,g===`research`?S??``:``),e.searchParams.set(`docs`,g===`docs`?A??``:``);let t=`${e.pathname}?${e.searchParams.toString()}${e.hash}`;t!==`${window.location.pathname}${window.location.search}${window.location.hash}`&&window.history.replaceState(null,``,t)},[g,S,A,P]);let B=x.map(e=>({id:e.id,title:e.title,kind:`chat`})),V=e=>{C(e),v()},H=e=>{let{closedWasActive:t,nextActiveId:n}=T(e);t&&!n&&_()},U=e=>{let{closedWasActive:t,nextActiveId:n}=E(e);t&&!n&&_()},W=()=>{w(),v()},G=(0,a.useCallback)(e=>(C(e),v(),!0),[C,v]);(0,a.useEffect)(()=>(n.configureResearchAgentUI({onOpenChat:G}),()=>n.configureResearchAgentUI({onOpenChat:void 0})),[G]);let K=async(e,t)=>m(e,p(t)),q=async(e,t)=>h(e,p(t)),J=(0,a.useCallback)(e=>{w(),v(),R(e)},[w,v]);(0,a.useEffect)(()=>{L&&S&&(D(L),R(null))},[L,S,D]);let Y={extraTabs:B,activeExtraTabId:g===`research`?S??void 0:void 0,onExtraTabSelect:V,onExtraTabClose:H,onExtraTabsClose:U,onExtraTabAdd:W,onFileTabSelect:_,initialDocId:M,onActiveDocumentChange:j,onGenerateTips:K,onGenerateTopics:q,onSearchTopic:J,onSignIn:O,fileSourceProvider:F};return g===`docs`?(0,s.jsx)(l.ReasonDocs,{SidebarComponent:e,SidebarContentComponent:i,belowMainContent:(0,s.jsx)(t.U,{}),openFilesSidebarSignal:y,...Y}):(0,s.jsx)(l.ReasonDocs,{SidebarComponent:e,SidebarContentComponent:i,mainContent:(0,s.jsx)(t.L,{}),openFilesSidebarSignal:y,...Y})}function L({SidebarComponent:e,SidebarContentComponent:n,openSidebarEvent:r,...i}){return(0,s.jsx)(t.r,{...i,docsEnabled:!0,children:(0,s.jsx)(I,{SidebarComponent:e,SidebarContentComponent:n,openSidebarEvent:r})})}exports.ARTICLE_TOOLBAR_SHORTCUTS=t.D,exports.ArticleAIResponse=t.w,exports.ArticleActionButtons=t.O,exports.ArticleContent=t.S,exports.ArticleFollowupQuestions=t.T,exports.ArticlePanelHeader=t.A,exports.ArticlePromptInput=t.E,exports.ArticleReaderMount=t.R,exports.CategoryDock=t.c,exports.ChatInputBox=t.U,exports.ChatProvider=t.$,exports.ChatWindow=t.L,exports.CookieConsent=t.s,exports.ExtractPanelProvider=r.i,exports.HistoryDialogs=t.B,exports.HistoryDropdown=t.z,exports.KokoroVoiceSelector=t.u,exports.LexicalArticleViewer=t.C,exports.MainViewProvider=t.y,exports.QWKSEARCH_DEFAULT_ORIGIN=t.j,exports.QwkSearchApp=t.n,exports.QwkSearchProviders=t.r,exports.QwkSearchWorkspaceApp=L,exports.ResearchWorkspaceView=I,exports.SPOTLIGHT_LINKS=t.v,exports.SPOTLIGHT_PREFIXES=t.h,exports.SessionProvider=r.s,exports.SpotlightPalette=t.p,exports.UnifiedMarkdown=t.x,exports.VoiceSettingsPanel=t.l,exports.buildConnectStartUrl=t.M,exports.cn=i.o,exports.configureResearchAgentUI=n.configureResearchAgentUI,exports.createQwkSearchConnectAuthClient=t.N,exports.formatMessageTime=i.s,exports.formatTimeDifference=i.c,exports.formatToolbarShortcut=t.k,exports.getPageTips=m,exports.getQwkSearchApiKey=t.P,exports.getTopicSearches=h,exports.htmlToPlainText=p,exports.isChunkLoadError=t.i,exports.isQwkSearchApiRequest=t.F,exports.matchSpotlight=t.g,exports.openSpotlight=t.m,exports.parsePrefix=t._,exports.reloadForChunkError=t.a,exports.researchAgentUIConfig=n.researchAgentUIConfig,exports.setQwkSearchApiKey=t.I,exports.useChat=r.u,exports.useChatState=t.et,exports.useChatTabs=t.t,exports.useChunkErrorReload=t.o,exports.useExtractPanel=r.a,exports.useHistoryState=t.H,exports.useKokoroTTS=t.f,exports.useMainView=t.b,exports.useOptionalExtractPanel=r.o,exports.useSession=r.c,exports.useTextToSpeech=t.d;
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  "use client";
3
- import { $ as e, A as t, B as n, C as r, D as i, E as a, F as o, H as s, I as c, L as l, M as u, N as d, O as f, P as p, R as m, S as h, T as g, U as _, _ as v, a as y, b, c as x, d as S, et as C, f as w, g as T, h as E, i as D, j as O, k, l as ee, m as te, n as ne, o as A, p as j, r as M, s as N, t as P, u as F, v as I, w as re, x as ie, y as ae, z as oe } from "./src-BqV2Vwpv.js";
3
+ import { $ as e, A as t, B as n, C as r, D as i, E as a, F as o, H as s, I as c, L as l, M as u, N as d, O as f, P as p, R as m, S as h, T as g, U as _, _ as v, a as y, b, c as x, d as S, et as C, f as w, g as T, h as E, i as D, j as O, k, l as ee, m as te, n as ne, o as A, p as j, r as M, s as N, t as P, u as F, v as I, w as re, x as ie, y as ae, z as oe } from "./src-SllRa2bC.js";
4
4
  import { configureResearchAgentUI as L, researchAgentUIConfig as se } from "./config.mjs";
5
5
  import { a as ce, c as R, i as le, o as ue, s as de, u as z } from "./tooltip-Bl3IdX-I.js";
6
6
  import { c as fe, o as pe, s as me } from "./dialog-Cufn2u50.js";
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.296",
4
+ "version": "0.1.298",
5
5
  "author": "vtempest",
6
6
  "repository": {
7
7
  "type": "git",
@@ -97,35 +97,35 @@
97
97
  "@radix-ui/react-slot": "^1.5.0",
98
98
  "@radix-ui/react-tooltip": "^1.4.1",
99
99
  "ai": "^7.0.159",
100
- "chat-agent-toolkit": "^1.2.430",
100
+ "chat-agent-toolkit": "^1.2.432",
101
101
  "class-variance-authority": "^0.7.1",
102
102
  "clsx": "^2.1.1",
103
103
  "dompurify": "^3.4.17",
104
104
  "drizzle-orm": "^0.45.4",
105
- "extract-webpage": "^1.2.423",
105
+ "extract-webpage": "^1.2.425",
106
106
  "grab-url": "^3.0.9",
107
107
  "html2canvas": "^1.4.1",
108
108
  "kokoro-js": "^1.2.1",
109
- "legal-terms-privacy-policy": "^0.1.245",
109
+ "legal-terms-privacy-policy": "^0.1.247",
110
110
  "lucide-react": "^1.66.0",
111
111
  "markdown-to-jsx": "^9.10.4",
112
112
  "motion": "^14.9.0",
113
113
  "quantum-sphere-loading-icon": "^1.0.6",
114
- "qwksearch-api-client": "^1.0.240",
114
+ "qwksearch-api-client": "^1.0.242",
115
115
  "react-icons": "^5.7.0",
116
116
  "react-native-app-buttons": "^0.1.4",
117
117
  "react-textarea-autosize": "^8.5.9",
118
- "search-web-api": "^1.0.282",
119
- "shadcn-app-dock": "^0.1.280",
118
+ "search-web-api": "^1.0.284",
119
+ "shadcn-app-dock": "^0.1.282",
120
120
  "shadcn-theme-menu": "^1.1.74",
121
121
  "sonner": "^2.0.8",
122
122
  "streamdown": "^2.7.1",
123
123
  "tailwind-merge": "^3.7.0",
124
- "trending-news-api": "^0.1.158",
125
- "education-playlists": "^0.1.105",
124
+ "trending-news-api": "^0.1.160",
125
+ "education-playlists": "^0.1.107",
126
126
  "turndown": "^7.2.4",
127
127
  "use-voice-control": "^0.1.235",
128
- "use-weather-forecast": "^0.1.382"
128
+ "use-weather-forecast": "^0.1.384"
129
129
  },
130
130
  "devDependencies": {
131
131
  "@cloudflare/workers-types": "^5.20261101.1",
@@ -142,8 +142,8 @@
142
142
  "next": "^16.4.3",
143
143
  "react": "^19.3.1",
144
144
  "react-dom": "^19.3.1",
145
- "react-reason-editor": "^1.0.232",
146
- "react-reason-editor-sidebar": "^0.1.287",
145
+ "react-reason-editor": "^1.0.234",
146
+ "react-reason-editor-sidebar": "^0.1.289",
147
147
  "search-autocomplete": "^0.1.0",
148
148
  "storybook": "^10.6.5",
149
149
  "tailwindcss": "^4.3.3",
@@ -257,6 +257,19 @@
257
257
  "scope": "client",
258
258
  "default": ""
259
259
  },
260
+ {
261
+ "name": "Trending News Source",
262
+ "key": "trendingNewsSource",
263
+ "type": "select",
264
+ "required": false,
265
+ "description": "Where the news widget's headlines come from: the daily trending topics, or the Hacker News front page (scraped from hckrnews.com, with a preview image for each story).",
266
+ "default": "trending",
267
+ "scope": "client",
268
+ "options": [
269
+ { "name": "Trending topics (default)", "value": "trending" },
270
+ { "name": "Hacker News (hckrnews.com)", "value": "hckrnews" }
271
+ ]
272
+ },
260
273
  {
261
274
  "name": "Trending News Topics",
262
275
  "key": "trendingNewsMaxTopics",