@tencent-ai/codebuddy-code 2.121.1-dev.dd40c9c.202607141954 → 2.121.2-dev.91a753c.202607151135
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/CHANGELOG.md +18 -0
- package/dist/codebuddy-headless.js +9 -14
- package/dist/codebuddy.js +14 -19
- package/dist/web-ui/assets/{index-C5EKcpUI.js → index-XpnCWZWc.js} +1 -1
- package/dist/web-ui/index.html +1 -1
- package/dist/web-ui/sw.js +1 -1
- package/package.json +1 -1
- package/product.cloudhosted.json +2 -2
- package/product.internal.json +2 -2
- package/product.ioa.json +2 -2
- package/product.json +2 -2
- package/product.selfhosted.json +2 -2
|
@@ -1098,4 +1098,4 @@ ${c.date}`,children:[a.jsx("span",{className:"scm-graph-dot",style:{background:m
|
|
|
1098
1098
|
hover:text-text-primary hover:bg-bg-hover rounded-lg transition-colors`,title:e("workers.refresh"),children:[a.jsx(Pt,{size:14,className:i?"animate-spin":""}),a.jsx("span",{children:e("workers.refresh")})]})]}),s&&a.jsx("div",{className:"mb-4 p-3 rounded-xl error-banner text-sm",children:s}),a.jsx(NK,{daemon:r,onStart:()=>c(),onStop:d,onRestart:u}),a.jsx(RK,{workers:t,onViewLogs:p,onKill:b})]})}function NK({daemon:e,onStart:t,onStop:r,onRestart:i}){const{t:s}=ne(),n=(e==null?void 0:e.status)==="running",[o,l]=g.useState(null),c=g.useCallback(async(d,u)=>{l(d);try{await u()}finally{l(null)}},[]);return a.jsx("div",{className:`bg-bg-secondary rounded-xl p-4 md:p-5 border mb-6 transition-colors worker-card-hover ${n?"border-green-400/40 ring-1 ring-green-400/10":"border-border-default"}`,children:a.jsxs("div",{className:"flex flex-col md:flex-row md:items-center justify-between gap-4",children:[a.jsxs("div",{className:"flex flex-col gap-3",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(nd,{size:18,className:n?"text-green-500":"text-text-tertiary"}),a.jsx("span",{className:"text-base font-semibold text-text-primary",children:s("workers.daemon")}),(e==null?void 0:e.pid)&&a.jsxs("span",{className:"text-xs text-text-tertiary font-mono bg-bg-tertiary px-2 py-0.5 rounded-md ml-2 border border-border-default/50",children:["PID ",e.pid]})]}),a.jsxs("div",{className:"flex items-center gap-4 flex-wrap",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsxs("span",{className:"relative flex h-2.5 w-2.5",children:[n&&a.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-green-400 opacity-75"}),a.jsx("span",{className:`relative inline-flex rounded-full h-2.5 w-2.5 ${n?"bg-green-500":"bg-gray-400"}`})]}),a.jsx("span",{className:"text-sm font-medium text-text-secondary",children:s(n?"workers.daemon.running":"workers.daemon.stopped")})]}),(e==null?void 0:e.endpoint)&&a.jsxs("div",{className:"flex items-center gap-1.5",children:[a.jsx("span",{className:"text-border-primary",children:"|"}),a.jsx(ii,{size:14,className:"text-text-tertiary ml-1"}),a.jsx("a",{href:e.endpoint,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-accent-brand hover:underline",children:e.endpoint})]})]})]}),a.jsx("div",{className:"flex items-center gap-2 mt-2 md:mt-0",children:n?a.jsxs(a.Fragment,{children:[a.jsxs("button",{onClick:()=>c("stop",r),disabled:o!==null,className:`flex items-center gap-1.5 px-4 py-2 text-sm font-medium rounded-lg border border-border-default
|
|
1099
1099
|
bg-bg-primary text-text-secondary daemon-stop-btn transition-all disabled:opacity-50`,children:[o==="stop"?a.jsx(We,{size:14,className:"animate-spin"}):a.jsx(ig,{size:14}),s("workers.daemon.stop")]}),a.jsxs("button",{onClick:()=>c("restart",i),disabled:o!==null,className:`flex items-center gap-1.5 px-4 py-2 text-sm font-medium rounded-lg border border-border-default
|
|
1100
1100
|
bg-bg-primary text-text-secondary hover:text-text-primary hover:bg-bg-hover transition-all disabled:opacity-50`,children:[o==="restart"?a.jsx(We,{size:14,className:"animate-spin"}):a.jsx(ep,{size:14}),s("workers.daemon.restart")]})]}):a.jsxs("button",{onClick:()=>c("start",t),disabled:o!==null,className:`flex items-center gap-1.5 px-4 py-2 text-sm font-medium rounded-lg shadow-sm
|
|
1101
|
-
daemon-start-btn transition-all disabled:opacity-70`,children:[o==="start"?a.jsx(We,{size:14,className:"animate-spin"}):a.jsx(xL,{size:14}),s(o==="start"?"workers.daemon.starting":"workers.daemon.start")]})})]})})}function RK({workers:e,onViewLogs:t,onKill:r}){const{t:i}=ne();return a.jsxs("div",{children:[a.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[a.jsx(ea,{size:18,className:"text-text-secondary"}),a.jsxs("h2",{className:"text-base font-medium text-text-primary",children:[i("workers.active")," (",e.length,")"]})]}),e.length===0?a.jsx("div",{className:"text-center py-12 text-text-tertiary",children:i("workers.empty")}):a.jsx("div",{className:"space-y-4",children:[...e].sort((s,n)=>(n.isCurrent?1:0)-(s.isCurrent?1:0)).map(s=>a.jsx(DK,{worker:s,onViewLogs:t,onKill:r},`${s.pid}-${s.hostname}`))})]})}const LK={interactive:"kind-badge kind-badge-blue",bg:"kind-badge kind-badge-purple",daemon:"kind-badge kind-badge-green","daemon-worker":"kind-badge kind-badge-orange"};function DK({worker:e,onViewLogs:t,onKill:r}){const{t:i}=ne();return a.jsxs("div",{className:"group bg-bg-secondary rounded-xl p-4 md:p-5 border border-border-default transition-colors worker-card-hover",children:[a.jsxs("div",{className:"flex items-center justify-between mb-3",children:[a.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[a.jsx("span",{className:`inline-block px-2.5 py-0.5 text-xs font-medium rounded-md ${LK[e.kind]||"bg-gray-100 text-gray-600"}`,children:e.kind}),e.isCurrent&&a.jsx("span",{className:"text-[10px] uppercase font-bold tracking-wider px-1.5 py-0.5 rounded current-badge",children:"current"}),a.jsxs("span",{className:"text-xs text-text-tertiary font-mono",children:["PID ",e.pid]}),e.name&&e.name!=="-"&&a.jsx("span",{className:"text-sm font-medium text-text-primary",children:e.name})]}),a.jsxs("div",{className:"flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:[e.url&&a.jsx("a",{href:Lk(e),target:"_blank",rel:"noopener noreferrer",className:"p-1.5 rounded-md text-text-tertiary hover:text-accent-brand hover:bg-bg-hover transition-colors",title:i("workers.action.open"),children:a.jsx(ii,{size:14})}),!e.manual&&a.jsx("button",{onClick:()=>t(e),className:"p-1.5 rounded-md text-text-tertiary hover:text-text-primary hover:bg-bg-hover transition-colors",title:i("workers.action.logs"),children:a.jsx(Wi,{size:14})}),!e.isCurrent&&a.jsx("button",{onClick:()=>r(e),className:"p-1.5 rounded-md text-text-tertiary daemon-kill-btn transition-colors",title:i("workers.action.kill"),children:a.jsx(y1,{size:14})})]})]}),a.jsxs("div",{className:"flex flex-col md:flex-row md:items-start justify-between gap-3 md:gap-6",children:[a.jsxs("div",{className:"flex flex-col gap-1.5 flex-1 min-w-0",children:[a.jsx($s,{path:e.cwd,displayMode:"basename",className:"text-[13px] text-text-secondary font-mono truncate max-w-full"}),e.url&&a.jsxs("a",{href:Lk(e),target:"_blank",rel:"noopener noreferrer",className:"text-xs text-text-tertiary hover:text-accent-brand truncate inline-flex items-center gap-1",title:e.url,children:[a.jsx(ii,{size:10,className:"flex-none"}),e.url]})]}),a.jsxs("div",{className:"flex flex-wrap gap-x-8 gap-y-3 shrink-0",children:[a.jsx(Qh,{icon:a.jsx(mn,{size:14}),label:"Started",value:MK(e.startedAt)}),e.version&&a.jsx(Qh,{icon:a.jsx(ea,{size:14}),label:"Version",value:e.version}),e.hostname&&a.jsx(Qh,{icon:a.jsx(nd,{size:14}),label:"Host",value:e.hostname})]})]})]})}function Qh({icon:e,label:t,value:r,valueClassName:i}){return a.jsxs("div",{className:"flex flex-col gap-1",children:[a.jsxs("div",{className:"flex items-center gap-1.5 text-text-tertiary",children:[e,a.jsx("span",{className:"text-[11px] font-medium uppercase tracking-wider",children:t})]}),a.jsx("div",{className:`text-sm font-semibold text-text-primary ${i||""}`,children:r})]})}function $K(e){try{const t=new URL(e).hostname;return t==="127.0.0.1"||t==="localhost"||t==="::1"}catch{return!1}}function Lk(e){if(!e.url)return"#";const t=AK(e.url);if($K(t))return t;const r=uQ(String(e.pid));if(!r)return t;try{const i=new URL(t);return i.searchParams.set("password",r),i.toString()}catch(i){return console.warn("Failed to build worker URL with password:",t,i),t}}function MK(e){const t=Math.floor((Date.now()-e)/1e3);if(t<60)return`${t}s ago`;const r=Math.floor(t/60);if(r<60)return`${r}m ago`;const i=Math.floor(r/60);return i<24?`${i}h ${r%60}m`:`${Math.floor(i/24)}d ${i%24}h`}function OK(e={}){const{immediate:t=!1,onNeedRefresh:r,onOfflineReady:i,onRegistered:s,onRegisteredSW:n,onRegisterError:o}=e;let l,c,d;const u=async(p=!0)=>{await c,d==null||d()};async function h(){if("serviceWorker"in navigator){if(l=await _i(async()=>{const{Workbox:p}=await import("./workbox-window.prod.es5-BBnX5xw4.js");return{Workbox:p}},[]).then(({Workbox:p})=>new p("/sw.js",{scope:"/",type:"classic"})).catch(p=>{o==null||o(p)}),!l)return;d=()=>{l==null||l.messageSkipWaiting()};{let p=!1;const m=()=>{p=!0,l==null||l.addEventListener("controlling",f=>{f.isUpdate&&window.location.reload()}),r==null||r()};l.addEventListener("installed",f=>{typeof f.isUpdate>"u"?typeof f.isExternal<"u"&&f.isExternal?m():!p&&(i==null||i()):f.isUpdate||i==null||i()}),l.addEventListener("waiting",m)}l.register({immediate:t}).then(p=>{n?n("/sw.js",p):s==null||s(p)}).catch(p=>{o==null||o(p)})}}return c=h(),u}function jK(e={}){const{immediate:t=!0,onNeedRefresh:r,onOfflineReady:i,onRegistered:s,onRegisteredSW:n,onRegisterError:o}=e,[l,c]=g.useState(!1),[d,u]=g.useState(!1),[h]=g.useState(()=>OK({immediate:t,onOfflineReady(){u(!0),i==null||i()},onNeedRefresh(){c(!0),r==null||r()},onRegistered:s,onRegisteredSW:n,onRegisterError:o}));return{needRefresh:[l,c],offlineReady:[d,u],updateServiceWorker:h}}const BK=900*1e3,PK="pwa-new-version";function FK(){const{t:e}=ne(),t=g.useRef(null),r=g.useRef(!1),{updateServiceWorker:i}=jK({onRegisteredSW(o,l){l&&setInterval(()=>{l.update().catch(()=>{})},BK)},onNeedRefresh(){if(r.current=!0,!jt.getState().isAgentRunning){s();return}n()}});g.useEffect(()=>{t.current=i},[i]),g.useEffect(()=>jt.subscribe((l,c)=>{r.current&&c.isAgentRunning&&!l.isAgentRunning&&s()}),[]);function s(){r.current=!1;const o=t.current;return o?o(!0).catch(()=>{}):Promise.resolve()}function n(){wd.info(e("app.pwa.newVersion"),{id:PK,durationMs:0,action:{label:e("app.pwa.reloadNow"),onClick:()=>(s(),!0)}})}}function zK(){FK();const{viewState:e,checkAuth:t}=qm(),{status:r,sessionId:i,topic:s,setPromptSuggestion:n,setTopic:o}=wr(),{connect:l}=XI(),{clearChat:c}=jt(),d=jr(T=>T.focusedMemberName),{t:u,resolved:h}=ne(),p=Zo(T=>T.isOpen),m=Zo(T=>T.setOpen),f=Zo(T=>T.toggle),[b,y]=g.useState(!1),[x,A]=g.useState(!1),[N,_]=g.useState(!1),{splitPane:k,mainView:S,setMainView:v}=De();g.useEffect(()=>{const T=window.matchMedia("(min-width: 768px)");T.matches||m(!1);const E=$=>{$.matches||m(!1)};return T.addEventListener("change",E),()=>T.removeEventListener("change",E)},[m]),g.useEffect(()=>{const T=E=>Lr.handleKeyDown(E);return window.addEventListener("keydown",T),()=>window.removeEventListener("keydown",T)},[]),g.useEffect(()=>{r==="connected"&&cv.getState().loadBindings()},[r]);const R=g.useCallback(T=>{k(T)},[k]),j=g.useCallback(async()=>{if(i){try{await Ve().prompt(i,"/clear")}catch{wd.error(u("error.newChatFailed"))}c(),o(null),n(null),v("chat"),window.location.hash="/chat"}},[i,c,o,n,v]),W=g.useCallback(async T=>{if(i){try{await Ve().prompt(i,`/resume ${T}`)}catch{wd.error(u("error.switchSessionFailed"))}v("chat"),window.location.hash="/chat"}},[i,v]),H=g.useCallback(T=>{v(T),window.location.hash=`/${T}`,window.innerWidth<768&&m(!1)},[v]);if(g.useEffect(()=>{const T=[Lr.register({id:"commandPalette.toggle",key:"p",meta:!0,shift:!0,handler:()=>_(E=>!E)}),Lr.register({id:"sidebar.toggle",key:"b",meta:!0,handler:()=>f()}),Lr.register({id:"terminal.toggle",key:"j",meta:!0,handler:()=>{const E=S==="terminal"?"chat":"terminal";v(E),window.location.hash="/"+E}}),Lr.register({id:"newChat",key:"n",meta:!0,handler:()=>j()}),Lr.register({id:"settings",key:",",meta:!0,handler:()=>{v("settings"),window.location.hash="/settings"}}),Lr.registerAction("app:commandPalette",()=>_(E=>!E)),Lr.registerAction("app:toggleSidebar",()=>f()),Lr.registerAction("app:toggleTerminal",()=>{const E=S==="terminal"?"chat":"terminal";v(E),window.location.hash="/"+E}),Lr.registerAction("app:newChat",()=>j()),Lr.registerAction("app:settings",()=>{v("settings"),window.location.hash="/settings"}),Lr.registerAction("app:focusInput",()=>{const E=document.querySelector("textarea");E==null||E.focus()}),Lr.registerAction("app:keybindings",()=>{v("keybindings"),window.location.hash="/keybindings"})];return()=>T.forEach(E=>E())},[S,j,v,f]),g.useEffect(()=>{const T=new URLSearchParams(window.location.search),E=T.get("password"),$=T.get("token");if(E||$){Gm(E||$),T.delete("password"),T.delete("token");const B=T.toString()?`${window.location.pathname}?${T.toString()}`:window.location.pathname;window.history.replaceState({},"",B)}t()},[t]),g.useEffect(()=>{if(e==="authenticated"){const T=Vm();v(T),(!window.location.hash||window.location.hash==="#")&&(window.location.hash=`/${T}`)}},[e,v]),g.useEffect(()=>zI(E=>{v(E)}),[v]),g.useEffect(()=>{if(e==="authenticated"){const T=Bd()||void 0;l({token:T,continue:!0}),qk()}},[e,l]),g.useEffect(()=>{document.documentElement.lang=h;const T=xE(s);document.title=T?`${T} - CodeBuddy Code`:u("page.title")},[h,u,s]),e==="loading")return a.jsx("div",{className:"flex h-screen h-[100dvh] bg-bg-primary text-text-primary transition-colors duration-200 font-sans overflow-hidden",children:a.jsx("div",{className:"flex-1 flex items-center justify-center",children:a.jsx(os,{size:"large",text:u("app.connecting")})})});if(e==="login")return a.jsx(lQ,{});const I=()=>{if(r==="connecting")return a.jsx("div",{className:"flex-1 flex items-center justify-center",children:a.jsx(os,{size:"large",text:u("app.connecting")})});if(r!=="connected"&&S!=="settings"&&S!=="docs")return a.jsx("div",{className:"flex-1 flex items-center justify-center",children:a.jsxs("div",{className:"text-center",children:[a.jsx("div",{className:"text-text-secondary mb-4 font-medium",children:u("app.connectFailed")}),a.jsx("button",{onClick:()=>l(),className:["px-6 py-2.5 bg-accent-brand text-accent-brand-foreground rounded-full","text-sm font-medium transition-all hover:bg-accent-brand/90","hover:scale-105 active:scale-95 shadow-sm"].join(" "),children:u("app.retry")})]})});switch(S){case"chat":return a.jsx(or,{viewName:"chat",errorTitle:u("error.viewCrashed"),retryLabel:u("app.retry"),children:a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"flex-1 overflow-hidden w-full relative",children:d?a.jsx(ZQ,{}):a.jsx(eq,{onClickCloseBottomSheet:()=>A(!1)})}),a.jsx(oK,{}),a.jsx("div",{className:"flex-none bg-bg-primary",children:a.jsx(iQ,{onNavigate:H,onNewChat:j,onHistory:()=>y(!0),mainView:S,showBottomSheet:x,setShowBottomSheet:A})})]})});case"tasks":return a.jsx(or,{viewName:"tasks",errorTitle:u("error.viewCrashed"),retryLabel:u("app.retry"),children:a.jsx(GT,{})});case"plugins":return a.jsx(or,{viewName:"plugins",errorTitle:u("error.viewCrashed"),retryLabel:u("app.retry"),children:a.jsx(UT,{})});case"terminal":return null;case"canvas":return null;case"canvas-pane":return null;case"remote-control":return a.jsx(or,{viewName:"remote-control",errorTitle:u("error.viewCrashed"),retryLabel:u("app.retry"),children:a.jsx(TQ,{onNavigate:H})});case"editor":return null;case"changes":return null;case"settings":return a.jsx(or,{viewName:"settings",errorTitle:u("error.viewCrashed"),retryLabel:u("app.retry"),children:a.jsx(WT,{})});case"keybindings":return a.jsx(or,{viewName:"keybindings",errorTitle:u("error.viewCrashed"),retryLabel:u("app.retry"),children:a.jsx(nQ,{})});case"metrics":return a.jsx(or,{viewName:"metrics",errorTitle:u("error.viewCrashed"),retryLabel:u("app.retry"),children:a.jsx(SQ,{})});case"stats":return a.jsx(or,{viewName:"stats",errorTitle:u("error.viewCrashed"),retryLabel:u("app.retry"),children:a.jsx(QQ,{})});case"traces":return a.jsx(or,{viewName:"traces",errorTitle:u("error.viewCrashed"),retryLabel:u("app.retry"),children:a.jsx(CK,{})});case"workers":return a.jsx(or,{viewName:"workers",errorTitle:u("error.viewCrashed"),retryLabel:u("app.retry"),children:a.jsx(IK,{})});case"logs":return a.jsx(or,{viewName:"logs",errorTitle:u("error.viewCrashed"),retryLabel:u("app.retry"),children:a.jsx(gQ,{})});case"docs":return a.jsx(or,{viewName:"docs",errorTitle:u("error.viewCrashed"),retryLabel:u("app.retry"),children:a.jsx(sk,{})});default:return null}};return S==="docs"&&window.location.hash.includes("standalone")?a.jsx("div",{className:"flex h-screen h-[100dvh] bg-bg-primary text-text-primary transition-colors duration-200 font-sans overflow-hidden",children:a.jsx(sk,{})}):S==="editor"&&window.location.hash.includes("standalone")?a.jsx("div",{className:"flex h-screen h-[100dvh] bg-bg-primary text-text-primary transition-colors duration-200 font-sans overflow-hidden",children:a.jsx(gk,{})}):S==="canvas-pane"?a.jsx("div",{className:"flex h-screen h-[100dvh] bg-bg-primary text-text-primary transition-colors duration-200 font-sans overflow-hidden",children:a.jsx(QB,{})}):S==="canvas"&&window.location.hash.includes("standalone")?a.jsx("div",{className:"flex h-screen h-[100dvh] bg-bg-primary text-text-primary transition-colors duration-200 font-sans overflow-hidden",children:a.jsx($0,{})}):a.jsxs("div",{className:"flex h-screen h-[100dvh] bg-bg-primary text-text-primary transition-colors duration-200 font-sans overflow-hidden",children:[a.jsx(DQ,{isOpen:p,onClose:()=>m(!1),mainView:S,onNavigate:H}),a.jsxs("div",{className:"flex-1 flex flex-col min-w-0 min-h-0 relative h-full",children:[a.jsx("div",{style:{display:S!=="editor"&&S!=="changes"?void 0:"none"},children:a.jsx(KQ,{onMenuClick:()=>f(),onNewChat:j,onSplitTerminal:R,onHistory:()=>y(!0)})}),a.jsxs("div",{className:"flex-1 flex flex-col w-full overflow-hidden relative",children:[a.jsx("div",{className:"flex-1 flex flex-col w-full min-h-0 overflow-hidden",style:{display:S==="terminal"?"flex":"none"},children:a.jsx(qT,{})}),a.jsx("div",{className:"flex-1 flex flex-col w-full",style:{display:S==="canvas"?"flex":"none"},children:a.jsx(or,{viewName:"canvas",errorTitle:u("error.viewCrashed"),retryLabel:u("app.retry"),children:a.jsx($0,{})})}),a.jsx("div",{className:"flex-1 flex flex-col w-full min-h-0 overflow-hidden",style:{display:S==="editor"?"flex":"none"},children:a.jsx(or,{viewName:"editor",errorTitle:u("error.viewCrashed"),retryLabel:u("app.retry"),children:a.jsx(gk,{onMenuClick:()=>f()})})}),a.jsx("div",{className:"flex-1 flex flex-col w-full min-h-0 overflow-hidden",style:{display:S==="changes"?"flex":"none"},children:a.jsx(or,{viewName:"changes",errorTitle:u("error.viewCrashed"),retryLabel:u("app.retry"),children:a.jsx(iE,{onMenuClick:()=>f()})})}),S!=="terminal"&&S!=="canvas"&&S!=="editor"&&S!=="changes"&&I()]}),a.jsx(kV,{isOpen:b,onClose:()=>y(!1),onSwitchSession:W})]}),a.jsx(tK,{}),a.jsx(uq,{isOpen:N,onClose:()=>_(!1),onNavigate:H,onNewChat:j}),a.jsx(vV,{})]})}qI.createRoot(document.getElementById("root")).render(a.jsx(g.StrictMode,{children:a.jsx(or,{children:a.jsx(zK,{})})}));
|
|
1101
|
+
daemon-start-btn transition-all disabled:opacity-70`,children:[o==="start"?a.jsx(We,{size:14,className:"animate-spin"}):a.jsx(xL,{size:14}),s(o==="start"?"workers.daemon.starting":"workers.daemon.start")]})})]})})}function RK({workers:e,onViewLogs:t,onKill:r}){const{t:i}=ne();return a.jsxs("div",{children:[a.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[a.jsx(ea,{size:18,className:"text-text-secondary"}),a.jsxs("h2",{className:"text-base font-medium text-text-primary",children:[i("workers.active")," (",e.length,")"]})]}),e.length===0?a.jsx("div",{className:"text-center py-12 text-text-tertiary",children:i("workers.empty")}):a.jsx("div",{className:"space-y-4",children:[...e].sort((s,n)=>(n.isCurrent?1:0)-(s.isCurrent?1:0)).map(s=>a.jsx(DK,{worker:s,onViewLogs:t,onKill:r},`${s.pid}-${s.hostname}`))})]})}const LK={interactive:"kind-badge kind-badge-blue",bg:"kind-badge kind-badge-purple",daemon:"kind-badge kind-badge-green","daemon-worker":"kind-badge kind-badge-orange"};function DK({worker:e,onViewLogs:t,onKill:r}){const{t:i}=ne();return a.jsxs("div",{className:"group bg-bg-secondary rounded-xl p-4 md:p-5 border border-border-default transition-colors worker-card-hover",children:[a.jsxs("div",{className:"flex items-center justify-between mb-3",children:[a.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[a.jsx("span",{className:`inline-block px-2.5 py-0.5 text-xs font-medium rounded-md ${LK[e.kind]||"bg-gray-100 text-gray-600"}`,children:e.kind}),e.isCurrent&&a.jsx("span",{className:"text-[10px] uppercase font-bold tracking-wider px-1.5 py-0.5 rounded current-badge",children:"current"}),a.jsxs("span",{className:"text-xs text-text-tertiary font-mono",children:["PID ",e.pid]}),e.name&&e.name!=="-"&&a.jsx("span",{className:"text-sm font-medium text-text-primary",children:e.name})]}),a.jsxs("div",{className:"flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:[e.url&&a.jsx("a",{href:Lk(e),target:"_blank",rel:"noopener noreferrer",className:"p-1.5 rounded-md text-text-tertiary hover:text-accent-brand hover:bg-bg-hover transition-colors",title:i("workers.action.open"),children:a.jsx(ii,{size:14})}),!e.manual&&a.jsx("button",{onClick:()=>t(e),className:"p-1.5 rounded-md text-text-tertiary hover:text-text-primary hover:bg-bg-hover transition-colors",title:i("workers.action.logs"),children:a.jsx(Wi,{size:14})}),!e.isCurrent&&a.jsx("button",{onClick:()=>r(e),className:"p-1.5 rounded-md text-text-tertiary daemon-kill-btn transition-colors",title:i("workers.action.kill"),children:a.jsx(y1,{size:14})})]})]}),a.jsxs("div",{className:"flex flex-col md:flex-row md:items-start justify-between gap-3 md:gap-6",children:[a.jsxs("div",{className:"flex flex-col gap-1.5 flex-1 min-w-0",children:[a.jsx($s,{path:e.cwd,displayMode:"basename",className:"text-[13px] text-text-secondary font-mono truncate max-w-full"}),e.url&&a.jsxs("a",{href:Lk(e),target:"_blank",rel:"noopener noreferrer",className:"text-xs text-text-tertiary hover:text-accent-brand truncate inline-flex items-center gap-1",title:e.url,children:[a.jsx(ii,{size:10,className:"flex-none"}),e.url]})]}),a.jsxs("div",{className:"flex flex-wrap gap-x-8 gap-y-3 shrink-0",children:[a.jsx(Qh,{icon:a.jsx(mn,{size:14}),label:"Started",value:MK(e.startedAt)}),e.version&&a.jsx(Qh,{icon:a.jsx(ea,{size:14}),label:"Version",value:e.version}),e.hostname&&a.jsx(Qh,{icon:a.jsx(nd,{size:14}),label:"Host",value:e.hostname})]})]})]})}function Qh({icon:e,label:t,value:r,valueClassName:i}){return a.jsxs("div",{className:"flex flex-col gap-1",children:[a.jsxs("div",{className:"flex items-center gap-1.5 text-text-tertiary",children:[e,a.jsx("span",{className:"text-[11px] font-medium uppercase tracking-wider",children:t})]}),a.jsx("div",{className:`text-sm font-semibold text-text-primary ${i||""}`,children:r})]})}function $K(e){try{const t=new URL(e).hostname;return t==="127.0.0.1"||t==="localhost"||t==="::1"}catch{return!1}}function Lk(e){if(!e.url)return"#";const t=AK(e.url);if($K(t))return t;const r=uQ(String(e.pid));if(!r)return t;try{const i=new URL(t);return i.searchParams.set("password",r),i.toString()}catch(i){return console.warn("Failed to build worker URL with password:",t,i),t}}function MK(e){const t=Math.floor((Date.now()-e)/1e3);if(t<60)return`${t}s ago`;const r=Math.floor(t/60);if(r<60)return`${r}m ago`;const i=Math.floor(r/60);return i<24?`${i}h ${r%60}m`:`${Math.floor(i/24)}d ${i%24}h`}function OK(e={}){const{immediate:t=!1,onNeedRefresh:r,onOfflineReady:i,onRegistered:s,onRegisteredSW:n,onRegisterError:o}=e;let l,c,d;const u=async(p=!0)=>{await c,d==null||d()};async function h(){if("serviceWorker"in navigator){if(l=await _i(async()=>{const{Workbox:p}=await import("./workbox-window.prod.es5-BBnX5xw4.js");return{Workbox:p}},[]).then(({Workbox:p})=>new p("/sw.js",{scope:"/",type:"classic"})).catch(p=>{o==null||o(p)}),!l)return;d=()=>{l==null||l.messageSkipWaiting()};{let p=!1;const m=()=>{p=!0,l==null||l.addEventListener("controlling",f=>{f.isUpdate&&window.location.reload()}),r==null||r()};l.addEventListener("installed",f=>{typeof f.isUpdate>"u"?typeof f.isExternal<"u"&&f.isExternal?m():!p&&(i==null||i()):f.isUpdate||i==null||i()}),l.addEventListener("waiting",m)}l.register({immediate:t}).then(p=>{n?n("/sw.js",p):s==null||s(p)}).catch(p=>{o==null||o(p)})}}return c=h(),u}function jK(e={}){const{immediate:t=!0,onNeedRefresh:r,onOfflineReady:i,onRegistered:s,onRegisteredSW:n,onRegisterError:o}=e,[l,c]=g.useState(!1),[d,u]=g.useState(!1),[h]=g.useState(()=>OK({immediate:t,onOfflineReady(){u(!0),i==null||i()},onNeedRefresh(){c(!0),r==null||r()},onRegistered:s,onRegisteredSW:n,onRegisterError:o}));return{needRefresh:[l,c],offlineReady:[d,u],updateServiceWorker:h}}const BK=900*1e3,PK="pwa-new-version";function FK(){const{t:e}=ne(),t=g.useRef(null),r=g.useRef(!1),{updateServiceWorker:i}=jK({onRegisteredSW(o,l){l&&setInterval(()=>{l.update().catch(()=>{})},BK)},onNeedRefresh(){if(r.current=!0,!jt.getState().isAgentRunning){s();return}n()}});g.useEffect(()=>{t.current=i},[i]),g.useEffect(()=>jt.subscribe((l,c)=>{r.current&&c.isAgentRunning&&!l.isAgentRunning&&s()}),[]);function s(){r.current=!1;const o=t.current;return o?o(!0).catch(()=>{}):Promise.resolve()}function n(){wd.info(e("app.pwa.newVersion"),{id:PK,durationMs:0,action:{label:e("app.pwa.reloadNow"),onClick:()=>(s(),!0)}})}}function zK(){FK();const{viewState:e,checkAuth:t}=qm(),{status:r,sessionId:i,topic:s,setPromptSuggestion:n,setTopic:o}=wr(),{connect:l}=XI(),{clearChat:c}=jt(),d=jr(T=>T.focusedMemberName),{t:u,resolved:h}=ne(),p=Zo(T=>T.isOpen),m=Zo(T=>T.setOpen),f=Zo(T=>T.toggle),[b,y]=g.useState(!1),[x,A]=g.useState(!1),[N,_]=g.useState(!1),{splitPane:k,mainView:S,setMainView:v}=De();g.useEffect(()=>{const T=window.matchMedia("(min-width: 768px)");T.matches||m(!1);const E=$=>{$.matches||m(!1)};return T.addEventListener("change",E),()=>T.removeEventListener("change",E)},[m]),g.useEffect(()=>{const T=E=>Lr.handleKeyDown(E);return window.addEventListener("keydown",T),()=>window.removeEventListener("keydown",T)},[]),g.useEffect(()=>{r==="connected"&&cv.getState().loadBindings()},[r]);const R=g.useCallback(T=>{k(T)},[k]),j=g.useCallback(async()=>{if(i){try{await Ve().prompt(i,"/clear")}catch{wd.error(u("error.newChatFailed"))}c(),o(null),n(null),v("chat"),window.location.hash="/chat"}},[i,c,o,n,v]),W=g.useCallback(async T=>{if(i){try{await Ve().prompt(i,`/resume ${T}`)}catch{wd.error(u("error.switchSessionFailed"))}v("chat"),window.location.hash="/chat"}},[i,v]),H=g.useCallback(T=>{v(T),window.location.hash=`/${T}`,window.innerWidth<768&&m(!1)},[v]);if(g.useEffect(()=>{const T=[Lr.register({id:"commandPalette.toggle",key:"p",meta:!0,shift:!0,handler:()=>_(E=>!E)}),Lr.register({id:"sidebar.toggle",key:"b",meta:!0,handler:()=>f()}),Lr.register({id:"terminal.toggle",key:"j",meta:!0,handler:()=>{const E=S==="terminal"?"chat":"terminal";v(E),window.location.hash="/"+E}}),Lr.register({id:"newChat",key:"n",meta:!0,handler:()=>j()}),Lr.register({id:"settings",key:",",meta:!0,handler:()=>{v("settings"),window.location.hash="/settings"}}),Lr.registerAction("app:commandPalette",()=>_(E=>!E)),Lr.registerAction("app:toggleSidebar",()=>f()),Lr.registerAction("app:toggleTerminal",()=>{const E=S==="terminal"?"chat":"terminal";v(E),window.location.hash="/"+E}),Lr.registerAction("app:newChat",()=>j()),Lr.registerAction("app:settings",()=>{v("settings"),window.location.hash="/settings"}),Lr.registerAction("app:focusInput",()=>{const E=document.querySelector("textarea");E==null||E.focus()}),Lr.registerAction("app:keybindings",()=>{v("keybindings"),window.location.hash="/keybindings"})];return()=>T.forEach(E=>E())},[S,j,v,f]),g.useEffect(()=>{const T=new URLSearchParams(window.location.search),E=T.get("password"),$=T.get("token");if(E||$){Gm(E||$),T.delete("password"),T.delete("token");const B=T.toString()?`${window.location.pathname}?${T.toString()}`:window.location.pathname;window.history.replaceState({},"",B)}t()},[t]),g.useEffect(()=>{if(e==="authenticated"){const T=Vm();v(T),(!window.location.hash||window.location.hash==="#")&&(window.location.hash=`/${T}`)}},[e,v]),g.useEffect(()=>zI(E=>{v(E)}),[v]),g.useEffect(()=>{if(e==="authenticated"){const T=Bd()||void 0;l({token:T,continue:!0}),qk()}},[e,l]),g.useEffect(()=>{document.documentElement.lang=h;const T=xE(s);document.title=T||u("page.title")},[h,u,s]),e==="loading")return a.jsx("div",{className:"flex h-screen h-[100dvh] bg-bg-primary text-text-primary transition-colors duration-200 font-sans overflow-hidden",children:a.jsx("div",{className:"flex-1 flex items-center justify-center",children:a.jsx(os,{size:"large",text:u("app.connecting")})})});if(e==="login")return a.jsx(lQ,{});const I=()=>{if(r==="connecting")return a.jsx("div",{className:"flex-1 flex items-center justify-center",children:a.jsx(os,{size:"large",text:u("app.connecting")})});if(r!=="connected"&&S!=="settings"&&S!=="docs")return a.jsx("div",{className:"flex-1 flex items-center justify-center",children:a.jsxs("div",{className:"text-center",children:[a.jsx("div",{className:"text-text-secondary mb-4 font-medium",children:u("app.connectFailed")}),a.jsx("button",{onClick:()=>l(),className:["px-6 py-2.5 bg-accent-brand text-accent-brand-foreground rounded-full","text-sm font-medium transition-all hover:bg-accent-brand/90","hover:scale-105 active:scale-95 shadow-sm"].join(" "),children:u("app.retry")})]})});switch(S){case"chat":return a.jsx(or,{viewName:"chat",errorTitle:u("error.viewCrashed"),retryLabel:u("app.retry"),children:a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"flex-1 overflow-hidden w-full relative",children:d?a.jsx(ZQ,{}):a.jsx(eq,{onClickCloseBottomSheet:()=>A(!1)})}),a.jsx(oK,{}),a.jsx("div",{className:"flex-none bg-bg-primary",children:a.jsx(iQ,{onNavigate:H,onNewChat:j,onHistory:()=>y(!0),mainView:S,showBottomSheet:x,setShowBottomSheet:A})})]})});case"tasks":return a.jsx(or,{viewName:"tasks",errorTitle:u("error.viewCrashed"),retryLabel:u("app.retry"),children:a.jsx(GT,{})});case"plugins":return a.jsx(or,{viewName:"plugins",errorTitle:u("error.viewCrashed"),retryLabel:u("app.retry"),children:a.jsx(UT,{})});case"terminal":return null;case"canvas":return null;case"canvas-pane":return null;case"remote-control":return a.jsx(or,{viewName:"remote-control",errorTitle:u("error.viewCrashed"),retryLabel:u("app.retry"),children:a.jsx(TQ,{onNavigate:H})});case"editor":return null;case"changes":return null;case"settings":return a.jsx(or,{viewName:"settings",errorTitle:u("error.viewCrashed"),retryLabel:u("app.retry"),children:a.jsx(WT,{})});case"keybindings":return a.jsx(or,{viewName:"keybindings",errorTitle:u("error.viewCrashed"),retryLabel:u("app.retry"),children:a.jsx(nQ,{})});case"metrics":return a.jsx(or,{viewName:"metrics",errorTitle:u("error.viewCrashed"),retryLabel:u("app.retry"),children:a.jsx(SQ,{})});case"stats":return a.jsx(or,{viewName:"stats",errorTitle:u("error.viewCrashed"),retryLabel:u("app.retry"),children:a.jsx(QQ,{})});case"traces":return a.jsx(or,{viewName:"traces",errorTitle:u("error.viewCrashed"),retryLabel:u("app.retry"),children:a.jsx(CK,{})});case"workers":return a.jsx(or,{viewName:"workers",errorTitle:u("error.viewCrashed"),retryLabel:u("app.retry"),children:a.jsx(IK,{})});case"logs":return a.jsx(or,{viewName:"logs",errorTitle:u("error.viewCrashed"),retryLabel:u("app.retry"),children:a.jsx(gQ,{})});case"docs":return a.jsx(or,{viewName:"docs",errorTitle:u("error.viewCrashed"),retryLabel:u("app.retry"),children:a.jsx(sk,{})});default:return null}};return S==="docs"&&window.location.hash.includes("standalone")?a.jsx("div",{className:"flex h-screen h-[100dvh] bg-bg-primary text-text-primary transition-colors duration-200 font-sans overflow-hidden",children:a.jsx(sk,{})}):S==="editor"&&window.location.hash.includes("standalone")?a.jsx("div",{className:"flex h-screen h-[100dvh] bg-bg-primary text-text-primary transition-colors duration-200 font-sans overflow-hidden",children:a.jsx(gk,{})}):S==="canvas-pane"?a.jsx("div",{className:"flex h-screen h-[100dvh] bg-bg-primary text-text-primary transition-colors duration-200 font-sans overflow-hidden",children:a.jsx(QB,{})}):S==="canvas"&&window.location.hash.includes("standalone")?a.jsx("div",{className:"flex h-screen h-[100dvh] bg-bg-primary text-text-primary transition-colors duration-200 font-sans overflow-hidden",children:a.jsx($0,{})}):a.jsxs("div",{className:"flex h-screen h-[100dvh] bg-bg-primary text-text-primary transition-colors duration-200 font-sans overflow-hidden",children:[a.jsx(DQ,{isOpen:p,onClose:()=>m(!1),mainView:S,onNavigate:H}),a.jsxs("div",{className:"flex-1 flex flex-col min-w-0 min-h-0 relative h-full",children:[a.jsx("div",{style:{display:S!=="editor"&&S!=="changes"?void 0:"none"},children:a.jsx(KQ,{onMenuClick:()=>f(),onNewChat:j,onSplitTerminal:R,onHistory:()=>y(!0)})}),a.jsxs("div",{className:"flex-1 flex flex-col w-full overflow-hidden relative",children:[a.jsx("div",{className:"flex-1 flex flex-col w-full min-h-0 overflow-hidden",style:{display:S==="terminal"?"flex":"none"},children:a.jsx(qT,{})}),a.jsx("div",{className:"flex-1 flex flex-col w-full",style:{display:S==="canvas"?"flex":"none"},children:a.jsx(or,{viewName:"canvas",errorTitle:u("error.viewCrashed"),retryLabel:u("app.retry"),children:a.jsx($0,{})})}),a.jsx("div",{className:"flex-1 flex flex-col w-full min-h-0 overflow-hidden",style:{display:S==="editor"?"flex":"none"},children:a.jsx(or,{viewName:"editor",errorTitle:u("error.viewCrashed"),retryLabel:u("app.retry"),children:a.jsx(gk,{onMenuClick:()=>f()})})}),a.jsx("div",{className:"flex-1 flex flex-col w-full min-h-0 overflow-hidden",style:{display:S==="changes"?"flex":"none"},children:a.jsx(or,{viewName:"changes",errorTitle:u("error.viewCrashed"),retryLabel:u("app.retry"),children:a.jsx(iE,{onMenuClick:()=>f()})})}),S!=="terminal"&&S!=="canvas"&&S!=="editor"&&S!=="changes"&&I()]}),a.jsx(kV,{isOpen:b,onClose:()=>y(!1),onSwitchSession:W})]}),a.jsx(tK,{}),a.jsx(uq,{isOpen:N,onClose:()=>_(!1),onNavigate:H,onNewChat:j}),a.jsx(vV,{})]})}qI.createRoot(document.getElementById("root")).render(a.jsx(g.StrictMode,{children:a.jsx(or,{children:a.jsx(zK,{})})}));
|
package/dist/web-ui/index.html
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
|
16
16
|
<meta name="mobile-web-app-capable" content="yes">
|
|
17
17
|
<link rel="apple-touch-icon" href="/pwa-icon.svg">
|
|
18
|
-
<script type="module" crossorigin src="/assets/index-
|
|
18
|
+
<script type="module" crossorigin src="/assets/index-XpnCWZWc.js"></script>
|
|
19
19
|
<link rel="modulepreload" crossorigin href="/assets/markdown-Ce2Umeb2.js">
|
|
20
20
|
<link rel="modulepreload" crossorigin href="/assets/vendor-DpYitQz5.js">
|
|
21
21
|
<link rel="stylesheet" crossorigin href="/assets/index-BgfMmD6x.css">
|
package/dist/web-ui/sw.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
if(!self.define){let e,s={};const
|
|
1
|
+
if(!self.define){let e,s={};const n=(n,o)=>(n=new URL(n+".js",o).href,s[n]||new Promise(s=>{if("document"in self){const e=document.createElement("script");e.src=n,e.onload=s,document.head.appendChild(e)}else e=n,importScripts(n),s()}).then(()=>{let e=s[n];if(!e)throw new Error(`Module ${n} didn’t register its module`);return e}));self.define=(o,i)=>{const l=e||("document"in self?document.currentScript.src:"")||location.href;if(s[l])return;let r={};const t=e=>n(e,l),f={module:{uri:l},exports:r,require:t};s[l]=Promise.all(o.map(e=>f[e]||t(e))).then(e=>(i(...e),r))}}define(["./workbox-fed2bdfe"],function(e){"use strict";self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"sandbox_proxy.html",revision:"e54bd087bf8b90d87d84c3cd8f2c22e9"},{url:"pwa-icon.svg",revision:"673adddf1548f59682764258005b6034"},{url:"logo.svg",revision:"269aa921a3f446f8e17843c89ed7bf35"},{url:"index.html",revision:"ccc01f554bbbd00683470fe357f2a1c0"},{url:"assets/workbox-window.prod.es5-BBnX5xw4.js",revision:null},{url:"assets/vendor-DpYitQz5.js",revision:null},{url:"assets/octicons-CaZ_fok2.woff2",revision:null},{url:"assets/mfixx-CpAhKOZz.woff2",revision:null},{url:"assets/markdown-Ce2Umeb2.js",revision:null},{url:"assets/index-XpnCWZWc.js",revision:null},{url:"assets/index-DixJ0kqk.js",revision:null},{url:"assets/index-BgfMmD6x.css",revision:null},{url:"assets/fontawesome-B-jkhYfk.woff2",revision:null},{url:"assets/file-icons-C0jOugUK.woff2",revision:null},{url:"assets/devopicons-QN4QXivI.woff2",revision:null},{url:"logo.svg",revision:"269aa921a3f446f8e17843c89ed7bf35"},{url:"pwa-icon.svg",revision:"673adddf1548f59682764258005b6034"},{url:"manifest.webmanifest",revision:"7a003d0094122eb3e607566c757e9885"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("/index.html"),{denylist:[/^\/api/,/^\/gateway/,/^\/docs\//]})),e.registerRoute(/^https:\/\/fonts\.googleapis\.com/,new e.StaleWhileRevalidate({cacheName:"google-fonts-stylesheets",plugins:[]}),"GET"),e.registerRoute(/^https:\/\/fonts\.gstatic\.com/,new e.CacheFirst({cacheName:"google-fonts-webfonts",plugins:[new e.ExpirationPlugin({maxEntries:20,maxAgeSeconds:31536e3})]}),"GET")});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tencent-ai/codebuddy-code",
|
|
3
|
-
"version": "2.121.
|
|
3
|
+
"version": "2.121.2-dev.91a753c.202607151135",
|
|
4
4
|
"description": "Use CodeBuddy, Tencent's AI assistant, right from your terminal. CodeBuddy can understand your codebase, edit files, run terminal commands, and handle entire workflows for you.",
|
|
5
5
|
"main": "lib/node/index.js",
|
|
6
6
|
"typings": "lib/node/index.d.ts",
|
package/product.cloudhosted.json
CHANGED
|
@@ -827,6 +827,6 @@
|
|
|
827
827
|
"SelectImage": true,
|
|
828
828
|
"SkipToolCallSupportCheck": true
|
|
829
829
|
},
|
|
830
|
-
"commit": "
|
|
831
|
-
"date": "2026-07-
|
|
830
|
+
"commit": "91a753cda0f3475dfc61f0c68a1e2e000eeb00c0",
|
|
831
|
+
"date": "2026-07-15T03:34:29.602Z"
|
|
832
832
|
}
|
package/product.internal.json
CHANGED
package/product.ioa.json
CHANGED
package/product.json
CHANGED
package/product.selfhosted.json
CHANGED
|
@@ -342,6 +342,6 @@
|
|
|
342
342
|
"ScheduledTasks": true,
|
|
343
343
|
"SkipToolCallSupportCheck": true
|
|
344
344
|
},
|
|
345
|
-
"commit": "
|
|
346
|
-
"date": "2026-07-
|
|
345
|
+
"commit": "91a753cda0f3475dfc61f0c68a1e2e000eeb00c0",
|
|
346
|
+
"date": "2026-07-15T03:34:29.602Z"
|
|
347
347
|
}
|