@duckmind/duckmind-darwin-x64 1.2.89 → 1.3.6
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/.duckmind/plugins/.duckmind-managed-plugins.json +1 -1
- package/.duckmind/web/assets/{dialog-connect-provider-DqlW9pvn.js → dialog-connect-provider-jjqkH3fb.js} +2 -2
- package/.duckmind/web/assets/{dialog-edit-project-CzkH2te1.js → dialog-edit-project-DOemY3AL.js} +1 -1
- package/.duckmind/web/assets/{dialog-fork-OPHiOO-C.js → dialog-fork-BmnqME4F.js} +1 -1
- package/.duckmind/web/assets/{dialog-manage-models-DZPMD3UM.js → dialog-manage-models-D4NfKd0g.js} +1 -1
- package/.duckmind/web/assets/{dialog-select-directory-Dolr2s7s.js → dialog-select-directory-CzrpEaT8.js} +1 -1
- package/.duckmind/web/assets/{dialog-select-file-D32HXwjt.js → dialog-select-file-Di34JDys.js} +1 -1
- package/.duckmind/web/assets/{dialog-select-mcp-CYpIL68e.js → dialog-select-mcp-CfzzoOQ0.js} +1 -1
- package/.duckmind/web/assets/{dialog-select-model-unpaid-Drf0Wo8J.js → dialog-select-model-unpaid-BVinN3w5.js} +2 -2
- package/.duckmind/web/assets/{dialog-select-provider-CZw0JIcb.js → dialog-select-provider-DNa_XLNK.js} +1 -1
- package/.duckmind/web/assets/{dialog-select-server-CZWv28SL.js → dialog-select-server-CXhQWGJN.js} +1 -1
- package/.duckmind/web/assets/{dialog-settings-CEmNVCR7.js → dialog-settings-BZcMt_Zh.js} +1 -1
- package/.duckmind/web/assets/{file-icon-vO6wN-HW.js → file-icon-B_-1whMc.js} +1 -1
- package/.duckmind/web/assets/{ghostty-web-DyPkyuK6.js → ghostty-web-o_xRAlFy.js} +1 -1
- package/.duckmind/web/assets/{home-B6RNk4hy.js → home-XqeLA6yi.js} +1 -1
- package/.duckmind/web/assets/{index-Bj2ueAL8.js → index-D-WWa_X8.js} +3 -3
- package/.duckmind/web/assets/{list-FNV9nNTY.js → list-Dk_vU1zd.js} +1 -1
- package/.duckmind/web/assets/{provider-icon-BO5C5h8K.js → provider-icon-CbXUEYMU.js} +1 -1
- package/.duckmind/web/assets/{select-Df3XuuZj.js → select-iTRCZro5.js} +1 -1
- package/.duckmind/web/assets/{server-row--RKYaqbn.js → server-row-LxKRQxMm.js} +1 -1
- package/.duckmind/web/assets/{session-Df_z3CAQ.js → session-BmqyKO6_.js} +10 -10
- package/.duckmind/web/assets/{status-popover-body-BHs7f0l2.js → status-popover-body-D8K1NeBF.js} +2 -2
- package/.duckmind/web/assets/{switch-DyYMuMHL.js → switch-CiVaw2SH.js} +1 -1
- package/.duckmind/web/index.html +1 -1
- package/bin/duckmind +0 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as s,t as f,bU as $e,f as X,b as ue,bw as ge,v as pe,n as fe,g as E,h as r,ay as ye,aj as we,I as B,$ as T,m as G,bz as te,cs as ke,ct as Ce,cu as Se,bV as Pe,x as se,B as V,cv as Te,cw as Ee,cx as ze,al as M,cy as Fe,aa as De,q as he,a5 as me,F as H,aD as Ke,j as je,k as Le,bW as Ae,cz as Oe,aB as Ie,c as Me,bv as We,u as Ne,aF as Be,aW as re,cA as Ge,aV as Re}from"./index-Bj2ueAL8.js";import{S as N,T as D}from"./select-Df3XuuZj.js";import{S as L}from"./switch-DyYMuMHL.js";import{L as Ue,D as Ve}from"./dialog-connect-provider-DqlW9pvn.js";import{f as qe,u as He}from"./list-FNV9nNTY.js";import{P as ee,T as Z}from"./provider-icon-BO5C5h8K.js";import{D as Ye,a as Je}from"./dialog-select-provider-CZw0JIcb.js";var Qe=f('<div class="bg-surface-base px-4 rounded-lg">');const A=t=>(()=>{var e=Qe();return s(e,()=>t.children),e})();var Xe=f("<div data-action=settings-feed-reasoning-summaries>"),Ze=f("<div data-action=settings-feed-shell-tool-parts-expanded>"),et=f("<div data-action=settings-feed-edit-tool-parts-expanded>"),tt=f('<div class="flex flex-col gap-1">'),ce=f('<div class="w-full sm:w-[220px]">'),J=f('<div class="flex flex-col gap-1"><h3 class="text-14-medium text-text-strong pb-2">'),rt=f("<div data-action=settings-notifications-agent>"),nt=f("<div data-action=settings-notifications-permissions>"),st=f("<div data-action=settings-notifications-errors>"),it=f("<div data-action=settings-updates-startup>"),lt=f("<div data-action=settings-release-notes>"),at=f('<div class="flex flex-col h-full overflow-y-auto no-scrollbar px-4 pb-10 sm:px-10 sm:pb-10"><div class="sticky top-0 z-10 bg-[linear-gradient(to_bottom,var(--surface-stronger-non-alpha)_calc(100%_-_24px),transparent)]"><div class="flex flex-col gap-1 pt-6 pb-8"><h2 class="text-16-medium text-text-strong"></h2></div></div><div class="flex flex-col gap-8 w-full">'),ot=f("<div data-action=settings-wayland>"),ct=f("<span class=text-text-weak>"),dt=f('<div class="flex items-center gap-2"><span>'),ut=f('<div class="flex flex-wrap items-center gap-4 py-3 border-b border-border-weak-base last:border-none sm:flex-nowrap"><div class="flex min-w-0 flex-1 flex-col gap-0.5"><span class="text-14-medium text-text-strong"></span><span class="text-12-regular text-text-weak"></span></div><div class="flex w-full justify-end sm:w-auto sm:shrink-0">');let I={cleanup:void 0,timeout:void 0,run:0};const ve=()=>{I.run+=1,I.cleanup&&I.cleanup(),clearTimeout(I.timeout),I.cleanup=void 0},de=t=>{if(ve(),!t)return;const e=++I.run;I.timeout=setTimeout(()=>{Fe(t).then(l=>{if(I.run!==e){l?.();return}I.cleanup=l})},100)},gt=()=>{const t=$e(),e=X(),l=ue(),n=ge();pe(()=>{t.loadThemes()});const[c,g]=fe({checking:!1}),_=E(()=>l.platform==="desktop"&&l.os==="linux"),b=()=>{l.checkUpdate&&(g("checking",!0),l.checkUpdate().then(o=>{if(!o.updateAvailable){M({variant:"success",icon:"circle-check",title:e.t("settings.updates.toast.latest.title"),description:e.t("settings.updates.toast.latest.description",{version:l.version??""})});return}const a=l.update&&l.restart?[{label:e.t("toast.update.action.installRestart"),onClick:async()=>{await l.update(),await l.restart()}},{label:e.t("toast.update.action.notYet"),onClick:"dismiss"}]:[{label:e.t("toast.update.action.notYet"),onClick:"dismiss"}];M({persistent:!0,icon:"download",title:e.t("toast.update.title"),description:e.t("toast.update.description",{version:o.version??""}),actions:a})}).catch(o=>{const a=o instanceof Error?o.message:String(o);M({title:e.t("common.requestFailed"),description:a})}).finally(()=>g("checking",!1)))},v=E(()=>t.ids().map(o=>({id:o,name:t.name(o)}))),y=E(()=>[{value:"system",label:e.t("theme.scheme.system")},{value:"light",label:e.t("theme.scheme.light")},{value:"dark",label:e.t("theme.scheme.dark")}]),k=E(()=>[{value:"queue",label:e.t("settings.general.row.followup.option.queue")},{value:"steer",label:e.t("settings.general.row.followup.option.steer")}]),P=E(()=>e.locales.map(o=>({value:o,label:e.label(o)}))),K={id:"none",label:"sound.option.none"},z=[K,...ze],h=()=>Ee(n.appearance.font()),d=()=>Te(n.appearance.uiFont()),x=(o,a,i,u)=>({options:z,current:o()?z.find(p=>p.id===a())??K:K,value:p=>p.id,label:p=>e.t(p.label),onHighlight:p=>{p&&de(p.id==="none"?void 0:p.id)},onSelect:p=>{if(p){if(p.id==="none"){i(!1),ve();return}i(!0),u(p.id),de(p.id)}},variant:"secondary",size:"small",triggerVariant:"settings"}),m=()=>(()=>{var o=tt();return s(o,r(A,{get children(){return[r(w,{get title(){return e.t("settings.general.row.language.title")},get description(){return e.t("settings.general.row.language.description")},get children(){return r(N,{"data-action":"settings-language",get options(){return P()},get current(){return P().find(a=>a.value===e.locale())},value:a=>a.value,label:a=>a.label,onSelect:a=>a&&e.setLocale(a.value),variant:"secondary",size:"small",triggerVariant:"settings"})}}),r(w,{get title(){return e.t("settings.general.row.reasoningSummaries.title")},get description(){return e.t("settings.general.row.reasoningSummaries.description")},get children(){var a=Xe();return s(a,r(L,{get checked(){return n.general.showReasoningSummaries()},onChange:i=>n.general.setShowReasoningSummaries(i)})),a}}),r(w,{get title(){return e.t("settings.general.row.shellToolPartsExpanded.title")},get description(){return e.t("settings.general.row.shellToolPartsExpanded.description")},get children(){var a=Ze();return s(a,r(L,{get checked(){return n.general.shellToolPartsExpanded()},onChange:i=>n.general.setShellToolPartsExpanded(i)})),a}}),r(w,{get title(){return e.t("settings.general.row.editToolPartsExpanded.title")},get description(){return e.t("settings.general.row.editToolPartsExpanded.description")},get children(){var a=et();return s(a,r(L,{get checked(){return n.general.editToolPartsExpanded()},onChange:i=>n.general.setEditToolPartsExpanded(i)})),a}}),r(w,{get title(){return e.t("settings.general.row.followup.title")},get description(){return e.t("settings.general.row.followup.description")},get children(){return r(N,{"data-action":"settings-followup",get options(){return k()},get current(){return k().find(a=>a.value===n.general.followup())},value:a=>a.value,label:a=>a.label,onSelect:a=>a&&n.general.setFollowup(a.value),variant:"secondary",size:"small",triggerVariant:"settings",triggerStyle:{"min-width":"180px"}})}})]}})),o})(),C=()=>(()=>{var o=J(),a=o.firstChild;return s(a,()=>e.t("settings.general.section.appearance")),s(o,r(A,{get children(){return[r(w,{get title(){return e.t("settings.general.row.colorScheme.title")},get description(){return e.t("settings.general.row.colorScheme.description")},get children(){return r(N,{"data-action":"settings-color-scheme",get options(){return y()},get current(){return y().find(i=>i.value===t.colorScheme())},value:i=>i.value,label:i=>i.label,onSelect:i=>i&&t.setColorScheme(i.value),onHighlight:i=>{if(i)return t.previewColorScheme(i.value),()=>t.cancelPreview()},variant:"secondary",size:"small",triggerVariant:"settings",triggerStyle:{"min-width":"220px"}})}}),r(w,{get title(){return e.t("settings.general.row.theme.title")},get description(){return[G(()=>e.t("settings.general.row.theme.description"))," ",r(Ue,{href:"https://duckmind.ai/docs/themes/",get children(){return e.t("common.learnMore")}})]},get children(){return r(N,{"data-action":"settings-theme",get options(){return v()},get current(){return v().find(i=>i.id===t.themeId())},value:i=>i.id,label:i=>i.name,onSelect:i=>{i&&t.setTheme(i.id)},onHighlight:i=>{if(i)return t.previewTheme(i.id),()=>t.cancelPreview()},variant:"secondary",size:"small",triggerVariant:"settings"})}}),r(w,{get title(){return e.t("settings.general.row.uiFont.title")},get description(){return e.t("settings.general.row.uiFont.description")},get children(){var i=ce();return s(i,r(te,{"data-action":"settings-ui-font",get label(){return e.t("settings.general.row.uiFont.title")},hideLabel:!0,type:"text",get value(){return d()},onChange:u=>n.appearance.setUIFont(u),placeholder:ke,spellcheck:!1,autocorrect:"off",autocomplete:"off",autocapitalize:"off",class:"text-12-regular",get style(){return{"font-family":Ce(n.appearance.uiFont())}}})),i}}),r(w,{get title(){return e.t("settings.general.row.font.title")},get description(){return e.t("settings.general.row.font.description")},get children(){var i=ce();return s(i,r(te,{"data-action":"settings-code-font",get label(){return e.t("settings.general.row.font.title")},hideLabel:!0,type:"text",get value(){return h()},onChange:u=>n.appearance.setFont(u),placeholder:Se,spellcheck:!1,autocorrect:"off",autocomplete:"off",autocapitalize:"off",class:"text-12-regular",get style(){return{"font-family":Pe(n.appearance.font())}}})),i}})]}}),null),o})(),F=()=>(()=>{var o=J(),a=o.firstChild;return s(a,()=>e.t("settings.general.section.notifications")),s(o,r(A,{get children(){return[r(w,{get title(){return e.t("settings.general.notifications.agent.title")},get description(){return e.t("settings.general.notifications.agent.description")},get children(){var i=rt();return s(i,r(L,{get checked(){return n.notifications.agent()},onChange:u=>n.notifications.setAgent(u)})),i}}),r(w,{get title(){return e.t("settings.general.notifications.permissions.title")},get description(){return e.t("settings.general.notifications.permissions.description")},get children(){var i=nt();return s(i,r(L,{get checked(){return n.notifications.permissions()},onChange:u=>n.notifications.setPermissions(u)})),i}}),r(w,{get title(){return e.t("settings.general.notifications.errors.title")},get description(){return e.t("settings.general.notifications.errors.description")},get children(){var i=st();return s(i,r(L,{get checked(){return n.notifications.errors()},onChange:u=>n.notifications.setErrors(u)})),i}})]}}),null),o})(),O=()=>(()=>{var o=J(),a=o.firstChild;return s(a,()=>e.t("settings.general.section.sounds")),s(o,r(A,{get children(){return[r(w,{get title(){return e.t("settings.general.sounds.agent.title")},get description(){return e.t("settings.general.sounds.agent.description")},get children(){return r(N,se({"data-action":"settings-sounds-agent"},()=>x(()=>n.sounds.agentEnabled(),()=>n.sounds.agent(),i=>n.sounds.setAgentEnabled(i),i=>n.sounds.setAgent(i))))}}),r(w,{get title(){return e.t("settings.general.sounds.permissions.title")},get description(){return e.t("settings.general.sounds.permissions.description")},get children(){return r(N,se({"data-action":"settings-sounds-permissions"},()=>x(()=>n.sounds.permissionsEnabled(),()=>n.sounds.permissions(),i=>n.sounds.setPermissionsEnabled(i),i=>n.sounds.setPermissions(i))))}}),r(w,{get title(){return e.t("settings.general.sounds.errors.title")},get description(){return e.t("settings.general.sounds.errors.description")},get children(){return r(N,se({"data-action":"settings-sounds-errors"},()=>x(()=>n.sounds.errorsEnabled(),()=>n.sounds.errors(),i=>n.sounds.setErrorsEnabled(i),i=>n.sounds.setErrors(i))))}})]}}),null),o})(),$=()=>(()=>{var o=J(),a=o.firstChild;return s(a,()=>e.t("settings.general.section.updates")),s(o,r(A,{get children(){return[r(w,{get title(){return e.t("settings.updates.row.startup.title")},get description(){return e.t("settings.updates.row.startup.description")},get children(){var i=it();return s(i,r(L,{get checked(){return n.updates.startup()},get disabled(){return!l.checkUpdate},onChange:u=>n.updates.setStartup(u)})),i}}),r(w,{get title(){return e.t("settings.general.row.releaseNotes.title")},get description(){return e.t("settings.general.row.releaseNotes.description")},get children(){var i=lt();return s(i,r(L,{get checked(){return n.general.releaseNotes()},onChange:u=>n.general.setReleaseNotes(u)})),i}}),r(w,{get title(){return e.t("settings.updates.row.check.title")},get description(){return e.t("settings.updates.row.check.description")},get children(){return r(V,{size:"small",variant:"secondary",get disabled(){return c.checking||!l.checkUpdate},onClick:b,get children(){return G(()=>!!c.checking)()?e.t("settings.updates.action.checking"):e.t("settings.updates.action.checkNow")}})}})]}}),null),o})();return(()=>{var o=at(),a=o.firstChild,i=a.firstChild,u=i.firstChild,p=a.nextSibling;return s(u,()=>e.t("settings.tab.general")),s(p,r(m,{}),null),s(p,r(C,{}),null),s(p,r(F,{}),null),s(p,r(O,{}),null),s(p,r($,{}),null),s(p,r(T,{get when(){return _()},children:S=>{const[j,W]=ye(()=>l.getDisplayBackend?.()),R=()=>j.state==="pending"?void 0:j.latest,ne=Y=>l.setDisplayBackend?.(Y?"wayland":"auto").finally(()=>W.refetch());return(()=>{var Y=J(),be=Y.firstChild;return s(be,()=>e.t("settings.general.section.display")),s(Y,r(A,{get children(){return r(w,{get title(){return(()=>{var U=dt(),_e=U.firstChild;return s(_e,()=>e.t("settings.general.row.wayland.title")),s(U,r(we,{get value(){return e.t("settings.general.row.wayland.tooltip")},placement:"top",get children(){var oe=ct();return s(oe,r(B,{name:"help",size:"small"})),oe}}),null),U})()},get description(){return e.t("settings.general.row.wayland.description")},get children(){var U=ot();return s(U,r(L,{get checked(){return R()==="wayland"},onChange:ne})),U}})}}),null),Y})()}}),null),o})()},w=t=>(()=>{var e=ut(),l=e.firstChild,n=l.firstChild,c=n.nextSibling,g=l.nextSibling;return s(n,()=>t.title),s(c,()=>t.description),s(g,()=>t.children),e})();var pt=f('<span class="text-14-regular text-text-strong mt-1">"<!>"'),ft=f('<div class="flex flex-col items-center justify-center py-12 text-center"><span class="text-14-regular text-text-weak">'),ht=f('<div class="flex flex-col h-full overflow-y-auto no-scrollbar px-4 pb-10 sm:px-10 sm:pb-10"><div class="sticky top-0 z-10 bg-[linear-gradient(to_bottom,var(--surface-stronger-non-alpha)_calc(100%_-_24px),transparent)]"><div class="flex flex-col gap-4 pt-6 pb-6 max-w-[720px]"><div class="flex items-center justify-between gap-4"><h2 class="text-16-medium text-text-strong"></h2></div><div class="flex items-center gap-2 px-3 h-9 rounded-lg bg-surface-base"></div></div></div><div class="flex flex-col gap-8 max-w-[720px]">'),mt=f('<div class="flex flex-col gap-1"><h3 class="text-14-medium text-text-strong pb-2">'),vt=f('<div class="flex items-center justify-between gap-4 py-3 border-b border-border-weak-base last:border-none"><span class="text-14-regular text-text-strong"></span><button type=button>');const ie=typeof navigator=="object"&&/(Mac|iPod|iPhone|iPad)/.test(navigator.platform),q="command.palette",xt="mod+shift+p",Q=["General","Session","Navigation","Model and agent","Terminal","Prompt"],bt={General:"settings.shortcuts.group.general",Session:"settings.shortcuts.group.session",Navigation:"settings.shortcuts.group.navigation","Model and agent":"settings.shortcuts.group.modelAndAgent",Terminal:"settings.shortcuts.group.terminal",Prompt:"settings.shortcuts.group.prompt"};function le(t){return t===q?"General":t.startsWith("terminal.")?"Terminal":t.startsWith("model.")||t.startsWith("agent.")||t.startsWith("mcp.")?"Model and agent":t.startsWith("file.")||t.startsWith("fileTree.")?"Navigation":t.startsWith("prompt.")?"Prompt":t.startsWith("session.")||t.startsWith("message.")||t.startsWith("permissions.")||t.startsWith("steps.")||t.startsWith("review.")?"Session":"General"}function _t(t){return t==="Shift"||t==="Control"||t==="Alt"||t==="Meta"}function $t(t){return t===","?"comma":t==="+"?"plus":t===" "?"space":t.toLowerCase()}function yt(t){if(_t(t.key))return;const e=[];(ie?t.metaKey:t.ctrlKey)&&e.push("mod"),ie&&t.ctrlKey&&e.push("ctrl"),!ie&&t.metaKey&&e.push("meta"),t.altKey&&e.push("alt"),t.shiftKey&&e.push("shift");const n=$t(t.key);if(n)return e.push(n),e.join("+")}function ae(t){if(!t)return[];const e=[];for(const l of Ae(t)){const n=[];l.ctrl&&n.push("ctrl"),l.alt&&n.push("alt"),l.shift&&n.push("shift"),l.meta&&n.push("meta"),l.key&&n.push(l.key),n.length!==0&&e.push(n.join("+"))}return e}function wt(t){return!t||typeof t!="object"||Array.isArray(t)?{}:t}function kt(t,e,l){const n=new Map;n.set(q,{title:l,group:"General"});for(const c of t.catalog)c.id.startsWith("suggested.")||n.set(c.id,{title:c.title,group:le(c.id)});for(const c of t.options)c.id.startsWith("suggested.")||n.set(c.id,{title:c.title,group:le(c.id)});for(const[c,g]of Object.entries(e))typeof g=="string"&&(n.has(c)||n.set(c,{title:c,group:le(c)}));return n}function Ct(t){const e=new Map;for(const l of Q)e.set(l,[]);for(const[l,n]of t){const c=e.get(n.group);c&&c.push(l)}for(const l of Q){const n=e.get(l);n&&n.sort((c,g)=>(t.get(c)?.title??"").localeCompare(t.get(g)?.title??""))}return e}function St(t,e,l,n){const c=t.toLowerCase().trim();if(!c)return l;const g=new Map;for(const v of Q)g.set(v,[]);const _=Array.from(e.entries()).map(([v,y])=>({id:v,title:y.title,group:y.group,keybind:n(v)})),b=qe.go(c,_,{keys:["title","keybind"],threshold:-1e4});for(const v of b){const y=g.get(v.obj.group);y&&y.push(v.obj.id)}return g}function Pt(t){pe(()=>{const e=l=>{const n=t.active();if(!n)return;if(l.preventDefault(),l.stopPropagation(),l.stopImmediatePropagation(),l.key==="Escape"){t.stop();return}if((l.key==="Backspace"||l.key==="Delete")&&!l.ctrlKey&&!l.metaKey&&!l.altKey&&!l.shiftKey){t.set(n,"none"),t.stop();return}const g=yt(l);if(!g)return;const _=new Map;for(const b of ae(g))for(const v of t.used().get(b)??[])v.id!==n&&_.set(v.id,v.title);if(_.size>0){M({title:t.language.t("settings.shortcuts.conflict.title"),description:t.language.t("settings.shortcuts.conflict.description",{keybind:Oe(g,t.language.t),titles:[..._.values()].join(", ")})});return}t.set(n,g),t.stop()};document.addEventListener("keydown",e,!0),he(()=>document.removeEventListener("keydown",e,!0))})}const Tt=()=>{const t=De(),e=X(),l=ge(),[n,c]=fe({active:null,filter:""}),g=()=>{n.active&&(c("active",null),t.keybinds(!0))},_=m=>{if(n.active===m){g();return}n.active&&g(),c("active",m),t.keybinds(!1)},b=E(()=>wt(l.current.keybinds)),v=E(()=>Object.values(b()).some(m=>typeof m=="string")),y=()=>{g(),l.keybinds.resetAll(),M({title:e.t("settings.shortcuts.reset.toast.title"),description:e.t("settings.shortcuts.reset.toast.description")})},k=E(()=>(e.locale(),kt(t,b(),e.t("command.palette")))),P=m=>k().get(m)?.title??"",K=E(()=>Ct(k())),z=E(()=>St(n.filter,k(),K(),m=>t.keybind(m)||"")),h=E(()=>{for(const m of Q)if((z().get(m)??[]).length>0)return!0;return!1}),d=E(()=>{const m=new Map,C=($,o)=>{const a=m.get($);if(!a){m.set($,[o]);return}a.push(o)},F=l.keybinds.get(q)??xt;for(const $ of ae(F))C($,{id:q,title:P(q)});const O=$=>{const o=l.keybinds.get($);if(typeof o=="string")return o;const a=t.options.find(u=>u.id===$);return a?.keybind?a.keybind:t.catalog.find(u=>u.id===$)?.keybind};for(const $ of k().keys())if($!==q)for(const o of ae(O($)))C(o,{id:$,title:P($)});return m});return Pt({active:()=>n.active,stop:g,set:(m,C)=>l.keybinds.set(m,C),used:d,language:e}),he(()=>{n.active&&t.keybinds(!0)}),(()=>{var m=ht(),C=m.firstChild,F=C.firstChild,O=F.firstChild,$=O.firstChild,o=O.nextSibling,a=C.nextSibling;return s($,()=>e.t("settings.shortcuts.title")),s(O,r(V,{size:"small",variant:"secondary",onClick:y,get disabled(){return!v()},get children(){return e.t("settings.shortcuts.reset.button")}}),null),s(o,r(B,{name:"magnifying-glass",class:"text-icon-weak-base flex-shrink-0"}),null),s(o,r(te,{variant:"ghost",type:"text",get value(){return n.filter},onChange:i=>c("filter",i),get placeholder(){return e.t("settings.shortcuts.search.placeholder")},spellcheck:!1,autocorrect:"off",autocomplete:"off",autocapitalize:"off",class:"flex-1"}),null),s(o,r(T,{get when(){return n.filter},get children(){return r(me,{icon:"circle-x",variant:"ghost",onClick:()=>c("filter","")})}}),null),s(a,r(H,{each:Q,children:i=>r(T,{get when(){return(z().get(i)??[]).length>0},get children(){var u=mt(),p=u.firstChild;return s(p,()=>e.t(bt[i])),s(u,r(A,{get children(){return r(H,{get each(){return z().get(i)??[]},children:S=>(()=>{var j=vt(),W=j.firstChild,R=W.nextSibling;return s(W,()=>P(S)),R.$$click=()=>_(S),Ke(R,"data-keybind-id",S),s(R,r(T,{get when(){return n.active===S},get fallback(){return t.keybind(S)||e.t("settings.shortcuts.unassigned")},get children(){return e.t("settings.shortcuts.pressKeys")}})),je(ne=>Le(R,{"h-8 px-3 rounded-md text-12-regular":!0,"bg-surface-base text-text-subtle hover:bg-surface-raised-base-hover active:bg-surface-raised-base-active":n.active!==S,"border border-border-weak-base bg-surface-inset-base text-text-weak":n.active===S},ne)),j})()})}}),null),u}})}),null),s(a,r(T,{get when(){return G(()=>!!n.filter)()&&!h()},get children(){var i=ft(),u=i.firstChild;return s(u,()=>e.t("settings.shortcuts.search.empty")),s(i,r(T,{get when(){return n.filter},get children(){var p=pt(),S=p.firstChild,j=S.nextSibling;return j.nextSibling,s(p,()=>n.filter,j),p}}),null),i}}),null),m})()};Ie(["click"]);var Et=f('<div class="flex items-center justify-between gap-4 min-h-16 border-b border-border-weak-base last:border-none flex-wrap py-3"data-component=custom-provider-section><div class="flex flex-col min-w-0"><div class="flex flex-wrap items-center gap-x-3 gap-y-1"><span class="text-14-medium text-text-strong"></span></div><span class="text-12-regular text-text-weak pl-8">'),zt=f('<div class="flex flex-col h-full overflow-y-auto no-scrollbar px-4 pb-10 sm:px-10 sm:pb-10"><div class="sticky top-0 z-10 bg-[linear-gradient(to_bottom,var(--surface-stronger-non-alpha)_calc(100%_-_24px),transparent)]"><div class="flex flex-col gap-1 pt-6 pb-8 max-w-[720px]"><h2 class="text-16-medium text-text-strong"></h2></div></div><div class="flex flex-col gap-8 max-w-[720px]"><div class="flex flex-col gap-1"data-component=connected-providers-section><h3 class="text-14-medium text-text-strong pb-2"></h3></div><div class="flex flex-col gap-1"><h3 class="text-14-medium text-text-strong pb-2">'),Ft=f('<div class="py-4 text-14-regular text-text-weak">'),Dt=f('<div class="group flex flex-wrap items-center justify-between gap-4 min-h-16 py-3 border-b border-border-weak-base last:border-none"><div class="flex items-center gap-3 min-w-0"><span class="text-14-medium text-text-strong truncate">'),Kt=f('<span class="text-14-regular text-text-base opacity-0 group-hover:opacity-100 transition-opacity duration-200 pr-3 cursor-default">'),jt=f('<div class="flex flex-wrap items-center justify-between gap-4 min-h-16 py-3 border-b border-border-weak-base last:border-none"><div class="flex flex-col min-w-0"><div class="flex items-center gap-x-3"><span class="text-14-medium text-text-strong">'),Lt=f('<span class="text-12-regular text-text-weak pl-8">');const At=[{match:t=>t==="duckmind",key:"dialog.provider.duckmind.note"},{match:t=>t==="duckmind-go",key:"dialog.provider.duckmindGo.tagline"},{match:t=>t==="anthropic",key:"dialog.provider.anthropic.note"},{match:t=>t.startsWith("github-copilot"),key:"dialog.provider.copilot.note"},{match:t=>t==="openai",key:"dialog.provider.openai.note"},{match:t=>t==="google",key:"dialog.provider.google.note"},{match:t=>t==="openrouter",key:"dialog.provider.openrouter.note"},{match:t=>t==="vercel",key:"dialog.provider.vercel.note"}],Ot=()=>{const t=Me(),e=X(),l=We(),n=Ne(),c=Be(),g=E(()=>c.connected().filter(h=>h.id!=="duckmind"||Object.values(h.models).find(d=>d.cost?.input))),_=E(()=>{const h=new Set(g().map(x=>x.id)),d=c.popular().filter(x=>!h.has(x.id)).slice();return d.sort((x,m)=>re.indexOf(x.id)-re.indexOf(m.id)),d}),b=h=>{if(!("source"in h))return;const d=h.source;if(d==="env"||d==="api"||d==="config"||d==="custom")return d},v=h=>{const d=b(h);return d==="env"?e.t("settings.providers.tag.environment"):d==="api"?e.t("provider.connect.method.apiKey"):d==="config"?P(h.id)?e.t("settings.providers.tag.custom"):e.t("settings.providers.tag.config"):d==="custom"?e.t("settings.providers.tag.custom"):e.t("settings.providers.tag.other")},y=h=>b(h)!=="env",k=h=>At.find(d=>d.match(h))?.key,P=h=>{const d=n.data.config.provider?.[h];return!(!d||d.npm!=="@ai-sdk/openai-compatible"||!d.models||Object.keys(d.models).length===0)},K=async(h,d)=>{const x=n.data.config.disabled_providers??[],m=x.includes(h)?x:[...x,h];n.set("config","disabled_providers",m),await n.updateConfig({disabled_providers:m}).then(()=>{M({variant:"success",icon:"circle-check",title:e.t("provider.disconnect.toast.disconnected.title",{provider:d}),description:e.t("provider.disconnect.toast.disconnected.description",{provider:d})})}).catch(C=>{n.set("config","disabled_providers",x);const F=C instanceof Error?C.message:String(C);M({title:e.t("common.requestFailed"),description:F})})},z=async(h,d)=>{if(P(h)){await l.client.auth.remove({providerID:h}).catch(()=>{}),await K(h,d);return}await l.client.auth.remove({providerID:h}).then(async()=>{await l.client.global.dispose(),M({variant:"success",icon:"circle-check",title:e.t("provider.disconnect.toast.disconnected.title",{provider:d}),description:e.t("provider.disconnect.toast.disconnected.description",{provider:d})})}).catch(x=>{const m=x instanceof Error?x.message:String(x);M({title:e.t("common.requestFailed"),description:m})})};return(()=>{var h=zt(),d=h.firstChild,x=d.firstChild,m=x.firstChild,C=d.nextSibling,F=C.firstChild,O=F.firstChild,$=F.nextSibling,o=$.firstChild;return s(m,()=>e.t("settings.providers.title")),s(O,()=>e.t("settings.providers.section.connected")),s(F,r(A,{get children(){return r(T,{get when(){return g().length>0},get fallback(){return(()=>{var a=Ft();return s(a,()=>e.t("settings.providers.connected.empty")),a})()},get children(){return r(H,{get each(){return g()},children:a=>(()=>{var i=Dt(),u=i.firstChild,p=u.firstChild;return s(u,r(ee,{get id(){return a.id},class:"size-5 shrink-0 icon-strong-base"}),p),s(p,()=>a.name),s(u,r(Z,{get children(){return v(a)}}),null),s(i,r(T,{get when(){return y(a)},get fallback(){return(()=>{var S=Kt();return s(S,()=>e.t("settings.providers.connected.environmentDescription")),S})()},get children(){return r(V,{size:"large",variant:"ghost",onClick:()=>void z(a.id,a.name),get children(){return e.t("common.disconnect")}})}}),null),i})()})}})}}),null),s(o,()=>e.t("settings.providers.section.popular")),s($,r(A,{get children(){return[r(H,{get each(){return _()},children:a=>(()=>{var i=jt(),u=i.firstChild,p=u.firstChild,S=p.firstChild;return s(p,r(ee,{get id(){return a.id},class:"size-5 shrink-0 icon-strong-base"}),S),s(S,()=>a.name),s(p,r(T,{get when(){return a.id==="duckmind"},get children(){return r(Z,{get children(){return e.t("dialog.provider.tag.recommended")}})}}),null),s(p,r(T,{get when(){return a.id==="duckmind-go"},get children(){return r(Z,{get children(){return e.t("dialog.provider.tag.recommended")}})}}),null),s(u,r(T,{get when(){return k(a.id)},children:j=>(()=>{var W=Lt();return s(W,()=>e.t(j())),W})()}),null),s(i,r(V,{size:"large",variant:"secondary",icon:"plus-small",onClick:()=>{t.show(()=>r(Ve,{get provider(){return a.id}}))},get children(){return e.t("common.connect")}}),null),i})()}),(()=>{var a=Et(),i=a.firstChild,u=i.firstChild,p=u.firstChild,S=u.nextSibling;return s(u,r(ee,{id:"synthetic",class:"size-5 shrink-0 icon-strong-base"}),p),s(p,()=>e.t("provider.custom.title")),s(u,r(Z,{get children(){return e.t("settings.providers.tag.custom")}}),null),s(S,()=>e.t("settings.providers.custom.description")),s(a,r(V,{size:"large",variant:"secondary",icon:"plus-small",onClick:()=>{t.show(()=>r(Ye,{back:"close"}))},get children(){return e.t("common.connect")}}),null),a})()]}}),null),s($,r(V,{variant:"ghost",class:"px-0 py-0 mt-5 text-14-medium text-text-interactive-base text-left justify-start hover:bg-transparent active:bg-transparent",onClick:()=>{t.show(()=>r(Je,{}))},get children(){return e.t("dialog.provider.viewAll")}}),null),h})()};var xe=f('<div class="flex flex-col items-center justify-center py-12 text-center"><span class="text-14-regular text-text-weak">'),It=f('<span class="text-14-regular text-text-strong mt-1">"<!>"'),Mt=f('<div class="flex flex-col h-full overflow-y-auto no-scrollbar px-4 pb-10 sm:px-10 sm:pb-10"><div class="sticky top-0 z-10 bg-[linear-gradient(to_bottom,var(--surface-stronger-non-alpha)_calc(100%_-_24px),transparent)]"><div class="flex flex-col gap-4 pt-6 pb-6 max-w-[720px]"><h2 class="text-16-medium text-text-strong"></h2><div class="flex items-center gap-2 px-3 h-9 rounded-lg bg-surface-base"></div></div></div><div class="flex flex-col gap-8 max-w-[720px]">'),Wt=f('<div class="flex flex-col gap-1"><div class="flex items-center gap-2 pb-2"><span class="text-14-medium text-text-strong">'),Nt=f('<div class="flex flex-wrap items-center justify-between gap-4 py-3 border-b border-border-weak-base last:border-none"><div class=min-w-0><span class="text-14-regular text-text-strong truncate block"></span></div><div class=flex-shrink-0>');const Bt=t=>(()=>{var e=xe(),l=e.firstChild;return s(l,()=>t.label),e})(),Gt=t=>(()=>{var e=xe(),l=e.firstChild;return s(l,()=>t.message),s(e,r(T,{get when(){return t.filter},get children(){var n=It(),c=n.firstChild,g=c.nextSibling;return g.nextSibling,s(n,()=>t.filter,g),n}}),null),e})(),Rt=()=>{const t=X(),e=Ge(),l=He({items:n=>e.list(),key:n=>`${n.provider.id}:${n.id}`,filterKeys:["provider.name","name","id"],sortBy:(n,c)=>n.name.localeCompare(c.name),groupBy:n=>n.provider.id,sortGroupsBy:(n,c)=>{const g=re.indexOf(n.category),_=re.indexOf(c.category),b=g>=0,v=_>=0;if(b&&!v)return-1;if(!b&&v)return 1;if(b&&v)return g-_;const y=n.items[0].provider.name,k=c.items[0].provider.name;return y.localeCompare(k)}});return(()=>{var n=Mt(),c=n.firstChild,g=c.firstChild,_=g.firstChild,b=_.nextSibling,v=c.nextSibling;return s(_,()=>t.t("settings.models.title")),s(b,r(B,{name:"magnifying-glass",class:"text-icon-weak-base flex-shrink-0"}),null),s(b,r(te,{variant:"ghost",type:"text",get value(){return l.filter()},get onChange(){return l.onInput},get placeholder(){return t.t("dialog.model.search.placeholder")},spellcheck:!1,autocorrect:"off",autocomplete:"off",autocapitalize:"off",class:"flex-1"}),null),s(b,r(T,{get when(){return l.filter()},get children(){return r(me,{icon:"circle-x",variant:"ghost",get onClick(){return l.clear}})}}),null),s(v,r(T,{get when(){return!l.grouped.loading},get fallback(){return r(Bt,{get label(){return`${t.t("common.loading")}${t.t("common.loading.ellipsis")}`}})},get children(){return r(T,{get when(){return l.flat().length>0},get fallback(){return r(Gt,{get message(){return t.t("dialog.model.empty")},get filter(){return l.filter()}})},get children(){return r(H,{get each(){return l.grouped.latest},children:y=>(()=>{var k=Wt(),P=k.firstChild,K=P.firstChild;return s(P,r(ee,{get id(){return y.category},class:"size-5 shrink-0 icon-strong-base"}),K),s(K,()=>y.items[0].provider.name),s(k,r(A,{get children(){return r(H,{get each(){return y.items},children:z=>{const h={providerID:z.provider.id,modelID:z.id};return(()=>{var d=Nt(),x=d.firstChild,m=x.firstChild,C=x.nextSibling;return s(m,()=>z.name),s(C,r(L,{get checked(){return e.visible(h)},onChange:F=>{e.setVisibility(h,F)},hideLabel:!0,get children(){return z.name}})),d})()}})}}),null),k})()})}})}})),n})()};var Ut=f('<div class="flex flex-col justify-between h-full w-full"><div class="flex flex-col gap-3 w-full pt-3"><div class="flex flex-col gap-3"><div class="flex flex-col gap-1.5"><div class="flex flex-col gap-1.5 w-full"></div></div><div class="flex flex-col gap-1.5"><div class="flex flex-col gap-1.5 w-full"></div></div></div></div><div class="flex flex-col gap-1 pl-1 py-1 text-12-medium text-text-weak"><span></span><span class=text-11-regular>v');const Zt=()=>{const t=X(),e=ue();return r(Re,{size:"x-large",transition:!0,get children(){return r(D,{orientation:"vertical",variant:"settings",defaultValue:"general",class:"h-full settings-dialog",get children(){return[r(D.List,{get children(){var l=Ut(),n=l.firstChild,c=n.firstChild,g=c.firstChild,_=g.firstChild,b=g.nextSibling,v=b.firstChild,y=n.nextSibling,k=y.firstChild,P=k.nextSibling;return P.firstChild,s(g,r(D.SectionTitle,{get children(){return t.t("settings.section.desktop")}}),_),s(_,r(D.Trigger,{value:"general",get children(){return[r(B,{name:"sliders"}),G(()=>t.t("settings.tab.general"))]}}),null),s(_,r(D.Trigger,{value:"shortcuts",get children(){return[r(B,{name:"keyboard"}),G(()=>t.t("settings.tab.shortcuts"))]}}),null),s(b,r(D.SectionTitle,{get children(){return t.t("settings.section.server")}}),v),s(v,r(D.Trigger,{value:"providers",get children(){return[r(B,{name:"providers"}),G(()=>t.t("settings.providers.title"))]}}),null),s(v,r(D.Trigger,{value:"models",get children(){return[r(B,{name:"models"}),G(()=>t.t("settings.models.title"))]}}),null),s(k,()=>t.t("app.name.desktop")),s(P,()=>e.version,null),l}}),r(D.Content,{value:"general",class:"no-scrollbar",get children(){return r(gt,{})}}),r(D.Content,{value:"shortcuts",class:"no-scrollbar",get children(){return r(Tt,{})}}),r(D.Content,{value:"providers",class:"no-scrollbar",get children(){return r(Ot,{})}}),r(D.Content,{value:"models",class:"no-scrollbar",get children(){return r(Rt,{})}})]}})}})};export{Zt as DialogSettings};
|
|
1
|
+
import{i as s,t as f,bU as $e,f as X,b as ue,bw as ge,v as pe,n as fe,g as E,h as r,ay as ye,aj as we,I as B,$ as T,m as G,bz as te,cs as ke,ct as Ce,cu as Se,bV as Pe,x as se,B as V,cv as Te,cw as Ee,cx as ze,al as M,cy as Fe,aa as De,q as he,a5 as me,F as H,aD as Ke,j as je,k as Le,bW as Ae,cz as Oe,aB as Ie,c as Me,bv as We,u as Ne,aF as Be,aW as re,cA as Ge,aV as Re}from"./index-D-WWa_X8.js";import{S as N,T as D}from"./select-iTRCZro5.js";import{S as L}from"./switch-CiVaw2SH.js";import{L as Ue,D as Ve}from"./dialog-connect-provider-jjqkH3fb.js";import{f as qe,u as He}from"./list-Dk_vU1zd.js";import{P as ee,T as Z}from"./provider-icon-CbXUEYMU.js";import{D as Ye,a as Je}from"./dialog-select-provider-DNa_XLNK.js";var Qe=f('<div class="bg-surface-base px-4 rounded-lg">');const A=t=>(()=>{var e=Qe();return s(e,()=>t.children),e})();var Xe=f("<div data-action=settings-feed-reasoning-summaries>"),Ze=f("<div data-action=settings-feed-shell-tool-parts-expanded>"),et=f("<div data-action=settings-feed-edit-tool-parts-expanded>"),tt=f('<div class="flex flex-col gap-1">'),ce=f('<div class="w-full sm:w-[220px]">'),J=f('<div class="flex flex-col gap-1"><h3 class="text-14-medium text-text-strong pb-2">'),rt=f("<div data-action=settings-notifications-agent>"),nt=f("<div data-action=settings-notifications-permissions>"),st=f("<div data-action=settings-notifications-errors>"),it=f("<div data-action=settings-updates-startup>"),lt=f("<div data-action=settings-release-notes>"),at=f('<div class="flex flex-col h-full overflow-y-auto no-scrollbar px-4 pb-10 sm:px-10 sm:pb-10"><div class="sticky top-0 z-10 bg-[linear-gradient(to_bottom,var(--surface-stronger-non-alpha)_calc(100%_-_24px),transparent)]"><div class="flex flex-col gap-1 pt-6 pb-8"><h2 class="text-16-medium text-text-strong"></h2></div></div><div class="flex flex-col gap-8 w-full">'),ot=f("<div data-action=settings-wayland>"),ct=f("<span class=text-text-weak>"),dt=f('<div class="flex items-center gap-2"><span>'),ut=f('<div class="flex flex-wrap items-center gap-4 py-3 border-b border-border-weak-base last:border-none sm:flex-nowrap"><div class="flex min-w-0 flex-1 flex-col gap-0.5"><span class="text-14-medium text-text-strong"></span><span class="text-12-regular text-text-weak"></span></div><div class="flex w-full justify-end sm:w-auto sm:shrink-0">');let I={cleanup:void 0,timeout:void 0,run:0};const ve=()=>{I.run+=1,I.cleanup&&I.cleanup(),clearTimeout(I.timeout),I.cleanup=void 0},de=t=>{if(ve(),!t)return;const e=++I.run;I.timeout=setTimeout(()=>{Fe(t).then(l=>{if(I.run!==e){l?.();return}I.cleanup=l})},100)},gt=()=>{const t=$e(),e=X(),l=ue(),n=ge();pe(()=>{t.loadThemes()});const[c,g]=fe({checking:!1}),_=E(()=>l.platform==="desktop"&&l.os==="linux"),b=()=>{l.checkUpdate&&(g("checking",!0),l.checkUpdate().then(o=>{if(!o.updateAvailable){M({variant:"success",icon:"circle-check",title:e.t("settings.updates.toast.latest.title"),description:e.t("settings.updates.toast.latest.description",{version:l.version??""})});return}const a=l.update&&l.restart?[{label:e.t("toast.update.action.installRestart"),onClick:async()=>{await l.update(),await l.restart()}},{label:e.t("toast.update.action.notYet"),onClick:"dismiss"}]:[{label:e.t("toast.update.action.notYet"),onClick:"dismiss"}];M({persistent:!0,icon:"download",title:e.t("toast.update.title"),description:e.t("toast.update.description",{version:o.version??""}),actions:a})}).catch(o=>{const a=o instanceof Error?o.message:String(o);M({title:e.t("common.requestFailed"),description:a})}).finally(()=>g("checking",!1)))},v=E(()=>t.ids().map(o=>({id:o,name:t.name(o)}))),y=E(()=>[{value:"system",label:e.t("theme.scheme.system")},{value:"light",label:e.t("theme.scheme.light")},{value:"dark",label:e.t("theme.scheme.dark")}]),k=E(()=>[{value:"queue",label:e.t("settings.general.row.followup.option.queue")},{value:"steer",label:e.t("settings.general.row.followup.option.steer")}]),P=E(()=>e.locales.map(o=>({value:o,label:e.label(o)}))),K={id:"none",label:"sound.option.none"},z=[K,...ze],h=()=>Ee(n.appearance.font()),d=()=>Te(n.appearance.uiFont()),x=(o,a,i,u)=>({options:z,current:o()?z.find(p=>p.id===a())??K:K,value:p=>p.id,label:p=>e.t(p.label),onHighlight:p=>{p&&de(p.id==="none"?void 0:p.id)},onSelect:p=>{if(p){if(p.id==="none"){i(!1),ve();return}i(!0),u(p.id),de(p.id)}},variant:"secondary",size:"small",triggerVariant:"settings"}),m=()=>(()=>{var o=tt();return s(o,r(A,{get children(){return[r(w,{get title(){return e.t("settings.general.row.language.title")},get description(){return e.t("settings.general.row.language.description")},get children(){return r(N,{"data-action":"settings-language",get options(){return P()},get current(){return P().find(a=>a.value===e.locale())},value:a=>a.value,label:a=>a.label,onSelect:a=>a&&e.setLocale(a.value),variant:"secondary",size:"small",triggerVariant:"settings"})}}),r(w,{get title(){return e.t("settings.general.row.reasoningSummaries.title")},get description(){return e.t("settings.general.row.reasoningSummaries.description")},get children(){var a=Xe();return s(a,r(L,{get checked(){return n.general.showReasoningSummaries()},onChange:i=>n.general.setShowReasoningSummaries(i)})),a}}),r(w,{get title(){return e.t("settings.general.row.shellToolPartsExpanded.title")},get description(){return e.t("settings.general.row.shellToolPartsExpanded.description")},get children(){var a=Ze();return s(a,r(L,{get checked(){return n.general.shellToolPartsExpanded()},onChange:i=>n.general.setShellToolPartsExpanded(i)})),a}}),r(w,{get title(){return e.t("settings.general.row.editToolPartsExpanded.title")},get description(){return e.t("settings.general.row.editToolPartsExpanded.description")},get children(){var a=et();return s(a,r(L,{get checked(){return n.general.editToolPartsExpanded()},onChange:i=>n.general.setEditToolPartsExpanded(i)})),a}}),r(w,{get title(){return e.t("settings.general.row.followup.title")},get description(){return e.t("settings.general.row.followup.description")},get children(){return r(N,{"data-action":"settings-followup",get options(){return k()},get current(){return k().find(a=>a.value===n.general.followup())},value:a=>a.value,label:a=>a.label,onSelect:a=>a&&n.general.setFollowup(a.value),variant:"secondary",size:"small",triggerVariant:"settings",triggerStyle:{"min-width":"180px"}})}})]}})),o})(),C=()=>(()=>{var o=J(),a=o.firstChild;return s(a,()=>e.t("settings.general.section.appearance")),s(o,r(A,{get children(){return[r(w,{get title(){return e.t("settings.general.row.colorScheme.title")},get description(){return e.t("settings.general.row.colorScheme.description")},get children(){return r(N,{"data-action":"settings-color-scheme",get options(){return y()},get current(){return y().find(i=>i.value===t.colorScheme())},value:i=>i.value,label:i=>i.label,onSelect:i=>i&&t.setColorScheme(i.value),onHighlight:i=>{if(i)return t.previewColorScheme(i.value),()=>t.cancelPreview()},variant:"secondary",size:"small",triggerVariant:"settings",triggerStyle:{"min-width":"220px"}})}}),r(w,{get title(){return e.t("settings.general.row.theme.title")},get description(){return[G(()=>e.t("settings.general.row.theme.description"))," ",r(Ue,{href:"https://duckmind.ai/docs/themes/",get children(){return e.t("common.learnMore")}})]},get children(){return r(N,{"data-action":"settings-theme",get options(){return v()},get current(){return v().find(i=>i.id===t.themeId())},value:i=>i.id,label:i=>i.name,onSelect:i=>{i&&t.setTheme(i.id)},onHighlight:i=>{if(i)return t.previewTheme(i.id),()=>t.cancelPreview()},variant:"secondary",size:"small",triggerVariant:"settings"})}}),r(w,{get title(){return e.t("settings.general.row.uiFont.title")},get description(){return e.t("settings.general.row.uiFont.description")},get children(){var i=ce();return s(i,r(te,{"data-action":"settings-ui-font",get label(){return e.t("settings.general.row.uiFont.title")},hideLabel:!0,type:"text",get value(){return d()},onChange:u=>n.appearance.setUIFont(u),placeholder:ke,spellcheck:!1,autocorrect:"off",autocomplete:"off",autocapitalize:"off",class:"text-12-regular",get style(){return{"font-family":Ce(n.appearance.uiFont())}}})),i}}),r(w,{get title(){return e.t("settings.general.row.font.title")},get description(){return e.t("settings.general.row.font.description")},get children(){var i=ce();return s(i,r(te,{"data-action":"settings-code-font",get label(){return e.t("settings.general.row.font.title")},hideLabel:!0,type:"text",get value(){return h()},onChange:u=>n.appearance.setFont(u),placeholder:Se,spellcheck:!1,autocorrect:"off",autocomplete:"off",autocapitalize:"off",class:"text-12-regular",get style(){return{"font-family":Pe(n.appearance.font())}}})),i}})]}}),null),o})(),F=()=>(()=>{var o=J(),a=o.firstChild;return s(a,()=>e.t("settings.general.section.notifications")),s(o,r(A,{get children(){return[r(w,{get title(){return e.t("settings.general.notifications.agent.title")},get description(){return e.t("settings.general.notifications.agent.description")},get children(){var i=rt();return s(i,r(L,{get checked(){return n.notifications.agent()},onChange:u=>n.notifications.setAgent(u)})),i}}),r(w,{get title(){return e.t("settings.general.notifications.permissions.title")},get description(){return e.t("settings.general.notifications.permissions.description")},get children(){var i=nt();return s(i,r(L,{get checked(){return n.notifications.permissions()},onChange:u=>n.notifications.setPermissions(u)})),i}}),r(w,{get title(){return e.t("settings.general.notifications.errors.title")},get description(){return e.t("settings.general.notifications.errors.description")},get children(){var i=st();return s(i,r(L,{get checked(){return n.notifications.errors()},onChange:u=>n.notifications.setErrors(u)})),i}})]}}),null),o})(),O=()=>(()=>{var o=J(),a=o.firstChild;return s(a,()=>e.t("settings.general.section.sounds")),s(o,r(A,{get children(){return[r(w,{get title(){return e.t("settings.general.sounds.agent.title")},get description(){return e.t("settings.general.sounds.agent.description")},get children(){return r(N,se({"data-action":"settings-sounds-agent"},()=>x(()=>n.sounds.agentEnabled(),()=>n.sounds.agent(),i=>n.sounds.setAgentEnabled(i),i=>n.sounds.setAgent(i))))}}),r(w,{get title(){return e.t("settings.general.sounds.permissions.title")},get description(){return e.t("settings.general.sounds.permissions.description")},get children(){return r(N,se({"data-action":"settings-sounds-permissions"},()=>x(()=>n.sounds.permissionsEnabled(),()=>n.sounds.permissions(),i=>n.sounds.setPermissionsEnabled(i),i=>n.sounds.setPermissions(i))))}}),r(w,{get title(){return e.t("settings.general.sounds.errors.title")},get description(){return e.t("settings.general.sounds.errors.description")},get children(){return r(N,se({"data-action":"settings-sounds-errors"},()=>x(()=>n.sounds.errorsEnabled(),()=>n.sounds.errors(),i=>n.sounds.setErrorsEnabled(i),i=>n.sounds.setErrors(i))))}})]}}),null),o})(),$=()=>(()=>{var o=J(),a=o.firstChild;return s(a,()=>e.t("settings.general.section.updates")),s(o,r(A,{get children(){return[r(w,{get title(){return e.t("settings.updates.row.startup.title")},get description(){return e.t("settings.updates.row.startup.description")},get children(){var i=it();return s(i,r(L,{get checked(){return n.updates.startup()},get disabled(){return!l.checkUpdate},onChange:u=>n.updates.setStartup(u)})),i}}),r(w,{get title(){return e.t("settings.general.row.releaseNotes.title")},get description(){return e.t("settings.general.row.releaseNotes.description")},get children(){var i=lt();return s(i,r(L,{get checked(){return n.general.releaseNotes()},onChange:u=>n.general.setReleaseNotes(u)})),i}}),r(w,{get title(){return e.t("settings.updates.row.check.title")},get description(){return e.t("settings.updates.row.check.description")},get children(){return r(V,{size:"small",variant:"secondary",get disabled(){return c.checking||!l.checkUpdate},onClick:b,get children(){return G(()=>!!c.checking)()?e.t("settings.updates.action.checking"):e.t("settings.updates.action.checkNow")}})}})]}}),null),o})();return(()=>{var o=at(),a=o.firstChild,i=a.firstChild,u=i.firstChild,p=a.nextSibling;return s(u,()=>e.t("settings.tab.general")),s(p,r(m,{}),null),s(p,r(C,{}),null),s(p,r(F,{}),null),s(p,r(O,{}),null),s(p,r($,{}),null),s(p,r(T,{get when(){return _()},children:S=>{const[j,W]=ye(()=>l.getDisplayBackend?.()),R=()=>j.state==="pending"?void 0:j.latest,ne=Y=>l.setDisplayBackend?.(Y?"wayland":"auto").finally(()=>W.refetch());return(()=>{var Y=J(),be=Y.firstChild;return s(be,()=>e.t("settings.general.section.display")),s(Y,r(A,{get children(){return r(w,{get title(){return(()=>{var U=dt(),_e=U.firstChild;return s(_e,()=>e.t("settings.general.row.wayland.title")),s(U,r(we,{get value(){return e.t("settings.general.row.wayland.tooltip")},placement:"top",get children(){var oe=ct();return s(oe,r(B,{name:"help",size:"small"})),oe}}),null),U})()},get description(){return e.t("settings.general.row.wayland.description")},get children(){var U=ot();return s(U,r(L,{get checked(){return R()==="wayland"},onChange:ne})),U}})}}),null),Y})()}}),null),o})()},w=t=>(()=>{var e=ut(),l=e.firstChild,n=l.firstChild,c=n.nextSibling,g=l.nextSibling;return s(n,()=>t.title),s(c,()=>t.description),s(g,()=>t.children),e})();var pt=f('<span class="text-14-regular text-text-strong mt-1">"<!>"'),ft=f('<div class="flex flex-col items-center justify-center py-12 text-center"><span class="text-14-regular text-text-weak">'),ht=f('<div class="flex flex-col h-full overflow-y-auto no-scrollbar px-4 pb-10 sm:px-10 sm:pb-10"><div class="sticky top-0 z-10 bg-[linear-gradient(to_bottom,var(--surface-stronger-non-alpha)_calc(100%_-_24px),transparent)]"><div class="flex flex-col gap-4 pt-6 pb-6 max-w-[720px]"><div class="flex items-center justify-between gap-4"><h2 class="text-16-medium text-text-strong"></h2></div><div class="flex items-center gap-2 px-3 h-9 rounded-lg bg-surface-base"></div></div></div><div class="flex flex-col gap-8 max-w-[720px]">'),mt=f('<div class="flex flex-col gap-1"><h3 class="text-14-medium text-text-strong pb-2">'),vt=f('<div class="flex items-center justify-between gap-4 py-3 border-b border-border-weak-base last:border-none"><span class="text-14-regular text-text-strong"></span><button type=button>');const ie=typeof navigator=="object"&&/(Mac|iPod|iPhone|iPad)/.test(navigator.platform),q="command.palette",xt="mod+shift+p",Q=["General","Session","Navigation","Model and agent","Terminal","Prompt"],bt={General:"settings.shortcuts.group.general",Session:"settings.shortcuts.group.session",Navigation:"settings.shortcuts.group.navigation","Model and agent":"settings.shortcuts.group.modelAndAgent",Terminal:"settings.shortcuts.group.terminal",Prompt:"settings.shortcuts.group.prompt"};function le(t){return t===q?"General":t.startsWith("terminal.")?"Terminal":t.startsWith("model.")||t.startsWith("agent.")||t.startsWith("mcp.")?"Model and agent":t.startsWith("file.")||t.startsWith("fileTree.")?"Navigation":t.startsWith("prompt.")?"Prompt":t.startsWith("session.")||t.startsWith("message.")||t.startsWith("permissions.")||t.startsWith("steps.")||t.startsWith("review.")?"Session":"General"}function _t(t){return t==="Shift"||t==="Control"||t==="Alt"||t==="Meta"}function $t(t){return t===","?"comma":t==="+"?"plus":t===" "?"space":t.toLowerCase()}function yt(t){if(_t(t.key))return;const e=[];(ie?t.metaKey:t.ctrlKey)&&e.push("mod"),ie&&t.ctrlKey&&e.push("ctrl"),!ie&&t.metaKey&&e.push("meta"),t.altKey&&e.push("alt"),t.shiftKey&&e.push("shift");const n=$t(t.key);if(n)return e.push(n),e.join("+")}function ae(t){if(!t)return[];const e=[];for(const l of Ae(t)){const n=[];l.ctrl&&n.push("ctrl"),l.alt&&n.push("alt"),l.shift&&n.push("shift"),l.meta&&n.push("meta"),l.key&&n.push(l.key),n.length!==0&&e.push(n.join("+"))}return e}function wt(t){return!t||typeof t!="object"||Array.isArray(t)?{}:t}function kt(t,e,l){const n=new Map;n.set(q,{title:l,group:"General"});for(const c of t.catalog)c.id.startsWith("suggested.")||n.set(c.id,{title:c.title,group:le(c.id)});for(const c of t.options)c.id.startsWith("suggested.")||n.set(c.id,{title:c.title,group:le(c.id)});for(const[c,g]of Object.entries(e))typeof g=="string"&&(n.has(c)||n.set(c,{title:c,group:le(c)}));return n}function Ct(t){const e=new Map;for(const l of Q)e.set(l,[]);for(const[l,n]of t){const c=e.get(n.group);c&&c.push(l)}for(const l of Q){const n=e.get(l);n&&n.sort((c,g)=>(t.get(c)?.title??"").localeCompare(t.get(g)?.title??""))}return e}function St(t,e,l,n){const c=t.toLowerCase().trim();if(!c)return l;const g=new Map;for(const v of Q)g.set(v,[]);const _=Array.from(e.entries()).map(([v,y])=>({id:v,title:y.title,group:y.group,keybind:n(v)})),b=qe.go(c,_,{keys:["title","keybind"],threshold:-1e4});for(const v of b){const y=g.get(v.obj.group);y&&y.push(v.obj.id)}return g}function Pt(t){pe(()=>{const e=l=>{const n=t.active();if(!n)return;if(l.preventDefault(),l.stopPropagation(),l.stopImmediatePropagation(),l.key==="Escape"){t.stop();return}if((l.key==="Backspace"||l.key==="Delete")&&!l.ctrlKey&&!l.metaKey&&!l.altKey&&!l.shiftKey){t.set(n,"none"),t.stop();return}const g=yt(l);if(!g)return;const _=new Map;for(const b of ae(g))for(const v of t.used().get(b)??[])v.id!==n&&_.set(v.id,v.title);if(_.size>0){M({title:t.language.t("settings.shortcuts.conflict.title"),description:t.language.t("settings.shortcuts.conflict.description",{keybind:Oe(g,t.language.t),titles:[..._.values()].join(", ")})});return}t.set(n,g),t.stop()};document.addEventListener("keydown",e,!0),he(()=>document.removeEventListener("keydown",e,!0))})}const Tt=()=>{const t=De(),e=X(),l=ge(),[n,c]=fe({active:null,filter:""}),g=()=>{n.active&&(c("active",null),t.keybinds(!0))},_=m=>{if(n.active===m){g();return}n.active&&g(),c("active",m),t.keybinds(!1)},b=E(()=>wt(l.current.keybinds)),v=E(()=>Object.values(b()).some(m=>typeof m=="string")),y=()=>{g(),l.keybinds.resetAll(),M({title:e.t("settings.shortcuts.reset.toast.title"),description:e.t("settings.shortcuts.reset.toast.description")})},k=E(()=>(e.locale(),kt(t,b(),e.t("command.palette")))),P=m=>k().get(m)?.title??"",K=E(()=>Ct(k())),z=E(()=>St(n.filter,k(),K(),m=>t.keybind(m)||"")),h=E(()=>{for(const m of Q)if((z().get(m)??[]).length>0)return!0;return!1}),d=E(()=>{const m=new Map,C=($,o)=>{const a=m.get($);if(!a){m.set($,[o]);return}a.push(o)},F=l.keybinds.get(q)??xt;for(const $ of ae(F))C($,{id:q,title:P(q)});const O=$=>{const o=l.keybinds.get($);if(typeof o=="string")return o;const a=t.options.find(u=>u.id===$);return a?.keybind?a.keybind:t.catalog.find(u=>u.id===$)?.keybind};for(const $ of k().keys())if($!==q)for(const o of ae(O($)))C(o,{id:$,title:P($)});return m});return Pt({active:()=>n.active,stop:g,set:(m,C)=>l.keybinds.set(m,C),used:d,language:e}),he(()=>{n.active&&t.keybinds(!0)}),(()=>{var m=ht(),C=m.firstChild,F=C.firstChild,O=F.firstChild,$=O.firstChild,o=O.nextSibling,a=C.nextSibling;return s($,()=>e.t("settings.shortcuts.title")),s(O,r(V,{size:"small",variant:"secondary",onClick:y,get disabled(){return!v()},get children(){return e.t("settings.shortcuts.reset.button")}}),null),s(o,r(B,{name:"magnifying-glass",class:"text-icon-weak-base flex-shrink-0"}),null),s(o,r(te,{variant:"ghost",type:"text",get value(){return n.filter},onChange:i=>c("filter",i),get placeholder(){return e.t("settings.shortcuts.search.placeholder")},spellcheck:!1,autocorrect:"off",autocomplete:"off",autocapitalize:"off",class:"flex-1"}),null),s(o,r(T,{get when(){return n.filter},get children(){return r(me,{icon:"circle-x",variant:"ghost",onClick:()=>c("filter","")})}}),null),s(a,r(H,{each:Q,children:i=>r(T,{get when(){return(z().get(i)??[]).length>0},get children(){var u=mt(),p=u.firstChild;return s(p,()=>e.t(bt[i])),s(u,r(A,{get children(){return r(H,{get each(){return z().get(i)??[]},children:S=>(()=>{var j=vt(),W=j.firstChild,R=W.nextSibling;return s(W,()=>P(S)),R.$$click=()=>_(S),Ke(R,"data-keybind-id",S),s(R,r(T,{get when(){return n.active===S},get fallback(){return t.keybind(S)||e.t("settings.shortcuts.unassigned")},get children(){return e.t("settings.shortcuts.pressKeys")}})),je(ne=>Le(R,{"h-8 px-3 rounded-md text-12-regular":!0,"bg-surface-base text-text-subtle hover:bg-surface-raised-base-hover active:bg-surface-raised-base-active":n.active!==S,"border border-border-weak-base bg-surface-inset-base text-text-weak":n.active===S},ne)),j})()})}}),null),u}})}),null),s(a,r(T,{get when(){return G(()=>!!n.filter)()&&!h()},get children(){var i=ft(),u=i.firstChild;return s(u,()=>e.t("settings.shortcuts.search.empty")),s(i,r(T,{get when(){return n.filter},get children(){var p=pt(),S=p.firstChild,j=S.nextSibling;return j.nextSibling,s(p,()=>n.filter,j),p}}),null),i}}),null),m})()};Ie(["click"]);var Et=f('<div class="flex items-center justify-between gap-4 min-h-16 border-b border-border-weak-base last:border-none flex-wrap py-3"data-component=custom-provider-section><div class="flex flex-col min-w-0"><div class="flex flex-wrap items-center gap-x-3 gap-y-1"><span class="text-14-medium text-text-strong"></span></div><span class="text-12-regular text-text-weak pl-8">'),zt=f('<div class="flex flex-col h-full overflow-y-auto no-scrollbar px-4 pb-10 sm:px-10 sm:pb-10"><div class="sticky top-0 z-10 bg-[linear-gradient(to_bottom,var(--surface-stronger-non-alpha)_calc(100%_-_24px),transparent)]"><div class="flex flex-col gap-1 pt-6 pb-8 max-w-[720px]"><h2 class="text-16-medium text-text-strong"></h2></div></div><div class="flex flex-col gap-8 max-w-[720px]"><div class="flex flex-col gap-1"data-component=connected-providers-section><h3 class="text-14-medium text-text-strong pb-2"></h3></div><div class="flex flex-col gap-1"><h3 class="text-14-medium text-text-strong pb-2">'),Ft=f('<div class="py-4 text-14-regular text-text-weak">'),Dt=f('<div class="group flex flex-wrap items-center justify-between gap-4 min-h-16 py-3 border-b border-border-weak-base last:border-none"><div class="flex items-center gap-3 min-w-0"><span class="text-14-medium text-text-strong truncate">'),Kt=f('<span class="text-14-regular text-text-base opacity-0 group-hover:opacity-100 transition-opacity duration-200 pr-3 cursor-default">'),jt=f('<div class="flex flex-wrap items-center justify-between gap-4 min-h-16 py-3 border-b border-border-weak-base last:border-none"><div class="flex flex-col min-w-0"><div class="flex items-center gap-x-3"><span class="text-14-medium text-text-strong">'),Lt=f('<span class="text-12-regular text-text-weak pl-8">');const At=[{match:t=>t==="duckmind",key:"dialog.provider.duckmind.note"},{match:t=>t==="duckmind-go",key:"dialog.provider.duckmindGo.tagline"},{match:t=>t==="anthropic",key:"dialog.provider.anthropic.note"},{match:t=>t.startsWith("github-copilot"),key:"dialog.provider.copilot.note"},{match:t=>t==="openai",key:"dialog.provider.openai.note"},{match:t=>t==="google",key:"dialog.provider.google.note"},{match:t=>t==="openrouter",key:"dialog.provider.openrouter.note"},{match:t=>t==="vercel",key:"dialog.provider.vercel.note"}],Ot=()=>{const t=Me(),e=X(),l=We(),n=Ne(),c=Be(),g=E(()=>c.connected().filter(h=>h.id!=="duckmind"||Object.values(h.models).find(d=>d.cost?.input))),_=E(()=>{const h=new Set(g().map(x=>x.id)),d=c.popular().filter(x=>!h.has(x.id)).slice();return d.sort((x,m)=>re.indexOf(x.id)-re.indexOf(m.id)),d}),b=h=>{if(!("source"in h))return;const d=h.source;if(d==="env"||d==="api"||d==="config"||d==="custom")return d},v=h=>{const d=b(h);return d==="env"?e.t("settings.providers.tag.environment"):d==="api"?e.t("provider.connect.method.apiKey"):d==="config"?P(h.id)?e.t("settings.providers.tag.custom"):e.t("settings.providers.tag.config"):d==="custom"?e.t("settings.providers.tag.custom"):e.t("settings.providers.tag.other")},y=h=>b(h)!=="env",k=h=>At.find(d=>d.match(h))?.key,P=h=>{const d=n.data.config.provider?.[h];return!(!d||d.npm!=="@ai-sdk/openai-compatible"||!d.models||Object.keys(d.models).length===0)},K=async(h,d)=>{const x=n.data.config.disabled_providers??[],m=x.includes(h)?x:[...x,h];n.set("config","disabled_providers",m),await n.updateConfig({disabled_providers:m}).then(()=>{M({variant:"success",icon:"circle-check",title:e.t("provider.disconnect.toast.disconnected.title",{provider:d}),description:e.t("provider.disconnect.toast.disconnected.description",{provider:d})})}).catch(C=>{n.set("config","disabled_providers",x);const F=C instanceof Error?C.message:String(C);M({title:e.t("common.requestFailed"),description:F})})},z=async(h,d)=>{if(P(h)){await l.client.auth.remove({providerID:h}).catch(()=>{}),await K(h,d);return}await l.client.auth.remove({providerID:h}).then(async()=>{await l.client.global.dispose(),M({variant:"success",icon:"circle-check",title:e.t("provider.disconnect.toast.disconnected.title",{provider:d}),description:e.t("provider.disconnect.toast.disconnected.description",{provider:d})})}).catch(x=>{const m=x instanceof Error?x.message:String(x);M({title:e.t("common.requestFailed"),description:m})})};return(()=>{var h=zt(),d=h.firstChild,x=d.firstChild,m=x.firstChild,C=d.nextSibling,F=C.firstChild,O=F.firstChild,$=F.nextSibling,o=$.firstChild;return s(m,()=>e.t("settings.providers.title")),s(O,()=>e.t("settings.providers.section.connected")),s(F,r(A,{get children(){return r(T,{get when(){return g().length>0},get fallback(){return(()=>{var a=Ft();return s(a,()=>e.t("settings.providers.connected.empty")),a})()},get children(){return r(H,{get each(){return g()},children:a=>(()=>{var i=Dt(),u=i.firstChild,p=u.firstChild;return s(u,r(ee,{get id(){return a.id},class:"size-5 shrink-0 icon-strong-base"}),p),s(p,()=>a.name),s(u,r(Z,{get children(){return v(a)}}),null),s(i,r(T,{get when(){return y(a)},get fallback(){return(()=>{var S=Kt();return s(S,()=>e.t("settings.providers.connected.environmentDescription")),S})()},get children(){return r(V,{size:"large",variant:"ghost",onClick:()=>void z(a.id,a.name),get children(){return e.t("common.disconnect")}})}}),null),i})()})}})}}),null),s(o,()=>e.t("settings.providers.section.popular")),s($,r(A,{get children(){return[r(H,{get each(){return _()},children:a=>(()=>{var i=jt(),u=i.firstChild,p=u.firstChild,S=p.firstChild;return s(p,r(ee,{get id(){return a.id},class:"size-5 shrink-0 icon-strong-base"}),S),s(S,()=>a.name),s(p,r(T,{get when(){return a.id==="duckmind"},get children(){return r(Z,{get children(){return e.t("dialog.provider.tag.recommended")}})}}),null),s(p,r(T,{get when(){return a.id==="duckmind-go"},get children(){return r(Z,{get children(){return e.t("dialog.provider.tag.recommended")}})}}),null),s(u,r(T,{get when(){return k(a.id)},children:j=>(()=>{var W=Lt();return s(W,()=>e.t(j())),W})()}),null),s(i,r(V,{size:"large",variant:"secondary",icon:"plus-small",onClick:()=>{t.show(()=>r(Ve,{get provider(){return a.id}}))},get children(){return e.t("common.connect")}}),null),i})()}),(()=>{var a=Et(),i=a.firstChild,u=i.firstChild,p=u.firstChild,S=u.nextSibling;return s(u,r(ee,{id:"synthetic",class:"size-5 shrink-0 icon-strong-base"}),p),s(p,()=>e.t("provider.custom.title")),s(u,r(Z,{get children(){return e.t("settings.providers.tag.custom")}}),null),s(S,()=>e.t("settings.providers.custom.description")),s(a,r(V,{size:"large",variant:"secondary",icon:"plus-small",onClick:()=>{t.show(()=>r(Ye,{back:"close"}))},get children(){return e.t("common.connect")}}),null),a})()]}}),null),s($,r(V,{variant:"ghost",class:"px-0 py-0 mt-5 text-14-medium text-text-interactive-base text-left justify-start hover:bg-transparent active:bg-transparent",onClick:()=>{t.show(()=>r(Je,{}))},get children(){return e.t("dialog.provider.viewAll")}}),null),h})()};var xe=f('<div class="flex flex-col items-center justify-center py-12 text-center"><span class="text-14-regular text-text-weak">'),It=f('<span class="text-14-regular text-text-strong mt-1">"<!>"'),Mt=f('<div class="flex flex-col h-full overflow-y-auto no-scrollbar px-4 pb-10 sm:px-10 sm:pb-10"><div class="sticky top-0 z-10 bg-[linear-gradient(to_bottom,var(--surface-stronger-non-alpha)_calc(100%_-_24px),transparent)]"><div class="flex flex-col gap-4 pt-6 pb-6 max-w-[720px]"><h2 class="text-16-medium text-text-strong"></h2><div class="flex items-center gap-2 px-3 h-9 rounded-lg bg-surface-base"></div></div></div><div class="flex flex-col gap-8 max-w-[720px]">'),Wt=f('<div class="flex flex-col gap-1"><div class="flex items-center gap-2 pb-2"><span class="text-14-medium text-text-strong">'),Nt=f('<div class="flex flex-wrap items-center justify-between gap-4 py-3 border-b border-border-weak-base last:border-none"><div class=min-w-0><span class="text-14-regular text-text-strong truncate block"></span></div><div class=flex-shrink-0>');const Bt=t=>(()=>{var e=xe(),l=e.firstChild;return s(l,()=>t.label),e})(),Gt=t=>(()=>{var e=xe(),l=e.firstChild;return s(l,()=>t.message),s(e,r(T,{get when(){return t.filter},get children(){var n=It(),c=n.firstChild,g=c.nextSibling;return g.nextSibling,s(n,()=>t.filter,g),n}}),null),e})(),Rt=()=>{const t=X(),e=Ge(),l=He({items:n=>e.list(),key:n=>`${n.provider.id}:${n.id}`,filterKeys:["provider.name","name","id"],sortBy:(n,c)=>n.name.localeCompare(c.name),groupBy:n=>n.provider.id,sortGroupsBy:(n,c)=>{const g=re.indexOf(n.category),_=re.indexOf(c.category),b=g>=0,v=_>=0;if(b&&!v)return-1;if(!b&&v)return 1;if(b&&v)return g-_;const y=n.items[0].provider.name,k=c.items[0].provider.name;return y.localeCompare(k)}});return(()=>{var n=Mt(),c=n.firstChild,g=c.firstChild,_=g.firstChild,b=_.nextSibling,v=c.nextSibling;return s(_,()=>t.t("settings.models.title")),s(b,r(B,{name:"magnifying-glass",class:"text-icon-weak-base flex-shrink-0"}),null),s(b,r(te,{variant:"ghost",type:"text",get value(){return l.filter()},get onChange(){return l.onInput},get placeholder(){return t.t("dialog.model.search.placeholder")},spellcheck:!1,autocorrect:"off",autocomplete:"off",autocapitalize:"off",class:"flex-1"}),null),s(b,r(T,{get when(){return l.filter()},get children(){return r(me,{icon:"circle-x",variant:"ghost",get onClick(){return l.clear}})}}),null),s(v,r(T,{get when(){return!l.grouped.loading},get fallback(){return r(Bt,{get label(){return`${t.t("common.loading")}${t.t("common.loading.ellipsis")}`}})},get children(){return r(T,{get when(){return l.flat().length>0},get fallback(){return r(Gt,{get message(){return t.t("dialog.model.empty")},get filter(){return l.filter()}})},get children(){return r(H,{get each(){return l.grouped.latest},children:y=>(()=>{var k=Wt(),P=k.firstChild,K=P.firstChild;return s(P,r(ee,{get id(){return y.category},class:"size-5 shrink-0 icon-strong-base"}),K),s(K,()=>y.items[0].provider.name),s(k,r(A,{get children(){return r(H,{get each(){return y.items},children:z=>{const h={providerID:z.provider.id,modelID:z.id};return(()=>{var d=Nt(),x=d.firstChild,m=x.firstChild,C=x.nextSibling;return s(m,()=>z.name),s(C,r(L,{get checked(){return e.visible(h)},onChange:F=>{e.setVisibility(h,F)},hideLabel:!0,get children(){return z.name}})),d})()}})}}),null),k})()})}})}})),n})()};var Ut=f('<div class="flex flex-col justify-between h-full w-full"><div class="flex flex-col gap-3 w-full pt-3"><div class="flex flex-col gap-3"><div class="flex flex-col gap-1.5"><div class="flex flex-col gap-1.5 w-full"></div></div><div class="flex flex-col gap-1.5"><div class="flex flex-col gap-1.5 w-full"></div></div></div></div><div class="flex flex-col gap-1 pl-1 py-1 text-12-medium text-text-weak"><span></span><span class=text-11-regular>v');const Zt=()=>{const t=X(),e=ue();return r(Re,{size:"x-large",transition:!0,get children(){return r(D,{orientation:"vertical",variant:"settings",defaultValue:"general",class:"h-full settings-dialog",get children(){return[r(D.List,{get children(){var l=Ut(),n=l.firstChild,c=n.firstChild,g=c.firstChild,_=g.firstChild,b=g.nextSibling,v=b.firstChild,y=n.nextSibling,k=y.firstChild,P=k.nextSibling;return P.firstChild,s(g,r(D.SectionTitle,{get children(){return t.t("settings.section.desktop")}}),_),s(_,r(D.Trigger,{value:"general",get children(){return[r(B,{name:"sliders"}),G(()=>t.t("settings.tab.general"))]}}),null),s(_,r(D.Trigger,{value:"shortcuts",get children(){return[r(B,{name:"keyboard"}),G(()=>t.t("settings.tab.shortcuts"))]}}),null),s(b,r(D.SectionTitle,{get children(){return t.t("settings.section.server")}}),v),s(v,r(D.Trigger,{value:"providers",get children(){return[r(B,{name:"providers"}),G(()=>t.t("settings.providers.title"))]}}),null),s(v,r(D.Trigger,{value:"models",get children(){return[r(B,{name:"models"}),G(()=>t.t("settings.models.title"))]}}),null),s(k,()=>t.t("app.name.desktop")),s(P,()=>e.version,null),l}}),r(D.Content,{value:"general",class:"no-scrollbar",get children(){return r(gt,{})}}),r(D.Content,{value:"shortcuts",class:"no-scrollbar",get children(){return r(Tt,{})}}),r(D.Content,{value:"providers",class:"no-scrollbar",get children(){return r(Ot,{})}}),r(D.Content,{value:"models",class:"no-scrollbar",get children(){return r(Rt,{})}})]}})}})};export{Zt as DialogSettings};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as m,g,C as f,w as b,x as j,i as k,h as y,aD as d,j as p,$ as h,t as c}from"./index-Bj2ueAL8.js";const F="/assets/sprite-Fb-TFjRY.svg";var v=c("<svg><defs><mask mask-type=alpha><use></svg>",!1,!0,!1),x=c("<svg><rect width=100% height=100% fill=currentColor></svg>",!1,!0,!1),C=c("<svg data-component=file-icon>"),T=c("<svg><use></svg>",!1,!0,!1);const N=o=>{const[e,i]=m(o,["node","class","classList","expanded","mono"]),a=g(()=>I(e.node.path,e.node.type,e.expanded||!1)),s=`file-icon-mono-${f()}`;return(()=>{var l=C();return b(l,j(i,{get classList(){return{...e.classList??{},[e.class??""]:!!e.class}}}),!0,!0),k(l,y(h,{get when(){return e.mono},get fallback(){return(()=>{var r=T();return p(()=>d(r,"href",`${F}#${a()}`)),r})()},get children(){return[(()=>{var r=v(),t=r.firstChild,u=t.firstChild;return d(t,"id",s),p(()=>d(u,"href",`${F}#${a()}`)),r})(),(()=>{var r=x();return d(r,"mask",`url(#${s})`),r})()]}})),l})()},n={fileNames:{"readme.md":"Readme","changelog.md":"Changelog","contributing.md":"Contributing","conduct.md":"Conduct",license:"Certificate",authors:"Authors",credits:"Credits",install:"Installation","package.json":"Nodejs","package-lock.json":"Nodejs","yarn.lock":"Yarn","pnpm-lock.yaml":"Pnpm","bun.lock":"Bun","bun.lockb":"Bun","bunfig.toml":"Bun",".nvmrc":"Nodejs",".node-version":"Nodejs",dockerfile:"Docker","docker-compose.yml":"Docker","docker-compose.yaml":"Docker",".dockerignore":"Docker","jest.config.js":"Jest","jest.config.ts":"Jest","jest.config.mjs":"Jest","vitest.config.js":"Vitest","vitest.config.ts":"Vitest","tailwind.config.js":"Tailwindcss","tailwind.config.ts":"Tailwindcss","turbo.json":"Turborepo","tsconfig.json":"Tsconfig","jsconfig.json":"Jsconfig",".eslintrc":"Eslint",".eslintrc.js":"Eslint",".eslintrc.json":"Eslint",".prettierrc":"Prettier",".prettierrc.js":"Prettier",".prettierrc.json":"Prettier","vite.config.js":"Vite","vite.config.ts":"Vite","webpack.config.js":"Webpack","rollup.config.js":"Rollup","astro.config.mjs":"AstroConfig","astro.config.js":"AstroConfig","next.config.js":"Next","next.config.mjs":"Next","nuxt.config.js":"Nuxt","nuxt.config.ts":"Nuxt","svelte.config.js":"Svelte","gatsby-config.js":"Gatsby","remix.config.js":"Remix","prisma.schema":"Prisma",".gitignore":"Git",".gitattributes":"Git",makefile:"Makefile",cmake:"Cmake","cargo.toml":"Rust","go.mod":"GoMod","go.sum":"GoMod","requirements.txt":"Python","pyproject.toml":"Python",pipfile:"Python","poetry.lock":"Poetry",gemfile:"Gemfile",rakefile:"Ruby","composer.json":"Php","build.gradle":"Gradle","pom.xml":"Maven","deno.json":"Deno","deno.jsonc":"Deno","vercel.json":"Vercel","netlify.toml":"Netlify",".env":"Tune",".env.local":"Tune",".env.development":"Tune",".env.production":"Tune",".env.example":"Tune",".editorconfig":"Editorconfig","robots.txt":"Robots","favicon.ico":"Favicon",browserlist:"Browserlist",".babelrc":"Babel","babel.config.js":"Babel","gulpfile.js":"Gulp","gruntfile.js":"Grunt","capacitor.config.json":"Capacitor","ionic.config.json":"Ionic","angular.json":"Angular",".storybook":"Storybook","storybook.config.js":"Storybook","cypress.config.js":"Cypress","playwright.config.js":"Playwright","puppeteer.config.js":"Puppeteer","wrangler.toml":"Wrangler","firebase.json":"Firebase",supabase:"Supabase",terraform:"Terraform",kubernetes:"Kubernetes",".gitpod.yml":"Gitpod",".devcontainer":"Vscode","travis.yml":"Travis","appveyor.yml":"Appveyor",".circleci":"Circleci","renovate.json":"Renovate","dependabot.yml":"Dependabot","lerna.json":"Lerna","nx.json":"Nx"},fileExtensions:{"spec.ts":"TestTs","test.ts":"TestTs","spec.tsx":"TestJsx","test.tsx":"TestJsx","spec.js":"TestJs","test.js":"TestJs","spec.jsx":"TestJsx","test.jsx":"TestJsx","js.map":"JavascriptMap","d.ts":"TypescriptDef",ts:"Typescript",tsx:"React_ts",js:"Javascript",jsx:"React",mjs:"Javascript",cjs:"Javascript",html:"Html",htm:"Html",css:"Css",scss:"Sass",sass:"Sass",less:"Less",styl:"Stylus",json:"Json",xml:"Xml",yml:"Yaml",yaml:"Yaml",toml:"Toml",hjson:"Hjson",md:"Markdown",mdx:"Mdx",tex:"Tex",py:"Python",pyx:"Python",pyw:"Python",rs:"Rust",go:"Go",java:"Java",kt:"Kotlin",scala:"Scala",php:"Php",rb:"Ruby",cs:"Csharp",vb:"Visualstudio",cpp:"Cpp",cc:"Cpp",cxx:"Cpp",c:"C",h:"H",hpp:"Hpp",swift:"Swift",m:"ObjectiveC",mm:"ObjectiveCpp",dart:"Dart",lua:"Lua",pl:"Perl",r:"R",jl:"Julia",hs:"Haskell",elm:"Elm",ml:"Ocaml",clj:"Clojure",cljs:"Clojure",erl:"Erlang",ex:"Elixir",exs:"Elixir",nim:"Nim",zig:"Zig",v:"Vlang",odin:"Odin",gleam:"Gleam",grain:"Grain",roc:"Rocket",fs:"Fsharp",sh:"Console",bash:"Console",zsh:"Console",fish:"Console",ps1:"Powershell",cfg:"Settings",ini:"Settings",conf:"Settings",properties:"Settings",svg:"Svg",png:"Image",jpg:"Image",jpeg:"Image",gif:"Image",webp:"Image",bmp:"Image",ico:"Favicon",mp4:"Video",mov:"Video",avi:"Video",webm:"Video",mp3:"Audio",wav:"Audio",flac:"Audio",zip:"Zip",tar:"Zip",gz:"Zip",rar:"Zip","7z":"Zip",pdf:"Pdf",doc:"Word",docx:"Word",ppt:"Powerpoint",pptx:"Powerpoint",xls:"Document",xlsx:"Document",sql:"Database",db:"Database",sqlite:"Database",env:"Tune",log:"Log",lock:"Lock",key:"Key",pem:"Certificate",crt:"Certificate",proto:"Proto",graphql:"Graphql",gql:"Graphql",wasm:"Webassembly",dockerfile:"Docker"},folderNames:{src:"FolderSrc",source:"FolderSrc",lib:"FolderLib",libs:"FolderLib",test:"FolderTest",tests:"FolderTest",testing:"FolderTest",spec:"FolderTest",specs:"FolderTest",__tests__:"FolderTest",e2e:"FolderTest",integration:"FolderTest",unit:"FolderTest",cypress:"FolderCypress",node_modules:"FolderNode",vendor:"FolderPackages",packages:"FolderPackages",deps:"FolderPackages",build:"FolderBuildkite",dist:"FolderDist",out:"FolderDist",output:"FolderDist",target:"FolderTarget",config:"FolderConfig",configs:"FolderConfig",configuration:"FolderConfig",settings:"FolderConfig",env:"FolderEnvironment",environments:"FolderEnvironment",docker:"FolderDocker",dockerfiles:"FolderDocker",containers:"FolderDocker",docs:"FolderDocs",doc:"FolderDocs",documentation:"FolderDocs",readme:"FolderDocs",public:"FolderPublic",static:"FolderPublic",assets:"FolderImages",images:"FolderImages",img:"FolderImages",icons:"FolderImages",media:"FolderImages",fonts:"FolderFont",styles:"FolderCss",stylesheets:"FolderCss",css:"FolderCss",sass:"FolderSass",scss:"FolderSass",less:"FolderLess",scripts:"FolderScripts",script:"FolderScripts",tools:"FolderTools",utils:"FolderUtils",utilities:"FolderUtils",helpers:"FolderHelper",components:"FolderComponents",component:"FolderComponents",views:"FolderViews",view:"FolderViews",layouts:"FolderLayout",layout:"FolderLayout",templates:"FolderTemplate",template:"FolderTemplate",hooks:"FolderHook",hook:"FolderHook",store:"FolderStore",stores:"FolderStore",state:"FolderNgrxStore",reducers:"FolderReduxReducer",reducer:"FolderReduxReducer",services:"FolderApi",service:"FolderApi",api:"FolderApi",apis:"FolderApi",routes:"FolderRoutes",route:"FolderRoutes",routing:"FolderRoutes",middleware:"FolderMiddleware",middlewares:"FolderMiddleware",controllers:"FolderController",controller:"FolderController",models:"FolderDatabase",model:"FolderDatabase",schemas:"FolderDatabase",schema:"FolderDatabase",migrations:"FolderDatabase",migration:"FolderDatabase",seeders:"FolderSeeders",seeder:"FolderSeeders",types:"FolderTypescript",typing:"FolderTypescript",typings:"FolderTypescript","@types":"FolderTypescript",interfaces:"FolderInterface",interface:"FolderInterface",android:"FolderAndroid",ios:"FolderIos",mobile:"FolderMobile",flutter:"FolderFlutter",kubernetes:"FolderKubernetes",k8s:"FolderKubernetes",terraform:"FolderTerraform",aws:"FolderAws",azure:"FolderAzurePipelines",firebase:"FolderFirebase",supabase:"FolderSupabase",vercel:"FolderVercel",netlify:"FolderNetlify",".github":"FolderGithub",".gitlab":"FolderGitlab",".circleci":"FolderCircleci",ci:"FolderCi",".ci":"FolderCi",workflows:"FolderGhWorkflows",".git":"FolderGit",".vscode":"FolderVscode",".idea":"FolderIntellij",".cursor":"FolderCursor",".devcontainer":"FolderContainer",".storybook":"FolderStorybook",i18n:"FolderI18n",locales:"FolderI18n",locale:"FolderI18n",lang:"FolderI18n",languages:"FolderI18n",temp:"FolderTemp",tmp:"FolderTemp",logs:"FolderLog",log:"FolderLog",backup:"FolderBackup",backups:"FolderBackup",examples:"FolderExamples",example:"FolderExamples",demo:"FolderExamples",demos:"FolderExamples",samples:"FolderExamples",sample:"FolderExamples",fixtures:"FolderTest",mocks:"FolderMock",mock:"FolderMock",data:"FolderDatabase",database:"FolderDatabase",db:"FolderDatabase",sql:"FolderDatabase",prisma:"FolderPrisma",drizzle:"FolderDrizzle",security:"FolderSecure",auth:"FolderSecure",authentication:"FolderSecure",authorization:"FolderSecure",keys:"FolderKeys",certs:"FolderKeys",certificates:"FolderKeys",content:"FolderContent",posts:"FolderContent",articles:"FolderContent",blog:"FolderContent",functions:"FolderFunctions",function:"FolderFunctions",lambda:"FolderFunctions",lambdas:"FolderFunctions",serverless:"FolderServerless",jobs:"FolderJob",job:"FolderJob",tasks:"FolderTasks",task:"FolderTasks",cron:"FolderTasks",queue:"FolderQueue",queues:"FolderQueue",desktop:"FolderDesktop",windows:"FolderWindows",macos:"FolderMacos",linux:"FolderLinux"},defaults:{file:"Document",folder:"Folder",folderOpen:"FolderOpen"}},w=o=>o.startsWith("Folder")?o.endsWith("_light")?o.replace("_light","Open_light"):o.endsWith("Open")?o:o+"Open":o,D=o=>o.split("\\").join("/").split("/").filter(Boolean).pop()??"",S=o=>{const e=o.toLowerCase();return[e,`.${e}`,`_${e}`,`__${e}__`]},P=o=>{const e=o.toLowerCase(),i=[];for(let s=0;s<e.length;s++)e[s]==="."&&i.push(s);const a=new Set;a.add(e);for(const s of i)s+1<e.length&&a.add(e.slice(s+1));return Array.from(a).sort((s,l)=>l.length-s.length)};function I(o,e,i){const s=D(o).toLowerCase();if(e==="directory"){for(const r of S(s)){const t=n.folderNames[r];if(t)return i?w(t):t}return i?n.defaults.folderOpen:n.defaults.folder}const l=n.fileNames[s];if(l)return l;for(const r of P(s)){const t=n.fileExtensions[r];if(t)return t}return n.defaults.file}export{N as F};
|
|
1
|
+
import{s as m,g,C as f,w as b,x as j,i as k,h as y,aD as d,j as p,$ as h,t as c}from"./index-D-WWa_X8.js";const F="/assets/sprite-Fb-TFjRY.svg";var v=c("<svg><defs><mask mask-type=alpha><use></svg>",!1,!0,!1),x=c("<svg><rect width=100% height=100% fill=currentColor></svg>",!1,!0,!1),C=c("<svg data-component=file-icon>"),T=c("<svg><use></svg>",!1,!0,!1);const N=o=>{const[e,i]=m(o,["node","class","classList","expanded","mono"]),a=g(()=>I(e.node.path,e.node.type,e.expanded||!1)),s=`file-icon-mono-${f()}`;return(()=>{var l=C();return b(l,j(i,{get classList(){return{...e.classList??{},[e.class??""]:!!e.class}}}),!0,!0),k(l,y(h,{get when(){return e.mono},get fallback(){return(()=>{var r=T();return p(()=>d(r,"href",`${F}#${a()}`)),r})()},get children(){return[(()=>{var r=v(),t=r.firstChild,u=t.firstChild;return d(t,"id",s),p(()=>d(u,"href",`${F}#${a()}`)),r})(),(()=>{var r=x();return d(r,"mask",`url(#${s})`),r})()]}})),l})()},n={fileNames:{"readme.md":"Readme","changelog.md":"Changelog","contributing.md":"Contributing","conduct.md":"Conduct",license:"Certificate",authors:"Authors",credits:"Credits",install:"Installation","package.json":"Nodejs","package-lock.json":"Nodejs","yarn.lock":"Yarn","pnpm-lock.yaml":"Pnpm","bun.lock":"Bun","bun.lockb":"Bun","bunfig.toml":"Bun",".nvmrc":"Nodejs",".node-version":"Nodejs",dockerfile:"Docker","docker-compose.yml":"Docker","docker-compose.yaml":"Docker",".dockerignore":"Docker","jest.config.js":"Jest","jest.config.ts":"Jest","jest.config.mjs":"Jest","vitest.config.js":"Vitest","vitest.config.ts":"Vitest","tailwind.config.js":"Tailwindcss","tailwind.config.ts":"Tailwindcss","turbo.json":"Turborepo","tsconfig.json":"Tsconfig","jsconfig.json":"Jsconfig",".eslintrc":"Eslint",".eslintrc.js":"Eslint",".eslintrc.json":"Eslint",".prettierrc":"Prettier",".prettierrc.js":"Prettier",".prettierrc.json":"Prettier","vite.config.js":"Vite","vite.config.ts":"Vite","webpack.config.js":"Webpack","rollup.config.js":"Rollup","astro.config.mjs":"AstroConfig","astro.config.js":"AstroConfig","next.config.js":"Next","next.config.mjs":"Next","nuxt.config.js":"Nuxt","nuxt.config.ts":"Nuxt","svelte.config.js":"Svelte","gatsby-config.js":"Gatsby","remix.config.js":"Remix","prisma.schema":"Prisma",".gitignore":"Git",".gitattributes":"Git",makefile:"Makefile",cmake:"Cmake","cargo.toml":"Rust","go.mod":"GoMod","go.sum":"GoMod","requirements.txt":"Python","pyproject.toml":"Python",pipfile:"Python","poetry.lock":"Poetry",gemfile:"Gemfile",rakefile:"Ruby","composer.json":"Php","build.gradle":"Gradle","pom.xml":"Maven","deno.json":"Deno","deno.jsonc":"Deno","vercel.json":"Vercel","netlify.toml":"Netlify",".env":"Tune",".env.local":"Tune",".env.development":"Tune",".env.production":"Tune",".env.example":"Tune",".editorconfig":"Editorconfig","robots.txt":"Robots","favicon.ico":"Favicon",browserlist:"Browserlist",".babelrc":"Babel","babel.config.js":"Babel","gulpfile.js":"Gulp","gruntfile.js":"Grunt","capacitor.config.json":"Capacitor","ionic.config.json":"Ionic","angular.json":"Angular",".storybook":"Storybook","storybook.config.js":"Storybook","cypress.config.js":"Cypress","playwright.config.js":"Playwright","puppeteer.config.js":"Puppeteer","wrangler.toml":"Wrangler","firebase.json":"Firebase",supabase:"Supabase",terraform:"Terraform",kubernetes:"Kubernetes",".gitpod.yml":"Gitpod",".devcontainer":"Vscode","travis.yml":"Travis","appveyor.yml":"Appveyor",".circleci":"Circleci","renovate.json":"Renovate","dependabot.yml":"Dependabot","lerna.json":"Lerna","nx.json":"Nx"},fileExtensions:{"spec.ts":"TestTs","test.ts":"TestTs","spec.tsx":"TestJsx","test.tsx":"TestJsx","spec.js":"TestJs","test.js":"TestJs","spec.jsx":"TestJsx","test.jsx":"TestJsx","js.map":"JavascriptMap","d.ts":"TypescriptDef",ts:"Typescript",tsx:"React_ts",js:"Javascript",jsx:"React",mjs:"Javascript",cjs:"Javascript",html:"Html",htm:"Html",css:"Css",scss:"Sass",sass:"Sass",less:"Less",styl:"Stylus",json:"Json",xml:"Xml",yml:"Yaml",yaml:"Yaml",toml:"Toml",hjson:"Hjson",md:"Markdown",mdx:"Mdx",tex:"Tex",py:"Python",pyx:"Python",pyw:"Python",rs:"Rust",go:"Go",java:"Java",kt:"Kotlin",scala:"Scala",php:"Php",rb:"Ruby",cs:"Csharp",vb:"Visualstudio",cpp:"Cpp",cc:"Cpp",cxx:"Cpp",c:"C",h:"H",hpp:"Hpp",swift:"Swift",m:"ObjectiveC",mm:"ObjectiveCpp",dart:"Dart",lua:"Lua",pl:"Perl",r:"R",jl:"Julia",hs:"Haskell",elm:"Elm",ml:"Ocaml",clj:"Clojure",cljs:"Clojure",erl:"Erlang",ex:"Elixir",exs:"Elixir",nim:"Nim",zig:"Zig",v:"Vlang",odin:"Odin",gleam:"Gleam",grain:"Grain",roc:"Rocket",fs:"Fsharp",sh:"Console",bash:"Console",zsh:"Console",fish:"Console",ps1:"Powershell",cfg:"Settings",ini:"Settings",conf:"Settings",properties:"Settings",svg:"Svg",png:"Image",jpg:"Image",jpeg:"Image",gif:"Image",webp:"Image",bmp:"Image",ico:"Favicon",mp4:"Video",mov:"Video",avi:"Video",webm:"Video",mp3:"Audio",wav:"Audio",flac:"Audio",zip:"Zip",tar:"Zip",gz:"Zip",rar:"Zip","7z":"Zip",pdf:"Pdf",doc:"Word",docx:"Word",ppt:"Powerpoint",pptx:"Powerpoint",xls:"Document",xlsx:"Document",sql:"Database",db:"Database",sqlite:"Database",env:"Tune",log:"Log",lock:"Lock",key:"Key",pem:"Certificate",crt:"Certificate",proto:"Proto",graphql:"Graphql",gql:"Graphql",wasm:"Webassembly",dockerfile:"Docker"},folderNames:{src:"FolderSrc",source:"FolderSrc",lib:"FolderLib",libs:"FolderLib",test:"FolderTest",tests:"FolderTest",testing:"FolderTest",spec:"FolderTest",specs:"FolderTest",__tests__:"FolderTest",e2e:"FolderTest",integration:"FolderTest",unit:"FolderTest",cypress:"FolderCypress",node_modules:"FolderNode",vendor:"FolderPackages",packages:"FolderPackages",deps:"FolderPackages",build:"FolderBuildkite",dist:"FolderDist",out:"FolderDist",output:"FolderDist",target:"FolderTarget",config:"FolderConfig",configs:"FolderConfig",configuration:"FolderConfig",settings:"FolderConfig",env:"FolderEnvironment",environments:"FolderEnvironment",docker:"FolderDocker",dockerfiles:"FolderDocker",containers:"FolderDocker",docs:"FolderDocs",doc:"FolderDocs",documentation:"FolderDocs",readme:"FolderDocs",public:"FolderPublic",static:"FolderPublic",assets:"FolderImages",images:"FolderImages",img:"FolderImages",icons:"FolderImages",media:"FolderImages",fonts:"FolderFont",styles:"FolderCss",stylesheets:"FolderCss",css:"FolderCss",sass:"FolderSass",scss:"FolderSass",less:"FolderLess",scripts:"FolderScripts",script:"FolderScripts",tools:"FolderTools",utils:"FolderUtils",utilities:"FolderUtils",helpers:"FolderHelper",components:"FolderComponents",component:"FolderComponents",views:"FolderViews",view:"FolderViews",layouts:"FolderLayout",layout:"FolderLayout",templates:"FolderTemplate",template:"FolderTemplate",hooks:"FolderHook",hook:"FolderHook",store:"FolderStore",stores:"FolderStore",state:"FolderNgrxStore",reducers:"FolderReduxReducer",reducer:"FolderReduxReducer",services:"FolderApi",service:"FolderApi",api:"FolderApi",apis:"FolderApi",routes:"FolderRoutes",route:"FolderRoutes",routing:"FolderRoutes",middleware:"FolderMiddleware",middlewares:"FolderMiddleware",controllers:"FolderController",controller:"FolderController",models:"FolderDatabase",model:"FolderDatabase",schemas:"FolderDatabase",schema:"FolderDatabase",migrations:"FolderDatabase",migration:"FolderDatabase",seeders:"FolderSeeders",seeder:"FolderSeeders",types:"FolderTypescript",typing:"FolderTypescript",typings:"FolderTypescript","@types":"FolderTypescript",interfaces:"FolderInterface",interface:"FolderInterface",android:"FolderAndroid",ios:"FolderIos",mobile:"FolderMobile",flutter:"FolderFlutter",kubernetes:"FolderKubernetes",k8s:"FolderKubernetes",terraform:"FolderTerraform",aws:"FolderAws",azure:"FolderAzurePipelines",firebase:"FolderFirebase",supabase:"FolderSupabase",vercel:"FolderVercel",netlify:"FolderNetlify",".github":"FolderGithub",".gitlab":"FolderGitlab",".circleci":"FolderCircleci",ci:"FolderCi",".ci":"FolderCi",workflows:"FolderGhWorkflows",".git":"FolderGit",".vscode":"FolderVscode",".idea":"FolderIntellij",".cursor":"FolderCursor",".devcontainer":"FolderContainer",".storybook":"FolderStorybook",i18n:"FolderI18n",locales:"FolderI18n",locale:"FolderI18n",lang:"FolderI18n",languages:"FolderI18n",temp:"FolderTemp",tmp:"FolderTemp",logs:"FolderLog",log:"FolderLog",backup:"FolderBackup",backups:"FolderBackup",examples:"FolderExamples",example:"FolderExamples",demo:"FolderExamples",demos:"FolderExamples",samples:"FolderExamples",sample:"FolderExamples",fixtures:"FolderTest",mocks:"FolderMock",mock:"FolderMock",data:"FolderDatabase",database:"FolderDatabase",db:"FolderDatabase",sql:"FolderDatabase",prisma:"FolderPrisma",drizzle:"FolderDrizzle",security:"FolderSecure",auth:"FolderSecure",authentication:"FolderSecure",authorization:"FolderSecure",keys:"FolderKeys",certs:"FolderKeys",certificates:"FolderKeys",content:"FolderContent",posts:"FolderContent",articles:"FolderContent",blog:"FolderContent",functions:"FolderFunctions",function:"FolderFunctions",lambda:"FolderFunctions",lambdas:"FolderFunctions",serverless:"FolderServerless",jobs:"FolderJob",job:"FolderJob",tasks:"FolderTasks",task:"FolderTasks",cron:"FolderTasks",queue:"FolderQueue",queues:"FolderQueue",desktop:"FolderDesktop",windows:"FolderWindows",macos:"FolderMacos",linux:"FolderLinux"},defaults:{file:"Document",folder:"Folder",folderOpen:"FolderOpen"}},w=o=>o.startsWith("Folder")?o.endsWith("_light")?o.replace("_light","Open_light"):o.endsWith("Open")?o:o+"Open":o,D=o=>o.split("\\").join("/").split("/").filter(Boolean).pop()??"",S=o=>{const e=o.toLowerCase();return[e,`.${e}`,`_${e}`,`__${e}__`]},P=o=>{const e=o.toLowerCase(),i=[];for(let s=0;s<e.length;s++)e[s]==="."&&i.push(s);const a=new Set;a.add(e);for(const s of i)s+1<e.length&&a.add(e.slice(s+1));return Array.from(a).sort((s,l)=>l.length-s.length)};function I(o,e,i){const s=D(o).toLowerCase();if(e==="directory"){for(const r of S(s)){const t=n.folderNames[r];if(t)return i?w(t):t}return i?n.defaults.folderOpen:n.defaults.folder}const l=n.fileNames[s];if(l)return l;for(const r of P(s)){const t=n.fileExtensions[r];if(t)return t}return n.defaults.file}export{N as F};
|