@alwith/module-chat 0.1.12 → 0.1.13

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.
@@ -14,6 +14,7 @@ export interface ActivityHost {
14
14
  patch: string;
15
15
  }>;
16
16
  openImage?: (url: string) => void;
17
+ openSession?: (sessionId: string, title: string) => void;
17
18
  expandToolOutput?: boolean;
18
19
  commandStatus?: (block: ToolUseBlock) => string | undefined;
19
20
  Markdown: ComponentType<{
@@ -1,6 +1,6 @@
1
- import{jsx as n,jsxs as l,Fragment as O}from"react/jsx-runtime";import{useActivityHost as L,ActivityMarkdown as Q}from"../activity-host.js";import{CheckIcon as de,CopyIcon as ce,GitBranchIcon as X}from"lucide-react";import{Fragment as le,useEffect as A,useRef as b,useState as D}from"react";import{cn as C}from"cn";import{formatModelName as q}from"../lib/model-name.js";import{describeToolUse as V}from"../lib/stream-style.js";import{useCodexDisclosureState as _}from"./disclosure-state.js";import{CodexPlan as ue}from"./plan.js";function H(e,t){let[a,i]=D(()=>({key:e,mounted:t})),r=t||a.key===e&&a.mounted;if(a.key!==e||a.mounted!==r)i({key:e,mounted:r});return r}var z=new WeakMap,U=1;function M(e){if(e.type==="tool_use"||e.type==="subagent"||e.type==="collab")return`${e.type}:${e.id}`;if(e.type==="thinking"&&e.id!==void 0)return`thinking:${e.id}`;let t=z.get(e);if(t!==void 0)return`${e.type}:${t}`;let a=U;return U+=1,z.set(e,a),`${e.type}:${a}`}function w(e){switch(e){case"pending":case"in_progress":return!0;case"completed":case"failed":case"cancelled":case"interrupted":return!1;default:throw Error(`Unknown ACP tool status: ${e}`)}}function W(e,t){let a=Math.max(0,Math.round(e/1000)),i=Math.floor(a/3600),r=Math.floor(a%3600/60),o=a%60;if(o>=60)r+=Math.floor(o/60),o%=60;if(r>=60)i+=Math.floor(r/60),r%=60;let d=Intl.DurationFormat;if(d)try{return new d(t,{style:"narrow"}).format({hours:i,minutes:r,seconds:i>0?0:o})}catch{}if(i>0)return r>0?`${i}h ${r}m`:`${i}h`;if(r>0)return o>0?`${r}m ${o}s`:`${r}m`;return`${o}s`}var me="M7.52925 3.7793C7.75652 3.55203 8.10803 3.52383 8.36616 3.69434L8.47065 3.7793L14.2207 9.5293C14.4804 9.789 14.4804 10.211 14.2207 10.4707L8.47065 16.2207C8.21095 16.4804 7.78895 16.4804 7.52925 16.2207C7.26955 15.961 7.26955 15.539 7.52925 15.2793L12.8085 10L7.52925 4.7207L7.44429 4.61621C7.27378 4.35808 7.30198 4.00657 7.52925 3.7793Z";function E({expanded:e,className:t}){return n("svg",{className:C("codex-activity-disclosure",e&&"codex-activity-disclosure-expanded",t),viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:n("path",{d:me})})}function pe(){return n("svg",{className:"codex-activity-icon",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:n("path",{d:"M16.3965 5.01128C16.3963 4.93399 16.3489 4.87691 16.293 4.85406L16.2354 4.84332C13.9306 4.91764 12.5622 5.32101 10.665 6.34722V16.3716C11.3851 15.9994 12.0688 15.7115 12.7861 15.5015C13.8286 15.1965 14.9113 15.0633 16.2402 15.0435L16.2979 15.0308C16.353 15.0063 16.3965 14.9483 16.3965 14.8755V5.01128ZM3.54492 14.8765C3.54492 14.9725 3.62159 15.0422 3.70117 15.0435L4.19629 15.0562C5.94062 15.1247 7.26036 15.4201 8.65918 16.0484C8.05544 15.1706 7.14706 14.436 6.17871 14.1109V14.1099C5.56757 13.9045 5.16816 13.3314 5.16797 12.6988V4.98882C4.86679 4.93786 4.60268 4.8999 4.28223 4.87457L3.72754 4.84429C3.62093 4.84079 3.54505 4.92417 3.54492 5.01226V14.8765ZM17.7266 14.8755C17.7266 15.6314 17.1607 16.2751 16.4121 16.3628L16.2598 16.3736C15.0122 16.3922 14.0555 16.5159 13.1602 16.7779C12.2629 17.0404 11.3966 17.4508 10.3369 18.0738C10.129 18.1959 9.87099 18.1958 9.66309 18.0738C7.71455 16.9283 6.31974 16.4689 4.12988 16.3853L3.68164 16.3736C2.85966 16.3614 2.21484 15.6838 2.21484 14.8765V5.01226C2.21497 4.15391 2.93263 3.4871 3.77246 3.51519L4.39844 3.54937C4.67996 3.57191 4.92258 3.60421 5.16797 3.64214V2.51031C5.16797 1.44939 6.29018 0.645615 7.31055 1.15679L7.31152 1.15582C8.78675 1.89511 10.0656 3.33006 10.5352 4.91461C12.3595 3.98907 13.8688 3.58817 16.1924 3.51324L16.3506 3.51714C17.1285 3.5741 17.7264 4.23496 17.7266 5.01128V14.8755ZM6.49805 12.6988C6.49824 12.7723 6.5442 12.8296 6.60254 12.8492L6.96289 12.9859C7.85245 13.3586 8.68125 13.9846 9.33496 14.7496V5.5816C9.08794 4.37762 8.13648 3.1566 6.95801 2.47613L6.71582 2.34527C6.67779 2.32617 6.6337 2.32502 6.58301 2.35796C6.52946 2.39279 6.49805 2.44863 6.49805 2.51031V12.6988Z"})})}function fe(){return n("svg",{className:"codex-activity-icon",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",children:n("path",{d:"M7.33057 1.98535C10.2484 1.98535 12.6136 4.3508 12.6138 7.26855C12.6138 8.58031 12.1346 9.77942 11.3433 10.7031L13.9897 13.3496C14.1655 13.5253 14.1655 13.8106 13.9897 13.9863C13.814 14.1621 13.5288 14.1621 13.353 13.9863L10.7017 11.335C9.78678 12.0942 8.61243 12.5518 7.33057 12.5518C4.41281 12.5516 2.04736 10.1864 2.04736 7.26855C2.04754 4.35091 4.41292 1.98553 7.33057 1.98535ZM7.33057 2.88574C4.90998 2.88592 2.94793 4.84796 2.94775 7.26855C2.94775 9.68929 4.90987 11.6522 7.33057 11.6523C9.75141 11.6523 11.7144 9.6894 11.7144 7.26855C11.7142 4.84786 9.75131 2.88574 7.33057 2.88574Z"})})}function xe(){return l("svg",{className:"codex-activity-icon",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:[n("path",{d:"M6.19629 7.86231C6.42357 7.63534 6.7752 7.60692 7.0332 7.77734L7.1377 7.86231L8.80371 9.5293C9.06329 9.78889 9.06307 10.21 8.80371 10.4697L7.1377 12.1367C6.878 12.3964 6.45599 12.3964 6.19629 12.1367C5.93686 11.8771 5.93697 11.456 6.19629 11.1963L7.39258 9.99902L6.19629 8.80371L6.11133 8.69922C5.94087 8.4411 5.96904 8.08955 6.19629 7.86231Z"}),n("path",{d:"M13.4668 11.0156C13.7699 11.0776 13.998 11.3456 13.998 11.667C13.9979 11.9883 13.7698 12.2564 13.4668 12.3184L13.333 12.332H10.833C10.466 12.3319 10.1682 12.034 10.168 11.667C10.168 11.2998 10.4659 11.0021 10.833 11.002H13.333L13.4668 11.0156Z"}),n("path",{d:"M12.6602 2.66504C13.3492 2.66504 13.9062 2.66439 14.3564 2.70117C14.8142 2.73859 15.2201 2.81796 15.5967 3.00977C16.1922 3.31321 16.677 3.79805 16.9805 4.39356C17.1722 4.77014 17.2517 5.17604 17.2891 5.63379C17.3258 6.08402 17.3252 6.64102 17.3252 7.33008V12.6602C17.3252 13.3492 17.3258 13.9062 17.2891 14.3564C17.2516 14.8142 17.1723 15.2201 16.9805 15.5967C16.677 16.1922 16.1922 16.677 15.5967 16.9805C15.2201 17.1723 14.8142 17.2516 14.3564 17.2891C13.9062 17.3258 13.3492 17.3252 12.6602 17.3252H7.33008C6.64102 17.3252 6.08402 17.3258 5.63379 17.2891C5.17604 17.2517 4.77014 17.1722 4.39356 16.9805C3.79805 16.677 3.31321 16.1922 3.00977 15.5967C2.81796 15.2201 2.73859 14.8142 2.70117 14.3564C2.66439 13.9062 2.66504 13.3492 2.66504 12.6602V7.33008C2.66504 6.64101 2.66439 6.08402 2.70117 5.63379C2.73858 5.17601 2.81797 4.77016 3.00977 4.39356C3.31321 3.79802 3.79802 3.31321 4.39356 3.00977C4.77016 2.81797 5.17601 2.73858 5.63379 2.70117C6.08402 2.66439 6.64101 2.66504 7.33008 2.66504H12.6602ZM7.33008 3.99512C6.61907 3.99512 6.1257 3.99601 5.74219 4.02734C5.3665 4.05804 5.15508 4.11481 4.99707 4.19531C4.65183 4.37124 4.37124 4.65183 4.19531 4.99707C4.11481 5.15508 4.05805 5.3665 4.02734 5.74219C3.99601 6.1257 3.99512 6.61908 3.99512 7.33008V12.6602C3.99512 13.3711 3.99601 13.8646 4.02734 14.248C4.05805 14.6237 4.11481 14.8352 4.19531 14.9932C4.37124 15.3384 4.65186 15.619 4.99707 15.7949C5.15507 15.8754 5.36654 15.9322 5.74219 15.9629C6.1257 15.9942 6.61908 15.9951 7.33008 15.9951H12.6602C13.3711 15.9951 13.8646 15.9942 14.248 15.9629C14.6237 15.9322 14.8352 15.8754 14.9932 15.7949C15.3384 15.619 15.619 15.3384 15.7949 14.9932C15.8754 14.8352 15.9322 14.6237 15.9629 14.248C15.9942 13.8646 15.9951 13.3711 15.9951 12.6602V7.33008C15.9951 6.61908 15.9942 6.1257 15.9629 5.74219C15.9322 5.36654 15.8754 5.15507 15.7949 4.99707C15.619 4.65186 15.3384 4.37124 14.9932 4.19531C14.8352 4.11481 14.6237 4.05805 14.248 4.02734C13.8646 3.99601 13.3711 3.99512 12.6602 3.99512H7.33008Z"})]})}function ge(){return n("svg",{className:"codex-activity-icon",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:n("path",{d:"M11.3312 4.20472C12.7488 2.92391 14.9377 2.96644 16.3039 4.33265L16.4318 4.46742C17.6713 5.8393 17.6713 7.93343 16.4318 9.30531L16.3039 9.44007L10.0119 15.7311C9.68839 16.0546 9.45384 16.2917 9.22185 16.4821L8.98748 16.6588C8.78233 16.799 8.56429 16.9196 8.33709 17.0192L8.10759 17.1119C7.92582 17.1785 7.73843 17.2266 7.52166 17.2711L6.75701 17.4069L4.36345 17.8053C4.22059 17.8291 4.06914 17.8552 3.9406 17.8649C3.84183 17.8723 3.70833 17.875 3.56267 17.8395L3.41423 17.7907C3.19121 17.695 3.00747 17.5271 2.89177 17.316L2.84588 17.2223C2.75958 17.0209 2.76174 16.8276 2.77166 16.6959C2.78136 16.5674 2.80742 16.4159 2.83123 16.2731L3.22966 13.8795L3.36443 13.1149C3.40899 12.898 3.45795 12.7108 3.52459 12.5289L3.61736 12.2985C3.71691 12.0715 3.83772 11.854 3.97771 11.6491L4.15349 11.4147C4.34392 11.1825 4.58171 10.9484 4.90545 10.6246L11.1965 4.33265L11.3312 4.20472ZM5.84588 11.5651C5.49671 11.9142 5.31258 12.0998 5.1867 12.2526L5.07537 12.3991C4.98194 12.5358 4.90157 12.6812 4.83513 12.8327L4.77361 12.9869C4.73328 13.0971 4.70248 13.2125 4.66814 13.3815L4.54119 14.0983L4.14275 16.4918L4.14177 16.4938H4.1447L6.53826 16.0944L7.25505 15.9684C7.42406 15.9341 7.53946 15.9033 7.64959 15.8629L7.80291 15.8014C7.95461 15.7349 8.09953 15.6538 8.2365 15.5602L8.38396 15.4498C8.53674 15.3239 8.72231 15.1398 9.07146 14.7907L14.0588 9.80238L10.8332 6.57679L5.84588 11.5651ZM15.3635 5.27308C14.5281 4.43776 13.2058 4.38573 12.3097 5.11683L12.1369 5.27308L11.7736 5.63636L15.0002 8.86195L15.3635 8.49964L15.5197 8.32581C16.2015 7.48961 16.2015 6.28311 15.5197 5.44691L15.3635 5.27308Z"})})}function he(){return n("svg",{className:"codex-activity-icon",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:n("path",{d:"M16.8347 7.91699C16.8347 7.76279 16.8266 7.61021 16.8123 7.45996L15.4705 8.80371C14.2903 9.98388 12.3762 9.98388 11.1961 8.80371C10.016 7.62352 10.0159 5.70942 11.1961 4.5293L12.5378 3.18652C12.3885 3.17238 12.237 3.16505 12.0837 3.16504C9.45947 3.16504 7.33179 5.29272 7.33179 7.91699C7.33184 8.56608 7.46162 9.18329 7.69605 9.74512C7.79981 9.9939 7.74311 10.2811 7.5525 10.4717L3.59547 14.4287C3.0498 14.9744 3.04991 15.8586 3.59547 16.4043L3.70191 16.501C4.25076 16.9483 5.05957 16.9158 5.57105 16.4043L9.52906 12.4473L9.60426 12.3828C9.79018 12.2455 10.0369 12.2131 10.2546 12.3037C10.8166 12.5382 11.4345 12.668 12.0837 12.668C14.7078 12.6678 16.8345 10.541 16.8347 7.91699ZM18.1648 7.91699C18.1646 11.2755 15.4423 13.9979 12.0837 13.998C11.4151 13.998 10.7708 13.8886 10.1677 13.6885L6.51246 17.3457C5.51389 18.3443 3.93332 18.406 2.86207 17.5322L2.65504 17.3457C1.58992 16.2806 1.58992 14.5534 2.65504 13.4883L6.31031 9.83203C6.1104 9.22921 6.00175 8.58526 6.00172 7.91699C6.00172 4.55818 8.72494 1.83496 12.0837 1.83496C12.7838 1.835 13.458 1.95316 14.0857 2.17188L14.1638 2.20508C14.3404 2.29325 14.4697 2.45713 14.5144 2.65234C14.5653 2.87533 14.4984 3.10876 14.3367 3.27051L12.1375 5.4707C11.4767 6.13148 11.4767 7.20251 12.1375 7.86328C12.7983 8.52373 13.8694 8.52395 14.53 7.86328L16.7293 5.66309L16.7937 5.60742C16.9499 5.48687 17.1532 5.44067 17.3484 5.48535C17.5714 5.53648 17.7526 5.69898 17.8279 5.91504C18.0466 6.54272 18.1648 7.21689 18.1648 7.91699Z"})})}function Y({block:e}){if(e.type!=="tool_use")return null;let t=V(e).category;if(t==="read")return n(pe,{});if(t==="search"||t==="fetch")return n(fe,{});if(t==="execute")return n(xe,{});if(t==="edit")return n(ge,{});return n(he,{})}function I(e,t){let a=e.rawInput[t];return typeof a==="string"&&a.length>0?a:void 0}function Ce(e){return V(e).target}function P(e){return e.name.startsWith("mcp__")||e.name.startsWith("mcp_")}function K(e,t){let{category:a}=V(e),i=Ce(e),r=w(e.status);if(P(e))return{leading:e.title};if(a==="execute"){let o=I(e,"command")?.split(`
2
- `)[0]??i;return o?{leading:t(r?"stream.codex.running":"stream.codex.ran"),trailing:o}:{leading:t(r?"stream.codex.runningCommand":"stream.codex.ranCommandGeneric")}}if(a==="search"){let o=I(e,"pattern")??I(e,"query")??i;return o?{leading:t(r?"stream.codex.searching":"stream.codex.searched"),trailing:t("stream.codex.forDetail",{detail:o})}:{leading:t(r?"stream.codex.searchingFiles":"stream.codex.searchedFiles")}}if(a==="fetch"){let o=I(e,"query")??I(e,"url")??i;return o?{leading:t(r?"stream.codex.searchingWeb":"stream.codex.searchedWeb"),trailing:t("stream.codex.forDetail",{detail:o})}:{leading:t(r?"stream.codex.searchingWeb":"stream.codex.searchedWeb")}}if(a==="read")return i?{leading:t("stream.codex.readLabel"),trailing:i}:{leading:t("stream.codex.readFiles")};if(a==="edit")return i?{leading:t(r?"stream.codex.editingLabel":"stream.codex.editedLabel"),trailing:i}:{leading:t(r?"stream.codex.editingFiles":"stream.codex.editedFiles")};if(a==="delete")return i?{leading:t(r?"stream.codex.deletingLabel":"stream.codex.deletedLabel"),trailing:i}:{leading:t(r?"stream.codex.deletingFiles":"stream.codex.deletedFiles")};if(a==="move")return i?{leading:t(r?"stream.codex.movingLabel":"stream.codex.movedLabel"),trailing:i}:{leading:t(r?"stream.codex.movingFiles":"stream.codex.movedFiles")};return{leading:e.title}}function ye(e,t){let a=K(e,t);return a.trailing===void 0?a.leading:`${a.leading} ${a.trailing}`}function ve(e){return e.map((t)=>{if(t.type!=="content")return"";let a=t.content;return a.type==="text"?a.text:""}).filter(Boolean).join(`
3
- `).trim()}function we(e){return e.flatMap((t)=>{if(t.type!=="content")return[];let a=t.content;return a.type==="image"?[{data:a.data,mimeType:a.mimeType}]:[]})}function Le(e){return e.flatMap((t)=>{if(t.type!=="content")return[];let a=t.content;return a.type==="audio"?[{data:a.data,mimeType:a.mimeType}]:[]})}function Ne(e){if(typeof e==="string"&&e.length>0)return e;return}function $e(e){return e.type==="diff"}function Me(e){let t=e.content.find($e);if(t===void 0)return;return t.changes.map((a)=>`${a.operation} ${a.path}`).join(`
4
- `)}function k(e){let t=Ne(e.rawOutput);if(t!==void 0)return t;let a=ve(e.content);if(a.length>0)return a;return Me(e)}function Ae({block:e,command:t}){let{t:a,Output:i,commandStatus:r}=L(),[o,d]=D(!1),[s,c]=D(!1),m=k(e),g=r===void 0?e.exitCode===void 0?void 0:a("stream.codex.exitCode",{code:e.exitCode}):r(e),u=()=>{navigator.clipboard.writeText([`$ ${t}`,m].filter((f)=>f!==void 0).join(`
5
- `)),d(!0),setTimeout(()=>d(!1),1500)};return n("div",{className:"codex-command-details",children:l("div",{className:"codex-command-card",children:[l("div",{className:"codex-command-line-row",children:[n("span",{className:"codex-command-prompt","aria-hidden":"true",children:"$"}),n("button",{type:"button",className:C("codex-command-line",!s&&"codex-command-line-clamped"),"data-codex-disclosure":"","aria-expanded":s,onClick:()=>c((f)=>!f),children:t}),n("button",{type:"button",className:"codex-command-copy","aria-label":a("actions.copy"),onClick:u,children:o?n(de,{}):n(ce,{})})]}),m!==void 0&&(i===void 0?n("pre",{className:"codex-command-output",children:m}):n(i,{text:m})),g!==void 0&&n("div",{className:"codex-command-footer",children:n("span",{className:"codex-command-status",children:g})})]})})}function ee({block:e}){let{t,openLink:a,Patch:i,openImage:r,commandStatus:o,expandToolOutput:d=!1}=L(),s=k(e),c=i===void 0?void 0:e.content.flatMap((x)=>{if(x.type!=="diff")return[];let T=x;return T.patch?.text?[T.patch.text]:[]}).join(`
6
- `),m=we(e.content),g=Le(e.content),[u,f]=_(`tool:${e.id}`,!1),h=H(`tool:${e.id}`,u),y=V(e),v=y.category,p=K(e,t),F=v==="execute"?I(e,"command"):void 0,N=F!==void 0||P(e)||m.length>0||g.length>0||Boolean(c)||d&&s!==void 0,S=!N&&!w(e.status)?y.filePath:void 0;if(v==="execute"&&!w(e.status)&&e.status!=="completed"){let x=o?.(e);if(x)p={...p,leading:x}}if(v==="read"&&w(e.status))return null;let B=l("span",{className:"codex-activity-label",children:[n(Y,{block:e}),n("span",{className:"min-w-0 flex-1 truncate",children:w(e.status)?n("span",{className:"codex-activity-running",children:p.trailing===void 0?p.leading:`${p.leading} ${p.trailing}`}):l(O,{children:[n("span",{className:"codex-activity-leading",children:p.leading}),p.trailing!==void 0&&(S!==void 0?l(O,{children:[" ",n("button",{type:"button",className:"codex-activity-trailing codex-activity-file-link",title:S,onClick:()=>a(S),children:p.trailing})]}):l("span",{className:"codex-activity-trailing",children:[" ",p.trailing]}))]})})]});return l("div",{className:"codex-activity-item",children:[N?l("button",{type:"button",className:"codex-activity-header","data-codex-disclosure":"","aria-label":p.trailing===void 0?p.leading:`${p.leading} ${p.trailing}`,"aria-expanded":u,onClick:()=>f((x)=>!x),children:[B,n(E,{expanded:u})]}):n("div",{className:"codex-activity-header codex-activity-header-static",children:B}),n("div",{className:C("codex-activity-details-grid",u&&"codex-activity-details-grid-open"),children:n("div",{className:"min-h-0 overflow-hidden",children:h&&l(O,{children:[F!==void 0?n(Ae,{block:e,command:F}):i!==void 0&&c?n(i,{patch:c}):s!==void 0&&n("pre",{className:"codex-activity-details",children:s}),m.length>0&&n("div",{className:"codex-activity-media",children:m.map((x)=>{let T=`data:${x.mimeType};base64,${x.data}`,G=n("img",{src:T,className:"max-h-48 max-w-full rounded-lg object-contain",alt:""},`${x.mimeType}:${x.data.slice(0,32)}`);return r===void 0?G:n("button",{type:"button",className:"cursor-pointer",onClick:()=>r(T),children:G},T)})}),g.map((x)=>n("audio",{className:"mt-1 w-full","aria-label":t("stream.codex.audioOutput"),controls:!0,src:`data:${x.mimeType};base64,${x.data}`},`${x.mimeType}:${x.data.slice(0,32)}`))]})})})]})}function te({block:e}){if(e.type==="tool_use")return n(ee,{block:e});if(e.type==="thinking")return n(se,{block:e});if(e.type==="collab")return n(oe,{block:e});return n(ne,{block:e})}function ne({block:e}){let{t}=L(),a=w(e.status),[i,r]=_(`subagent:${e.id}`,a),o=b(a);A(()=>{if(a)r(!0);if(o.current&&!a)r(!1);o.current=a},[a,r]);let d=e.blocks.length>0;return l("div",{className:"codex-activity-item",children:[l("button",{type:"button",className:C("codex-activity-header",!d&&"codex-activity-header-static"),"data-codex-disclosure":"","aria-expanded":d?i:void 0,disabled:!d,onClick:()=>r((s)=>!s),children:[l("span",{className:"codex-activity-label",children:[n(X,{className:"size-4 shrink-0","aria-hidden":"true"}),l("span",{className:"min-w-0 flex-1 truncate",children:[a?n("span",{className:"codex-activity-running",children:t("stream.codex.subagentWorking",{name:e.name})}):t("stream.codex.subagentFinished",{name:e.name}),ae(e.model,e.reasoningEffort,t)]})]}),d&&n(E,{expanded:i})]}),n("div",{className:C("codex-activity-details-grid",i&&"codex-activity-details-grid-open"),children:n("div",{className:"min-h-0 overflow-hidden",children:n("div",{className:"codex-subagent-details",children:e.blocks.map((s)=>{if(s.type==="tool_use")return n(ee,{block:s},s.id);if(s.type==="thinking")return n(se,{block:s},M(s));if(s.type==="subagent")return n(ne,{block:s},s.id);if(s.type==="collab")return n(oe,{block:s},s.id);if(s.type==="text")return n("div",{className:"codex-reasoning-details",children:n(Q,{text:s.text,streaming:!1})},M(s));if(s.type==="plan")return n(ue,{entries:s.entries},M(s));if(s.type==="image")return n("img",{src:`data:${s.source.media_type};base64,${s.source.data}`,className:"max-h-48 max-w-full rounded-lg object-contain",alt:""},M(s));return null})})})})]})}var be=new Set(["none","minimal","low","medium","high","xhigh","max","ultra","persistent"]);function ae(e,t,a){if(e===null)return"";if(t===null)return` · ${q(e)}`;let i=be.has(t)?a(`stream.codex.reasoningEffort.${t}`):t;return` · ${q(e)} · ${i}`}var Te={spawnAgent:"spawn",sendInput:"message",sendMessage:"message",followupTask:"message",interruptAgent:"interrupt",listAgents:"list",resumeAgent:"resume",closeAgent:"close"};function ie(e){switch(e){case"pending":case"in_progress":return"inProgress";case"completed":return"completed";case"failed":return"failed";case"cancelled":case"interrupted":return"interrupted";default:throw Error(`Unknown ACP tool status: ${e}`)}}function R(e,t,a){if(e.tool==="wait")throw Error("Codex does not present wait calls");let i=ie(e.status);if(i==="interrupted")return a("stream.codex.collab.interrupted");return a(`stream.codex.collab.${t}.${Te[e.tool]}.${i}`)}function Ie(e){return e.agents.filter((t)=>t.nickname!==null)}function re(e,t){let a=e.agents.length>0?e.agents.length:1;return`${R(e,"header",t)}${t("stream.codex.collab.agentCount",{count:a})}`}var Z="\x01";function j(e,t,a,i){let r=Object.fromEntries(Object.keys(i).map((o)=>[o,`${Z}${o}${Z}`]));return e(t,{...a,...r}).split(new RegExp(`${Z}(\\w+)${Z}`,"u")).map((o,d)=>n(le,{children:d%2===1?i[o]:o},`${d}:${o}`))}function _e({agent:e,showModel:t}){let{t:a}=L();return l("span",{children:[n("span",{className:"font-medium",children:e.nickname}),e.role!==null&&` (${e.role})`,t&&ae(e.model,e.reasoningEffort,a)]})}function J({prompt:e}){return n("span",{className:"codex-collab-prompt",title:e,children:e})}function Ee(e,t){let a=e.prompt?.trim()?e.prompt:null,i=ie(e.status),r=e.tool==="spawnAgent"&&i==="completed"&&a!==null,o=(e.tool==="sendInput"||e.tool==="sendMessage"||e.tool==="followupTask")&&a!==null,d=Ie(e),s=[];if(d.length===0)s.push({key:"generic",node:R(e,"row",t)});for(let c of d){let m=n(_e,{agent:c,showModel:e.tool==="spawnAgent"});if(r)s.push({key:c.threadId,node:n("span",{className:"codex-collab-line",children:j(t,"stream.codex.collab.createdWithInstructions",{},{agent:m,instructions:n(J,{prompt:a})})})});else if(o)s.push({key:c.threadId,node:n("span",{className:"codex-collab-line",children:j(t,"stream.codex.collab.messagedWithPrompt",{action:i==="interrupted"?t("stream.codex.collab.interrupted"):t(`stream.codex.collab.messaged.${i}`)},{agent:m,prompt:n(J,{prompt:a})})})});else{let u=e.tool!=="closeAgent"&&e.tool!=="resumeAgent"&&c.state!==null&&c.state!==null?c.state.message?.trim()?t("stream.codex.collab.stateWithMessage",{state:t(`stream.codex.collab.state.${c.state.status}`),message:c.state.message}):t("stream.codex.collab.stateOnly",{state:t(`stream.codex.collab.state.${c.state.status}`)}):"";s.push({key:c.threadId,node:j(t,"stream.codex.collab.agentRow",{action:R(e,"row",t),state:u},{agent:m})})}}if(!r&&!o&&a!==null)s.push({key:"input",node:j(t,"stream.codex.collab.input",{},{prompt:n("span",{className:"codex-collab-input",children:a})})});return s}function oe({block:e}){let{t}=L(),[a,i]=_(`collab:${e.id}`,!1);if(e.tool==="wait")return null;let r=w(e.status),o=re(e,t);return l("div",{className:"codex-activity-item",children:[l("button",{type:"button",className:"codex-activity-header","data-codex-disclosure":"","aria-expanded":a,onClick:()=>i((d)=>!d),children:[l("span",{className:"codex-activity-label",children:[n(X,{className:"size-4 shrink-0","aria-hidden":"true"}),n("span",{className:"min-w-0 flex-1 truncate",children:r?n("span",{className:"codex-activity-running",children:o}):o})]}),n(E,{expanded:a})]}),n("div",{className:C("codex-activity-details-grid",a&&"codex-activity-details-grid-open"),children:n("div",{className:"min-h-0 overflow-hidden",children:n("div",{className:"codex-subagent-details",children:Ee(e,t).map((d)=>n("div",{className:"codex-collab-row",children:d.node},d.key))})})})]})}function se({block:e}){let{t,i18n:a}=L(),i=Boolean(e.isComplete),[r,o]=_(`thinking:${M(e)}:${i?"complete":"streaming"}`,!i),d=b(i),s=b(null);A(()=>{if(!i)o(!0);if(!d.current&&i)o(!1);d.current=i},[i,o]);let c=e.thinking.trim().length>0;A(()=>{if(i||!c)return;let u=s.current;if(u===null)throw Error("Thinking details are not mounted");let f=new ResizeObserver(()=>{u.scrollTop=u.scrollHeight}),h=null,y=()=>{let p=u.firstElementChild;if(p===h)return;if(h!==null)f.unobserve(h);if(h=p,h!==null)f.observe(h)},v=new MutationObserver(y);return v.observe(u,{childList:!0}),y(),()=>{v.disconnect(),f.disconnect()}},[c,i]);let m=i?e.durationMs!==void 0?t("stream.codex.thoughtFor",{duration:W(e.durationMs,a.language)}):t("stream.codex.thought"):t("message.thinking"),g=e.thinking.trimStart().replace(/^\*\*[^\n]*?\*\*\s*/,"");return l("div",{className:"codex-activity-item",children:[l("button",{type:"button",className:C("codex-activity-header",!c&&"codex-activity-header-static"),"data-codex-disclosure":"","aria-expanded":c?r:void 0,disabled:!c,onClick:()=>o((u)=>!u),children:[n("span",{className:"codex-activity-label",children:n("span",{className:"codex-reasoning-label min-w-0 flex-1 truncate",children:i?m:n("span",{className:"codex-activity-running",children:m})})}),c&&n(E,{expanded:r})]}),n("div",{className:C("codex-activity-details-grid",r&&"codex-activity-details-grid-open"),children:n("div",{className:"min-h-0 overflow-hidden",children:c&&n("div",{ref:s,className:"codex-reasoning-details",role:"region","aria-label":m,"aria-hidden":!r,tabIndex:0,inert:!r,children:n(Q,{text:g,streaming:!i})})})})]})}function Fe(e){if(P(e))return"mcp";let t=V(e).category;return t==="think"||t==="switch_mode"?"other":t}function Se(e,t,a,i){return i(`stream.codex.summary.${e}.${a?"leading":"following"}`,{count:t})}function Be(e,t,a){let i=new Map;for(let o of e){let d=Fe(o);i.set(d,(i.get(d)??0)+1)}let r=Array.from(i,([o,d],s)=>Se(o,d,s===0,t));if(a.startsWith("zh"))return r.join("");return new Intl.ListFormat(a,{style:"long",type:"conjunction"}).format(r)}function Je({stateKey:e,durationMs:t,durationKind:a="work",active:i,startedAt:r,providerId:o,providerIcon:d,children:s}){let{t:c,i18n:m}=L(),[g,u]=_(`work:${e}`,i),f=H(`work:${e}`,g||i),h=b(i),y=b(null),[v,p]=D(0);A(()=>{if(i)u(!0);if(h.current&&!i)u(!1);h.current=i},[i,u]),A(()=>{if(!i||t!==void 0){y.current=null;return}y.current=r??Date.now();let N=()=>{let B=y.current;if(B===null)throw Error("Codex work section is ticking without a start time");p(Date.now()-B)};N();let S=window.setInterval(N,1000);return()=>window.clearInterval(S)},[i,r,t]);let F=t!==void 0?c(a==="total"?"stream.codex.totalDuration":"stream.codex.workedFor",{duration:W(t,m.language)}):i&&v>=1000?c("stream.codex.workedFor",{duration:W(v,m.language)}):c("stream.codex.worked");return l("section",{className:"codex-work-section",children:[l("button",{type:"button",className:"codex-work-trigger","data-codex-disclosure":"","aria-expanded":g,onClick:()=>u((N)=>!N),children:[o!==void 0&&n("span",{className:"codex-work-provider-icon","data-testid":"codex-work-provider-icon","data-provider-id":o,"aria-hidden":"true",children:d}),n("span",{children:F}),n(E,{expanded:g,className:"codex-work-chevron"})]}),n("div",{className:"codex-work-separator","aria-hidden":"true"}),n("div",{className:C("codex-work-grid",g&&"codex-work-grid-open"),children:n("div",{className:"min-h-0 overflow-hidden",children:n("div",{className:"codex-work-body",children:f&&s})})})]})}function De(e,t){if(e.type==="tool_use")return ye(e,t);if(e.type==="thinking")return t("message.thinking");if(e.type==="collab")return re(e,t);return t("stream.codex.subagentWorking",{name:e.name})}function Ve(e){if(e.type==="thinking")return!e.isComplete;if(e.type==="tool_use"||e.type==="subagent"||e.type==="collab")return w(e.status);return!1}function Ze(e,t=1000){let[a,i]=D(e),r=b(Date.now());return A(()=>{if(e===a)return;let o=Date.now(),d=Math.max(0,r.current+t-o);if(d===0){r.current=o,i(e);return}let s=window.setTimeout(()=>{r.current=Date.now(),i(e)},d);return()=>window.clearTimeout(s)},[a,t,e]),a}function je({blocks:e}){let{t,i18n:a}=L(),i=e.some(Ve),r=e.map(M).join(":"),[o,d]=_(`group:${r}`,i),s=H(`group:${r}`,o||i),c=b(i);A(()=>{if(i)d(!0);if(c.current&&!i)d(!1);c.current=i},[i,d]);let m=e.at(-1);if(m===void 0)throw Error("CodexActivityGroup requires at least one activity block");let g=e.filter((f)=>f.type==="tool_use"),u=Ze(i?De(m,t):Be(g,t,a.language));return l("div",{className:"codex-activity-group",children:[l("button",{type:"button",className:"codex-activity-group-trigger","aria-expanded":o,onClick:()=>d((f)=>!f),children:[l("span",{className:"codex-activity-label",children:[n(Y,{block:e[0]}),n("span",{className:"truncate",children:i?n("span",{className:"codex-activity-running",children:u}):u})]}),n(E,{expanded:o})]}),n("div",{className:C("codex-activity-group-grid",o&&"codex-activity-group-grid-open"),children:n("div",{className:"min-h-0 overflow-hidden",children:n("div",{className:"codex-activity-group-body",children:s&&e.map((f)=>n(te,{block:f},M(f)))})})})]})}function Qe({blocks:e}){if(e.length===0)throw Error("CodexActivityGroup requires at least one activity block");if(e.length===1)return n(te,{block:e[0]});return n(je,{blocks:e})}export{Qe as CodexActivityGroup,Je as CodexWorkSection};
1
+ import{jsx as n,jsxs as m,Fragment as j}from"react/jsx-runtime";import{useActivityHost as L,ActivityMarkdown as Q}from"../activity-host.js";import{BotIcon as se,CheckIcon as de,CopyIcon as ce}from"lucide-react";import{Fragment as le,useEffect as A,useRef as b,useState as D}from"react";import{cn as C}from"cn";import{formatModelName as q}from"../lib/model-name.js";import{describeToolUse as O}from"../lib/stream-style.js";import{useCodexDisclosureState as E}from"./disclosure-state.js";import{CodexPlan as ue}from"./plan.js";function P(e,t){let[i,a]=D(()=>({key:e,mounted:t})),r=t||i.key===e&&i.mounted;if(i.key!==e||i.mounted!==r)a({key:e,mounted:r});return r}var z=new WeakMap,U=1;function M(e){if(e.type==="tool_use"||e.type==="subagent"||e.type==="collab")return`${e.type}:${e.id}`;if(e.type==="thinking"&&e.id!==void 0)return`thinking:${e.id}`;let t=z.get(e);if(t!==void 0)return`${e.type}:${t}`;let i=U;return U+=1,z.set(e,i),`${e.type}:${i}`}function w(e){switch(e){case"pending":case"in_progress":return!0;case"completed":case"failed":case"cancelled":case"interrupted":return!1;default:throw Error(`Unknown ACP tool status: ${e}`)}}function W(e,t){let i=Math.max(0,Math.round(e/1000)),a=Math.floor(i/3600),r=Math.floor(i%3600/60),o=i%60;if(o>=60)r+=Math.floor(o/60),o%=60;if(r>=60)a+=Math.floor(r/60),r%=60;let d=Intl.DurationFormat;if(d)try{return new d(t,{style:"narrow"}).format({hours:a,minutes:r,seconds:a>0?0:o})}catch{}if(a>0)return r>0?`${a}h ${r}m`:`${a}h`;if(r>0)return o>0?`${r}m ${o}s`:`${r}m`;return`${o}s`}var me="M7.52925 3.7793C7.75652 3.55203 8.10803 3.52383 8.36616 3.69434L8.47065 3.7793L14.2207 9.5293C14.4804 9.789 14.4804 10.211 14.2207 10.4707L8.47065 16.2207C8.21095 16.4804 7.78895 16.4804 7.52925 16.2207C7.26955 15.961 7.26955 15.539 7.52925 15.2793L12.8085 10L7.52925 4.7207L7.44429 4.61621C7.27378 4.35808 7.30198 4.00657 7.52925 3.7793Z";function _({expanded:e,className:t}){return n("svg",{className:C("codex-activity-disclosure",e&&"codex-activity-disclosure-expanded",t),viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:n("path",{d:me})})}function pe(){return n("svg",{className:"codex-activity-icon",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:n("path",{d:"M16.3965 5.01128C16.3963 4.93399 16.3489 4.87691 16.293 4.85406L16.2354 4.84332C13.9306 4.91764 12.5622 5.32101 10.665 6.34722V16.3716C11.3851 15.9994 12.0688 15.7115 12.7861 15.5015C13.8286 15.1965 14.9113 15.0633 16.2402 15.0435L16.2979 15.0308C16.353 15.0063 16.3965 14.9483 16.3965 14.8755V5.01128ZM3.54492 14.8765C3.54492 14.9725 3.62159 15.0422 3.70117 15.0435L4.19629 15.0562C5.94062 15.1247 7.26036 15.4201 8.65918 16.0484C8.05544 15.1706 7.14706 14.436 6.17871 14.1109V14.1099C5.56757 13.9045 5.16816 13.3314 5.16797 12.6988V4.98882C4.86679 4.93786 4.60268 4.8999 4.28223 4.87457L3.72754 4.84429C3.62093 4.84079 3.54505 4.92417 3.54492 5.01226V14.8765ZM17.7266 14.8755C17.7266 15.6314 17.1607 16.2751 16.4121 16.3628L16.2598 16.3736C15.0122 16.3922 14.0555 16.5159 13.1602 16.7779C12.2629 17.0404 11.3966 17.4508 10.3369 18.0738C10.129 18.1959 9.87099 18.1958 9.66309 18.0738C7.71455 16.9283 6.31974 16.4689 4.12988 16.3853L3.68164 16.3736C2.85966 16.3614 2.21484 15.6838 2.21484 14.8765V5.01226C2.21497 4.15391 2.93263 3.4871 3.77246 3.51519L4.39844 3.54937C4.67996 3.57191 4.92258 3.60421 5.16797 3.64214V2.51031C5.16797 1.44939 6.29018 0.645615 7.31055 1.15679L7.31152 1.15582C8.78675 1.89511 10.0656 3.33006 10.5352 4.91461C12.3595 3.98907 13.8688 3.58817 16.1924 3.51324L16.3506 3.51714C17.1285 3.5741 17.7264 4.23496 17.7266 5.01128V14.8755ZM6.49805 12.6988C6.49824 12.7723 6.5442 12.8296 6.60254 12.8492L6.96289 12.9859C7.85245 13.3586 8.68125 13.9846 9.33496 14.7496V5.5816C9.08794 4.37762 8.13648 3.1566 6.95801 2.47613L6.71582 2.34527C6.67779 2.32617 6.6337 2.32502 6.58301 2.35796C6.52946 2.39279 6.49805 2.44863 6.49805 2.51031V12.6988Z"})})}function fe(){return n("svg",{className:"codex-activity-icon",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",children:n("path",{d:"M7.33057 1.98535C10.2484 1.98535 12.6136 4.3508 12.6138 7.26855C12.6138 8.58031 12.1346 9.77942 11.3433 10.7031L13.9897 13.3496C14.1655 13.5253 14.1655 13.8106 13.9897 13.9863C13.814 14.1621 13.5288 14.1621 13.353 13.9863L10.7017 11.335C9.78678 12.0942 8.61243 12.5518 7.33057 12.5518C4.41281 12.5516 2.04736 10.1864 2.04736 7.26855C2.04754 4.35091 4.41292 1.98553 7.33057 1.98535ZM7.33057 2.88574C4.90998 2.88592 2.94793 4.84796 2.94775 7.26855C2.94775 9.68929 4.90987 11.6522 7.33057 11.6523C9.75141 11.6523 11.7144 9.6894 11.7144 7.26855C11.7142 4.84786 9.75131 2.88574 7.33057 2.88574Z"})})}function xe(){return m("svg",{className:"codex-activity-icon",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:[n("path",{d:"M6.19629 7.86231C6.42357 7.63534 6.7752 7.60692 7.0332 7.77734L7.1377 7.86231L8.80371 9.5293C9.06329 9.78889 9.06307 10.21 8.80371 10.4697L7.1377 12.1367C6.878 12.3964 6.45599 12.3964 6.19629 12.1367C5.93686 11.8771 5.93697 11.456 6.19629 11.1963L7.39258 9.99902L6.19629 8.80371L6.11133 8.69922C5.94087 8.4411 5.96904 8.08955 6.19629 7.86231Z"}),n("path",{d:"M13.4668 11.0156C13.7699 11.0776 13.998 11.3456 13.998 11.667C13.9979 11.9883 13.7698 12.2564 13.4668 12.3184L13.333 12.332H10.833C10.466 12.3319 10.1682 12.034 10.168 11.667C10.168 11.2998 10.4659 11.0021 10.833 11.002H13.333L13.4668 11.0156Z"}),n("path",{d:"M12.6602 2.66504C13.3492 2.66504 13.9062 2.66439 14.3564 2.70117C14.8142 2.73859 15.2201 2.81796 15.5967 3.00977C16.1922 3.31321 16.677 3.79805 16.9805 4.39356C17.1722 4.77014 17.2517 5.17604 17.2891 5.63379C17.3258 6.08402 17.3252 6.64102 17.3252 7.33008V12.6602C17.3252 13.3492 17.3258 13.9062 17.2891 14.3564C17.2516 14.8142 17.1723 15.2201 16.9805 15.5967C16.677 16.1922 16.1922 16.677 15.5967 16.9805C15.2201 17.1723 14.8142 17.2516 14.3564 17.2891C13.9062 17.3258 13.3492 17.3252 12.6602 17.3252H7.33008C6.64102 17.3252 6.08402 17.3258 5.63379 17.2891C5.17604 17.2517 4.77014 17.1722 4.39356 16.9805C3.79805 16.677 3.31321 16.1922 3.00977 15.5967C2.81796 15.2201 2.73859 14.8142 2.70117 14.3564C2.66439 13.9062 2.66504 13.3492 2.66504 12.6602V7.33008C2.66504 6.64101 2.66439 6.08402 2.70117 5.63379C2.73858 5.17601 2.81797 4.77016 3.00977 4.39356C3.31321 3.79802 3.79802 3.31321 4.39356 3.00977C4.77016 2.81797 5.17601 2.73858 5.63379 2.70117C6.08402 2.66439 6.64101 2.66504 7.33008 2.66504H12.6602ZM7.33008 3.99512C6.61907 3.99512 6.1257 3.99601 5.74219 4.02734C5.3665 4.05804 5.15508 4.11481 4.99707 4.19531C4.65183 4.37124 4.37124 4.65183 4.19531 4.99707C4.11481 5.15508 4.05805 5.3665 4.02734 5.74219C3.99601 6.1257 3.99512 6.61908 3.99512 7.33008V12.6602C3.99512 13.3711 3.99601 13.8646 4.02734 14.248C4.05805 14.6237 4.11481 14.8352 4.19531 14.9932C4.37124 15.3384 4.65186 15.619 4.99707 15.7949C5.15507 15.8754 5.36654 15.9322 5.74219 15.9629C6.1257 15.9942 6.61908 15.9951 7.33008 15.9951H12.6602C13.3711 15.9951 13.8646 15.9942 14.248 15.9629C14.6237 15.9322 14.8352 15.8754 14.9932 15.7949C15.3384 15.619 15.619 15.3384 15.7949 14.9932C15.8754 14.8352 15.9322 14.6237 15.9629 14.248C15.9942 13.8646 15.9951 13.3711 15.9951 12.6602V7.33008C15.9951 6.61908 15.9942 6.1257 15.9629 5.74219C15.9322 5.36654 15.8754 5.15507 15.7949 4.99707C15.619 4.65186 15.3384 4.37124 14.9932 4.19531C14.8352 4.11481 14.6237 4.05805 14.248 4.02734C13.8646 3.99601 13.3711 3.99512 12.6602 3.99512H7.33008Z"})]})}function ge(){return n("svg",{className:"codex-activity-icon",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:n("path",{d:"M11.3312 4.20472C12.7488 2.92391 14.9377 2.96644 16.3039 4.33265L16.4318 4.46742C17.6713 5.8393 17.6713 7.93343 16.4318 9.30531L16.3039 9.44007L10.0119 15.7311C9.68839 16.0546 9.45384 16.2917 9.22185 16.4821L8.98748 16.6588C8.78233 16.799 8.56429 16.9196 8.33709 17.0192L8.10759 17.1119C7.92582 17.1785 7.73843 17.2266 7.52166 17.2711L6.75701 17.4069L4.36345 17.8053C4.22059 17.8291 4.06914 17.8552 3.9406 17.8649C3.84183 17.8723 3.70833 17.875 3.56267 17.8395L3.41423 17.7907C3.19121 17.695 3.00747 17.5271 2.89177 17.316L2.84588 17.2223C2.75958 17.0209 2.76174 16.8276 2.77166 16.6959C2.78136 16.5674 2.80742 16.4159 2.83123 16.2731L3.22966 13.8795L3.36443 13.1149C3.40899 12.898 3.45795 12.7108 3.52459 12.5289L3.61736 12.2985C3.71691 12.0715 3.83772 11.854 3.97771 11.6491L4.15349 11.4147C4.34392 11.1825 4.58171 10.9484 4.90545 10.6246L11.1965 4.33265L11.3312 4.20472ZM5.84588 11.5651C5.49671 11.9142 5.31258 12.0998 5.1867 12.2526L5.07537 12.3991C4.98194 12.5358 4.90157 12.6812 4.83513 12.8327L4.77361 12.9869C4.73328 13.0971 4.70248 13.2125 4.66814 13.3815L4.54119 14.0983L4.14275 16.4918L4.14177 16.4938H4.1447L6.53826 16.0944L7.25505 15.9684C7.42406 15.9341 7.53946 15.9033 7.64959 15.8629L7.80291 15.8014C7.95461 15.7349 8.09953 15.6538 8.2365 15.5602L8.38396 15.4498C8.53674 15.3239 8.72231 15.1398 9.07146 14.7907L14.0588 9.80238L10.8332 6.57679L5.84588 11.5651ZM15.3635 5.27308C14.5281 4.43776 13.2058 4.38573 12.3097 5.11683L12.1369 5.27308L11.7736 5.63636L15.0002 8.86195L15.3635 8.49964L15.5197 8.32581C16.2015 7.48961 16.2015 6.28311 15.5197 5.44691L15.3635 5.27308Z"})})}function he(){return n("svg",{className:"codex-activity-icon",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:n("path",{d:"M16.8347 7.91699C16.8347 7.76279 16.8266 7.61021 16.8123 7.45996L15.4705 8.80371C14.2903 9.98388 12.3762 9.98388 11.1961 8.80371C10.016 7.62352 10.0159 5.70942 11.1961 4.5293L12.5378 3.18652C12.3885 3.17238 12.237 3.16505 12.0837 3.16504C9.45947 3.16504 7.33179 5.29272 7.33179 7.91699C7.33184 8.56608 7.46162 9.18329 7.69605 9.74512C7.79981 9.9939 7.74311 10.2811 7.5525 10.4717L3.59547 14.4287C3.0498 14.9744 3.04991 15.8586 3.59547 16.4043L3.70191 16.501C4.25076 16.9483 5.05957 16.9158 5.57105 16.4043L9.52906 12.4473L9.60426 12.3828C9.79018 12.2455 10.0369 12.2131 10.2546 12.3037C10.8166 12.5382 11.4345 12.668 12.0837 12.668C14.7078 12.6678 16.8345 10.541 16.8347 7.91699ZM18.1648 7.91699C18.1646 11.2755 15.4423 13.9979 12.0837 13.998C11.4151 13.998 10.7708 13.8886 10.1677 13.6885L6.51246 17.3457C5.51389 18.3443 3.93332 18.406 2.86207 17.5322L2.65504 17.3457C1.58992 16.2806 1.58992 14.5534 2.65504 13.4883L6.31031 9.83203C6.1104 9.22921 6.00175 8.58526 6.00172 7.91699C6.00172 4.55818 8.72494 1.83496 12.0837 1.83496C12.7838 1.835 13.458 1.95316 14.0857 2.17188L14.1638 2.20508C14.3404 2.29325 14.4697 2.45713 14.5144 2.65234C14.5653 2.87533 14.4984 3.10876 14.3367 3.27051L12.1375 5.4707C11.4767 6.13148 11.4767 7.20251 12.1375 7.86328C12.7983 8.52373 13.8694 8.52395 14.53 7.86328L16.7293 5.66309L16.7937 5.60742C16.9499 5.48687 17.1532 5.44067 17.3484 5.48535C17.5714 5.53648 17.7526 5.69898 17.8279 5.91504C18.0466 6.54272 18.1648 7.21689 18.1648 7.91699Z"})})}function X({block:e}){if(e.type!=="tool_use")return null;let t=O(e).category;if(t==="read")return n(pe,{});if(t==="search"||t==="fetch")return n(fe,{});if(t==="execute")return n(xe,{});if(t==="edit")return n(ge,{});return n(he,{})}function T(e,t){let i=e.rawInput[t];return typeof i==="string"&&i.length>0?i:void 0}function Ce(e){return O(e).target}function R(e){return e.name.startsWith("mcp__")||e.name.startsWith("mcp_")}function Y(e,t){let{category:i}=O(e),a=Ce(e),r=w(e.status);if(R(e))return{leading:e.title};if(i==="execute"){let o=T(e,"command")?.split(`
2
+ `)[0]??a;return o?{leading:t(r?"stream.codex.running":"stream.codex.ran"),trailing:o}:{leading:t(r?"stream.codex.runningCommand":"stream.codex.ranCommandGeneric")}}if(i==="search"){let o=T(e,"pattern")??T(e,"query")??a;return o?{leading:t(r?"stream.codex.searching":"stream.codex.searched"),trailing:t("stream.codex.forDetail",{detail:o})}:{leading:t(r?"stream.codex.searchingFiles":"stream.codex.searchedFiles")}}if(i==="fetch"){let o=T(e,"query")??T(e,"url")??a;return o?{leading:t(r?"stream.codex.searchingWeb":"stream.codex.searchedWeb"),trailing:t("stream.codex.forDetail",{detail:o})}:{leading:t(r?"stream.codex.searchingWeb":"stream.codex.searchedWeb")}}if(i==="read")return a?{leading:t("stream.codex.readLabel"),trailing:a}:{leading:t("stream.codex.readFiles")};if(i==="edit")return a?{leading:t(r?"stream.codex.editingLabel":"stream.codex.editedLabel"),trailing:a}:{leading:t(r?"stream.codex.editingFiles":"stream.codex.editedFiles")};if(i==="delete")return a?{leading:t(r?"stream.codex.deletingLabel":"stream.codex.deletedLabel"),trailing:a}:{leading:t(r?"stream.codex.deletingFiles":"stream.codex.deletedFiles")};if(i==="move")return a?{leading:t(r?"stream.codex.movingLabel":"stream.codex.movedLabel"),trailing:a}:{leading:t(r?"stream.codex.movingFiles":"stream.codex.movedFiles")};return{leading:e.title}}function ye(e,t){let i=Y(e,t);return i.trailing===void 0?i.leading:`${i.leading} ${i.trailing}`}function ve(e){return e.map((t)=>{if(t.type!=="content")return"";let i=t.content;return i.type==="text"?i.text:""}).filter(Boolean).join(`
3
+ `).trim()}function we(e){return e.flatMap((t)=>{if(t.type!=="content")return[];let i=t.content;return i.type==="image"?[{data:i.data,mimeType:i.mimeType}]:[]})}function Le(e){return e.flatMap((t)=>{if(t.type!=="content")return[];let i=t.content;return i.type==="audio"?[{data:i.data,mimeType:i.mimeType}]:[]})}function Ne(e){if(typeof e==="string"&&e.length>0)return e;return}function $e(e){return e.type==="diff"}function Me(e){let t=e.content.find($e);if(t===void 0)return;return t.changes.map((i)=>`${i.operation} ${i.path}`).join(`
4
+ `)}function K(e){let t=Ne(e.rawOutput);if(t!==void 0)return t;let i=ve(e.content);if(i.length>0)return i;return Me(e)}function Ae({block:e,command:t}){let{t:i,Output:a,commandStatus:r}=L(),[o,d]=D(!1),[l,c]=D(!1),s=K(e),g=r===void 0?e.exitCode===void 0?void 0:i("stream.codex.exitCode",{code:e.exitCode}):r(e),u=()=>{navigator.clipboard.writeText([`$ ${t}`,s].filter((f)=>f!==void 0).join(`
5
+ `)),d(!0),setTimeout(()=>d(!1),1500)};return n("div",{className:"codex-command-details",children:m("div",{className:"codex-command-card",children:[m("div",{className:"codex-command-line-row",children:[n("span",{className:"codex-command-prompt","aria-hidden":"true",children:"$"}),n("button",{type:"button",className:C("codex-command-line",!l&&"codex-command-line-clamped"),"data-codex-disclosure":"","aria-expanded":l,onClick:()=>c((f)=>!f),children:t}),n("button",{type:"button",className:"codex-command-copy","aria-label":i("actions.copy"),onClick:u,children:o?n(de,{}):n(ce,{})})]}),s!==void 0&&(a===void 0?n("pre",{className:"codex-command-output",children:s}):n(a,{text:s})),g!==void 0&&n("div",{className:"codex-command-footer",children:n("span",{className:"codex-command-status",children:g})})]})})}function k({block:e}){let{t,openLink:i,Patch:a,openImage:r,commandStatus:o,expandToolOutput:d=!1}=L(),l=K(e),c=a===void 0?void 0:e.content.flatMap((x)=>{if(x.type!=="diff")return[];let I=x;return I.patch?.text?[I.patch.text]:[]}).join(`
6
+ `),s=we(e.content),g=Le(e.content),[u,f]=E(`tool:${e.id}`,!1),h=P(`tool:${e.id}`,u),y=O(e),v=y.category,p=Y(e,t),S=v==="execute"?T(e,"command"):void 0,N=S!==void 0||R(e)||s.length>0||g.length>0||Boolean(c)||d&&l!==void 0,F=!N&&!w(e.status)?y.filePath:void 0;if(v==="execute"&&!w(e.status)&&e.status!=="completed"){let x=o?.(e);if(x)p={...p,leading:x}}if(v==="read"&&w(e.status))return null;let B=m("span",{className:"codex-activity-label",children:[n(X,{block:e}),n("span",{className:"min-w-0 flex-1 truncate",children:w(e.status)?n("span",{className:"codex-activity-running",children:p.trailing===void 0?p.leading:`${p.leading} ${p.trailing}`}):m(j,{children:[n("span",{className:"codex-activity-leading",children:p.leading}),p.trailing!==void 0&&(F!==void 0?m(j,{children:[" ",n("button",{type:"button",className:"codex-activity-trailing codex-activity-file-link",title:F,onClick:()=>i(F),children:p.trailing})]}):m("span",{className:"codex-activity-trailing",children:[" ",p.trailing]}))]})})]});return m("div",{className:"codex-activity-item",children:[N?m("button",{type:"button",className:"codex-activity-header","data-codex-disclosure":"","aria-label":p.trailing===void 0?p.leading:`${p.leading} ${p.trailing}`,"aria-expanded":u,onClick:()=>f((x)=>!x),children:[B,n(_,{expanded:u})]}):n("div",{className:"codex-activity-header codex-activity-header-static",children:B}),n("div",{className:C("codex-activity-details-grid",u&&"codex-activity-details-grid-open"),children:n("div",{className:"min-h-0 overflow-hidden",children:h&&m(j,{children:[S!==void 0?n(Ae,{block:e,command:S}):a!==void 0&&c?n(a,{patch:c}):l!==void 0&&n("pre",{className:"codex-activity-details",children:l}),s.length>0&&n("div",{className:"codex-activity-media",children:s.map((x)=>{let I=`data:${x.mimeType};base64,${x.data}`,G=n("img",{src:I,className:"max-h-48 max-w-full rounded-lg object-contain",alt:""},`${x.mimeType}:${x.data.slice(0,32)}`);return r===void 0?G:n("button",{type:"button",className:"cursor-pointer",onClick:()=>r(I),children:G},I)})}),g.map((x)=>n("audio",{className:"mt-1 w-full","aria-label":t("stream.codex.audioOutput"),controls:!0,src:`data:${x.mimeType};base64,${x.data}`},`${x.mimeType}:${x.data.slice(0,32)}`))]})})})]})}function ee({block:e}){if(e.type==="tool_use")return n(k,{block:e});if(e.type==="thinking")return n(oe,{block:e});if(e.type==="collab")return n(re,{block:e});return n(te,{block:e})}function te({block:e}){let{t,openSession:i}=L(),a=w(e.status),[r,o]=E(`subagent:${e.id}`,a),d=b(a);A(()=>{if(a)o(!0);if(d.current&&!a)o(!1);d.current=a},[a,o]);let l=`${Ee(e.activity,a,e.name,t)}${ne(e.model,e.reasoningEffort,t)}`,c=e.blocks.length>0;return m("div",{className:"codex-activity-item",children:[m("button",{type:"button",className:C("codex-activity-header",!c&&"codex-activity-header-static"),"data-codex-disclosure":"","aria-expanded":c?r:void 0,disabled:!c,onClick:()=>o((s)=>!s),children:[m("span",{className:"codex-activity-label",children:[n(Te,{seed:e.threadId}),n("span",{className:"min-w-0 flex-1 truncate",children:i===void 0?a?n("span",{className:"codex-activity-running",children:l}):l:n("span",{role:"link",tabIndex:0,className:C("codex-agent-link",a&&"codex-activity-running"),"aria-label":t("stream.codex.subagentOpen",{name:e.name}),onClick:(s)=>{s.stopPropagation(),i(e.threadId,e.name)},onKeyDown:(s)=>{if(s.key!=="Enter"&&s.key!==" ")return;s.preventDefault(),s.stopPropagation(),i(e.threadId,e.name)},children:l})})]}),c&&n(_,{expanded:r})]}),n("div",{className:C("codex-activity-details-grid",r&&"codex-activity-details-grid-open"),children:n("div",{className:"min-h-0 overflow-hidden",children:n("div",{className:"codex-subagent-details",children:e.blocks.map((s)=>{if(s.type==="tool_use")return n(k,{block:s},s.id);if(s.type==="thinking")return n(oe,{block:s},M(s));if(s.type==="subagent")return n(te,{block:s},s.id);if(s.type==="collab")return n(re,{block:s},s.id);if(s.type==="text")return n("div",{className:"codex-reasoning-details",children:n(Q,{text:s.text,streaming:!1})},M(s));if(s.type==="plan")return n(ue,{entries:s.entries},M(s));if(s.type==="image")return n("img",{src:`data:${s.source.media_type};base64,${s.source.data}`,className:"max-h-48 max-w-full rounded-lg object-contain",alt:""},M(s));return null})})})})]})}var be=8;function Ie(e){let t=0;for(let i=0;i<e.length;i+=1)t=(t*31+e.charCodeAt(i))%2147483647;return t%be}function Te({seed:e}){return n("span",{className:"codex-agent-avatar","data-hue":Ie(e),"aria-hidden":"true"})}function Ee(e,t,i,a){switch(e){case"started":return a(t?"stream.codex.subagentWorking":"stream.codex.subagentFinished",{name:i});case"interacted":return a("stream.codex.subagentMessaged",{name:i});case"interrupted":return a("stream.codex.subagentInterrupted",{name:i});case"completed":return a("stream.codex.subagentFinished",{name:i})}}var _e=new Set(["none","minimal","low","medium","high","xhigh","max","ultra","persistent"]);function ne(e,t,i){if(e===null)return"";if(t===null)return` · ${q(e)}`;let a=_e.has(t)?i(`stream.codex.reasoningEffort.${t}`):t;return` · ${q(e)} · ${a}`}var Se={spawnAgent:"spawn",sendInput:"message",sendMessage:"message",followupTask:"message",interruptAgent:"interrupt",listAgents:"list",resumeAgent:"resume",closeAgent:"close"};function ae(e){switch(e){case"pending":case"in_progress":return"inProgress";case"completed":return"completed";case"failed":return"failed";case"cancelled":case"interrupted":return"interrupted";default:throw Error(`Unknown ACP tool status: ${e}`)}}function H(e,t,i){if(e.tool==="wait")throw Error("Codex does not present wait calls");let a=ae(e.status);if(a==="interrupted")return i("stream.codex.collab.interrupted");return i(`stream.codex.collab.${t}.${Se[e.tool]}.${a}`)}function Fe(e){return e.agents.filter((t)=>t.nickname!==null)}function ie(e,t){let i=e.agents.length>0?e.agents.length:1;return`${H(e,"header",t)}${t("stream.codex.collab.agentCount",{count:i})}`}var V="\x01";function Z(e,t,i,a){let r=Object.fromEntries(Object.keys(a).map((o)=>[o,`${V}${o}${V}`]));return e(t,{...i,...r}).split(new RegExp(`${V}(\\w+)${V}`,"u")).map((o,d)=>n(le,{children:d%2===1?a[o]:o},`${d}:${o}`))}function Be({agent:e,showModel:t}){let{t:i,openSession:a}=L(),r=e.nickname??"",o=a===void 0?n("span",{className:"font-medium",children:r}):n("button",{type:"button",className:"codex-agent-link font-medium","aria-label":i("stream.codex.subagentOpen",{name:r}),onClick:()=>a(e.threadId,r),children:r});return m("span",{children:[o,e.role!==null&&` (${e.role})`,t&&ne(e.model,e.reasoningEffort,i)]})}function J({prompt:e}){return n("span",{className:"codex-collab-prompt",title:e,children:e})}function De(e,t){let i=e.prompt?.trim()?e.prompt:null,a=ae(e.status),r=e.tool==="spawnAgent"&&a==="completed"&&i!==null,o=(e.tool==="sendInput"||e.tool==="sendMessage"||e.tool==="followupTask")&&i!==null,d=Fe(e),l=[];if(d.length===0)l.push({key:"generic",node:H(e,"row",t)});for(let c of d){let s=n(Be,{agent:c,showModel:e.tool==="spawnAgent"});if(r)l.push({key:c.threadId,node:n("span",{className:"codex-collab-line",children:Z(t,"stream.codex.collab.createdWithInstructions",{},{agent:s,instructions:n(J,{prompt:i})})})});else if(o)l.push({key:c.threadId,node:n("span",{className:"codex-collab-line",children:Z(t,"stream.codex.collab.messagedWithPrompt",{action:a==="interrupted"?t("stream.codex.collab.interrupted"):t(`stream.codex.collab.messaged.${a}`)},{agent:s,prompt:n(J,{prompt:i})})})});else{let u=e.tool!=="closeAgent"&&e.tool!=="resumeAgent"&&c.state!==null&&c.state!==null?c.state.message?.trim()?t("stream.codex.collab.stateWithMessage",{state:t(`stream.codex.collab.state.${c.state.status}`),message:c.state.message}):t("stream.codex.collab.stateOnly",{state:t(`stream.codex.collab.state.${c.state.status}`)}):"";l.push({key:c.threadId,node:Z(t,"stream.codex.collab.agentRow",{action:H(e,"row",t),state:u},{agent:s})})}}if(!r&&!o&&i!==null)l.push({key:"input",node:Z(t,"stream.codex.collab.input",{},{prompt:n("span",{className:"codex-collab-input",children:i})})});return l}function re({block:e}){let{t}=L(),[i,a]=E(`collab:${e.id}`,!1);if(e.tool==="wait")return null;let r=w(e.status),o=ie(e,t);return m("div",{className:"codex-activity-item",children:[m("button",{type:"button",className:"codex-activity-header","data-codex-disclosure":"","aria-expanded":i,onClick:()=>a((d)=>!d),children:[m("span",{className:"codex-activity-label",children:[n(se,{className:"size-4 shrink-0","aria-hidden":"true"}),n("span",{className:"min-w-0 flex-1 truncate",children:r?n("span",{className:"codex-activity-running",children:o}):o})]}),n(_,{expanded:i})]}),n("div",{className:C("codex-activity-details-grid",i&&"codex-activity-details-grid-open"),children:n("div",{className:"min-h-0 overflow-hidden",children:n("div",{className:"codex-subagent-details",children:De(e,t).map((d)=>n("div",{className:"codex-collab-row",children:d.node},d.key))})})})]})}function oe({block:e}){let{t,i18n:i}=L(),a=Boolean(e.isComplete),[r,o]=E(`thinking:${M(e)}:${a?"complete":"streaming"}`,!a),d=b(a),l=b(null);A(()=>{if(!a)o(!0);if(!d.current&&a)o(!1);d.current=a},[a,o]);let c=e.thinking.trim().length>0;A(()=>{if(a||!c)return;let u=l.current;if(u===null)throw Error("Thinking details are not mounted");let f=new ResizeObserver(()=>{u.scrollTop=u.scrollHeight}),h=null,y=()=>{let p=u.firstElementChild;if(p===h)return;if(h!==null)f.unobserve(h);if(h=p,h!==null)f.observe(h)},v=new MutationObserver(y);return v.observe(u,{childList:!0}),y(),()=>{v.disconnect(),f.disconnect()}},[c,a]);let s=a?e.durationMs!==void 0?t("stream.codex.thoughtFor",{duration:W(e.durationMs,i.language)}):t("stream.codex.thought"):t("message.thinking"),g=e.thinking.trimStart().replace(/^\*\*[^\n]*?\*\*\s*/,"");return m("div",{className:"codex-activity-item",children:[m("button",{type:"button",className:C("codex-activity-header",!c&&"codex-activity-header-static"),"data-codex-disclosure":"","aria-expanded":c?r:void 0,disabled:!c,onClick:()=>o((u)=>!u),children:[n("span",{className:"codex-activity-label",children:n("span",{className:"codex-reasoning-label min-w-0 flex-1 truncate",children:a?s:n("span",{className:"codex-activity-running",children:s})})}),c&&n(_,{expanded:r})]}),n("div",{className:C("codex-activity-details-grid",r&&"codex-activity-details-grid-open"),children:n("div",{className:"min-h-0 overflow-hidden",children:c&&n("div",{ref:l,className:"codex-reasoning-details",role:"region","aria-label":s,"aria-hidden":!r,tabIndex:0,inert:!r,children:n(Q,{text:g,streaming:!a})})})})]})}function Oe(e){if(R(e))return"mcp";let t=O(e).category;return t==="think"||t==="switch_mode"?"other":t}function Ve(e,t,i,a){return a(`stream.codex.summary.${e}.${i?"leading":"following"}`,{count:t})}function Ze(e,t,i){let a=new Map;for(let o of e){let d=Oe(o);a.set(d,(a.get(d)??0)+1)}let r=Array.from(a,([o,d],l)=>Ve(o,d,l===0,t));if(i.startsWith("zh"))return r.join("");return new Intl.ListFormat(i,{style:"long",type:"conjunction"}).format(r)}function Ke({stateKey:e,durationMs:t,durationKind:i="work",active:a,startedAt:r,providerId:o,providerIcon:d,children:l}){let{t:c,i18n:s}=L(),[g,u]=E(`work:${e}`,a),f=P(`work:${e}`,g||a),h=b(a),y=b(null),[v,p]=D(0);A(()=>{if(a)u(!0);if(h.current&&!a)u(!1);h.current=a},[a,u]),A(()=>{if(!a||t!==void 0){y.current=null;return}y.current=r??Date.now();let N=()=>{let B=y.current;if(B===null)throw Error("Codex work section is ticking without a start time");p(Date.now()-B)};N();let F=window.setInterval(N,1000);return()=>window.clearInterval(F)},[a,r,t]);let S=t!==void 0?c(i==="total"?"stream.codex.totalDuration":"stream.codex.workedFor",{duration:W(t,s.language)}):a&&v>=1000?c("stream.codex.workedFor",{duration:W(v,s.language)}):c("stream.codex.worked");return m("section",{className:"codex-work-section",children:[m("button",{type:"button",className:"codex-work-trigger","data-codex-disclosure":"","aria-expanded":g,onClick:()=>u((N)=>!N),children:[o!==void 0&&n("span",{className:"codex-work-provider-icon","data-testid":"codex-work-provider-icon","data-provider-id":o,"aria-hidden":"true",children:d}),n("span",{children:S}),n(_,{expanded:g,className:"codex-work-chevron"})]}),n("div",{className:"codex-work-separator","aria-hidden":"true"}),n("div",{className:C("codex-work-grid",g&&"codex-work-grid-open"),children:n("div",{className:"min-h-0 overflow-hidden",children:n("div",{className:"codex-work-body",children:f&&l})})})]})}function je(e,t){if(e.type==="tool_use")return ye(e,t);if(e.type==="thinking")return t("message.thinking");if(e.type==="collab")return ie(e,t);return t("stream.codex.subagentWorking",{name:e.name})}function We(e){if(e.type==="thinking")return!e.isComplete;if(e.type==="tool_use"||e.type==="subagent"||e.type==="collab")return w(e.status);return!1}function He(e,t=1000){let[i,a]=D(e),r=b(Date.now());return A(()=>{if(e===i)return;let o=Date.now(),d=Math.max(0,r.current+t-o);if(d===0){r.current=o,a(e);return}let l=window.setTimeout(()=>{r.current=Date.now(),a(e)},d);return()=>window.clearTimeout(l)},[i,t,e]),i}function Pe({blocks:e}){let{t,i18n:i}=L(),a=e.some(We),r=e.map(M).join(":"),[o,d]=E(`group:${r}`,a),l=P(`group:${r}`,o||a),c=b(a);A(()=>{if(a)d(!0);if(c.current&&!a)d(!1);c.current=a},[a,d]);let s=e.at(-1);if(s===void 0)throw Error("CodexActivityGroup requires at least one activity block");let g=e.filter((f)=>f.type==="tool_use"),u=He(a?je(s,t):Ze(g,t,i.language));return m("div",{className:"codex-activity-group",children:[m("button",{type:"button",className:"codex-activity-group-trigger","aria-expanded":o,onClick:()=>d((f)=>!f),children:[m("span",{className:"codex-activity-label",children:[n(X,{block:e[0]}),n("span",{className:"truncate",children:a?n("span",{className:"codex-activity-running",children:u}):u})]}),n(_,{expanded:o})]}),n("div",{className:C("codex-activity-group-grid",o&&"codex-activity-group-grid-open"),children:n("div",{className:"min-h-0 overflow-hidden",children:n("div",{className:"codex-activity-group-body",children:l&&e.map((f)=>n(ee,{block:f},M(f)))})})})]})}function ke({blocks:e}){if(e.length===0)throw Error("CodexActivityGroup requires at least one activity block");if(e.length===1)return n(ee,{block:e[0]});return n(Pe,{blocks:e})}export{ke as CodexActivityGroup,Ke as CodexWorkSection};
@@ -962,6 +962,56 @@
962
962
  white-space: pre-wrap;
963
963
  }
964
964
 
965
+ /* Codex seeds each agent's avatar by its thread id; eight hues, 14px like Codex's size-3.5 mark. */
966
+ .codex-agent-avatar {
967
+ display: inline-block;
968
+ width: 14px;
969
+ height: 14px;
970
+ flex-shrink: 0;
971
+ border-radius: 4px;
972
+ background: oklch(0.72 0.14 calc(var(--codex-agent-hue) * 45deg));
973
+ }
974
+
975
+ .codex-agent-avatar[data-hue="0"] {
976
+ --codex-agent-hue: 0;
977
+ }
978
+ .codex-agent-avatar[data-hue="1"] {
979
+ --codex-agent-hue: 1;
980
+ }
981
+ .codex-agent-avatar[data-hue="2"] {
982
+ --codex-agent-hue: 2;
983
+ }
984
+ .codex-agent-avatar[data-hue="3"] {
985
+ --codex-agent-hue: 3;
986
+ }
987
+ .codex-agent-avatar[data-hue="4"] {
988
+ --codex-agent-hue: 4;
989
+ }
990
+ .codex-agent-avatar[data-hue="5"] {
991
+ --codex-agent-hue: 5;
992
+ }
993
+ .codex-agent-avatar[data-hue="6"] {
994
+ --codex-agent-hue: 6;
995
+ }
996
+ .codex-agent-avatar[data-hue="7"] {
997
+ --codex-agent-hue: 7;
998
+ }
999
+
1000
+ .codex-agent-link {
1001
+ border: 0;
1002
+ background: transparent;
1003
+ padding: 0;
1004
+ color: inherit;
1005
+ font: inherit;
1006
+ cursor: pointer;
1007
+ text-align: start;
1008
+ }
1009
+
1010
+ .codex-agent-link:hover,
1011
+ .codex-agent-link:focus-visible {
1012
+ color: var(--codex-foreground);
1013
+ }
1014
+
965
1015
  .codex-user-bubble {
966
1016
  display: flex;
967
1017
  width: fit-content;
package/dist/locales.d.ts CHANGED
@@ -168,6 +168,10 @@ export declare const chatLocales: {
168
168
  readonly movedFiles: "Moved files";
169
169
  readonly subagentWorking: "{{name}} started working";
170
170
  readonly subagentFinished: "{{name}} finished";
171
+ readonly subagentInterrupted: "{{name}} interrupted";
172
+ readonly subagentUpdated: "{{name}} updated";
173
+ readonly subagentMessaged: "Sent message to {{name}}";
174
+ readonly subagentOpen: "Open {{name}} subagent";
171
175
  readonly reasoningEffort: {
172
176
  readonly none: "None";
173
177
  readonly minimal: "Minimal";
@@ -527,106 +531,110 @@ export declare const chatLocales: {
527
531
  readonly movedLabel: "已移动";
528
532
  readonly movingFiles: "正在移动文件";
529
533
  readonly movedFiles: "已移动文件";
530
- readonly subagentWorking: "{{name}} 已开始工作";
534
+ readonly subagentWorking: "{{name}} 开始工作";
531
535
  readonly subagentFinished: "{{name}} 已完成";
536
+ readonly subagentInterrupted: "{{name}} 已中断";
537
+ readonly subagentUpdated: "{{name}} 已更新";
538
+ readonly subagentMessaged: "已向 {{name}} 发送消息";
539
+ readonly subagentOpen: "打开子智能体 {{name}}";
532
540
  readonly reasoningEffort: {
533
541
  readonly none: "无";
534
542
  readonly minimal: "最低";
535
543
  readonly low: "轻度";
536
544
  readonly medium: "中";
537
545
  readonly high: "高";
538
- readonly xhigh: "超高";
546
+ readonly xhigh: "极高";
539
547
  readonly max: "最大";
540
548
  readonly ultra: "Ultra";
541
549
  readonly persistent: "持续";
542
550
  };
543
551
  readonly collab: {
544
552
  readonly interrupted: "已中断";
545
- readonly agentCount_one: " {{count}} 个代理";
546
- readonly agentCount_other: " {{count}} 个代理";
553
+ readonly agentCount_one: " {{count}} 个智能体";
554
+ readonly agentCount_other: " {{count}} 个智能体";
547
555
  readonly header: {
548
556
  readonly spawn: {
549
- readonly inProgress: "正在创建";
557
+ readonly inProgress: "创建中";
550
558
  readonly completed: "已创建";
551
559
  readonly failed: "创建失败";
552
560
  };
553
561
  readonly message: {
554
562
  readonly inProgress: "正在发送消息";
555
563
  readonly completed: "已发送消息";
556
- readonly failed: "发送消息失败";
564
+ readonly failed: "无法发送消息";
557
565
  };
558
566
  readonly interrupt: {
559
567
  readonly inProgress: "正在中断";
560
568
  readonly completed: "已中断";
561
- readonly failed: "中断失败";
569
+ readonly failed: "中断未成功";
562
570
  };
563
571
  readonly list: {
564
572
  readonly inProgress: "正在列出";
565
573
  readonly completed: "已列出";
566
- readonly failed: "列出失败";
574
+ readonly failed: "列出未成功";
567
575
  };
568
576
  readonly resume: {
569
577
  readonly inProgress: "正在恢复";
570
578
  readonly completed: "已恢复";
571
- readonly failed: "恢复失败";
579
+ readonly failed: "无法恢复";
572
580
  };
573
581
  readonly close: {
574
582
  readonly inProgress: "正在关闭";
575
583
  readonly completed: "已关闭";
576
- readonly failed: "关闭失败";
584
+ readonly failed: "无法关闭";
577
585
  };
578
586
  };
579
587
  readonly row: {
580
588
  readonly spawn: {
581
- readonly inProgress: "正在创建";
589
+ readonly inProgress: "创建中";
582
590
  readonly completed: "已创建";
583
591
  readonly failed: "创建失败";
584
592
  };
585
593
  readonly message: {
586
594
  readonly inProgress: "正在发送消息";
587
595
  readonly completed: "已发送消息";
588
- readonly failed: "发送消息失败";
596
+ readonly failed: "无法发送消息";
589
597
  };
590
598
  readonly interrupt: {
591
599
  readonly inProgress: "正在中断";
592
600
  readonly completed: "已中断";
593
- readonly failed: "中断失败";
601
+ readonly failed: "中断未成功";
594
602
  };
595
603
  readonly list: {
596
604
  readonly inProgress: "正在列出";
597
605
  readonly completed: "已列出";
598
- readonly failed: "列出失败";
606
+ readonly failed: "列出未成功";
599
607
  };
600
608
  readonly resume: {
601
609
  readonly inProgress: "正在恢复";
602
610
  readonly completed: "已恢复";
603
- readonly failed: "恢复失败";
611
+ readonly failed: "无法恢复";
604
612
  };
605
613
  readonly close: {
606
614
  readonly inProgress: "正在关闭";
607
615
  readonly completed: "已关闭";
608
- readonly failed: "关闭失败";
616
+ readonly failed: "无法关闭";
609
617
  };
610
618
  };
611
619
  readonly messaged: {
612
620
  readonly inProgress: "正在发送消息";
613
621
  readonly completed: "已发送消息";
614
- readonly failed: "发送消息失败";
622
+ readonly failed: "无法发送消息";
615
623
  };
616
- readonly createdWithInstructions: "已创建 {{agent}},指令:{{instructions}}";
624
+ readonly createdWithInstructions: "已使用以下指令创建 {{agent}}:{{instructions}}";
617
625
  readonly messagedWithPrompt: "{{action}} {{agent}}:{{prompt}}";
618
626
  readonly agentRow: "{{action}} {{agent}}{{state}}";
619
627
  readonly input: "输入:{{prompt}}";
620
628
  readonly stateOnly: "({{state}})";
621
629
  readonly stateWithMessage: "({{state}}:{{message}})";
622
630
  readonly state: {
623
- readonly pendingInit: "初始化中";
624
- readonly running: "运行中";
631
+ readonly pendingInit: "待定初始化";
632
+ readonly running: "正在运行";
625
633
  readonly interrupted: "已中断";
626
- readonly shutdown: "已关闭";
634
+ readonly shutdown: "关闭";
627
635
  readonly completed: "已完成";
628
636
  readonly errored: "出错";
629
- readonly notFound: "未找到";
637
+ readonly notFound: "找不到";
630
638
  };
631
639
  };
632
640
  readonly contextCompacted: "上下文已压缩";
package/dist/locales.js CHANGED
@@ -1 +1 @@
1
- var n={ar:{stream:{codex:{worked:"تمت المعالجة",workedFor:"تمت المعالجة لمدة {{duration}}",totalDuration:"المدة الإجمالية {{duration}}",editedFilesCount_one:"تم تعديل {{count}} ملف",editedFilesCount_other:"تم تعديل {{count}} ملفات",viewChanges:"عرض التغييرات",hideChanges:"إخفاء التغييرات",showMoreFiles:"عرض {{count}} ملفات أخرى",showFewerFiles:"عرض ملفات أقل",changedLines:"الأسطر المتغيرة",showMore:"عرض المزيد",showLess:"عرض أقل",thought:"تم التفكير",thoughtFor:"تم التفكير لمدة {{duration}}",running:"جارٍ التشغيل",ran:"تم التشغيل",runningCommand:"جارٍ تشغيل الأمر",ranCommandGeneric:"تم تشغيل الأمر",searching:"جارٍ البحث",searched:"تم البحث",forDetail:"عن {{detail}}",searchingFiles:"جارٍ البحث في الملفات",searchedFiles:"تم البحث في الملفات",searchingWeb:"جارٍ البحث في الويب",searchedWeb:"تم البحث في الويب",readLabel:"تمت قراءة",readFiles:"تمت قراءة الملفات",editingLabel:"جارٍ تعديل",editedLabel:"تم تعديل",editingFiles:"جارٍ تعديل الملفات",editedFiles:"تم تعديل الملفات",deletingLabel:"جارٍ حذف",deletedLabel:"تم حذف",deletingFiles:"جارٍ حذف الملفات",deletedFiles:"تم حذف الملفات",movingLabel:"جارٍ نقل",movedLabel:"تم نقل",movingFiles:"جارٍ نقل الملفات",movedFiles:"تم نقل الملفات",subagentWorking:"بدأ {{name}} العمل",subagentFinished:"أنهى {{name}} العمل",contextCompacted:"تم ضغط السياق",audioOutput:"مخرج صوتي",exitCode:"رمز الخروج {{code}}",summary:{read:{leading:"تمت قراءة الملفات",following:"وقراءة الملفات"},edit:{leading:"تم تعديل الملفات",following:"وتعديل الملفات"},delete:{leading:"تم حذف الملفات",following:"وحذف الملفات"},move:{leading:"تم نقل الملفات",following:"ونقل الملفات"},search:{leading:"تم البحث في الملفات",following:"والبحث في الملفات"},execute:{leading_one:"تم تشغيل أمر",leading_other:"تم تشغيل أوامر",following_one:"وتشغيل أمر",following_other:"وتشغيل أوامر"},fetch:{leading:"تم البحث في الويب",following:"والبحث في الويب"},mcp:{leading_one:"تم استدعاء أداة",leading_other:"تم استدعاء أدوات",following_one:"واستدعاء أداة",following_other:"واستدعاء أدوات"},other:{leading_one:"تم استدعاء أداة",leading_other:"تم استدعاء أدوات",following_one:"واستدعاء أداة",following_other:"واستدعاء أدوات"}}}},message:{thinking:"التفكير"},actions:{copy:"ينسخ"},model:{loadingModels:"جارٍ تحميل النماذج...",switchProvider:"مزود التبديل",moreModels:"المزيد من النماذج",selectModel:"حدد النموذج",switchModel:"نموذج التبديل",noModelsAvailable:"لا توجد نماذج متاحة"}},de:{stream:{},message:{thinking:"Denkt nach"},actions:{copy:"Kopieren"},model:{loadingModels:"Lädt Modelle...",switchProvider:"Provider wechseln",moreModels:"Mehr Modelle",selectModel:"Modell auswählen",switchModel:"Modell wechseln",noModelsAvailable:"Keine Modelle verfügbar"}},en:{stream:{codex:{worked:"Worked",workedFor:"Worked for {{duration}}",totalDuration:"Total time {{duration}}",editedFilesCount_one:"Edited {{count}} file",editedFilesCount_other:"Edited {{count}} files",viewChanges:"View changes",hideChanges:"Hide changes",showMoreFiles:"Show {{count}} more files",showFewerFiles:"Show fewer files",changedLines:"Changed lines",showMore:"Show more",showLess:"Show less",thought:"Thought",thoughtFor:"Thought for {{duration}}",running:"Running",ran:"Ran",runningCommand:"Running command",ranCommandGeneric:"Ran command",searching:"Searching",searched:"Searched",forDetail:"for {{detail}}",searchingFiles:"Searching for files",searchedFiles:"Searched for files",searchingWeb:"Searching the web",searchedWeb:"Searched the web",readLabel:"Read",readFiles:"Read files",editingLabel:"Editing",editedLabel:"Edited",editingFiles:"Editing files",editedFiles:"Edited files",deletingLabel:"Deleting",deletedLabel:"Deleted",deletingFiles:"Deleting files",deletedFiles:"Deleted files",movingLabel:"Moving",movedLabel:"Moved",movingFiles:"Moving files",movedFiles:"Moved files",subagentWorking:"{{name}} started working",subagentFinished:"{{name}} finished",reasoningEffort:{none:"None",minimal:"Minimal",low:"Light",medium:"Medium",high:"High",xhigh:"Extra high",max:"Max",ultra:"Ultra",persistent:"Persistent"},collab:{interrupted:"Interrupted",agentCount_one:" an agent",agentCount_other:" {{count}} agents",header:{spawn:{inProgress:"Creating",completed:"Created",failed:"Failed to create"},message:{inProgress:"Messaging",completed:"Messaged",failed:"Failed to message"},interrupt:{inProgress:"Interrupting",completed:"Interrupted",failed:"Failed to interrupt"},list:{inProgress:"Listing",completed:"Listed",failed:"Failed to list"},resume:{inProgress:"Resuming",completed:"Resumed",failed:"Failed to resume"},close:{inProgress:"Closing",completed:"Closed",failed:"Failed to close"}},row:{spawn:{inProgress:"Creating",completed:"Created",failed:"Failed creating"},message:{inProgress:"Messaging",completed:"Messaged",failed:"Failed messaging"},interrupt:{inProgress:"Interrupting",completed:"Interrupted",failed:"Failed to interrupt"},list:{inProgress:"Listing",completed:"Listed",failed:"Failed to list"},resume:{inProgress:"Resuming",completed:"Resumed",failed:"Failed resuming"},close:{inProgress:"Closing",completed:"Closed",failed:"Failed closing"}},messaged:{inProgress:"Messaging",completed:"Messaged",failed:"Failed to message"},createdWithInstructions:"Created {{agent}} with the instructions: {{instructions}}",messagedWithPrompt:"{{action}} {{agent}}: {{prompt}}",agentRow:"{{action}} {{agent}}{{state}}",input:"Input: {{prompt}}",stateOnly:" ({{state}})",stateWithMessage:" ({{state}}: {{message}})",state:{pendingInit:"pending init",running:"running",interrupted:"interrupted",shutdown:"shutdown",completed:"completed",errored:"errored",notFound:"not found"}},contextCompacted:"Context compacted",audioOutput:"Audio output",exitCode:"Exit code {{code}}",summary:{read:{leading:"Read files",following:"read files"},edit:{leading:"Edited files",following:"edited files"},delete:{leading:"Deleted files",following:"deleted files"},move:{leading:"Moved files",following:"moved files"},search:{leading:"Searched files",following:"searched files"},execute:{leading_one:"Ran a command",leading_other:"Ran commands",following_one:"ran a command",following_other:"ran commands"},fetch:{leading:"Searched the web",following:"searched the web"},mcp:{leading_one:"Called a tool",leading_other:"Called tools",following_one:"called a tool",following_other:"called tools"},other:{leading_one:"Called a tool",leading_other:"Called tools",following_one:"called a tool",following_other:"called tools"}}}},message:{thinking:"Thinking"},actions:{copy:"Copy"},model:{loadingModels:"Loading models...",switchProvider:"Switch provider",moreModels:"More models",selectModel:"Select model",switchModel:"Switch model",noModelsAvailable:"No models available"}},es:{stream:{},message:{thinking:"Pensando"},actions:{copy:"Copiar"},model:{loadingModels:"Cargando modelos...",switchProvider:"Cambiar provider",moreModels:"Más modelos",selectModel:"Seleccionar modelo",switchModel:"Cambiar modelo",noModelsAvailable:"No hay modelos disponibles"}},fr:{stream:{},message:{thinking:"Réflexion"},actions:{copy:"Copier"},model:{loadingModels:"Chargement des modèles...",switchProvider:"Changer de provider",moreModels:"Plus de modèles",selectModel:"Sélectionner un modèle",switchModel:"Changer de modèle",noModelsAvailable:"Aucun modèle disponible"}},hi:{stream:{},message:{thinking:"सोच रहा है"},actions:{copy:"कॉपी करें"},model:{loadingModels:"मॉडल लोड हो रहे हैं...",switchProvider:"Provider बदलें",moreModels:"और मॉडल",selectModel:"मॉडल चुनें",switchModel:"मॉडल बदलें",noModelsAvailable:"कोई मॉडल उपलब्ध नहीं"}},id:{stream:{},message:{thinking:"Berpikir"},actions:{copy:"Salin"},model:{loadingModels:"Memuat model...",switchProvider:"Ganti provider",moreModels:"Model lainnya",selectModel:"Pilih model",switchModel:"Ganti model",noModelsAvailable:"Tidak ada model tersedia"}},it:{stream:{},message:{thinking:"Sto pensando"},actions:{copy:"Copia"},model:{loadingModels:"Caricamento modelli...",switchProvider:"Cambia provider",moreModels:"Altri modelli",selectModel:"Seleziona modello",switchModel:"Cambia modello",noModelsAvailable:"Nessun modello disponibile"}},ja:{stream:{},message:{thinking:"考え中"},actions:{copy:"コピー"},model:{loadingModels:"モデルを読み込み中...",switchProvider:"プロバイダーを切り替え",moreModels:"その他のモデル",selectModel:"モデルを選択",switchModel:"モデルを切り替え",noModelsAvailable:"利用可能なモデルがありません"}},ko:{stream:{},message:{thinking:"생각 중"},actions:{copy:"복사"},model:{loadingModels:"모델 로드 중...",switchProvider:"프로바이더 전환",moreModels:"더 많은 모델",selectModel:"모델 선택",switchModel:"모델 전환",noModelsAvailable:"사용 가능한 모델이 없습니다"}},"pt-BR":{stream:{},message:{thinking:"Pensando"},actions:{copy:"Copiar"},model:{loadingModels:"Carregando modelos...",switchProvider:"Mudar provider",moreModels:"Mais modelos",selectModel:"Selecionar modelo",switchModel:"Mudar modelo",noModelsAvailable:"Nenhum modelo disponível"}},ru:{stream:{},message:{thinking:"Думаю"},actions:{copy:"Копировать"},model:{loadingModels:"Загрузка моделей...",switchProvider:"Переключить provider",moreModels:"Больше моделей",selectModel:"Выбрать модель",switchModel:"Переключить модель",noModelsAvailable:"Нет доступных моделей"}},"zh-CN":{stream:{codex:{worked:"已处理",workedFor:"已处理 {{duration}}",totalDuration:"用时 {{duration}}",editedFilesCount_one:"已编辑 {{count}} 个文件",editedFilesCount_other:"已编辑 {{count}} 个文件",viewChanges:"查看更改",hideChanges:"收起更改",showMoreFiles:"显示其余 {{count}} 个文件",showFewerFiles:"收起文件",changedLines:"更改行数",showMore:"展开显示",showLess:"收起显示",thought:"已思考",thoughtFor:"思考了 {{duration}}",running:"正在运行",ran:"已运行",runningCommand:"正在运行命令",ranCommandGeneric:"已运行命令",searching:"正在搜索",searched:"已搜索",forDetail:"{{detail}}",searchingFiles:"正在搜索文件",searchedFiles:"已搜索文件",searchingWeb:"正在搜索网页",searchedWeb:"已搜索网页",readLabel:"已读取",readFiles:"已读取文件",editingLabel:"正在编辑",editedLabel:"已编辑",editingFiles:"正在编辑文件",editedFiles:"已编辑文件",deletingLabel:"正在删除",deletedLabel:"已删除",deletingFiles:"正在删除文件",deletedFiles:"已删除文件",movingLabel:"正在移动",movedLabel:"已移动",movingFiles:"正在移动文件",movedFiles:"已移动文件",subagentWorking:"{{name}} 已开始工作",subagentFinished:"{{name}} 已完成",reasoningEffort:{none:"无",minimal:"最低",low:"轻度",medium:"中",high:"高",xhigh:"超高",max:"最大",ultra:"Ultra",persistent:"持续"},collab:{interrupted:"已中断",agentCount_one:" {{count}} 个代理",agentCount_other:" {{count}} 个代理",header:{spawn:{inProgress:"正在创建",completed:"已创建",failed:"创建失败"},message:{inProgress:"正在发送消息",completed:"已发送消息",failed:"发送消息失败"},interrupt:{inProgress:"正在中断",completed:"已中断",failed:"中断失败"},list:{inProgress:"正在列出",completed:"已列出",failed:"列出失败"},resume:{inProgress:"正在恢复",completed:"已恢复",failed:"恢复失败"},close:{inProgress:"正在关闭",completed:"已关闭",failed:"关闭失败"}},row:{spawn:{inProgress:"正在创建",completed:"已创建",failed:"创建失败"},message:{inProgress:"正在发送消息",completed:"已发送消息",failed:"发送消息失败"},interrupt:{inProgress:"正在中断",completed:"已中断",failed:"中断失败"},list:{inProgress:"正在列出",completed:"已列出",failed:"列出失败"},resume:{inProgress:"正在恢复",completed:"已恢复",failed:"恢复失败"},close:{inProgress:"正在关闭",completed:"已关闭",failed:"关闭失败"}},messaged:{inProgress:"正在发送消息",completed:"已发送消息",failed:"发送消息失败"},createdWithInstructions:"已创建 {{agent}},指令:{{instructions}}",messagedWithPrompt:"{{action}} {{agent}}:{{prompt}}",agentRow:"{{action}} {{agent}}{{state}}",input:"输入:{{prompt}}",stateOnly:"({{state}})",stateWithMessage:"({{state}}:{{message}})",state:{pendingInit:"初始化中",running:"运行中",interrupted:"已中断",shutdown:"已关闭",completed:"已完成",errored:"出错",notFound:"未找到"}},contextCompacted:"上下文已压缩",audioOutput:"音频输出",exitCode:"退出码 {{code}}",summary:{read:{leading:"已读取文件",following:"读取了文件"},edit:{leading:"已编辑文件",following:"编辑了文件"},delete:{leading:"已删除文件",following:"删除了文件"},move:{leading:"已移动文件",following:"移动了文件"},search:{leading:"已搜索文件",following:"搜索了文件"},execute:{leading_one:"已运行命令",leading_other:"已运行命令",following_one:"运行了命令",following_other:"运行了命令"},fetch:{leading:"已搜索网页",following:"搜索了网页"},mcp:{leading_one:"已调用工具",leading_other:"已调用工具",following_one:"调用了工具",following_other:"调用了工具"},other:{leading_one:"已调用工具",leading_other:"已调用工具",following_one:"调用了工具",following_other:"调用了工具"}}}},message:{thinking:"正在思考"},actions:{copy:"复制"},model:{loadingModels:"加载模型中...",switchProvider:"切换服务商",moreModels:"更多模型",selectModel:"选择模型",switchModel:"切换模型",noModelsAvailable:"暂无可用模型"}}};function d(e){let o={...e};for(let[i,l]of Object.entries(n))o[i]={...e[i],alwithChat:l};return o}export{n as chatLocales,d as withChatResources};
1
+ var n={ar:{stream:{codex:{worked:"تمت المعالجة",workedFor:"تمت المعالجة لمدة {{duration}}",totalDuration:"المدة الإجمالية {{duration}}",editedFilesCount_one:"تم تعديل {{count}} ملف",editedFilesCount_other:"تم تعديل {{count}} ملفات",viewChanges:"عرض التغييرات",hideChanges:"إخفاء التغييرات",showMoreFiles:"عرض {{count}} ملفات أخرى",showFewerFiles:"عرض ملفات أقل",changedLines:"الأسطر المتغيرة",showMore:"عرض المزيد",showLess:"عرض أقل",thought:"تم التفكير",thoughtFor:"تم التفكير لمدة {{duration}}",running:"جارٍ التشغيل",ran:"تم التشغيل",runningCommand:"جارٍ تشغيل الأمر",ranCommandGeneric:"تم تشغيل الأمر",searching:"جارٍ البحث",searched:"تم البحث",forDetail:"عن {{detail}}",searchingFiles:"جارٍ البحث في الملفات",searchedFiles:"تم البحث في الملفات",searchingWeb:"جارٍ البحث في الويب",searchedWeb:"تم البحث في الويب",readLabel:"تمت قراءة",readFiles:"تمت قراءة الملفات",editingLabel:"جارٍ تعديل",editedLabel:"تم تعديل",editingFiles:"جارٍ تعديل الملفات",editedFiles:"تم تعديل الملفات",deletingLabel:"جارٍ حذف",deletedLabel:"تم حذف",deletingFiles:"جارٍ حذف الملفات",deletedFiles:"تم حذف الملفات",movingLabel:"جارٍ نقل",movedLabel:"تم نقل",movingFiles:"جارٍ نقل الملفات",movedFiles:"تم نقل الملفات",subagentWorking:"بدأ {{name}} العمل",subagentFinished:"أنهى {{name}} العمل",contextCompacted:"تم ضغط السياق",audioOutput:"مخرج صوتي",exitCode:"رمز الخروج {{code}}",summary:{read:{leading:"تمت قراءة الملفات",following:"وقراءة الملفات"},edit:{leading:"تم تعديل الملفات",following:"وتعديل الملفات"},delete:{leading:"تم حذف الملفات",following:"وحذف الملفات"},move:{leading:"تم نقل الملفات",following:"ونقل الملفات"},search:{leading:"تم البحث في الملفات",following:"والبحث في الملفات"},execute:{leading_one:"تم تشغيل أمر",leading_other:"تم تشغيل أوامر",following_one:"وتشغيل أمر",following_other:"وتشغيل أوامر"},fetch:{leading:"تم البحث في الويب",following:"والبحث في الويب"},mcp:{leading_one:"تم استدعاء أداة",leading_other:"تم استدعاء أدوات",following_one:"واستدعاء أداة",following_other:"واستدعاء أدوات"},other:{leading_one:"تم استدعاء أداة",leading_other:"تم استدعاء أدوات",following_one:"واستدعاء أداة",following_other:"واستدعاء أدوات"}}}},message:{thinking:"التفكير"},actions:{copy:"ينسخ"},model:{loadingModels:"جارٍ تحميل النماذج...",switchProvider:"مزود التبديل",moreModels:"المزيد من النماذج",selectModel:"حدد النموذج",switchModel:"نموذج التبديل",noModelsAvailable:"لا توجد نماذج متاحة"}},de:{stream:{},message:{thinking:"Denkt nach"},actions:{copy:"Kopieren"},model:{loadingModels:"Lädt Modelle...",switchProvider:"Provider wechseln",moreModels:"Mehr Modelle",selectModel:"Modell auswählen",switchModel:"Modell wechseln",noModelsAvailable:"Keine Modelle verfügbar"}},en:{stream:{codex:{worked:"Worked",workedFor:"Worked for {{duration}}",totalDuration:"Total time {{duration}}",editedFilesCount_one:"Edited {{count}} file",editedFilesCount_other:"Edited {{count}} files",viewChanges:"View changes",hideChanges:"Hide changes",showMoreFiles:"Show {{count}} more files",showFewerFiles:"Show fewer files",changedLines:"Changed lines",showMore:"Show more",showLess:"Show less",thought:"Thought",thoughtFor:"Thought for {{duration}}",running:"Running",ran:"Ran",runningCommand:"Running command",ranCommandGeneric:"Ran command",searching:"Searching",searched:"Searched",forDetail:"for {{detail}}",searchingFiles:"Searching for files",searchedFiles:"Searched for files",searchingWeb:"Searching the web",searchedWeb:"Searched the web",readLabel:"Read",readFiles:"Read files",editingLabel:"Editing",editedLabel:"Edited",editingFiles:"Editing files",editedFiles:"Edited files",deletingLabel:"Deleting",deletedLabel:"Deleted",deletingFiles:"Deleting files",deletedFiles:"Deleted files",movingLabel:"Moving",movedLabel:"Moved",movingFiles:"Moving files",movedFiles:"Moved files",subagentWorking:"{{name}} started working",subagentFinished:"{{name}} finished",subagentInterrupted:"{{name}} interrupted",subagentUpdated:"{{name}} updated",subagentMessaged:"Sent message to {{name}}",subagentOpen:"Open {{name}} subagent",reasoningEffort:{none:"None",minimal:"Minimal",low:"Light",medium:"Medium",high:"High",xhigh:"Extra high",max:"Max",ultra:"Ultra",persistent:"Persistent"},collab:{interrupted:"Interrupted",agentCount_one:" an agent",agentCount_other:" {{count}} agents",header:{spawn:{inProgress:"Creating",completed:"Created",failed:"Failed to create"},message:{inProgress:"Messaging",completed:"Messaged",failed:"Failed to message"},interrupt:{inProgress:"Interrupting",completed:"Interrupted",failed:"Failed to interrupt"},list:{inProgress:"Listing",completed:"Listed",failed:"Failed to list"},resume:{inProgress:"Resuming",completed:"Resumed",failed:"Failed to resume"},close:{inProgress:"Closing",completed:"Closed",failed:"Failed to close"}},row:{spawn:{inProgress:"Creating",completed:"Created",failed:"Failed creating"},message:{inProgress:"Messaging",completed:"Messaged",failed:"Failed messaging"},interrupt:{inProgress:"Interrupting",completed:"Interrupted",failed:"Failed to interrupt"},list:{inProgress:"Listing",completed:"Listed",failed:"Failed to list"},resume:{inProgress:"Resuming",completed:"Resumed",failed:"Failed resuming"},close:{inProgress:"Closing",completed:"Closed",failed:"Failed closing"}},messaged:{inProgress:"Messaging",completed:"Messaged",failed:"Failed to message"},createdWithInstructions:"Created {{agent}} with the instructions: {{instructions}}",messagedWithPrompt:"{{action}} {{agent}}: {{prompt}}",agentRow:"{{action}} {{agent}}{{state}}",input:"Input: {{prompt}}",stateOnly:" ({{state}})",stateWithMessage:" ({{state}}: {{message}})",state:{pendingInit:"pending init",running:"running",interrupted:"interrupted",shutdown:"shutdown",completed:"completed",errored:"errored",notFound:"not found"}},contextCompacted:"Context compacted",audioOutput:"Audio output",exitCode:"Exit code {{code}}",summary:{read:{leading:"Read files",following:"read files"},edit:{leading:"Edited files",following:"edited files"},delete:{leading:"Deleted files",following:"deleted files"},move:{leading:"Moved files",following:"moved files"},search:{leading:"Searched files",following:"searched files"},execute:{leading_one:"Ran a command",leading_other:"Ran commands",following_one:"ran a command",following_other:"ran commands"},fetch:{leading:"Searched the web",following:"searched the web"},mcp:{leading_one:"Called a tool",leading_other:"Called tools",following_one:"called a tool",following_other:"called tools"},other:{leading_one:"Called a tool",leading_other:"Called tools",following_one:"called a tool",following_other:"called tools"}}}},message:{thinking:"Thinking"},actions:{copy:"Copy"},model:{loadingModels:"Loading models...",switchProvider:"Switch provider",moreModels:"More models",selectModel:"Select model",switchModel:"Switch model",noModelsAvailable:"No models available"}},es:{stream:{},message:{thinking:"Pensando"},actions:{copy:"Copiar"},model:{loadingModels:"Cargando modelos...",switchProvider:"Cambiar provider",moreModels:"Más modelos",selectModel:"Seleccionar modelo",switchModel:"Cambiar modelo",noModelsAvailable:"No hay modelos disponibles"}},fr:{stream:{},message:{thinking:"Réflexion"},actions:{copy:"Copier"},model:{loadingModels:"Chargement des modèles...",switchProvider:"Changer de provider",moreModels:"Plus de modèles",selectModel:"Sélectionner un modèle",switchModel:"Changer de modèle",noModelsAvailable:"Aucun modèle disponible"}},hi:{stream:{},message:{thinking:"सोच रहा है"},actions:{copy:"कॉपी करें"},model:{loadingModels:"मॉडल लोड हो रहे हैं...",switchProvider:"Provider बदलें",moreModels:"और मॉडल",selectModel:"मॉडल चुनें",switchModel:"मॉडल बदलें",noModelsAvailable:"कोई मॉडल उपलब्ध नहीं"}},id:{stream:{},message:{thinking:"Berpikir"},actions:{copy:"Salin"},model:{loadingModels:"Memuat model...",switchProvider:"Ganti provider",moreModels:"Model lainnya",selectModel:"Pilih model",switchModel:"Ganti model",noModelsAvailable:"Tidak ada model tersedia"}},it:{stream:{},message:{thinking:"Sto pensando"},actions:{copy:"Copia"},model:{loadingModels:"Caricamento modelli...",switchProvider:"Cambia provider",moreModels:"Altri modelli",selectModel:"Seleziona modello",switchModel:"Cambia modello",noModelsAvailable:"Nessun modello disponibile"}},ja:{stream:{},message:{thinking:"考え中"},actions:{copy:"コピー"},model:{loadingModels:"モデルを読み込み中...",switchProvider:"プロバイダーを切り替え",moreModels:"その他のモデル",selectModel:"モデルを選択",switchModel:"モデルを切り替え",noModelsAvailable:"利用可能なモデルがありません"}},ko:{stream:{},message:{thinking:"생각 중"},actions:{copy:"복사"},model:{loadingModels:"모델 로드 중...",switchProvider:"프로바이더 전환",moreModels:"더 많은 모델",selectModel:"모델 선택",switchModel:"모델 전환",noModelsAvailable:"사용 가능한 모델이 없습니다"}},"pt-BR":{stream:{},message:{thinking:"Pensando"},actions:{copy:"Copiar"},model:{loadingModels:"Carregando modelos...",switchProvider:"Mudar provider",moreModels:"Mais modelos",selectModel:"Selecionar modelo",switchModel:"Mudar modelo",noModelsAvailable:"Nenhum modelo disponível"}},ru:{stream:{},message:{thinking:"Думаю"},actions:{copy:"Копировать"},model:{loadingModels:"Загрузка моделей...",switchProvider:"Переключить provider",moreModels:"Больше моделей",selectModel:"Выбрать модель",switchModel:"Переключить модель",noModelsAvailable:"Нет доступных моделей"}},"zh-CN":{stream:{codex:{worked:"已处理",workedFor:"已处理 {{duration}}",totalDuration:"用时 {{duration}}",editedFilesCount_one:"已编辑 {{count}} 个文件",editedFilesCount_other:"已编辑 {{count}} 个文件",viewChanges:"查看更改",hideChanges:"收起更改",showMoreFiles:"显示其余 {{count}} 个文件",showFewerFiles:"收起文件",changedLines:"更改行数",showMore:"展开显示",showLess:"收起显示",thought:"已思考",thoughtFor:"思考了 {{duration}}",running:"正在运行",ran:"已运行",runningCommand:"正在运行命令",ranCommandGeneric:"已运行命令",searching:"正在搜索",searched:"已搜索",forDetail:"{{detail}}",searchingFiles:"正在搜索文件",searchedFiles:"已搜索文件",searchingWeb:"正在搜索网页",searchedWeb:"已搜索网页",readLabel:"已读取",readFiles:"已读取文件",editingLabel:"正在编辑",editedLabel:"已编辑",editingFiles:"正在编辑文件",editedFiles:"已编辑文件",deletingLabel:"正在删除",deletedLabel:"已删除",deletingFiles:"正在删除文件",deletedFiles:"已删除文件",movingLabel:"正在移动",movedLabel:"已移动",movingFiles:"正在移动文件",movedFiles:"已移动文件",subagentWorking:"{{name}} 开始工作",subagentFinished:"{{name}} 已完成",subagentInterrupted:"{{name}} 已中断",subagentUpdated:"{{name}} 已更新",subagentMessaged:"已向 {{name}} 发送消息",subagentOpen:"打开子智能体 {{name}}",reasoningEffort:{none:"无",minimal:"最低",low:"轻度",medium:"中",high:"高",xhigh:"极高",max:"最大",ultra:"Ultra",persistent:"持续"},collab:{interrupted:"已中断",agentCount_one:" {{count}} 个智能体",agentCount_other:" {{count}} 个智能体",header:{spawn:{inProgress:"创建中",completed:"已创建",failed:"创建失败"},message:{inProgress:"正在发送消息",completed:"已发送消息",failed:"无法发送消息"},interrupt:{inProgress:"正在中断",completed:"已中断",failed:"中断未成功"},list:{inProgress:"正在列出",completed:"已列出",failed:"列出未成功"},resume:{inProgress:"正在恢复",completed:"已恢复",failed:"无法恢复"},close:{inProgress:"正在关闭",completed:"已关闭",failed:"无法关闭"}},row:{spawn:{inProgress:"创建中",completed:"已创建",failed:"创建失败"},message:{inProgress:"正在发送消息",completed:"已发送消息",failed:"无法发送消息"},interrupt:{inProgress:"正在中断",completed:"已中断",failed:"中断未成功"},list:{inProgress:"正在列出",completed:"已列出",failed:"列出未成功"},resume:{inProgress:"正在恢复",completed:"已恢复",failed:"无法恢复"},close:{inProgress:"正在关闭",completed:"已关闭",failed:"无法关闭"}},messaged:{inProgress:"正在发送消息",completed:"已发送消息",failed:"无法发送消息"},createdWithInstructions:"已使用以下指令创建 {{agent}}:{{instructions}}",messagedWithPrompt:"{{action}} {{agent}}:{{prompt}}",agentRow:"{{action}} {{agent}}{{state}}",input:"输入:{{prompt}}",stateOnly:"({{state}})",stateWithMessage:"({{state}}:{{message}})",state:{pendingInit:"待定初始化",running:"正在运行",interrupted:"已中断",shutdown:"关闭",completed:"已完成",errored:"出错",notFound:"找不到"}},contextCompacted:"上下文已压缩",audioOutput:"音频输出",exitCode:"退出码 {{code}}",summary:{read:{leading:"已读取文件",following:"读取了文件"},edit:{leading:"已编辑文件",following:"编辑了文件"},delete:{leading:"已删除文件",following:"删除了文件"},move:{leading:"已移动文件",following:"移动了文件"},search:{leading:"已搜索文件",following:"搜索了文件"},execute:{leading_one:"已运行命令",leading_other:"已运行命令",following_one:"运行了命令",following_other:"运行了命令"},fetch:{leading:"已搜索网页",following:"搜索了网页"},mcp:{leading_one:"已调用工具",leading_other:"已调用工具",following_one:"调用了工具",following_other:"调用了工具"},other:{leading_one:"已调用工具",leading_other:"已调用工具",following_one:"调用了工具",following_other:"调用了工具"}}}},message:{thinking:"正在思考"},actions:{copy:"复制"},model:{loadingModels:"加载模型中...",switchProvider:"切换服务商",moreModels:"更多模型",selectModel:"选择模型",switchModel:"切换模型",noModelsAvailable:"暂无可用模型"}}};function d(e){let o={...e};for(let[i,l]of Object.entries(n))o[i]={...e[i],alwithChat:l};return o}export{n as chatLocales,d as withChatResources};
package/dist/types.d.ts CHANGED
@@ -24,6 +24,7 @@ export interface TerminalDisplayMeta {
24
24
  };
25
25
  }
26
26
  export type CollabTool = "spawnAgent" | "sendInput" | "resumeAgent" | "wait" | "closeAgent" | "sendMessage" | "followupTask" | "interruptAgent" | "listAgents";
27
+ export type SubagentActivityKind = "started" | "interacted" | "interrupted" | "completed";
27
28
  export type CollabAgentStatus = "pendingInit" | "running" | "interrupted" | "completed" | "errored" | "shutdown" | "notFound";
28
29
  export interface CollabAgent {
29
30
  threadId: string;
@@ -67,6 +68,8 @@ export type ContentBlock = {
67
68
  type: "subagent";
68
69
  id: string;
69
70
  name: string;
71
+ threadId: string;
72
+ activity: SubagentActivityKind;
70
73
  model: string | null;
71
74
  reasoningEffort: string | null;
72
75
  blocks: ContentBlock[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alwith/module-chat",
3
- "version": "0.1.12",
3
+ "version": "0.1.13",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "exports": {