airi / assets /deepseek-BTDkzUw2.js
nekomeowww's picture
release: build 9d9b5c427388bcc60fc5831b6027b16fe8f163ed
776b5c9
import"./live2d-zip-loader-CrhJsaag.js";import{d as k,q as U,bE as V,s as y,h as c,l as $,w as K,x as h,o as x,y as p,b as l,e as t}from"./index-Cg3iS_yg.js";import{u as w}from"./providers-BDNQM8C4.js";import{_ as z,a as C}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-Dtfi1xLK.js";import{_ as M}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BdTE6i_T.js";import{_ as N,a as P}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-BbZ7ow8J.js";import{_ as R}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-B34TUPgm.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-f6OmvM5E.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-DmnWC9HI.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-DwAk1Dri.js";import"./Input.vue_vue_type_script_setup_true_lang-OBUHKbfs.js";const a="deepseek",H=k({__name:"deepseek",setup(S){const{t:d}=U(),_=V(),m=w(),{providers:o}=y(m),n=c(()=>m.getProviderMetadata(a)),r=c({get:()=>{var e;return((e=o.value[a])==null?void 0:e.apiKey)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].apiKey=e}}),i=c({get:()=>{var e;return((e=o.value[a])==null?void 0:e.baseUrl)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].baseUrl=e}});$(()=>{var e,s;m.initializeProvider(a),r.value=((e=o.value[a])==null?void 0:e.apiKey)||"",i.value=((s=o.value[a])==null?void 0:s.baseUrl)||""}),K([r,i],()=>{o.value[a]={...o.value[a],apiKey:r.value,baseUrl:i.value||""}});function b(){var e;o.value[a]={...(e=n.value)==null?void 0:e.defaultOptions}}return(e,s)=>{var v,f;return x(),h(t(R),{"provider-name":(v=n.value)==null?void 0:v.localizedName,"provider-icon-color":(f=n.value)==null?void 0:f.iconColor,"on-back":()=>t(_).back()},{default:p(()=>[l(t(N),null,{default:p(()=>[l(t(P),{title:t(d)("settings.pages.providers.common.section.basic.title"),description:t(d)("settings.pages.providers.common.section.basic.description"),"on-reset":b},{default:p(()=>{var u;return[l(t(M),{modelValue:r.value,"onUpdate:modelValue":s[0]||(s[0]=g=>r.value=g),"provider-name":(u=n.value)==null?void 0:u.localizedName,placeholder:"sk-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),l(t(z),{title:t(d)("settings.pages.providers.common.section.advanced.title")},{default:p(()=>[l(t(C),{modelValue:i.value,"onUpdate:modelValue":s[1]||(s[1]=u=>i.value=u),placeholder:"https://api.deepseek.com/v1/"},null,8,["modelValue"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon-color","on-back"])}}});export{H as default};