diff --git a/app/src/main/resources/web/assets/AIChatView-BklUdsm5.js b/app/src/main/resources/web/assets/AIChatView-C6TL1duT.js similarity index 97% rename from app/src/main/resources/web/assets/AIChatView-BklUdsm5.js rename to app/src/main/resources/web/assets/AIChatView-C6TL1duT.js index b9379354..ede59cca 100644 --- a/app/src/main/resources/web/assets/AIChatView-BklUdsm5.js +++ b/app/src/main/resources/web/assets/AIChatView-C6TL1duT.js @@ -1,4 +1,4 @@ -import{d as Y,u as Z,g as ee,h as r,s as te,i as ae,l as se,j as V,b7 as ne,aw as H,af as oe,a1 as B,ag as ie,c as d,a as s,O as le,P as ce,t as u,e as N,x as A,y as re,A as h,w as v,p as Q,Q as de,C as ue,bl as pe,bm as _e,bn as ve,S as me,o as l,m,bo as M,v as he,q as R,ap as q,V as G,bp as K,F as fe,G as ye,bq as be,ao as Ce,br as ge,H as we}from"./index-BzaaAwnX.js";import{u as ke}from"./markdown-q_fHGBEX.js";const Ae=f=>(fe("data-v-4d4db71f"),f=f(),ye(),f),Me={class:"chat-container"},Ie={key:0,class:"date"},Te={class:"chat-title"},$e={class:"name"},xe={class:"time"},De={class:"menu-items"},Le=["onClick","disabled"],Se={slot:"headline"},Ve={key:2,class:"chat-title"},He={class:"name"},Be={class:"time"},Ne=["innerHTML"],Qe={key:0,class:"chat-item replying"},Re={class:"chat-title"},qe={class:"name"},Ge=["innerHTML"],Ke={class:"chat-input",style:{"min-height":"80px"}},Fe=["placeholder","onKeydown"],Pe={class:"btns"},Ue=Ae(()=>s("md-ripple",null,null,-1)),je=Y({__name:"AIChatView",setup(f){const F=Z(),{t:P}=ee(),U=de(),c=r(U.params.id),i=r(""),p=r([]),y=r(!1),b=r(""),g=r(""),{app:j,urlTokenKey:E}=te(ae()),I=r(),{render:C}=ke(j,E);function w(){return c.value==="create"}function O(e,t){let n=!1;if(t==0)n=!0;else{const o=t>0?p.value[t-1]:null;o!=null&&M(o.createdAt)!==M(e.createdAt)&&(n=!0)}return n}w()||se({handle:async(e,t)=>{if(t)ue(P(t),"error");else{const n=[];n.push({...e.aiChat,md:await C(e.aiChat.content)});for(const o of e.aiChats)n.push({...o,md:await C(o.content)});p.value=n,await H(),x()}},document:pe,variables:()=>({id:c.value,query:`parent_id:${c.value} sort:created_at-asc`}),appApi:!0});const{mutate:T,onDone:z}=V({document:_e,appApi:!0});function $(){!i.value||y.value||T({id:w()?"":c.value,message:i.value,isMe:!0})}z(async e=>{var n;const t=e.data.createAIChat;if(t){for(const _ of t)(n=p.value)==null||n.push({..._,md:await C(_.content)});w()&&(c.value=t[0].id,ne(F,`/aichats/${c.value}`)),i.value="",y.value=!y.value,b.value="",g.value='',await H(),x()}});function x(){const e=I.value;e&&(e.scrollTop=e.scrollHeight)}const k=r(""),{mutate:J,loading:W}=V({document:ve,options:{update:e=>{var n,o;e.evict({id:e.identify({__typename:"AIChat",id:k.value})});const t=(n=p.value)==null?void 0:n.findIndex(_=>_.id===k.value);t!==null&&((o=p.value)==null||o.splice(t,1))}},appApi:!0});function X(e){k.value=e,J({query:`ids:${e}`})}const D=async e=>{e.parentId===c.value&&(b.value+=e.content,g.value=await C(b.value+''),e.finishReason==="stop"&&T({id:c.value,message:b.value,isMe:!1}))};return oe(()=>{B.on("ai_chat_replied",D)}),ie(()=>{B.off("ai_chat_replied",D)}),(e,t)=>{const n=be,o=Ce,_=ge,L=me("tooltip");return l(),d("div",Me,[s("div",{class:"chat-items",ref_key:"scrollContainer",ref:I},[(l(!0),d(le,null,ce(p.value,(a,S)=>(l(),d("div",{key:a.id,class:"chat-item"},[O(a,S)?(l(),d("div",Ie,u(m(M)(a.createdAt)),1)):N("",!0),S>0?(l(),he(o,{key:1},{content:R(()=>[s("div",De,[s("md-menu-item",{onClick:Ee=>X(a.id),disabled:m(W)},[s("div",Se,u(e.$t("delete_message")),1)],8,Le)])]),default:R(()=>[s("div",Te,[s("span",$e,u(e.$t(a.isMe?"me":"ai")),1),A((l(),d("span",xe,[G(u(m(K)(a.createdAt)),1)])),[[L,m(q)(a.createdAt)]]),Q(n,{class:"bi bi-more"})])]),_:2},1024)):(l(),d("div",Ve,[s("span",He,u(e.$t(a.isMe?"me":"ai")),1),A((l(),d("span",Be,[G(u(m(K)(a.createdAt)),1)])),[[L,m(q)(a.createdAt)]])])),s("div",{class:"chat-content md-container",innerHTML:a.md},null,8,Ne)]))),128)),y.value?(l(),d("div",Qe,[s("div",Re,[s("span",qe,u(e.$t("ai")),1)]),s("div",{class:"chat-content md-container",innerHTML:g.value},null,8,Ge)])):N("",!0)],512),s("div",Ke,[A(s("md-outlined-text-field",{class:"textarea",type:"textarea","onUpdate:modelValue":t[0]||(t[0]=a=>i.value=a),autocomplete:"off",placeholder:e.$t("chat_input_hint"),onKeydown:[h(v($,["exact","prevent"]),["enter"]),t[1]||(t[1]=h(v(a=>i.value+=` +import{d as Y,u as Z,g as ee,h as r,s as te,i as ae,l as se,j as V,b7 as ne,aw as H,af as oe,a1 as B,ag as ie,c as d,a as s,O as le,P as ce,t as u,e as N,x as A,y as re,A as h,w as v,p as Q,Q as de,C as ue,bl as pe,bm as _e,bn as ve,S as me,o as l,m,bo as M,v as he,q as R,ap as q,V as G,bp as K,F as fe,G as ye,bq as be,ao as Ce,br as ge,H as we}from"./index-R8dLcqG_.js";import{u as ke}from"./markdown-C_We2h-B.js";const Ae=f=>(fe("data-v-4d4db71f"),f=f(),ye(),f),Me={class:"chat-container"},Ie={key:0,class:"date"},Te={class:"chat-title"},$e={class:"name"},xe={class:"time"},De={class:"menu-items"},Le=["onClick","disabled"],Se={slot:"headline"},Ve={key:2,class:"chat-title"},He={class:"name"},Be={class:"time"},Ne=["innerHTML"],Qe={key:0,class:"chat-item replying"},Re={class:"chat-title"},qe={class:"name"},Ge=["innerHTML"],Ke={class:"chat-input",style:{"min-height":"80px"}},Fe=["placeholder","onKeydown"],Pe={class:"btns"},Ue=Ae(()=>s("md-ripple",null,null,-1)),je=Y({__name:"AIChatView",setup(f){const F=Z(),{t:P}=ee(),U=de(),c=r(U.params.id),i=r(""),p=r([]),y=r(!1),b=r(""),g=r(""),{app:j,urlTokenKey:E}=te(ae()),I=r(),{render:C}=ke(j,E);function w(){return c.value==="create"}function O(e,t){let n=!1;if(t==0)n=!0;else{const o=t>0?p.value[t-1]:null;o!=null&&M(o.createdAt)!==M(e.createdAt)&&(n=!0)}return n}w()||se({handle:async(e,t)=>{if(t)ue(P(t),"error");else{const n=[];n.push({...e.aiChat,md:await C(e.aiChat.content)});for(const o of e.aiChats)n.push({...o,md:await C(o.content)});p.value=n,await H(),x()}},document:pe,variables:()=>({id:c.value,query:`parent_id:${c.value} sort:created_at-asc`}),appApi:!0});const{mutate:T,onDone:z}=V({document:_e,appApi:!0});function $(){!i.value||y.value||T({id:w()?"":c.value,message:i.value,isMe:!0})}z(async e=>{var n;const t=e.data.createAIChat;if(t){for(const _ of t)(n=p.value)==null||n.push({..._,md:await C(_.content)});w()&&(c.value=t[0].id,ne(F,`/aichats/${c.value}`)),i.value="",y.value=!y.value,b.value="",g.value='',await H(),x()}});function x(){const e=I.value;e&&(e.scrollTop=e.scrollHeight)}const k=r(""),{mutate:J,loading:W}=V({document:ve,options:{update:e=>{var n,o;e.evict({id:e.identify({__typename:"AIChat",id:k.value})});const t=(n=p.value)==null?void 0:n.findIndex(_=>_.id===k.value);t!==null&&((o=p.value)==null||o.splice(t,1))}},appApi:!0});function X(e){k.value=e,J({query:`ids:${e}`})}const D=async e=>{e.parentId===c.value&&(b.value+=e.content,g.value=await C(b.value+''),e.finishReason==="stop"&&T({id:c.value,message:b.value,isMe:!1}))};return oe(()=>{B.on("ai_chat_replied",D)}),ie(()=>{B.off("ai_chat_replied",D)}),(e,t)=>{const n=be,o=Ce,_=ge,L=me("tooltip");return l(),d("div",Me,[s("div",{class:"chat-items",ref_key:"scrollContainer",ref:I},[(l(!0),d(le,null,ce(p.value,(a,S)=>(l(),d("div",{key:a.id,class:"chat-item"},[O(a,S)?(l(),d("div",Ie,u(m(M)(a.createdAt)),1)):N("",!0),S>0?(l(),he(o,{key:1},{content:R(()=>[s("div",De,[s("md-menu-item",{onClick:Ee=>X(a.id),disabled:m(W)},[s("div",Se,u(e.$t("delete_message")),1)],8,Le)])]),default:R(()=>[s("div",Te,[s("span",$e,u(e.$t(a.isMe?"me":"ai")),1),A((l(),d("span",xe,[G(u(m(K)(a.createdAt)),1)])),[[L,m(q)(a.createdAt)]]),Q(n,{class:"bi bi-more"})])]),_:2},1024)):(l(),d("div",Ve,[s("span",He,u(e.$t(a.isMe?"me":"ai")),1),A((l(),d("span",Be,[G(u(m(K)(a.createdAt)),1)])),[[L,m(q)(a.createdAt)]])])),s("div",{class:"chat-content md-container",innerHTML:a.md},null,8,Ne)]))),128)),y.value?(l(),d("div",Qe,[s("div",Re,[s("span",qe,u(e.$t("ai")),1)]),s("div",{class:"chat-content md-container",innerHTML:g.value},null,8,Ge)])):N("",!0)],512),s("div",Ke,[A(s("md-outlined-text-field",{class:"textarea",type:"textarea","onUpdate:modelValue":t[0]||(t[0]=a=>i.value=a),autocomplete:"off",placeholder:e.$t("chat_input_hint"),onKeydown:[h(v($,["exact","prevent"]),["enter"]),t[1]||(t[1]=h(v(a=>i.value+=` `,["shift","exact","prevent"]),["enter"])),t[2]||(t[2]=h(v(a=>i.value+=` `,["ctrl","exact","prevent"]),["enter"])),t[3]||(t[3]=h(v(a=>i.value+=` `,["alt","exact","prevent"]),["enter"])),t[4]||(t[4]=h(v(a=>i.value+=` diff --git a/app/src/main/resources/web/assets/AIChatsSidebar-DGY1IrlG.js b/app/src/main/resources/web/assets/AIChatsSidebar-CtG-RNga.js similarity index 88% rename from app/src/main/resources/web/assets/AIChatsSidebar-DGY1IrlG.js rename to app/src/main/resources/web/assets/AIChatsSidebar-CtG-RNga.js index 95ecd482..dc222d24 100644 --- a/app/src/main/resources/web/assets/AIChatsSidebar-DGY1IrlG.js +++ b/app/src/main/resources/web/assets/AIChatsSidebar-CtG-RNga.js @@ -1 +1 @@ -import{_ as M}from"./LeftSidebar.vuevuetypescriptsetuptruelang-xn7lCt7t.js";import{_ as S}from"./TagFilter.vuevuetypescriptsetuptruelang-CUu0usUl.js";import{o as u,c as f,a,d as T,h as k,g as V,j as x,bw as B,au as L,l as G,C as N,bx as Q,aw as z,av as q,x as w,y as D,m as s,z as K,A as P,t as h,e as F,V as I,u as R,I as E,k as j,v as H,q as b,a6 as y,a0 as U,S as Z,p as $,w as A,N as J,f as O,Z as W}from"./index-BzaaAwnX.js";import{u as X}from"./search-DwB6FdxH.js";import{u as Y,a as tt}from"./vee-validate.esm-DNjIRPsN.js";import"./more-vert-BRJfC0iG.js";import"./EditValueModal-Ws2hdG3a.js";const et={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},ot=a("path",{fill:"currentColor",d:"m9.25 22l-.4-3.2q-.325-.125-.612-.3t-.563-.375L4.7 19.375l-2.75-4.75l2.575-1.95Q4.5 12.5 4.5 12.338v-.675q0-.163.025-.338L1.95 9.375l2.75-4.75l2.975 1.25q.275-.2.575-.375t.6-.3l.4-3.2h5.5l.4 3.2q.325.125.613.3t.562.375l2.975-1.25l2.75 4.75l-2.575 1.95q.025.175.025.338v.674q0 .163-.05.338l2.575 1.95l-2.75 4.75l-2.95-1.25q-.275.2-.575.375t-.6.3l-.4 3.2zM11 20h1.975l.35-2.65q.775-.2 1.438-.587t1.212-.938l2.475 1.025l.975-1.7l-2.15-1.625q.125-.35.175-.737T17.5 12t-.05-.787t-.175-.738l2.15-1.625l-.975-1.7l-2.475 1.05q-.55-.575-1.212-.962t-1.438-.588L13 4h-1.975l-.35 2.65q-.775.2-1.437.588t-1.213.937L5.55 7.15l-.975 1.7l2.15 1.6q-.125.375-.175.75t-.05.8q0 .4.05.775t.175.75l-2.15 1.625l.975 1.7l2.475-1.05q.55.575 1.213.963t1.437.587zm1.05-4.5q1.45 0 2.475-1.025T15.55 12t-1.025-2.475T12.05 8.5q-1.475 0-2.488 1.025T8.55 12t1.013 2.475T12.05 15.5M12 12"},null,-1),st=[ot];function at(g,d){return u(),f("svg",et,[...st])}const nt={name:"material-symbols-settings-outline",render:at},lt=a("div",{slot:"headline"},"ChatGPT",-1),it={slot:"content"},rt=["label","error","error-text"],ct={slot:"actions"},ut=["disabled"],dt={key:0,indeterminate:"",slot:"icon"},pt=T({__name:"AIChatConfigModal",props:{value:{type:String}},setup(g){const{handleSubmit:d}=Y(),p=k(),{t:r}=V(),c=g,{mutate:_,loading:m,onDone:C}=x({document:B,options:{update:()=>{}},appApi:!0}),{value:t,resetField:v,errorMessage:n}=tt("inputValue",L());t.value=c.value??"",t.value||v(),G({handle:(o,e)=>{e?N(r(e),"error"):o&&(t.value=o.aiChatConfig.chatGPTApiKey)},document:Q,variables:null,appApi:!0}),(async()=>{var o;await z(),(o=p.value)==null||o.focus()})();const i=d(()=>{_({chatGPTApiKey:t.value??""})});return C(()=>{q()}),(o,e)=>(u(),f("md-dialog",null,[lt,a("div",it,[w(a("md-outlined-text-field",{ref_key:"input",ref:p,label:o.$t("api_key"),class:"form-control","onUpdate:modelValue":e[0]||(e[0]=l=>K(t)?t.value=l:null),onKeyup:e[1]||(e[1]=P((...l)=>s(i)&&s(i)(...l),["enter"])),error:s(n),"error-text":s(n)?o.$t(s(n)):""},null,40,rt),[[D,s(t)]])]),a("div",ct,[a("md-outlined-button",{value:"cancel",onClick:e[2]||(e[2]=(...l)=>s(q)&&s(q)(...l))},h(o.$t("cancel")),1),a("md-filled-button",{value:"save",disabled:s(m),onClick:e[3]||(e[3]=(...l)=>s(i)&&s(i)(...l)),autofocus:""},[s(m)?(u(),f("md-circular-progress",dt)):F("",!0),I(" "+h(o.$t("save")),1)],8,ut)])]))}}),_t=a("md-ripple",null,null,-1),mt={class:"nav"},vt={class:"title"},$t=T({__name:"AIChatsSidebar",setup(g){const d=R(),{parseQ:p}=X(),r=E({tagIds:[]}),c=k("");function _(){var n;const t=y.currentRoute.value,v=U(((n=t.query.q)==null?void 0:n.toString())??"");p(r,v),c.value=r.tagIds.length===1?r.tagIds[0]:""}_(),j(()=>y.currentRoute.value,()=>{_()});function m(){O(d,"/aichats")}function C(){W(pt)}return(t,v)=>{const n=nt,i=S,o=M,e=Z("tooltip");return u(),H(o,null,{title:b(()=>[I(h(t.$t("page_title.aichats")),1)]),actions:b(()=>[w((u(),f("button",{class:"btn-icon",onClick:A(C,["prevent"])},[_t,$(n)])),[[e,t.$t("config")]])]),body:b(()=>[a("ul",mt,[a("li",{onClick:A(m,["prevent"]),class:J({active:!c.value})},[a("span",vt,h(t.$t("all")),1)],2)]),$(i,{type:"AI_CHAT",selected:c.value},null,8,["selected"])]),_:1})}}});export{$t as default}; +import{_ as M}from"./LeftSidebar.vuevuetypescriptsetuptruelang-BWG8gajF.js";import{_ as S}from"./TagFilter.vuevuetypescriptsetuptruelang-DySu9lzm.js";import{o as u,c as f,a,d as T,h as k,g as V,j as x,bw as B,au as L,l as G,C as N,bx as Q,aw as z,av as q,x as w,y as D,m as s,z as K,A as P,t as h,e as F,V as I,u as R,I as E,k as j,v as H,q as b,a6 as y,a0 as U,S as Z,p as $,w as A,N as J,f as O,Z as W}from"./index-R8dLcqG_.js";import{u as X}from"./search-ByVbj6Ls.js";import{u as Y,a as tt}from"./vee-validate.esm-vpr6zxQb.js";import"./more-vert-zjmMMiPD.js";import"./EditValueModal-O1aAFYgx.js";const et={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},ot=a("path",{fill:"currentColor",d:"m9.25 22l-.4-3.2q-.325-.125-.612-.3t-.563-.375L4.7 19.375l-2.75-4.75l2.575-1.95Q4.5 12.5 4.5 12.338v-.675q0-.163.025-.338L1.95 9.375l2.75-4.75l2.975 1.25q.275-.2.575-.375t.6-.3l.4-3.2h5.5l.4 3.2q.325.125.613.3t.562.375l2.975-1.25l2.75 4.75l-2.575 1.95q.025.175.025.338v.674q0 .163-.05.338l2.575 1.95l-2.75 4.75l-2.95-1.25q-.275.2-.575.375t-.6.3l-.4 3.2zM11 20h1.975l.35-2.65q.775-.2 1.438-.587t1.212-.938l2.475 1.025l.975-1.7l-2.15-1.625q.125-.35.175-.737T17.5 12t-.05-.787t-.175-.738l2.15-1.625l-.975-1.7l-2.475 1.05q-.55-.575-1.212-.962t-1.438-.588L13 4h-1.975l-.35 2.65q-.775.2-1.437.588t-1.213.937L5.55 7.15l-.975 1.7l2.15 1.6q-.125.375-.175.75t-.05.8q0 .4.05.775t.175.75l-2.15 1.625l.975 1.7l2.475-1.05q.55.575 1.213.963t1.437.587zm1.05-4.5q1.45 0 2.475-1.025T15.55 12t-1.025-2.475T12.05 8.5q-1.475 0-2.488 1.025T8.55 12t1.013 2.475T12.05 15.5M12 12"},null,-1),st=[ot];function at(g,d){return u(),f("svg",et,[...st])}const nt={name:"material-symbols-settings-outline",render:at},lt=a("div",{slot:"headline"},"ChatGPT",-1),it={slot:"content"},rt=["label","error","error-text"],ct={slot:"actions"},ut=["disabled"],dt={key:0,indeterminate:"",slot:"icon"},pt=T({__name:"AIChatConfigModal",props:{value:{type:String}},setup(g){const{handleSubmit:d}=Y(),p=k(),{t:r}=V(),c=g,{mutate:_,loading:m,onDone:C}=x({document:B,options:{update:()=>{}},appApi:!0}),{value:t,resetField:v,errorMessage:n}=tt("inputValue",L());t.value=c.value??"",t.value||v(),G({handle:(o,e)=>{e?N(r(e),"error"):o&&(t.value=o.aiChatConfig.chatGPTApiKey)},document:Q,variables:null,appApi:!0}),(async()=>{var o;await z(),(o=p.value)==null||o.focus()})();const i=d(()=>{_({chatGPTApiKey:t.value??""})});return C(()=>{q()}),(o,e)=>(u(),f("md-dialog",null,[lt,a("div",it,[w(a("md-outlined-text-field",{ref_key:"input",ref:p,label:o.$t("api_key"),class:"form-control","onUpdate:modelValue":e[0]||(e[0]=l=>K(t)?t.value=l:null),onKeyup:e[1]||(e[1]=P((...l)=>s(i)&&s(i)(...l),["enter"])),error:s(n),"error-text":s(n)?o.$t(s(n)):""},null,40,rt),[[D,s(t)]])]),a("div",ct,[a("md-outlined-button",{value:"cancel",onClick:e[2]||(e[2]=(...l)=>s(q)&&s(q)(...l))},h(o.$t("cancel")),1),a("md-filled-button",{value:"save",disabled:s(m),onClick:e[3]||(e[3]=(...l)=>s(i)&&s(i)(...l)),autofocus:""},[s(m)?(u(),f("md-circular-progress",dt)):F("",!0),I(" "+h(o.$t("save")),1)],8,ut)])]))}}),_t=a("md-ripple",null,null,-1),mt={class:"nav"},vt={class:"title"},$t=T({__name:"AIChatsSidebar",setup(g){const d=R(),{parseQ:p}=X(),r=E({tagIds:[]}),c=k("");function _(){var n;const t=y.currentRoute.value,v=U(((n=t.query.q)==null?void 0:n.toString())??"");p(r,v),c.value=r.tagIds.length===1?r.tagIds[0]:""}_(),j(()=>y.currentRoute.value,()=>{_()});function m(){O(d,"/aichats")}function C(){W(pt)}return(t,v)=>{const n=nt,i=S,o=M,e=Z("tooltip");return u(),H(o,null,{title:b(()=>[I(h(t.$t("page_title.aichats")),1)]),actions:b(()=>[w((u(),f("button",{class:"btn-icon",onClick:A(C,["prevent"])},[_t,$(n)])),[[e,t.$t("config")]])]),body:b(()=>[a("ul",mt,[a("li",{onClick:A(m,["prevent"]),class:J({active:!c.value})},[a("span",vt,h(t.$t("all")),1)],2)]),$(i,{type:"AI_CHAT",selected:c.value},null,8,["selected"])]),_:1})}}});export{$t as default}; diff --git a/app/src/main/resources/web/assets/AIChatsView-BtwzZ9Jh.js b/app/src/main/resources/web/assets/AIChatsView-B4QzEE_5.js similarity index 92% rename from app/src/main/resources/web/assets/AIChatsView-BtwzZ9Jh.js rename to app/src/main/resources/web/assets/AIChatsView-B4QzEE_5.js index 6338623e..fdb00898 100644 --- a/app/src/main/resources/web/assets/AIChatsView-BtwzZ9Jh.js +++ b/app/src/main/resources/web/assets/AIChatsView-B4QzEE_5.js @@ -1,4 +1,4 @@ -import{_ as ve}from"./VPagination.vuevuetypescriptsetuptruelang-DJTUsUyq.js";import{d as fe,h as I,g as ke,I as ye,u as be,i as Ce,s as $e,J as we,K as Ae,L as Te,M as qe,c as l,a,t as i,m as t,p as d,O as D,x as m,w as u,e as f,P as Ie,v as De,Q as Se,bn as Le,f as Me,C as Ve,bs as Ee,S as Ne,o as n,N as Ue,b8 as Be,ap as O,V as X,U as Z,X as Ke,a0 as Qe,a1 as k,bt as j,Z as W,ac as Pe,ad as ze,$ as He,ae as Re,a2 as Fe,a3 as Ge,a4 as Je}from"./index-BzaaAwnX.js";import{_ as Oe,a as Xe}from"./SearchInput-DTMVECJE.js";import{b as Ze,u as je,a as We}from"./key-events-C5OjC_dP.js";import{u as Ye,a as xe}from"./tags-BvnEKqTV.js";import{u as et}from"./search-DwB6FdxH.js";import"./search-rounded-Btuwf-IQ.js";import"./rss-feed-rounded-9FbiHzkN.js";import"./vee-validate.esm-DNjIRPsN.js";const tt={class:"top-app-bar"},at={class:"title"},st={class:"actions"},ot=a("md-ripple",null,null,-1),nt=a("md-ripple",null,null,-1),lt={class:"table-responsive"},it={class:"table"},ct=["checked","indeterminate"],dt={key:0},rt=a("th",null,null,-1),ut=["onClick"],_t=["onChange","checked"],pt={key:0},ht=["onClick"],mt={class:"nowrap"},gt={class:"action-btns"},vt=["onClick"],ft=a("md-ripple",null,null,-1),kt=["onClick"],yt=a("md-ripple",null,null,-1),bt={class:"nowrap"},Ct={class:"nowrap"},$t={key:0},wt=["colspan"],At={class:"no-data-placeholder"},g=50,Ut=fe({__name:"AIChatsView",setup(Tt){var R;const y=I([]),{t:Y}=ke(),{parseQ:x}=et(),S=ye({tagIds:[]}),ee=be(),te=Ce(),{app:w}=$e(te),r=we.AI_CHAT,L=Se(),M=L.query,A=I(parseInt(((R=M.page)==null?void 0:R.toString())??"1")),_=I(""),{tags:b,fetch:ae}=Ye(r),{addToTags:se}=xe(r,b),{deleteItems:V}=Ze(Le,()=>{$()}),{selectedIds:v,allChecked:E,realAllChecked:C,selectRealAll:oe,allCheckedAlertVisible:ne,clearSelection:T,toggleAllChecked:N,toggleSelect:U,total:c,checked:B,selectAll:le}=je(y),K=e=>{const o=L.query.q;Me(ee,o?`/aichats?page=${e}&q=${o}`:`/aichats?page=${e}`)},{keyDown:Q,keyUp:P}=We(c,g,A,le,T,K,()=>{V(C.value,v.value,_.value)}),{loading:ie,fetch:$}=Ae({handle:(e,o)=>{o?Ve(Y(o),"error"):e&&(y.value=e.aiChats,c.value=e.aiChatCount)},document:Ee,variables:()=>({offset:(A.value-1)*g,limit:g,query:_.value}),appApi:!0});function ce(e){return e?`/aichats?q=${e}`:"/aichats"}const z=e=>{e.type===r&&(T(),$())},H=e=>{e.type===r&&$()};Te(()=>{var e;_.value=Qe(((e=M.q)==null?void 0:e.toString())??""),x(S,_.value),ae(),$(),k.on("item_tags_updated",H),k.on("items_tags_updated",z),window.addEventListener("keydown",Q),window.addEventListener("keyup",P)}),qe(()=>{k.off("item_tags_updated",H),k.off("items_tags_updated",z),window.removeEventListener("keydown",Q),window.removeEventListener("keyup",P)});function de(e){j(`/aichats/${e.id}`)}function re(){j("/aichats/create")}function ue(e){W(ze,{id:e.id,name:e.id,gql:Pe` +import{_ as ve}from"./VPagination.vuevuetypescriptsetuptruelang-goYu96wT.js";import{d as fe,h as I,g as ke,I as ye,u as be,i as Ce,s as $e,J as we,K as Ae,L as Te,M as qe,c as l,a,t as i,m as t,p as d,O as D,x as m,w as u,e as f,P as Ie,v as De,Q as Se,bn as Le,f as Me,C as Ve,bs as Ee,S as Ne,o as n,N as Ue,b8 as Be,ap as O,V as X,U as Z,X as Ke,a0 as Qe,a1 as k,bt as j,Z as W,ac as Pe,ad as ze,$ as He,ae as Re,a2 as Fe,a3 as Ge,a4 as Je}from"./index-R8dLcqG_.js";import{_ as Oe,a as Xe}from"./SearchInput-DhaE-3h8.js";import{b as Ze,u as je,a as We}from"./key-events-BNCM8SMB.js";import{u as Ye,a as xe}from"./tags-Dbpv368M.js";import{u as et}from"./search-ByVbj6Ls.js";import"./search-rounded-CULEMJ2O.js";import"./rss-feed-rounded-BCiGdgJ5.js";import"./vee-validate.esm-vpr6zxQb.js";const tt={class:"top-app-bar"},at={class:"title"},st={class:"actions"},ot=a("md-ripple",null,null,-1),nt=a("md-ripple",null,null,-1),lt={class:"table-responsive"},it={class:"table"},ct=["checked","indeterminate"],dt={key:0},rt=a("th",null,null,-1),ut=["onClick"],_t=["onChange","checked"],pt={key:0},ht=["onClick"],mt={class:"nowrap"},gt={class:"action-btns"},vt=["onClick"],ft=a("md-ripple",null,null,-1),kt=["onClick"],yt=a("md-ripple",null,null,-1),bt={class:"nowrap"},Ct={class:"nowrap"},$t={key:0},wt=["colspan"],At={class:"no-data-placeholder"},g=50,Ut=fe({__name:"AIChatsView",setup(Tt){var R;const y=I([]),{t:Y}=ke(),{parseQ:x}=et(),S=ye({tagIds:[]}),ee=be(),te=Ce(),{app:w}=$e(te),r=we.AI_CHAT,L=Se(),M=L.query,A=I(parseInt(((R=M.page)==null?void 0:R.toString())??"1")),_=I(""),{tags:b,fetch:ae}=Ye(r),{addToTags:se}=xe(r,b),{deleteItems:V}=Ze(Le,()=>{$()}),{selectedIds:v,allChecked:E,realAllChecked:C,selectRealAll:oe,allCheckedAlertVisible:ne,clearSelection:T,toggleAllChecked:N,toggleSelect:U,total:c,checked:B,selectAll:le}=je(y),K=e=>{const o=L.query.q;Me(ee,o?`/aichats?page=${e}&q=${o}`:`/aichats?page=${e}`)},{keyDown:Q,keyUp:P}=We(c,g,A,le,T,K,()=>{V(C.value,v.value,_.value)}),{loading:ie,fetch:$}=Ae({handle:(e,o)=>{o?Ve(Y(o),"error"):e&&(y.value=e.aiChats,c.value=e.aiChatCount)},document:Ee,variables:()=>({offset:(A.value-1)*g,limit:g,query:_.value}),appApi:!0});function ce(e){return e?`/aichats?q=${e}`:"/aichats"}const z=e=>{e.type===r&&(T(),$())},H=e=>{e.type===r&&$()};Te(()=>{var e;_.value=Qe(((e=M.q)==null?void 0:e.toString())??""),x(S,_.value),ae(),$(),k.on("item_tags_updated",H),k.on("items_tags_updated",z),window.addEventListener("keydown",Q),window.addEventListener("keyup",P)}),qe(()=>{k.off("item_tags_updated",H),k.off("items_tags_updated",z),window.removeEventListener("keydown",Q),window.removeEventListener("keyup",P)});function de(e){j(`/aichats/${e.id}`)}function re(){j("/aichats/create")}function ue(e){W(ze,{id:e.id,name:e.id,gql:Pe` mutation DeleteAIChat($query: String!) { deleteAIChats(query: $query) } diff --git a/app/src/main/resources/web/assets/AppsSidebar-ChIAGNf6.js b/app/src/main/resources/web/assets/AppsSidebar-DIojpdxl.js similarity index 89% rename from app/src/main/resources/web/assets/AppsSidebar-ChIAGNf6.js rename to app/src/main/resources/web/assets/AppsSidebar-DIojpdxl.js index f6343586..1d63f207 100644 --- a/app/src/main/resources/web/assets/AppsSidebar-ChIAGNf6.js +++ b/app/src/main/resources/web/assets/AppsSidebar-DIojpdxl.js @@ -1 +1 @@ -import{_ as b}from"./LeftSidebar.vuevuetypescriptsetuptruelang-xn7lCt7t.js";import{d as w,u as L,s as T,i as A,I as N,h as k,K as Q,k as V,v as R,q as g,at as z,a6 as S,a0 as I,o as r,V as M,t,a,w as p,N as u,m as l,c as m,e as v,a7 as D,f as h,a8 as E}from"./index-BzaaAwnX.js";import{u as G}from"./search-DwB6FdxH.js";const K={class:"nav"},P={class:"title"},j={key:0,class:"count"},x={class:"title"},F={key:0,class:"count"},H={class:"title"},J={key:0,class:"count"},Y=w({__name:"AppsSidebar",setup(O){const y=L(),{counter:o}=T(A()),{parseQ:C}=G(),_=N({tagIds:[]}),n=k(""),i=k(-1),{fetch:$}=Q({handle:e=>{e&&(o.value.packages=e.total,o.value.packagesSystem=e.system,i.value=e.total-e.system)},document:z,variables:()=>({}),appApi:!0});function d(){var c;const e=S.currentRoute.value,s=I(((c=e.query.q)==null?void 0:c.toString())??"");C(_,s),n.value=_.type??"",$()}function f(e){const s=D([{name:"type",op:"",value:e}]);h(y,`/apps?q=${E(s)}`)}function B(){h(y,"/apps")}return d(),V(()=>S.currentRoute.value,()=>{d()}),(e,s)=>{const c=b;return r(),R(c,null,{title:g(()=>[M(t(e.$t("page_title.apps")),1)]),body:g(()=>[a("ul",K,[a("li",{onClick:p(B,["prevent"]),class:u({active:!n.value})},[a("span",P,t(e.$t("all")),1),l(o).packages>=0?(r(),m("span",j,t(l(o).packages.toLocaleString()),1)):v("",!0)],2),a("li",{onClick:s[0]||(s[0]=p(q=>f("user"),["prevent"])),class:u({active:n.value==="user"})},[a("span",x,t(e.$t("app_type.user")),1),i.value>=0?(r(),m("span",F,t(i.value.toLocaleString()),1)):v("",!0)],2),a("li",{onClick:s[1]||(s[1]=p(q=>f("system"),["prevent"])),class:u({active:n.value==="system"})},[a("span",H,t(e.$t("app_type.system")),1),l(o).packagesSystem>=0?(r(),m("span",J,t(l(o).packagesSystem.toLocaleString()),1)):v("",!0)],2)])]),_:1})}}});export{Y as default}; +import{_ as b}from"./LeftSidebar.vuevuetypescriptsetuptruelang-BWG8gajF.js";import{d as w,u as L,s as T,i as A,I as N,h as k,K as Q,k as V,v as R,q as g,at as z,a6 as S,a0 as I,o as r,V as M,t,a,w as p,N as u,m as l,c as m,e as v,a7 as D,f as h,a8 as E}from"./index-R8dLcqG_.js";import{u as G}from"./search-ByVbj6Ls.js";const K={class:"nav"},P={class:"title"},j={key:0,class:"count"},x={class:"title"},F={key:0,class:"count"},H={class:"title"},J={key:0,class:"count"},Y=w({__name:"AppsSidebar",setup(O){const y=L(),{counter:o}=T(A()),{parseQ:C}=G(),_=N({tagIds:[]}),n=k(""),i=k(-1),{fetch:$}=Q({handle:e=>{e&&(o.value.packages=e.total,o.value.packagesSystem=e.system,i.value=e.total-e.system)},document:z,variables:()=>({}),appApi:!0});function d(){var c;const e=S.currentRoute.value,s=I(((c=e.query.q)==null?void 0:c.toString())??"");C(_,s),n.value=_.type??"",$()}function f(e){const s=D([{name:"type",op:"",value:e}]);h(y,`/apps?q=${E(s)}`)}function B(){h(y,"/apps")}return d(),V(()=>S.currentRoute.value,()=>{d()}),(e,s)=>{const c=b;return r(),R(c,null,{title:g(()=>[M(t(e.$t("page_title.apps")),1)]),body:g(()=>[a("ul",K,[a("li",{onClick:p(B,["prevent"]),class:u({active:!n.value})},[a("span",P,t(e.$t("all")),1),l(o).packages>=0?(r(),m("span",j,t(l(o).packages.toLocaleString()),1)):v("",!0)],2),a("li",{onClick:s[0]||(s[0]=p(q=>f("user"),["prevent"])),class:u({active:n.value==="user"})},[a("span",x,t(e.$t("app_type.user")),1),i.value>=0?(r(),m("span",F,t(i.value.toLocaleString()),1)):v("",!0)],2),a("li",{onClick:s[1]||(s[1]=p(q=>f("system"),["prevent"])),class:u({active:n.value==="system"})},[a("span",H,t(e.$t("app_type.system")),1),l(o).packagesSystem>=0?(r(),m("span",J,t(l(o).packagesSystem.toLocaleString()),1)):v("",!0)],2)])]),_:1})}}});export{Y as default}; diff --git a/app/src/main/resources/web/assets/AppsView-CYUzkFWb.js b/app/src/main/resources/web/assets/AppsView-CYUzkFWb.js deleted file mode 100644 index 054f1fc0..00000000 --- a/app/src/main/resources/web/assets/AppsView-CYUzkFWb.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as xe}from"./VPagination.vuevuetypescriptsetuptruelang-DJTUsUyq.js";import{a1 as T,d as Fe,s as Z,i as Me,ai as Te,u as Ke,h as S,g as Ne,I as Qe,aj as ze,J as Ge,K as ee,j as Re,L as je,M as He,c as l,a,m as t,t as i,x as k,w as u,p as h,e as I,V as A,q as te,N as se,O as w,P as M,v as ae,Q as Oe,f as Je,C as Xe,ak as Ye,al as We,am as Ze,an as et,ao as tt,S as st,o as n,E as at,ap as ne,U as oe,X as nt,F as ot,G as lt,Y as it,aq as ct,ar as dt,a0 as pt,as as rt,a3 as ut,ae as _t,H as vt}from"./index-BzaaAwnX.js";import{_ as kt,a as ht}from"./SearchInput-DTMVECJE.js";import{_ as mt}from"./sort-rounded-BiVhN4C5.js";import{u as ft,a as gt}from"./key-events-C5OjC_dP.js";import{u as yt}from"./search-DwB6FdxH.js";import"./search-rounded-Btuwf-IQ.js";import"./rss-feed-rounded-9FbiHzkN.js";const le=p=>{T.emit("tap_phone",p)};function bt(p,D){const m=p.findIndex(L=>L.id===D);m!==-1&&p.splice(m,1)}const g=p=>(ot("data-v-40570fe8"),p=p(),lt(),p),wt={class:"top-app-bar"},Ct=["checked","indeterminate"],$t={class:"title"},St={key:0},It={key:1},At=g(()=>a("md-ripple",null,null,-1)),Dt={class:"actions"},Lt=g(()=>a("md-ripple",null,null,-1)),Ut=["disabled"],qt=g(()=>a("md-ripple",null,null,-1)),Bt={key:0,indeterminate:""},Et={class:"menu-items"},Pt=["onClick","selected"],Vt={slot:"headline"},xt={class:"scroll-content"},Ft=["onClick","onMouseover"],Mt={class:"start"},Tt=["onClick","checked"],Kt=["onClick","checked"],Nt={class:"number"},Qt=["src"],zt={class:"title"},Gt={class:"subtitle"},Rt={class:"actions"},jt={indeterminate:"",class:"spinner-sm"},Ht=["onClick"],Ot=["onClick"],Jt=g(()=>a("md-ripple",null,null,-1)),Xt=["onClick"],Yt=g(()=>a("md-ripple",null,null,-1)),Wt={class:"time"},Zt={class:"start"},es=g(()=>a("div",{class:"checkbox"},[a("div",{class:"skeleton-checkbox"})],-1)),ts={class:"number"},ss=it('