research-agent-ui 0.1.355 → 0.1.357
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/ArticleExtractPanel-CPSLgtSv.js +418 -0
- package/dist/ArticleExtractPanel-o2Nlh5bC.cjs +2 -0
- package/dist/ChatConversationThread-htav026P.cjs +17 -0
- package/dist/{ChatConversationThread-B70yZMw_.js → ChatConversationThread-o6M_njHK.js} +367 -395
- package/dist/components/ArticleReader/ArticleContent.d.ts +2 -0
- package/dist/components/ArticleReader/ArticleOutline.d.ts +7 -0
- package/dist/components/ArticleReader/ArticleSidebarTabs.d.ts +15 -0
- package/dist/components/ArticleReader/LexicalArticleViewer.d.ts +3 -0
- package/dist/components/ArticleReader/articleOutline.d.ts +29 -0
- package/dist/components/ArticleReader/index.d.ts +3 -0
- package/dist/components/SlashMenu/SlashMenu.d.ts +30 -0
- package/dist/components/SlashMenu/index.d.ts +11 -0
- package/dist/components/SlashMenu/slashCommands.d.ts +20 -0
- package/dist/components/SlashMenu/slashFiles.d.ts +27 -0
- package/dist/components/SlashMenu/slashKeyboard.d.ts +44 -0
- package/dist/components/SlashMenu/slashMatch.d.ts +78 -0
- package/dist/components/SlashMenu/slashTrigger.d.ts +43 -0
- package/dist/components/SlashMenu/types.d.ts +25 -0
- package/dist/components/SlashMenu/useLibraryDocuments.d.ts +11 -0
- package/dist/components/SlashMenu/useSlashMenu.d.ts +44 -0
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +4 -4
- package/dist/{src-Cgy6IAES.js → src-BUCWu20J.js} +2183 -1474
- package/dist/src-StXM79lG.cjs +34 -0
- package/dist/workspace.cjs +1 -1
- package/dist/workspace.mjs +87 -87
- package/package.json +14 -12
- package/dist/ArticleExtractPanel-B6tyR_bs.js +0 -389
- package/dist/ArticleExtractPanel-YlXZ8P18.cjs +0 -2
- package/dist/ChatConversationThread-BDzlHmvK.cjs +0 -17
- package/dist/src-D7eu9lB9.cjs +0 -34
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("./src-D7eu9lB9.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(/ /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,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`)}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-StXM79lG.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(/ /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,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`)}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.q,{}),openFilesSidebarSignal:y,...Y}):(0,s.jsx)(l.ReasonDocs,{SidebarComponent:e,SidebarContentComponent:i,mainContent:(0,s.jsx)(t.V,{}),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.j,exports.ArticleAIResponse=t.O,exports.ArticleActionButtons=t.M,exports.ArticleContent=t.T,exports.ArticleFollowupQuestions=t.k,exports.ArticleOutline=t.w,exports.ArticlePanelHeader=t.P,exports.ArticlePromptInput=t.A,exports.ArticleReaderMount=t.H,exports.ArticleSidebarTabs=t.S,exports.CategoryDock=t.c,exports.ChatInputBox=t.q,exports.ChatProvider=t.ot,exports.ChatWindow=t.V,exports.CookieConsent=t.s,exports.ExtractPanelProvider=r.i,exports.HistoryDialogs=t.W,exports.HistoryDropdown=t.U,exports.KokoroVoiceSelector=t.u,exports.LexicalArticleViewer=t.E,exports.MainViewProvider=t.y,exports.QWKSEARCH_DEFAULT_ORIGIN=t.F,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.articleTabIds=t.C,exports.buildConnectStartUrl=t.I,exports.cn=i.o,exports.configureResearchAgentUI=n.configureResearchAgentUI,exports.createQwkSearchConnectAuthClient=t.L,exports.extractOutline=t.D,exports.formatMessageTime=i.s,exports.formatTimeDifference=i.c,exports.formatToolbarShortcut=t.N,exports.getPageTips=m,exports.getQwkSearchApiKey=t.R,exports.getTopicSearches=h,exports.htmlToPlainText=p,exports.isChunkLoadError=t.i,exports.isQwkSearchApiRequest=t.z,exports.matchSpotlight=t.g,exports.openSpotlight=t.m,exports.parsePrefix=t._,exports.reloadForChunkError=t.a,exports.researchAgentUIConfig=n.researchAgentUIConfig,exports.setQwkSearchApiKey=t.B,exports.useChat=r.u,exports.useChatState=t.st,exports.useChatTabs=t.t,exports.useChunkErrorReload=t.o,exports.useExtractPanel=r.a,exports.useHistoryState=t.K,exports.useKokoroTTS=t.f,exports.useMainView=t.b,exports.useOptionalExtractPanel=r.o,exports.useSession=r.c,exports.useTextToSpeech=t.d;
|
package/dist/workspace.mjs
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use client";
|
|
3
|
-
import {
|
|
4
|
-
import { configureResearchAgentUI as L, researchAgentUIConfig as
|
|
5
|
-
import { a as
|
|
6
|
-
import { c as
|
|
7
|
-
import { useCallback as B, useEffect as V, useRef as
|
|
8
|
-
import { useSearchParams as
|
|
3
|
+
import { A as e, B as t, C as n, D as r, E as i, F as a, H as o, I as s, K 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 _, V 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 ee, j as te, k as O, l as k, m as A, n as j, o as ne, ot as M, p as N, q as P, r as F, s as re, st as ie, t as I, u as ae, v as oe, w as se, x as ce, y as le, z as ue } from "./src-BUCWu20J.js";
|
|
4
|
+
import { configureResearchAgentUI as L, researchAgentUIConfig as de } from "./config.mjs";
|
|
5
|
+
import { a as fe, c as R, i as pe, o as me, s as he, u as z } from "./tooltip-Bl3IdX-I.js";
|
|
6
|
+
import { c as ge, o as _e, s as ve } from "./dialog-Cufn2u50.js";
|
|
7
|
+
import { useCallback as B, useEffect as V, useRef as ye, useState as H } from "react";
|
|
8
|
+
import { useSearchParams as be } from "next/navigation";
|
|
9
9
|
import { jsx as U } from "react/jsx-runtime";
|
|
10
10
|
import W from "grab-url";
|
|
11
11
|
import { ReasonDocs as G } from "react-reason-editor/reason-docs";
|
|
12
|
-
import { themeActions as
|
|
13
|
-
import { localeActions as
|
|
14
|
-
import { Sidebar as
|
|
12
|
+
import { themeActions as xe } from "react-reason-editor/theme";
|
|
13
|
+
import { localeActions as Se } from "react-reason-editor/locale-bundle";
|
|
14
|
+
import { Sidebar as Ce, SidebarContent as we } from "react-reason-editor-sidebar";
|
|
15
15
|
// src/workspace/page-tips.ts
|
|
16
16
|
function K(e) {
|
|
17
17
|
return e.replace(/<(script|style)[^>]*>[\s\S]*?<\/\1>/gi, " ").replace(/<[^>]+>/g, " ").replace(/ /g, " ").replace(/\s+/g, " ").trim();
|
|
@@ -42,7 +42,7 @@ var q = async (e, t) => {
|
|
|
42
42
|
} catch {
|
|
43
43
|
return [];
|
|
44
44
|
}
|
|
45
|
-
}, Y = "/api/doc/google-docs", X = "application/vnd.google-apps.document", Z = "application/vnd.google-apps.spreadsheet",
|
|
45
|
+
}, Y = "/api/doc/google-docs", X = "application/vnd.google-apps.document", Z = "application/vnd.google-apps.spreadsheet", Te = "application/vnd.google-apps.presentation", Ee = "application/vnd.google-apps.drawing", Q = "application/vnd.google-apps.folder", De = class extends Error {
|
|
46
46
|
needsReauth;
|
|
47
47
|
needsFolderAccess;
|
|
48
48
|
status;
|
|
@@ -50,30 +50,30 @@ var q = async (e, t) => {
|
|
|
50
50
|
super(e), this.name = "GoogleDriveError", this.status = t, this.needsReauth = !!n.needsReauth, this.needsFolderAccess = !!n.needsFolderAccess;
|
|
51
51
|
}
|
|
52
52
|
};
|
|
53
|
-
async function
|
|
53
|
+
async function Oe(e) {
|
|
54
54
|
let t = await fetch(`${Y}${e}`, { credentials: "same-origin" }), n = {};
|
|
55
55
|
try {
|
|
56
56
|
n = await t.json();
|
|
57
57
|
} catch {}
|
|
58
|
-
if (!t.ok || n?.success === !1) throw new
|
|
58
|
+
if (!t.ok || n?.success === !1) throw new De(n?.error || `Google Drive request failed (${t.status})`, t.status, n);
|
|
59
59
|
return n;
|
|
60
60
|
}
|
|
61
|
-
function
|
|
62
|
-
return e === X || e === "text/plain" || e === "text/markdown" ? "editor" : e === "application/pdf" || e === Z || e ===
|
|
61
|
+
function ke(e) {
|
|
62
|
+
return e === X || e === "text/plain" || e === "text/markdown" ? "editor" : e === "application/pdf" || e === Z || e === Te ? "pdf" : e === Ee || e.startsWith("image/") ? "image" : "unsupported";
|
|
63
63
|
}
|
|
64
|
-
function
|
|
64
|
+
function Ae(e) {
|
|
65
65
|
if (e.mimeType === X) return "docx";
|
|
66
66
|
if (e.mimeType === Z) return "xlsx";
|
|
67
|
-
if (e.mimeType ===
|
|
68
|
-
if (e.mimeType ===
|
|
67
|
+
if (e.mimeType === Te) return "pptx";
|
|
68
|
+
if (e.mimeType === Ee) return "png";
|
|
69
69
|
let t = e.name.lastIndexOf(".");
|
|
70
70
|
if (t > 0 && t < e.name.length - 1) return e.name.slice(t + 1).toLowerCase();
|
|
71
71
|
if (e.mimeType === "application/pdf") return "pdf";
|
|
72
72
|
let n = e.mimeType.split("/")[1];
|
|
73
73
|
return n && /^[a-z0-9]{2,5}$/.test(n) ? n : void 0;
|
|
74
74
|
}
|
|
75
|
-
var $ = (e, t) => `${e}:${t}`,
|
|
76
|
-
function
|
|
75
|
+
var $ = (e, t) => `${e}:${t}`, je = (e) => `${Y}/content?fileId=${encodeURIComponent(e)}`;
|
|
76
|
+
function Me(e, t) {
|
|
77
77
|
let n = [], r = /* @__PURE__ */ 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, {
|
|
78
78
|
numeric: !0,
|
|
79
79
|
sensitivity: "base"
|
|
@@ -101,7 +101,7 @@ function Oe(e, t) {
|
|
|
101
101
|
let i = $(e, t.id);
|
|
102
102
|
if (r.has(i)) continue;
|
|
103
103
|
r.add(i);
|
|
104
|
-
let o = t.parents?.find((e) => c.has(e)) ?? a.id, s = t.mimeType === Q, l = s ? "unsupported" :
|
|
104
|
+
let o = t.parents?.find((e) => c.has(e)) ?? a.id, s = t.mimeType === Q, l = s ? "unsupported" : ke(t.mimeType);
|
|
105
105
|
n.push({
|
|
106
106
|
id: i,
|
|
107
107
|
title: t.name,
|
|
@@ -114,8 +114,8 @@ function Oe(e, t) {
|
|
|
114
114
|
fileId: t.id,
|
|
115
115
|
mimeType: t.mimeType,
|
|
116
116
|
view: l,
|
|
117
|
-
extension: s ? void 0 :
|
|
118
|
-
contentUrl: s || l === "unsupported" ? void 0 :
|
|
117
|
+
extension: s ? void 0 : Ae(t),
|
|
118
|
+
contentUrl: s || l === "unsupported" ? void 0 : je(t.id),
|
|
119
119
|
webViewLink: t.webViewLink
|
|
120
120
|
}
|
|
121
121
|
});
|
|
@@ -123,26 +123,26 @@ function Oe(e, t) {
|
|
|
123
123
|
}
|
|
124
124
|
return n;
|
|
125
125
|
}
|
|
126
|
-
function
|
|
126
|
+
function Ne(e) {
|
|
127
127
|
return e?.folders?.length ? e.folders : (e?.folderIds ?? []).map((e) => ({
|
|
128
128
|
id: e,
|
|
129
129
|
name: e === "root" ? "My Drive" : e
|
|
130
130
|
}));
|
|
131
131
|
}
|
|
132
|
-
async function
|
|
133
|
-
let t =
|
|
132
|
+
async function Pe(e) {
|
|
133
|
+
let t = Ne(e.credentials);
|
|
134
134
|
if (t.length === 0) return [];
|
|
135
|
-
let n = await Promise.allSettled(t.map((e) =>
|
|
135
|
+
let n = await Promise.allSettled(t.map((e) => Oe(`/folder-tree?folderId=${encodeURIComponent(e.id)}`))), r = n.flatMap((e) => e.status === "fulfilled" ? [e.value] : []);
|
|
136
136
|
if (r.length === 0) throw n[0].reason;
|
|
137
|
-
return
|
|
137
|
+
return Me(e.id, r);
|
|
138
138
|
}
|
|
139
|
-
function
|
|
139
|
+
function Fe(e) {
|
|
140
140
|
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
141
141
|
}
|
|
142
|
-
function
|
|
143
|
-
return e.split(/\r?\n\r?\n/).map((e) => e.trim()).filter(Boolean).map((e) => `<p>${
|
|
142
|
+
function Ie(e) {
|
|
143
|
+
return e.split(/\r?\n\r?\n/).map((e) => e.trim()).filter(Boolean).map((e) => `<p>${Fe(e).replace(/\r?\n/g, "<br>")}</p>`).join("");
|
|
144
144
|
}
|
|
145
|
-
function
|
|
145
|
+
function Le(e) {
|
|
146
146
|
if (typeof DOMParser > "u") {
|
|
147
147
|
let t = e.match(/<body[^>]*>([\s\S]*)<\/body>/i);
|
|
148
148
|
return (t ? t[1] : e).replace(/<(script|style)[\s\S]*?<\/\1>/gi, "");
|
|
@@ -164,7 +164,7 @@ function Ne(e) {
|
|
|
164
164
|
for (let e of Array.from(t.body.querySelectorAll("[class], [style], [id]"))) e.removeAttribute("class"), e.removeAttribute("style"), e.removeAttribute("id");
|
|
165
165
|
return t.body.innerHTML.trim();
|
|
166
166
|
}
|
|
167
|
-
async function
|
|
167
|
+
async function Re(e) {
|
|
168
168
|
let t = e.external;
|
|
169
169
|
if (!t?.contentUrl) return "";
|
|
170
170
|
let n = await fetch(t.contentUrl, { credentials: "same-origin" });
|
|
@@ -173,108 +173,108 @@ async function Pe(e) {
|
|
|
173
173
|
try {
|
|
174
174
|
e = await n.json();
|
|
175
175
|
} catch {}
|
|
176
|
-
throw new
|
|
176
|
+
throw new De(e?.error || `Couldn't load the file (${n.status})`, n.status, e);
|
|
177
177
|
}
|
|
178
178
|
let r = await n.text();
|
|
179
|
-
return t.mimeType === X ?
|
|
179
|
+
return t.mimeType === X ? Le(r) : Ie(r);
|
|
180
180
|
}
|
|
181
|
-
var
|
|
181
|
+
var ze = {
|
|
182
182
|
canList: (e) => e.type === "gdocs",
|
|
183
|
-
listDocuments: (e) =>
|
|
184
|
-
loadDocumentContent:
|
|
183
|
+
listDocuments: (e) => Pe(e),
|
|
184
|
+
loadDocumentContent: Re
|
|
185
185
|
};
|
|
186
186
|
// src/workspace/ResearchWorkspaceView.tsx
|
|
187
|
-
function
|
|
188
|
-
let { activeView: r, toggleToDocs: i, toggleToResearch: a, filesSidebarRequestId: o, requestFilesSidebar: s } =
|
|
187
|
+
function Be({ SidebarComponent: e = Ce, SidebarContentComponent: t = we, openSidebarEvent: n } = {}) {
|
|
188
|
+
let { activeView: r, toggleToDocs: i, toggleToResearch: a, filesSidebarRequestId: o, requestFilesSidebar: s } = S(), { chatTabs: c, activeChatId: l, openChat: u, newChat: d, closeChat: f, closeChats: p } = I(), { sendMessage: m } = z(), { signIn: h } = R(), g = be(), [_, y] = H(null), [b, x] = H(null), [C, w] = H(!1), [T, E] = H(null);
|
|
189
189
|
V(() => {
|
|
190
190
|
if (n) return window.addEventListener(n, s), () => window.removeEventListener(n, s);
|
|
191
191
|
}, [n, s]), V(() => {
|
|
192
|
-
|
|
192
|
+
Se.setLang("en"), xe.setColor("default");
|
|
193
193
|
}, []);
|
|
194
|
-
let
|
|
194
|
+
let D = ye(!1);
|
|
195
195
|
V(() => {
|
|
196
|
-
if (
|
|
197
|
-
|
|
198
|
-
let e =
|
|
199
|
-
e ? (
|
|
196
|
+
if (D.current) return;
|
|
197
|
+
D.current = !0;
|
|
198
|
+
let e = g.get("docs"), t = g.get("chat");
|
|
199
|
+
e ? (x(e), i()) : t && (u(t), a()), w(!0);
|
|
200
200
|
}, []), V(() => {
|
|
201
|
-
if (typeof window > "u" || !
|
|
201
|
+
if (typeof window > "u" || !C) return;
|
|
202
202
|
let e = new URL(window.location.href);
|
|
203
|
-
e.searchParams.set("chat", r === "research" ?
|
|
203
|
+
e.searchParams.set("chat", r === "research" ? l ?? "" : ""), e.searchParams.set("docs", r === "docs" ? _ ?? "" : "");
|
|
204
204
|
let t = `${e.pathname}?${e.searchParams.toString()}${e.hash}`;
|
|
205
205
|
t !== `${window.location.pathname}${window.location.search}${window.location.hash}` && window.history.replaceState(null, "", t);
|
|
206
206
|
}, [
|
|
207
207
|
r,
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
208
|
+
l,
|
|
209
|
+
_,
|
|
210
|
+
C
|
|
211
211
|
]);
|
|
212
|
-
let
|
|
212
|
+
let ee = c.map((e) => ({
|
|
213
213
|
id: e.id,
|
|
214
214
|
title: e.title,
|
|
215
215
|
kind: "chat"
|
|
216
|
-
})),
|
|
217
|
-
|
|
218
|
-
},
|
|
219
|
-
let { closedWasActive: t, nextActiveId: n } =
|
|
216
|
+
})), te = (e) => {
|
|
217
|
+
u(e), a();
|
|
218
|
+
}, O = (e) => {
|
|
219
|
+
let { closedWasActive: t, nextActiveId: n } = f(e);
|
|
220
220
|
t && !n && i();
|
|
221
|
-
},
|
|
222
|
-
let { closedWasActive: t, nextActiveId: n } =
|
|
221
|
+
}, k = (e) => {
|
|
222
|
+
let { closedWasActive: t, nextActiveId: n } = p(e);
|
|
223
223
|
t && !n && i();
|
|
224
224
|
}, A = () => {
|
|
225
|
-
|
|
226
|
-
}, j = B((e) => (
|
|
225
|
+
d(), a();
|
|
226
|
+
}, j = B((e) => (u(e), a(), !0), [u, a]);
|
|
227
227
|
V(() => (L({ onOpenChat: j }), () => L({ onOpenChat: void 0 })), [j]);
|
|
228
|
-
let
|
|
229
|
-
|
|
230
|
-
}, [
|
|
228
|
+
let ne = async (e, t) => q(e, K(t)), M = async (e, t) => J(e, K(t)), N = B((e) => {
|
|
229
|
+
d(), a(), E(e);
|
|
230
|
+
}, [d, a]);
|
|
231
231
|
V(() => {
|
|
232
|
-
|
|
232
|
+
T && l && (m(T), E(null));
|
|
233
233
|
}, [
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
234
|
+
T,
|
|
235
|
+
l,
|
|
236
|
+
m
|
|
237
237
|
]);
|
|
238
|
-
let
|
|
239
|
-
extraTabs:
|
|
240
|
-
activeExtraTabId: r === "research" ?
|
|
241
|
-
onExtraTabSelect:
|
|
242
|
-
onExtraTabClose:
|
|
243
|
-
onExtraTabsClose:
|
|
238
|
+
let F = {
|
|
239
|
+
extraTabs: ee,
|
|
240
|
+
activeExtraTabId: r === "research" ? l ?? void 0 : void 0,
|
|
241
|
+
onExtraTabSelect: te,
|
|
242
|
+
onExtraTabClose: O,
|
|
243
|
+
onExtraTabsClose: k,
|
|
244
244
|
onExtraTabAdd: A,
|
|
245
245
|
onFileTabSelect: i,
|
|
246
|
-
initialDocId:
|
|
247
|
-
onActiveDocumentChange:
|
|
248
|
-
onGenerateTips:
|
|
249
|
-
onGenerateTopics:
|
|
250
|
-
onSearchTopic:
|
|
251
|
-
onSignIn:
|
|
252
|
-
fileSourceProvider:
|
|
246
|
+
initialDocId: b,
|
|
247
|
+
onActiveDocumentChange: y,
|
|
248
|
+
onGenerateTips: ne,
|
|
249
|
+
onGenerateTopics: M,
|
|
250
|
+
onSearchTopic: N,
|
|
251
|
+
onSignIn: h,
|
|
252
|
+
fileSourceProvider: ze
|
|
253
253
|
};
|
|
254
254
|
return r === "docs" ? /* @__PURE__ */ U(G, {
|
|
255
255
|
SidebarComponent: e,
|
|
256
256
|
SidebarContentComponent: t,
|
|
257
|
-
belowMainContent: /* @__PURE__ */ U(
|
|
257
|
+
belowMainContent: /* @__PURE__ */ U(P, {}),
|
|
258
258
|
openFilesSidebarSignal: o,
|
|
259
|
-
...
|
|
259
|
+
...F
|
|
260
260
|
}) : /* @__PURE__ */ U(G, {
|
|
261
261
|
SidebarComponent: e,
|
|
262
262
|
SidebarContentComponent: t,
|
|
263
|
-
mainContent: /* @__PURE__ */ U(
|
|
263
|
+
mainContent: /* @__PURE__ */ U(v, {}),
|
|
264
264
|
openFilesSidebarSignal: o,
|
|
265
|
-
...
|
|
265
|
+
...F
|
|
266
266
|
});
|
|
267
267
|
}
|
|
268
268
|
// src/workspace/QwkSearchWorkspaceApp.tsx
|
|
269
|
-
function
|
|
270
|
-
return /* @__PURE__ */ U(
|
|
269
|
+
function Ve({ SidebarComponent: e, SidebarContentComponent: t, openSidebarEvent: n, ...r }) {
|
|
270
|
+
return /* @__PURE__ */ U(F, {
|
|
271
271
|
...r,
|
|
272
272
|
docsEnabled: !0,
|
|
273
|
-
children: /* @__PURE__ */ U(
|
|
273
|
+
children: /* @__PURE__ */ U(Be, {
|
|
274
274
|
SidebarComponent: e,
|
|
275
275
|
SidebarContentComponent: t,
|
|
276
276
|
openSidebarEvent: n
|
|
277
277
|
})
|
|
278
278
|
});
|
|
279
279
|
}
|
|
280
|
-
export {
|
|
280
|
+
export { te as ARTICLE_TOOLBAR_SHORTCUTS, f as ArticleAIResponse, u as ArticleActionButtons, g as ArticleContent, O as ArticleFollowupQuestions, se as ArticleOutline, p as ArticlePanelHeader, e as ArticlePromptInput, o as ArticleReaderMount, h as ArticleSidebarTabs, C as CategoryDock, P as ChatInputBox, M as ChatProvider, v as ChatWindow, re as CookieConsent, pe as ExtractPanelProvider, y as HistoryDialogs, _ as HistoryDropdown, ae as KokoroVoiceSelector, i as LexicalArticleViewer, le as MainViewProvider, a as QWKSEARCH_DEFAULT_ORIGIN, j as QwkSearchApp, F as QwkSearchProviders, Ve as QwkSearchWorkspaceApp, Be as ResearchWorkspaceView, oe as SPOTLIGHT_LINKS, D as SPOTLIGHT_PREFIXES, he as SessionProvider, N as SpotlightPalette, ce as UnifiedMarkdown, k as VoiceSettingsPanel, n as articleTabIds, s as buildConnectStartUrl, _e as cn, L as configureResearchAgentUI, l as createQwkSearchConnectAuthClient, r as extractOutline, ve as formatMessageTime, ge as formatTimeDifference, d as formatToolbarShortcut, q as getPageTips, m as getQwkSearchApiKey, J as getTopicSearches, K as htmlToPlainText, ee as isChunkLoadError, ue as isQwkSearchApiRequest, E as matchSpotlight, A as openSpotlight, b as parsePrefix, x as reloadForChunkError, de as researchAgentUIConfig, t as setQwkSearchApiKey, z as useChat, ie as useChatState, I as useChatTabs, ne as useChunkErrorReload, fe as useExtractPanel, c as useHistoryState, T as useKokoroTTS, S as useMainView, me as useOptionalExtractPanel, R as useSession, w 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.357",
|
|
5
5
|
"author": "vtempest",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -97,35 +97,37 @@
|
|
|
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.
|
|
100
|
+
"chat-agent-toolkit": "^1.2.491",
|
|
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.
|
|
105
|
+
"extract-webpage": "^1.2.484",
|
|
106
|
+
"fumadocs-core": "^16.15.17",
|
|
107
|
+
"fumadocs-ui": "^16.15.17",
|
|
106
108
|
"grab-url": "^3.0.9",
|
|
107
109
|
"html2canvas": "^1.4.1",
|
|
108
110
|
"kokoro-js": "^1.2.1",
|
|
109
|
-
"legal-terms-privacy-policy": "^0.1.
|
|
111
|
+
"legal-terms-privacy-policy": "^0.1.306",
|
|
110
112
|
"lucide-react": "^1.66.0",
|
|
111
113
|
"markdown-to-jsx": "^9.10.4",
|
|
112
114
|
"motion": "^14.9.0",
|
|
113
115
|
"quantum-sphere-loading-icon": "^1.0.6",
|
|
114
|
-
"qwksearch-api-client": "^1.0.
|
|
116
|
+
"qwksearch-api-client": "^1.0.301",
|
|
115
117
|
"react-icons": "^5.7.0",
|
|
116
118
|
"react-app-store-buttons": "^0.1.176",
|
|
117
119
|
"react-textarea-autosize": "^8.5.9",
|
|
118
|
-
"search-web-api": "^1.0.
|
|
119
|
-
"shadcn-app-dock": "^0.1.
|
|
120
|
+
"search-web-api": "^1.0.343",
|
|
121
|
+
"shadcn-app-dock": "^0.1.341",
|
|
120
122
|
"shadcn-theme-menu": "^1.1.74",
|
|
121
123
|
"sonner": "^2.0.8",
|
|
122
124
|
"streamdown": "^2.7.1",
|
|
123
125
|
"tailwind-merge": "^3.7.0",
|
|
124
|
-
"trending-news-api": "^0.1.
|
|
125
|
-
"education-playlists": "^0.1.
|
|
126
|
+
"trending-news-api": "^0.1.219",
|
|
127
|
+
"education-playlists": "^0.1.166",
|
|
126
128
|
"turndown": "^7.2.4",
|
|
127
129
|
"use-voice-control": "^0.1.235",
|
|
128
|
-
"use-weather-forecast": "^0.1.
|
|
130
|
+
"use-weather-forecast": "^0.1.443"
|
|
129
131
|
},
|
|
130
132
|
"devDependencies": {
|
|
131
133
|
"@cloudflare/workers-types": "^5.20261101.1",
|
|
@@ -142,8 +144,8 @@
|
|
|
142
144
|
"next": "^16.4.3",
|
|
143
145
|
"react": "^19.3.1",
|
|
144
146
|
"react-dom": "^19.3.1",
|
|
145
|
-
"react-reason-editor": "^1.0.
|
|
146
|
-
"react-reason-editor-sidebar": "^0.1.
|
|
147
|
+
"react-reason-editor": "^1.0.293",
|
|
148
|
+
"react-reason-editor-sidebar": "^0.1.348",
|
|
147
149
|
"search-autocomplete": "^0.1.0",
|
|
148
150
|
"storybook": "^10.6.5",
|
|
149
151
|
"tailwindcss": "^4.3.3",
|