@agentica/chat 0.15.7 → 0.16.1

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.
Files changed (29) hide show
  1. package/dist/assets/AgenticaChatApplication-FutOMCcj.js +4820 -0
  2. package/dist/assets/{Divider-U2p72sQ2.js → Divider-DX1xhf0M.js} +1 -1
  3. package/dist/assets/_isFormatUri-YqTfGpHo.js +1 -0
  4. package/dist/assets/bbs/index-DhGcg51P.js +97 -0
  5. package/dist/assets/{client-nQAh1QKo.js → client-B3aq8qpT.js} +18 -18
  6. package/dist/assets/{index-DmJqXwCp.js → index-BIyKUwoU.js} +1 -1
  7. package/dist/assets/shopping/index.html-B8ZeGMBw.js +1 -0
  8. package/dist/assets/uploader/index.html-BkX9l0Nb.js +27 -0
  9. package/dist/bbs/index.html +5 -5
  10. package/dist/index.html +3 -3
  11. package/dist/shopping/index.html +5 -5
  12. package/dist/uploader/index.html +3 -3
  13. package/lib/index.mjs +27 -16
  14. package/lib/index.mjs.map +1 -1
  15. package/lib/movies/messages/AgenticaChatDescribeMessageMovie.d.ts +3 -3
  16. package/lib/movies/messages/AgenticaChatExecuteMessageMovie.d.ts +2 -2
  17. package/lib/movies/messages/AgenticaChatMessageMovie.d.ts +2 -2
  18. package/lib/movies/messages/AgenticaChatTextMessageMovie.d.ts +2 -2
  19. package/package.json +7 -7
  20. package/src/movies/AgenticaChatMovie.tsx +13 -13
  21. package/src/movies/messages/AgenticaChatDescribeMessageMovie.tsx +5 -5
  22. package/src/movies/messages/AgenticaChatExecuteMessageMovie.tsx +3 -3
  23. package/src/movies/messages/AgenticaChatMessageMovie.tsx +3 -3
  24. package/src/movies/messages/AgenticaChatTextMessageMovie.tsx +2 -2
  25. package/dist/assets/_isFormatUri-D80pJ-Bz.js +0 -3162
  26. package/dist/assets/bbs/index-rMAE1wxP.js +0 -115
  27. package/dist/assets/index-af7ihIz8.js +0 -1641
  28. package/dist/assets/shopping/index.html-DtefUuIq.js +0 -1
  29. package/dist/assets/uploader/index.html-CH6UMGAK.js +0 -27
@@ -1 +1 @@
1
- import{g as y,a as C,r as A,u as D,j as h,s as f,e as R,f as L,m as u,i as S}from"./client-nQAh1QKo.js";function W(i){return y("MuiDivider",i)}C("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]);const I=i=>{const{absolute:t,children:e,classes:n,flexItem:s,light:l,orientation:r,textAlign:a,variant:o}=i;return L({root:["root",t&&"absolute",o,l&&"light",r==="vertical"&&"vertical",s&&"flexItem",e&&"withChildren",e&&r==="vertical"&&"withChildrenVertical",a==="right"&&r!=="vertical"&&"textAlignRight",a==="left"&&r!=="vertical"&&"textAlignLeft"],wrapper:["wrapper",r==="vertical"&&"wrapperVertical"]},W,n)},$=f("div",{name:"MuiDivider",slot:"Root",overridesResolver:(i,t)=>{const{ownerState:e}=i;return[t.root,e.absolute&&t.absolute,t[e.variant],e.light&&t.light,e.orientation==="vertical"&&t.vertical,e.flexItem&&t.flexItem,e.children&&t.withChildren,e.children&&e.orientation==="vertical"&&t.withChildrenVertical,e.textAlign==="right"&&e.orientation!=="vertical"&&t.textAlignRight,e.textAlign==="left"&&e.orientation!=="vertical"&&t.textAlignLeft]}})(u(({theme:i})=>({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(i.vars||i).palette.divider,borderBottomWidth:"thin",variants:[{props:{absolute:!0},style:{position:"absolute",bottom:0,left:0,width:"100%"}},{props:{light:!0},style:{borderColor:i.vars?`rgba(${i.vars.palette.dividerChannel} / 0.08)`:S(i.palette.divider,.08)}},{props:{variant:"inset"},style:{marginLeft:72}},{props:{variant:"middle",orientation:"horizontal"},style:{marginLeft:i.spacing(2),marginRight:i.spacing(2)}},{props:{variant:"middle",orientation:"vertical"},style:{marginTop:i.spacing(1),marginBottom:i.spacing(1)}},{props:{orientation:"vertical"},style:{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"}},{props:{flexItem:!0},style:{alignSelf:"stretch",height:"auto"}},{props:({ownerState:t})=>!!t.children,style:{display:"flex",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}}},{props:({ownerState:t})=>t.children&&t.orientation!=="vertical",style:{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(i.vars||i).palette.divider}`,borderTopStyle:"inherit"}}},{props:({ownerState:t})=>t.orientation==="vertical"&&t.children,style:{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(i.vars||i).palette.divider}`,borderLeftStyle:"inherit"}}},{props:({ownerState:t})=>t.textAlign==="right"&&t.orientation!=="vertical",style:{"&::before":{width:"90%"},"&::after":{width:"10%"}}},{props:({ownerState:t})=>t.textAlign==="left"&&t.orientation!=="vertical",style:{"&::before":{width:"10%"},"&::after":{width:"90%"}}}]}))),T=f("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(i,t)=>{const{ownerState:e}=i;return[t.wrapper,e.orientation==="vertical"&&t.wrapperVertical]}})(u(({theme:i})=>({display:"inline-block",paddingLeft:`calc(${i.spacing(1)} * 1.2)`,paddingRight:`calc(${i.spacing(1)} * 1.2)`,whiteSpace:"nowrap",variants:[{props:{orientation:"vertical"},style:{paddingTop:`calc(${i.spacing(1)} * 1.2)`,paddingBottom:`calc(${i.spacing(1)} * 1.2)`}}]}))),v=A.forwardRef(function(t,e){const n=D({props:t,name:"MuiDivider"}),{absolute:s=!1,children:l,className:r,orientation:a="horizontal",component:o=l||a==="vertical"?"div":"hr",flexItem:c=!1,light:b=!1,role:d=o!=="hr"?"separator":void 0,textAlign:x="center",variant:m="fullWidth",...w}=n,p={...n,absolute:s,component:o,flexItem:c,light:b,orientation:a,role:d,textAlign:x,variant:m},g=I(p);return h.jsx($,{as:o,className:R(g.root,r),role:d,ref:e,ownerState:p,"aria-orientation":d==="separator"&&(o!=="hr"||a==="vertical")?a:void 0,...w,children:l?h.jsx(T,{className:g.wrapper,ownerState:p,children:l}):null})});v&&(v.muiSkipListHighlight=!0);export{v as D};
1
+ import{g as y,a as C,r as A,u as D,j as h,s as f,e as R,f as L,m as u,i as S}from"./client-B3aq8qpT.js";function W(i){return y("MuiDivider",i)}C("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]);const I=i=>{const{absolute:t,children:e,classes:n,flexItem:s,light:l,orientation:r,textAlign:a,variant:o}=i;return L({root:["root",t&&"absolute",o,l&&"light",r==="vertical"&&"vertical",s&&"flexItem",e&&"withChildren",e&&r==="vertical"&&"withChildrenVertical",a==="right"&&r!=="vertical"&&"textAlignRight",a==="left"&&r!=="vertical"&&"textAlignLeft"],wrapper:["wrapper",r==="vertical"&&"wrapperVertical"]},W,n)},$=f("div",{name:"MuiDivider",slot:"Root",overridesResolver:(i,t)=>{const{ownerState:e}=i;return[t.root,e.absolute&&t.absolute,t[e.variant],e.light&&t.light,e.orientation==="vertical"&&t.vertical,e.flexItem&&t.flexItem,e.children&&t.withChildren,e.children&&e.orientation==="vertical"&&t.withChildrenVertical,e.textAlign==="right"&&e.orientation!=="vertical"&&t.textAlignRight,e.textAlign==="left"&&e.orientation!=="vertical"&&t.textAlignLeft]}})(u(({theme:i})=>({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(i.vars||i).palette.divider,borderBottomWidth:"thin",variants:[{props:{absolute:!0},style:{position:"absolute",bottom:0,left:0,width:"100%"}},{props:{light:!0},style:{borderColor:i.vars?`rgba(${i.vars.palette.dividerChannel} / 0.08)`:S(i.palette.divider,.08)}},{props:{variant:"inset"},style:{marginLeft:72}},{props:{variant:"middle",orientation:"horizontal"},style:{marginLeft:i.spacing(2),marginRight:i.spacing(2)}},{props:{variant:"middle",orientation:"vertical"},style:{marginTop:i.spacing(1),marginBottom:i.spacing(1)}},{props:{orientation:"vertical"},style:{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"}},{props:{flexItem:!0},style:{alignSelf:"stretch",height:"auto"}},{props:({ownerState:t})=>!!t.children,style:{display:"flex",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}}},{props:({ownerState:t})=>t.children&&t.orientation!=="vertical",style:{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(i.vars||i).palette.divider}`,borderTopStyle:"inherit"}}},{props:({ownerState:t})=>t.orientation==="vertical"&&t.children,style:{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(i.vars||i).palette.divider}`,borderLeftStyle:"inherit"}}},{props:({ownerState:t})=>t.textAlign==="right"&&t.orientation!=="vertical",style:{"&::before":{width:"90%"},"&::after":{width:"10%"}}},{props:({ownerState:t})=>t.textAlign==="left"&&t.orientation!=="vertical",style:{"&::before":{width:"10%"},"&::after":{width:"90%"}}}]}))),T=f("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(i,t)=>{const{ownerState:e}=i;return[t.wrapper,e.orientation==="vertical"&&t.wrapperVertical]}})(u(({theme:i})=>({display:"inline-block",paddingLeft:`calc(${i.spacing(1)} * 1.2)`,paddingRight:`calc(${i.spacing(1)} * 1.2)`,whiteSpace:"nowrap",variants:[{props:{orientation:"vertical"},style:{paddingTop:`calc(${i.spacing(1)} * 1.2)`,paddingBottom:`calc(${i.spacing(1)} * 1.2)`}}]}))),v=A.forwardRef(function(t,e){const n=D({props:t,name:"MuiDivider"}),{absolute:s=!1,children:l,className:r,orientation:a="horizontal",component:o=l||a==="vertical"?"div":"hr",flexItem:c=!1,light:b=!1,role:d=o!=="hr"?"separator":void 0,textAlign:x="center",variant:m="fullWidth",...w}=n,p={...n,absolute:s,component:o,flexItem:c,light:b,orientation:a,role:d,textAlign:x,variant:m},g=I(p);return h.jsx($,{as:o,className:R(g.root,r),role:d,ref:e,ownerState:p,"aria-orientation":d==="separator"&&(o!=="hr"||a==="vertical")?a:void 0,...w,children:l?h.jsx(T,{className:g.wrapper,ownerState:p,children:l}):null})});v&&(v.muiSkipListHighlight=!0);export{v as D};
@@ -0,0 +1 @@
1
+ var f={};Object.defineProperty(f,"__esModule",{value:!0});var i=f._isFormatUuid=void 0;const t=a=>r.test(a);i=f._isFormatUuid=t;const r=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;var _={};Object.defineProperty(_,"__esModule",{value:!0});var d=_._isFormatUri=void 0;const o=a=>s.test(a)&&e.test(a);d=_._isFormatUri=o;const s=/\/|:/,e=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;export{i as _,d as a};
@@ -0,0 +1,97 @@
1
+ import{j as a,o as B,r as y,T as g}from"../client-B3aq8qpT.js";import{v as C,A as T,e as w,_ as v,f as R,F as S,T as I,R as _,c as x,d as j,B as P}from"../AgenticaChatApplication-FutOMCcj.js";import{a as f,_ as b}from"../_isFormatUri-YqTfGpHo.js";import{D as U}from"../Divider-DX1xhf0M.js";class k{constructor(){this.articles=[]}index(){return this.articles}create(o){const l={id:C(),title:o.input.title,body:o.input.body,thumbnail:o.input.thumbnail,created_at:new Date().toISOString(),updated_at:new Date().toISOString()};return this.articles.push(l),l}update(o){const l=this.articles.find(d=>d.id===o.id);if(l===void 0)throw new Error("Unable to find the matched article.");o.input.title!==void 0&&(l.title=o.input.title),o.input.body!==void 0&&(l.body=o.input.body),o.input.thumbnail!==void 0&&(l.thumbnail=o.input.thumbnail),l.updated_at=new Date().toISOString()}erase(o){const l=this.articles.findIndex(d=>d.id===o.id);if(l===-1)throw new Error("Unable to find the matched article.");this.articles.splice(l,1)}}function D(u){const o=new k,l=new T({model:"chatgpt",vendor:{api:new w({apiKey:u.apiKey,dangerouslyAllowBrowser:!0}),model:u.model??"gpt-4o-mini"},controllers:[{protocol:"class",name:"bbs",application:{model:"chatgpt",options:{reference:!1,strict:!1,separate:null},functions:[{name:"index",parameters:{description:"",type:"object",properties:{},additionalProperties:!1,required:[],$defs:{}},output:{description:"List of every articles",type:"array",items:{description:`Description of the current {@link IBbsArticle} type:
2
+
3
+ > Article entity.
4
+ >
5
+ > \`IBbsArticle\` is an entity representing an article in the BBS (Bulletin Board System).`,type:"object",properties:{id:{title:"Primary Key",description:`Primary Key.
6
+
7
+
8
+ @format uuid`,type:"string"},created_at:{title:"Creation time of the article",description:`Creation time of the article.
9
+
10
+
11
+ @format date-time`,type:"string"},updated_at:{title:"Last updated time of the article",description:`Last updated time of the article.
12
+
13
+
14
+ @format date-time`,type:"string"},title:{title:"Title of the article",description:`Title of the article.
15
+
16
+ Representative title of the article.`,type:"string"},body:{title:"Content body",description:`Content body.
17
+
18
+ Content body of the article writtn in the markdown format.`,type:"string"},thumbnail:{title:"Thumbnail image URI",description:`Thumbnail image URI.
19
+
20
+ Thumbnail image URI which can represent the article.
21
+
22
+ If configured as \`null\`, it means that no thumbnail image in the article.`,anyOf:[{type:"null"},{type:"string",description:`@format uri
23
+ @contentMediaType image/*`}]}},required:["id","created_at","updated_at","title","body","thumbnail"]}},description:`Get all articles.
24
+
25
+ List up every articles archived in the BBS DB.`,validate:d=>({success:!0,data:d})},{name:"create",parameters:{description:" Properties of create function",type:"object",properties:{input:{description:`Information of the article to create
26
+
27
+ ------------------------------
28
+
29
+ Description of the current {@link IBbsArticle.ICreate} type:
30
+
31
+ > Information of the article to create.
32
+
33
+ ------------------------------
34
+
35
+ Description of the parent {@link IBbsArticle} type:
36
+
37
+ > Article entity.
38
+ >
39
+ > \`IBbsArticle\` is an entity representing an article in the BBS (Bulletin Board System).`,type:"object",properties:{title:{title:"Title of the article",description:`Title of the article.
40
+
41
+ Representative title of the article.`,type:"string"},body:{title:"Content body",description:`Content body.
42
+
43
+ Content body of the article writtn in the markdown format.`,type:"string"},thumbnail:{title:"Thumbnail image URI",description:`Thumbnail image URI.
44
+
45
+ Thumbnail image URI which can represent the article.
46
+
47
+ If configured as \`null\`, it means that no thumbnail image in the article.`,anyOf:[{type:"null"},{type:"string",description:`@format uri
48
+ @contentMediaType image/*`}]}},required:["title","body","thumbnail"]}},required:["input"],additionalProperties:!1,$defs:{}},output:{description:`Description of the current {@link IBbsArticle} type:
49
+
50
+ > Article entity.
51
+ >
52
+ > \`IBbsArticle\` is an entity representing an article in the BBS (Bulletin Board System).`,type:"object",properties:{id:{title:"Primary Key",description:`Primary Key.
53
+
54
+
55
+ @format uuid`,type:"string"},created_at:{title:"Creation time of the article",description:`Creation time of the article.
56
+
57
+
58
+ @format date-time`,type:"string"},updated_at:{title:"Last updated time of the article",description:`Last updated time of the article.
59
+
60
+
61
+ @format date-time`,type:"string"},title:{title:"Title of the article",description:`Title of the article.
62
+
63
+ Representative title of the article.`,type:"string"},body:{title:"Content body",description:`Content body.
64
+
65
+ Content body of the article writtn in the markdown format.`,type:"string"},thumbnail:{title:"Thumbnail image URI",description:`Thumbnail image URI.
66
+
67
+ Thumbnail image URI which can represent the article.
68
+
69
+ If configured as \`null\`, it means that no thumbnail image in the article.`,anyOf:[{type:"null"},{type:"string",description:`@format uri
70
+ @contentMediaType image/*`}]}},required:["id","created_at","updated_at","title","body","thumbnail"]},description:`Create a new article.
71
+
72
+ Writes a new article and archives it into the DB.`,validate:(()=>{const d=e=>typeof e.input=="object"&&e.input!==null&&p(e.input),p=e=>typeof e.title=="string"&&typeof e.body=="string"&&(e.thumbnail===null||typeof e.thumbnail=="string"&&f(e.thumbnail)),h=(e,t,r=!0)=>[(typeof e.input=="object"&&e.input!==null||n(r,{path:t+".input",expected:"IBbsArticle.ICreate",value:e.input}))&&m(e.input,t+".input",r)||n(r,{path:t+".input",expected:"IBbsArticle.ICreate",value:e.input})].every(s=>s),m=(e,t,r=!0)=>[typeof e.title=="string"||n(r,{path:t+".title",expected:"string",value:e.title}),typeof e.body=="string"||n(r,{path:t+".body",expected:"string",value:e.body}),e.thumbnail===null||typeof e.thumbnail=="string"&&(f(e.thumbnail)||n(r,{path:t+".thumbnail",expected:'string & Format<"uri">',value:e.thumbnail}))||n(r,{path:t+".thumbnail",expected:'((string & Format<"uri"> & ContentMediaType<"image/*">) | null)',value:e.thumbnail})].every(s=>s),c=e=>typeof e=="object"&&e!==null&&d(e);let i,n;return e=>{if(c(e)===!1){i=[],n=v(i),((r,s,A=!0)=>(typeof r=="object"&&r!==null||n(!0,{path:s+"",expected:"__type",value:r}))&&h(r,s+"",!0)||n(!0,{path:s+"",expected:"__type",value:r}))(e,"$input",!0);const t=i.length===0;return t?{success:t,data:e}:{success:t,errors:i,data:e}}return{success:!0,data:e}}})()},{name:"update",parameters:{description:" Properties of update function",type:"object",properties:{id:{title:"Target article's {@link IBbsArticle.id}",description:`Target article's {@link IBbsArticle.id}.
73
+
74
+
75
+ @format uuid`,type:"string"},input:{description:`New content to update.
76
+
77
+ ------------------------------
78
+
79
+ Description of the current {@link PartialIBbsArticle.ICreate} type:
80
+
81
+ > Make all properties in T optional`,type:"object",properties:{title:{title:"Title of the article",description:`Title of the article.
82
+
83
+ Representative title of the article.`,type:"string"},body:{title:"Content body",description:`Content body.
84
+
85
+ Content body of the article writtn in the markdown format.`,type:"string"},thumbnail:{title:"Thumbnail image URI",description:`Thumbnail image URI.
86
+
87
+ Thumbnail image URI which can represent the article.
88
+
89
+ If configured as \`null\`, it means that no thumbnail image in the article.`,anyOf:[{type:"null"},{type:"string",description:`@format uri
90
+ @contentMediaType image/*`}]}},required:[]}},required:["id","input"],additionalProperties:!1,$defs:{}},description:`Update an article.
91
+
92
+ Updates an article with new content.`,validate:(()=>{const d=e=>typeof e.id=="string"&&b(e.id)&&typeof e.input=="object"&&e.input!==null&&Array.isArray(e.input)===!1&&p(e.input),p=e=>(e.title===void 0||typeof e.title=="string")&&(e.body===void 0||typeof e.body=="string")&&(e.thumbnail===null||e.thumbnail===void 0||typeof e.thumbnail=="string"&&f(e.thumbnail)),h=(e,t,r=!0)=>[typeof e.id=="string"&&(b(e.id)||n(r,{path:t+".id",expected:'string & Format<"uuid">',value:e.id}))||n(r,{path:t+".id",expected:'(string & Format<"uuid">)',value:e.id}),(typeof e.input=="object"&&e.input!==null&&Array.isArray(e.input)===!1||n(r,{path:t+".input",expected:"Partial<IBbsArticle.ICreate>",value:e.input}))&&m(e.input,t+".input",r)||n(r,{path:t+".input",expected:"Partial<IBbsArticle.ICreate>",value:e.input})].every(s=>s),m=(e,t,r=!0)=>[e.title===void 0||typeof e.title=="string"||n(r,{path:t+".title",expected:"(string | undefined)",value:e.title}),e.body===void 0||typeof e.body=="string"||n(r,{path:t+".body",expected:"(string | undefined)",value:e.body}),e.thumbnail===null||e.thumbnail===void 0||typeof e.thumbnail=="string"&&(f(e.thumbnail)||n(r,{path:t+".thumbnail",expected:'string & Format<"uri">',value:e.thumbnail}))||n(r,{path:t+".thumbnail",expected:'((string & Format<"uri"> & ContentMediaType<"image/*">) | null | undefined)',value:e.thumbnail})].every(s=>s),c=e=>typeof e=="object"&&e!==null&&d(e);let i,n;return e=>{if(c(e)===!1){i=[],n=v(i),((r,s,A=!0)=>(typeof r=="object"&&r!==null||n(!0,{path:s+"",expected:"__type",value:r}))&&h(r,s+"",!0)||n(!0,{path:s+"",expected:"__type",value:r}))(e,"$input",!0);const t=i.length===0;return t?{success:t,data:e}:{success:t,errors:i,data:e}}return{success:!0,data:e}}})()},{name:"erase",parameters:{description:" Properties of erase function",type:"object",properties:{id:{title:"Target article's {@link IBbsArticle.id}",description:`Target article's {@link IBbsArticle.id}.
93
+
94
+
95
+ @format uuid`,type:"string"}},required:["id"],additionalProperties:!1,$defs:{}},description:`Erase an article.
96
+
97
+ Erases an article from the DB.`,validate:(()=>{const d=i=>typeof i.id=="string"&&b(i.id),p=(i,n,e=!0)=>[typeof i.id=="string"&&(b(i.id)||c(e,{path:n+".id",expected:'string & Format<"uuid">',value:i.id}))||c(e,{path:n+".id",expected:'(string & Format<"uuid">)',value:i.id})].every(t=>t),h=i=>typeof i=="object"&&i!==null&&d(i);let m,c;return i=>{if(h(i)===!1){m=[],c=v(m),((e,t,r=!0)=>(typeof e=="object"&&e!==null||c(!0,{path:t+"",expected:"__type",value:e}))&&p(e,t+"",!0)||c(!0,{path:t+"",expected:"__type",value:e}))(i,"$input",!0);const n=m.length===0;return n?{success:n,data:i}:{success:n,errors:m,data:i}}return{success:!0,data:i}}})()}]},execute:o}],config:{locale:u.locale,timezone:u.timezone,executor:{initialize:null}}});return a.jsx(R,{agent:l})}function F(){const[u,o]=y.useState(""),[l,d]=y.useState("gpt-4o-mini"),[p,h]=y.useState(window.navigator.language),[m,c]=y.useState(!1);return a.jsx("div",{style:{width:"100%",height:"100%"},children:m===!0?a.jsx(D,{apiKey:u,model:l,locale:p}):a.jsxs(S,{style:{width:"calc(100% - 60px)",padding:15,margin:15},children:[a.jsx(g,{variant:"h6",children:"BBS AI Chatbot"}),a.jsx("br",{}),a.jsx(U,{}),a.jsx("br",{}),"Demonstration of Agentica with TypeScript Controller Class.",a.jsx("br",{}),a.jsx("br",{}),a.jsx(g,{variant:"h6",children:" OpenAI Configuration "}),a.jsx(I,{onChange:i=>o(i.target.value),defaultValue:u,label:"OpenAI API Key",variant:"outlined",placeholder:"Your OpenAI API Key",error:u.length===0}),a.jsx("br",{}),a.jsxs(_,{defaultValue:l,onChange:(i,n)=>d(n),style:{paddingLeft:15},children:[a.jsx(x,{control:a.jsx(j,{}),label:"GPT-4o Mini",value:"gpt-4o-mini"}),a.jsx(x,{control:a.jsx(j,{}),label:"GPT-4o",value:"gpt-4o"})]}),a.jsx("br",{}),a.jsx(g,{variant:"h6",children:" Membership Information "}),a.jsx("br",{}),a.jsx(I,{onChange:i=>h(i.target.value),defaultValue:p,label:"Locale",variant:"outlined",error:p.length===0}),a.jsx("br",{}),a.jsx("br",{}),a.jsx(P,{component:"a",fullWidth:!0,variant:"contained",color:"info",size:"large",disabled:u.length===0||p.length===0,onClick:()=>c(!0),children:"Start AI Chatbot"})]})})}B(window.document.getElementById("root")).render(a.jsx(F,{}));