bi-sdk-react 0.0.39 → 0.0.40

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.
@@ -417,7 +417,7 @@ import*as e from"react";import t,{css as l}from"styled-components";import{AlignC
417
417
  .conversation-list li small {
418
418
  white-space: nowrap;
419
419
  }
420
- `,tM=[],t_="bi-design",t$=e=>{let t,l,n,r,a,i,o,{agentList:s=tM,headExtra:d,style:u={},onEffect:p}=e,{pageId:x,schema:m,fetch:h,atItems:g,onRemoveAtItem:v,clearAtItems:j}=(0,eA.useContext)(eT);if(!h)return null;let[y,w]=(0,eA.useState)(null),[C,S]=(0,eA.useState)([]),[k,z]=(0,eA.useState)([]),I=eA.default.useRef(null),N=()=>{setTimeout(()=>{I.current&&I.current.scrollToBottom()},100)},O=()=>{w(null),z([])},A=async e=>{q.confirm({title:"确认删除该对话吗?",okText:"确认",cancelText:"取消",onOk:async()=>{var t;await (null==(t=h.ai)?void 0:t.removeConversation(e)),S(t=>t.filter(t=>t.id!==e)),z(t=>t.filter(t=>t.conversationId!==e)),y===e&&O()}})},T=async e=>{var t;w(e),S(t=>t.map(t=>({...t,isActived:t.id===e}))),z(await (null==(t=h.ai)?void 0:t.messageList(e))||[]),N()},D=async e=>{var t;let l={id:ef(),question:e.message,createdAt:new Date().toISOString(),files:e.files||[],agents:e.agents||[],atItems:JSON.stringify(g),sending:!0};z(e=>[...e,l]),N();let n=!y;j();let{id:r,answer:a,createdAt:i,conversation:o}=await (null==(t=h.ai)?void 0:t.chat(t_,x,y,{...e,page:m,pageItems:g||[]}));w((null==o?void 0:o.id)||""),S(e=>[n?o||{}:null,...e].filter(e=>null!==e)),Object.assign(l,{id:r,answer:a,createdAt:i,conversationId:(null==o?void 0:o.id)||"",sending:!1}),a.effect&&(null==p||p(a.effect)),z(e=>[...e]),N()},E=async e=>{var t;await (null==(t=h.ai)?void 0:t.removeMessage(e)),z(t=>t.filter(t=>t.id!==e))},B=(t=new Date,l=(e,t)=>e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate(),(n=new Date(t)).setDate(t.getDate()-1),r=[],a=[],i=[],o=[],C.forEach(e=>{let s=new Date(e.createdAt);if(l(s,t))r.push(e);else if(l(s,n))a.push(e);else s.getFullYear()===t.getFullYear()&&s.getMonth()===t.getMonth()?i.push(e):o.push(e)}),[{title:"今天",items:r},{title:"昨天",items:a},{title:"本月内",items:i},{title:"很久以前",items:o}].filter(e=>e.items.length>0)),R=async()=>{try{var e,t;let l=await (null==(e=h.ai)?void 0:e.conversationList(t_,x));S(l||[]);let n=null==l?void 0:l.find(e=>e.isActived);if(n){w(n.id);let e=await (null==(t=h.ai)?void 0:t.messageList(n.id));z(e||[]),N()}}catch(e){console.error(e)}};return(0,eA.useEffect)(()=>{R()},[h]),(0,eA.useEffect)(()=>{N()},[]),(0,eO.jsxs)(tP,{style:u,children:[(0,eO.jsx)(tL,{title:"智能助理",extra:(0,eO.jsxs)(en,{children:[(0,eO.jsx)(es,{title:"新对话",placement:"topRight",children:(0,eO.jsx)("a",{onClick:O,children:(0,eO.jsx)(th,{type:"icon-chat-plus"})})}),(0,eO.jsx)(J,{trigger:["click"],styles:{root:{boxShadow:"var(--ant-box-shadow-drawer-up)",backgroundColor:"#ffffff",borderRadius:"var(--ant-border-radius)"}},popupRender:()=>(0,eO.jsx)(tH,{children:B.map(e=>(0,eO.jsxs)("div",{className:"group",children:[(0,eO.jsx)("div",{className:"group-title",children:e.title}),(0,eO.jsx)("ul",{className:"group-list",children:e.items.map(e=>(0,eO.jsxs)("li",{className:e.isActived?"actived":"",children:[(0,eO.jsx)("a",{onClick:()=>T(e.id),children:e.name}),(0,eO.jsx)("small",{children:(0,eO.jsx)("a",{onClick:()=>A(e.id),children:(0,eO.jsx)(c,{})})})]},e.id))})]},e.title))}),placement:"topRight",children:(0,eO.jsx)("a",{children:(0,eO.jsx)(f,{})})}),d]}),style:{width:"initial"}}),(0,eO.jsxs)("div",{className:"body",children:[(0,eO.jsx)("div",{style:{flex:"1 1 auto",overflowY:"auto"},children:k.length?(0,eO.jsx)(tJ,{ref:I,list:k,onDeleteMessage:E}):(0,eO.jsx)(tY,{})}),0===k.length&&C.length>0&&(0,eO.jsx)(M,{title:"历史记录",size:"small",variant:"borderless",styles:{header:{padding:0,border:"none"},body:{padding:0}},style:{padding:"12px 12px 0 12px"},children:(0,eO.jsx)("ul",{className:"conversation-list",children:C.slice(0,3).map(e=>(0,eO.jsxs)("li",{children:[(0,eO.jsxs)("a",{children:[(0,eO.jsx)(b,{}),e.name]}),(0,eO.jsx)("small",{children:tz(e.createdAt)})]},e.id))})}),(0,eO.jsx)(tB,{agentList:s,style:{padding:12},atItems:g,onUploading:null==h?void 0:h.upload,onSubmit:D,onRemoveAtItem:v})]})]})},tF=t.div`
420
+ `,tM=[],t_="bi-design",t$=e=>{let t,l,n,r,a,i,o,{agentList:s=tM,headExtra:d,style:u={},onEffect:p}=e,{pageId:x,schema:m,fetch:h,atItems:g,onRemoveAtItem:v,clearAtItems:j}=(0,eA.useContext)(eT);if(!h)return null;let[y,w]=(0,eA.useState)(null),[C,S]=(0,eA.useState)([]),[k,z]=(0,eA.useState)([]),I=eA.default.useRef(null),N=()=>{setTimeout(()=>{I.current&&I.current.scrollToBottom()},100)},O=()=>{w(null),z([])},A=async e=>{q.confirm({title:"确认删除该对话吗?",okText:"确认",cancelText:"取消",onOk:async()=>{var t;await (null==(t=h.ai)?void 0:t.removeConversation(e)),S(t=>t.filter(t=>t.id!==e)),z(t=>t.filter(t=>t.conversationId!==e)),y===e&&O()}})},T=async e=>{var t,l,n;w(e),S(t=>t.map(t=>({...t,isActived:t.id===e}))),await (null==(l=h.ai)||null==(t=l.activateConversation)?void 0:t.call(l,e)),z(await (null==(n=h.ai)?void 0:n.messageList(e))||[]),N()},D=async e=>{var t;let l={id:ef(),question:e.message,createdAt:new Date().toISOString(),files:e.files||[],agents:e.agents||[],atItems:JSON.stringify(g),sending:!0};z(e=>[...e,l]),N();let n=!y;j();let{id:r,answer:a,createdAt:i,conversation:o}=await (null==(t=h.ai)?void 0:t.chat(t_,x,y,{...e,page:m,pageItems:g||[]}));w((null==o?void 0:o.id)||""),S(e=>[n?o||{}:null,...e].filter(e=>null!==e)),Object.assign(l,{id:r,answer:a,createdAt:i,conversationId:(null==o?void 0:o.id)||"",sending:!1}),a.effect&&(null==p||p(a.effect)),z(e=>[...e]),N()},E=async e=>{var t;await (null==(t=h.ai)?void 0:t.removeMessage(e)),z(t=>t.filter(t=>t.id!==e))},B=(t=new Date,l=(e,t)=>e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate(),(n=new Date(t)).setDate(t.getDate()-1),r=[],a=[],i=[],o=[],C.forEach(e=>{let s=new Date(e.createdAt);if(l(s,t))r.push(e);else if(l(s,n))a.push(e);else s.getFullYear()===t.getFullYear()&&s.getMonth()===t.getMonth()?i.push(e):o.push(e)}),[{title:"今天",items:r},{title:"昨天",items:a},{title:"本月内",items:i},{title:"很久以前",items:o}].filter(e=>e.items.length>0)),R=async()=>{try{var e,t;let l=await (null==(e=h.ai)?void 0:e.conversationList(t_,x));S(l||[]);let n=null==l?void 0:l.find(e=>e.isActived);if(n){w(n.id);let e=await (null==(t=h.ai)?void 0:t.messageList(n.id));z(e||[]),N()}}catch(e){console.error(e)}};return(0,eA.useEffect)(()=>{R()},[h]),(0,eA.useEffect)(()=>{N()},[]),(0,eO.jsxs)(tP,{style:u,children:[(0,eO.jsx)(tL,{title:"智能助理",extra:(0,eO.jsxs)(en,{children:[(0,eO.jsx)(es,{title:"新对话",placement:"topRight",children:(0,eO.jsx)("a",{onClick:O,children:(0,eO.jsx)(th,{type:"icon-chat-plus"})})}),(0,eO.jsx)(J,{trigger:["click"],styles:{root:{boxShadow:"var(--ant-box-shadow-drawer-up)",backgroundColor:"#ffffff",borderRadius:"var(--ant-border-radius)"}},popupRender:()=>(0,eO.jsx)(tH,{children:B.map(e=>(0,eO.jsxs)("div",{className:"group",children:[(0,eO.jsx)("div",{className:"group-title",children:e.title}),(0,eO.jsx)("ul",{className:"group-list",children:e.items.map(e=>(0,eO.jsxs)("li",{className:e.isActived?"actived":"",children:[(0,eO.jsx)("a",{onClick:()=>T(e.id),children:e.name}),(0,eO.jsx)("small",{children:(0,eO.jsx)("a",{onClick:()=>A(e.id),children:(0,eO.jsx)(c,{})})})]},e.id))})]},e.title))}),placement:"topRight",children:(0,eO.jsx)("a",{children:(0,eO.jsx)(f,{})})}),d]}),style:{width:"initial"}}),(0,eO.jsxs)("div",{className:"body",children:[(0,eO.jsx)("div",{style:{flex:"1 1 auto",overflowY:"auto"},children:k.length?(0,eO.jsx)(tJ,{ref:I,list:k,onDeleteMessage:E}):(0,eO.jsx)(tY,{})}),0===k.length&&C.length>0&&(0,eO.jsx)(M,{title:"历史记录",size:"small",variant:"borderless",styles:{header:{padding:0,border:"none"},body:{padding:0}},style:{padding:"12px 12px 0 12px"},children:(0,eO.jsx)("ul",{className:"conversation-list",children:C.slice(0,3).map(e=>(0,eO.jsxs)("li",{children:[(0,eO.jsxs)("a",{children:[(0,eO.jsx)(b,{}),e.name]}),(0,eO.jsx)("small",{children:tz(e.createdAt)})]},e.id))})}),(0,eO.jsx)(tB,{agentList:s,style:{padding:12},atItems:g,onUploading:null==h?void 0:h.upload,onSubmit:D,onRemoveAtItem:v})]})]})},tF=t.div`
421
421
  flex: 1 1 auto;
422
422
  display: flex;
423
423
  align-items: center;
@@ -77,6 +77,7 @@ export type FetchType = {
77
77
  ai?: {
78
78
  chat: (bizType: string, bizId: string, conversationId: string | null, request: ChatRequestType) => Promise<ChatResponseType>;
79
79
  conversationList: (bizType: string, bizId: string) => Promise<ChatConversationType[]>;
80
+ activateConversation?: (conversationId: string) => Promise<boolean>;
80
81
  messageList: (conversationId: string, prevId?: string) => Promise<ChatMessageType[]>;
81
82
  removeConversation: (conversationId: string) => Promise<boolean>;
82
83
  removeMessage: (messageId: string) => Promise<boolean>;
@@ -417,7 +417,7 @@
417
417
  .conversation-list li small {
418
418
  white-space: nowrap;
419
419
  }
420
- `,eY=[],e_="bi-design",eq=e=>{let t,l,n,r,a,i,o,{agentList:s=eY,headExtra:u,style:p={},onEffect:x}=e,{pageId:h,schema:g,fetch:v,atItems:j,onRemoveAtItem:b,clearAtItems:y}=(0,c.useContext)(f);if(!v)return null;let[w,C]=(0,c.useState)(null),[S,I]=(0,c.useState)([]),[k,z]=(0,c.useState)([]),O=m().useRef(null),N=()=>{setTimeout(()=>{O.current&&O.current.scrollToBottom()},100)},T=()=>{C(null),z([])},F=async e=>{ep.Modal.confirm({title:"确认删除该对话吗?",okText:"确认",cancelText:"取消",onOk:async()=>{var t;await (null==(t=v.ai)?void 0:t.removeConversation(e)),I(t=>t.filter(t=>t.id!==e)),z(t=>t.filter(t=>t.conversationId!==e)),w===e&&T()}})},D=async e=>{var t;C(e),I(t=>t.map(t=>({...t,isActived:t.id===e}))),z(await (null==(t=v.ai)?void 0:t.messageList(e))||[]),N()},R=async e=>{var t;let l={id:eO(),question:e.message,createdAt:new Date().toISOString(),files:e.files||[],agents:e.agents||[],atItems:JSON.stringify(j),sending:!0};z(e=>[...e,l]),N();let n=!w;y();let{id:r,answer:a,createdAt:i,conversation:o}=await (null==(t=v.ai)?void 0:t.chat(e_,h,w,{...e,page:g,pageItems:j||[]}));C((null==o?void 0:o.id)||""),I(e=>[n?o||{}:null,...e].filter(e=>null!==e)),Object.assign(l,{id:r,answer:a,createdAt:i,conversationId:(null==o?void 0:o.id)||"",sending:!1}),a.effect&&(null==x||x(a.effect)),z(e=>[...e]),N()},A=async e=>{var t;await (null==(t=v.ai)?void 0:t.removeMessage(e)),z(t=>t.filter(t=>t.id!==e))},E=(t=new Date,l=(e,t)=>e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate(),(n=new Date(t)).setDate(t.getDate()-1),r=[],a=[],i=[],o=[],S.forEach(e=>{let s=new Date(e.createdAt);if(l(s,t))r.push(e);else if(l(s,n))a.push(e);else s.getFullYear()===t.getFullYear()&&s.getMonth()===t.getMonth()?i.push(e):o.push(e)}),[{title:"今天",items:r},{title:"昨天",items:a},{title:"本月内",items:i},{title:"很久以前",items:o}].filter(e=>e.items.length>0)),B=async()=>{try{var e,t;let l=await (null==(e=v.ai)?void 0:e.conversationList(e_,h));I(l||[]);let n=null==l?void 0:l.find(e=>e.isActived);if(n){C(n.id);let e=await (null==(t=v.ai)?void 0:t.messageList(n.id));z(e||[]),N()}}catch(e){console.error(e)}};return(0,c.useEffect)(()=>{B()},[v]),(0,c.useEffect)(()=>{N()},[]),(0,d.jsxs)(e$,{style:p,children:[(0,d.jsx)(eL,{title:"智能助理",extra:(0,d.jsxs)(ep.Space,{children:[(0,d.jsx)(ep.Tooltip,{title:"新对话",placement:"topRight",children:(0,d.jsx)("a",{onClick:T,children:(0,d.jsx)(eu,{type:"icon-chat-plus"})})}),(0,d.jsx)(ep.Dropdown,{trigger:["click"],styles:{root:{boxShadow:"var(--ant-box-shadow-drawer-up)",backgroundColor:"#ffffff",borderRadius:"var(--ant-border-radius)"}},popupRender:()=>(0,d.jsx)(eU,{children:E.map(e=>(0,d.jsxs)("div",{className:"group",children:[(0,d.jsx)("div",{className:"group-title",children:e.title}),(0,d.jsx)("ul",{className:"group-list",children:e.items.map(e=>(0,d.jsxs)("li",{className:e.isActived?"actived":"",children:[(0,d.jsx)("a",{onClick:()=>D(e.id),children:e.name}),(0,d.jsx)("small",{children:(0,d.jsx)("a",{onClick:()=>F(e.id),children:(0,d.jsx)(ed.DeleteOutlined,{})})})]},e.id))})]},e.title))}),placement:"topRight",children:(0,d.jsx)("a",{children:(0,d.jsx)(ed.HistoryOutlined,{})})}),u]}),style:{width:"initial"}}),(0,d.jsxs)("div",{className:"body",children:[(0,d.jsx)("div",{style:{flex:"1 1 auto",overflowY:"auto"},children:k.length?(0,d.jsx)(eK,{ref:O,list:k,onDeleteMessage:A}):(0,d.jsx)(eG,{})}),0===k.length&&S.length>0&&(0,d.jsx)(ep.Card,{title:"历史记录",size:"small",variant:"borderless",styles:{header:{padding:0,border:"none"},body:{padding:0}},style:{padding:"12px 12px 0 12px"},children:(0,d.jsx)("ul",{className:"conversation-list",children:S.slice(0,3).map(e=>(0,d.jsxs)("li",{children:[(0,d.jsxs)("a",{children:[(0,d.jsx)(ed.MessageOutlined,{}),e.name]}),(0,d.jsx)("small",{children:eN(e.createdAt)})]},e.id))})}),(0,d.jsx)(eM,{agentList:s,style:{padding:12},atItems:j,onUploading:null==v?void 0:v.upload,onSubmit:R,onRemoveAtItem:b})]})]})},eH=h().div`
420
+ `,eY=[],e_="bi-design",eq=e=>{let t,l,n,r,a,i,o,{agentList:s=eY,headExtra:u,style:p={},onEffect:x}=e,{pageId:h,schema:g,fetch:v,atItems:j,onRemoveAtItem:b,clearAtItems:y}=(0,c.useContext)(f);if(!v)return null;let[w,C]=(0,c.useState)(null),[S,I]=(0,c.useState)([]),[k,z]=(0,c.useState)([]),O=m().useRef(null),N=()=>{setTimeout(()=>{O.current&&O.current.scrollToBottom()},100)},T=()=>{C(null),z([])},F=async e=>{ep.Modal.confirm({title:"确认删除该对话吗?",okText:"确认",cancelText:"取消",onOk:async()=>{var t;await (null==(t=v.ai)?void 0:t.removeConversation(e)),I(t=>t.filter(t=>t.id!==e)),z(t=>t.filter(t=>t.conversationId!==e)),w===e&&T()}})},D=async e=>{var t,l,n;C(e),I(t=>t.map(t=>({...t,isActived:t.id===e}))),await (null==(l=v.ai)||null==(t=l.activateConversation)?void 0:t.call(l,e)),z(await (null==(n=v.ai)?void 0:n.messageList(e))||[]),N()},R=async e=>{var t;let l={id:eO(),question:e.message,createdAt:new Date().toISOString(),files:e.files||[],agents:e.agents||[],atItems:JSON.stringify(j),sending:!0};z(e=>[...e,l]),N();let n=!w;y();let{id:r,answer:a,createdAt:i,conversation:o}=await (null==(t=v.ai)?void 0:t.chat(e_,h,w,{...e,page:g,pageItems:j||[]}));C((null==o?void 0:o.id)||""),I(e=>[n?o||{}:null,...e].filter(e=>null!==e)),Object.assign(l,{id:r,answer:a,createdAt:i,conversationId:(null==o?void 0:o.id)||"",sending:!1}),a.effect&&(null==x||x(a.effect)),z(e=>[...e]),N()},A=async e=>{var t;await (null==(t=v.ai)?void 0:t.removeMessage(e)),z(t=>t.filter(t=>t.id!==e))},E=(t=new Date,l=(e,t)=>e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate(),(n=new Date(t)).setDate(t.getDate()-1),r=[],a=[],i=[],o=[],S.forEach(e=>{let s=new Date(e.createdAt);if(l(s,t))r.push(e);else if(l(s,n))a.push(e);else s.getFullYear()===t.getFullYear()&&s.getMonth()===t.getMonth()?i.push(e):o.push(e)}),[{title:"今天",items:r},{title:"昨天",items:a},{title:"本月内",items:i},{title:"很久以前",items:o}].filter(e=>e.items.length>0)),B=async()=>{try{var e,t;let l=await (null==(e=v.ai)?void 0:e.conversationList(e_,h));I(l||[]);let n=null==l?void 0:l.find(e=>e.isActived);if(n){C(n.id);let e=await (null==(t=v.ai)?void 0:t.messageList(n.id));z(e||[]),N()}}catch(e){console.error(e)}};return(0,c.useEffect)(()=>{B()},[v]),(0,c.useEffect)(()=>{N()},[]),(0,d.jsxs)(e$,{style:p,children:[(0,d.jsx)(eL,{title:"智能助理",extra:(0,d.jsxs)(ep.Space,{children:[(0,d.jsx)(ep.Tooltip,{title:"新对话",placement:"topRight",children:(0,d.jsx)("a",{onClick:T,children:(0,d.jsx)(eu,{type:"icon-chat-plus"})})}),(0,d.jsx)(ep.Dropdown,{trigger:["click"],styles:{root:{boxShadow:"var(--ant-box-shadow-drawer-up)",backgroundColor:"#ffffff",borderRadius:"var(--ant-border-radius)"}},popupRender:()=>(0,d.jsx)(eU,{children:E.map(e=>(0,d.jsxs)("div",{className:"group",children:[(0,d.jsx)("div",{className:"group-title",children:e.title}),(0,d.jsx)("ul",{className:"group-list",children:e.items.map(e=>(0,d.jsxs)("li",{className:e.isActived?"actived":"",children:[(0,d.jsx)("a",{onClick:()=>D(e.id),children:e.name}),(0,d.jsx)("small",{children:(0,d.jsx)("a",{onClick:()=>F(e.id),children:(0,d.jsx)(ed.DeleteOutlined,{})})})]},e.id))})]},e.title))}),placement:"topRight",children:(0,d.jsx)("a",{children:(0,d.jsx)(ed.HistoryOutlined,{})})}),u]}),style:{width:"initial"}}),(0,d.jsxs)("div",{className:"body",children:[(0,d.jsx)("div",{style:{flex:"1 1 auto",overflowY:"auto"},children:k.length?(0,d.jsx)(eK,{ref:O,list:k,onDeleteMessage:A}):(0,d.jsx)(eG,{})}),0===k.length&&S.length>0&&(0,d.jsx)(ep.Card,{title:"历史记录",size:"small",variant:"borderless",styles:{header:{padding:0,border:"none"},body:{padding:0}},style:{padding:"12px 12px 0 12px"},children:(0,d.jsx)("ul",{className:"conversation-list",children:S.slice(0,3).map(e=>(0,d.jsxs)("li",{children:[(0,d.jsxs)("a",{children:[(0,d.jsx)(ed.MessageOutlined,{}),e.name]}),(0,d.jsx)("small",{children:eN(e.createdAt)})]},e.id))})}),(0,d.jsx)(eM,{agentList:s,style:{padding:12},atItems:j,onUploading:null==v?void 0:v.upload,onSubmit:R,onRemoveAtItem:b})]})]})},eH=h().div`
421
421
  flex: 1 1 auto;
422
422
  display: flex;
423
423
  align-items: center;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bi-sdk-react",
3
- "version": "0.0.39",
3
+ "version": "0.0.40",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "dist/umd/js/bi-sdk.umd.min.js",
@@ -140,6 +140,7 @@ export const AiPanel: React.FC<AiPanelProps> = ({
140
140
  setConversationList((list) =>
141
141
  list.map((i) => ({ ...i, isActived: i.id === id })),
142
142
  );
143
+ await fetch.ai?.activateConversation?.(id);
143
144
  const messages = await fetch.ai?.messageList(id);
144
145
  setMessageList(messages || []);
145
146
  scrollToBottom();
@@ -74,6 +74,7 @@ export type FetchType = {
74
74
  bizType: string,
75
75
  bizId: string,
76
76
  ) => Promise<ChatConversationType[]>;
77
+ activateConversation?: (conversationId: string) => Promise<boolean>;
77
78
  messageList: (conversationId: string, prevId?: string) => Promise<ChatMessageType[]>;
78
79
  removeConversation: (conversationId: string) => Promise<boolean>;
79
80
  removeMessage: (messageId: string) => Promise<boolean>;