hermes-web-ui 0.2.7 → 0.2.8
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/README.md +2 -2
- package/bin/hermes-web-ui.mjs +50 -13
- package/dist/client/assets/{Button-zECKCotA.js → Button-Cxh6x3Um.js} +1 -1
- package/dist/client/assets/ChannelsView-CQJ1fX8O.js +1 -0
- package/dist/client/assets/{ChannelsView-xCdAEZam.css → ChannelsView-D168bwSq.css} +1 -1
- package/dist/client/assets/{ChatView-CJZahJ1V.js → ChatView-nxyDDB73.js} +5 -5
- package/dist/client/assets/{Close-DjLWDodG.js → Close-hb0eNgAb.js} +1 -1
- package/dist/client/assets/{FormItem-CZ9auYA2.js → FormItem-dHtHjgtl.js} +3 -3
- package/dist/client/assets/{Input-DxJk6pT-.js → Input-CZZ9TfBw.js} +1 -1
- package/dist/client/assets/{InputNumber-BTqp81h0.js → InputNumber-qFTlSmmT.js} +1 -1
- package/dist/client/assets/{JobsView-DsfGyjnT.js → JobsView-rFyONi-b.js} +2 -2
- package/dist/client/assets/{LoginView-BiWaCYS0.js → LoginView-C6C3nX0Y.js} +1 -1
- package/dist/client/assets/{LogsView-DuORyFFY.js → LogsView-CO8aslfu.js} +1 -1
- package/dist/client/assets/{MarkdownRenderer-BA3oPVqT.js → MarkdownRenderer-Cy_O_tQS.js} +1 -1
- package/dist/client/assets/MemoryView-DZjJTdI6.js +7 -0
- package/dist/client/assets/MemoryView-hIfyUkwz.css +1 -0
- package/dist/client/assets/{Modal-WQKdvHJY.js → Modal-BLinjj9c.js} +6 -6
- package/dist/client/assets/ModelsView-CvHz1aiJ.js +1 -0
- package/dist/client/assets/Popconfirm-JTALkPda.js +16 -0
- package/dist/client/assets/Popover-0__1CUa3.js +117 -0
- package/dist/client/assets/ProfilesView-Dv1-Qa9-.js +1 -0
- package/dist/client/assets/ProfilesView-oIk8yBVG.css +1 -0
- package/dist/client/assets/{Scrollbar-Bg2FeTtI.js → Scrollbar-BHJ682ve.js} +1 -1
- package/dist/client/assets/Select-DqPBeTT3.js +340 -0
- package/dist/client/assets/{SettingRow-CLLFxWP3.js → SettingRow-pvADoOth.js} +1 -1
- package/dist/client/assets/SettingsView-Y522req-.js +352 -0
- package/dist/client/assets/{SkillsView-D6CegW4w.js → SkillsView-Bl8tqv9V.js} +1 -1
- package/dist/client/assets/{Spin-lybeIDeX.js → Spin-BbaC-FmW.js} +1 -1
- package/dist/client/assets/{Suffix-Dv1UElLH.js → Suffix-yRSbGVfA.js} +1 -1
- package/dist/client/assets/{Switch-mgeu-lpD.js → Switch-Svs0Rnhi.js} +1 -1
- package/dist/client/assets/{Tag-DWc4lbAm.js → Tag-DdwPhG9T.js} +1 -1
- package/dist/client/assets/{TerminalView-DmnXOHFu.js → TerminalView-XDDNp69h.js} +1 -1
- package/dist/client/assets/{Tooltip-DrDTmrj3.js → Tooltip-CHbB9ntH.js} +1 -1
- package/dist/client/assets/{UsageView-C3O6-vbW.js → UsageView-xqsO8W9W.js} +1 -1
- package/dist/client/assets/{Warning-t1i_4T5i.js → Warning-Srffo82k.js} +1 -1
- package/dist/client/assets/{_plugin-vue_export-helper-BkT4A29V.js → _plugin-vue_export-helper-TyZ5GTTn.js} +1 -1
- package/dist/client/assets/app-CpUVwd9n.js +1 -0
- package/dist/client/assets/app-DTyari-k.js +1 -0
- package/dist/client/assets/{browser-DzAOCZtm.js → browser-DbKCW2k6.js} +1 -1
- package/dist/client/assets/{chat-CX1Hza8X.js → chat-BmXwfHmM.js} +2 -2
- package/dist/client/assets/composables-BoU_Wud6.js +1 -0
- package/dist/client/assets/create-5zWq3BEB.js +1 -0
- package/dist/client/assets/fade-in-scale-up.cssr-CiZdBCR3.js +1 -0
- package/dist/client/assets/get-DUDt1SRf.js +1 -0
- package/dist/client/assets/index-BT19Bivl.css +1 -0
- package/dist/client/assets/index-WIPEA9ik.js +306 -0
- package/dist/client/assets/{jobs-B9NHIxuL.js → jobs-DxRPm5Sf.js} +1 -1
- package/dist/client/assets/{pinia-bPUFQqFK.js → pinia-BTE-WqCz.js} +1 -1
- package/dist/client/assets/profiles-C9UmdPLd.js +1 -0
- package/dist/client/assets/{router-COwpqexM.js → router-mPoLLYeq.js} +2 -2
- package/dist/client/assets/{sessions-B1SPfe-R.js → sessions-Bv5JsX3U.js} +1 -1
- package/dist/client/assets/{skills-CRtljpt6.js → skills-CXFhBwRj.js} +1 -1
- package/dist/client/assets/use-compitable-aofta5ri.js +1 -0
- package/dist/client/assets/use-message-B3svE98N.js +1 -0
- package/dist/client/index.html +25 -22
- package/dist/server/data/.token +1 -0
- package/dist/server/index.js +70 -4
- package/dist/server/routes/hermes/config.js +11 -11
- package/dist/server/routes/hermes/filesystem.js +154 -29
- package/dist/server/routes/hermes/profiles.js +84 -9
- package/dist/server/routes/hermes/terminal.js +12 -34
- package/dist/server/routes/hermes/weixin.js +6 -6
- package/dist/server/services/hermes-cli.d.ts +4 -0
- package/dist/server/services/hermes-cli.js +17 -0
- package/dist/server/services/hermes-profile.d.ts +22 -0
- package/dist/server/services/hermes-profile.js +60 -0
- package/dist/server/shared/providers.js +8 -14
- package/package.json +1 -1
- package/dist/client/assets/ChannelsView-Bvh3tnio.js +0 -1
- package/dist/client/assets/MemoryView-CU3JHweh.css +0 -1
- package/dist/client/assets/MemoryView-VgQFNMsP.js +0 -5
- package/dist/client/assets/ModelsView-QDRloKd5.js +0 -1
- package/dist/client/assets/Popconfirm-02A7vL_z.js +0 -16
- package/dist/client/assets/Popover-2C1zuptC.js +0 -117
- package/dist/client/assets/Select-C_hKaXgI.js +0 -340
- package/dist/client/assets/SettingsView-CeScqhwO.js +0 -352
- package/dist/client/assets/app-BUjbfMSg.js +0 -1
- package/dist/client/assets/app-p59ZckFN.js +0 -1
- package/dist/client/assets/context-BM8ZQCOz.js +0 -1
- package/dist/client/assets/fade-in-scale-up.cssr-DQl-Z54c.js +0 -1
- package/dist/client/assets/index-95z-iQoj.js +0 -306
- package/dist/client/assets/index-C33O1KZm.css +0 -1
- package/dist/client/assets/use-compitable-BnlNjEug.js +0 -1
- package/dist/client/assets/use-message-g8F4Z57w.js +0 -1
- /package/dist/client/assets/{omit-C4dR5R2G.js → omit-DKSz8IbY.js} +0 -0
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
import{A as e,C as t,D as n,E as r,F as i,G as a,K as o,N as s,O as c,Q as l,R as u,T as d,U as f,W as p,X as m,Y as h,Z as g,b as _,c as v,ct as y,d as b,gt as x,it as S,j as C,l as w,mt as T,ot as E,p as D,pt as O,t as k,w as A,y as j}from"./router-mPoLLYeq.js";import{t as ee}from"./pinia-BTE-WqCz.js";import{n as te,r as M,t as N}from"./_plugin-vue_export-helper-TyZ5GTTn.js";import"./logo-Cd-t_oGE.js";import{B as P,Q as ne,V as re,Y as ie,a as ae,at as F,c as I,ct as L,d as oe,dt as R,et as se,f as ce,ht as le,lt as z,n as ue,o as de,ot as B,r as fe,s as pe,u as me,z as he}from"./browser-DbKCW2k6.js";import{o as ge,r as _e,t as ve,v as ye}from"./Scrollbar-BHJ682ve.js";import{o as be,w as V}from"./get-DUDt1SRf.js";import{a as xe,c as H,d as Se,f as Ce,i as we,l as U,n as Te,o as Ee,r as De,s as Oe,t as ke,u as Ae}from"./Modal-BLinjj9c.js";import{t as W}from"./Select-DqPBeTT3.js";import{i as je}from"./Button-Cxh6x3Um.js";import{n as G}from"./fade-in-scale-up.cssr-CiZdBCR3.js";import{n as Me,t as Ne}from"./Warning-Srffo82k.js";import{t as K}from"./omit-DKSz8IbY.js";import{t as Pe}from"./Close-hb0eNgAb.js";import{n as Fe,r as Ie,t as Le}from"./use-message-B3svE98N.js";import{t as q}from"./app-DTyari-k.js";import{t as Re}from"./profiles-C9UmdPLd.js";import{t as ze}from"./chat-BmXwfHmM.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var Be={login:{title:`Hermes Web UI`,description:`Enter your access token to continue. Find it in the server startup logs.`,placeholder:`Access token`,submit:`Login`,tokenRequired:`Please enter your access token`,invalidToken:`Invalid token`,connectionFailed:`Cannot connect to server`},common:{loading:`Loading...`,cancel:`Cancel`,delete:`Delete`,edit:`Edit`,save:`Save`,saved:`Saved`,update:`Update`,create:`Create`,saveFailed:`Save failed`,ok:`OK`,copied:`Copied`,copy:`Copy`,noData:`No data`,fetch:`Fetch`,add:`Add`,enable:`Enable`,disable:`Disable`,configured:`Configured`,notConfigured:`Not configured`,confirm:`Confirm`,expand:`Expand`,collapse:`Collapse`},sidebar:{chat:`Chat`,jobs:`Jobs`,models:`Models`,profiles:`Profiles`,skills:`Skills`,memory:`Memory`,logs:`Logs`,usage:`Usage`,channels:`Channels`,terminal:`Terminal`,settings:`Settings`,connected:`Connected`,disconnected:`Disconnected`,updateTip:`Run "hermes-web-ui update" in terminal to update`,updateVersion:`Upgrade to v{version}`,updating:`Updating...`,updateSuccess:`Update complete, please restart the server`,updateFailed:`Update failed`},chat:{emptyState:`Start a conversation with Hermes Agent`,inputPlaceholder:`Type a message... (Enter to send, Shift+Enter for new line)`,attachFiles:`Attach files`,stop:`Stop`,send:`Send`,contextUsed:`Context used:`,sessions:`Sessions`,noSessions:`No sessions`,newChat:`New Chat`,deleteSession:`Delete this session?`,sessionDeleted:`Session deleted`,rename:`Rename`,copySessionId:`Copy Session ID`,renamed:`Renamed`,renameFailed:`Rename failed`,renameSession:`Rename Session`,enterNewTitle:`Enter new title`,other:`Other`,runFailed:`Run failed`,error:`Error`,tool:`Tool`,arguments:`Arguments`,result:`Result`,truncated:`... (truncated)`},jobs:{title:`Scheduled Jobs`,createJob:`Create Job`,editJob:`Edit Job`,noJobs:`No scheduled jobs yet. Create one to get started.`,name:`Name`,namePlaceholder:`Job name`,schedule:`Schedule (Cron Expression)`,schedulePlaceholder:`e.g. 0 9 * * *`,quickPresets:`Quick Presets`,selectPreset:`Select a preset...`,presetEveryMinute:`Every minute`,presetEvery5Min:`Every 5 minutes`,presetEveryHour:`Every hour`,presetEveryDay:`Every day at 00:00`,presetEveryDay9:`Every day at 09:00`,presetEveryMonday:`Every Monday at 09:00`,presetEveryMonth:`Every month 1st at 09:00`,prompt:`Prompt`,promptPlaceholder:`The prompt to execute`,deliverTarget:`Deliver Target`,origin:`Origin`,local:`Local`,repeatCount:`Repeat Count (optional)`,repeatPlaceholder:`Leave empty for infinite`,jobCreated:`Job created`,jobUpdated:`Job updated`,nameRequired:`Name is required`,scheduleRequired:`Schedule is required`,loadFailed:`Failed to load job`,jobPaused:`Job paused`,jobResumed:`Job resumed`,jobTriggered:`Job triggered`,jobDeleted:`Job deleted`,status:{running:`Running`,paused:`Paused`,disabled:`Disabled`,scheduled:`Scheduled`},info:{schedule:`Schedule`,lastRun:`Last Run`,nextRun:`Next Run`,deliver:`Deliver`,repeat:`Repeat`},action:{pause:`Pause`,pauseJob:`Pause job`,resume:`Resume`,resumeJob:`Resume job`,runNow:`Run Now`,triggerImmediately:`Trigger immediately`}},skills:{title:`Skills`,searchPlaceholder:`Search skills...`,noMatch:`No skills match your search`,noSkills:`No skills found`,backTo:`Back to`,attachedFiles:`Attached Files`,loadFailed:`Failed to load skill`,fileLoadFailed:`Failed to load file`,toggleFailed:`Failed to toggle skill`},memory:{title:`Memory`,refresh:`Refresh`,loadFailed:`Failed to load memory`,myNotes:`My Notes`,noNotes:`No notes yet.`,notesPlaceholder:`Write your notes...`,userProfile:`User Profile`,noProfile:`No profile yet.`,profilePlaceholder:`Write your profile...`,soul:`Soul`,noSoul:`No soul configuration yet.`,soulPlaceholder:`Write soul configuration...`},models:{title:`Models`,addProvider:`Add Provider`,providerType:`Provider Type`,preset:`Preset`,custom:`Custom`,selectProvider:`Select Provider`,chooseProvider:`Choose a provider...`,name:`Name`,autoGeneratedName:`Auto-generated from Base URL`,baseUrl:`Base URL`,baseUrlPlaceholder:`e.g. https://api.example.com/v1`,apiKey:`API Key`,apiKeyPlaceholder:`sk-...`,defaultModel:`Default Model`,selectModel:`Select a model...`,providerAdded:`Provider added`,providerDeleted:`Provider deleted`,deleteProvider:`Delete Provider`,deleteConfirm:`Are you sure you want to delete "{name}"?`,noProviders:`No providers found. Add a custom provider to get started.`,builtIn:`Built-in`,customType:`Custom`,provider:`Provider`,local:`Local ({host})`,selectProviderRequired:`Please select a provider`,baseUrlRequired:`Base URL is required`,apiKeyRequired:`API Key is required`,modelRequired:`Default Model is required`,enterBaseUrl:`Please enter Base URL first`,unexpectedFormat:`Unexpected response format`,foundModels:`Found {count} models`,fetchFailed:`Failed to fetch models`},profiles:{title:`Profiles`,create:`Create Profile`,import:`Import`,export:`Export`,rename:`Rename`,delete:`Delete`,switchTo:`Switch to`,switchConfirm:`Switching to profile "{name}" will restart the gateway. Continue?`,switchSuccess:`Switched to profile "{name}"`,switchFailed:`Failed to switch profile. Gateway may need manual restart.`,createSuccess:`Profile "{name}" created`,createFailed:`Failed to create profile`,renameSuccess:`Profile renamed`,renameFailed:`Failed to rename profile`,deleteConfirm:`Are you sure you want to delete profile "{name}"?`,deleteSuccess:`Profile deleted`,deleteFailed:`Failed to delete profile`,exportSuccess:`Profile exported`,exportFailed:`Failed to export profile`,importSuccess:`Profile imported`,importFailed:`Failed to import profile`,name:`Profile Name`,namePlaceholder:`Enter profile name`,newName:`New Name`,newNamePlaceholder:`Enter new name`,cloneFromCurrent:`Clone from current profile`,archivePath:`Archive Path`,archivePathPlaceholder:`Server path to archive file`,importName:`Profile Name (optional)`,importNamePlaceholder:`Leave empty to use archive name`,active:`Active`,model:`Model`,gateway:`Gateway`,alias:`Alias`,provider:`Provider`,path:`Path`,skills:`Skills`,hasEnv:`Has .env`,hasSoulMd:`Has soul.md`,noProfiles:`No profiles found. Create one to get started.`},logs:{title:`Logs`,all:`All`,searchPlaceholder:`Search...`,refresh:`Refresh`,noEntries:`No log entries`},settings:{title:`Settings`,saved:`Saved`,saveFailed:`Save failed`,tabs:{display:`Display`,agent:`Agent`,memory:`Memory`,session:`Session`,privacy:`Privacy`,apiServer:`API Server`},display:{streaming:`Stream Responses`,streamingHint:`Show AI replies in real-time`,compact:`Compact Mode`,compactHint:`Reduce message spacing`,showReasoning:`Show Reasoning`,showReasoningHint:`Show model thinking process`,showCost:`Show Cost`,showCostHint:`Show token usage in replies`,inlineDiffs:`Inline Diffs`,inlineDiffsHint:`Show code changes inline`,bellOnComplete:`Completion Sound`,bellOnCompleteHint:`Play sound when AI finishes`,busyInputMode:`Busy Input Mode`,busyInputModeHint:`Allow input while AI is processing`},agent:{maxTurns:`Max Turns`,maxTurnsHint:`Maximum interaction rounds per conversation`,gatewayTimeout:`Gateway Timeout`,gatewayTimeoutHint:`Request timeout in seconds`,restartDrainTimeout:`Restart Drain Timeout`,restartDrainTimeoutHint:`Drain timeout before restart in seconds`,toolEnforcement:`Tool Enforcement`,toolEnforcementHint:`Control tool call execution mode`,auto:`Auto`,always:`Always`,never:`Never`},memory:{enabled:`Enable Memory`,enabledHint:`Allow AI to remember conversation context`,userProfile:`User Profile`,userProfileHint:`Allow AI to remember user preferences`,charLimit:`Memory Char Limit`,charLimitHint:`Max characters for MEMORY.md`,userCharLimit:`User Profile Char Limit`,userCharLimitHint:`Max characters for USER.md`},session:{mode:`Reset Mode`,modeHint:`Trigger condition for session reset`,modeBoth:`Idle + Scheduled`,modeIdle:`Idle Only`,modeHourly:`Scheduled Only`,idleMinutes:`Idle Timeout`,idleMinutesHint:`Wait time before auto-reset (minutes)`,atHour:`Scheduled Reset Time`,atHourHint:`Reset session at this hour daily`},privacy:{redactPii:`Redact PII`,redactPiiHint:`Auto-detect and hide sensitive info (passwords, keys, etc.)`},apiServer:{enable:`Enable`,enableHint:`Enable API server`,host:`Host`,hostHint:`Listen address`,port:`Port`,portHint:`Listen port`,key:`Key`,keyHint:`API access key`,cors:`CORS Origins`,corsHint:`Allowed cross-origin sources`}},platform:{requireMention:`Require {'@'}Mention`,requireMentionGroup:`Require {'@'}mention in groups to respond`,requireMentionChannel:`Require {'@'}mention in channels to respond`,requireMentionRoom:`Require {'@'}mention in rooms to respond`,reactions:`Reactions`,reactionsHint:`React to messages with emoji`,freeResponseChats:`Free Response Chats`,freeResponseChatsHint:`Chat IDs that respond without {'@'}mention (comma-separated)`,freeResponseChannels:`Free Response Channels`,freeResponseChannelsHint:`Channel IDs that respond without {'@'}mention (comma-separated)`,freeResponseRooms:`Free Response Rooms`,freeResponseRoomsHint:`Room IDs that respond without {'@'}mention (comma-separated)`,mentionPatterns:`Custom Mention Patterns`,mentionPatternsHint:`Additional trigger patterns`,autoThread:`Auto Thread`,autoThreadHint:`Auto-create reply threads after {'@'}mention`,autoThreadHintRoom:`Auto-create reply threads in rooms`,dmMentionThreads:`DM Mention Threads`,dmMentionThreadsHint:`Use thread replies for mentions in DMs`,allowBots:`Allow Bot Messages`,allowBotsHint:`Respond to messages from other bots`,allowedChannels:`Allowed Channels`,allowedChannelsHint:`Whitelist channel IDs (comma-separated)`,ignoredChannels:`Ignored Channels`,ignoredChannelsHint:`Channels where bot never responds (comma-separated)`,noThreadChannels:`No-Thread Channels`,noThreadChannelsHint:`Channels where bot responds without threads (comma-separated)`,botToken:`Bot Token`,botTokenHint:`Bot token from developer portal`,accessToken:`Access Token`,accessTokenHint:`Matrix access token`,homeserver:`Homeserver URL`,homeserverHint:`Matrix homeserver URL`,appId:`App ID`,appIdHint:`Feishu App ID`,appSecret:`App Secret`,appSecretHint:`Feishu App Secret`,clientId:`Client ID`,clientIdHint:`DingTalk Client ID`,clientSecret:`Client Secret`,clientSecretHint:`DingTalk Client Secret`,botId:`Bot ID`,botIdHint:`WeCom Bot ID`,wecomSecretHint:`WeCom Bot Secret`,waEnabled:`Enable WhatsApp`,waEnabledHint:`Enable WhatsApp via QR code pairing`,weixinToken:`Weixin Token`,weixinTokenHint:`From weixin CLI QR login (hermes weixin)`,accountId:`Account ID`,accountIdHint:`Weixin account ID`,qrLogin:`QR Login`,qrRelogin:`Re-login`,qrFetching:`Fetching QR code...`,qrScanHint:`Scan with WeChat to login`,qrScanedHint:`Scaned, please confirm on phone...`},language:{label:`Language`,zh:`中文`,en:`English`},terminal:{sessions:`Sessions`,newTab:`New Terminal`,closeSession:`Close this session?`,sessionExited:`Exited`,processExited:`Process exited with code {code}`},usage:{title:`Usage Statistics`,refresh:`Refresh`,totalTokens:`Total Tokens`,inputTokens:`Input`,outputTokens:`Output`,totalSessions:`Total Sessions`,avgPerDay:`~{n}/day avg`,estimatedCost:`Est. Cost`,cacheHitRate:`Cache Hit Rate`,modelBreakdown:`Model Breakdown`,dailyTrend:`Daily Usage (Last 30 Days)`,date:`Date`,tokens:`Tokens`,cache:`Cache`,sessions:`Sessions`,cost:`Cost`,noData:`No usage data`}},Ve={login:{title:`Hermes Web UI`,description:`输入访问令牌以继续。令牌在服务端启动日志中查看。`,placeholder:`访问令牌`,submit:`登录`,tokenRequired:`请输入访问令牌`,invalidToken:`令牌无效`,connectionFailed:`无法连接到服务器`},common:{loading:`加载中...`,cancel:`取消`,delete:`删除`,edit:`编辑`,save:`保存`,saved:`已保存`,saveFailed:`保存失败`,ok:`确定`,copied:`已复制`,copy:`复制`,update:`更新`,create:`创建`,noData:`暂无数据`,fetch:`获取`,add:`添加`,enable:`启用`,disable:`禁用`,configured:`已配置`,notConfigured:`未配置`,confirm:`确定`,expand:`展开`,collapse:`收起`},sidebar:{chat:`对话`,jobs:`任务`,models:`模型`,profiles:`用户`,skills:`技能`,memory:`记忆`,logs:`日志`,usage:`用量`,channels:`频道`,terminal:`终端`,settings:`设置`,connected:`已连接`,disconnected:`未连接`,updateTip:`在终端运行 "hermes-web-ui update" 即可更新`,updateVersion:`升级版本 v{version}`,updating:`正在更新...`,updateSuccess:`更新完成,请重启服务`,updateFailed:`更新失败`},chat:{emptyState:`开始与 Hermes Agent 对话`,inputPlaceholder:`输入消息... (Enter 发送,Shift+Enter 换行)`,attachFiles:`添加附件`,stop:`停止`,send:`发送`,contextUsed:`上下文已用:`,sessions:`会话`,noSessions:`暂无会话`,newChat:`新建对话`,deleteSession:`确定删除此会话?`,sessionDeleted:`会话已删除`,rename:`重命名`,copySessionId:`复制会话 ID`,renamed:`已重命名`,renameFailed:`重命名失败`,renameSession:`重命名会话`,enterNewTitle:`输入新标题`,other:`其他`,runFailed:`运行失败`,error:`错误`,tool:`工具`,arguments:`参数`,result:`结果`,truncated:`... (已截断)`},jobs:{title:`定时任务`,createJob:`创建任务`,editJob:`编辑任务`,noJobs:`暂无定时任务,创建一个开始吧。`,name:`名称`,namePlaceholder:`任务名称`,schedule:`调度表达式 (Cron)`,schedulePlaceholder:`例如 0 9 * * *`,quickPresets:`快速预设`,selectPreset:`选择预设...`,presetEveryMinute:`每分钟`,presetEvery5Min:`每 5 分钟`,presetEveryHour:`每小时`,presetEveryDay:`每天 00:00`,presetEveryDay9:`每天 09:00`,presetEveryMonday:`每周一 09:00`,presetEveryMonth:`每月 1 日 09:00`,prompt:`提示词`,promptPlaceholder:`要执行的内容`,deliverTarget:`投递目标`,origin:`来源`,local:`本地`,repeatCount:`重复次数(可选)`,repeatPlaceholder:`留空表示无限重复`,jobCreated:`任务已创建`,jobUpdated:`任务已更新`,nameRequired:`名称为必填项`,scheduleRequired:`调度表达式为必填项`,loadFailed:`加载任务失败`,jobPaused:`任务已暂停`,jobResumed:`任务已恢复`,jobTriggered:`任务已触发`,jobDeleted:`任务已删除`,status:{running:`运行中`,paused:`已暂停`,disabled:`已禁用`,scheduled:`已调度`},info:{schedule:`调度`,lastRun:`上次运行`,nextRun:`下次运行`,deliver:`投递`,repeat:`重复`},action:{pause:`暂停`,pauseJob:`暂停任务`,resume:`恢复`,resumeJob:`恢复任务`,runNow:`立即运行`,triggerImmediately:`立即触发`}},skills:{title:`技能`,searchPlaceholder:`搜索技能...`,noMatch:`没有匹配的技能`,noSkills:`暂无技能`,backTo:`返回`,attachedFiles:`附件文件`,loadFailed:`加载技能失败`,fileLoadFailed:`加载文件失败`,toggleFailed:`切换技能状态失败`},memory:{title:`记忆`,refresh:`刷新`,loadFailed:`加载记忆失败`,myNotes:`我的笔记`,noNotes:`暂无笔记。`,notesPlaceholder:`输入笔记内容...`,userProfile:`用户画像`,noProfile:`暂无画像。`,profilePlaceholder:`输入用户画像...`,soul:`灵魂`,noSoul:`暂无灵魂配置。`,soulPlaceholder:`输入灵魂配置...`},models:{title:`模型`,addProvider:`添加 Provider`,providerType:`Provider 类型`,preset:`预设`,custom:`自定义`,selectProvider:`选择 Provider`,chooseProvider:`选择一个 provider...`,name:`名称`,autoGeneratedName:`根据 Base URL 自动生成`,baseUrl:`Base URL`,baseUrlPlaceholder:`例如 https://api.example.com/v1`,apiKey:`API Key`,apiKeyPlaceholder:`sk-...`,defaultModel:`默认模型`,selectModel:`选择模型...`,providerAdded:`Provider 已添加`,providerDeleted:`Provider 已删除`,deleteProvider:`删除 Provider`,deleteConfirm:`确定删除 "{name}" 吗?`,noProviders:`暂无 Provider,添加一个开始吧。`,builtIn:`内置`,customType:`自定义`,provider:`Provider`,local:`本地 ({host})`,selectProviderRequired:`请选择 Provider`,baseUrlRequired:`Base URL 为必填项`,apiKeyRequired:`API Key 为必填项`,modelRequired:`默认模型为必填项`,enterBaseUrl:`请先输入 Base URL`,unexpectedFormat:`响应格式异常`,foundModels:`找到 {count} 个模型`,fetchFailed:`获取模型失败`},profiles:{title:`配置`,create:`创建配置`,import:`导入`,export:`导出`,rename:`重命名`,delete:`删除`,switchTo:`切换到`,switchConfirm:`切换到配置 "{name}" 将重启网关,是否继续?`,switchSuccess:`已切换到配置 "{name}"`,switchFailed:`切换配置失败,网关可能需要手动重启`,createSuccess:`配置 "{name}" 已创建`,createFailed:`创建配置失败`,renameSuccess:`配置已重命名`,renameFailed:`重命名配置失败`,deleteConfirm:`确定删除配置 "{name}" 吗?`,deleteSuccess:`配置已删除`,deleteFailed:`删除配置失败`,exportSuccess:`配置已导出`,exportFailed:`导出配置失败`,importSuccess:`配置已导入`,importFailed:`导入配置失败`,name:`配置名称`,namePlaceholder:`输入配置名称`,newName:`新名称`,newNamePlaceholder:`输入新名称`,cloneFromCurrent:`从当前配置克隆`,archivePath:`归档路径`,archivePathPlaceholder:`归档文件的服务器路径`,importName:`配置名称(可选)`,importNamePlaceholder:`留空则使用归档名称`,active:`活跃`,model:`模型`,gateway:`网关`,alias:`别名`,provider:`Provider`,path:`路径`,skills:`技能`,hasEnv:`有 .env`,hasSoulMd:`有 soul.md`,noProfiles:`暂无配置,创建一个开始吧。`},logs:{title:`日志`,all:`全部`,searchPlaceholder:`搜索...`,refresh:`刷新`,noEntries:`暂无日志`},settings:{title:`设置`,saved:`已保存`,saveFailed:`保存失败`,tabs:{display:`显示`,agent:`代理`,memory:`记忆`,session:`会话`,privacy:`隐私`,apiServer:`API 服务器`},display:{streaming:`流式响应`,streamingHint:`实时显示 AI 回复`,compact:`紧凑模式`,compactHint:`减少消息间距`,showReasoning:`显示推理过程`,showReasoningHint:`展示模型思考过程`,showCost:`显示费用`,showCostHint:`在回复中显示 token 使用量`,inlineDiffs:`内联差异`,inlineDiffsHint:`代码变更以内联方式显示`,bellOnComplete:`完成提示音`,bellOnCompleteHint:`AI 回复完成时播放提示音`,busyInputMode:`忙碌输入模式`,busyInputModeHint:`AI 处理中仍可输入`},agent:{maxTurns:`最大轮次`,maxTurnsHint:`单次对话最大交互轮数`,gatewayTimeout:`网关超时`,gatewayTimeoutHint:`单次请求超时时间(秒)`,restartDrainTimeout:`重启排空超时`,restartDrainTimeoutHint:`重启前排空请求的超时时间(秒)`,toolEnforcement:`工具执行策略`,toolEnforcementHint:`控制工具调用的执行模式`,auto:`自动`,always:`始终`,never:`从不`},memory:{enabled:`启用记忆`,enabledHint:`允许 AI 记住对话上下文`,userProfile:`用户画像`,userProfileHint:`允许 AI 记住用户偏好信息`,charLimit:`记忆字符上限`,charLimitHint:`MEMORY.md 最大字符数`,userCharLimit:`用户画像字符上限`,userCharLimitHint:`USER.md 最大字符数`},session:{mode:`重置模式`,modeHint:`会话重置的触发条件`,modeBoth:`空闲 + 定时`,modeIdle:`仅空闲`,modeHourly:`仅定时`,idleMinutes:`空闲超时`,idleMinutesHint:`无操作后自动重置的等待时间(分钟)`,atHour:`定时重置时间`,atHourHint:`每天在指定小时重置会话`},privacy:{redactPii:`脱敏 PII`,redactPiiHint:`自动检测并隐藏敏感信息(密码、密钥等)`},apiServer:{enable:`启用`,enableHint:`启用 API 服务器`,host:`主机`,hostHint:`监听地址`,port:`端口`,portHint:`监听端口`,key:`密钥`,keyHint:`API 访问密钥`,cors:`CORS 来源`,corsHint:`允许的跨域来源`}},platform:{requireMention:`需要 {'@'}提及`,requireMentionGroup:`群组中需要 {'@'}机器人 才会响应`,requireMentionChannel:`频道中需要 {'@'}机器人 才会响应`,requireMentionRoom:`房间中需要 {'@'}机器人 才会响应`,reactions:`表情回应`,reactionsHint:`对消息添加表情回应`,freeResponseChats:`自由响应聊天`,freeResponseChatsHint:`不需要 {'@'}提及即响应的聊天 ID(逗号分隔)`,freeResponseChannels:`自由响应频道`,freeResponseChannelsHint:`不需要 {'@'}提及即响应的频道 ID(逗号分隔)`,freeResponseRooms:`自由响应房间`,freeResponseRoomsHint:`不需要 {'@'}提及即响应的房间 ID(逗号分隔)`,mentionPatterns:`自定义提及模式`,mentionPatternsHint:`额外的触发模式列表`,autoThread:`自动创建线程`,autoThreadHint:`{'@'}提及 后自动创建回复线程`,autoThreadHintRoom:`在房间中自动创建回复线程`,dmMentionThreads:`DM 提及线程`,dmMentionThreadsHint:`在私聊中也使用线程回复提及`,allowBots:`允许机器人消息`,allowBotsHint:`响应其他机器人发送的消息`,allowedChannels:`允许的频道`,allowedChannelsHint:`白名单频道 ID(逗号分隔)`,ignoredChannels:`忽略的频道`,ignoredChannelsHint:`不响应的频道 ID(逗号分隔)`,noThreadChannels:`无线程频道`,noThreadChannelsHint:`不创建线程的频道 ID(逗号分隔)`,botToken:`Bot Token`,botTokenHint:`开发者门户获取的 Bot Token`,accessToken:`Access Token`,accessTokenHint:`Matrix Access Token`,homeserver:`Homeserver URL`,homeserverHint:`Matrix 服务器地址`,appId:`App ID`,appIdHint:`飞书 App ID`,appSecret:`App Secret`,appSecretHint:`飞书 App Secret`,clientId:`Client ID`,clientIdHint:`钉钉 Client ID`,clientSecret:`Client Secret`,clientSecretHint:`钉钉 Client Secret`,botId:`Bot ID`,botIdHint:`企业微信 Bot ID`,wecomSecretHint:`企业微信 Bot Secret`,waEnabled:`启用 WhatsApp`,waEnabledHint:`通过二维码配对启用 WhatsApp`,weixinToken:`微信 Token`,weixinTokenHint:`通过 weixin CLI 扫码登录获取 (hermes weixin)`,accountId:`Account ID`,accountIdHint:`微信 Account ID`,qrLogin:`扫码登录`,qrRelogin:`重新登录`,qrFetching:`正在获取二维码...`,qrScanHint:`使用微信扫描二维码登录`,qrScanedHint:`已扫描,请在手机上确认...`},language:{label:`语言`,zh:`中文`,en:`English`},terminal:{sessions:`会话`,newTab:`新建终端`,closeSession:`关闭此会话?`,sessionExited:`已退出`,processExited:`进程已退出,代码 {code}`},usage:{title:`用量统计`,refresh:`刷新`,totalTokens:`总 Token 数`,inputTokens:`输入`,outputTokens:`输出`,totalSessions:`总会话数`,avgPerDay:`日均 ~{n}`,estimatedCost:`预估费用`,cacheHitRate:`缓存命中率`,modelBreakdown:`模型分布`,dailyTrend:`每日用量(近 30 天)`,date:`日期`,tokens:`Token`,cache:`缓存`,sessions:`会话`,cost:`费用`,noData:`暂无用量数据`}},He=localStorage.getItem(`hermes_locale`),Ue=navigator.language.slice(0,2),We=te({legacy:!1,locale:He||(Ue===`zh`?`zh`:`en`),fallbackLocale:`en`,messages:{en:Be,zh:Ve}}),{cubicBezierEaseInOut:J,cubicBezierEaseOut:Ge,cubicBezierEaseIn:Ke}=me;function qe({overflow:e=`hidden`,duration:t=`.3s`,originalTransition:n=``,leavingDelay:r=`0s`,foldPadding:i=!1,enterToProps:a=void 0,leaveToProps:o=void 0,reverse:s=!1}={}){let c=s?`leave`:`enter`,l=s?`enter`:`leave`;return[F(`&.fade-in-height-expand-transition-${l}-from,
|
|
2
|
+
&.fade-in-height-expand-transition-${c}-to`,Object.assign(Object.assign({},a),{opacity:1})),F(`&.fade-in-height-expand-transition-${l}-to,
|
|
3
|
+
&.fade-in-height-expand-transition-${c}-from`,Object.assign(Object.assign({},o),{opacity:0,marginTop:`0 !important`,marginBottom:`0 !important`,paddingTop:i?`0 !important`:void 0,paddingBottom:i?`0 !important`:void 0})),F(`&.fade-in-height-expand-transition-${l}-active`,`
|
|
4
|
+
overflow: ${e};
|
|
5
|
+
transition:
|
|
6
|
+
max-height ${t} ${J} ${r},
|
|
7
|
+
opacity ${t} ${Ge} ${r},
|
|
8
|
+
margin-top ${t} ${J} ${r},
|
|
9
|
+
margin-bottom ${t} ${J} ${r},
|
|
10
|
+
padding-top ${t} ${J} ${r},
|
|
11
|
+
padding-bottom ${t} ${J} ${r}
|
|
12
|
+
${n?`,${n}`:``}
|
|
13
|
+
`),F(`&.fade-in-height-expand-transition-${c}-active`,`
|
|
14
|
+
overflow: ${e};
|
|
15
|
+
transition:
|
|
16
|
+
max-height ${t} ${J},
|
|
17
|
+
opacity ${t} ${Ke},
|
|
18
|
+
margin-top ${t} ${J},
|
|
19
|
+
margin-bottom ${t} ${J},
|
|
20
|
+
padding-top ${t} ${J},
|
|
21
|
+
padding-bottom ${t} ${J}
|
|
22
|
+
${n?`,${n}`:``}
|
|
23
|
+
`)]}var Je=C({name:`ConfigProvider`,alias:[`App`],props:{abstract:Boolean,bordered:{type:Boolean,default:void 0},clsPrefix:String,locale:Object,dateLocale:Object,namespace:String,rtl:Array,tag:{type:String,default:`div`},hljs:Object,katex:Object,theme:Object,themeOverrides:Object,componentOptions:Object,icons:Object,breakpoints:Object,preflightStyleDisabled:Boolean,styleMountTarget:Object,inlineThemeDisabled:{type:Boolean,default:void 0},as:{type:String,validator:()=>(ie(`config-provider`,"`as` is deprecated, please use `tag` instead."),!0),default:void 0}},setup(e){let n=i(re,null),r=t(()=>{let{theme:t}=e;if(t===null)return;let r=n?.mergedThemeRef.value;return t===void 0?r:r===void 0?t:Object.assign({},r,t)}),a=t(()=>{let{themeOverrides:t}=e;if(t!==null){if(t===void 0)return n?.mergedThemeOverridesRef.value;{let e=n?.mergedThemeOverridesRef.value;return e===void 0?t:ce({},e,t)}}}),s=se(()=>{let{namespace:t}=e;return t===void 0?n?.mergedNamespaceRef.value:t}),c=se(()=>{let{bordered:t}=e;return t===void 0?n?.mergedBorderedRef.value:t}),l=t(()=>{let{icons:t}=e;return t===void 0?n?.mergedIconsRef.value:t}),u=t(()=>{let{componentOptions:t}=e;return t===void 0?n?.mergedComponentPropsRef.value:t}),d=t(()=>{let{clsPrefix:t}=e;return t===void 0?n?n.mergedClsPrefixRef.value:`n`:t}),f=t(()=>{var t;let{rtl:r}=e;if(r===void 0)return n?.mergedRtlRef.value;let i={};for(let e of r)i[e.name]=S(e),(t=e.peers)==null||t.forEach(e=>{e.name in i||(i[e.name]=S(e))});return i}),p=t(()=>e.breakpoints||n?.mergedBreakpointsRef.value),m=e.inlineThemeDisabled||n?.inlineThemeDisabled,h=e.preflightStyleDisabled||n?.preflightStyleDisabled,g=e.styleMountTarget||n?.styleMountTarget;return o(re,{mergedThemeHashRef:t(()=>{let{value:e}=r,{value:t}=a,n=t&&Object.keys(t).length!==0,i=e?.name;return i?n?`${i}-${le(JSON.stringify(a.value))}`:i:n?le(JSON.stringify(a.value)):``}),mergedBreakpointsRef:p,mergedRtlRef:f,mergedIconsRef:l,mergedComponentPropsRef:u,mergedBorderedRef:c,mergedNamespaceRef:s,mergedClsPrefixRef:d,mergedLocaleRef:t(()=>{let{locale:t}=e;if(t!==null)return t===void 0?n?.mergedLocaleRef.value:t}),mergedDateLocaleRef:t(()=>{let{dateLocale:t}=e;if(t!==null)return t===void 0?n?.mergedDateLocaleRef.value:t}),mergedHljsRef:t(()=>{let{hljs:t}=e;return t===void 0?n?.mergedHljsRef.value:t}),mergedKatexRef:t(()=>{let{katex:t}=e;return t===void 0?n?.mergedKatexRef.value:t}),mergedThemeRef:r,mergedThemeOverridesRef:a,inlineThemeDisabled:m||!1,preflightStyleDisabled:h||!1,styleMountTarget:g}),{mergedClsPrefix:d,mergedBordered:c,mergedNamespace:s,mergedTheme:r,mergedThemeOverrides:a}},render(){var e,t;return this.abstract?(t=this.$slots).default?.call(t):s(this.as||this.tag,{class:`${this.mergedClsPrefix||`n`}-config-provider`},(e=this.$slots).default?.call(e))}}),Ye=Object.assign(Object.assign({},we),{onAfterEnter:Function,onAfterLeave:Function,transformOrigin:String,blockScroll:{type:Boolean,default:!0},closeOnEsc:{type:Boolean,default:!0},onEsc:Function,autoFocus:{type:Boolean,default:!0},internalStyle:[String,Object],maskClosable:{type:Boolean,default:!0},zIndex:Number,onPositiveClick:Function,onNegativeClick:Function,onClose:Function,onMaskClick:Function,draggable:[Boolean,Object]}),Xe=C({name:`DialogEnvironment`,props:Object.assign(Object.assign({},Ye),{internalKey:{type:String,required:!0},to:[String,Object],onInternalAfterLeave:{type:Function,required:!0}}),setup(e){let t=y(!0);function n(){let{onInternalAfterLeave:t,internalKey:n,onAfterLeave:r}=e;t&&t(n),r&&r()}function r(t){let{onPositiveClick:n}=e;n?Promise.resolve(n(t)).then(e=>{e!==!1&&c()}):c()}function i(t){let{onNegativeClick:n}=e;n?Promise.resolve(n(t)).then(e=>{e!==!1&&c()}):c()}function a(){let{onClose:t}=e;t?Promise.resolve(t()).then(e=>{e!==!1&&c()}):c()}function o(t){let{onMaskClick:n,maskClosable:r}=e;n&&(n(t),r&&c())}function s(){let{onEsc:t}=e;t&&t()}function c(){t.value=!1}function l(e){t.value=e}return{show:t,hide:c,handleUpdateShow:l,handleAfterLeave:n,handleCloseClick:a,handleNegativeClick:i,handlePositiveClick:r,handleMaskClick:o,handleEsc:s}},render(){let{handlePositiveClick:e,handleUpdateShow:t,handleNegativeClick:n,handleCloseClick:r,handleAfterLeave:i,handleMaskClick:a,handleEsc:o,to:c,zIndex:l,maskClosable:u,show:d}=this;return s(ke,{show:d,onUpdateShow:t,onMaskClick:a,onEsc:o,to:c,zIndex:l,maskClosable:u,onAfterEnter:this.onAfterEnter,onAfterLeave:i,closeOnEsc:this.closeOnEsc,blockScroll:this.blockScroll,autoFocus:this.autoFocus,transformOrigin:this.transformOrigin,draggable:this.draggable,internalAppear:!0,internalDialog:!0},{default:({draggableClass:t})=>s(Te,Object.assign({},be(this.$props,De),{titleClass:T([this.titleClass,t]),style:this.internalStyle,onClose:r,onNegativeClick:n,onPositiveClick:e}))})}}),Ze=C({name:`DialogProvider`,props:{injectionKey:String,to:[String,Object]},setup(){let e=y([]),t={};function n(n={}){let r=V(),i=E(Object.assign(Object.assign({},n),{key:r,destroy:()=>{var e;(e=t[`n-dialog-${r}`])==null||e.hide()}}));return e.value.push(i),i}let r=[`info`,`success`,`warning`,`error`].map(e=>t=>n(Object.assign(Object.assign({},t),{type:e})));function i(t){let{value:n}=e;n.splice(n.findIndex(e=>e.key===t),1)}function a(){Object.values(t).forEach(e=>{e?.hide()})}let s={create:n,destroyAll:a,info:r[0],success:r[1],warning:r[2],error:r[3]};return o(xe,s),o(Ee,{clickedRef:Se(64),clickedPositionRef:Ce()}),o(Oe,e),Object.assign(Object.assign({},s),{dialogList:e,dialogInstRefs:t,handleAfterLeave:i})},render(){var e;return s(j,null,[this.dialogList.map(e=>s(Xe,K(e,[`destroy`,`style`],{internalStyle:e.style,to:this.to,ref:t=>{t===null?delete this.dialogInstRefs[`n-dialog-${e.key}`]:this.dialogInstRefs[`n-dialog-${e.key}`]=t},internalKey:e.key,onInternalAfterLeave:this.handleAfterLeave}))),(e=this.$slots).default?.call(e)])}}),Qe={margin:`0 0 8px 0`,padding:`10px 20px`,maxWidth:`720px`,minWidth:`420px`,iconMargin:`0 10px 0 0`,closeMargin:`0 0 0 10px`,closeSize:`20px`,closeIconSize:`16px`,iconSize:`20px`,fontSize:`14px`};function $e(e){let{textColor2:t,closeIconColor:n,closeIconColorHover:r,closeIconColorPressed:i,infoColor:a,successColor:o,errorColor:s,warningColor:c,popoverColor:l,boxShadow2:u,primaryColor:d,lineHeight:f,borderRadius:p,closeColorHover:m,closeColorPressed:h}=e;return Object.assign(Object.assign({},Qe),{closeBorderRadius:p,textColor:t,textColorInfo:t,textColorSuccess:t,textColorError:t,textColorWarning:t,textColorLoading:t,color:l,colorInfo:l,colorSuccess:l,colorError:l,colorWarning:l,colorLoading:l,boxShadow:u,boxShadowInfo:u,boxShadowSuccess:u,boxShadowError:u,boxShadowWarning:u,boxShadowLoading:u,iconColor:t,iconColorInfo:a,iconColorSuccess:o,iconColorWarning:c,iconColorError:s,iconColorLoading:d,closeColorHover:m,closeColorPressed:h,closeIconColor:n,closeIconColorHover:r,closeIconColorPressed:i,closeColorHoverInfo:m,closeColorPressedInfo:h,closeIconColorInfo:n,closeIconColorHoverInfo:r,closeIconColorPressedInfo:i,closeColorHoverSuccess:m,closeColorPressedSuccess:h,closeIconColorSuccess:n,closeIconColorHoverSuccess:r,closeIconColorPressedSuccess:i,closeColorHoverError:m,closeColorPressedError:h,closeIconColorError:n,closeIconColorHoverError:r,closeIconColorPressedError:i,closeColorHoverWarning:m,closeColorPressedWarning:h,closeIconColorWarning:n,closeIconColorHoverWarning:r,closeIconColorPressedWarning:i,closeColorHoverLoading:m,closeColorPressedLoading:h,closeIconColorLoading:n,closeIconColorHoverLoading:r,closeIconColorPressedLoading:i,loadingColor:d,lineHeight:f,borderRadius:p,border:`0`})}var et={name:`Message`,common:ue,self:$e},Y={icon:Function,type:{type:String,default:`info`},content:[String,Number,Function],showIcon:{type:Boolean,default:!0},closable:Boolean,keepAliveOnHover:Boolean,spinProps:Object,onClose:Function,onMouseenter:Function,onMouseleave:Function},tt=F([B(`message-wrapper`,`
|
|
24
|
+
margin: var(--n-margin);
|
|
25
|
+
z-index: 0;
|
|
26
|
+
transform-origin: top center;
|
|
27
|
+
display: flex;
|
|
28
|
+
`,[qe({overflow:`visible`,originalTransition:`transform .3s var(--n-bezier)`,enterToProps:{transform:`scale(1)`},leaveToProps:{transform:`scale(0.85)`}})]),B(`message`,`
|
|
29
|
+
box-sizing: border-box;
|
|
30
|
+
display: flex;
|
|
31
|
+
align-items: center;
|
|
32
|
+
transition:
|
|
33
|
+
color .3s var(--n-bezier),
|
|
34
|
+
box-shadow .3s var(--n-bezier),
|
|
35
|
+
background-color .3s var(--n-bezier),
|
|
36
|
+
opacity .3s var(--n-bezier),
|
|
37
|
+
transform .3s var(--n-bezier),
|
|
38
|
+
margin-bottom .3s var(--n-bezier);
|
|
39
|
+
padding: var(--n-padding);
|
|
40
|
+
border-radius: var(--n-border-radius);
|
|
41
|
+
border: var(--n-border);
|
|
42
|
+
flex-wrap: nowrap;
|
|
43
|
+
overflow: hidden;
|
|
44
|
+
max-width: var(--n-max-width);
|
|
45
|
+
color: var(--n-text-color);
|
|
46
|
+
background-color: var(--n-color);
|
|
47
|
+
box-shadow: var(--n-box-shadow);
|
|
48
|
+
`,[L(`content`,`
|
|
49
|
+
display: inline-block;
|
|
50
|
+
line-height: var(--n-line-height);
|
|
51
|
+
font-size: var(--n-font-size);
|
|
52
|
+
`),L(`icon`,`
|
|
53
|
+
position: relative;
|
|
54
|
+
margin: var(--n-icon-margin);
|
|
55
|
+
height: var(--n-icon-size);
|
|
56
|
+
width: var(--n-icon-size);
|
|
57
|
+
font-size: var(--n-icon-size);
|
|
58
|
+
flex-shrink: 0;
|
|
59
|
+
`,[[`default`,`info`,`success`,`warning`,`error`,`loading`].map(e=>z(`${e}-type`,[F(`> *`,`
|
|
60
|
+
color: var(--n-icon-color-${e});
|
|
61
|
+
transition: color .3s var(--n-bezier);
|
|
62
|
+
`)])),F(`> *`,`
|
|
63
|
+
position: absolute;
|
|
64
|
+
left: 0;
|
|
65
|
+
top: 0;
|
|
66
|
+
right: 0;
|
|
67
|
+
bottom: 0;
|
|
68
|
+
`,[ae()])]),L(`close`,`
|
|
69
|
+
margin: var(--n-close-margin);
|
|
70
|
+
transition:
|
|
71
|
+
background-color .3s var(--n-bezier),
|
|
72
|
+
color .3s var(--n-bezier);
|
|
73
|
+
flex-shrink: 0;
|
|
74
|
+
`,[F(`&:hover`,`
|
|
75
|
+
color: var(--n-close-icon-color-hover);
|
|
76
|
+
`),F(`&:active`,`
|
|
77
|
+
color: var(--n-close-icon-color-pressed);
|
|
78
|
+
`)])]),B(`message-container`,`
|
|
79
|
+
z-index: 6000;
|
|
80
|
+
position: fixed;
|
|
81
|
+
height: 0;
|
|
82
|
+
overflow: visible;
|
|
83
|
+
display: flex;
|
|
84
|
+
flex-direction: column;
|
|
85
|
+
align-items: center;
|
|
86
|
+
`,[z(`top`,`
|
|
87
|
+
top: 12px;
|
|
88
|
+
left: 0;
|
|
89
|
+
right: 0;
|
|
90
|
+
`),z(`top-left`,`
|
|
91
|
+
top: 12px;
|
|
92
|
+
left: 12px;
|
|
93
|
+
right: 0;
|
|
94
|
+
align-items: flex-start;
|
|
95
|
+
`),z(`top-right`,`
|
|
96
|
+
top: 12px;
|
|
97
|
+
left: 0;
|
|
98
|
+
right: 12px;
|
|
99
|
+
align-items: flex-end;
|
|
100
|
+
`),z(`bottom`,`
|
|
101
|
+
bottom: 4px;
|
|
102
|
+
left: 0;
|
|
103
|
+
right: 0;
|
|
104
|
+
justify-content: flex-end;
|
|
105
|
+
`),z(`bottom-left`,`
|
|
106
|
+
bottom: 4px;
|
|
107
|
+
left: 12px;
|
|
108
|
+
right: 0;
|
|
109
|
+
justify-content: flex-end;
|
|
110
|
+
align-items: flex-start;
|
|
111
|
+
`),z(`bottom-right`,`
|
|
112
|
+
bottom: 4px;
|
|
113
|
+
left: 0;
|
|
114
|
+
right: 12px;
|
|
115
|
+
justify-content: flex-end;
|
|
116
|
+
align-items: flex-end;
|
|
117
|
+
`)])]),nt={info:()=>s(U,null),success:()=>s(H,null),warning:()=>s(Ne,null),error:()=>s(Ae,null),default:()=>null},rt=C({name:`Message`,props:Object.assign(Object.assign({},Y),{render:Function}),setup(e){let{inlineThemeDisabled:n,mergedRtlRef:r}=P(e),{props:a,mergedClsPrefixRef:o}=i(Ie),s=oe(`Message`,r,o),c=I(`Message`,`-message`,tt,et,a,o),l=t(()=>{let{type:t}=e,{common:{cubicBezierEaseInOut:n},self:{padding:r,margin:i,maxWidth:a,iconMargin:o,closeMargin:s,closeSize:l,iconSize:u,fontSize:d,lineHeight:f,borderRadius:p,border:m,iconColorInfo:h,iconColorSuccess:g,iconColorWarning:_,iconColorError:v,iconColorLoading:y,closeIconSize:b,closeBorderRadius:x,[R(`textColor`,t)]:S,[R(`boxShadow`,t)]:C,[R(`color`,t)]:w,[R(`closeColorHover`,t)]:T,[R(`closeColorPressed`,t)]:E,[R(`closeIconColor`,t)]:D,[R(`closeIconColorPressed`,t)]:O,[R(`closeIconColorHover`,t)]:k}}=c.value;return{"--n-bezier":n,"--n-margin":i,"--n-padding":r,"--n-max-width":a,"--n-font-size":d,"--n-icon-margin":o,"--n-icon-size":u,"--n-close-icon-size":b,"--n-close-border-radius":x,"--n-close-size":l,"--n-close-margin":s,"--n-text-color":S,"--n-color":w,"--n-box-shadow":C,"--n-icon-color-info":h,"--n-icon-color-success":g,"--n-icon-color-warning":_,"--n-icon-color-error":v,"--n-icon-color-loading":y,"--n-close-color-hover":T,"--n-close-color-pressed":E,"--n-close-icon-color":D,"--n-close-icon-color-pressed":O,"--n-close-icon-color-hover":k,"--n-line-height":f,"--n-border-radius":p,"--n-border":m}}),u=n?he(`message`,t(()=>e.type[0]),l,{}):void 0;return{mergedClsPrefix:o,rtlEnabled:s,messageProviderProps:a,handleClose(){var t;(t=e.onClose)==null||t.call(e)},cssVars:n?void 0:l,themeClass:u?.themeClass,onRender:u?.onRender,placement:a.placement}},render(){let{render:e,type:t,closable:n,content:r,mergedClsPrefix:i,cssVars:a,themeClass:o,onRender:c,icon:l,handleClose:u,showIcon:d}=this;c?.();let f;return s(`div`,{class:[`${i}-message-wrapper`,o],onMouseenter:this.onMouseenter,onMouseleave:this.onMouseleave,style:[{alignItems:this.placement.startsWith(`top`)?`flex-start`:`flex-end`},a]},e?e(this.$props):s(`div`,{class:[`${i}-message ${i}-message--${t}-type`,this.rtlEnabled&&`${i}-message--rtl`]},(f=it(l,t,i,this.spinProps))&&d?s(`div`,{class:`${i}-message__icon ${i}-message__icon--${t}-type`},s(de,null,{default:()=>f})):null,s(`div`,{class:`${i}-message__content`},G(r)),n?s(Pe,{clsPrefix:i,class:`${i}-message__close`,onClick:u,absolute:!0}):null))}});function it(e,t,n,r){if(typeof e==`function`)return e();{let e=t===`loading`?s(fe,Object.assign({clsPrefix:n,strokeWidth:24,scale:.85},r)):nt[t]();return e?s(ge,{clsPrefix:n,key:t},{default:()=>e}):null}}var at=C({name:`MessageEnvironment`,props:Object.assign(Object.assign({},Y),{duration:{type:Number,default:3e3},onAfterLeave:Function,onLeave:Function,internalKey:{type:String,required:!0},onInternalAfterLeave:Function,onHide:Function,onAfterHide:Function}),setup(e){let t=null,n=y(!0);f(()=>{r()});function r(){let{duration:n}=e;n&&(t=window.setTimeout(o,n))}function i(e){e.currentTarget===e.target&&t!==null&&(window.clearTimeout(t),t=null)}function a(e){e.currentTarget===e.target&&r()}function o(){let{onHide:r}=e;n.value=!1,t&&=(window.clearTimeout(t),null),r&&r()}function s(){let{onClose:t}=e;t&&t(),o()}function c(){let{onAfterLeave:t,onInternalAfterLeave:n,onAfterHide:r,internalKey:i}=e;t&&t(),n&&n(i),r&&r()}function l(){o()}return{show:n,hide:o,handleClose:s,handleAfterLeave:c,handleMouseleave:a,handleMouseenter:i,deactivate:l}},render(){return s(je,{appear:!0,onAfterLeave:this.handleAfterLeave,onLeave:this.onLeave},{default:()=>[this.show?s(rt,{content:this.content,type:this.type,icon:this.icon,showIcon:this.showIcon,closable:this.closable,spinProps:this.spinProps,onClose:this.handleClose,onMouseenter:this.keepAliveOnHover?this.handleMouseenter:void 0,onMouseleave:this.keepAliveOnHover?this.handleMouseleave:void 0}):null]})}}),ot=C({name:`MessageProvider`,props:Object.assign(Object.assign({},I.props),{to:[String,Object],duration:{type:Number,default:3e3},keepAliveOnHover:Boolean,max:Number,placement:{type:String,default:`top`},closable:Boolean,containerClass:String,containerStyle:[String,Object]}),setup(e){let{mergedClsPrefixRef:t}=P(e),n=y([]),r=y({}),i={create(e,t){return a(e,Object.assign({type:`default`},t))},info(e,t){return a(e,Object.assign(Object.assign({},t),{type:`info`}))},success(e,t){return a(e,Object.assign(Object.assign({},t),{type:`success`}))},warning(e,t){return a(e,Object.assign(Object.assign({},t),{type:`warning`}))},error(e,t){return a(e,Object.assign(Object.assign({},t),{type:`error`}))},loading(e,t){return a(e,Object.assign(Object.assign({},t),{type:`loading`}))},destroyAll:c};o(Ie,{props:e,mergedClsPrefixRef:t}),o(Fe,i);function a(t,i){let a=V(),o=E(Object.assign(Object.assign({},i),{content:t,key:a,destroy:()=>{var e;(e=r.value[a])==null||e.hide()}})),{max:s}=e;return s&&n.value.length>=s&&n.value.shift(),n.value.push(o),o}function s(e){n.value.splice(n.value.findIndex(t=>t.key===e),1),delete r.value[e]}function c(){Object.values(r.value).forEach(e=>{e.hide()})}return Object.assign({mergedClsPrefix:t,messageRefs:r,messageList:n,handleAfterLeave:s},i)},render(){var e;return s(j,null,(e=this.$slots).default?.call(e),this.messageList.length?s(_,{to:this.to??`body`},s(`div`,{class:[`${this.mergedClsPrefix}-message-container`,`${this.mergedClsPrefix}-message-container--${this.placement}`,this.containerClass],key:`message-container`,style:this.containerStyle},this.messageList.map(e=>s(at,Object.assign({ref:t=>{t&&(this.messageRefs[e.key]=t)},internalKey:e.key,onInternalAfterLeave:this.handleAfterLeave},K(e,[`destroy`],void 0),{duration:e.duration===void 0?this.duration:e.duration,keepAliveOnHover:e.keepAliveOnHover===void 0?this.keepAliveOnHover:e.keepAliveOnHover,closable:e.closable===void 0?this.closable:e.closable}))))):null)}}),st={closeMargin:`16px 12px`,closeSize:`20px`,closeIconSize:`16px`,width:`365px`,padding:`16px`,titleFontSize:`16px`,metaFontSize:`12px`,descriptionFontSize:`12px`};function ct(e){let{textColor2:t,successColor:n,infoColor:r,warningColor:i,errorColor:a,popoverColor:o,closeIconColor:s,closeIconColorHover:c,closeIconColorPressed:l,closeColorHover:u,closeColorPressed:d,textColor1:f,textColor3:p,borderRadius:m,fontWeightStrong:h,boxShadow2:g,lineHeight:_,fontSize:v}=e;return Object.assign(Object.assign({},st),{borderRadius:m,lineHeight:_,fontSize:v,headerFontWeight:h,iconColor:t,iconColorSuccess:n,iconColorInfo:r,iconColorWarning:i,iconColorError:a,color:o,textColor:t,closeIconColor:s,closeIconColorHover:c,closeIconColorPressed:l,closeBorderRadius:m,closeColorHover:u,closeColorPressed:d,headerTextColor:f,descriptionTextColor:p,actionTextColor:t,boxShadow:g})}var lt=pe({name:`Notification`,common:ue,peers:{Scrollbar:_e},self:ct}),X=ne(`n-notification-provider`),ut=C({name:`NotificationContainer`,props:{scrollable:{type:Boolean,required:!0},placement:{type:String,required:!0}},setup(){let{mergedThemeRef:e,mergedClsPrefixRef:t,wipTransitionCountRef:n}=i(X),r=y(null);return g(()=>{var e,t;n.value>0?(e=r?.value)==null||e.classList.add(`transitioning`):(t=r?.value)==null||t.classList.remove(`transitioning`)}),{selfRef:r,mergedTheme:e,mergedClsPrefix:t,transitioning:n}},render(){let{$slots:e,scrollable:t,mergedClsPrefix:n,mergedTheme:r,placement:i}=this;return s(`div`,{ref:`selfRef`,class:[`${n}-notification-container`,t&&`${n}-notification-container--scrollable`,`${n}-notification-container--${i}`]},t?s(ve,{theme:r.peers.Scrollbar,themeOverrides:r.peerOverrides.Scrollbar,contentStyle:{overflow:`hidden`}},e):e)}}),dt={info:()=>s(U,null),success:()=>s(H,null),warning:()=>s(Ne,null),error:()=>s(Ae,null),default:()=>null},Z={closable:{type:Boolean,default:!0},type:{type:String,default:`default`},avatar:Function,title:[String,Function],description:[String,Function],content:[String,Function],meta:[String,Function],action:[String,Function],onClose:{type:Function,required:!0},keepAliveOnHover:Boolean,onMouseenter:Function,onMouseleave:Function},ft=Me(Z),pt=C({name:`Notification`,props:Z,setup(e){let{mergedClsPrefixRef:n,mergedThemeRef:r,props:a}=i(X),{inlineThemeDisabled:o,mergedRtlRef:s}=P(),c=oe(`Notification`,s,n),l=t(()=>{let{type:t}=e,{self:{color:n,textColor:i,closeIconColor:a,closeIconColorHover:o,closeIconColorPressed:s,headerTextColor:c,descriptionTextColor:l,actionTextColor:u,borderRadius:d,headerFontWeight:f,boxShadow:p,lineHeight:m,fontSize:h,closeMargin:g,closeSize:_,width:v,padding:y,closeIconSize:b,closeBorderRadius:x,closeColorHover:S,closeColorPressed:C,titleFontSize:w,metaFontSize:T,descriptionFontSize:E,[R(`iconColor`,t)]:D},common:{cubicBezierEaseOut:O,cubicBezierEaseIn:k,cubicBezierEaseInOut:A}}=r.value,{left:j,right:ee,top:te,bottom:M}=ye(y);return{"--n-color":n,"--n-font-size":h,"--n-text-color":i,"--n-description-text-color":l,"--n-action-text-color":u,"--n-title-text-color":c,"--n-title-font-weight":f,"--n-bezier":A,"--n-bezier-ease-out":O,"--n-bezier-ease-in":k,"--n-border-radius":d,"--n-box-shadow":p,"--n-close-border-radius":x,"--n-close-color-hover":S,"--n-close-color-pressed":C,"--n-close-icon-color":a,"--n-close-icon-color-hover":o,"--n-close-icon-color-pressed":s,"--n-line-height":m,"--n-icon-color":D,"--n-close-margin":g,"--n-close-size":_,"--n-close-icon-size":b,"--n-width":v,"--n-padding-left":j,"--n-padding-right":ee,"--n-padding-top":te,"--n-padding-bottom":M,"--n-title-font-size":w,"--n-meta-font-size":T,"--n-description-font-size":E}}),u=o?he(`notification`,t(()=>e.type[0]),l,a):void 0;return{mergedClsPrefix:n,showAvatar:t(()=>e.avatar||e.type!==`default`),handleCloseClick(){e.onClose()},rtlEnabled:c,cssVars:o?void 0:l,themeClass:u?.themeClass,onRender:u?.onRender}},render(){var e;let{mergedClsPrefix:t}=this;return(e=this.onRender)==null||e.call(this),s(`div`,{class:[`${t}-notification-wrapper`,this.themeClass],onMouseenter:this.onMouseenter,onMouseleave:this.onMouseleave,style:this.cssVars},s(`div`,{class:[`${t}-notification`,this.rtlEnabled&&`${t}-notification--rtl`,this.themeClass,{[`${t}-notification--closable`]:this.closable,[`${t}-notification--show-avatar`]:this.showAvatar}],style:this.cssVars},this.showAvatar?s(`div`,{class:`${t}-notification__avatar`},this.avatar?G(this.avatar):this.type===`default`?null:s(ge,{clsPrefix:t},{default:()=>dt[this.type]()})):null,this.closable?s(Pe,{clsPrefix:t,class:`${t}-notification__close`,onClick:this.handleCloseClick}):null,s(`div`,{ref:`bodyRef`,class:`${t}-notification-main`},this.title?s(`div`,{class:`${t}-notification-main__header`},G(this.title)):null,this.description?s(`div`,{class:`${t}-notification-main__description`},G(this.description)):null,this.content?s(`pre`,{class:`${t}-notification-main__content`},G(this.content)):null,this.meta||this.action?s(`div`,{class:`${t}-notification-main-footer`},this.meta?s(`div`,{class:`${t}-notification-main-footer__meta`},G(this.meta)):null,this.action?s(`div`,{class:`${t}-notification-main-footer__action`},G(this.action)):null):null)))}}),mt=Object.assign(Object.assign({},Z),{duration:Number,onClose:Function,onLeave:Function,onAfterEnter:Function,onAfterLeave:Function,onHide:Function,onAfterShow:Function,onAfterHide:Function}),ht=C({name:`NotificationEnvironment`,props:Object.assign(Object.assign({},mt),{internalKey:{type:String,required:!0},onInternalAfterLeave:{type:Function,required:!0}}),setup(e){let{wipTransitionCountRef:t}=i(X),n=y(!0),r=null;function a(){n.value=!1,r&&window.clearTimeout(r)}function o(e){t.value++,u(()=>{e.style.height=`${e.offsetHeight}px`,e.style.maxHeight=`0`,e.style.transition=`none`,e.offsetHeight,e.style.transition=``,e.style.maxHeight=e.style.height})}function s(n){t.value--,n.style.height=``,n.style.maxHeight=``;let{onAfterEnter:r,onAfterShow:i}=e;r&&r(),i&&i()}function c(e){t.value++,e.style.maxHeight=`${e.offsetHeight}px`,e.style.height=`${e.offsetHeight}px`,e.offsetHeight}function l(t){let{onHide:n}=e;n&&n(),t.style.maxHeight=`0`,t.offsetHeight}function d(){t.value--;let{onAfterLeave:n,onInternalAfterLeave:r,onAfterHide:i,internalKey:a}=e;n&&n(),r(a),i&&i()}function p(){let{duration:t}=e;t&&(r=window.setTimeout(a,t))}function m(e){e.currentTarget===e.target&&r!==null&&(window.clearTimeout(r),r=null)}function h(e){e.currentTarget===e.target&&p()}function g(){let{onClose:t}=e;t?Promise.resolve(t()).then(e=>{e!==!1&&a()}):a()}return f(()=>{e.duration&&(r=window.setTimeout(a,e.duration))}),{show:n,hide:a,handleClose:g,handleAfterLeave:d,handleLeave:l,handleBeforeLeave:c,handleAfterEnter:s,handleBeforeEnter:o,handleMouseenter:m,handleMouseleave:h}},render(){return s(b,{name:`notification-transition`,appear:!0,onBeforeEnter:this.handleBeforeEnter,onAfterEnter:this.handleAfterEnter,onBeforeLeave:this.handleBeforeLeave,onLeave:this.handleLeave,onAfterLeave:this.handleAfterLeave},{default:()=>this.show?s(pt,Object.assign({},be(this.$props,ft),{onClose:this.handleClose,onMouseenter:this.duration&&this.keepAliveOnHover?this.handleMouseenter:void 0,onMouseleave:this.duration&&this.keepAliveOnHover?this.handleMouseleave:void 0})):null})}}),gt=F([B(`notification-container`,`
|
|
118
|
+
z-index: 4000;
|
|
119
|
+
position: fixed;
|
|
120
|
+
overflow: visible;
|
|
121
|
+
display: flex;
|
|
122
|
+
flex-direction: column;
|
|
123
|
+
align-items: flex-end;
|
|
124
|
+
`,[F(`>`,[B(`scrollbar`,`
|
|
125
|
+
width: initial;
|
|
126
|
+
overflow: visible;
|
|
127
|
+
height: -moz-fit-content !important;
|
|
128
|
+
height: fit-content !important;
|
|
129
|
+
max-height: 100vh !important;
|
|
130
|
+
`,[F(`>`,[B(`scrollbar-container`,`
|
|
131
|
+
height: -moz-fit-content !important;
|
|
132
|
+
height: fit-content !important;
|
|
133
|
+
max-height: 100vh !important;
|
|
134
|
+
`,[B(`scrollbar-content`,`
|
|
135
|
+
padding-top: 12px;
|
|
136
|
+
padding-bottom: 33px;
|
|
137
|
+
`)])])])]),z(`top, top-right, top-left`,`
|
|
138
|
+
top: 12px;
|
|
139
|
+
`,[F(`&.transitioning >`,[B(`scrollbar`,[F(`>`,[B(`scrollbar-container`,`
|
|
140
|
+
min-height: 100vh !important;
|
|
141
|
+
`)])])])]),z(`bottom, bottom-right, bottom-left`,`
|
|
142
|
+
bottom: 12px;
|
|
143
|
+
`,[F(`>`,[B(`scrollbar`,[F(`>`,[B(`scrollbar-container`,[B(`scrollbar-content`,`
|
|
144
|
+
padding-bottom: 12px;
|
|
145
|
+
`)])])])]),B(`notification-wrapper`,`
|
|
146
|
+
display: flex;
|
|
147
|
+
align-items: flex-end;
|
|
148
|
+
margin-bottom: 0;
|
|
149
|
+
margin-top: 12px;
|
|
150
|
+
`)]),z(`top, bottom`,`
|
|
151
|
+
left: 50%;
|
|
152
|
+
transform: translateX(-50%);
|
|
153
|
+
`,[B(`notification-wrapper`,[F(`&.notification-transition-enter-from, &.notification-transition-leave-to`,`
|
|
154
|
+
transform: scale(0.85);
|
|
155
|
+
`),F(`&.notification-transition-leave-from, &.notification-transition-enter-to`,`
|
|
156
|
+
transform: scale(1);
|
|
157
|
+
`)])]),z(`top`,[B(`notification-wrapper`,`
|
|
158
|
+
transform-origin: top center;
|
|
159
|
+
`)]),z(`bottom`,[B(`notification-wrapper`,`
|
|
160
|
+
transform-origin: bottom center;
|
|
161
|
+
`)]),z(`top-right, bottom-right`,[B(`notification`,`
|
|
162
|
+
margin-left: 28px;
|
|
163
|
+
margin-right: 16px;
|
|
164
|
+
`)]),z(`top-left, bottom-left`,[B(`notification`,`
|
|
165
|
+
margin-left: 16px;
|
|
166
|
+
margin-right: 28px;
|
|
167
|
+
`)]),z(`top-right`,`
|
|
168
|
+
right: 0;
|
|
169
|
+
`,[Q(`top-right`)]),z(`top-left`,`
|
|
170
|
+
left: 0;
|
|
171
|
+
`,[Q(`top-left`)]),z(`bottom-right`,`
|
|
172
|
+
right: 0;
|
|
173
|
+
`,[Q(`bottom-right`)]),z(`bottom-left`,`
|
|
174
|
+
left: 0;
|
|
175
|
+
`,[Q(`bottom-left`)]),z(`scrollable`,[z(`top-right`,`
|
|
176
|
+
top: 0;
|
|
177
|
+
`),z(`top-left`,`
|
|
178
|
+
top: 0;
|
|
179
|
+
`),z(`bottom-right`,`
|
|
180
|
+
bottom: 0;
|
|
181
|
+
`),z(`bottom-left`,`
|
|
182
|
+
bottom: 0;
|
|
183
|
+
`)]),B(`notification-wrapper`,`
|
|
184
|
+
margin-bottom: 12px;
|
|
185
|
+
`,[F(`&.notification-transition-enter-from, &.notification-transition-leave-to`,`
|
|
186
|
+
opacity: 0;
|
|
187
|
+
margin-top: 0 !important;
|
|
188
|
+
margin-bottom: 0 !important;
|
|
189
|
+
`),F(`&.notification-transition-leave-from, &.notification-transition-enter-to`,`
|
|
190
|
+
opacity: 1;
|
|
191
|
+
`),F(`&.notification-transition-leave-active`,`
|
|
192
|
+
transition:
|
|
193
|
+
background-color .3s var(--n-bezier),
|
|
194
|
+
color .3s var(--n-bezier),
|
|
195
|
+
opacity .3s var(--n-bezier),
|
|
196
|
+
transform .3s var(--n-bezier-ease-in),
|
|
197
|
+
max-height .3s var(--n-bezier),
|
|
198
|
+
margin-top .3s linear,
|
|
199
|
+
margin-bottom .3s linear,
|
|
200
|
+
box-shadow .3s var(--n-bezier);
|
|
201
|
+
`),F(`&.notification-transition-enter-active`,`
|
|
202
|
+
transition:
|
|
203
|
+
background-color .3s var(--n-bezier),
|
|
204
|
+
color .3s var(--n-bezier),
|
|
205
|
+
opacity .3s var(--n-bezier),
|
|
206
|
+
transform .3s var(--n-bezier-ease-out),
|
|
207
|
+
max-height .3s var(--n-bezier),
|
|
208
|
+
margin-top .3s linear,
|
|
209
|
+
margin-bottom .3s linear,
|
|
210
|
+
box-shadow .3s var(--n-bezier);
|
|
211
|
+
`)]),B(`notification`,`
|
|
212
|
+
background-color: var(--n-color);
|
|
213
|
+
color: var(--n-text-color);
|
|
214
|
+
transition:
|
|
215
|
+
background-color .3s var(--n-bezier),
|
|
216
|
+
color .3s var(--n-bezier),
|
|
217
|
+
opacity .3s var(--n-bezier),
|
|
218
|
+
box-shadow .3s var(--n-bezier);
|
|
219
|
+
font-family: inherit;
|
|
220
|
+
font-size: var(--n-font-size);
|
|
221
|
+
font-weight: 400;
|
|
222
|
+
position: relative;
|
|
223
|
+
display: flex;
|
|
224
|
+
overflow: hidden;
|
|
225
|
+
flex-shrink: 0;
|
|
226
|
+
padding-left: var(--n-padding-left);
|
|
227
|
+
padding-right: var(--n-padding-right);
|
|
228
|
+
width: var(--n-width);
|
|
229
|
+
max-width: calc(100vw - 16px - 16px);
|
|
230
|
+
border-radius: var(--n-border-radius);
|
|
231
|
+
box-shadow: var(--n-box-shadow);
|
|
232
|
+
box-sizing: border-box;
|
|
233
|
+
opacity: 1;
|
|
234
|
+
`,[L(`avatar`,[B(`icon`,`
|
|
235
|
+
color: var(--n-icon-color);
|
|
236
|
+
`),B(`base-icon`,`
|
|
237
|
+
color: var(--n-icon-color);
|
|
238
|
+
`)]),z(`show-avatar`,[B(`notification-main`,`
|
|
239
|
+
margin-left: 40px;
|
|
240
|
+
width: calc(100% - 40px);
|
|
241
|
+
`)]),z(`closable`,[B(`notification-main`,[F(`> *:first-child`,`
|
|
242
|
+
padding-right: 20px;
|
|
243
|
+
`)]),L(`close`,`
|
|
244
|
+
position: absolute;
|
|
245
|
+
top: 0;
|
|
246
|
+
right: 0;
|
|
247
|
+
margin: var(--n-close-margin);
|
|
248
|
+
transition:
|
|
249
|
+
background-color .3s var(--n-bezier),
|
|
250
|
+
color .3s var(--n-bezier);
|
|
251
|
+
`)]),L(`avatar`,`
|
|
252
|
+
position: absolute;
|
|
253
|
+
top: var(--n-padding-top);
|
|
254
|
+
left: var(--n-padding-left);
|
|
255
|
+
width: 28px;
|
|
256
|
+
height: 28px;
|
|
257
|
+
font-size: 28px;
|
|
258
|
+
display: flex;
|
|
259
|
+
align-items: center;
|
|
260
|
+
justify-content: center;
|
|
261
|
+
`,[B(`icon`,`transition: color .3s var(--n-bezier);`)]),B(`notification-main`,`
|
|
262
|
+
padding-top: var(--n-padding-top);
|
|
263
|
+
padding-bottom: var(--n-padding-bottom);
|
|
264
|
+
box-sizing: border-box;
|
|
265
|
+
display: flex;
|
|
266
|
+
flex-direction: column;
|
|
267
|
+
margin-left: 8px;
|
|
268
|
+
width: calc(100% - 8px);
|
|
269
|
+
`,[B(`notification-main-footer`,`
|
|
270
|
+
display: flex;
|
|
271
|
+
align-items: center;
|
|
272
|
+
justify-content: space-between;
|
|
273
|
+
margin-top: 12px;
|
|
274
|
+
`,[L(`meta`,`
|
|
275
|
+
font-size: var(--n-meta-font-size);
|
|
276
|
+
transition: color .3s var(--n-bezier-ease-out);
|
|
277
|
+
color: var(--n-description-text-color);
|
|
278
|
+
`),L(`action`,`
|
|
279
|
+
cursor: pointer;
|
|
280
|
+
transition: color .3s var(--n-bezier-ease-out);
|
|
281
|
+
color: var(--n-action-text-color);
|
|
282
|
+
`)]),L(`header`,`
|
|
283
|
+
font-weight: var(--n-title-font-weight);
|
|
284
|
+
font-size: var(--n-title-font-size);
|
|
285
|
+
transition: color .3s var(--n-bezier-ease-out);
|
|
286
|
+
color: var(--n-title-text-color);
|
|
287
|
+
`),L(`description`,`
|
|
288
|
+
margin-top: 8px;
|
|
289
|
+
font-size: var(--n-description-font-size);
|
|
290
|
+
white-space: pre-wrap;
|
|
291
|
+
word-wrap: break-word;
|
|
292
|
+
transition: color .3s var(--n-bezier-ease-out);
|
|
293
|
+
color: var(--n-description-text-color);
|
|
294
|
+
`),L(`content`,`
|
|
295
|
+
line-height: var(--n-line-height);
|
|
296
|
+
margin: 12px 0 0 0;
|
|
297
|
+
font-family: inherit;
|
|
298
|
+
white-space: pre-wrap;
|
|
299
|
+
word-wrap: break-word;
|
|
300
|
+
transition: color .3s var(--n-bezier-ease-out);
|
|
301
|
+
color: var(--n-text-color);
|
|
302
|
+
`,[F(`&:first-child`,`margin: 0;`)])])])])]);function Q(e){return B(`notification-wrapper`,[F(`&.notification-transition-enter-from, &.notification-transition-leave-to`,`
|
|
303
|
+
transform: translate(${e.split(`-`)[1]===`left`?`calc(-100%)`:`calc(100%)`}, 0);
|
|
304
|
+
`),F(`&.notification-transition-leave-from, &.notification-transition-enter-to`,`
|
|
305
|
+
transform: translate(0, 0);
|
|
306
|
+
`)])}var _t=ne(`n-notification-api`),vt=C({name:`NotificationProvider`,props:Object.assign(Object.assign({},I.props),{containerClass:String,containerStyle:[String,Object],to:[String,Object],scrollable:{type:Boolean,default:!0},max:Number,placement:{type:String,default:`top-right`},keepAliveOnHover:Boolean}),setup(e){let{mergedClsPrefixRef:t}=P(e),n=y([]),r={},i=new Set;function a(t){let a=V(),o=()=>{i.add(a),r[a]&&r[a].hide()},s=E(Object.assign(Object.assign({},t),{key:a,destroy:o,hide:o,deactivate:o})),{max:c}=e;if(c&&n.value.length-i.size>=c){let e=!1,t=0;for(let a of n.value){if(!i.has(a.key)){r[a.key]&&(a.destroy(),e=!0);break}t++}e||n.value.splice(t,1)}return n.value.push(s),s}let s=[`info`,`success`,`warning`,`error`].map(e=>t=>a(Object.assign(Object.assign({},t),{type:e})));function c(e){i.delete(e),n.value.splice(n.value.findIndex(t=>t.key===e),1)}let l=I(`Notification`,`-notification`,gt,lt,e,t),u={create:a,info:s[0],success:s[1],warning:s[2],error:s[3],open:f,destroyAll:p},d=y(0);o(_t,u),o(X,{props:e,mergedClsPrefixRef:t,mergedThemeRef:l,wipTransitionCountRef:d});function f(e){return a(e)}function p(){Object.values(n.value).forEach(e=>{e.hide()})}return Object.assign({mergedClsPrefix:t,notificationList:n,notificationRefs:r,handleAfterLeave:c},u)},render(){var e;let{placement:t}=this;return s(j,null,(e=this.$slots).default?.call(e),this.notificationList.length?s(_,{to:this.to??`body`},s(ut,{class:this.containerClass,style:this.containerStyle,scrollable:this.scrollable&&t!==`top`&&t!==`bottom`,placement:t},{default:()=>this.notificationList.map(e=>s(ht,Object.assign({ref:t=>{let n=e.key;t===null?delete this.notificationRefs[n]:this.notificationRefs[n]=t}},K(e,[`destroy`,`hide`,`deactivate`]),{internalKey:e.key,onInternalAfterLeave:this.handleAfterLeave,keepAliveOnHover:e.keepAliveOnHover===void 0?this.keepAliveOnHover:e.keepAliveOnHover})))})):null)}}),yt={common:{primaryColor:`#333333`,primaryColorHover:`#1a1a1a`,primaryColorPressed:`#000000`,primaryColorSuppl:`#333333`,bodyColor:`#fafafa`,cardColor:`#ffffff`,modalColor:`#ffffff`,popoverColor:`#ffffff`,tableColor:`#ffffff`,inputColor:`#ffffff`,actionColor:`#f0f0f0`,textColorBase:`#1a1a1a`,textColor1:`#1a1a1a`,textColor2:`#666666`,textColor3:`#999999`,dividerColor:`#e0e0e0`,borderColor:`#e0e0e0`,hoverColor:`rgba(0, 0, 0, 0.04)`,borderRadius:`8px`,borderRadiusSmall:`6px`,fontSize:`14px`,fontSizeMedium:`14px`,heightMedium:`36px`,fontFamily:`Inter, system-ui, -apple-system, sans-serif`,fontFamilyMono:`JetBrains Mono, Fira Code, Consolas, monospace`},Layout:{color:`#fafafa`,siderColor:`#f5f5f5`,headerColor:`#fafafa`},Menu:{itemTextColorActive:`#1a1a1a`,itemTextColorActiveHover:`#1a1a1a`,itemTextColorChildActive:`#1a1a1a`,itemIconColorActive:`#1a1a1a`,itemIconColorActiveHover:`#000000`,itemColorActive:`rgba(0, 0, 0, 0.06)`,itemColorActiveHover:`rgba(0, 0, 0, 0.1)`,arrowColorActive:`#1a1a1a`},Button:{textColorPrimary:`#ffffff`,colorPrimary:`#333333`,colorHoverPrimary:`#1a1a1a`,colorPressedPrimary:`#000000`},Input:{color:`#ffffff`,colorFocus:`#ffffff`,border:`1px solid #e0e0e0`,borderHover:`1px solid #999999`,borderFocus:`1px solid #333333`,placeholderColor:`#999999`,caretColor:`#1a1a1a`},Card:{color:`#ffffff`,borderColor:`#e0e0e0`},Modal:{color:`#ffffff`},Tag:{borderRadius:`6px`}},bt={class:`model-selector`},xt={class:`model-label`},St=N(C({__name:`ModelSelector`,setup(r){let{t:i}=M(),o=q(),s=t(()=>o.modelGroups.map(e=>({label:e.label,type:`group`,key:e.provider,children:e.models.map(e=>({label:e,value:e}))})));function c(e){typeof e==`string`&&o.switchModel(e)}return(t,r)=>(a(),n(`div`,bt,[A(`div`,xt,x(O(i)(`models.title`)),1),e(O(W),{value:O(o).selectedModel,options:s.value,size:`small`,"onUpdate:value":c},null,8,[`value`,`options`])]))}}),[[`__scopeId`,`data-v-724ec6a4`]]),Ct={class:`profile-selector`},wt={class:`selector-label`},Tt=N(C({__name:`ProfileSelector`,setup(r){let{t:i}=M(),o=Re(),s=t(()=>o.profiles.map(e=>({label:e.name,value:e.name}))),c=t(()=>o.activeProfile?.name??``);function l(e){typeof e==`string`&&e!==c.value&&o.switchProfile(e).then(e=>{e&&window.location.reload()})}return f(()=>{o.profiles.length===0&&o.fetchProfiles()}),(t,r)=>(a(),n(`div`,Ct,[A(`div`,wt,x(O(i)(`sidebar.profiles`)),1),e(O(W),{value:c.value,options:s.value,loading:O(o).switching,size:`small`,"onUpdate:value":l},null,8,[`value`,`options`,`loading`])]))}}),[[`__scopeId`,`data-v-3d150b4a`]]),Et=C({__name:`LanguageSwitch`,setup(e){let{locale:n,availableLocales:r,t:i}=M(),o=t(()=>r.map(e=>({label:i(e===`zh`?`language.zh`:`language.en`),value:e})));function s(e){n.value=e,localStorage.setItem(`hermes_locale`,e)}return(e,t)=>(a(),d(O(W),{value:O(n),options:o.value,size:`tiny`,"consistent-menu-width":!1,class:`input-sm`,"onUpdate:value":s},null,8,[`value`,`options`]))}}),Dt=`/assets/dance-gGRu7JHG.mp4`,Ot={class:`sidebar-nav`},kt={class:`sidebar-footer`},At={class:`status-row`},jt={class:`status-text`},Mt={class:`version-info`},Nt=N(C({__name:`AppSidebar`,setup(i){let{t:o}=M(),s=Le(),l=v(),u=w(),d=q(),m=y(),h=t(()=>l.name);f(()=>{let e=m.value;if(!e)return;let t=e.getContext(`2d`);if(!t)return;let n=document.createElement(`video`);n.src=Dt,n.muted=!0,n.playsInline=!0,n.autoplay=!0,n.addEventListener(`loadeddata`,()=>{e.width=n.videoWidth,e.height=n.videoHeight});function r(){n.readyState>=2&&t&&e&&t.drawImage(n,0,0,e.width,e.height),n.currentTime>=n.duration-.05&&(n.currentTime=0),requestAnimationFrame(r)}n.addEventListener(`canplay`,()=>{r()}),n.play();let i=()=>{document.visibilityState===`visible`&&n.paused&&n.play()};document.addEventListener(`visibilitychange`,i),p(()=>{document.removeEventListener(`visibilitychange`,i)})});function g(e){u.push({name:e})}async function _(){await d.doUpdate()?s.success(o(`sidebar.updateSuccess`),{duration:5e3}):s.error(o(`sidebar.updateFailed`))}return(t,i)=>(a(),n(`aside`,{class:T([`sidebar`,{open:O(d).sidebarOpen}])},[A(`div`,{class:`sidebar-logo`,onClick:i[0]||=e=>O(u).push(`/hermes/chat`)},[i[12]||=A(`img`,{src:`/logo.png`,alt:`Hermes`,class:`logo-img`},null,-1),i[13]||=A(`span`,{class:`logo-text`},`Hermes`,-1),A(`canvas`,{ref_key:`canvasRef`,ref:m,class:`logo-dance`},null,512)]),A(`nav`,Ot,[A(`button`,{class:T([`nav-item`,{active:h.value===`hermes.chat`}]),onClick:i[1]||=e=>g(`hermes.chat`)},[i[14]||=A(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[A(`path`,{d:`M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z`})],-1),A(`span`,null,x(O(o)(`sidebar.chat`)),1)],2),A(`button`,{class:T([`nav-item`,{active:h.value===`hermes.jobs`}]),onClick:i[2]||=e=>g(`hermes.jobs`)},[i[15]||=c(`<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" data-v-6f4995e5><rect x="3" y="4" width="18" height="18" rx="2" ry="2" data-v-6f4995e5></rect><line x1="16" y1="2" x2="16" y2="6" data-v-6f4995e5></line><line x1="8" y1="2" x2="8" y2="6" data-v-6f4995e5></line><line x1="3" y1="10" x2="21" y2="10" data-v-6f4995e5></line></svg>`,1),A(`span`,null,x(O(o)(`sidebar.jobs`)),1)],2),A(`button`,{class:T([`nav-item`,{active:h.value===`hermes.models`}]),onClick:i[3]||=e=>g(`hermes.models`)},[i[16]||=c(`<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" data-v-6f4995e5><circle cx="12" cy="12" r="3" data-v-6f4995e5></circle><path d="M12 1v4" data-v-6f4995e5></path><path d="M12 19v4" data-v-6f4995e5></path><path d="M1 12h4" data-v-6f4995e5></path><path d="M19 12h4" data-v-6f4995e5></path><path d="M4.22 4.22l2.83 2.83" data-v-6f4995e5></path><path d="M16.95 16.95l2.83 2.83" data-v-6f4995e5></path><path d="M4.22 19.78l2.83-2.83" data-v-6f4995e5></path><path d="M16.95 7.05l2.83-2.83" data-v-6f4995e5></path></svg>`,1),A(`span`,null,x(O(o)(`sidebar.models`)),1)],2),A(`button`,{class:T([`nav-item`,{active:h.value===`hermes.channels`}]),onClick:i[4]||=e=>g(`hermes.channels`)},[i[17]||=A(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[A(`path`,{d:`M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z`})],-1),A(`span`,null,x(O(o)(`sidebar.channels`)),1)],2),A(`button`,{class:T([`nav-item`,{active:h.value===`hermes.skills`}]),onClick:i[5]||=e=>g(`hermes.skills`)},[i[18]||=A(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[A(`polygon`,{points:`12 2 2 7 12 12 22 7 12 2`}),A(`polyline`,{points:`2 17 12 22 22 17`}),A(`polyline`,{points:`2 12 12 17 22 12`})],-1),A(`span`,null,x(O(o)(`sidebar.skills`)),1)],2),A(`button`,{class:T([`nav-item`,{active:h.value===`hermes.memory`}]),onClick:i[6]||=e=>g(`hermes.memory`)},[i[19]||=A(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[A(`path`,{d:`M9 18h6`}),A(`path`,{d:`M10 22h4`}),A(`path`,{d:`M12 2a7 7 0 0 0-4 12.7V17h8v-2.3A7 7 0 0 0 12 2z`})],-1),A(`span`,null,x(O(o)(`sidebar.memory`)),1)],2),A(`button`,{class:T([`nav-item`,{active:h.value===`hermes.logs`}]),onClick:i[7]||=e=>g(`hermes.logs`)},[i[20]||=c(`<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" data-v-6f4995e5><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" data-v-6f4995e5></path><polyline points="14 2 14 8 20 8" data-v-6f4995e5></polyline><line x1="16" y1="13" x2="8" y2="13" data-v-6f4995e5></line><line x1="16" y1="17" x2="8" y2="17" data-v-6f4995e5></line><polyline points="10 9 9 9 8 9" data-v-6f4995e5></polyline></svg>`,1),A(`span`,null,x(O(o)(`sidebar.logs`)),1)],2),A(`button`,{class:T([`nav-item`,{active:h.value===`hermes.usage`}]),onClick:i[8]||=e=>g(`hermes.usage`)},[i[21]||=A(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[A(`rect`,{x:`3`,y:`12`,width:`4`,height:`9`,rx:`1`}),A(`rect`,{x:`10`,y:`7`,width:`4`,height:`14`,rx:`1`}),A(`rect`,{x:`17`,y:`3`,width:`4`,height:`18`,rx:`1`})],-1),A(`span`,null,x(O(o)(`sidebar.usage`)),1)],2),A(`button`,{class:T([`nav-item`,{active:h.value===`hermes.profiles`}]),onClick:i[9]||=e=>g(`hermes.profiles`)},[i[22]||=A(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[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(`span`,null,x(O(o)(`sidebar.profiles`)),1)],2),A(`button`,{class:T([`nav-item`,{active:h.value===`hermes.terminal`}]),onClick:i[10]||=e=>g(`hermes.terminal`)},[i[23]||=A(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[A(`polyline`,{points:`4 17 10 11 4 5`}),A(`line`,{x1:`12`,y1:`19`,x2:`20`,y2:`19`})],-1),A(`span`,null,x(O(o)(`sidebar.terminal`)),1)],2),A(`button`,{class:T([`nav-item`,{active:h.value===`hermes.settings`}]),onClick:i[11]||=e=>g(`hermes.settings`)},[i[24]||=A(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[A(`circle`,{cx:`12`,cy:`12`,r:`3`}),A(`path`,{d:`M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z`})],-1),A(`span`,null,x(O(o)(`sidebar.settings`)),1)],2)]),e(Tt),e(St),A(`div`,kt,[A(`div`,At,[A(`div`,{class:T([`status-indicator`,{connected:O(d).connected,disconnected:!O(d).connected}])},[i[25]||=A(`span`,{class:`status-dot`},null,-1),A(`span`,jt,x(O(d).connected?O(o)(`sidebar.connected`):O(o)(`sidebar.disconnected`)),1)],2),e(Et)]),A(`div`,Mt,[A(`span`,null,`Hermes Web UI v`+x(O(d).serverVersion||`0.1.0`),1),O(d).updateAvailable?(a(),n(`a`,{key:0,class:T([`update-hint`,{loading:O(d).updating}]),onClick:_},x(O(d).updating?O(o)(`sidebar.updating`):O(o)(`sidebar.updateVersion`,{version:O(d).latestVersion})),3)):r(``,!0)])])],2))}}),[[`__scopeId`,`data-v-6f4995e5`]]);function Pt(){let e=w(),t=ze();function n(n){let r=n.ctrlKey||n.metaKey;if(r&&n.key===`n`&&(n.preventDefault(),t.newChat()),r&&n.key===`j`&&(n.preventDefault(),e.push({name:`hermes.jobs`})),n.key===`Escape`){let e=document.querySelector(`.n-modal-mask`);e&&e.querySelector(`.n-base-close`)?.click()}}f(()=>{window.addEventListener(`keydown`,n)}),p(()=>{window.removeEventListener(`keydown`,n)})}var Ft={class:`app-main`},It=N(C({__name:`App`,setup(i){let o=q(),s=v(),c=w(),u=y(!1),g=t(()=>s.name===`login`);return m(()=>s.path,()=>{o.closeSidebar()}),c.isReady().then(()=>{u.value=!0}),f(()=>{g.value||(o.loadModels(),o.startHealthPolling())}),p(()=>{o.stopHealthPolling()}),Pt(),(t,i)=>{let s=h(`router-view`);return a(),d(O(Je),{"theme-overrides":O(yt)},{default:l(()=>[e(O(ot),null,{default:l(()=>[e(O(Ze),null,{default:l(()=>[e(O(vt),null,{default:l(()=>[u.value?(a(),n(`div`,{key:0,class:T([`app-layout`,{"no-sidebar":g.value}])},[g.value?r(``,!0):(a(),n(`button`,{key:0,class:`hamburger-btn`,onClick:i[0]||=(...e)=>O(o).toggleSidebar&&O(o).toggleSidebar(...e)},[...i[2]||=[A(`img`,{src:`/logo.png`,alt:`Menu`,style:{width:`24px`,height:`24px`}},null,-1)]])),!g.value&&O(o).sidebarOpen?(a(),n(`div`,{key:1,class:`mobile-backdrop`,onClick:i[1]||=(...e)=>O(o).closeSidebar&&O(o).closeSidebar(...e)})):r(``,!0),g.value?r(``,!0):(a(),d(Nt,{key:2})),A(`main`,Ft,[e(s)])],2)):r(``,!0)]),_:1})]),_:1})]),_:1})]),_:1},8,[`theme-overrides`])}}}),[[`__scopeId`,`data-v-a9771c7c`]]),Lt=new URLSearchParams(window.location.search),Rt=window.location.hash.split(`?`)[1],zt=Lt.get(`token`)||(Rt?new URLSearchParams(Rt).get(`token`):null);zt&&(window.__LOGIN_TOKEN__=zt);var $=D(It);$.use(ee()),$.use(We),$.use(k),$.mount(`#app`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e,vt as t}from"./router-
|
|
1
|
+
import{o as e,vt as t}from"./router-mPoLLYeq.js";var n=t({createJob:()=>o,deleteJob:()=>c,getJob:()=>a,listJobs:()=>i,pauseJob:()=>l,resumeJob:()=>u,runJob:()=>d,updateJob:()=>s});function r(e){return e.job}async function i(){return(await e(`/api/hermes/jobs?include_disabled=true`)).jobs}async function a(t){return r(await e(`/api/hermes/jobs/${t}`))}async function o(t){return r(await e(`/api/hermes/jobs`,{method:`POST`,body:JSON.stringify(t)}))}async function s(t,n){return r(await e(`/api/hermes/jobs/${t}`,{method:`PATCH`,body:JSON.stringify(n)}))}async function c(t){return e(`/api/hermes/jobs/${t}`,{method:`DELETE`})}async function l(t){return r(await e(`/api/hermes/jobs/${t}/pause`,{method:`POST`}))}async function u(t){return r(await e(`/api/hermes/jobs/${t}/resume`,{method:`POST`}))}async function d(t){return r(await e(`/api/hermes/jobs/${t}/run`,{method:`POST`}))}export{l as a,s as c,i,c as n,u as o,n as r,d as s,o as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as e,F as t,P as n,R as r,X as i,at as a,ct as o,et as s,ft as c,it as l,nt as u,ot as d,rt as f,tt as p,ut as m}from"./router-
|
|
1
|
+
import{C as e,F as t,P as n,R as r,X as i,at as a,ct as o,et as s,ft as c,it as l,nt as u,ot as d,rt as f,tt as p,ut as m}from"./router-mPoLLYeq.js";var h=typeof window<`u`,g,_=e=>g=e,v=Symbol();function y(e){return e&&typeof e==`object`&&Object.prototype.toString.call(e)===`[object Object]`&&typeof e.toJSON!=`function`}var b;(function(e){e.direct=`direct`,e.patchObject=`patch object`,e.patchFunction=`patch function`})(b||={});var x=typeof window==`object`&&window.window===window?window:typeof self==`object`&&self.self===self?self:typeof global==`object`&&global.global===global?global:typeof globalThis==`object`?globalThis:{HTMLElement:null};function S(e,{autoBom:t=!1}={}){return t&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob([``,e],{type:e.type}):e}function C(e,t,n){let r=new XMLHttpRequest;r.open(`GET`,e),r.responseType=`blob`,r.onload=function(){O(r.response,t,n)},r.onerror=function(){console.error(`could not download file`)},r.send()}function w(e){let t=new XMLHttpRequest;t.open(`HEAD`,e,!1);try{t.send()}catch{}return t.status>=200&&t.status<=299}function T(e){try{e.dispatchEvent(new MouseEvent(`click`))}catch{let t=new MouseEvent(`click`,{bubbles:!0,cancelable:!0,view:window,detail:0,screenX:80,screenY:20,clientX:80,clientY:20,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:null});e.dispatchEvent(t)}}var E=typeof navigator==`object`?navigator:{userAgent:``},D=/Macintosh/.test(E.userAgent)&&/AppleWebKit/.test(E.userAgent)&&!/Safari/.test(E.userAgent),O=h?typeof HTMLAnchorElement<`u`&&`download`in HTMLAnchorElement.prototype&&!D?k:`msSaveOrOpenBlob`in E?A:j:()=>{};function k(e,t=`download`,n){let r=document.createElement(`a`);r.download=t,r.rel=`noopener`,typeof e==`string`?(r.href=e,r.origin===location.origin?T(r):w(r.href)?C(e,t,n):(r.target=`_blank`,T(r))):(r.href=URL.createObjectURL(e),setTimeout(function(){URL.revokeObjectURL(r.href)},4e4),setTimeout(function(){T(r)},0))}function A(e,t=`download`,n){if(typeof e==`string`)if(w(e))C(e,t,n);else{let t=document.createElement(`a`);t.href=e,t.target=`_blank`,setTimeout(function(){T(t)})}else navigator.msSaveOrOpenBlob(S(e,n),t)}function j(e,t,n,r){if(r||=open(``,`_blank`),r&&(r.document.title=r.document.body.innerText=`downloading...`),typeof e==`string`)return C(e,t,n);let i=e.type===`application/octet-stream`,a=/constructor/i.test(String(x.HTMLElement))||`safari`in x,o=/CriOS\/[\d]+/.test(navigator.userAgent);if((o||i&&a||D)&&typeof FileReader<`u`){let t=new FileReader;t.onloadend=function(){let e=t.result;if(typeof e!=`string`)throw r=null,Error(`Wrong reader.result type`);e=o?e:e.replace(/^data:[^;]*;/,`data:attachment/file;`),r?r.location.href=e:location.assign(e),r=null},t.readAsDataURL(e)}else{let t=URL.createObjectURL(e);r?r.location.assign(t):location.href=t,r=null,setTimeout(function(){URL.revokeObjectURL(t)},4e4)}}var{assign:M}=Object;function N(){let e=s(!0),t=e.run(()=>o({})),n=[],r=[],i=l({install(e){_(i),i._a=e,e.provide(v,i),e.config.globalProperties.$pinia=i,r.forEach(e=>n.push(e)),r=[]},use(e){return this._a?n.push(e):r.push(e),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return i}var P=()=>{};function F(e,t,n,r=P){e.add(t);let i=()=>{e.delete(t)&&r()};return!n&&p()&&a(i),i}function I(e,...t){e.forEach(e=>{e(...t)})}var L=e=>e(),R=Symbol(),z=Symbol();function B(e,t){e instanceof Map&&t instanceof Map?t.forEach((t,n)=>e.set(n,t)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(let n in t){if(!t.hasOwnProperty(n))continue;let r=t[n],i=e[n];y(i)&&y(r)&&e.hasOwnProperty(n)&&!f(r)&&!u(r)?e[n]=B(i,r):e[n]=r}return e}var V=Symbol();function H(e){return!y(e)||!Object.prototype.hasOwnProperty.call(e,V)}var{assign:U}=Object;function W(e){return!!(f(e)&&e.effect)}function G(t,n,r,i){let{state:a,actions:o,getters:s}=n,u=r.state.value[t],d;function f(){return u||(r.state.value[t]=a?a():{}),U(c(r.state.value[t]),o,Object.keys(s||{}).reduce((n,i)=>(n[i]=l(e(()=>{_(r);let e=r._s.get(t);return s[i].call(e,e)})),n),{}))}return d=K(t,f,n,r,i,!0),d}function K(e,t,n={},a,c,l){let p,h=U({actions:{}},n),g={deep:!0},v,y,x=new Set,S=new Set,C=a.state.value[e];!l&&!C&&(a.state.value[e]={}),o({});let w;function T(t){let n;v=y=!1,typeof t==`function`?(t(a.state.value[e]),n={type:b.patchFunction,storeId:e,events:void 0}):(B(a.state.value[e],t),n={type:b.patchObject,payload:t,storeId:e,events:void 0});let i=w=Symbol();r().then(()=>{w===i&&(v=!0)}),y=!0,I(x,n,a.state.value[e])}let E=l?function(){let{state:e}=n,t=e?e():{};this.$patch(e=>{U(e,t)})}:P;function D(){p.stop(),x.clear(),S.clear(),a._s.delete(e)}let O=(t,n=``)=>{if(R in t)return t[z]=n,t;let r=function(){_(a);let n=Array.from(arguments),i=new Set,o=new Set;function s(e){i.add(e)}function c(e){o.add(e)}I(S,{args:n,name:r[z],store:k,after:s,onError:c});let l;try{l=t.apply(this&&this.$id===e?this:k,n)}catch(e){throw I(o,e),e}return l instanceof Promise?l.then(e=>(I(i,e),e)).catch(e=>(I(o,e),Promise.reject(e))):(I(i,l),l)};return r[R]=!0,r[z]=n,r},k=d({_p:a,$id:e,$onAction:F.bind(null,S),$patch:T,$reset:E,$subscribe(t,n={}){let r=F(x,t,n.detached,()=>o()),o=p.run(()=>i(()=>a.state.value[e],r=>{(n.flush===`sync`?y:v)&&t({storeId:e,type:b.direct,events:void 0},r)},U({},g,n)));return r},$dispose:D});a._s.set(e,k);let A=(a._a&&a._a.runWithContext||L)(()=>a._e.run(()=>(p=s()).run(()=>t({action:O}))));for(let t in A){let n=A[t];f(n)&&!W(n)||u(n)?l||(C&&H(n)&&(f(n)?n.value=C[t]:B(n,C[t])),a.state.value[e][t]=n):typeof n==`function`&&(A[t]=O(n,t),h.actions[t]=n)}return U(k,A),U(m(k),A),Object.defineProperty(k,`$state`,{get:()=>a.state.value[e],set:e=>{T(t=>{U(t,e)})}}),a._p.forEach(e=>{U(k,p.run(()=>e({store:k,app:a._a,pinia:a,options:h})))}),C&&l&&n.hydrate&&n.hydrate(k.$state,C),v=!0,y=!0,k}function q(e,r,i){let a,o=typeof r==`function`;a=o?i:r;function s(i,s){let c=n();return i||=c?t(v,null):null,i&&_(i),i=g,i._s.has(e)||(o?K(e,r,a,i):G(e,a,i)),i._s.get(e)}return s.$id=e,s}export{q as n,N as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ct as e,i as t,o as n,r}from"./router-mPoLLYeq.js";import{n as i}from"./pinia-BTE-WqCz.js";async function a(){return(await n(`/api/hermes/profiles`)).profiles}async function o(e){return(await n(`/api/hermes/profiles/${encodeURIComponent(e)}`)).profile}async function s(e,t){try{return await n(`/api/hermes/profiles`,{method:`POST`,body:JSON.stringify({name:e,clone:t})}),!0}catch{return!1}}async function c(e){try{return await n(`/api/hermes/profiles/${encodeURIComponent(e)}`,{method:`DELETE`}),!0}catch{return!1}}async function l(e,t){try{return await n(`/api/hermes/profiles/${encodeURIComponent(e)}/rename`,{method:`POST`,body:JSON.stringify({new_name:t})}),!0}catch{return!1}}async function u(e){try{return await n(`/api/hermes/profiles/active`,{method:`PUT`,body:JSON.stringify({name:e})}),!0}catch{return!1}}async function d(e){try{let n=t(),i=r(),a={};i&&(a.Authorization=`Bearer ${i}`);let o=await fetch(`${n}/api/hermes/profiles/${encodeURIComponent(e)}/export`,{method:`POST`,headers:a});if(!o.ok)throw Error();let s=await o.blob(),c=URL.createObjectURL(s),l=document.createElement(`a`);return l.href=c,l.download=`hermes-profile-${e}.tar.gz`,l.click(),URL.revokeObjectURL(c),!0}catch{return!1}}async function f(e,t){try{return await n(`/api/hermes/profiles/import`,{method:`POST`,body:JSON.stringify({archive:e,name:t})}),!0}catch{return!1}}var p=i(`profiles`,()=>{let t=e([]),n=e(null),r=e({}),i=e(!1),p=e(!1);async function m(){i.value=!0;try{t.value=await a(),n.value=t.value.find(e=>e.active)??null}catch(e){console.error(`Failed to fetch profiles:`,e)}finally{i.value=!1}}async function h(e){if(r.value[e])return r.value[e];try{let t=await o(e);return r.value[e]=t,t}catch{return null}}async function g(e,t){let n=await s(e,t);return n&&await m(),n}async function _(e){let t=await c(e);return t&&(delete r.value[e],await m()),t}async function v(e,t){let n=await l(e,t);return n&&(delete r.value[e],await m()),n}async function y(e){p.value=!0;try{let t=await u(e);return t&&await m(),t}finally{p.value=!1}}async function b(e){return d(e)}async function x(e,t){let n=await f(e,t);return n&&await m(),n}return{profiles:t,activeProfile:n,detailMap:r,loading:i,switching:p,fetchProfiles:m,fetchProfileDetail:h,createProfile:g,deleteProfile:_,renameProfile:v,switchProfile:y,exportProfile:b,importProfile:x}});export{p as t};
|