PageSourceSearch

https://qoomezhu-q2docker.hf.space/assets/index-Bzm0bedb.js

js qoomezhu-q2docker.hf.space collected 2026-10-04 17:15:18 UTC 4,141 bytes, 1 lines download raw bytes

1import{u as I,r as o,j as e}from"./react-vendor-Dc5dhXQW.js";import{useAgentConfig as G}from"./useAgentConfig-2bih54Ef.js";import{p as M,s as a,q as W,r as D,T as O,t as $}from"./index-BPuL8_6t.js";import{ReactAgentCard as q}from"./ReactAgentCard-D17CM7Su.js";import{AgentLoopCard as F}from"./AgentLoopCard-DnYEkG3i.js";import{LlmRetryCard as H}from"./LlmRetryCard-Dqd-fb0H.js";import{LlmRateLimiterCard as X}from"./LlmRateLimiterCard-DJouZ-k_.js";import{u as Y}from"./i18n-vendor-CyU1p4Oa.js";import{S as g,B as b,a as w}from"./ui-vendor-CMEWXEKx.js";import"./utils-vendor-yxdTRm6O.js";import"./markdown-vendor-elH94dlU.js";import"./dnd-vendor-zA92mhJ9.js";function oe(){const{t}=Y(),[S]=I(),[h,f]=o.useState(S.get("tab")||"reactAgent"),{form:c,loading:K,saving:r,error:u,language:j,savingLang:v,timezone:C,savingTimezone:y,approvalLevel:N,setApprovalLevel:L,fetchConfig:T,handleSave:B,handleLanguageChange:A,handleTimezoneChange:_}=G(),k=g.useWatch("llm_retry_enabled",c)??!0,E=g.useWatch("context_manager_backend",c)||"light",P=g.useWatch("memory_manager_backend",c)||"remelight",[R,z]=o.useState(131072);o.useEffect(()=>{M.getActiveModels({scope:"effective"}).then(n=>{if(n.active_llm)return M.listProviders().then(l=>{const s=l.find(x=>{var i;return x.id===((i=n.active_llm)==null?void 0:i.provider_id)}),d=[...(s==null?void 0:s.models)??[],...(s==null?void 0:s.extra_models)??[]].find(x=>{var i;return x.id===((i=n.active_llm)==null?void 0:i.model)});(d==null?void 0:d.max_input_length)!=null&&z(d.max_input_length)})}).catch(()=>{})},[]);const p=o.useMemo(()=>{const n=[{key:"reactAgent",label:e.jsx("span",{className:a.tabLabel,children:t("agentConfig.reactAgentTitle")}),children:e.jsx("div",{className:a.tabContent,children:e.jsx(q,{language:j,savingLang:v,onLanguageChange:A,timezone:C,savingTimezone:y,onTimezoneChange:_})})},{key:"agentLoop",label:e.jsx("span",{className:a.tabLabel,children:t("agentConfig.agentLoopTitle","Agent Loop Settings")}),children:e.jsx("div",{className:a.tabContent,children:e.jsx(F,{})})},{key:"llmRetry",label:e.jsx("span",{className:a.tabLabel,children:t("agentConfig.llmRetryTitle")}),children:e.jsx("div",{className:a.tabContent,children:e.jsx(H,{llmRetryEnabled:k})})},{key:"llmRateLimiter",label:e.jsx("span",{className:a.tabLabel,children:t("agentConfig.llmRateLimiterTitle")}),children:e.jsx("div",{className:a.tabContent,children:e.jsx(X,{})})}],l=W[E];if(l){const m=l.component;n.push({key:l.tabKey,label:e.jsx("span",{className:a.tabLabel,children:t(`agentConfig.${l.tabKey}Title`)}),children:e.jsx("div",{className:a.tabContent,children:e.jsx(m,{maxInputLength:R})})})}const s=D[P];if(s){const m=s.component;n.push({key:s.tabKey,label:e.jsx("span",{className:a.tabLabel,children:t(`agentConfig.${s.tabKey}Title`)}),children:e.jsx("div",{className:a.tabContent,children:e.jsx(m,{})})})}return n.push({key:"toolExecutionLevel",label:e.jsx("span",{className:a.tabLabel,children:t("agentConfig.toolExecutionLevelTitle")}),children:e.jsx("div",{className:a.tabContent,children:e.jsx(O,{value:N,onChange:L,disabled:r})})}),n},[t,j,v,C,y,A,_,k,R,E,P,N,L,r]);return o.useEffect(()=>{const n=p.map(l=>l.key);n.includes(h)||f(n[0]??"reactAgent")},[p,h]),K?e.jsx("div",{className:a.configPage,children:e.jsx("div",{className:a.centerState,children:e.jsx("span",{className:a.stateText,children:t("common.loading")})})}):u?e.jsx("div",{className:a.configPage,children:e.jsxs("div",{className:a.centerState,children:[e.jsx("span",{className:a.stateTextError,children:u}),e.jsx(b,{size:"small",onClick:T,style:{marginTop:12},children:t("environments.retry")})]})}):e.jsxs("div",{className:a.configPage,children:[e.jsx($,{parent:t("nav.agent"),current:t("agentConfig.title")}),e.jsx("div",{className:a.content,children:e.jsx(g,{form:c,layout:"vertical",className:a.form,children:e.jsx(w,{className:a.mainTabs,activeKey:h,onChange:f,items:p,destroyInactiveTabPane:!1})})}),e.jsxs("div",{className:a.footerActions,children:[e.jsx(b,{onClick:T,disabled:r,style:{marginRight:8},children:t("common.reset")}),e.jsx(b,{type:"primary",onClick:B,loading:r,children:t("common.save")})]})]})}export{oe as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.