@tencent-ai/codebuddy-code 1.4.1 → 1.5.0

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,32 @@ CodeBuddy Code 的所有重要更新都会记录在这里。
4
4
 
5
5
  我们遵循 [语义化版本](https://semver.org/spec/v2.0.0.html) 规范。
6
6
 
7
+ ## [1.5.0] - 2025-09-29
8
+
9
+ ### ✨ 新功能
10
+ - **Plan Mode(计划模式)**:新增ExitPlanMode工具,支持在计划模式下完成规划后请求用户确认执行
11
+ - **计划模式系统提醒**:新增计划模式专用的系统提醒机制,确保AI在规划阶段不执行修改操作
12
+ - **计划模式UI组件**:新增计划模式确认对话框和结果展示组件
13
+
14
+ ### 🔧 功能改进
15
+ - **登录界面重构**:优化登录界面组件结构,提升代码可维护性
16
+
17
+ ### 🐛 问题修复
18
+ - **MCP服务器审批逻辑**:修复启动时空值检查问题,提升稳定性
19
+ - **MCP工具结果渲染**:修复MCP工具结果渲染格式问题
20
+ - **工具详情展示**:修复工具详情展示问题
21
+ - **UI组件和工具相关修复**:改进多个UI组件和工具功能的稳定性和性能
22
+ - **权限模式同步**:修复Task工具中权限模式不同步问题,确保子会话正确继承权限模式
23
+ - **UI增强**:新增 MaxHeightBox 和 TextWrapBox 组件,用于控制渲染容器高度和自动换行
24
+ - **Diff展示**:将制表符替换为空格防止样式错误
25
+ - **输入框**:调整输入框边框样式为单线并隐藏左右边框
26
+ - **历史会话**:过滤系统内部消息类型
27
+
28
+ ## [1.4.2] - 2025-09-29
29
+
30
+ ### 🔧 功能改进
31
+ - **模型配置优化**:海外版新增 Default 模型
32
+
7
33
  ## [1.4.1] - 2025-09-28
8
34
 
9
35
  ### 🔧 功能改进
@@ -14,9 +40,6 @@ CodeBuddy Code 的所有重要更新都会记录在这里。
14
40
  - **流式输出修复**:修复处理工具调用结果时导致流式输出中断的问题
15
41
  - **遥测模式修复**:调整遥测数据上报模式设置,确保正确的模式标识
16
42
 
17
- ### 📝 文档更新
18
- - **模板文件统一**:修复模板文件中的文件名引用,将 `CB_PROJ_CB.md` 统一改为 `CODEBUDDY.md`
19
-
20
43
  ## [1.4.0] - 2025-09-27
21
44
 
22
45
  ### 🐛 问题修复
@@ -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(24645),u=n(68729),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,r)=>{r.a(e,(async(e,n)=>{try{r.r(t),r.d(t,{LoginView:()=>LoginView});var a=r(80699),l=r(80932),o=r(14083),c=r(96540),i=r(66814),s=r(24645),u=r(68729),E=r(82101),m=r(34209),d=r(53829),g=r(49034),h=r(47693),b=r(83175),p=r(42790),y=e([o,E,d,g,p]);[o,E,d,g,p]=y.then?(await y)():y;const LoginView=()=>{const e=(0,i.i7)(d.Gb,(e=>e.staticKey));return c.createElement(c.Fragment,null,c.createElement(o.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(o.az,{paddingLeft:1,borderStyle:"round",borderColor:b.Q.brand,width:t},c.createElement(o.EY,{color:b.Q.brand},"✻ ",e)),c.createElement(p.H,null))},f={iOA:"iOA",WeChat:"internal","Google / Github":"external"},LoginMethodSelector=({availableMethods:e,selectedMethod:t})=>c.createElement(o.az,{marginTop:2,paddingX:1,flexDirection:"column",gap:1},c.createElement(o.az,null,c.createElement(o.EY,null,"Select login method:")),e.map((e=>c.createElement(o.az,{key:e},c.createElement(o.EY,{color:t===e?b.Q.brand:"grey"},t===e?l.Ay.pointer:" "," Login with ",e)))),c.createElement(o.az,{justifyContent:"space-between"},c.createElement(o.EY,{color:"grey"},"(Use ↑↓ to select, Enter to login)"))),LoginLoadingContent=({copyUrlResult:e,urlState:t})=>c.createElement(o.az,{marginTop:2,paddingY:1,gap:1,flexDirection:"column"},c.createElement(o.az,null,c.createElement(o.EY,{color:"grey"},"Browser didn't open? Use the url below to sign in: "+(e?"(Copied link to clipboard)":""))),c.createElement(o.az,null,c.createElement(o.EY,{color:"grey"},u.nO.createHyperlink(t))),c.createElement(o.az,{marginTop:1,gap:1},c.createElement(o.EY,{color:b.Q.brand},c.createElement(E.y$,{type:"star"})),c.createElement(o.EY,null,"Waiting for auth... (Press ESC to cancel)"))),LoginErrorView=({errorMessage:e})=>c.createElement(o.az,{marginTop:1,paddingX:1,flexDirection:"column",gap:1},c.createElement(o.EY,{color:"red"},"Failed to login. Press esc to return to login"),e&&c.createElement(o.EY,{color:"red"},"Message: ",e)),LoginBox=()=>{const{authSession:e,replace:t,history:r}=(0,i.i7)(d.aO,(e=>({authSession:e.authSession,replace:e.replace,history:e.history}))),n=(0,i.i7)(d.Gb,(e=>e.refreshStatic)),[l,E]=(0,c.useState)("idle"),[m,b]=(0,c.useState)(""),[p,y]=(0,c.useState)(!1),[w,C]=(0,c.useState)(""),[S,A]=(0,c.useState)("iOA"),[G,O]=(0,c.useState)(!1),Y=(0,c.useRef)(new AbortController),k=(0,c.useMemo)((()=>{const e=["Google / Github","WeChat"];return G&&e.unshift("iOA"),A((()=>e[0])),e}),[G]);(0,c.useEffect)((()=>{const e=(0,h.bi)().urlSubject.subscribe(b);return()=>e.unsubscribe()}),[]),(0,c.useEffect)((()=>{(async()=>{if(m){const e=await u.E.copyToClipboard(m);y(e)}})()}),[m]),(0,c.useEffect)((()=>{(async()=>{try{const e=a.ContainerUtil.get(s.Oc),t=await e.isIntranet();O(t),t||"iOA"!==S||A("Google / Github")}catch(e){O(!1),"iOA"===S&&A("Google / Github")}})()}),[S]);const z=(0,c.useCallback)((()=>{if(r.length){const e=r[r.length-1];t(e,{onAfterRender:()=>n()})}}),[r,n,t]);(0,o.Ge)(((t,r)=>{if("idle"===l)if(g.Om.RETURN(r))try{E("loading"),C(""),(0,h.Yf)().login({type:f[S],abortController:Y.current,errorHandler:e=>{E("error"),C((()=>e instanceof Error?e.message:"Unknown error occurred"))}})}catch(e){E("error"),C((()=>e instanceof Error?e.message:"Unknown error occurred"))}else if(r.upArrow||r.downArrow){const e=G?["iOA","Google / Github","WeChat"]:["Google / Github","WeChat"],t=e.indexOf(S);let n;n=r.upArrow?t<=0?e.length-1:t-1:t>=e.length-1?0:t+1,A(e[n])}else g.Om.ESCAPE(r)&&z();else g.Om.ESCAPE(r)&&("loading"===l?(Y.current.abort(),Y.current=new AbortController):e?z():E("idle"))}));return(()=>{switch(l){case"idle":return c.createElement(LoginMethodSelector,{availableMethods:k,selectedMethod:S});case"loading":return c.createElement(LoginLoadingContent,{urlState:m,copyUrlResult:p});case"error":return c.createElement(LoginErrorView,{errorMessage:w});default:return}})()};n()}catch(e){n(e)}}))},42790:(e,t,r)=>{r.a(e,(async(e,n)=>{try{r.d(t,{H:()=>LogoText});var a=r(1597),l=r(14083),o=r(96540),c=r(66814),i=r(53829),s=r(83175),u=e([l,i]);[l,i]=u.then?(await u)():u;const LogoText=()=>{const e=(0,c.i7)(i.Gb,(e=>e.terminalWidth)),t=(0,o.useRef)((0,a.Ay)(s.Q.GradientColors)),r=(0,o.useCallback)((e=>t.current.multiline(e)),[t]),n=(0,o.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 o.createElement(l.dL,{transform:r},o.createElement(l.EY,null,n()))};n()}catch(e){n(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:()=>c.pF});var s=a(77146),l=a(89536),r=a(70790),c=a(62875),i=a(82388),m=e([s,l,r,c,i]);[s,l,r,c,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 s=a(14083),l=a(96540),r=a(66814),c=a(12634),i=a(26730),m=a(53829),u=a(59505),o=a(19250),d=a(66530),g=a(92709),p=e([s,i,m,u,o,d,g]);[s,i,m,u,o,d,g]=p.then?(await p)():p;const f=2,h={[c.L3.BASH]:5},E=2,y=l.memo((({availableHeight:e})=>{const t=(0,r.i7)(m.Gb,(e=>e.staticKey)),{messageGroups:a,agentState:n}=(0,r.i7)(m.rZ,(e=>({messageGroups:e.messageGroups,agentState:e.agentState}))),c=(0,l.useMemo)((()=>Boolean(n&&"agent_end"!==n)),[n]),i=(0,g.A)(a),[u,o]=(0,l.useState)([]),[p,E]=(0,l.useState)([]),y=(0,l.useMemo)((()=>{const t=p.reduce(((e,t)=>{if("function_call"===t.type)return e+f;if("function_call_result"===t.type){return e+(t.name in h?h[t.name]:2)}return e}),0);return Math.min(t,e)}),[p]);(0,l.useEffect)((()=>{const e=[],t=[];for(const n of a){if(c&&"function_call_group"===n.type){if(!n.messages.find((e=>"function_call"===e.type&&(!!u.find((t=>t.id===e.id))||!(!e.status||!["completed","incomplete"].includes(e.status)))))){t.push(...n.messages);continue}}e.push(...n.messages)}o(e),E(t)}),[a]);const x=l.useMemo((()=>[l.createElement(d.f,{key:"chat-header-box"}),...u.map((e=>l.createElement(g.h,{key:`message-item-${e.type}-${e.id}`,msg:e,expanded:i(e.id)})))]),[u,i]);return l.createElement(l.Fragment,null,l.createElement(s.jC,{key:t,items:x},(e=>e)),p.length?l.createElement(s.az,{flexDirection:"column",height:y,overflow:"hidden"},...p.map((e=>l.createElement(g.h,{key:`message-item-${e.id}-pending`,msg:e,expanded:i(e.id)})))):l.createElement(l.Fragment,null))})),ChatContainer=()=>{const e=(0,r.i7)(m.Gb,(e=>e.terminalHeight)),[t,a]=(0,l.useState)(0);return(0,l.useEffect)((()=>{a(e-E)}),[e]),(0,i.o)(),(0,u.f)(),l.createElement(l.Fragment,null,l.createElement(y,{availableHeight:t}),l.createElement(s.az,{flexDirection:"column"},l.createElement(o.NH,null,l.createElement(o.pF,{availableHeight:t}))))},ChatView=()=>l.createElement(m.N7,null,l.createElement(m.Y5,null,l.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:()=>m.pF});var s=a(77146),l=a(89536),c=a(70790),m=a(62875),i=a(82388),r=e([s,l,c,m,i]);[s,l,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 s=a(14083),l=a(96540),c=a(66814),m=a(26730),i=a(36330),r=a(53829),o=a(59505),u=a(19250),g=a(66530),d=a(92709),p=e([s,m,i,r,o,u,g,d]);[s,m,i,r,o,u,g,d]=p.then?(await p)():p;const h=1,E=l.memo((({availableHeight:e})=>{const t=(0,c.i7)(r.Gb,(e=>e.staticKey)),{messageGroups:a,agentState:n}=(0,c.i7)(r.rZ,(e=>({messageGroups:e.messageGroups,agentState:e.agentState}))),m=(0,l.useMemo)((()=>Boolean(n&&"agent_end"!==n)),[n]),o=(0,d.A)(a),[u,p]=(0,l.useState)([]),[h,E]=(0,l.useState)([]);(0,l.useEffect)((()=>{const e=[],t=[];for(const n of a){if(m&&"function_call_group"===n.type){if(!n.messages.find((e=>"function_call"===e.type&&(!!u.find((t=>t.id===e.id))||!(!e.status||!["completed","incomplete"].includes(e.status)))))){t.push(...n.messages);continue}}e.push(...n.messages)}p(e),E(t)}),[a]);const f=l.useMemo((()=>[l.createElement(g.f,{key:"chat-header-box"}),...u.map((e=>l.createElement(d.h,{key:`message-item-${e.type}-${e.id}`,msg:e,expanded:o(e.id)})))]),[u,o]);return l.createElement(l.Fragment,null,l.createElement(s.jC,{key:t,items:f},(e=>e)),h.length?l.createElement(i.DM,{flexDirection:"column",maxHeight:e-1},...h.map((e=>l.createElement(d.h,{key:`message-item-${e.id}-pending`,msg:e,expanded:o(e.id)})))):l.createElement(l.Fragment,null))})),ChatContainer=()=>{const e=(0,c.i7)(r.Gb,(e=>e.terminalHeight)),[t,a]=(0,l.useState)(0);return(0,l.useEffect)((()=>{a(e-h)}),[e]),(0,m.o)(),(0,o.f)(),l.createElement(l.Fragment,null,l.createElement(E,{availableHeight:t}),l.createElement(s.az,{flexDirection:"column"},l.createElement(u.NH,null,l.createElement(u.pF,{availableHeight:t}))))},ChatView=()=>l.createElement(r.N7,null,l.createElement(r.Y5,null,l.createElement(ChatContainer,null)));n()}catch(e){n(e)}}))}};