@tencent-ai/codebuddy-code 1.0.18 → 1.0.19-next.ea857f2.20250918

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 CHANGED
@@ -6,8 +6,27 @@ CodeBuddy Code 的所有重要更新都会记录在这里。
6
6
 
7
7
  ## [未发布]
8
8
 
9
- ### 🔧 配置优化
10
- - **版本配置更新**:调整版本号配置,优化发布流程文档
9
+ ### 新功能
10
+ - **权限模式动态管理**:实现会话级权限模式动态切换,支持运行时权限状态更新和UI显示
11
+ - **流式渲染增强**:实现bash工具流式消息渲染,支持实时输出显示
12
+ - **后台任务管理**:新增后台工具任务管理功能,支持任务状态跟踪和控制
13
+ - **键盘服务扩展**:新增键盘服务模块,提供更丰富的交互控制能力
14
+ - **新增命令**:添加resume、add-dir、doctor命令
15
+ - **错误文案优化**:使用更友好的文案进行错误展示
16
+
17
+ ### 🔧 功能改进
18
+ - **跨平台按键处理增强**:改进特殊按键处理机制,提升不同平台下的输入体验
19
+ - **bash工具重构**:优化bash命令执行流程,改为流式渲染模式,提升用户体验
20
+ - **UI组件增强**:新增流式工具调用渲染组件和高度限制容器组件
21
+ - **消息分组优化**:改进消息分组逻辑,更好地处理流式数据显示
22
+ - **命令选项修复**:修复命令行选项默认值配置问题
23
+ - **路由系统优化**:修复路由组件接口兼容性问题,统一组件props规范
24
+
25
+ ## [1.0.19] - 2025-09-16
26
+
27
+ ### 🔧 功能改进
28
+ - **HTTP操作重构**:优化CLI调度器中的HTTP操作依赖注入方式,使用RestOperationsFactory创建实例
29
+ - **代理配置增强**:为HTTP请求添加代理配置支持,提升网络请求灵活性
11
30
 
12
31
  ## [1.0.18] - 2025-09-16
13
32
 
@@ -1 +1 @@
1
- "use strict";exports.id=422,exports.ids=[422],exports.modules={7422:(e,t,n)=>{n.a(e,(async(e,r)=>{try{n.r(t),n.d(t,{LoginView:()=>LoginView});var l=n(80699),o=n(80932),a=n(14083),c=n(96540),i=n(66814),s=n(79413),u=n(45814),E=n(82101),m=n(34209),d=n(53829),g=n(49034),h=n(47693),b=n(83175),y=n(42790),p=e([a,E,d,g,y]);[a,E,d,g,y]=p.then?(await p)():p;const LoginView=()=>{const e=(0,i.i7)(d.Gb,(e=>e.staticKey));return c.createElement(c.Fragment,null,c.createElement(a.jC,{key:`login-view-${e}`,items:[c.createElement(LogoBox,{key:"logo-box"})]},(e=>e)),c.createElement(LoginBox,null))},LogoBox=()=>{const e=`Welcome to ${m.KR}`,t=e.length+8;return c.createElement(c.Fragment,null,c.createElement(a.az,{paddingLeft:1,borderStyle:"round",borderColor:b.Q.brand,width:t},c.createElement(a.EY,{color:b.Q.brand},"✻ ",e)),c.createElement(y.H,null))},f={iOA:"iOA",WeChat:"internal","Google / Github":"external"},LoginBox=()=>{const{authSession:e,replace:t,history:n}=(0,i.i7)(d.aO,(e=>({authSession:e.authSession,replace:e.replace,history:e.history}))),r=(0,i.i7)(d.Gb,(e=>e.refreshStatic)),[m,y]=(0,c.useState)("idle"),[p,C]=(0,c.useState)(""),[w,A]=(0,c.useState)(!1),[G,S]=(0,c.useState)(""),[O,Y]=(0,c.useState)("iOA"),[k,z]=(0,c.useState)(!1),x=(0,c.useRef)(new AbortController),W=(0,c.useMemo)((()=>{const e=["Google / Github","WeChat"];return k&&e.unshift("iOA"),e}),[k]);(0,c.useEffect)((()=>{const e=(0,h.bi)().urlSubject.subscribe(C);return()=>e.unsubscribe()}),[]),(0,c.useEffect)((()=>{(async()=>{if(p){const e=await u.E.copyToClipboard(p);A(e)}})()}),[p]),(0,c.useEffect)((()=>{(async()=>{try{const e=l.ContainerUtil.get(s.Oc),t=await e.isIntranet();z(t),t||"iOA"!==O||Y("Google / Github")}catch(e){z(!1),"iOA"===O&&Y("Google / Github")}})()}),[O]);const R=(0,c.useCallback)((()=>{if(n.length){const e=n[n.length-1];t(e,{onAfterRender:()=>r()})}}),[n,r,t]);return(0,a.Ge)(((t,n)=>{if("idle"===m)if(g.Om.RETURN(n))try{y("loading"),S(""),(0,h.Yf)().login({type:f[O],abortController:x.current,errorHandler:e=>{y("error"),S(e instanceof Error?e.message:"Unknown error occurred")}})}catch(e){y("error"),S(e instanceof Error?e.message:"Unknown error occurred")}else if(n.upArrow||n.downArrow){const e=k?["iOA","Google / Github","WeChat"]:["Google / Github","WeChat"],t=e.indexOf(O);let r;r=n.upArrow?t<=0?e.length-1:t-1:t>=e.length-1?0:t+1,Y(e[r])}else g.Om.ESCAPE(n)&&R();else g.Om.ESCAPE(n)&&("loading"===m?(x.current.abort(),x.current=new AbortController,y("idle")):e&&R())})),c.createElement(a.az,{marginTop:2,paddingX:1,flexDirection:"column",gap:1},"idle"===m?c.createElement(c.Fragment,null,c.createElement(a.az,null,c.createElement(a.EY,null,"Select login method:")),W.map((e=>c.createElement(a.az,{key:e},c.createElement(a.EY,{color:O===e?b.Q.brand:"grey"},O===e?o.Ay.pointer:" "," Login with ",e)))),c.createElement(a.az,{justifyContent:"space-between"},c.createElement(a.EY,{color:"grey"},"(Use ↑↓ to select, Enter to login)"))):"loading"===m?c.createElement(a.az,{paddingY:1,gap:1,flexDirection:"column"},c.createElement(a.az,null,c.createElement(a.EY,{color:"grey"},"Browser didn't open? Use the url below to sign in: "+(w?"(Copied link to clipboard)":""))),p&&c.createElement(a.az,null,c.createElement(a.EY,{color:"grey"},u.nO.createHyperlink(p))),c.createElement(a.az,{marginTop:1,gap:1},c.createElement(a.EY,{color:b.Q.brand},c.createElement(E.y$,{type:"star"})),c.createElement(a.EY,null,"Waiting for auth... (Press ESC to cancel)"))):"error"===m?c.createElement(c.Fragment,null,c.createElement(a.EY,{color:"red"},"Failed to login."),G&&c.createElement(a.EY,{color:"red"},"Message: ",G)):void 0)};r()}catch(e){r(e)}}))},42790:(e,t,n)=>{n.a(e,(async(e,r)=>{try{n.d(t,{H:()=>LogoText});var l=n(1597),o=n(14083),a=n(96540),c=n(66814),i=n(53829),s=n(83175),u=e([o,i]);[o,i]=u.then?(await u)():u;const LogoText=()=>{const e=(0,c.i7)(i.Gb,(e=>e.terminalWidth)),t=(0,a.useRef)((0,l.Ay)(s.Q.GradientColors)),n=(0,a.useCallback)((e=>t.current.multiline(e)),[t]),r=(0,a.useCallback)((()=>e>115?"\n ██████╗ ██████╗ ██████╗ ███████╗██████╗ ██╗ ██╗██████╗ ██████╗ ██╗ ██╗ ██████╗ ██████╗ ██████╗ ███████╗\n██╔════╝██╔═══██╗██╔══██╗██╔════╝██╔══██╗██║ ██║██╔══██╗██╔══██╗╚██╗ ██╔╝ ██╔════╝██╔═══██╗██╔══██╗██╔════╝\n██║ ██║ ██║██║ ██║█████╗ ██████╔╝██║ ██║██║ ██║██║ ██║ ╚████╔╝ ██║ ██║ ██║██║ ██║█████╗ \n██║ ██║ ██║██║ ██║██╔══╝ ██╔══██╗██║ ██║██║ ██║██║ ██║ ╚██╔╝ ██║ ██║ ██║██║ ██║██╔══╝ \n╚██████╗╚██████╔╝██████╔╝███████╗██████╔╝╚██████╔╝██████╔╝██████╔╝ ██║ ╚██████╗╚██████╔╝██████╔╝███████╗\n ╚═════╝ ╚═════╝ ╚═════╝ ╚══════╝╚═════╝ ╚═════╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═════╝ ╚══════╝\n ":" \n ██████╗ ██████╗ ██████╗ ███████╗██████╗ ██╗ ██╗██████╗ ██████╗ ██╗ ██╗\n██╔════╝██╔═══██╗██╔══██╗██╔════╝██╔══██╗██║ ██║██╔══██╗██╔══██╗╚██╗ ██╔╝\n██║ ██║ ██║██║ ██║█████╗ ██████╔╝██║ ██║██║ ██║██║ ██║ ╚████╔╝ \n██║ ██║ ██║██║ ██║██╔══╝ ██╔══██╗██║ ██║██║ ██║██║ ██║ ╚██╔╝ \n╚██████╗╚██████╔╝██████╔╝███████╗██████╔╝╚██████╔╝██████╔╝██████╔╝ ██║ \n ╚═════╝ ╚═════╝ ╚═════╝ ╚══════╝╚═════╝ ╚═════╝ ╚═════╝ ╚═════╝ ╚═╝ \n \n ██████╗ ██████╗ ██████╗ ███████╗ \n██╔════╝██╔═══██╗██╔══██╗██╔════╝ \n██║ ██║ ██║██║ ██║█████╗ \n██║ ██║ ██║██║ ██║██╔══╝ \n╚██████╗╚██████╔╝██████╔╝███████╗ \n ╚═════╝ ╚═════╝ ╚═════╝ ╚══════╝ \n "),[e]);return a.createElement(o.dL,{transform:n},a.createElement(o.EY,null,r()))};r()}catch(e){r(e)}}))}};
1
+ "use strict";exports.id=422,exports.ids=[422],exports.modules={7422:(e,t,n)=>{n.a(e,(async(e,r)=>{try{n.r(t),n.d(t,{LoginView:()=>LoginView});var l=n(80699),o=n(80932),a=n(14083),c=n(96540),i=n(66814),s=n(79413),u=n(8636),E=n(82101),m=n(34209),d=n(53829),g=n(49034),h=n(47693),b=n(83175),y=n(42790),p=e([a,E,d,g,y]);[a,E,d,g,y]=p.then?(await p)():p;const LoginView=()=>{const e=(0,i.i7)(d.Gb,(e=>e.staticKey));return c.createElement(c.Fragment,null,c.createElement(a.jC,{key:`login-view-${e}`,items:[c.createElement(LogoBox,{key:"logo-box"})]},(e=>e)),c.createElement(LoginBox,null))},LogoBox=()=>{const e=`Welcome to ${m.KR}`,t=e.length+8;return c.createElement(c.Fragment,null,c.createElement(a.az,{paddingLeft:1,borderStyle:"round",borderColor:b.Q.brand,width:t},c.createElement(a.EY,{color:b.Q.brand},"✻ ",e)),c.createElement(y.H,null))},f={iOA:"iOA",WeChat:"internal","Google / Github":"external"},LoginBox=()=>{const{authSession:e,replace:t,history:n}=(0,i.i7)(d.aO,(e=>({authSession:e.authSession,replace:e.replace,history:e.history}))),r=(0,i.i7)(d.Gb,(e=>e.refreshStatic)),[m,y]=(0,c.useState)("idle"),[p,C]=(0,c.useState)(""),[w,A]=(0,c.useState)(!1),[G,S]=(0,c.useState)(""),[O,Y]=(0,c.useState)("iOA"),[k,z]=(0,c.useState)(!1),x=(0,c.useRef)(new AbortController),W=(0,c.useMemo)((()=>{const e=["Google / Github","WeChat"];return k&&e.unshift("iOA"),Y((()=>e[0])),e}),[k]);(0,c.useEffect)((()=>{const e=(0,h.bi)().urlSubject.subscribe(C);return()=>e.unsubscribe()}),[]),(0,c.useEffect)((()=>{(async()=>{if(p){const e=await u.E.copyToClipboard(p);A(e)}})()}),[p]),(0,c.useEffect)((()=>{(async()=>{try{const e=l.ContainerUtil.get(s.Oc),t=await e.isIntranet();z(t),t||"iOA"!==O||Y("Google / Github")}catch(e){z(!1),"iOA"===O&&Y("Google / Github")}})()}),[O]);const R=(0,c.useCallback)((()=>{if(n.length){const e=n[n.length-1];t(e,{onAfterRender:()=>r()})}}),[n,r,t]);return(0,a.Ge)(((t,n)=>{if("idle"===m)if(g.Om.RETURN(n))try{y("loading"),S(""),(0,h.Yf)().login({type:f[O],abortController:x.current,errorHandler:e=>{y("error"),S((()=>e instanceof Error?e.message:"Unknown error occurred"))}})}catch(e){y("error"),S((()=>e instanceof Error?e.message:"Unknown error occurred"))}else if(n.upArrow||n.downArrow){const e=k?["iOA","Google / Github","WeChat"]:["Google / Github","WeChat"],t=e.indexOf(O);let r;r=n.upArrow?t<=0?e.length-1:t-1:t>=e.length-1?0:t+1,Y(e[r])}else g.Om.ESCAPE(n)&&R();else g.Om.ESCAPE(n)&&("loading"===m?(x.current.abort(),x.current=new AbortController):e?R():y("idle"))})),c.createElement(a.az,{marginTop:2,paddingX:1,flexDirection:"column",gap:1},"idle"===m?c.createElement(c.Fragment,null,c.createElement(a.az,null,c.createElement(a.EY,null,"Select login method:")),W.map((e=>c.createElement(a.az,{key:e},c.createElement(a.EY,{color:O===e?b.Q.brand:"grey"},O===e?o.Ay.pointer:" "," Login with ",e)))),c.createElement(a.az,{justifyContent:"space-between"},c.createElement(a.EY,{color:"grey"},"(Use ↑↓ to select, Enter to login)"))):"loading"===m?c.createElement(a.az,{paddingY:1,gap:1,flexDirection:"column"},c.createElement(a.az,null,c.createElement(a.EY,{color:"grey"},"Browser didn't open? Use the url below to sign in: "+(w?"(Copied link to clipboard)":""))),p&&c.createElement(a.az,null,c.createElement(a.EY,{color:"grey"},u.nO.createHyperlink(p))),c.createElement(a.az,{marginTop:1,gap:1},c.createElement(a.EY,{color:b.Q.brand},c.createElement(E.y$,{type:"star"})),c.createElement(a.EY,null,"Waiting for auth... (Press ESC to cancel)"))):"error"===m?c.createElement(c.Fragment,null,c.createElement(a.EY,{color:"red"},"Failed to login. Press esc to return to login"),G&&c.createElement(a.EY,{color:"red"},"Message: ",G)):void 0)};r()}catch(e){r(e)}}))},42790:(e,t,n)=>{n.a(e,(async(e,r)=>{try{n.d(t,{H:()=>LogoText});var l=n(1597),o=n(14083),a=n(96540),c=n(66814),i=n(53829),s=n(83175),u=e([o,i]);[o,i]=u.then?(await u)():u;const LogoText=()=>{const e=(0,c.i7)(i.Gb,(e=>e.terminalWidth)),t=(0,a.useRef)((0,l.Ay)(s.Q.GradientColors)),n=(0,a.useCallback)((e=>t.current.multiline(e)),[t]),r=(0,a.useCallback)((()=>e>115?"\n ██████╗ ██████╗ ██████╗ ███████╗██████╗ ██╗ ██╗██████╗ ██████╗ ██╗ ██╗ ██████╗ ██████╗ ██████╗ ███████╗\n██╔════╝██╔═══██╗██╔══██╗██╔════╝██╔══██╗██║ ██║██╔══██╗██╔══██╗╚██╗ ██╔╝ ██╔════╝██╔═══██╗██╔══██╗██╔════╝\n██║ ██║ ██║██║ ██║█████╗ ██████╔╝██║ ██║██║ ██║██║ ██║ ╚████╔╝ ██║ ██║ ██║██║ ██║█████╗ \n██║ ██║ ██║██║ ██║██╔══╝ ██╔══██╗██║ ██║██║ ██║██║ ██║ ╚██╔╝ ██║ ██║ ██║██║ ██║██╔══╝ \n╚██████╗╚██████╔╝██████╔╝███████╗██████╔╝╚██████╔╝██████╔╝██████╔╝ ██║ ╚██████╗╚██████╔╝██████╔╝███████╗\n ╚═════╝ ╚═════╝ ╚═════╝ ╚══════╝╚═════╝ ╚═════╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═════╝ ╚══════╝\n ":" \n ██████╗ ██████╗ ██████╗ ███████╗██████╗ ██╗ ██╗██████╗ ██████╗ ██╗ ██╗\n██╔════╝██╔═══██╗██╔══██╗██╔════╝██╔══██╗██║ ██║██╔══██╗██╔══██╗╚██╗ ██╔╝\n██║ ██║ ██║██║ ██║█████╗ ██████╔╝██║ ██║██║ ██║██║ ██║ ╚████╔╝ \n██║ ██║ ██║██║ ██║██╔══╝ ██╔══██╗██║ ██║██║ ██║██║ ██║ ╚██╔╝ \n╚██████╗╚██████╔╝██████╔╝███████╗██████╔╝╚██████╔╝██████╔╝██████╔╝ ██║ \n ╚═════╝ ╚═════╝ ╚═════╝ ╚══════╝╚═════╝ ╚═════╝ ╚═════╝ ╚═════╝ ╚═╝ \n \n ██████╗ ██████╗ ██████╗ ███████╗ \n██╔════╝██╔═══██╗██╔══██╗██╔════╝ \n██║ ██║ ██║██║ ██║█████╗ \n██║ ██║ ██║██║ ██║██╔══╝ \n╚██████╗╚██████╔╝██████╔╝███████╗ \n ╚═════╝ ╚═════╝ ╚═════╝ ╚══════╝ \n "),[e]);return a.createElement(o.dL,{transform:n},a.createElement(o.EY,null,r()))};r()}catch(e){r(e)}}))}};
@@ -1 +1 @@
1
- "use strict";exports.id=566,exports.ids=[566],exports.modules={19250:(e,t,a)=>{a.a(e,(async(e,n)=>{try{a.d(t,{NH:()=>i.NH,pF:()=>m.pF});var l=a(77146),s=a(89536),c=a(70790),m=a(62875),i=a(82388),r=e([l,s,c,m,i]);[l,s,c,m,i]=r.then?(await r)():r,n()}catch(e){n(e)}}))},90566:(e,t,a)=>{a.a(e,(async(e,n)=>{try{a.r(t),a.d(t,{ChatView:()=>ChatView});var l=a(14083),s=a(96540),c=a(66814),m=a(26730),i=a(53829),r=a(59505),o=a(19250),u=a(66530),h=a(92709),d=e([l,m,i,r,o,u,h]);[l,m,i,r,o,u,h]=d.then?(await d)():d;const g=2,p=2,E=s.memo((({availableHeight:e})=>{const t=(0,c.i7)(i.Gb,(e=>e.staticKey)),a=(0,c.i7)(i.rZ,(e=>e.messageGroups)),n=(0,h.A)(a),[m,r]=(0,s.useState)([]),[o,d]=(0,s.useState)([]),p=(0,s.useMemo)((()=>Math.min(g*o.length,e)),[o]);(0,s.useEffect)((()=>{const e=[],t=[];for(const n of a){if("function_call_group"===n.type){if(!n.messages.find((e=>"function_call"===e.type&&e.status&&["completed","incomplete"].includes(e.status)))){t.push(...n.messages);continue}}e.push(...n.messages)}r(e),d(t)}),[a]);const E=s.useMemo((()=>[s.createElement(u.f,{key:"chat-header-box"}),...m.map((e=>s.createElement(h.h,{key:`message-item-${e.type}-${e.id}`,msg:e,expanded:n(e.id)})))]),[m,n]);return s.createElement(s.Fragment,null,s.createElement(l.jC,{key:t,items:E},(e=>e)),o.length?s.createElement(l.az,{flexDirection:"column",height:p,overflow:"hidden"},...o.map((e=>s.createElement(h.h,{key:`message-item-${e.id}-pending`,msg:e,expanded:n(e.id)})))):s.createElement(s.Fragment,null))})),ChatContainer=()=>{const e=(0,c.i7)(i.Gb,(e=>e.terminalHeight)),[t,a]=(0,s.useState)(0);return(0,s.useEffect)((()=>{a(e-p)}),[e]),(0,m.o)(),(0,r.f)(),s.createElement(s.Fragment,null,s.createElement(E,{availableHeight:t}),s.createElement(l.az,{flexDirection:"column"},s.createElement(o.NH,null,s.createElement(o.pF,{availableHeight:t}))))},ChatView=()=>s.createElement(i.N7,null,s.createElement(i.Y5,null,s.createElement(ChatContainer,null)));n()}catch(e){n(e)}}))}};
1
+ "use strict";exports.id=566,exports.ids=[566],exports.modules={19250:(e,t,a)=>{a.a(e,(async(e,n)=>{try{a.d(t,{NH:()=>i.NH,pF:()=>r.pF});var l=a(77146),s=a(89536),c=a(70790),r=a(62875),i=a(82388),m=e([l,s,c,r,i]);[l,s,c,r,i]=m.then?(await m)():m,n()}catch(e){n(e)}}))},90566:(e,t,a)=>{a.a(e,(async(e,n)=>{try{a.r(t),a.d(t,{ChatView:()=>ChatView});var l=a(14083),s=a(96540),c=a(66814),r=a(26730),i=a(53829),m=a(59505),u=a(19250),o=a(66530),p=a(92709),d=e([l,r,i,m,u,o,p]);[l,r,i,m,u,o,p]=d.then?(await d)():d;const h=2,g=5,f=2,E=s.memo((({availableHeight:e})=>{const t=(0,c.i7)(i.Gb,(e=>e.staticKey)),a=(0,c.i7)(i.rZ,(e=>e.messageGroups)),n=(0,p.A)(a),[r,m]=(0,s.useState)([]),[u,d]=(0,s.useState)([]),f=(0,s.useMemo)((()=>{const t=u.reduce(((e,t)=>"function_call"===t.type?e+h:"function_call_result"===t.type?e+g:e),0);return Math.min(t,e)}),[u]);(0,s.useEffect)((()=>{const e=[],t=[];for(const n of a){if("function_call_group"===n.type){if(!n.messages.find((e=>"function_call"===e.type&&e.status&&["completed","incomplete"].includes(e.status)))){t.push(...n.messages);continue}}e.push(...n.messages)}m(e),d(t)}),[a]);const E=s.useMemo((()=>[s.createElement(o.f,{key:"chat-header-box"}),...r.map((e=>s.createElement(p.h,{key:`message-item-${e.type}-${e.id}`,msg:e,expanded:n(e.id)})))]),[r,n]);return s.createElement(s.Fragment,null,s.createElement(l.jC,{key:t,items:E},(e=>e)),u.length?s.createElement(l.az,{flexDirection:"column",height:f,overflow:"hidden"},...u.map((e=>s.createElement(p.h,{key:`message-item-${e.id}-pending`,msg:e,expanded:n(e.id)})))):s.createElement(s.Fragment,null))})),ChatContainer=()=>{const e=(0,c.i7)(i.Gb,(e=>e.terminalHeight)),[t,a]=(0,s.useState)(0);return(0,s.useEffect)((()=>{a(e-f)}),[e]),(0,r.o)(),(0,m.f)(),s.createElement(s.Fragment,null,s.createElement(E,{availableHeight:t}),s.createElement(l.az,{flexDirection:"column"},s.createElement(u.NH,null,s.createElement(u.pF,{availableHeight:t}))))},ChatView=()=>s.createElement(i.N7,null,s.createElement(i.Y5,null,s.createElement(ChatContainer,null)));n()}catch(e){n(e)}}))}};