research-agent-ui 0.1.30 → 0.1.32

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/api.cjs CHANGED
@@ -1,4 +1,4 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./rolldown-runtime-CMqjfN_6.cjs");let t=require("chat-agent-toolkit/models/registry");t=e.t(t,1);let n=require("drizzle-orm"),r=require("extract-webpage/search/public-searxng"),i=require("extract-webpage/suggest-next-words/autocomplete-search-engines"),a=require("fuse.js");a=e.t(a,1);let o=require("domain-rank/data/domain-rank-merged.json");o=e.t(o,1);let s=require("chat-agent-toolkit/tools/search/suggestionGeneratorAgent");s=e.t(s,1);let c=require("chat-agent-toolkit/config/model-tester"),l=require("chat-agent-toolkit/config/language-models-database");function u(e){return async r=>{try{let{article:i,chatHistory:a=[],maxQuestions:o=5,provider:s=`groq`,chatModel:c}=await r.json();if(!i)return Response.json({error:`Article is required`},{status:400});let l=e.getDB(),u=await e.getUserId(),d=null,f=null;if(u&&(d=await l.query.user.findFirst({where:(0,n.eq)(e.userSchema.id,u)})),d&&(f=d.settings?.providerApiKeys?.find(e=>e.provider==s)?.key),f||=s==`groq`?e.getEnv(`GROQ_API_KEY`):null,!f)return Response.json({error:`API key is required`},{status:500});let p=new t.default,m;if(m=c?await p.loadChatModel(c.providerId,c.key):await p.loadChatModel(`groq`,`llama-3.3-70b-versatile`),!m)return Response.json({error:`Failed to load language model`},{status:500});let h=a.length>0?`\n\nPrevious questions asked:\n${a.filter(e=>e.role===`user`).map(e=>`- ${e.content}`).join(`
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./rolldown-runtime-CMqjfN_6.cjs");let t=require("chat-agent-toolkit/models/registry");t=e.t(t,1);let n=require("drizzle-orm"),r=require("search-web-api/search/public-searxng"),i=require("extract-webpage/suggest-next-words/autocomplete-search-engines"),a=require("fuse.js");a=e.t(a,1);let o=require("domain-rank/data/domain-rank-merged.json");o=e.t(o,1);let s=require("chat-agent-toolkit/tools/search/suggestionGeneratorAgent");s=e.t(s,1);let c=require("chat-agent-toolkit/config/model-tester"),l=require("chat-agent-toolkit/config/language-models-database");function u(e){return async r=>{try{let{article:i,chatHistory:a=[],maxQuestions:o=5,provider:s=`groq`,chatModel:c}=await r.json();if(!i)return Response.json({error:`Article is required`},{status:400});let l=e.getDB(),u=await e.getUserId(),d=null,f=null;if(u&&(d=await l.query.user.findFirst({where:(0,n.eq)(e.userSchema.id,u)})),d&&(f=d.settings?.providerApiKeys?.find(e=>e.provider==s)?.key),f||=s==`groq`?e.getEnv(`GROQ_API_KEY`):null,!f)return Response.json({error:`API key is required`},{status:500});let p=new t.default,m;if(m=c?await p.loadChatModel(c.providerId,c.key):await p.loadChatModel(`groq`,`llama-3.3-70b-versatile`),!m)return Response.json({error:`Failed to load language model`},{status:500});let h=a.length>0?`\n\nPrevious questions asked:\n${a.filter(e=>e.role===`user`).map(e=>`- ${e.content}`).join(`
2
2
  `)}`:``,g=`You are a helpful AI that generates insightful follow-up questions about articles.
3
3
  Generate ${o} thought-provoking questions that would help readers understand the article better.
4
4
  Return ONLY the questions, one per line, without numbering or bullet points.`,_=`Article content:
package/dist/api.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import e from "chat-agent-toolkit/models/registry";
2
2
  import { and as t, count as n, eq as r, inArray as i, like as a, or as o, sql as s } from "drizzle-orm";
3
- import { searchSearxng as c, searchWeb as l } from "extract-webpage/search/public-searxng";
3
+ import { searchSearxng as c, searchWeb as l } from "search-web-api/search/public-searxng";
4
4
  import { searchAutocompleteMulti as u } from "extract-webpage/suggest-next-words/autocomplete-search-engines";
5
5
  import d from "fuse.js";
6
6
  import f from "domain-rank/data/domain-rank-merged.json";
@@ -1,4 +1,4 @@
1
- import type { Document } from 'extract-webpage/search';
1
+ import type { Document } from 'chat-agent-toolkit';
2
2
  /**
3
3
  * Base interface for all chat message types.
4
4
  */
@@ -3,7 +3,7 @@
3
3
  * image tiles, video thumbnails, or web-result cards; supports infinite scroll pagination and opens URLs in
4
4
  * the article extract panel. Auto-opens the first source on desktop.
5
5
  */
6
- import type { Document } from 'extract-webpage/search';
6
+ import type { Document } from 'chat-agent-toolkit';
7
7
  declare const MessageSources: ({ sources: initialSources, query, }: {
8
8
  sources: Document[];
9
9
  query?: string;
@@ -1,4 +1,4 @@
1
- import type { Document } from 'extract-webpage/search';
1
+ import type { Document } from 'chat-agent-toolkit';
2
2
  declare const Citation: ({ href, children, sources, }: {
3
3
  href: string;
4
4
  children: React.ReactNode;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "research-agent-ui",
3
3
  "description": "Chat research agent UI: conversation window, article reader, search config, file uploads, and chat history",
4
- "version": "0.1.30",
4
+ "version": "0.1.32",
5
5
  "author": "vtempest",
6
6
  "repository": {
7
7
  "type": "git",
@@ -60,14 +60,15 @@
60
60
  "@radix-ui/react-slot": "^1.2.5",
61
61
  "@radix-ui/react-tooltip": "^1.2.9",
62
62
  "@ricky0123/vad-web": "^0.0.30",
63
- "chat-agent-toolkit": "^1.2.49",
64
- "domain-rank": "^0.1.38",
63
+ "chat-agent-toolkit": "^1.2.51",
64
+ "domain-rank": "^0.1.40",
65
65
  "drizzle-orm": "^0.45.2",
66
66
  "fuse.js": "^7.1.0",
67
67
  "class-variance-authority": "^0.7.1",
68
68
  "clsx": "^2.1.1",
69
69
  "dompurify": "^3.4.9",
70
- "extract-webpage": "^1.2.50",
70
+ "extract-webpage": "^1.2.52",
71
+ "search-web-api": "^1.0.13",
71
72
  "framer-motion": "^12.40.0",
72
73
  "grab-url": "^1.6.22",
73
74
  "qwksearch-api-client": "^0.9.1",