@tencent-ai/codebuddy-code 1.1.8-next.57560ab.20250924 → 1.2.0-next.5ab4286.20250925

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
@@ -4,6 +4,34 @@ CodeBuddy Code 的所有重要更新都会记录在这里。
4
4
 
5
5
  我们遵循 [语义化版本](https://semver.org/spec/v2.0.0.html) 规范。
6
6
 
7
+ ## [未发布]
8
+
9
+ ## [1.2.0] - 2025-09-24
10
+
11
+ ### ✨ 新功能
12
+ - **API 密钥认证支持**:新增 API 密钥认证机制,支持通过环境变量和配置文件设置 API
13
+ - **代理管理界面**:新增完整的代理管理UI界面,支持可视化创建、配置和删除自定义代理
14
+ - **智能代理创建**:通过自然语言描述自动生成代理配置,包括系统提示词和使用场景
15
+ - **代理配置模板**:新增代理指令生成模板,支持AI辅助创建专业的代理配置
16
+
17
+ ### 🔧 功能改进
18
+ - **自定义Agent支持**:新增自定义AgentUI及管理能力
19
+ - **代理命令支持**:新增 `/agents` 斜杠命令,支持快速访问代理管理界面
20
+ - **代理服务增强**:优化代理服务执行机制,支持上下文隔离和异步执行
21
+ - **JSON解析工具**:新增JSON字符串解析工具函数,支持从复杂文本中提取结构化数据
22
+ - **CLI 命令别名**:新增 `cbc` 命令别名,等价于 `codebuddy`,提升命令使用便捷性
23
+ - **路径解析增强**:支持用户主目录路径(~ 符号)解析,提升文件操作灵活性
24
+ - **特殊路径处理**:增强路径解析逻辑,支持特殊前缀路径的智能处理和回退机制
25
+ - **编辑工具优化**:改进文本匹配算法,增强字符串匹配的准确性和稳定性
26
+ - **模型面板增强**:支持显示 credits、当前模型标记与快捷选择
27
+ - **图片处理优化**:改进临时文件清理机制,避免清理非临时图片文件
28
+ - **认证系统增强**:优化 HTTP 请求拦截器,支持自动添加 API 密钥到请求头
29
+ - **非交互模式重构**:重构非交互模式设置及检测逻辑,采用中间件架构提升代码可维护性
30
+
31
+ ### 🐛 问题修复
32
+ - **会话管理优化**:修复会话长度错误提示逻辑,改进上下文截断处理机制
33
+ - **响应拦截器改进**:优化模型响应拦截器的执行时机和错误处理
34
+
7
35
  ## [1.1.8] - 2025-09-23
8
36
 
9
37
  ### ✨ 新功能
@@ -12,6 +40,8 @@ CodeBuddy Code 的所有重要更新都会记录在这里。
12
40
  - **中断原因提示优化**:增强中断处理提示,提供详细的中断原因和权限绕过指引
13
41
 
14
42
  ### 🔧 功能改进
43
+ - **代理管理架构重构**:重构代理管理系统,将业务逻辑从UI组件迁移至服务层,提升代码可维护性和系统稳定性
44
+ - **代理管理优化**:优化代理删除操作,提升删除性能和数据同步机制
15
45
  - **文件监控优化**:增强文件监控机制,支持防抖处理和错误恢复
16
46
  - **编辑工具优化**:改进文本匹配算法,增强多行文本搜索的准确性和稳定性
17
47
 
@@ -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(45036),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
+ "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(24645),u=n(45036),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)}}))}};