hermes-web-ui 0.6.24 → 0.6.25
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/client/assets/js/{ChannelsView-DV-LtXVi.js → ChannelsView-p3dSvD02.js} +1 -1
- package/dist/client/assets/js/{ChatPanel-DyZWRnQs.js → ChatPanel-DRCE0v4g.js} +1 -1
- package/dist/client/assets/js/{ChatView-CuWpMwOd.js → ChatView-CAoJp8-Q.js} +1 -1
- package/dist/client/assets/js/{CodingAgentsView-D_Ngirz0.js → CodingAgentsView-X0I-H0Yu.js} +1 -1
- package/dist/client/assets/js/{DesktopPetView-BGY-7Dcd.js → DesktopPetView-BH9a1zur.js} +1 -1
- package/dist/client/assets/js/{DevicesView-BNZqDe2U.js → DevicesView-CMcwuGZ6.js} +1 -1
- package/dist/client/assets/js/{FileEditor-BPFC-M3W.js → FileEditor-CzWdryd5.js} +1 -1
- package/dist/client/assets/js/{FileRenameModal-5mJtyNBP.js → FileRenameModal-C2YmHkSN.js} +1 -1
- package/dist/client/assets/js/{FilesView-CRbkvC6l.js → FilesView-CKxvh6yi.js} +1 -1
- package/dist/client/assets/js/{GlobalAgentView-my3AKdll.js → GlobalAgentView-77p8MKvy.js} +1 -1
- package/dist/client/assets/js/{GroupChatView-btwSVoC0.js → GroupChatView-D1WFEfIs.js} +1 -1
- package/dist/client/assets/js/{HistoryMessageList-IubX9-tb.js → HistoryMessageList-BcG-gj6N.js} +1 -1
- package/dist/client/assets/js/{HistoryView-N3v7MNfo.js → HistoryView-CzybyBXj.js} +1 -1
- package/dist/client/assets/js/{JobsView-CHq_TJQ6.js → JobsView-BviznpSY.js} +1 -1
- package/dist/client/assets/js/{KanbanView-BMh8IgQo.js → KanbanView-B0c6OMrf.js} +1 -1
- package/dist/client/assets/js/{LoginView-sE4g4Zua.js → LoginView-B9nES8-3.js} +1 -1
- package/dist/client/assets/js/{LogsView-awh5ZCp8.js → LogsView-kLI6-05w.js} +1 -1
- package/dist/client/assets/js/{MarkdownRenderer-BbGvq6C-.js → MarkdownRenderer-DQvs79tf.js} +1 -1
- package/dist/client/assets/js/{McpManagerView-CnSCITtQ.js → McpManagerView-BZU1Puf0.js} +1 -1
- package/dist/client/assets/js/{MemoryView-CbQOeUKI.js → MemoryView-BH4LZtYd.js} +1 -1
- package/dist/client/assets/js/{MessageItem-DSHiAgFE.js → MessageItem-Cu3_aQT8.js} +2 -2
- package/dist/client/assets/js/{MessageList-oRCKlivC.js → MessageList-Ds_mjMbf.js} +1 -1
- package/dist/client/assets/js/{ModelsView-B0esXyBm.js → ModelsView-CZK6wwtt.js} +1 -1
- package/dist/client/assets/js/{OutlinePanel-BofcYepl.js → OutlinePanel-CYuSrNX9.js} +1 -1
- package/dist/client/assets/js/{PageSidebarFooter-BPeWlPvZ.js → PageSidebarFooter-Dk-OfmNy.js} +1 -1
- package/dist/client/assets/js/{PerformanceView-gc12dWCZ.js → PerformanceView-DkXk4HB_.js} +1 -1
- package/dist/client/assets/js/{PetdexView-CZjbg41u.js → PetdexView-DGkSZYVi.js} +1 -1
- package/dist/client/assets/js/{PluginsView-DRwyXTJC.js → PluginsView-D197obRC.js} +1 -1
- package/dist/client/assets/js/{ProfilesView-zVd3TfNW.js → ProfilesView-BhGBaYDE.js} +1 -1
- package/dist/client/assets/js/{SettingRow-G7ZusJw_.js → SettingRow-DfRI-z7L.js} +1 -1
- package/dist/client/assets/js/{SettingsCircuitBadge-CFo2KqP-.js → SettingsCircuitBadge-Eiv8LQz0.js} +1 -1
- package/dist/client/assets/js/{SettingsView-DDjt6UpN.js → SettingsView-B4ipIIOj.js} +1 -1
- package/dist/client/assets/js/{SkillsUsageView-DnVnAYHG.js → SkillsUsageView-DT4o1LA9.js} +1 -1
- package/dist/client/assets/js/{SkillsView-CHi4L7Oi.js → SkillsView-CUK-9OLz.js} +1 -1
- package/dist/client/assets/js/{TerminalPanel-Dx7huJY2.js → TerminalPanel-gyT2AS7Z.js} +1 -1
- package/dist/client/assets/js/{TerminalView-PQIIFHwX.js → TerminalView-C3a6BwEG.js} +1 -1
- package/dist/client/assets/js/{UsageView-Dzr2wBc7.js → UsageView-DrUS9OIk.js} +1 -1
- package/dist/client/assets/js/{VersionPreviewView-JQrieRPU.js → VersionPreviewView-qbXwqYd3.js} +1 -1
- package/dist/client/assets/js/{WorkflowView-DRanDY9s.js → WorkflowView-D-6z--9A.js} +1 -1
- package/dist/client/assets/js/{_plugin-vue_export-helper-fFMkIM4P.js → _plugin-vue_export-helper-CvnFozKy.js} +2 -2
- package/dist/client/assets/js/{chat-timestamp-CZtP79YD.js → chat-timestamp-CkDNtK9Y.js} +1 -1
- package/dist/client/assets/js/{files-DOpu4Qfg.js → files-CBYc0MSs.js} +1 -1
- package/dist/client/assets/js/index-B2IKGvbR.js +3 -0
- package/dist/client/assets/js/{models-y7NaVj-e.js → models-DetB4_Ug.js} +1 -1
- package/dist/client/assets/js/{session-browser-prefs-BOqwOeHi.js → session-browser-prefs-BYjSnxJq.js} +1 -1
- package/dist/client/assets/js/{skills-D7ZMzzzG.js → skills-5qxphanX.js} +1 -1
- package/dist/client/assets/js/{system-CRmVbE8Z.js → system-Onp4yS9N.js} +1 -1
- package/dist/client/assets/js/{ttsHelpers-vHLmbeY4.js → ttsHelpers-DNcZ5khq.js} +1 -1
- package/dist/client/assets/js/{useSttSettings-s4LBWl55.js → useSttSettings-C-jexrW7.js} +1 -1
- package/dist/client/index.html +3 -3
- package/dist/server/agent-bridge/python/bridge_runtime.py +2 -2
- package/dist/server/index.js +3 -3
- package/dist/server/openapi.json +1 -1
- package/package.json +1 -1
- package/dist/client/assets/js/index-Brl4qW5V.js +0 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as g}from"./rolldown-runtime-M0oDzQ_3.js";import{Dn as ge,Hn as k,Kt as be,Nn as M,Ot as C,V as ke,an as e,cn as u,cr as a,er as w,fn as S,fr as $,g as we,hn as Pe,in as h,jn as m,kn as Be,pn as P,pr as s,sn as y,t as Me,tn as V,ur as x}from"./ui-vendor-DDMfmCj2.js";import{O as Ce,k as Se}from"./vue-vendor-BsMpqyaC.js";import{f as $e,n as Ve,t as xe,u as Re}from"./_plugin-vue_export-helper-
|
|
1
|
+
import{n as g}from"./rolldown-runtime-M0oDzQ_3.js";import{Dn as ge,Hn as k,Kt as be,Nn as M,Ot as C,V as ke,an as e,cn as u,cr as a,er as w,fn as S,fr as $,g as we,hn as Pe,in as h,jn as m,kn as Be,pn as P,pr as s,sn as y,t as Me,tn as V,ur as x}from"./ui-vendor-DDMfmCj2.js";import{O as Ce,k as Se}from"./vue-vendor-BsMpqyaC.js";import{f as $e,n as Ve,t as xe,u as Re}from"./_plugin-vue_export-helper-CvnFozKy.js";async function Ie(){return $e("/api/hermes/performance/runtime")}var Ne=g((()=>{Re()})),R,I,N,D,F,U,z,O,T,W,A,L,j,q,K,E,G,H,J,Q,X,Y,Z,ee,se,ne,te,re,ae,le,ie,oe,ue,ce,me=g((()=>{be(),Me(),Ce(),Ne(),R={class:"performance-view"},I={class:"page-header"},N={class:"header-title"},D={class:"header-actions"},F={key:0,class:"performance-content"},U={class:"summary-grid"},z={class:"summary-item"},O={class:"summary-label"},T={class:"meter"},W={class:"summary-item"},A={class:"summary-label"},L={class:"meter"},j={class:"summary-item"},q={class:"summary-label"},K={class:"summary-item"},E={class:"summary-label"},G={class:"runtime-section"},H={class:"section-header"},J={class:"process-grid"},Q={class:"process-row"},X={class:"status running"},Y={class:"process-row"},Z={key:0,class:"runtime-error"},ee={class:"runtime-section"},se={class:"section-header"},ne={class:"worker-table-wrap"},te={class:"worker-table"},re={key:0},ae={colspan:"7",class:"empty-cell"},le={class:"runtime-section"},ie={class:"section-header"},oe={class:"session-list"},ue={key:0,class:"session-empty"},ce=Pe({__name:"PerformanceView",setup(ze){const{t:r}=Se(),de=ke(),n=w(null),p=w(!1),f=w(!0);let c;const _e=h(()=>n.value?.bridge.broker.process?.memoryRssBytes??null),pe=h(()=>n.value?.web.memory.rss??null),fe=h(()=>n.value?.bridge.workers.length??0),ve=h(()=>n.value?.bridge.workers.filter(t=>t.running).length??0);function d(t){if(t==null||!Number.isFinite(t))return"-";const i=["B","KB","MB","GB","TB"];let l=t,o=0;for(;l>=1024&&o<i.length-1;)l/=1024,o+=1;return`${l.toFixed(o===0?0:1)} ${i[o]}`}function _(t){return t==null||!Number.isFinite(t)?"-":`${t.toFixed(1)}%`}function he(t){if(t==null||!Number.isFinite(t))return"-";const i=Math.floor(t/86400),l=Math.floor(t%86400/3600),o=Math.floor(t%3600/60);return i>0?`${i}d ${l}h`:l>0?`${l}h ${o}m`:`${o}m`}function ye(t){return t?new Date(t*1e3).toLocaleString():"-"}function v(t){return r(t?"performance.running":"performance.stopped")}async function b(t=!0){p.value=!0;try{n.value=await Ie()}catch(i){t&&de.error(i?.message||r("performance.loadFailed"))}finally{p.value=!1}}function B(t){f.value=t,c&&(clearInterval(c),c=void 0),t&&(c=setInterval(()=>b(!1),5e3))}return Be(()=>{b(),B(!0)}),ge(()=>{c&&clearInterval(c)}),(t,i)=>(m(),u("div",R,[e("header",I,[e("h2",N,s(a(r)("performance.title")),1),e("div",D,[P(a(C),{size:"small",type:f.value?"primary":"default",secondary:"",onClick:i[0]||(i[0]=l=>B(!f.value))},{default:k(()=>[S(s(f.value?a(r)("performance.autoRefreshOn"):a(r)("performance.autoRefreshOff")),1)]),_:1},8,["type"]),P(a(C),{size:"small",loading:p.value,onClick:i[1]||(i[1]=l=>b())},{default:k(()=>[S(s(a(r)("performance.refresh")),1)]),_:1},8,["loading"])])]),P(a(we),{show:p.value&&!n.value,class:"performance-spin"},{default:k(()=>[n.value?(m(),u("main",F,[e("section",U,[e("div",z,[e("span",O,s(a(r)("performance.systemCpu")),1),e("strong",null,s(_(n.value.system.cpuPercent)),1),e("div",T,[e("span",{style:$({width:`${n.value.system.cpuPercent||0}%`})},null,4)])]),e("div",W,[e("span",A,s(a(r)("performance.systemMemory")),1),e("strong",null,s(_(n.value.system.memoryPercent)),1),e("small",null,s(d(n.value.system.usedMemoryBytes))+" / "+s(d(n.value.system.totalMemoryBytes)),1),e("div",L,[e("span",{style:$({width:`${n.value.system.memoryPercent||0}%`})},null,4)])]),e("div",j,[e("span",q,s(a(r)("performance.activeSessions")),1),e("strong",null,s(n.value.sessions.active),1),e("small",null,s(a(r)("performance.runningSessions",{count:n.value.sessions.running})),1)]),e("div",K,[e("span",E,s(a(r)("performance.workers")),1),e("strong",null,s(ve.value)+" / "+s(fe.value),1),e("small",null,s(a(r)("performance.totalWorkerMemory"))+" "+s(d(n.value.bridge.totalWorkerMemoryRssBytes)),1)])]),e("section",G,[e("div",H,[e("h3",null,s(a(r)("performance.processes")),1),e("span",null,s(n.value.system.platform)+" "+s(n.value.system.arch)+" · "+s(n.value.system.cpuCount)+" CPU · "+s(a(r)("performance.uptime"))+" "+s(he(n.value.system.uptimeSeconds)),1)]),e("div",J,[e("div",Q,[e("div",null,[i[2]||(i[2]=e("strong",null,"Web UI",-1)),e("span",null,"PID "+s(n.value.web.pid),1)]),e("span",null,s(_(n.value.web.cpuPercent)),1),e("span",null,s(d(pe.value)),1),e("span",X,s(v(!0)),1)]),e("div",Y,[e("div",null,[i[3]||(i[3]=e("strong",null,"Bridge Broker",-1)),e("span",null,s(n.value.bridge.endpoint),1)]),e("span",null,s(_(n.value.bridge.broker.process?.cpuPercent)),1),e("span",null,s(d(_e.value)),1),e("span",{class:x(["status",{running:n.value.bridge.reachable&&n.value.bridge.broker.running}])},s(n.value.bridge.reachable&&n.value.bridge.broker.running?v(!0):v(!1)),3)])]),n.value.bridge.error?(m(),u("div",Z,s(n.value.bridge.error),1)):y("",!0)]),e("section",ee,[e("div",se,[e("h3",null,s(a(r)("performance.workerMemory")),1),e("span",null,s(a(r)("performance.lastUpdated"))+" "+s(new Date(n.value.timestamp).toLocaleTimeString()),1)]),e("div",ne,[e("table",te,[e("thead",null,[e("tr",null,[e("th",null,s(a(r)("performance.profile")),1),i[4]||(i[4]=e("th",null,"PID",-1)),i[5]||(i[5]=e("th",null,"CPU",-1)),e("th",null,s(a(r)("performance.memory")),1),e("th",null,s(a(r)("performance.runningActiveSessions")),1),e("th",null,s(a(r)("performance.lastUsed")),1),e("th",null,s(a(r)("performance.status")),1)])]),e("tbody",null,[n.value.bridge.workers.length===0?(m(),u("tr",re,[e("td",ae,s(a(r)("performance.noWorkers")),1)])):y("",!0),(m(!0),u(V,null,M(n.value.bridge.workers,l=>(m(),u("tr",{key:l.profile||l.pid},[e("td",null,s(l.profile||"-"),1),e("td",null,s(l.pid||"-"),1),e("td",null,s(_(l.cpuPercent)),1),e("td",null,s(d(l.memoryRssBytes)),1),e("td",null,s(l.runningSessionCount)+" / "+s(l.sessionCount),1),e("td",null,s(ye(l.lastUsedAt)),1),e("td",null,[e("span",{class:x(["status",{running:l.running}])},s(v(l.running)),3)])]))),128))])])])]),e("section",le,[e("div",ie,[e("h3",null,s(a(r)("performance.sessionsByProfile")),1)]),e("div",oe,[Object.keys(n.value.sessions.byProfile).length===0?(m(),u("div",ue,s(a(r)("performance.noActiveSessions")),1)):y("",!0),(m(!0),u(V,null,M(n.value.sessions.byProfile,(l,o)=>(m(),u("div",{key:o,class:"session-row"},[e("span",null,s(o),1),e("strong",null,s(l),1)]))),128))])])])):y("",!0)]),_:1},8,["show"])]))}})})),De=g((()=>{})),Fe,Ue=g((()=>{me(),me(),De(),Ve(),Fe=xe(ce,[["__scopeId","data-v-0ce2fc3a"]])}));Ue();export{Fe as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as P}from"./rolldown-runtime-M0oDzQ_3.js";import{Bt as oe,Hn as m,It as _e,Kt as ce,Nn as L,Ot as V,Rt as ve,V as pe,Wt as me,an as a,cn as u,cr as s,er as o,fn as f,fr as fe,g as ge,hn as he,in as v,jn as r,kn as ye,mt as xe,on as I,pn as _,pr as i,sn as w,t as ke,tn as C,ur as be}from"./ui-vendor-DDMfmCj2.js";import{O as we,k as Pe}from"./vue-vendor-BsMpqyaC.js";import{f as Se,n as Be,t as Ve,u as Ce}from"./_plugin-vue_export-helper-
|
|
1
|
+
import{n as P}from"./rolldown-runtime-M0oDzQ_3.js";import{Bt as oe,Hn as m,It as _e,Kt as ce,Nn as L,Ot as V,Rt as ve,V as pe,Wt as me,an as a,cn as u,cr as s,er as o,fn as f,fr as fe,g as ge,hn as he,in as v,jn as r,kn as ye,mt as xe,on as I,pn as _,pr as i,sn as w,t as ke,tn as C,ur as be}from"./ui-vendor-DDMfmCj2.js";import{O as we,k as Pe}from"./vue-vendor-BsMpqyaC.js";import{f as Se,n as Be,t as Ve,u as Ce}from"./_plugin-vue_export-helper-CvnFozKy.js";import{a as Ne,i as Me,o as ze,r as Ae}from"./index-B2IKGvbR.js";function Ue(N=!1){return Se(`/api/hermes/petdex/manifest${N?"?force=1":""}`)}var Le=P((()=>{Ce()})),T,$,D,E,F,O,q,j,J,K,W,G,H,Q,R,X,Y,Z,ee,te,ae,le,se=P((()=>{ce(),ke(),we(),Le(),Ne(),Me(),T={class:"petdex-view"},$={class:"page-header"},D={class:"header-title"},E={key:0,class:"loading-state"},F={key:1,class:"summary-grid"},O={class:"summary-card"},q={class:"summary-card"},j={class:"summary-card"},J={class:"summary-card wide"},K={class:"filter-row"},W={key:2,class:"pet-grid"},G={class:"pet-preview"},H={class:"pet-body"},Q={class:"pet-title-row"},R={class:"pet-slug"},X={key:0,class:"pet-meta"},Y={class:"pet-links"},Z=["href"],ee={class:"pet-actions"},te={key:4,class:"load-more"},ae=.58,le=he({__name:"PetdexView",setup(N){const{t:n}=Pe(),M=pe(),p=ze(),d=o(null),c=o(!1),g=o(""),h=o(""),S=o(""),y=o(null),B=o(96),z=v(()=>d.value?.pets??[]),ie=v(()=>{const l=d.value?.generatedAt;if(!l)return"";const e=new Date(l);return Number.isNaN(e.getTime())?l:e.toLocaleString()}),A=v(()=>{const l=new Map;for(const e of z.value)l.set(e.kind,(l.get(e.kind)??0)+1);return Array.from(l.entries()).sort((e,t)=>t[1]-e[1]||e[0].localeCompare(t[0])).map(([e,t])=>({label:`${e} (${t})`,value:e}))}),x=v(()=>{const l=S.value.trim().toLowerCase();return z.value.filter(e=>y.value&&e.kind!==y.value?!1:l?[e.slug,e.displayName,e.kind,e.submittedBy].some(t=>String(t||"").toLowerCase().includes(l)):!0)}),k=v(()=>x.value.slice(0,B.value)),ne=v(()=>k.value.length<x.value.length);async function U(l=!1){c.value=!0,h.value="";try{d.value=await Ue(l),B.value=96}catch(e){h.value=e?.message||n("petdex.loadFailed")}finally{c.value=!1}}function re(){B.value+=96}function ue(l){return[{label:n("petdex.spritesheet"),href:l.spritesheetUrl},...l.petJsonUrl?[{label:"pet.json",href:l.petJsonUrl}]:[],...l.zipUrl?[{label:"zip",href:l.zipUrl}]:[]]}async function de(l){g.value=l.slug;try{await p.adopt(l.slug);const e=Ae();e?.isDesktop&&(await p.savePreferences({scale:ae}),await e.setPetWindowVisible?.(!0).catch(()=>{})),M.success(n("petdex.adopted",{name:l.displayName}))}catch(e){M.error(e?.message||n("petdex.adoptFailed"))}finally{g.value=""}}return ye(()=>{U(),p.loadActivePet()}),(l,e)=>(r(),u("div",T,[a("header",$,[a("h2",D,i(s(n)("petdex.title")),1),_(s(V),{size:"small",quaternary:"",loading:c.value,onClick:e[0]||(e[0]=t=>U(!0))},{default:m(()=>[f(i(s(n)("petdex.refresh")),1)]),_:1},8,["loading"])]),a("div",{class:be(["petdex-content",{"is-loading":c.value&&!d.value}])},[c.value&&!d.value?(r(),u("div",E,[_(s(ge))])):(r(),u(C,{key:1},[h.value?(r(),I(s(ve),{key:0,type:"error",class:"notice"},{default:m(()=>[f(i(h.value),1)]),_:1})):w("",!0),d.value?(r(),u("div",F,[a("div",O,[a("span",null,i(s(n)("petdex.summary.total")),1),a("strong",null,i(d.value.total),1)]),a("div",q,[a("span",null,i(s(n)("petdex.summary.visible")),1),a("strong",null,i(x.value.length),1)]),a("div",j,[a("span",null,i(s(n)("petdex.summary.kinds")),1),a("strong",null,i(A.value.length),1)]),a("div",J,[a("span",null,i(s(n)("petdex.summary.generatedAt")),1),a("strong",null,i(ie.value||"-"),1)])])):w("",!0),a("div",K,[_(s(_e),{value:S.value,"onUpdate:value":e[1]||(e[1]=t=>S.value=t),placeholder:s(n)("petdex.searchPlaceholder"),clearable:""},null,8,["value","placeholder"]),_(s(xe),{value:y.value,"onUpdate:value":e[2]||(e[2]=t=>y.value=t),options:A.value,placeholder:s(n)("petdex.kindFilter"),clearable:""},null,8,["value","options","placeholder"])]),k.value.length?(r(),u("div",W,[(r(!0),u(C,null,L(k.value,t=>(r(),u("article",{key:t.slug,class:"pet-card"},[a("div",G,[a("div",{class:"pet-frame",style:fe({backgroundImage:`url(${t.previewUrl||t.spritesheetUrl})`})},null,4)]),a("div",H,[a("div",Q,[a("h3",null,i(t.displayName),1),_(s(oe),{size:"small",round:""},{default:m(()=>[f(i(t.kind),1)]),_:2},1024)]),a("div",R,i(t.slug),1),t.submittedBy?(r(),u("div",X,i(s(n)("petdex.submittedBy",{name:t.submittedBy})),1)):w("",!0),a("div",Y,[(r(!0),u(C,null,L(ue(t),b=>(r(),u("a",{key:b.href,href:b.href,target:"_blank",rel:"noopener noreferrer"},i(b.label),9,Z))),128))]),a("div",ee,[_(s(V),{size:"small",type:"primary",block:"",secondary:s(p).activePet?.slug===t.slug,loading:g.value===t.slug,disabled:!!g.value,onClick:b=>de(t)},{default:m(()=>[f(i(s(p).activePet?.slug===t.slug?s(n)("petdex.active"):s(n)("petdex.adopt")),1)]),_:2},1032,["secondary","loading","disabled","onClick"])])])]))),128))])):(r(),I(s(me),{key:3,description:s(n)("petdex.empty")},null,8,["description"])),ne.value?(r(),u("div",te,[_(s(V),{disabled:c.value,onClick:re},{default:m(()=>[f(i(s(n)("petdex.showMore",{count:Math.min(96,x.value.length-k.value.length)})),1)]),_:1},8,["disabled"])])):w("",!0)],64))],2)]))}})})),Ie=P((()=>{})),Te,$e=P((()=>{se(),se(),Ie(),Be(),Te=Ve(le,[["__scopeId","data-v-e67bc397"]])}));$e();export{Te as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as C}from"./rolldown-runtime-M0oDzQ_3.js";import{Bn as xe,Bt as T,Hn as _,It as Le,Kt as Te,Nn as A,Ot as U,Rt as z,V as ze,Wt as Ie,an as e,cn as r,cr as t,er as c,fn as d,g as Me,hn as Ne,in as y,jn as u,mt as I,on as V,pn as v,pr as l,sn as m,t as Oe,tn as M,ur as Fe}from"./ui-vendor-DDMfmCj2.js";import{O as $e,k as qe}from"./vue-vendor-BsMpqyaC.js";import{f as he,n as Ae,t as Ue,u as Re}from"./_plugin-vue_export-helper-
|
|
1
|
+
import{n as C}from"./rolldown-runtime-M0oDzQ_3.js";import{Bn as xe,Bt as T,Hn as _,It as Le,Kt as Te,Nn as A,Ot as U,Rt as z,V as ze,Wt as Ie,an as e,cn as r,cr as t,er as c,fn as d,g as Me,hn as Ne,in as y,jn as u,mt as I,on as V,pn as v,pr as l,sn as m,t as Oe,tn as M,ur as Fe}from"./ui-vendor-DDMfmCj2.js";import{O as $e,k as qe}from"./vue-vendor-BsMpqyaC.js";import{f as he,n as Ae,t as Ue,u as Re}from"./_plugin-vue_export-helper-CvnFozKy.js";import{Dt as je,Et as De}from"./index-B2IKGvbR.js";async function He(){return he("/api/hermes/plugins")}async function Ge(N,n){return he(`/api/hermes/plugins/${encodeURIComponent(N)}/${n?"enable":"disable"}`,{method:"POST"})}var Ke=C((()=>{Re()})),R,j,D,H,G,K,Q,W,J,X,Y,Z,ee,ae,te,se,le,ne,ie,ue,re,oe,de,ce,ve,_e,pe,me,fe,ye,ge=C((()=>{Te(),Oe(),$e(),Ke(),De(),R={class:"plugins-view"},j={class:"page-header"},D={class:"header-title"},H={key:0,class:"plugins-loading-state"},G={class:"summary-grid"},K={class:"summary-card"},Q={class:"summary-label"},W={class:"summary-card success"},J={class:"summary-label"},X={class:"summary-card warning"},Y={class:"summary-label"},Z={class:"summary-card error"},ee={class:"summary-label"},ae={class:"summary-card info"},te={class:"summary-label"},se={class:"filter-row"},le={key:1,class:"plugins-table-wrap"},ne={class:"plugins-table"},ie={class:"plugin-name"},ue={key:0},re={key:0,class:"description"},oe={key:1,class:"meta-line"},de={key:0},ce={key:1},ve={class:"config-status"},_e={class:"capability-list"},pe={class:"path-cell"},me={key:1,class:"muted"},fe={key:3,class:"metadata-panel"},ye=Ne({__name:"PluginsView",setup(N){const{t:n,te:O}=qe(),F=ze(),b=je(),o=c([]),B=c([]),p=c(null),f=c(!1),k=c(""),g=c({}),E=c(""),w=c(null),S=c(null),P=c(null),be=["enabled","auto-active","inactive","disabled","provider-managed"],ke=y(()=>be.map(s=>({label:n(`plugins.status.${s}`),value:s}))),we=y(()=>q(o.value.map(s=>s.source))),Se=y(()=>q(o.value.map(s=>s.kind))),h=y(()=>({total:o.value.length,active:o.value.filter(s=>s.effectiveStatus==="enabled"||s.effectiveStatus==="auto-active").length,inactive:o.value.filter(s=>s.effectiveStatus==="inactive").length,disabled:o.value.filter(s=>s.effectiveStatus==="disabled").length,providerManaged:o.value.filter(s=>s.effectiveStatus==="provider-managed").length})),$=y(()=>{const s=E.value.trim().toLowerCase();return o.value.filter(i=>w.value&&i.source!==w.value||S.value&&i.kind!==S.value||P.value&&i.effectiveStatus!==P.value?!1:s?[i.key,i.name,i.description,i.path,i.source,i.kind].some(a=>String(a||"").toLowerCase().includes(s)):!0)});function q(s){return Array.from(new Set(s.filter(Boolean))).sort((i,a)=>i.localeCompare(a)).map(i=>({label:i,value:i}))}async function x(){f.value=!0,k.value="";try{(!b.activeProfileName||b.profiles.length===0)&&await b.fetchProfiles();const s=await He();o.value=s.plugins??[],B.value=s.warnings??[],p.value=s.metadata??null}catch(s){k.value=s?.message||n("plugins.loadFailed")}finally{f.value=!1}}function Pe(s){const i=`plugins.statusLabel.${s.effectiveStatus}`;return O(i)?n(i):s.effectiveStatus}function Ve(s){const i=`plugins.configStatuses.${s.configStatus}`;return O(i)?n(i):s.configStatus}function Ce(s){switch(s.effectiveStatus){case"enabled":case"auto-active":return"success";case"disabled":return"error";case"provider-managed":return"info";default:return"warning"}}function Be(s){return s.kind==="standalone"&&s.source!=="bundled"}function L(s){return s.effectiveStatus==="enabled"}async function Ee(s,i){g.value={...g.value,[s.key]:!0};try{await Ge(s.key,i),F.success(n(i?"plugins.enableSuccess":"plugins.disableSuccess",{name:s.key})),await x()}catch(a){F.error(a?.message||n("plugins.updateFailed"))}finally{const a={...g.value};delete a[s.key],g.value=a}}return xe(()=>b.activeProfileName||"default",()=>{o.value=[],B.value=[],p.value=null,x()},{immediate:!0}),(s,i)=>(u(),r("div",R,[e("header",j,[e("h2",D,l(t(n)("plugins.title")),1),v(t(U),{size:"small",quaternary:"",loading:f.value,onClick:x},{default:_(()=>[d(l(t(n)("plugins.refresh")),1)]),_:1},8,["loading"])]),e("div",{class:Fe(["plugins-content",{"is-loading":f.value&&o.value.length===0}])},[f.value&&o.value.length===0?(u(),r("div",H,[v(t(Me))])):(u(),r(M,{key:1},[v(t(z),{type:"info",bordered:!1,class:"plugins-notice"},{default:_(()=>[d(l(t(n)("plugins.notice")),1)]),_:1}),k.value?(u(),V(t(z),{key:0,type:"error",class:"plugins-notice"},{default:_(()=>[d(l(k.value),1)]),_:1})):m("",!0),(u(!0),r(M,null,A(B.value,a=>(u(),V(t(z),{key:a,type:"warning",class:"plugins-notice"},{default:_(()=>[d(l(a),1)]),_:2},1024))),128)),e("div",G,[e("div",K,[e("span",Q,l(t(n)("plugins.summary.total")),1),e("strong",null,l(h.value.total),1)]),e("div",W,[e("span",J,l(t(n)("plugins.summary.active")),1),e("strong",null,l(h.value.active),1)]),e("div",X,[e("span",Y,l(t(n)("plugins.summary.inactive")),1),e("strong",null,l(h.value.inactive),1)]),e("div",Z,[e("span",ee,l(t(n)("plugins.summary.disabled")),1),e("strong",null,l(h.value.disabled),1)]),e("div",ae,[e("span",te,l(t(n)("plugins.summary.providerManaged")),1),e("strong",null,l(h.value.providerManaged),1)])]),e("div",se,[v(t(Le),{value:E.value,"onUpdate:value":i[0]||(i[0]=a=>E.value=a),placeholder:t(n)("plugins.searchPlaceholder"),clearable:""},null,8,["value","placeholder"]),v(t(I),{value:w.value,"onUpdate:value":i[1]||(i[1]=a=>w.value=a),options:we.value,placeholder:t(n)("plugins.source"),clearable:""},null,8,["value","options","placeholder"]),v(t(I),{value:S.value,"onUpdate:value":i[2]||(i[2]=a=>S.value=a),options:Se.value,placeholder:t(n)("plugins.kind"),clearable:""},null,8,["value","options","placeholder"]),v(t(I),{value:P.value,"onUpdate:value":i[3]||(i[3]=a=>P.value=a),options:ke.value,placeholder:t(n)("plugins.statusTitle"),clearable:""},null,8,["value","options","placeholder"])]),$.value.length?(u(),r("div",le,[e("table",ne,[e("thead",null,[e("tr",null,[e("th",null,l(t(n)("plugins.table.plugin")),1),e("th",null,l(t(n)("plugins.table.status")),1),e("th",null,l(t(n)("plugins.table.source")),1),e("th",null,l(t(n)("plugins.table.kind")),1),e("th",null,l(t(n)("plugins.table.capabilities")),1),e("th",null,l(t(n)("plugins.table.path")),1),e("th",null,l(t(n)("plugins.table.manage")),1)])]),e("tbody",null,[(u(!0),r(M,null,A($.value,a=>(u(),r("tr",{key:a.key},[e("td",null,[e("div",ie,[e("strong",null,l(a.key),1),a.name!==a.key?(u(),r("span",ue,l(a.name),1)):m("",!0)]),a.description?(u(),r("div",re,l(a.description),1)):m("",!0),a.version||a.author?(u(),r("div",oe,[a.version?(u(),r("span",de,"v"+l(a.version),1)):m("",!0),a.author?(u(),r("span",ce,l(a.author),1)):m("",!0)])):m("",!0)]),e("td",null,[v(t(T),{size:"small",type:Ce(a)},{default:_(()=>[d(l(Pe(a)),1)]),_:2},1032,["type"]),e("div",ve,l(t(n)("plugins.configStatus",{status:Ve(a)})),1)]),e("td",null,[v(t(T),{size:"small",round:""},{default:_(()=>[d(l(a.source),1)]),_:2},1024)]),e("td",null,[v(t(T),{size:"small",round:""},{default:_(()=>[d(l(a.kind),1)]),_:2},1024)]),e("td",null,[e("div",_e,[e("span",null,l(t(n)("plugins.capabilities.tools",{count:a.providesTools.length})),1),e("span",null,l(t(n)("plugins.capabilities.hooks",{count:a.providesHooks.length})),1),e("span",null,l(t(n)("plugins.capabilities.env",{count:a.requiresEnv.length})),1)])]),e("td",null,[e("code",pe,l(a.path||t(n)("plugins.notAvailable")),1)]),e("td",null,[Be(a)?(u(),V(t(U),{key:0,size:"tiny",secondary:"",type:L(a)?"warning":"primary",loading:!!g.value[a.key],onClick:Xe=>Ee(a,!L(a))},{default:_(()=>[d(l(L(a)?t(n)("common.disable"):t(n)("common.enable")),1)]),_:2},1032,["type","loading","onClick"])):(u(),r("span",me,l(t(n)("plugins.managedElsewhere")),1))])]))),128))])])])):(u(),V(t(Ie),{key:2,description:t(n)("plugins.noMatch")},null,8,["description"])),p.value?(u(),r("div",fe,[e("span",null,[d(l(t(n)("plugins.metadata.agentRoot"))+": ",1),e("code",null,l(p.value.hermesAgentRoot),1)]),e("span",null,[d(l(t(n)("plugins.metadata.python"))+": ",1),e("code",null,l(p.value.pythonExecutable),1)]),e("span",null,[d(l(t(n)("plugins.metadata.scanCwd"))+": ",1),e("code",null,l(p.value.cwd),1)]),e("span",null,[d(l(t(n)("plugins.metadata.projectPlugins"))+": ",1),e("code",null,l(p.value.projectPluginsEnabled?t(n)("plugins.enabled"):t(n)("plugins.disabled")),1)])])):m("",!0)],64))],2)]))}})})),Qe=C((()=>{})),We,Je=C((()=>{ge(),ge(),Qe(),Ae(),We=Ue(ye,[["__scopeId","data-v-a0464755"]])}));Je();export{We as default};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{n as h}from"./rolldown-runtime-M0oDzQ_3.js";import{A as Ne,Bt as Ge,Hn as i,It as Be,K as H,Kt as T,Nn as Qe,O as E,Ot as x,V as D,Y as Xe,an as a,cn as $,cr as e,er as v,fn as w,g as Le,hn as F,i as Ze,in as el,jn as c,kn as ll,m as al,on as M,pn as f,pr as o,s as A,sn as I,t as q,tn as Ue,ur as O}from"./ui-vendor-DDMfmCj2.js";import{M as tl,O as N,P as ol,k as B}from"./vue-vendor-BsMpqyaC.js";import{n as L,t as U}from"./_plugin-vue_export-helper-
|
|
1
|
+
import{n as h}from"./rolldown-runtime-M0oDzQ_3.js";import{A as Ne,Bt as Ge,Hn as i,It as Be,K as H,Kt as T,Nn as Qe,O as E,Ot as x,V as D,Y as Xe,an as a,cn as $,cr as e,er as v,fn as w,g as Le,hn as F,i as Ze,in as el,jn as c,kn as ll,m as al,on as M,pn as f,pr as o,s as A,sn as I,t as q,tn as Ue,ur as O}from"./ui-vendor-DDMfmCj2.js";import{M as tl,O as N,P as ol,k as B}from"./vue-vendor-BsMpqyaC.js";import{n as L,t as U}from"./_plugin-vue_export-helper-CvnFozKy.js";import{Dt as j,Et as R,Tt as il,wt as sl}from"./index-B2IKGvbR.js";var K,J,W,G,Q,X,Z,ee,le,ae,te,oe,ie,se,ne,re,ue,de,fe,_e,pe,ce,ve,me,he,je,ge=h((()=>{T(),tl(),q(),R(),N(),il(),K={class:"card-header"},J={class:"profile-title"},W={class:"profile-name"},G={class:"card-body"},Q={class:"info-row"},X={class:"info-label"},Z={class:"info-value mono"},ee={class:"toggle-text"},le={key:0,class:"card-detail"},ae={class:"info-row"},te={class:"info-label"},oe={class:"info-value"},ie={class:"info-row"},se={class:"info-label"},ne={class:"info-value mono detail-path"},re={class:"info-row"},ue={class:"info-label"},de={class:"info-value"},fe={class:"info-row"},_e={class:"info-label"},pe={class:"info-value"},ce={class:"info-row"},ve={class:"info-label"},me={class:"info-value"},he={class:"card-actions"},je=F({__name:"ProfileCard",props:{profile:{}},setup(C,{emit:b}){const d=C,{t:l}=B(),n=j(),r=D(),m=Xe(),g=ol(),u=v(!1),p=v(!1),s=v(!1),P=v(!1),k=v(null),S=el(()=>d.profile.name==="default");async function _(){if(u.value){u.value=!1;return}u.value=!0,p.value=!0;try{k.value=await n.fetchProfileDetail(d.profile.name)}finally{p.value=!1}}async function t(){m.warning({title:l("profiles.switchTo"),content:l("profiles.switchConfirm",{name:d.profile.name}),positiveText:l("profiles.switchTo"),negativeText:l("common.cancel"),onPositiveClick:y})}async function y(){P.value=!0;try{await n.switchHermesProfile(d.profile.name)?(r.success(l("profiles.switchSuccess",{name:d.profile.name})),setTimeout(()=>window.location.reload(),500)):r.error(l("profiles.switchFailed"))}finally{P.value=!1}}function z(){m.warning({title:l("profiles.delete"),content:l("profiles.deleteConfirm",{name:d.profile.name}),positiveText:l("common.delete"),negativeText:l("common.cancel"),onPositiveClick:async()=>{await n.deleteProfile(d.profile.name)?r.success(l("profiles.deleteSuccess")):r.error(l("profiles.deleteFailed"))}})}async function V(){s.value=!0;try{await n.exportProfile(d.profile.name)?r.success(l("profiles.exportSuccess")):r.error(l("profiles.exportFailed"))}finally{s.value=!1}}function We(){g.push({name:"hermes.files",query:{profile:d.profile.name,file:"config.yaml"}})}return(Pl,Y)=>(c(),$("div",{class:O(["profile-card",{active:C.profile.active}])},[a("div",K,[a("div",J,[f(sl,{name:C.profile.name,avatar:C.profile.avatar,size:28},null,8,["name","avatar"]),a("h3",W,o(C.profile.name),1)]),C.profile.active?(c(),M(e(Ge),{key:0,size:"tiny",type:"success",bordered:!1},{default:i(()=>[w(o(e(l)("profiles.active")),1)]),_:1})):I("",!0)]),a("div",G,[a("div",Q,[a("span",X,o(e(l)("profiles.model")),1),a("code",Z,o(C.profile.model),1)])]),a("div",{class:"card-detail-toggle",onClick:_},[(c(),$("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:O(["toggle-icon",{expanded:u.value}])},[...Y[0]||(Y[0]=[a("polyline",{points:"6 9 12 15 18 9"},null,-1)])],2)),a("span",ee,o(u.value?e(l)("common.collapse"):e(l)("common.expand")),1)]),u.value?(c(),$("div",le,[f(e(Le),{show:p.value,size:"small"},{default:i(()=>[k.value?(c(),$(Ue,{key:0},[a("div",ae,[a("span",te,o(e(l)("profiles.provider")),1),a("span",oe,o(k.value.provider),1)]),a("div",ie,[a("span",se,o(e(l)("profiles.path")),1),a("code",ne,o(k.value.path),1)]),a("div",re,[a("span",ue,o(e(l)("profiles.skills")),1),a("span",de,o(k.value.skills),1)]),a("div",fe,[a("span",_e,o(e(l)("profiles.hasEnv")),1),a("span",pe,o(k.value.hasEnv?"Yes":"No"),1)]),a("div",ce,[a("span",ve,o(e(l)("profiles.hasSoulMd")),1),a("span",me,o(k.value.hasSoulMd?"Yes":"No"),1)])],64)):I("",!0)]),_:1},8,["show"])])):I("",!0),a("div",he,[f(e(x),{size:"tiny",quaternary:"",onClick:We},{default:i(()=>[w(o(e(l)("profiles.editConfig")),1)]),_:1}),C.profile.active?I("",!0):(c(),M(e(x),{key:0,size:"tiny",loading:P.value,quaternary:"",type:"primary",onClick:t},{default:i(()=>[w(o(e(l)("profiles.switchTo")),1)]),_:1},8,["loading"])),f(e(x),{size:"tiny",quaternary:"",type:"error",disabled:S.value||C.profile.active,onClick:z},{default:i(()=>[w(o(e(l)("common.delete")),1)]),_:1},8,["disabled"]),f(e(x),{size:"tiny",quaternary:"",loading:s.value,onClick:V},{default:i(()=>[w(o(e(l)("profiles.export")),1)]),_:1},8,["loading"])])],2))}})})),nl=h((()=>{})),Re,rl=h((()=>{ge(),ge(),nl(),L(),Re=U(je,[["__scopeId","data-v-1154c02b"]])})),ye,we,qe,Pe=h((()=>{T(),rl(),R(),N(),ye={key:0,class:"empty-state"},we={key:1,class:"profiles-grid"},qe=F({__name:"ProfilesPanel",emits:["rename"],setup(C){const{t:b}=B(),d=j();return(l,n)=>e(d).profiles.length===0?(c(),$("div",ye,[n[1]||(n[1]=a("svg",{width:"48",height:"48",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1",class:"empty-icon"},[a("path",{d:"M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"}),a("circle",{cx:"12",cy:"7",r:"4"})],-1)),a("p",null,o(e(b)("profiles.noProfiles")),1)])):(c(),$("div",we,[(c(!0),$(Ue,null,Qe(e(d).profiles,r=>(c(),M(Re,{key:r.name,profile:r,onRename:n[0]||(n[0]=m=>l.$emit("rename",m))},null,8,["profile"]))),128))]))}})})),ul=h((()=>{})),De,dl=h((()=>{Pe(),Pe(),ul(),L(),De=U(qe,[["__scopeId","data-v-51e73d5a"]])})),Ce,Ee,ke=h((()=>{T(),q(),R(),N(),Ce={class:"modal-footer"},Ee=F({__name:"ProfileCreateModal",emits:["close","saved"],setup(C,{emit:b}){const d=b,{t:l}=B(),n=j(),r=D(),m=v(!0),g=v(!1),u=v(""),p=v(!1),s=v("");function P(_){const t=_.toLowerCase().replace(/[^a-z0-9_-]/g,"");t!==_?s.value=l("profiles.nameValidation"):s.value="",u.value=t}async function k(){if(!u.value){r.warning(l("profiles.namePlaceholder"));return}if(!/^[a-z0-9_-]+$/.test(u.value)){r.error(l("profiles.nameValidation"));return}g.value=!0;try{const _=await n.createProfile(u.value.trim(),p.value);if(_.success){const t=_.strippedCredentials??[],y=_.disabledPlatforms??[],z=_.strippedConfigCredentials??[];if(p.value&&(t.length>0||y.length>0||z.length>0)){const V=[];t.length>0&&V.push(l("profiles.cloneStrippedCredentials",{count:t.length,list:t.join(", ")})),y.length>0&&V.push(l("profiles.cloneDisabledPlatforms",{count:y.length,list:y.join(", ")})),z.length>0&&V.push(l("profiles.cloneStrippedConfigCredentials",{count:z.length,list:z.join(", ")})),r.info(`${l("profiles.createSuccess",{name:u.value.trim()})}
|
|
2
2
|
${V.join(`
|
|
3
3
|
`)}`,{duration:6e3})}else r.success(l("profiles.createSuccess",{name:u.value.trim()}));d("saved")}else{const t=_.error||l("profiles.createFailed");r.error(t)}}finally{g.value=!1}}function S(){m.value=!1,setTimeout(()=>d("close"),200)}return(_,t)=>(c(),M(e(H),{show:m.value,"onUpdate:show":t[2]||(t[2]=y=>m.value=y),preset:"card",title:e(l)("profiles.create"),style:{width:"min(420px, calc(100vw - 32px))"},"mask-closable":!g.value,onAfterLeave:t[3]||(t[3]=y=>d("close"))},{footer:i(()=>[a("div",Ce,[f(e(x),{onClick:S},{default:i(()=>[w(o(e(l)("common.cancel")),1)]),_:1}),f(e(x),{type:"primary",loading:g.value,onClick:k},{default:i(()=>[w(o(e(l)("common.create")),1)]),_:1},8,["loading"])])]),default:i(()=>[f(e(Ne),{"label-placement":"top"},{default:i(()=>[f(e(E),{label:e(l)("profiles.name"),required:""},{default:i(()=>[f(e(Be),{value:u.value,"onUpdate:value":t[0]||(t[0]=y=>u.value=y),placeholder:e(l)("profiles.namePlaceholder"),onInput:P},null,8,["value","placeholder"])]),_:1},8,["label"]),s.value?(c(),M(e(A),{key:0,depth:"3",type:"warning",style:{"font-size":"12px"}},{default:i(()=>[w(o(s.value),1)]),_:1})):I("",!0),f(e(E),{label:e(l)("profiles.cloneFromCurrent")},{default:i(()=>[f(e(al),{value:p.value,"onUpdate:value":t[1]||(t[1]=y=>p.value=y)},null,8,["value"])]),_:1},8,["label"]),p.value?(c(),M(e(A),{key:1,depth:"3",style:{"font-size":"12px"}},{default:i(()=>[w(o(e(l)("profiles.cloneCleanupNotice")),1)]),_:1})):I("",!0)]),_:1})]),_:1},8,["show","title","mask-closable"]))}})})),fl=h((()=>{})),_l=h((()=>{})),Ae,pl=h((()=>{ke(),ke(),fl(),_l(),L(),Ae=U(Ee,[["__scopeId","data-v-06cc88f3"]])})),xe,He,be=h((()=>{T(),q(),R(),N(),xe={class:"modal-footer"},He=F({__name:"ProfileRenameModal",props:{profileName:{}},emits:["close","saved"],setup(C,{emit:b}){const d=C,l=b,{t:n}=B(),r=j(),m=D(),g=v(!0),u=v(!1),p=v(""),s=v("");function P(_){const t=_.toLowerCase().replace(/[^a-z0-9_-]/g,"");t!==_?s.value=n("profiles.nameValidation"):s.value="",p.value=t}async function k(){if(!p.value){m.warning(n("profiles.newNamePlaceholder"));return}if(!/^[a-z0-9_-]+$/.test(p.value)){m.error(n("profiles.nameValidation"));return}u.value=!0;try{await r.renameProfile(d.profileName,p.value.trim())?(m.success(n("profiles.renameSuccess")),l("saved")):m.error(n("profiles.renameFailed"))}finally{u.value=!1}}function S(){g.value=!1,setTimeout(()=>l("close"),200)}return(_,t)=>(c(),M(e(H),{show:g.value,"onUpdate:show":t[1]||(t[1]=y=>g.value=y),preset:"card",title:e(n)("profiles.rename"),style:{width:"min(420px, calc(100vw - 32px))"},"mask-closable":!u.value,onAfterLeave:t[2]||(t[2]=y=>l("close"))},{footer:i(()=>[a("div",xe,[f(e(x),{onClick:S},{default:i(()=>[w(o(e(n)("common.cancel")),1)]),_:1}),f(e(x),{type:"primary",loading:u.value,onClick:k},{default:i(()=>[w(o(e(n)("common.confirm")),1)]),_:1},8,["loading"])])]),default:i(()=>[f(e(Ne),{"label-placement":"top"},{default:i(()=>[f(e(E),{label:e(n)("profiles.newName"),required:""},{default:i(()=>[f(e(Be),{value:p.value,"onUpdate:value":t[0]||(t[0]=y=>p.value=y),placeholder:e(n)("profiles.newNamePlaceholder"),onInput:P},null,8,["value","placeholder"])]),_:1},8,["label"]),s.value?(c(),M(e(A),{key:0,depth:"3",type:"warning",style:{"font-size":"12px"}},{default:i(()=>[w(o(s.value),1)]),_:1})):I("",!0)]),_:1})]),_:1},8,["show","title","mask-closable"]))}})})),cl=h((()=>{})),Ye,vl=h((()=>{be(),be(),cl(),L(),Ye=U(He,[["__scopeId","data-v-740612c1"]])})),Me,Oe,Se=h((()=>{T(),q(),R(),N(),Me={class:"modal-footer"},Oe=F({__name:"ProfileImportModal",emits:["close","saved"],setup(C,{emit:b}){const d=b,{t:l}=B(),n=j(),r=D(),m=v(!0),g=v(!1),u=v([]),p=[".tar.gz",".tgz",".gz",".zip"];function s({file:S}){const _=S.name?.toLowerCase()||"";return p.some(t=>_.endsWith(t))?!0:(r.warning(l("profiles.importInvalidFile")),!1)}async function P(){if(!u.value.length){r.warning(l("profiles.importSelectFile"));return}g.value=!0;try{const S=u.value[0].file;if(!S){r.error(l("profiles.importFailed"));return}await n.importProfile(S)?(r.success(l("profiles.importSuccess")),d("saved")):r.error(l("profiles.importFailed"))}finally{g.value=!1}}function k(){m.value=!1,setTimeout(()=>d("close"),200)}return(S,_)=>(c(),M(e(H),{show:m.value,"onUpdate:show":_[1]||(_[1]=t=>m.value=t),preset:"card",title:e(l)("profiles.import"),style:{width:"min(420px, calc(100vw - 32px))"},"mask-closable":!g.value,onAfterLeave:_[2]||(_[2]=t=>d("close"))},{footer:i(()=>[a("div",Me,[f(e(x),{onClick:k},{default:i(()=>[w(o(e(l)("common.cancel")),1)]),_:1}),f(e(x),{type:"primary",loading:g.value,disabled:!u.value.length,onClick:P},{default:i(()=>[w(o(e(l)("common.confirm")),1)]),_:1},8,["loading","disabled"])])]),default:i(()=>[f(e(Ze),{"file-list":u.value,"onUpdate:fileList":_[0]||(_[0]=t=>u.value=t),max:1,accept:p.join(","),disabled:g.value,onBeforeUpload:s},{default:i(()=>[f(e(x),null,{default:i(()=>[w(o(e(l)("profiles.importSelectFile")),1)]),_:1})]),_:1},8,["file-list","accept","disabled"])]),_:1},8,["show","title","mask-closable"]))}})})),ml=h((()=>{})),Ke,hl=h((()=>{Se(),Se(),ml(),L(),Ke=U(Oe,[["__scopeId","data-v-accddacf"]])})),Ie,$e,ze,Ve,Te,Je,Fe=h((()=>{T(),q(),N(),dl(),pl(),vl(),hl(),R(),Ie={class:"profiles-view"},$e={class:"page-header"},ze={class:"header-title"},Ve={class:"header-actions"},Te={class:"profiles-content"},Je=F({__name:"ProfilesView",setup(C){const{t:b}=B(),d=j(),l=v(!1),n=v(!1),r=v(null);ll(()=>{d.fetchHermesProfiles()});function m(){l.value=!1}function g(){r.value=null}function u(){n.value=!1}return(p,s)=>(c(),$("div",Ie,[a("header",$e,[a("h2",ze,o(e(b)("profiles.title")),1),a("div",Ve,[f(e(x),{size:"small",onClick:s[0]||(s[0]=P=>n.value=!0)},{icon:i(()=>[...s[6]||(s[6]=[a("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[a("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),a("polyline",{points:"17 8 12 3 7 8"}),a("line",{x1:"12",y1:"3",x2:"12",y2:"15"})],-1)])]),default:i(()=>[w(" "+o(e(b)("profiles.import")),1)]),_:1}),f(e(x),{type:"primary",size:"small",onClick:s[1]||(s[1]=P=>l.value=!0)},{icon:i(()=>[...s[7]||(s[7]=[a("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[a("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),a("line",{x1:"5",y1:"12",x2:"19",y2:"12"})],-1)])]),default:i(()=>[w(" "+o(e(b)("profiles.create")),1)]),_:1})])]),a("div",Te,[f(e(Le),{show:e(d).loading&&e(d).profiles.length===0},{default:i(()=>[f(De,{onRename:s[2]||(s[2]=P=>r.value=P)})]),_:1},8,["show"])]),l.value?(c(),M(Ae,{key:0,onClose:s[3]||(s[3]=P=>l.value=!1),onSaved:m})):I("",!0),r.value?(c(),M(Ye,{key:1,"profile-name":r.value,onClose:s[4]||(s[4]=P=>r.value=null),onSaved:g},null,8,["profile-name"])):I("",!0),n.value?(c(),M(Ke,{key:2,onClose:s[5]||(s[5]=P=>n.value=!1),onSaved:u})):I("",!0)]))}})})),gl=h((()=>{})),yl,wl=h((()=>{Fe(),Fe(),gl(),L(),yl=U(Je,[["__scopeId","data-v-4b884a5a"]])}));wl();export{yl as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as _}from"./rolldown-runtime-M0oDzQ_3.js";import{Kt as v,Pn as g,an as t,cn as n,hn as m,jn as i,pr as s,sn as h}from"./ui-vendor-DDMfmCj2.js";import{n as b,t as f}from"./_plugin-vue_export-helper-
|
|
1
|
+
import{n as _}from"./rolldown-runtime-M0oDzQ_3.js";import{Kt as v,Pn as g,an as t,cn as n,hn as m,jn as i,pr as s,sn as h}from"./ui-vendor-DDMfmCj2.js";import{n as b,t as f}from"./_plugin-vue_export-helper-CvnFozKy.js";var a,r,o,l,u,p,d=_((()=>{v(),a={class:"setting-row"},r={class:"setting-info"},o={class:"setting-label"},l={key:0,class:"setting-hint"},u={class:"setting-control"},p=m({__name:"SettingRow",props:{label:{},hint:{}},setup(e){return(c,y)=>(i(),n("div",a,[t("div",r,[t("label",o,s(e.label),1),e.hint?(i(),n("p",l,s(e.hint),1)):h("",!0)]),t("div",u,[g(c.$slots,"default",{},void 0,!0)])]))}})})),S=_((()=>{})),w,N=_((()=>{d(),d(),S(),b(),w=f(p,[["__scopeId","data-v-b81640b4"]])}));export{N as n,w as t};
|
package/dist/client/assets/js/{SettingsCircuitBadge-CFo2KqP-.js → SettingsCircuitBadge-Eiv8LQz0.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as l}from"./rolldown-runtime-M0oDzQ_3.js";import{Hn as n,Kt as V,an as e,cn as d,cr as r,en as X,fn as u,hn as j,in as v,jn as p,on as $,ot as h,pn as g,pr as o,sn as F,t as H,ur as b}from"./ui-vendor-DDMfmCj2.js";import{M as J,O as Q,P as U,k as Y}from"./vue-vendor-BsMpqyaC.js";import{n as I,t as L}from"./_plugin-vue_export-helper-
|
|
1
|
+
import{n as l}from"./rolldown-runtime-M0oDzQ_3.js";import{Hn as n,Kt as V,an as e,cn as d,cr as r,en as X,fn as u,hn as j,in as v,jn as p,on as $,ot as h,pn as g,pr as o,sn as F,t as H,ur as b}from"./ui-vendor-DDMfmCj2.js";import{M as J,O as Q,P as U,k as Y}from"./vue-vendor-BsMpqyaC.js";import{n as I,t as L}from"./_plugin-vue_export-helper-CvnFozKy.js";import{C as Z,w as ee}from"./index-B2IKGvbR.js";var m,w,k,x,C,M,B,S,T,N=l((()=>{V(),H(),Q(),J(),Z(),m={class:"page-sidebar-nav"},w={class:"page-sidebar-tabs",role:"tablist","aria-label":"Chat actions"},k={key:0,width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"},x={key:1,width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"},C={key:0,class:"conversation-switch conversation-switch--three",role:"tablist","aria-label":"Conversation type"},M=["aria-label","aria-selected"],B=["aria-label","aria-selected"],S=["aria-label","aria-selected"],T=j({__name:"PageSidebarNav",props:{active:{},primaryLabel:{},hideModeSwitch:{type:Boolean}},emits:["primary"],setup(a,{emit:_}){const i=a,R=_,{t:s}=Y(),c=U(),{openSessionSearch:y}=ee(),A=v(()=>i.primaryLabel||s("chat.newChat")),q=v(()=>!i.hideModeSwitch),D=v(()=>i.active==="history"?s("chat.sessions"):s("sidebar.history"));function E(){i.active!=="chat"&&c.push({name:"hermes.chat"})}function G(){if(i.active==="history"){c.push({name:"hermes.chat"});return}c.push({name:"hermes.history"})}function K(){i.active!=="group"&&c.push({name:"hermes.groupChat"})}function O(){i.active!=="workflow"&&c.push({name:"hermes.workflow"})}function W(){typeof window>"u"||window.open("https://apikey.fun/register?aff=LIBAPI","_blank","noopener,noreferrer")}return(se,t)=>(p(),d("div",m,[e("div",w,[e("button",{class:"page-sidebar-tab",type:"button",onClick:t[0]||(t[0]=f=>R("primary"))},[t[2]||(t[2]=e("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),e("line",{x1:"5",y1:"12",x2:"19",y2:"12"})],-1)),e("span",null,o(A.value),1)]),e("button",{class:"page-sidebar-tab",type:"button",onClick:t[1]||(t[1]=(...f)=>r(y)&&r(y)(...f))},[t[3]||(t[3]=e("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8"},[e("circle",{cx:"11",cy:"11",r:"7"}),e("path",{d:"m20 20-3.5-3.5"})],-1)),e("span",null,o(r(s)("sidebar.search")),1)]),e("button",{class:"page-sidebar-tab",type:"button",onClick:G},[a.active==="history"?(p(),d("svg",k,[...t[4]||(t[4]=[e("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"},null,-1)])])):(p(),d("svg",x,[...t[5]||(t[5]=[e("circle",{cx:"12",cy:"12",r:"9"},null,-1),e("path",{d:"M12 7v5l3 2"},null,-1)])])),e("span",null,o(D.value),1)]),e("button",{class:"page-sidebar-tab",type:"button",onClick:W},[t[6]||(t[6]=e("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8"},[e("path",{d:"M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6"}),e("polyline",{points:"15 3 21 3 21 9"}),e("line",{x1:"10",y1:"14",x2:"21",y2:"3"})],-1)),e("span",null,o(r(s)("sidebar.apiRelay")),1)])]),q.value?(p(),d("div",C,[g(r(h),{trigger:"hover",placement:"top"},{trigger:n(()=>[e("button",{class:b(["conversation-switch-tab",{active:a.active==="chat"||a.active==="history"}]),type:"button",role:"tab","aria-label":r(s)("sidebar.singleChat"),"aria-selected":a.active==="chat"||a.active==="history",onClick:E},[...t[7]||(t[7]=[e("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[e("path",{d:"M21 15a2 2 0 0 1-2 2H8l-5 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})],-1)])],10,M)]),default:n(()=>[u(" "+o(r(s)("sidebar.singleChat")),1)]),_:1}),g(r(h),{trigger:"hover",placement:"top"},{trigger:n(()=>[e("button",{class:b(["conversation-switch-tab",{active:a.active==="group"}]),type:"button",role:"tab","aria-label":r(s)("sidebar.groupChat"),"aria-selected":a.active==="group",onClick:K},[...t[8]||(t[8]=[e("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[e("path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"}),e("circle",{cx:"9",cy:"7",r:"4"}),e("path",{d:"M22 21v-2a4 4 0 0 0-3-3.87"}),e("path",{d:"M16 3.13a4 4 0 0 1 0 7.75"})],-1)])],10,B)]),default:n(()=>[u(" "+o(r(s)("sidebar.groupChat")),1)]),_:1}),g(r(h),{trigger:"hover",placement:"top"},{trigger:n(()=>[e("button",{class:b(["conversation-switch-tab",{active:a.active==="workflow"}]),type:"button",role:"tab","aria-label":r(s)("sidebar.workflow"),"aria-selected":a.active==="workflow",onClick:O},[...t[9]||(t[9]=[e("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[e("circle",{cx:"5",cy:"12",r:"3"}),e("circle",{cx:"19",cy:"6",r:"3"}),e("circle",{cx:"19",cy:"18",r:"3"}),e("path",{d:"M8 12h3a4 4 0 0 0 4-4V6"}),e("path",{d:"M8 12h3a4 4 0 0 1 4 4v2"})],-1)])],10,S)]),default:n(()=>[u(" "+o(r(s)("sidebar.workflow")),1)]),_:1})])):F("",!0)]))}})})),te=l((()=>{})),ie,be=l((()=>{N(),N(),te(),I(),ie=L(T,[["__scopeId","data-v-5516bbcf"]])})),z,P=l((()=>{V(),H(),z=j({__name:"SettingsCircuitBadge",setup(a){return(_,i)=>(p(),$(r(h),{trigger:"hover",placement:"top"},{trigger:n(()=>[e("a",{class:"settings-circuit-link",href:"https://hermes-studio.ai/docs/hermes-esp32-intro/index.html",target:"_blank",rel:"noopener noreferrer","aria-label":"小方盒",onClick:i[0]||(i[0]=X(()=>{},["stop"]))},[...i[1]||(i[1]=[e("svg",{class:"settings-circuit-badge settings-circuit-badge--pcb",viewBox:"0 0 36 22",fill:"none","aria-hidden":"true"},[e("rect",{class:"settings-pcb-board",x:"3",y:"3",width:"30",height:"16",rx:"3"}),e("path",{class:"settings-pcb-copper",d:"M7 7h6v4h7v-3h9"}),e("path",{class:"settings-pcb-copper",d:"M7 15h5v-3h5v4h12"}),e("path",{class:"settings-pcb-copper",d:"M12 7v-2h8"}),e("path",{class:"settings-pcb-copper",d:"M24 15v2h5"}),e("path",{class:"settings-pcb-current settings-pcb-current-main",d:"M7 7h6v4h7v-3h9"}),e("path",{class:"settings-pcb-current settings-pcb-current-main settings-pcb-current-late",d:"M7 15h5v-3h5v4h12"}),e("path",{class:"settings-pcb-current settings-pcb-current-branch",d:"M12 7v-2h8"}),e("path",{class:"settings-pcb-current settings-pcb-current-branch settings-pcb-current-late",d:"M24 15v2h5"}),e("circle",{class:"settings-pcb-pad settings-pcb-pad-live",cx:"7",cy:"7",r:"1.2"}),e("circle",{class:"settings-pcb-pad",cx:"13",cy:"11",r:"1"}),e("circle",{class:"settings-pcb-pad settings-pcb-pad-live",cx:"20",cy:"11",r:"1.2"}),e("circle",{class:"settings-pcb-pad",cx:"29",cy:"8",r:"1"}),e("circle",{class:"settings-pcb-pad settings-pcb-pad-live settings-pcb-pad-late",cx:"17",cy:"12",r:"1.2"}),e("circle",{class:"settings-pcb-pad",cx:"29",cy:"15",r:"1"}),e("circle",{class:"settings-pcb-via",cx:"20",cy:"5",r:"0.8"}),e("circle",{class:"settings-pcb-via",cx:"29",cy:"17",r:"0.8"})],-1)])])]),default:n(()=>[i[2]||(i[2]=u(" 小方盒 ",-1))]),_:1}))}})})),re=l((()=>{})),ae,_e=l((()=>{P(),P(),re(),I(),ae=L(z,[["__scopeId","data-v-d0fa829f"]])}));export{be as i,_e as n,ie as r,ae as t};
|