cortex-react-components 2.17.6 → 2.18.0
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/{chunk-KAB4C5T2.mjs → chunk-275W7H4O.mjs} +1 -1
- package/dist/{chunk-VRE6VCHX.mjs → chunk-2BR55L74.mjs} +1 -1
- package/dist/{chunk-PC2PZNJ6.mjs → chunk-2BRDNDUB.mjs} +1 -1
- package/dist/{chunk-UPRS7OYQ.mjs → chunk-2UNIT7NC.mjs} +1 -1
- package/dist/{chunk-UZYTSIUY.mjs → chunk-3DZFESHK.mjs} +1 -1
- package/dist/{chunk-DAAAZF3S.mjs → chunk-3HNU2NYP.mjs} +1 -1
- package/dist/{chunk-4BKAUTKL.mjs → chunk-3NRXQBBS.mjs} +1 -1
- package/dist/{chunk-GYLFNLRD.mjs → chunk-3Y7QG6VP.mjs} +1 -1
- package/dist/{chunk-TNPSOYKM.mjs → chunk-3ZQFJ5WD.mjs} +1 -1
- package/dist/{chunk-3PUOPWAI.mjs → chunk-4DR4ILAP.mjs} +1 -1
- package/dist/{chunk-2W4GQ3FI.mjs → chunk-5EQXJS23.mjs} +1 -1
- package/dist/{chunk-ZKOJRF5P.mjs → chunk-5MWZTJYP.mjs} +1 -1
- package/dist/{chunk-KBEXWUKI.mjs → chunk-5NIEZE7A.mjs} +1 -1
- package/dist/{chunk-F2MJXGRT.mjs → chunk-6R6NYDWN.mjs} +1 -1
- package/dist/{chunk-QUOSFCS5.mjs → chunk-75F3LJMX.mjs} +1 -1
- package/dist/{chunk-DNMPFZJH.mjs → chunk-7IARWH7M.mjs} +1 -1
- package/dist/{chunk-WC7IAORY.mjs → chunk-7R47MHQE.mjs} +1 -1
- package/dist/chunk-7TSR2LQB.mjs +1 -0
- package/dist/{chunk-RZM6JZBZ.mjs → chunk-AJQHGVZ5.mjs} +1 -1
- package/dist/{chunk-XX4GSGRP.mjs → chunk-AQQCH7Z2.mjs} +1 -1
- package/dist/{chunk-PTGTIV55.mjs → chunk-BAB3ATRB.mjs} +1 -1
- package/dist/{chunk-SJON62H2.mjs → chunk-C4RWEPVF.mjs} +1 -1
- package/dist/{chunk-2WP44BWJ.mjs → chunk-CXOVEABI.mjs} +1 -1
- package/dist/{chunk-R5P4ZICA.mjs → chunk-D6K6RO5P.mjs} +1 -1
- package/dist/{chunk-3BG2SCNC.mjs → chunk-EH3PJU6C.mjs} +1 -1
- package/dist/{chunk-64ODZI5O.mjs → chunk-EM3T2XYC.mjs} +1 -1
- package/dist/{chunk-ZIZENXBP.mjs → chunk-FE7ZGUPU.mjs} +1 -1
- package/dist/{chunk-7CY3QPBJ.mjs → chunk-GHOL5L32.mjs} +1 -1
- package/dist/{chunk-N6J2WFC4.mjs → chunk-GTZJWMZR.mjs} +1 -1
- package/dist/chunk-GXRWKWKJ.mjs +1 -0
- package/dist/{chunk-AX66HDQV.mjs → chunk-HHPTGV4F.mjs} +1 -1
- package/dist/{chunk-OT4MGAKH.mjs → chunk-HUYTXZLC.mjs} +1 -1
- package/dist/{chunk-75WE6ZXB.mjs → chunk-ITJH72Z2.mjs} +1 -1
- package/dist/{chunk-ONZ32NDG.mjs → chunk-KWYJ3XZI.mjs} +1 -1
- package/dist/{chunk-WUA65ZZB.mjs → chunk-L3BLBPSR.mjs} +1 -1
- package/dist/{chunk-5FWH5YVM.mjs → chunk-LHO4WFYP.mjs} +1 -1
- package/dist/chunk-LX3D4J7I.mjs +1 -0
- package/dist/{chunk-FXO5SPBG.mjs → chunk-N7M6FTIO.mjs} +1 -1
- package/dist/{chunk-DEO6EQJR.mjs → chunk-NINFDOV5.mjs} +1 -1
- package/dist/{chunk-RIRZRO6U.mjs → chunk-P55W6AFU.mjs} +1 -1
- package/dist/{chunk-MX3JKY3V.mjs → chunk-P7S6XFU4.mjs} +1 -1
- package/dist/{chunk-EUMMM454.mjs → chunk-PTJVI53B.mjs} +1 -1
- package/dist/{chunk-O2RJFVGE.mjs → chunk-PWFVXG44.mjs} +1 -1
- package/dist/{chunk-RBJOTC2X.mjs → chunk-QAJBJFRP.mjs} +1 -1
- package/dist/{chunk-4OROP5TC.mjs → chunk-RGOKBIQ5.mjs} +1 -1
- package/dist/{chunk-YTCTK24K.mjs → chunk-RJGYVDOU.mjs} +1 -1
- package/dist/{chunk-T5HJS6OF.mjs → chunk-RSDUFAIB.mjs} +1 -1
- package/dist/{chunk-NFD36674.mjs → chunk-TTWEHUP5.mjs} +1 -1
- package/dist/{chunk-SIL7AP7H.mjs → chunk-V5VE3EIY.mjs} +1 -1
- package/dist/{chunk-CQAMS7RZ.mjs → chunk-V6GK2FJG.mjs} +1 -1
- package/dist/{chunk-YS3PFB7C.mjs → chunk-WHDV4REI.mjs} +1 -1
- package/dist/{chunk-5GV4XVLP.mjs → chunk-WIRQ5IRT.mjs} +1 -1
- package/dist/{chunk-UZSBX5GO.mjs → chunk-X3JZSN3W.mjs} +1 -1
- package/dist/{chunk-VNYUNZ3M.mjs → chunk-XGIYNUGC.mjs} +1 -1
- package/dist/{chunk-DOPDVMNN.mjs → chunk-ZEALRBXW.mjs} +1 -1
- package/dist/{chunk-O5P35LEY.mjs → chunk-ZFUP5NVF.mjs} +1 -1
- package/dist/components/Blocks/Banner.mjs +1 -1
- package/dist/components/Blocks/CallToAction.mjs +1 -1
- package/dist/components/Blocks/CollapsibleArea.mjs +1 -1
- package/dist/components/Blocks/Content.mjs +1 -1
- package/dist/components/Blocks/FeaturesBlock.mjs +1 -1
- package/dist/components/Blocks/ImageBlock.mjs +1 -1
- package/dist/components/Blocks/MediaBlock.mjs +1 -1
- package/dist/components/Blocks/RelatedPosts.mjs +1 -1
- package/dist/components/Blocks/RenderBlocks.mjs +1 -1
- package/dist/components/Blocks/ReusableContentBlock.mjs +1 -1
- package/dist/components/Blocks/index.mjs +1 -1
- package/dist/components/Cards/ContentCard.mjs +1 -1
- package/dist/components/Cards/FeatureCard.mjs +1 -1
- package/dist/components/Cards/index.mjs +1 -1
- package/dist/components/Chat/ChatInterface.d.ts +2 -1
- package/dist/components/Chat/ChatInterface.js +10 -10
- package/dist/components/Chat/ChatInterface.mjs +1 -1
- package/dist/components/Chat/ChatInterfaceMessages.mjs +1 -1
- package/dist/components/Chat/ChatMessage.mjs +1 -1
- package/dist/components/Chat/Components/ChatCardArtefact.mjs +1 -0
- package/dist/components/Chat/Components/ChatCardTask.mjs +1 -0
- package/dist/components/Chat/Components/Conversation.css +1 -0
- package/dist/components/Chat/Components/Conversation.d.ts +15 -0
- package/dist/components/Chat/Components/Conversation.js +4 -0
- package/dist/components/Chat/Components/Conversation.mjs +4 -0
- package/dist/components/Chat/Components/Message.css +1 -0
- package/dist/components/Chat/Components/Message.d.ts +19 -0
- package/dist/components/Chat/Components/Message.js +4 -0
- package/dist/components/Chat/Components/Message.mjs +1 -0
- package/dist/components/Chat/CopilotInterface.js +10 -10
- package/dist/components/Chat/CopilotInterface.mjs +1 -1
- package/dist/components/Chat/PartTypes/MessageHandler.css +1 -0
- package/dist/components/Chat/PartTypes/MessageHandler.d.ts +9 -0
- package/dist/components/Chat/PartTypes/MessageHandler.js +20 -0
- package/dist/components/Chat/PartTypes/MessageHandler.mjs +1 -0
- package/dist/components/Chat/PartTypes/PartApprovalTool.d.ts +1 -1
- package/dist/components/Chat/PartTypes/PartApprovalTool.mjs +1 -1
- package/dist/components/Chat/PartTypes/PartAuthenticateTool.d.ts +1 -1
- package/dist/components/Chat/PartTypes/PartAuthenticateTool.mjs +1 -1
- package/dist/components/Chat/PartTypes/index.js +6 -6
- package/dist/components/Chat/PartTypes/index.mjs +1 -1
- package/dist/components/Chat/demo-long-messages.js +15 -15
- package/dist/components/Chat/demo-long-messages.mjs +1 -1
- package/dist/components/Chat/demo-tests.js +32 -32
- package/dist/components/Chat/demo-tests.mjs +1 -1
- package/dist/components/Chat/demo.js +10 -10
- package/dist/components/Chat/demo.mjs +1 -1
- package/dist/components/Chat/example-usage.js +10 -10
- package/dist/components/Chat/example-usage.mjs +1 -1
- package/dist/components/Chat/example-with-vercel-ai.js +10 -10
- package/dist/components/Chat/example-with-vercel-ai.mjs +1 -1
- package/dist/components/Chat/index.d.ts +2 -2
- package/dist/components/Chat/index.js +10 -10
- package/dist/components/Chat/index.mjs +1 -1
- package/dist/components/DigitalColleagues/AppSidebarLeft.mjs +1 -1
- package/dist/components/DigitalColleagues/MainPage.mjs +1 -1
- package/dist/components/DigitalColleagues/Pages/dashboardpage.mjs +1 -1
- package/dist/components/DigitalColleagues/Views/index.mjs +1 -1
- package/dist/components/DigitalColleagues/index.mjs +1 -1
- package/dist/components/Foundary/AppSidebarLeft.mjs +1 -1
- package/dist/components/Foundary/Knowledge/add-knowledge-modal.mjs +1 -1
- package/dist/components/Foundary/Knowledge/add-team-context.mjs +1 -1
- package/dist/components/Foundary/MainPage.mjs +1 -1
- package/dist/components/Foundary/Pages/dashboardpage.mjs +1 -1
- package/dist/components/Foundary/RichText/index.mjs +1 -1
- package/dist/components/Foundary/RichText/plugins/toolbar-plugin.mjs +1 -1
- package/dist/components/Foundary/Views/ColleaguesView.mjs +1 -1
- package/dist/components/Foundary/Views/KnowledgeView.mjs +1 -1
- package/dist/components/Foundary/Views/TeamsIndexView.mjs +1 -1
- package/dist/components/Foundary/Views/index.mjs +1 -1
- package/dist/components/Foundary/document-edit.mjs +1 -1
- package/dist/components/Foundary/document-preview-examples.mjs +1 -1
- package/dist/components/Foundary/document-preview.mjs +1 -1
- package/dist/components/Foundary/index.mjs +1 -1
- package/dist/components/Foundary/knowledge-browser.mjs +1 -1
- package/dist/components/HeaderFooter/Header.mjs +1 -1
- package/dist/components/HeaderFooter/HeaderDesktop.mjs +1 -1
- package/dist/components/HeaderFooter/SectionHeading.mjs +1 -1
- package/dist/components/HeaderFooter/VideoHeader.mjs +1 -1
- package/dist/components/HeaderFooter/index.mjs +1 -1
- package/dist/components/Heros/HighImpact/index.mjs +1 -1
- package/dist/components/Heros/LowImpact/index.mjs +1 -1
- package/dist/components/Heros/MediumImpact/index.mjs +1 -1
- package/dist/components/Heros/PostHero/index.mjs +1 -1
- package/dist/components/Heros/RenderHero.mjs +1 -1
- package/dist/components/Heros/SectionHero/index.mjs +1 -1
- package/dist/components/Heros/index.mjs +1 -1
- package/dist/components/Holidays/HolidayTracker.mjs +1 -1
- package/dist/components/Holidays/index.mjs +1 -1
- package/dist/components/Layouts/OutputHeaderFooter.mjs +1 -1
- package/dist/components/Layouts/Print.mjs +1 -1
- package/dist/components/Layouts/SlideShow.mjs +1 -1
- package/dist/components/Layouts/index.mjs +1 -1
- package/dist/components/Menus/SidebarLeft.mjs +1 -1
- package/dist/components/Menus/SidebarRight.mjs +1 -1
- package/dist/components/Menus/index.mjs +1 -1
- package/dist/components/Other/index.mjs +1 -1
- package/dist/components/Payload/CollectionArchive/index.mjs +1 -1
- package/dist/components/Payload/Media/index.mjs +1 -1
- package/dist/components/Payload/PayloadCard/index.mjs +1 -1
- package/dist/components/Payload/RichText/index.mjs +1 -1
- package/dist/components/Payload/RichText/serialize.mjs +1 -1
- package/dist/components/Payload/index.mjs +1 -1
- package/dist/components/Projects/ProjectPage.mjs +1 -1
- package/dist/components/Projects/ProjectView.mjs +1 -1
- package/dist/components/Projects/index.mjs +1 -1
- package/dist/components/dc-temp/index.mjs +1 -1
- package/dist/components/index.js +19 -19
- package/dist/components/index.mjs +1 -1
- package/dist/components/ui/index.mjs +1 -1
- package/dist/components/ui/sidebar.mjs +1 -1
- package/dist/globals.css +1 -1
- package/dist/index.js +23 -23
- package/dist/index.mjs +1 -1
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/pages/Blog.mjs +1 -1
- package/dist/pages/Documentation.mjs +1 -1
- package/dist/pages/IndexPage.mjs +1 -1
- package/dist/pages/Intranet.mjs +1 -1
- package/dist/pages/LandingPage.mjs +1 -1
- package/dist/pages/Page.mjs +1 -1
- package/dist/pages/Publish.mjs +1 -1
- package/dist/pages/Website.mjs +1 -1
- package/dist/sections/AboutSection.mjs +1 -1
- package/dist/sections/BlogDetail.mjs +1 -1
- package/dist/sections/BlogList.mjs +1 -1
- package/dist/sections/BlogListSection.mjs +1 -1
- package/dist/sections/ContactSection.mjs +1 -1
- package/dist/sections/PageSections.mjs +1 -1
- package/dist/sections/PricingSection.mjs +1 -1
- package/dist/sections/ServiceDetail.mjs +1 -1
- package/dist/sections/ServiceDetailSection.mjs +1 -1
- package/dist/sections/ServiceSection.mjs +1 -1
- package/dist/sections/index.mjs +1 -1
- package/package.json +2 -1
- package/dist/chunk-SMDC36XJ.mjs +0 -1
- package/dist/components/Chat/ChatCardArtefact.mjs +0 -1
- package/dist/components/Chat/ChatCardTask.mjs +0 -1
- /package/dist/{chunk-I2PVJQQR.mjs → chunk-RL6365DN.mjs} +0 -0
- /package/dist/{chunk-DBY4SXQI.mjs → chunk-YPZAYXNQ.mjs} +0 -0
- /package/dist/components/Chat/{ChatCardArtefact.css → Components/ChatCardArtefact.css} +0 -0
- /package/dist/components/Chat/{ChatCardArtefact.d.ts → Components/ChatCardArtefact.d.ts} +0 -0
- /package/dist/components/Chat/{ChatCardArtefact.js → Components/ChatCardArtefact.js} +0 -0
- /package/dist/components/Chat/{ChatCardTask.css → Components/ChatCardTask.css} +0 -0
- /package/dist/components/Chat/{ChatCardTask.d.ts → Components/ChatCardTask.d.ts} +0 -0
- /package/dist/components/Chat/{ChatCardTask.js → Components/ChatCardTask.js} +0 -0
package/dist/chunk-SMDC36XJ.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as _}from"./chunk-6OCLRAHU.mjs";import{a as Q,b as X,c as j}from"./chunk-5Y6FKL5W.mjs";import{a as Y,b as Z,c as ee,d as te,e as ae}from"./chunk-UGBDJDPW.mjs";import{a as G}from"./chunk-3BG2SCNC.mjs";import{a as R}from"./chunk-SIL7AP7H.mjs";import{a as q}from"./chunk-2LINLX4S.mjs";import{a as V}from"./chunk-DBY4SXQI.mjs";import{a as J}from"./chunk-I2PVJQQR.mjs";import{d as P}from"./chunk-Q2DPE66H.mjs";import{a as K}from"./chunk-FT3AE7L2.mjs";import{a as U}from"./chunk-L5JPAKPM.mjs";import{b as d}from"./chunk-ZUA4KNIR.mjs";import{a as h,c as x}from"./chunk-SOLZ4VQH.mjs";import{b as W}from"./chunk-CSBGSBEU.mjs";import{a as f,b as y,c as N,e as v}from"./chunk-YO3GQYRJ.mjs";import{a as p}from"./chunk-MDJREBVI.mjs";import{useRef as E,useEffect as se,useState as ie}from"react";import*as u from"motion/react-client";import{Send as he,Bot as M,User as xe,Menu as be,Paperclip as Ce,X as we,FileText as ke,Image as Te,File as Ie,Download as De,ExternalLink as Ae}from"lucide-react";import{jsx as e,jsxs as s}from"react/jsx-runtime";function Xe({messages:b,input:B,isTyping:C=!1,currentSessionTitle:Pe,capabilities:F,fileUploads:w,isDragOver:oe,enableFileUpload:S,onInputChange:re,addToolResult:k,onSendMessage:le,onKeyPress:ne,onFileUpload:L,onRemoveFile:de,onDragOver:T,className:me}){let I=E(null),ce=E(null),$=E(null),[c,g]=ie(!1),[z,Re]=ie({path:[],selectedItems:[],filters:{}});se(()=>{I.current?.scrollIntoView({behavior:"smooth"})},[b]),se(()=>{c&&setTimeout(()=>{I.current?.scrollIntoView({behavior:"smooth"})},100)},[c]);let H=()=>P(z),ue=()=>{let t=[];return F.forEach(r=>{r.actions&&r.actions.forEach(l=>{t.push({label:l.label,action:()=>D(l.id,{path:[r],selectedItems:[],filters:{}})})}),r.children&&r.children.forEach(l=>{l.type==="list"&&l.data&&t.push({label:`View ${l.name}`,action:()=>g(!0)})})}),t.slice(0,5)},D=(t,r)=>{console.log("Capability action:",t,r);let l=`Executing ${t} with context: ${JSON.stringify(r.path.map(i=>i.name))}`;g(!1)},Ee=P({path:[],selectedItems:[],filters:{}}),pe=t=>{L(t.target.files),t.target.files&&(t.target.value="")},fe=t=>{t.preventDefault(),T(!0)},ve=t=>{t.preventDefault(),T(!1)},ge=t=>{t.preventDefault(),T(!1),L(t.dataTransfer.files)},ye=t=>{if(t===0)return"0 Bytes";let r=1024,l=["Bytes","KB","MB","GB"],i=Math.floor(Math.log(t)/Math.log(r));return parseFloat((t/Math.pow(r,i)).toFixed(2))+" "+l[i]},O=t=>t.startsWith("image/")?e(Te,{className:"h-4 w-4"}):t.startsWith("text/")?e(ke,{className:"h-4 w-4"}):e(Ie,{className:"h-4 w-4"}),Ne=t=>{let r=t.role==="assistant",l=t.role==="user";return s("div",{className:p("flex my-2 items-start gap-3",l?"flex-row-reverse":""),children:[e(h,{className:"h-8 w-8 shrink-0",children:e(x,{className:p(l?"bg-primary text-primary-foreground":"bg-gradient-to-br from-purple-600 to-blue-600 text-white"),children:l?e(xe,{className:"h-4 w-4"}):e(M,{className:"h-4 w-4"})})}),e("div",{className:p("max-w-[80%] rounded-2xl px-4 py-3 shadow-sm",l?"bg-primary text-primary-foreground":"bg-muted"),children:t.parts.map((i,o)=>{if(i.type==="text")return e(_,{id:t.id,content:i.text},`${t.id}-text`);if(i.type==="file"){let a=i;return e("div",{className:"mb-2 p-2 bg-background/50 rounded-lg",children:s("div",{className:"flex items-center gap-2",children:[O(a.mediaType||"application/octet-stream"),e("div",{className:"flex-1 min-w-0",children:e("p",{className:"text-sm font-medium truncate",children:a.filename||a.url?.split("/").pop()||"File"})}),a.url&&e(d,{variant:"ghost",size:"sm",onClick:()=>window.open(a.url,"_blank"),className:"h-8 w-8 p-0",children:e(De,{className:"h-4 w-4"})})]})},o)}if(i.type.startsWith("tool-")){let a=i,m=i.type.replace("tool-","");if(m==="task")switch(a.state){case"input-available":return e("div",{className:"text-sm opacity-70",children:"Loading task..."},o);case"output-available":return e("div",{className:"mb-2",children:e(J,{data:{id:a.output?.id||a.input?.id,fetchLatest:!1,taskData:a.output||a.input}})},o);case"output-error":return s("div",{className:"text-sm text-red-500",children:["Error: ",a.errorText]},o);default:return null}if(i.type==="tool-requestEndpointLogin")return e("div",{className:"mb-2",children:e(R,{toolPart:a,index:o,addToolResult:k??(()=>{})})},o);if(i.type==="tool-authenticate")return e("div",{className:"mb-2",children:e(R,{toolPart:a,index:o,addToolResult:k??(()=>{})})},o);if(i.type==="tool-requestApproval")return e("div",{className:"mb-2",children:e(G,{toolPart:a,index:o,addToolResult:k??(()=>{})})},o);if(m==="artefact")switch(a.state){case"input-available":return e("div",{className:"text-sm opacity-70",children:"Loading artefact..."},o);case"output-available":return e("div",{className:"mb-2",children:e(V,{artefact:a.output?.description||"",taskId:a.output?.id||a.input?.id,taskData:a.output||a.input})},o);case"output-error":return s("div",{className:"text-sm text-red-500",children:["Error: ",a.errorText]},o);default:return null}return e("div",{className:"mb-2",children:s(f,{className:"w-full max-w-md",children:[e(y,{children:e(N,{className:"text-lg",children:m})}),s(v,{children:[a.state==="input-available"&&s("p",{className:"text-sm",children:["Processing ",m,"..."]}),a.state==="output-available"&&e("pre",{className:"text-sm",children:JSON.stringify(a.output,null,2)}),a.state==="output-error"&&s("p",{className:"text-sm text-red-500",children:["Error: ",a.errorText]})]})]})},o)}if(i.type.startsWith("data-")){let a=i,m=i.type.replace("data-","");return m==="reference"?e("div",{className:"mb-2",children:e(f,{className:"w-full",children:e(v,{className:"p-4",children:e("div",{className:"space-y-2",children:a.data?.references?.map((n,A)=>s("div",{className:"flex items-center gap-2 p-2 rounded-md bg-muted/50",children:[e(W,{variant:"outline",children:n.type||"link"}),s("div",{className:"flex-1 min-w-0",children:[e("p",{className:"text-sm font-medium truncate",children:n.title}),n.description&&e("p",{className:"text-xs text-muted-foreground truncate",children:n.description})]}),n.url&&e(d,{variant:"ghost",size:"sm",onClick:()=>window.open(n.url,"_blank"),className:"h-8 w-8 p-0",children:e(Ae,{className:"h-4 w-4"})})]},A))})})})},o):m==="menu"?e("div",{className:"mb-2",children:s(f,{className:"w-full",children:[e(y,{children:e(N,{className:"text-lg",children:a.data?.title})}),e(v,{children:e("div",{className:"space-y-2",children:a.data?.items?.map((n,A)=>e(d,{variant:"outline",className:"w-full justify-start",onClick:n.action,children:s("div",{className:"text-left",children:[e("p",{className:"font-medium",children:n.label}),n.description&&e("p",{className:"text-xs text-muted-foreground",children:n.description})]})},A))})})]})},o):e("div",{className:"mb-2",children:s(f,{className:"w-full max-w-md",children:[e(y,{children:e(N,{className:"text-lg",children:m})}),e(v,{children:e("pre",{className:"text-sm",children:JSON.stringify(a.data,null,2)})})]})},o)}if(i.type==="reasoning")return s(Q,{className:"w-full",isStreaming:status==="streaming"&&o===t.parts.length-1&&t.id===b.at(-1)?.id,children:[e(X,{}),e(j,{children:i.text})]},`${t.id}-${o}`);if(i.type==="dynamic-tool")return s(Y,{defaultOpen:!0,children:[e(Z,{type:`tool-${i.toolName}`,state:i.state}),s(ee,{children:[e(te,{input:i.input}),e(ae,{output:i.output,errorText:i.errorText})]})]},`${t.id}-${o}`)})})]})};return s("div",{className:`h-full flex flex-col shadow-sm max-w-4xl mx-auto ${me||""}`,children:[s(K,{ref:ce,className:"flex-1 p-4 bg-background border-0",onDragOver:fe,onDragLeave:ve,onDrop:ge,children:[s("div",{className:p("space-y-4",oe&&"ring-2 ring-primary ring-offset-2 bg-primary/5"),children:[e(u.animate,{children:b.map(t=>e(u.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:p("flex gap-3",t.role==="user"?"flex-row-reverse":"flex-row"),children:Ne(t)},t.id))}),c&&s(u.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"flex gap-3",children:[e(h,{className:"h-8 w-8",children:e(x,{className:"bg-gradient-to-br from-purple-600 to-blue-600 text-white",children:e(M,{className:"h-4 w-4"})})}),e("div",{className:"flex-1 bg-muted rounded-2xl px-4 py-3 shadow-sm",children:e(q,{capabilities:F,isOpen:c,onToggle:()=>g(!c),onActionSelect:D,className:"w-full"})})]}),C&&s(u.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"flex gap-3",children:[e(h,{className:"h-8 w-8",children:e(x,{className:"bg-gradient-to-br from-purple-600 to-blue-600 text-white",children:e(M,{className:"h-4 w-4"})})}),e("div",{className:"bg-muted rounded-2xl px-4 py-3 shadow-sm",children:s("div",{className:"flex space-x-1",children:[e("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce"}),e("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.1s"}}),e("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.2s"}})]})})]})]}),e("div",{ref:I})]}),w.length>0&&e("div",{className:"p-4 border-t bg-muted/10",children:e("div",{className:"flex flex-wrap gap-2",children:w.map(t=>s("div",{className:"flex items-center gap-2 bg-background rounded-lg p-2 border",children:[O(t.file.type),e("span",{className:"text-sm font-medium",children:t.file.name}),e("span",{className:"text-xs text-muted-foreground",children:ye(t.file.size)}),e(d,{variant:"ghost",size:"sm",onClick:()=>de(t.id),className:"h-6 w-6 p-0",children:e(we,{className:"h-4 w-4"})})]},t.id))})}),s("div",{className:"border rounded-2xl p-4 bg-muted/20",children:[s("div",{className:"flex gap-3",children:[e(U,{value:B,onChange:t=>re(t.target.value),onKeyPress:ne,placeholder:"How can I help you today?",className:"flex-1 rounded-2xl bg-background shadow-sm",disabled:C}),S&&e(d,{variant:"outline",size:"icon",onClick:()=>$.current?.click(),className:"rounded-2xl h-10 w-10 shadow-sm",children:e(Ce,{className:"h-4 w-4"})}),e(d,{onClick:le,disabled:!B.trim()&&w.length===0||C,size:"icon",className:"rounded-2xl h-10 w-10 shadow-sm",children:e(he,{className:"h-4 w-4"})})]}),s("div",{className:"flex items-center gap-3 mt-3",children:[s(d,{onClick:()=>g(!c),variant:"outline",size:"sm",className:"rounded-full text-xs flex-shrink-0",children:[e(be,{className:"h-3 w-3 mr-1"}),c?"Hide":"Show"," Capabilities"]}),s("div",{className:"flex flex-wrap gap-2 overflow-hidden",children:[H().map((t,r)=>e(d,{variant:"default",size:"sm",className:"rounded-full text-xs bg-accent hover:bg-accent/80",onClick:()=>D(t.id,z),children:t.label},`context-${t.id}`)),H().length===0&&ue().map((t,r)=>e(d,{variant:"outline",size:"sm",className:"rounded-full text-xs",onClick:t.action,children:t.label},`suggestion-${r}`))]})]}),S&&e("input",{ref:$,type:"file",multiple:!0,onChange:pe,className:"hidden"})]})]})}export{Xe as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a}from"../../chunk-DBY4SXQI.mjs";import"../../chunk-YO3GQYRJ.mjs";import"../../chunk-EGEO3FNE.mjs";import"../../chunk-MDJREBVI.mjs";import"../../chunk-ZWHGOTSF.mjs";import"../../chunk-Q3G5UAAD.mjs";import"../../chunk-XGRRLABA.mjs";import"../../chunk-YEKQJ4YC.mjs";export{a as ChatCardArtefact};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a}from"../../chunk-I2PVJQQR.mjs";import"../../chunk-LTTO57ZK.mjs";import"../../chunk-CSBGSBEU.mjs";import"../../chunk-YO3GQYRJ.mjs";import"../../chunk-EGEO3FNE.mjs";import"../../chunk-MDJREBVI.mjs";import"../../chunk-ZWHGOTSF.mjs";import"../../chunk-Q3G5UAAD.mjs";import"../../chunk-XGRRLABA.mjs";import"../../chunk-YEKQJ4YC.mjs";export{a as ChatCardTask};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|