@tickernelz/wardmote-ui 2026.1114.2 → 2026.1114.3
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/dist/assets/{ActiveAgentsPanel-Budj8e9v.js → ActiveAgentsPanel-CF0fwsze.js} +1 -1
- package/dist/assets/{AdapterManager-DhiW44Eo.js → AdapterManager-DUXWwNxv.js} +1 -1
- package/dist/assets/{AdvancedToolsRoute-CICI1XRd.js → AdvancedToolsRoute-BamlkE3p.js} +1 -1
- package/dist/assets/{AgentActionButtons-DIhpv51Y.js → AgentActionButtons-CPIhsP04.js} +1 -1
- package/dist/assets/{AgentBubbleActionRow-DIr3TdR9.js → AgentBubbleActionRow-BUAUmJKa.js} +1 -1
- package/dist/assets/{AgentChat-CeuGtMXr.js → AgentChat-BAn_ghsu.js} +1 -1
- package/dist/assets/{AgentChats-CmDtTrMa.js → AgentChats-f73hodzr.js} +1 -1
- package/dist/assets/{AgentDefaults-DpYaMGkf.js → AgentDefaults-BL1XYvEo.js} +1 -1
- package/dist/assets/{AgentDetail-DFTeFc4-.js → AgentDetail-DthxFfuB.js} +1 -1
- package/dist/assets/{AgentTodoCard-DRXZ7hmU.js → AgentTodoCard-BvgkWD0T.js} +1 -1
- package/dist/assets/{Agents-CClUUMUq.js → Agents-D5qI6yZZ.js} +3 -3
- package/dist/assets/{AppDetail-DfHLFOtj.js → AppDetail-B6PtMl8J.js} +1 -1
- package/dist/assets/{AppNotConnected-CcmXbFtD.js → AppNotConnected-C_tGn786.js} +1 -1
- package/dist/assets/{ApprovalCard-uT_9D_uH.js → ApprovalCard-DrfZAdGQ.js} +1 -1
- package/dist/assets/{ApprovalDetail-CE41WFbd.js → ApprovalDetail-sfPpfdXc.js} +1 -1
- package/dist/assets/{ApprovalPayload-_zU9bukt.js → ApprovalPayload-C4F3ItGH.js} +1 -1
- package/dist/assets/{Approvals-BXrjqpKc.js → Approvals-DZoMl7_m.js} +1 -1
- package/dist/assets/{AppsConnect-DH7aSjtS.js → AppsConnect-D8Gu187f.js} +1 -1
- package/dist/assets/{AppsReview-C0Y3SxmZ.js → AppsReview-DokFETm0.js} +1 -1
- package/dist/assets/{ArtifactCard-DKUUBZ0K.js → ArtifactCard-BTf2-JIV.js} +1 -1
- package/dist/assets/{Artifacts-Bsv5m0aU.js → Artifacts-CK8FaygC.js} +1 -1
- package/dist/assets/{AssistantConnection-Dm2PaSeU.js → AssistantConnection-BlKC7jk0.js} +1 -1
- package/dist/assets/{AttentionInteractionResolver-CBjNuhYo.js → AttentionInteractionResolver-C2iz6oqT.js} +1 -1
- package/dist/assets/{AuditHub-DbUni0O_.js → AuditHub-DMhunMn8.js} +1 -1
- package/dist/assets/{BoardChat-CgzCuFIL.js → BoardChat-C4W8JLKB.js} +1 -1
- package/dist/assets/{BootstrapSetupUxLab-D-niQCV5.js → BootstrapSetupUxLab-D58OwniR.js} +1 -1
- package/dist/assets/{Browse-0bmB5mqw.js → Browse-BDjohBak.js} +1 -1
- package/dist/assets/{BudgetPolicyCard-CqFUHqOj.js → BudgetPolicyCard-DfAAgk9Z.js} +1 -1
- package/dist/assets/{CaseDetail-DakrB2jI.js → CaseDetail-CL0FC5sG.js} +1 -1
- package/dist/assets/{Cases-DXbr4HJt.js → Cases-C-7dXrEt.js} +1 -1
- package/dist/assets/{ChatEndpointDetail-BdDKo-Gq.js → ChatEndpointDetail-C-IYAYG8.js} +1 -1
- package/dist/assets/{ChatEndpointSetup-BX3iDH7N.js → ChatEndpointSetup-CM3QixMj.js} +1 -1
- package/dist/assets/{ChoiceControls-Bu-fd6qI.js → ChoiceControls-3Qpci4yE.js} +1 -1
- package/dist/assets/{Companies-FcUNLIkt.js → Companies-97toQ8Cw.js} +1 -1
- package/dist/assets/{CompanyAccess-BUcTNg7_.js → CompanyAccess-CKhS1BaS.js} +1 -1
- package/dist/assets/{CompanyActivity-ScpRBz1G.js → CompanyActivity-DzNrAyAb.js} +1 -1
- package/dist/assets/{CompanyConnections-DMEwbZv7.js → CompanyConnections-ORCH4i3U.js} +1 -1
- package/dist/assets/{CompanyEnvironments-EqXhVruZ.js → CompanyEnvironments-DphURbtb.js} +1 -1
- package/dist/assets/{CompanyExport-DQ9ffuua.js → CompanyExport-XeVCUcK3.js} +1 -1
- package/dist/assets/{CompanyImport-BhuZu4oc.js → CompanyImport-DPKpUaRa.js} +1 -1
- package/dist/assets/{CompanySettings-BSkg4ahA.js → CompanySettings-4JQpzuS1.js} +1 -1
- package/dist/assets/{CompanySettingsPluginPage-BzZkZqh-.js → CompanySettingsPluginPage-cVvXh0_G.js} +1 -1
- package/dist/assets/{CompanySkills-BbA4RKIw.js → CompanySkills-BA_9Ztwj.js} +1 -1
- package/dist/assets/{ComposerAddMenu-D9z2INup.js → ComposerAddMenu-DNp4ecG8.js} +1 -1
- package/dist/assets/{ConfigureBuiltInAgentModal-BUJPbmWc.js → ConfigureBuiltInAgentModal-CQCHDkl4.js} +1 -1
- package/dist/assets/{ConnectionSetupFlow-DKjP5RBZ.js → ConnectionSetupFlow-BaarToKu.js} +1 -1
- package/dist/assets/{CopyableGatewayUrl-BZyE_jT9.js → CopyableGatewayUrl-DxQsV7Hr.js} +1 -1
- package/dist/assets/{Dashboard--lTwxjV-.js → Dashboard--iaPJqJp.js} +1 -1
- package/dist/assets/{DashboardLive-BYyTgF5d.js → DashboardLive-4rGeotay.js} +1 -1
- package/dist/assets/{DecisionDateChips-vXwAFdua.js → DecisionDateChips-CJOLtNrJ.js} +1 -1
- package/dist/assets/{DecisionModelSettings-NrNERkaW.js → DecisionModelSettings-D-OxKIGP.js} +1 -1
- package/dist/assets/{DecisionQueuePage-BaaKuZBi.js → DecisionQueuePage-D-kNFav_.js} +1 -1
- package/dist/assets/{DesignGuide-DS6MuXWY.js → DesignGuide-D7486q4b.js} +1 -1
- package/dist/assets/{DocumentFrameHeader-DTSqcw4Q.js → DocumentFrameHeader-B61HhahB.js} +1 -1
- package/dist/assets/{EmailEndpointSetup-CJFYu2G0.js → EmailEndpointSetup-6OHb9B4q.js} +1 -1
- package/dist/assets/{ExecutionWorkspaceDetail-CuD5xWOB.js → ExecutionWorkspaceDetail-BGV-9D5Y.js} +1 -1
- package/dist/assets/{FolderControls-B7TWghGc.js → FolderControls-L2RzbfdQ.js} +1 -1
- package/dist/assets/{GatewayDetail-xNVOxSIs.js → GatewayDetail-CdXNQ9gD.js} +1 -1
- package/dist/assets/{GatewaysList-DsSKLm1h.js → GatewaysList-B0Jq1IRC.js} +1 -1
- package/dist/assets/{GoalDetail-oN5pyUUY.js → GoalDetail-D2VhPtvw.js} +1 -1
- package/dist/assets/{GoalTree-DaFizciF.js → GoalTree-kFpgH4dA.js} +1 -1
- package/dist/assets/{Goals-xgGKfQZi.js → Goals-B-_gq_Qu.js} +1 -1
- package/dist/assets/{ImageGalleryModal-CjHED0Lb.js → ImageGalleryModal-DzKBMOnu.js} +1 -1
- package/dist/assets/{Inbox-wHhHozfr.js → Inbox-zllmqRcB.js} +1 -1
- package/dist/assets/{InstanceAdvanced-Bdf2a4c_.js → InstanceAdvanced-B7tDfjwG.js} +1 -1
- package/dist/assets/{InviteLanding-McBYpNeW.js → InviteLanding-brwa_8NC.js} +1 -1
- package/dist/assets/{IssueChatLongThreadPerf-DD3RLbBo.js → IssueChatLongThreadPerf-D0HJe6IV.js} +1 -1
- package/dist/assets/{IssueChatThread-BN-_8hT8.js → IssueChatThread-CMXzuvrF.js} +1 -1
- package/dist/assets/{IssueDetail-CsaD311l.js → IssueDetail-DGdg-mB8.js} +1 -1
- package/dist/assets/{IssueDocumentAnnotations-BVdH4RTa.js → IssueDocumentAnnotations-BK-LgExc.js} +1 -1
- package/dist/assets/{IssueOutputSection-CDIMRaF0.js → IssueOutputSection-aSyiE1pg.js} +1 -1
- package/dist/assets/{IssueRecoveryActionCard-C9qJAHes.js → IssueRecoveryActionCard-vAuL_OEC.js} +1 -1
- package/dist/assets/{IssueThreadInteractionCard-BbigJB2U.js → IssueThreadInteractionCard-wFidFTIh.js} +1 -1
- package/dist/assets/{Issues-BWoc80Y9.js → Issues-CsmM33z_.js} +1 -1
- package/dist/assets/{LiveNowTodoLine-B9oTH2L0.js → LiveNowTodoLine-CP32NNp_.js} +1 -1
- package/dist/assets/{ManagedAiConnectionDetails-B0aWUPkf.js → ManagedAiConnectionDetails-Ba0awZ-O.js} +1 -1
- package/dist/assets/{McpConnect-Dzf7W2K6.js → McpConnect-CYLP1yLX.js} +1 -1
- package/dist/assets/{MembershipAction-oiLtxQm3.js → MembershipAction-CKs7Ua9x.js} +1 -1
- package/dist/assets/{ModelsAndProviders-BEb4Z38S.js → ModelsAndProviders-gaR7HDQm.js} +1 -1
- package/dist/assets/{NewAgent-C3MxIRJj.js → NewAgent-DBQzvxIr.js} +1 -1
- package/dist/assets/{OmpAllSettings-DBtL1qDL.js → OmpAllSettings-B_Knr51Z.js} +1 -1
- package/dist/assets/{PipelineSettings-BcAtsehE.js → PipelineSettings-Dl-94FB5.js} +1 -1
- package/dist/assets/{Pipelines-CkiYUQS-.js → Pipelines-CY9hGe0h.js} +1 -1
- package/dist/assets/{PixelsOffice-BSlctoug.js → PixelsOffice-BgyGZsiV.js} +1 -1
- package/dist/assets/{PluginPage-C6Qnf9ka.js → PluginPage-CMA4Ei50.js} +1 -1
- package/dist/assets/{PluginSettings-Do37r6Zu.js → PluginSettings-Cm4H1JRT.js} +1 -1
- package/dist/assets/{ProfileDetailRoute-DRFQNId6.js → ProfileDetailRoute-BEBctbC6.js} +1 -1
- package/dist/assets/{ProfileSettings-BMwLBQDB.js → ProfileSettings-Djo7BLIj.js} +1 -1
- package/dist/assets/{ProfileWizardRoute-XnnvzH9S.js → ProfileWizardRoute-DxLujEtD.js} +1 -1
- package/dist/assets/{ProjectDetail-BW6Lr4Iq.js → ProjectDetail-CmmdvUHn.js} +1 -1
- package/dist/assets/{ProjectWorkspaceDetail-DR4JCa1b.js → ProjectWorkspaceDetail-BsA0hJ-k.js} +1 -1
- package/dist/assets/{ProjectWorkspacesContent-CadPZn0k.js → ProjectWorkspacesContent-BNNI_WAk.js} +1 -1
- package/dist/assets/{Projects-DLBFbxcj.js → Projects-BTAauZr0.js} +1 -1
- package/dist/assets/{PublicIssueSharePage-C9yRZOdP.js → PublicIssueSharePage-DdPjfmD9.js} +1 -1
- package/dist/assets/{ReviewQueueCard-CIkiY-Lm.js → ReviewQueueCard-BC6VY8Bc.js} +1 -1
- package/dist/assets/{RichWorkProductCard-JGHGU_RI.js → RichWorkProductCard-ClpMt_Bh.js} +1 -1
- package/dist/assets/{RoutineDetail-izWzADvA.js → RoutineDetail-BT6_GKnC.js} +1 -1
- package/dist/assets/{RoutineRunVariablesDialog-DiT_o5Dm.js → RoutineRunVariablesDialog-D_Mls1sV.js} +1 -1
- package/dist/assets/{Routines-CHtabiYj.js → Routines-4LevOfvV.js} +1 -1
- package/dist/assets/{ScrollToBottom-pyHLjOjY.js → ScrollToBottom-jItsgDR8.js} +1 -1
- package/dist/assets/{Search-yNNB6kys.js → Search-bmcm0_m_.js} +1 -1
- package/dist/assets/{Secrets-BOyOk5BF.js → Secrets-DfR1fBAZ.js} +1 -1
- package/dist/assets/{SkillSourceTree-M58QwBFF.js → SkillSourceTree--FWKWyF3.js} +1 -1
- package/dist/assets/{SkillSources-Cw4PU-Bz.js → SkillSources-jUDjqy5i.js} +1 -1
- package/dist/assets/{SkillStudio-Cj_M3ZJa.js → SkillStudio-BsqtUnzF.js} +1 -1
- package/dist/assets/{SourceTrustBadge-BZBQe5No.js → SourceTrustBadge-CfBrvKL3.js} +1 -1
- package/dist/assets/{StatusCards-DaJdQUN5.js → StatusCards-Dt3zorUZ.js} +1 -1
- package/dist/assets/{SummarySlotCard-DlSmN6PL.js → SummarySlotCard-D1C0qH2L.js} +1 -1
- package/dist/assets/{TaskChatLab-CU5eA7nX.js → TaskChatLab-B0coUvdp.js} +1 -1
- package/dist/assets/{TaskChatMarker-wBVUFL3u.js → TaskChatMarker-C40twVjh.js} +1 -1
- package/dist/assets/{TaskChatProtocolCard-D-Dwy2EL.js → TaskChatProtocolCard--bi_tc6i.js} +1 -1
- package/dist/assets/{TaskChatThreadView-Crlf9I05.js → TaskChatThreadView-DkzFDrLW.js} +1 -1
- package/dist/assets/{TaskDetailRelationsPanel-CkktN1EC.js → TaskDetailRelationsPanel-DZGkinoJ.js} +1 -1
- package/dist/assets/{TaskTreeControls-B_ulMOi1.js → TaskTreeControls-DznugVpi.js} +1 -1
- package/dist/assets/Terminal-NjEb5-2b.js +1 -0
- package/dist/assets/TerminalView-DZxK2Ei5.js +58 -0
- package/dist/assets/{TrustPresetSection-DTc1Rj4q.js → TrustPresetSection-CjNwNBo3.js} +1 -1
- package/dist/assets/{UserProfile-C6q55R0Q.js → UserProfile-Dujv3qdz.js} +1 -1
- package/dist/assets/{WhatNeedsMe-1igJA4gL.js → WhatNeedsMe-C9P2EsqQ.js} +1 -1
- package/dist/assets/{Workspaces-rtQKliW0.js → Workspaces-BTgSx9nA.js} +1 -1
- package/dist/assets/{connection-owner-CZwxTEuM.js → connection-owner-DL4yKhSt.js} +1 -1
- package/dist/assets/dist-ypeTPGg_.js +1 -0
- package/dist/assets/dropdown-menu-DEO3mF_E.js +1 -0
- package/dist/assets/{environment-variables-editor-CCxeFKKk.js → environment-variables-editor-0qgSPgNN.js} +1 -1
- package/dist/assets/{index-DDoARkPG.js → index-3AxqhPET.js} +4 -4
- package/dist/assets/index-B5bd7Tk6.css +2 -0
- package/dist/assets/{issue-properties-lmRBaUTG.js → issue-properties-B1cYnBDU.js} +1 -1
- package/dist/assets/{issue-workspace-selection-4JI2Uh9p.js → issue-workspace-selection-S8UgGgK1.js} +1 -1
- package/dist/assets/{pipeline-stage-presentation-BSuBql6K.js → pipeline-stage-presentation-5UBw7nsb.js} +1 -1
- package/dist/assets/{shared-DDwmHbeD.js → shared-4LF6wQ38.js} +1 -1
- package/dist/assets/{tool-taxonomy-DR7Q8sVs.js → tool-taxonomy-B5zpbkHA.js} +1 -1
- package/dist/assets/{transcript-adapter-wiFIjKfq.js → transcript-adapter-C29ZJiU2.js} +1 -1
- package/dist/assets/{useSummaryDraftStream-CWOQt25o.js → useSummaryDraftStream-R2Y2bAUU.js} +1 -1
- package/dist/index.html +7 -6
- package/dist/sw.js +1 -1
- package/package.json +1 -1
- package/dist/assets/Terminal-Bo-WuezO.js +0 -1
- package/dist/assets/TerminalView-AkFY5bLC.js +0 -58
- package/dist/assets/dropdown-menu-CqRAF7Oj.js +0 -1
- package/dist/assets/index-KZ2bEg2H.css +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var ae=Object.defineProperty;var o=(e,a)=>ae(e,"name",{value:a,configurable:!0});import{i as E}from"./rolldown-runtime-ZpX3ckPj.js";import{l as m,na as ne,t as S,ta as se}from"./createLucideIcon-DJi9suAC.js";import{i as re}from"./star-BZgQbzhV.js";import{_t as B,an as ie,at as le,ot as H,t as w,tt as oe,vt as $}from"./router-2UfGeejU.js";import{t as I}from"./bot-C9arfJWx.js";import{t as ce}from"./check-Ctsrlfa-.js";import{t as de}from"./chevron-down-BCvxsWfI.js";import{t as _}from"./chevron-right-s7L6hXXq.js";import{a as j,n as D,r as ue,t as L}from"./tool-taxonomy-DR7Q8sVs.js";import{t as pe}from"./circle-dot-zr8GONq2.js";import{t as z}from"./circle-IAHLDvLO.js";import{o as fe,t as T}from"./MarkdownBody-BTjuUgFa.js";import{t as W}from"./external-link-nl1b263c.js";import{t as he}from"./file-pen-line-DX6PZQXR.js";import{t as F}from"./file-text-Cw7ntqRx.js";import{t as me}from"./flag-R0AVTKGk.js";import{t as xe}from"./info-DXpx_HA2.js";import{t as ge}from"./key-round-0RqEOB_C.js";import{r as be,t as v}from"./button-CMwV3L1P.js";import{t as ve}from"./octagon-x-CBcXy1zJ.js";import{r as ke}from"./TaskChatProtocolCard-D-Dwy2EL.js";import{t as N}from"./search-04O7m-IF.js";import{t as we}from"./shield-check-B0HVjzM_.js";import{t as je}from"./square-B2aH51tE.js";import{t as ye}from"./triangle-alert-CBVKiaXB.js";import{t as k}from"./users-DyKzwIh4.js";import{t as Le}from"./x-DRDFdlYE.js";import{n as Ne}from"./presentation-mode-Bk6TnKr9.js";import{Ba as Ce,Ga as Se,Ha as O,Ma as _e,ya as Te}from"./index-DDoARkPG.js";var U={name:"file-check-corner",size:24,node:[["path",{d:"M10.5 22H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v6",key:"g5mvt7"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m14 20 2 2 4-4",key:"15kota"}]],aliases:["file-check-2"]};U.node;var P=S(U),q={name:"folder-kanban",size:24,node:[["path",{d:"M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.93a2 2 0 0 1-1.66-.9l-.82-1.2A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2Z",key:"1fr9dc"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M12 10v2",key:"hh53o1"}],["path",{d:"M16 10v6",key:"1d6xys"}]]};q.node;var Re=S(q),V={name:"gauge",size:24,node:[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]]};V.node;var R=S(V),h=E(ne(),1),Ae=(0,h.createContext)(null);function Pt(e){const[a,n]=(0,h.useState)(()=>({issueId:e,memory:new Map}));if(a.issueId===e)return a.memory;const s={issueId:e,memory:new Map};return n(s),s.memory}o(Pt,"useIssueExpansionMemory");function A(e,a){const n=(0,h.useContext)(Ae),[s,c]=(0,h.useState)(()=>n?.get(e));return[s??n?.get(e)??a,(0,h.useCallback)(u=>{c(r=>{const p=r??n?.get(e)??a,d=typeof u=="function"?u(p):u;return n?.set(e,d),d})},[e,n,a])]}o(A,"useTaskChatExpansion");var t=E(se(),1);function $e({item:e}){const{used:a,size:n,inputTokens:s,outputTokens:c,costUsd:u}=e.usage,r=typeof n=="number"&&n>0?n:null,p=r?Math.min(100,Math.round(a/r*100)):0;return(0,t.jsxs)("div",{className:"flex flex-col gap-1 px-1 py-1 text-(length:--text-micro) text-ink-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(R,{className:"h-3 w-3"}),e.label?(0,t.jsx)("span",{className:"font-medium",children:e.label}):null,r?(0,t.jsxs)("span",{children:[a.toLocaleString(),"/",r.toLocaleString()," ctx (",p,"%)"]}):null,s!=null||c!=null?(0,t.jsxs)("span",{children:["· ↑",(s??0).toLocaleString()," ↓",(c??0).toLocaleString()]}):null,u!=null?(0,t.jsxs)("span",{children:["· $",u.toFixed(4)]}):null]}),e.detail?(0,t.jsx)("div",{children:e.detail}):null,r?(0,t.jsx)("div",{className:"h-1 w-full overflow-hidden rounded-full bg-line",children:(0,t.jsx)("div",{className:m("h-full rounded-full bg-(--status-agent-running)"),style:{width:`${p}%`}})}):null]})}o($e,"TaskChatUsageReadout");function G(e){const a=e.details.find(n=>n.label==="Severity")?.value;return e.status==="failed"||a==="error"?"error":a==="info"?"info":"warning"}o(G,"providerNoticeSeverity");function x(e,...a){return e.details.find(n=>a.includes(n.label))?.value}o(x,"providerDetail");function C(e){if(!(!e||D(e)||/^tool(?:\s+|_)call\b/i.test(e)))return e}o(C,"meaningfulToolDetail");function Ie(e){const a=e.summary??x(e,"Query","URL","Target","Name","Reference","Reason","Summary");switch(e.family){case"research":{const n=x(e,"Action")?.toLowerCase();return n==="open_page"?{icon:N,runningLabel:"Opening a web page",completedLabel:"Opened a web page",failedLabel:"Couldn’t open the web page",interruptedLabel:"Stopped opening the web page",detail:a}:n==="find_in_page"?{icon:N,runningLabel:"Searching the page",completedLabel:"Searched the page",failedLabel:"Page search failed",interruptedLabel:"Page search stopped",detail:a}:{icon:N,runningLabel:"Searching the web",completedLabel:"Searched the web",failedLabel:"Web search failed",interruptedLabel:"Web search stopped",detail:a}}case"tool_execution":{const n=x(e,"Name"),s=x(e,"Target"),c=x(e,"Progress"),u=j({name:n,transport:x(e,"Transport"),namespace:x(e,"Namespace"),operation:x(e,"Operation"),target:s,progress:c}),r=C(e.summary)??C(c)??C(s),p=!!(r&&n&&L(r)===L(n)),d=n?ue(n)?.name??n:u.displayName,i=u.sourceLabel?`${u.sourceLabel} · ${d}`:n&&!D(n)&&L(n)!==u.runningLabel.replace(/^Running /,"")?n:void 0;return{icon:u.icon,runningLabel:u.runningLabel,completedLabel:u.completedLabel,failedLabel:u.failedLabel,interruptedLabel:u.interruptedLabel,detail:[p?void 0:r,i].filter(Boolean).join(" · ")||void 0}}case"plan":return{icon:_e,runningLabel:"Updating the plan",completedLabel:"Updated the plan",failedLabel:"Plan update failed",interruptedLabel:"Plan update stopped",detail:a};case"delegation":{const n=x(e,"Action")?.toLowerCase();return n==="message"?{icon:k,runningLabel:"Messaging a subagent",completedLabel:"Messaged a subagent",failedLabel:"Subagent message failed",interruptedLabel:"Subagent message stopped",detail:a}:n==="resume"?{icon:k,runningLabel:"Resuming a subagent",completedLabel:"Resumed a subagent",failedLabel:"Couldn’t resume the subagent",interruptedLabel:"Subagent resume stopped",detail:a}:n==="close"?{icon:k,runningLabel:"Closing a subagent",completedLabel:"Closed a subagent",failedLabel:"Couldn’t close the subagent",interruptedLabel:"Subagent close stopped",detail:a}:n==="wait"?{icon:k,runningLabel:"Waiting for subagents",completedLabel:"Finished waiting for subagents",failedLabel:"Subagent wait failed",interruptedLabel:"Stopped waiting for subagents",detail:a}:{icon:k,runningLabel:"Starting a subagent",completedLabel:"Started a subagent",failedLabel:"Subagent start failed",interruptedLabel:"Subagent start stopped",detail:a}}case"model_identity":return e.eventType==="model.route.changed"?{icon:I,runningLabel:"Switching models",completedLabel:"Switched models",failedLabel:"Model switch failed",interruptedLabel:"Model switch stopped",detail:a}:{icon:I,runningLabel:"Verifying the model",completedLabel:"Verified the model",failedLabel:"Model verification failed",interruptedLabel:"Model verification stopped",detail:a};case"context":return{icon:re,runningLabel:"Compacting context",completedLabel:"Compacted context",failedLabel:"Context compaction failed",interruptedLabel:"Context compaction stopped",detail:a};case"artifact":return e.eventType==="artifact.viewed"?{icon:$,runningLabel:"Viewing an artifact",completedLabel:"Viewed an artifact",failedLabel:"Couldn’t view the artifact",interruptedLabel:"Artifact view stopped",detail:a}:{icon:$,runningLabel:"Generating an artifact",completedLabel:"Generated an artifact",failedLabel:"Artifact generation failed",interruptedLabel:"Artifact generation stopped",detail:a};case"review":return x(e,"State")?.toLowerCase()==="exited"?{icon:P,runningLabel:"Leaving review mode",completedLabel:"Left review mode",failedLabel:"Couldn’t leave review mode",interruptedLabel:"Review-mode change stopped",detail:a}:{icon:P,runningLabel:"Entering review mode",completedLabel:"Entered review mode",failedLabel:"Couldn’t enter review mode",interruptedLabel:"Review-mode change stopped",detail:a};case"hook":return{icon:H,runningLabel:"Running a hook",completedLabel:"Ran a hook",failedLabel:"Hook failed",interruptedLabel:"Hook stopped",detail:a};case"memory":return{icon:Se,runningLabel:"Checking memory",completedLabel:"Referenced memory",failedLabel:"Memory lookup failed",interruptedLabel:"Memory lookup stopped",detail:a};case"safety":return{icon:we,runningLabel:"Reviewing safety",completedLabel:"Reviewed safety",failedLabel:"Safety review failed",interruptedLabel:"Safety review stopped",detail:a};case"terminal":return{icon:Te,runningLabel:"Sending terminal input",completedLabel:"Sent terminal input",failedLabel:"Terminal input failed",interruptedLabel:"Terminal input stopped",detail:a};case"wait":return{icon:Ce,runningLabel:"Waiting",completedLabel:"Finished waiting",failedLabel:"Wait failed",interruptedLabel:"Wait stopped",detail:a};case"provider_notice":return{icon:G(e)==="info"?xe:ye,runningLabel:"Provider notice",completedLabel:"Provider notice",failedLabel:"Provider error",interruptedLabel:"Provider notice",detail:a}}}o(Ie,"providerActivityPresentation");function ze(e){const a=e.totals.files||e.files.length,n=a>0?`${a} ${a===1?"file":"files"}`:void 0;return{icon:he,runningLabel:"Editing files",completedLabel:"Edited files",detail:n}}o(ze,"workspaceChangePresentation");function Pe(e){return{icon:F,runningLabel:"Referencing a file",completedLabel:"Referenced a file",detail:e.line==null?e.path:`${e.path}:${e.line}`}}o(Pe,"workspaceFilePresentation");function Me(e){return{icon:e.resourceKind==="document"?F:ke,runningLabel:"Saving a resource",completedLabel:e.resourceKind==="document"?"Added a document":"Added a deliverable",detail:e.title}}o(Me,"resourcePresentation");function K(e){switch(e.surface){case"provider_activity":return Ie(e);case"workspace_change":return ze(e);case"workspace_file":return Pe(e);case"resource":return Me(e);case"runtime_request":case"run_result":case"run_terminal":return null}}o(K,"protocolActivityPresentation");function X(e){return e.surface==="provider_activity"?e.status==="running":e.surface==="workspace_change"?!e.complete:!1}o(X,"protocolActivityIsRunning");function Ee(e,a){return e.surface!=="provider_activity"?X(e)?a.runningLabel:a.completedLabel:e.status==="failed"?a.failedLabel??`${a.completedLabel} · failed`:e.status==="interrupted"?a.interruptedLabel??`${a.completedLabel} · interrupted`:e.status==="running"?a.runningLabel:a.completedLabel}o(Ee,"protocolActivityLabel");var Be={terminal:"Ran commands",grep:"Searched files",search:"Searched files",read:"Read files",edit:"Edited files",web:"Searched the web",plan:"Worked on a plan",question:"Requested input",agent:"Worked with agents",safety:"Reviewed safety",image:"Worked with images",wait:"Waited",mcp:"Used connected tools",other:"Used tools"};function He(e){const a=new Map,n=o((i,l,f=0)=>{const g=a.get(i);(!g||f<g.order)&&a.set(i,{label:i,icon:l,order:f})},"add"),s=[],c=[];for(const[i,l]of e.entries())if(l.kind==="tool"){const f=j({name:l.rawName??l.name,target:l.target});s.push({...f,order:i,completed:l.status==="completed"})}else if(l.kind==="protocol")if(l.surface==="provider_activity"&&l.family==="tool_execution"){const f=o(b=>l.details.find(y=>y.label===b)?.value,"value"),g=j({name:f("Name"),operation:f("Operation"),transport:f("Transport"),namespace:f("Namespace"),target:f("Target")});s.push({...g,order:i,completed:l.status==="completed"})}else{const f=K(l);if(!f)continue;if(l.surface==="provider_activity"&&l.family==="provider_notice"){const g=l.summary?.trim()||l.details.find(b=>b.label==="Summary")?.value.trim();c.push({summary:g,severity:G(l),icon:f.icon,order:i});continue}n({research:"Searched the web",plan:"Worked on a plan",delegation:"Worked with agents",artifact:"Worked with artifacts",context:"Managed context",memory:"Checked memory",model_identity:"Checked model settings",review:"Worked in review mode",hook:"Ran hooks",safety:"Reviewed safety",terminal:"Ran commands",wait:"Waited",workspace_change:"Worked on files",workspace_file:"Referenced files",resource:"Added resources"}[l.surface==="provider_activity"?l.family:l.surface]??"Used tools",f.icon,i)}if(c.length){const i=c.find(l=>l.severity==="error")??c.find(l=>l.severity==="warning")??c[0];n(c.length===1?i.summary||"Received a provider update":i.severity==="error"?"Provider error reported":i.severity==="warning"?"Provider warning reported":"Received provider updates",i.icon,i.severity==="info"?c[0].order:-1)}const u=new Set(s.filter(i=>i.completed).map(i=>i.family));for(const i of s){const l=u.has(i.family);n(i.family==="read"&&!l?"Checked files":i.family==="edit"&&!l?"Worked on files":Be[i.family],i.icon,i.order)}a.size||(e.some(i=>i.kind==="thinking")?n("Thought through the task",B):e.some(i=>i.kind==="marker")?n("Activity stopped",O):n("Recorded usage",R));const r=[...a.values()].sort((i,l)=>i.order-l.order),p=o(i=>i.map((l,f)=>f?l.charAt(0).toLowerCase()+l.slice(1):l).join(", "),"join"),d=p(r.map(i=>i.label));return{label:r.length>3?`${p(r.slice(0,2).map(i=>i.label))}, and more`:d,fullLabel:d,icon:r.length===1?r[0].icon:oe}}o(He,"completedActivitySummary");var M=5,De=8;function We(e,a=!1){return a&&(e==="blocked"||e==="failed")?(0,t.jsx)(z,{className:"h-3 w-3 text-ink-3","aria-hidden":!0}):e==="in_progress"?(0,t.jsx)(be,{className:"h-3 w-3 animate-spin text-(--status-agent-running)","aria-hidden":!0}):e==="completed"?(0,t.jsx)(ce,{className:"h-3 w-3 text-(--status-task-icon-done)","aria-hidden":!0}):e==="blocked"||e==="failed"?(0,t.jsx)(Le,{className:"h-3 w-3 text-bad","aria-hidden":!0}):(0,t.jsx)(z,{className:"h-3 w-3 text-ink-3","aria-hidden":!0})}o(We,"stepStatusIcon");function Q({details:e}){return e.length===0?null:(0,t.jsx)("dl",{className:"flex min-w-0 flex-col gap-1.5","data-testid":"task-chat-provider-detail-list",children:e.map(a=>(0,t.jsxs)("div",{className:"grid min-w-0 grid-cols-1 gap-0.5 sm:grid-cols-(--gtc-task-chat-details) sm:gap-3",children:[(0,t.jsx)("dt",{className:"text-ink-3",children:a.label}),(0,t.jsx)("dd",{className:m("min-w-0 break-words text-ink",a.mono&&"font-mono"),children:a.value})]},`${a.label}:${a.value}`))})}o(Q,"DetailList");function Fe(e){try{return new URL(e).hostname.replace(/^www\./,"")}catch{return e}}o(Fe,"sourceHostname");function Oe({item:e}){const[a,n]=(0,h.useState)(!1),s=e.details.find(p=>p.label.toLowerCase()==="query"),c=e.details.filter(p=>!["action","query","status"].includes(p.label.toLowerCase())),u=a?e.links:e.links.slice(0,M),r=e.links.length-u.length;return(0,t.jsxs)("div",{className:"flex min-w-0 flex-col gap-2.5",children:[s?(0,t.jsxs)("div",{className:"min-w-0 rounded-sm bg-bg-3/40 px-2.5 py-2","data-testid":"task-chat-research-query",children:[(0,t.jsx)("p",{className:"text-(length:--text-nano) font-medium uppercase tracking-wide text-ink-3",children:"Query"}),(0,t.jsx)("p",{className:"mt-0.5 min-w-0 break-words font-mono text-(length:--text-micro) text-ink",children:s.value})]}):null,e.links.length>0?(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsxs)("p",{className:"mb-1 text-(length:--text-nano) font-medium uppercase tracking-wide text-ink-3",children:[e.links.length," ",e.links.length===1?"result":"results"]}),(0,t.jsx)("ol",{className:"divide-y divide-line/60","aria-label":"Research sources",children:u.map((p,d)=>(0,t.jsxs)("li",{className:"min-w-0 py-1.5 first:pt-0 last:pb-0",children:[(0,t.jsxs)("a",{className:"flex min-w-0 items-center gap-1 font-medium text-ink hover:underline",href:p.href,target:"_blank",rel:"noreferrer",children:[(0,t.jsx)("span",{className:"truncate",children:p.label}),(0,t.jsx)(W,{className:"h-3 w-3 shrink-0","aria-hidden":!0})]}),(0,t.jsxs)("p",{className:"mt-0.5 flex min-w-0 gap-2 text-ink-3",children:[(0,t.jsx)("span",{className:"shrink-0",children:Fe(p.href)}),p.description?(0,t.jsx)("span",{className:"min-w-0 truncate",children:p.description}):null]})]},`${p.href}:${d}`))}),r>0?(0,t.jsxs)("button",{type:"button",className:"mt-1.5 text-ink-3 hover:text-ink",onClick:o(()=>n(!0),"onClick"),children:["Show ",r," more ",r===1?"result":"results"]}):a&&e.links.length>M?(0,t.jsx)("button",{type:"button",className:"mt-1.5 text-ink-3 hover:text-ink",onClick:o(()=>n(!1),"onClick"),children:"Show fewer results"}):null]}):null,(0,t.jsx)(Q,{details:c}),e.output||e.outputTruncated?(0,t.jsx)("p",{className:"text-ink-3",children:"Additional provider output is available in Runner Inspector."}):null]})}o(Oe,"ResearchDetails");function Ue({item:e,neutral:a=!1}){return e.family==="research"?(0,t.jsx)(Oe,{item:e}):(0,t.jsxs)("div",{className:"flex min-w-0 flex-col gap-2",children:[e.steps.length>0?(0,t.jsx)("ol",{className:"flex flex-col gap-1","aria-label":"Plan steps",children:e.steps.map(n=>(0,t.jsxs)("li",{className:"flex min-w-0 items-start gap-2",children:[(0,t.jsx)("span",{className:"mt-0.5 shrink-0",children:We(n.status,a)}),(0,t.jsx)("span",{className:m("min-w-0",n.status==="completed"&&"text-ink-3 line-through"),children:n.label})]},n.id))}):null,e.links.length>0?(0,t.jsx)("ul",{className:"flex flex-col gap-1.5","aria-label":"Research sources",children:e.links.map(n=>(0,t.jsxs)("li",{children:[(0,t.jsxs)("a",{className:"inline-flex min-w-0 items-center gap-1 font-medium text-accent hover:underline",href:n.href,target:"_blank",rel:"noreferrer",children:[(0,t.jsx)("span",{className:"truncate",children:n.label}),(0,t.jsx)(W,{className:"h-3 w-3 shrink-0","aria-hidden":!0})]}),n.description?(0,t.jsx)("p",{className:"mt-0.5 text-ink-3",children:n.description}):null]},n.href))}):null,e.children.length>0?(0,t.jsx)("ul",{className:"flex flex-col gap-1.5","aria-label":"Delegated agents",children:e.children.map(n=>(0,t.jsxs)("li",{className:"flex min-w-0 flex-col gap-0.5",children:[(0,t.jsxs)("span",{className:"flex min-w-0 items-center gap-2",children:[(0,t.jsx)("span",{className:"font-medium text-ink",children:n.title}),(0,t.jsx)("span",{className:"capitalize text-ink-3",children:n.status}),n.metadata?(0,t.jsx)("span",{className:"min-w-0 truncate font-mono text-(length:--text-micro)",children:n.metadata}):null]}),n.summary?(0,t.jsx)("span",{className:"text-ink-3",children:n.summary}):null]},n.id))}):null,e.details.length>0?(0,t.jsx)(Q,{details:e.details}):null,e.output?(0,t.jsx)("pre",{className:"max-h-(--sz-64) overflow-auto whitespace-pre-wrap rounded-sm bg-bg-3/50 p-2 font-mono text-(length:--text-micro) text-ink",children:e.output}):null,e.outputTruncated?(0,t.jsx)("p",{className:"text-ink-3",children:"Output truncated to 8 KiB."}):null]})}o(Ue,"ProviderDetails");function qe({item:e}){if(e.files.length===0)return(0,t.jsx)("p",{className:"text-ink-3",children:"No changed-file details were reported."});const a=e.files.slice(0,De),n=e.files.length-a.length;return(0,t.jsxs)("div",{className:"min-w-0","data-testid":"task-chat-workspace-change-details",children:[(0,t.jsx)("ul",{className:"flex min-w-0 flex-col divide-y divide-line/60","aria-label":"Changed files",children:a.map(s=>(0,t.jsxs)("li",{className:"flex min-w-0 items-center gap-2 py-1.5 first:pt-0 last:pb-0",children:[(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-ink",title:s.previousPath?`${s.previousPath} → ${s.path}`:s.path,children:s.previousPath?`${s.previousPath} → ${s.path}`:s.path}),(0,t.jsx)("span",{className:"shrink-0 capitalize text-ink-3",children:s.operation.replaceAll("_"," ")}),s.additions!=null||s.deletions!=null?(0,t.jsxs)("span",{className:"shrink-0 font-mono text-(length:--text-micro) text-ink-3",children:[s.additions==null?"":`+${s.additions}`," ",s.deletions==null?"":`−${s.deletions}`]}):null]},`${s.operation}:${s.path}`))}),n>0?(0,t.jsxs)("p",{className:"mt-1.5 text-ink-3",children:[n," more ",n===1?"file":"files"," not shown"]}):null]})}o(qe,"WorkspaceChangeDetails");function Ve({item:e}){const a={path:e.path,resourceKind:"file",line:e.line,column:null,raw:e.path};return(0,t.jsxs)("div",{className:"flex min-w-0 flex-col gap-2",children:[(0,t.jsx)(fe,{workspaceFileRef:a,label:e.path}),e.preview?e.presentation==="document"?(0,t.jsx)("div",{className:"max-h-(--sz-64) overflow-auto rounded-sm bg-bg-3/30 p-2 text-ink",children:(0,t.jsx)(T,{children:e.preview})}):(0,t.jsx)("pre",{className:"max-h-(--sz-64) overflow-auto whitespace-pre-wrap rounded-sm bg-bg-3/50 p-2 font-mono text-(length:--text-micro) text-ink",children:e.preview}):(0,t.jsx)("p",{className:"text-ink-3",children:"Preview unavailable."}),e.previewTruncated?(0,t.jsx)("p",{className:"text-ink-3",children:"Preview truncated by the runner."}):null]})}o(Ve,"WorkspaceFileDetails");function Z(e,a=!1){switch(e.surface){case"provider_activity":return e.details.length>0||e.steps.length>0||e.links.length>0||e.children.length>0||e.output||e.outputTruncated?(0,t.jsx)(Ue,{item:e,neutral:a}):null;case"workspace_change":return(0,t.jsx)(qe,{item:e});case"workspace_file":return(0,t.jsx)(Ve,{item:e});case"resource":case"runtime_request":case"run_result":case"run_terminal":return null}}o(Z,"detailContent");function J(e){if(e)try{const a=new URL(e,"https://wardmote.invalid");return a.protocol==="https:"||a.protocol==="http:"?e:void 0}catch{return}}o(J,"safeActivityHref");function Ge(e){return e.surface==="resource"?!!J(e.href):Z(e)!==null||e.surface==="provider_activity"&&!!e.summary?.trim()}o(Ge,"hasTaskChatProtocolActivityDetails");function Ke({item:e,neutral:a=!1}){const n=Z(e,a);if(e.surface==="resource"){const s=J(e.href);return s?(0,t.jsx)("a",{href:s,className:"text-ink underline",children:e.title}):(0,t.jsx)("p",{children:e.title})}return(0,t.jsxs)(t.Fragment,{children:[e.surface==="provider_activity"&&e.summary?(0,t.jsx)("p",{className:"whitespace-pre-wrap break-words",children:e.summary}):null,n]})}o(Ke,"TaskChatProtocolActivityDetails");function Y(e,a){if(e.kind==="tool"){const d=j({name:e.rawName??e.name,target:e.target}),i=a&&(e.status==="pending"||e.status==="in_progress");return{icon:d.icon,label:e.status==="failed"?d.failedLabel:e.status==="interrupted"?d.interruptedLabel:i?d.runningLabel:d.completedLabel,target:e.target,mono:!0,running:i}}if(e.kind==="thinking"){const d=a&&!!e.streaming;return{icon:B,label:d?"Thinking":"Thought",target:e.lines.filter(i=>i.trim()).at(-1)?.trim(),mono:!1,running:d}}if(e.kind==="protocol"){const d=K(e);return d?{icon:d.icon,label:Ee(e,d),target:d.detail,mono:!0,running:a&&X(e)}:null}if(e.kind==="marker")return{icon:O,label:e.label,target:e.detail,mono:!1,running:!1};const{used:n,size:s,inputTokens:c,outputTokens:u,costUsd:r}=e.usage,p=[s>0?`${n.toLocaleString()}/${s.toLocaleString()} ctx`:void 0,c!=null||u!=null?`↑${(c??0).toLocaleString()} ↓${(u??0).toLocaleString()}`:void 0,r!=null?`$${r.toFixed(4)}`:void 0].filter(Boolean).join(" · ");return{icon:R,label:e.label??"Token usage",target:p||e.detail,mono:!1,running:!1}}o(Y,"presentation");function Xe({item:e,active:a}){const n=Y(e,a);if(!n)return null;const s=n.icon;return(0,t.jsxs)("span",{className:"flex min-w-0 flex-1 items-center gap-2","data-activity-row":e.id,"data-activity-family":e.kind==="protocol"?e.surface==="provider_activity"?e.family:e.surface:void 0,children:[(0,t.jsx)("span",{className:"flex size-5 shrink-0 items-center justify-center","data-activity-icon":!0,children:(0,t.jsx)(s,{className:"size-3.5","aria-hidden":"true"})}),(0,t.jsxs)("span",{className:"flex min-w-0 flex-1 items-center gap-2 overflow-hidden whitespace-nowrap",children:[(0,t.jsx)("span",{className:m("max-w-full shrink-0 truncate text-xs",n.running&&"text-ink"),children:n.label}),n.target?(0,t.jsx)("span",{title:n.target,className:m("truncate text-xs text-ink-3",n.mono&&"font-mono"),children:n.target}):null]})]})}o(Xe,"ActivityContent");function Qe({item:e}){return e.kind==="thinking"?(0,t.jsx)(T,{softBreaks:!0,children:e.lines.join(`
|
|
1
|
+
var ae=Object.defineProperty;var o=(e,a)=>ae(e,"name",{value:a,configurable:!0});import{i as E}from"./rolldown-runtime-ZpX3ckPj.js";import{l as m,na as ne,t as S,ta as se}from"./createLucideIcon-DJi9suAC.js";import{i as re}from"./star-BZgQbzhV.js";import{_t as B,an as ie,at as le,ot as H,t as w,tt as oe,vt as $}from"./router-2UfGeejU.js";import{t as I}from"./bot-C9arfJWx.js";import{t as ce}from"./check-Ctsrlfa-.js";import{t as de}from"./chevron-down-BCvxsWfI.js";import{t as _}from"./chevron-right-s7L6hXXq.js";import{a as j,n as D,r as ue,t as L}from"./tool-taxonomy-B5zpbkHA.js";import{t as pe}from"./circle-dot-zr8GONq2.js";import{t as z}from"./circle-IAHLDvLO.js";import{o as fe,t as T}from"./MarkdownBody-BTjuUgFa.js";import{t as W}from"./external-link-nl1b263c.js";import{t as he}from"./file-pen-line-DX6PZQXR.js";import{t as F}from"./file-text-Cw7ntqRx.js";import{t as me}from"./flag-R0AVTKGk.js";import{t as xe}from"./info-DXpx_HA2.js";import{t as ge}from"./key-round-0RqEOB_C.js";import{r as be,t as v}from"./button-CMwV3L1P.js";import{t as ve}from"./octagon-x-CBcXy1zJ.js";import{r as ke}from"./TaskChatProtocolCard--bi_tc6i.js";import{t as N}from"./search-04O7m-IF.js";import{t as we}from"./shield-check-B0HVjzM_.js";import{t as je}from"./square-B2aH51tE.js";import{t as ye}from"./triangle-alert-CBVKiaXB.js";import{t as k}from"./users-DyKzwIh4.js";import{t as Le}from"./x-DRDFdlYE.js";import{n as Ne}from"./presentation-mode-Bk6TnKr9.js";import{Ba as Ce,Ga as Se,Ha as O,Ma as _e,ya as Te}from"./index-3AxqhPET.js";var U={name:"file-check-corner",size:24,node:[["path",{d:"M10.5 22H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v6",key:"g5mvt7"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m14 20 2 2 4-4",key:"15kota"}]],aliases:["file-check-2"]};U.node;var P=S(U),q={name:"folder-kanban",size:24,node:[["path",{d:"M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.93a2 2 0 0 1-1.66-.9l-.82-1.2A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2Z",key:"1fr9dc"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M12 10v2",key:"hh53o1"}],["path",{d:"M16 10v6",key:"1d6xys"}]]};q.node;var Re=S(q),V={name:"gauge",size:24,node:[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]]};V.node;var R=S(V),h=E(ne(),1),Ae=(0,h.createContext)(null);function Pt(e){const[a,n]=(0,h.useState)(()=>({issueId:e,memory:new Map}));if(a.issueId===e)return a.memory;const s={issueId:e,memory:new Map};return n(s),s.memory}o(Pt,"useIssueExpansionMemory");function A(e,a){const n=(0,h.useContext)(Ae),[s,c]=(0,h.useState)(()=>n?.get(e));return[s??n?.get(e)??a,(0,h.useCallback)(u=>{c(r=>{const p=r??n?.get(e)??a,d=typeof u=="function"?u(p):u;return n?.set(e,d),d})},[e,n,a])]}o(A,"useTaskChatExpansion");var t=E(se(),1);function $e({item:e}){const{used:a,size:n,inputTokens:s,outputTokens:c,costUsd:u}=e.usage,r=typeof n=="number"&&n>0?n:null,p=r?Math.min(100,Math.round(a/r*100)):0;return(0,t.jsxs)("div",{className:"flex flex-col gap-1 px-1 py-1 text-(length:--text-micro) text-ink-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(R,{className:"h-3 w-3"}),e.label?(0,t.jsx)("span",{className:"font-medium",children:e.label}):null,r?(0,t.jsxs)("span",{children:[a.toLocaleString(),"/",r.toLocaleString()," ctx (",p,"%)"]}):null,s!=null||c!=null?(0,t.jsxs)("span",{children:["· ↑",(s??0).toLocaleString()," ↓",(c??0).toLocaleString()]}):null,u!=null?(0,t.jsxs)("span",{children:["· $",u.toFixed(4)]}):null]}),e.detail?(0,t.jsx)("div",{children:e.detail}):null,r?(0,t.jsx)("div",{className:"h-1 w-full overflow-hidden rounded-full bg-line",children:(0,t.jsx)("div",{className:m("h-full rounded-full bg-(--status-agent-running)"),style:{width:`${p}%`}})}):null]})}o($e,"TaskChatUsageReadout");function G(e){const a=e.details.find(n=>n.label==="Severity")?.value;return e.status==="failed"||a==="error"?"error":a==="info"?"info":"warning"}o(G,"providerNoticeSeverity");function x(e,...a){return e.details.find(n=>a.includes(n.label))?.value}o(x,"providerDetail");function C(e){if(!(!e||D(e)||/^tool(?:\s+|_)call\b/i.test(e)))return e}o(C,"meaningfulToolDetail");function Ie(e){const a=e.summary??x(e,"Query","URL","Target","Name","Reference","Reason","Summary");switch(e.family){case"research":{const n=x(e,"Action")?.toLowerCase();return n==="open_page"?{icon:N,runningLabel:"Opening a web page",completedLabel:"Opened a web page",failedLabel:"Couldn’t open the web page",interruptedLabel:"Stopped opening the web page",detail:a}:n==="find_in_page"?{icon:N,runningLabel:"Searching the page",completedLabel:"Searched the page",failedLabel:"Page search failed",interruptedLabel:"Page search stopped",detail:a}:{icon:N,runningLabel:"Searching the web",completedLabel:"Searched the web",failedLabel:"Web search failed",interruptedLabel:"Web search stopped",detail:a}}case"tool_execution":{const n=x(e,"Name"),s=x(e,"Target"),c=x(e,"Progress"),u=j({name:n,transport:x(e,"Transport"),namespace:x(e,"Namespace"),operation:x(e,"Operation"),target:s,progress:c}),r=C(e.summary)??C(c)??C(s),p=!!(r&&n&&L(r)===L(n)),d=n?ue(n)?.name??n:u.displayName,i=u.sourceLabel?`${u.sourceLabel} · ${d}`:n&&!D(n)&&L(n)!==u.runningLabel.replace(/^Running /,"")?n:void 0;return{icon:u.icon,runningLabel:u.runningLabel,completedLabel:u.completedLabel,failedLabel:u.failedLabel,interruptedLabel:u.interruptedLabel,detail:[p?void 0:r,i].filter(Boolean).join(" · ")||void 0}}case"plan":return{icon:_e,runningLabel:"Updating the plan",completedLabel:"Updated the plan",failedLabel:"Plan update failed",interruptedLabel:"Plan update stopped",detail:a};case"delegation":{const n=x(e,"Action")?.toLowerCase();return n==="message"?{icon:k,runningLabel:"Messaging a subagent",completedLabel:"Messaged a subagent",failedLabel:"Subagent message failed",interruptedLabel:"Subagent message stopped",detail:a}:n==="resume"?{icon:k,runningLabel:"Resuming a subagent",completedLabel:"Resumed a subagent",failedLabel:"Couldn’t resume the subagent",interruptedLabel:"Subagent resume stopped",detail:a}:n==="close"?{icon:k,runningLabel:"Closing a subagent",completedLabel:"Closed a subagent",failedLabel:"Couldn’t close the subagent",interruptedLabel:"Subagent close stopped",detail:a}:n==="wait"?{icon:k,runningLabel:"Waiting for subagents",completedLabel:"Finished waiting for subagents",failedLabel:"Subagent wait failed",interruptedLabel:"Stopped waiting for subagents",detail:a}:{icon:k,runningLabel:"Starting a subagent",completedLabel:"Started a subagent",failedLabel:"Subagent start failed",interruptedLabel:"Subagent start stopped",detail:a}}case"model_identity":return e.eventType==="model.route.changed"?{icon:I,runningLabel:"Switching models",completedLabel:"Switched models",failedLabel:"Model switch failed",interruptedLabel:"Model switch stopped",detail:a}:{icon:I,runningLabel:"Verifying the model",completedLabel:"Verified the model",failedLabel:"Model verification failed",interruptedLabel:"Model verification stopped",detail:a};case"context":return{icon:re,runningLabel:"Compacting context",completedLabel:"Compacted context",failedLabel:"Context compaction failed",interruptedLabel:"Context compaction stopped",detail:a};case"artifact":return e.eventType==="artifact.viewed"?{icon:$,runningLabel:"Viewing an artifact",completedLabel:"Viewed an artifact",failedLabel:"Couldn’t view the artifact",interruptedLabel:"Artifact view stopped",detail:a}:{icon:$,runningLabel:"Generating an artifact",completedLabel:"Generated an artifact",failedLabel:"Artifact generation failed",interruptedLabel:"Artifact generation stopped",detail:a};case"review":return x(e,"State")?.toLowerCase()==="exited"?{icon:P,runningLabel:"Leaving review mode",completedLabel:"Left review mode",failedLabel:"Couldn’t leave review mode",interruptedLabel:"Review-mode change stopped",detail:a}:{icon:P,runningLabel:"Entering review mode",completedLabel:"Entered review mode",failedLabel:"Couldn’t enter review mode",interruptedLabel:"Review-mode change stopped",detail:a};case"hook":return{icon:H,runningLabel:"Running a hook",completedLabel:"Ran a hook",failedLabel:"Hook failed",interruptedLabel:"Hook stopped",detail:a};case"memory":return{icon:Se,runningLabel:"Checking memory",completedLabel:"Referenced memory",failedLabel:"Memory lookup failed",interruptedLabel:"Memory lookup stopped",detail:a};case"safety":return{icon:we,runningLabel:"Reviewing safety",completedLabel:"Reviewed safety",failedLabel:"Safety review failed",interruptedLabel:"Safety review stopped",detail:a};case"terminal":return{icon:Te,runningLabel:"Sending terminal input",completedLabel:"Sent terminal input",failedLabel:"Terminal input failed",interruptedLabel:"Terminal input stopped",detail:a};case"wait":return{icon:Ce,runningLabel:"Waiting",completedLabel:"Finished waiting",failedLabel:"Wait failed",interruptedLabel:"Wait stopped",detail:a};case"provider_notice":return{icon:G(e)==="info"?xe:ye,runningLabel:"Provider notice",completedLabel:"Provider notice",failedLabel:"Provider error",interruptedLabel:"Provider notice",detail:a}}}o(Ie,"providerActivityPresentation");function ze(e){const a=e.totals.files||e.files.length,n=a>0?`${a} ${a===1?"file":"files"}`:void 0;return{icon:he,runningLabel:"Editing files",completedLabel:"Edited files",detail:n}}o(ze,"workspaceChangePresentation");function Pe(e){return{icon:F,runningLabel:"Referencing a file",completedLabel:"Referenced a file",detail:e.line==null?e.path:`${e.path}:${e.line}`}}o(Pe,"workspaceFilePresentation");function Me(e){return{icon:e.resourceKind==="document"?F:ke,runningLabel:"Saving a resource",completedLabel:e.resourceKind==="document"?"Added a document":"Added a deliverable",detail:e.title}}o(Me,"resourcePresentation");function K(e){switch(e.surface){case"provider_activity":return Ie(e);case"workspace_change":return ze(e);case"workspace_file":return Pe(e);case"resource":return Me(e);case"runtime_request":case"run_result":case"run_terminal":return null}}o(K,"protocolActivityPresentation");function X(e){return e.surface==="provider_activity"?e.status==="running":e.surface==="workspace_change"?!e.complete:!1}o(X,"protocolActivityIsRunning");function Ee(e,a){return e.surface!=="provider_activity"?X(e)?a.runningLabel:a.completedLabel:e.status==="failed"?a.failedLabel??`${a.completedLabel} · failed`:e.status==="interrupted"?a.interruptedLabel??`${a.completedLabel} · interrupted`:e.status==="running"?a.runningLabel:a.completedLabel}o(Ee,"protocolActivityLabel");var Be={terminal:"Ran commands",grep:"Searched files",search:"Searched files",read:"Read files",edit:"Edited files",web:"Searched the web",plan:"Worked on a plan",question:"Requested input",agent:"Worked with agents",safety:"Reviewed safety",image:"Worked with images",wait:"Waited",mcp:"Used connected tools",other:"Used tools"};function He(e){const a=new Map,n=o((i,l,f=0)=>{const g=a.get(i);(!g||f<g.order)&&a.set(i,{label:i,icon:l,order:f})},"add"),s=[],c=[];for(const[i,l]of e.entries())if(l.kind==="tool"){const f=j({name:l.rawName??l.name,target:l.target});s.push({...f,order:i,completed:l.status==="completed"})}else if(l.kind==="protocol")if(l.surface==="provider_activity"&&l.family==="tool_execution"){const f=o(b=>l.details.find(y=>y.label===b)?.value,"value"),g=j({name:f("Name"),operation:f("Operation"),transport:f("Transport"),namespace:f("Namespace"),target:f("Target")});s.push({...g,order:i,completed:l.status==="completed"})}else{const f=K(l);if(!f)continue;if(l.surface==="provider_activity"&&l.family==="provider_notice"){const g=l.summary?.trim()||l.details.find(b=>b.label==="Summary")?.value.trim();c.push({summary:g,severity:G(l),icon:f.icon,order:i});continue}n({research:"Searched the web",plan:"Worked on a plan",delegation:"Worked with agents",artifact:"Worked with artifacts",context:"Managed context",memory:"Checked memory",model_identity:"Checked model settings",review:"Worked in review mode",hook:"Ran hooks",safety:"Reviewed safety",terminal:"Ran commands",wait:"Waited",workspace_change:"Worked on files",workspace_file:"Referenced files",resource:"Added resources"}[l.surface==="provider_activity"?l.family:l.surface]??"Used tools",f.icon,i)}if(c.length){const i=c.find(l=>l.severity==="error")??c.find(l=>l.severity==="warning")??c[0];n(c.length===1?i.summary||"Received a provider update":i.severity==="error"?"Provider error reported":i.severity==="warning"?"Provider warning reported":"Received provider updates",i.icon,i.severity==="info"?c[0].order:-1)}const u=new Set(s.filter(i=>i.completed).map(i=>i.family));for(const i of s){const l=u.has(i.family);n(i.family==="read"&&!l?"Checked files":i.family==="edit"&&!l?"Worked on files":Be[i.family],i.icon,i.order)}a.size||(e.some(i=>i.kind==="thinking")?n("Thought through the task",B):e.some(i=>i.kind==="marker")?n("Activity stopped",O):n("Recorded usage",R));const r=[...a.values()].sort((i,l)=>i.order-l.order),p=o(i=>i.map((l,f)=>f?l.charAt(0).toLowerCase()+l.slice(1):l).join(", "),"join"),d=p(r.map(i=>i.label));return{label:r.length>3?`${p(r.slice(0,2).map(i=>i.label))}, and more`:d,fullLabel:d,icon:r.length===1?r[0].icon:oe}}o(He,"completedActivitySummary");var M=5,De=8;function We(e,a=!1){return a&&(e==="blocked"||e==="failed")?(0,t.jsx)(z,{className:"h-3 w-3 text-ink-3","aria-hidden":!0}):e==="in_progress"?(0,t.jsx)(be,{className:"h-3 w-3 animate-spin text-(--status-agent-running)","aria-hidden":!0}):e==="completed"?(0,t.jsx)(ce,{className:"h-3 w-3 text-(--status-task-icon-done)","aria-hidden":!0}):e==="blocked"||e==="failed"?(0,t.jsx)(Le,{className:"h-3 w-3 text-bad","aria-hidden":!0}):(0,t.jsx)(z,{className:"h-3 w-3 text-ink-3","aria-hidden":!0})}o(We,"stepStatusIcon");function Q({details:e}){return e.length===0?null:(0,t.jsx)("dl",{className:"flex min-w-0 flex-col gap-1.5","data-testid":"task-chat-provider-detail-list",children:e.map(a=>(0,t.jsxs)("div",{className:"grid min-w-0 grid-cols-1 gap-0.5 sm:grid-cols-(--gtc-task-chat-details) sm:gap-3",children:[(0,t.jsx)("dt",{className:"text-ink-3",children:a.label}),(0,t.jsx)("dd",{className:m("min-w-0 break-words text-ink",a.mono&&"font-mono"),children:a.value})]},`${a.label}:${a.value}`))})}o(Q,"DetailList");function Fe(e){try{return new URL(e).hostname.replace(/^www\./,"")}catch{return e}}o(Fe,"sourceHostname");function Oe({item:e}){const[a,n]=(0,h.useState)(!1),s=e.details.find(p=>p.label.toLowerCase()==="query"),c=e.details.filter(p=>!["action","query","status"].includes(p.label.toLowerCase())),u=a?e.links:e.links.slice(0,M),r=e.links.length-u.length;return(0,t.jsxs)("div",{className:"flex min-w-0 flex-col gap-2.5",children:[s?(0,t.jsxs)("div",{className:"min-w-0 rounded-sm bg-bg-3/40 px-2.5 py-2","data-testid":"task-chat-research-query",children:[(0,t.jsx)("p",{className:"text-(length:--text-nano) font-medium uppercase tracking-wide text-ink-3",children:"Query"}),(0,t.jsx)("p",{className:"mt-0.5 min-w-0 break-words font-mono text-(length:--text-micro) text-ink",children:s.value})]}):null,e.links.length>0?(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsxs)("p",{className:"mb-1 text-(length:--text-nano) font-medium uppercase tracking-wide text-ink-3",children:[e.links.length," ",e.links.length===1?"result":"results"]}),(0,t.jsx)("ol",{className:"divide-y divide-line/60","aria-label":"Research sources",children:u.map((p,d)=>(0,t.jsxs)("li",{className:"min-w-0 py-1.5 first:pt-0 last:pb-0",children:[(0,t.jsxs)("a",{className:"flex min-w-0 items-center gap-1 font-medium text-ink hover:underline",href:p.href,target:"_blank",rel:"noreferrer",children:[(0,t.jsx)("span",{className:"truncate",children:p.label}),(0,t.jsx)(W,{className:"h-3 w-3 shrink-0","aria-hidden":!0})]}),(0,t.jsxs)("p",{className:"mt-0.5 flex min-w-0 gap-2 text-ink-3",children:[(0,t.jsx)("span",{className:"shrink-0",children:Fe(p.href)}),p.description?(0,t.jsx)("span",{className:"min-w-0 truncate",children:p.description}):null]})]},`${p.href}:${d}`))}),r>0?(0,t.jsxs)("button",{type:"button",className:"mt-1.5 text-ink-3 hover:text-ink",onClick:o(()=>n(!0),"onClick"),children:["Show ",r," more ",r===1?"result":"results"]}):a&&e.links.length>M?(0,t.jsx)("button",{type:"button",className:"mt-1.5 text-ink-3 hover:text-ink",onClick:o(()=>n(!1),"onClick"),children:"Show fewer results"}):null]}):null,(0,t.jsx)(Q,{details:c}),e.output||e.outputTruncated?(0,t.jsx)("p",{className:"text-ink-3",children:"Additional provider output is available in Runner Inspector."}):null]})}o(Oe,"ResearchDetails");function Ue({item:e,neutral:a=!1}){return e.family==="research"?(0,t.jsx)(Oe,{item:e}):(0,t.jsxs)("div",{className:"flex min-w-0 flex-col gap-2",children:[e.steps.length>0?(0,t.jsx)("ol",{className:"flex flex-col gap-1","aria-label":"Plan steps",children:e.steps.map(n=>(0,t.jsxs)("li",{className:"flex min-w-0 items-start gap-2",children:[(0,t.jsx)("span",{className:"mt-0.5 shrink-0",children:We(n.status,a)}),(0,t.jsx)("span",{className:m("min-w-0",n.status==="completed"&&"text-ink-3 line-through"),children:n.label})]},n.id))}):null,e.links.length>0?(0,t.jsx)("ul",{className:"flex flex-col gap-1.5","aria-label":"Research sources",children:e.links.map(n=>(0,t.jsxs)("li",{children:[(0,t.jsxs)("a",{className:"inline-flex min-w-0 items-center gap-1 font-medium text-accent hover:underline",href:n.href,target:"_blank",rel:"noreferrer",children:[(0,t.jsx)("span",{className:"truncate",children:n.label}),(0,t.jsx)(W,{className:"h-3 w-3 shrink-0","aria-hidden":!0})]}),n.description?(0,t.jsx)("p",{className:"mt-0.5 text-ink-3",children:n.description}):null]},n.href))}):null,e.children.length>0?(0,t.jsx)("ul",{className:"flex flex-col gap-1.5","aria-label":"Delegated agents",children:e.children.map(n=>(0,t.jsxs)("li",{className:"flex min-w-0 flex-col gap-0.5",children:[(0,t.jsxs)("span",{className:"flex min-w-0 items-center gap-2",children:[(0,t.jsx)("span",{className:"font-medium text-ink",children:n.title}),(0,t.jsx)("span",{className:"capitalize text-ink-3",children:n.status}),n.metadata?(0,t.jsx)("span",{className:"min-w-0 truncate font-mono text-(length:--text-micro)",children:n.metadata}):null]}),n.summary?(0,t.jsx)("span",{className:"text-ink-3",children:n.summary}):null]},n.id))}):null,e.details.length>0?(0,t.jsx)(Q,{details:e.details}):null,e.output?(0,t.jsx)("pre",{className:"max-h-(--sz-64) overflow-auto whitespace-pre-wrap rounded-sm bg-bg-3/50 p-2 font-mono text-(length:--text-micro) text-ink",children:e.output}):null,e.outputTruncated?(0,t.jsx)("p",{className:"text-ink-3",children:"Output truncated to 8 KiB."}):null]})}o(Ue,"ProviderDetails");function qe({item:e}){if(e.files.length===0)return(0,t.jsx)("p",{className:"text-ink-3",children:"No changed-file details were reported."});const a=e.files.slice(0,De),n=e.files.length-a.length;return(0,t.jsxs)("div",{className:"min-w-0","data-testid":"task-chat-workspace-change-details",children:[(0,t.jsx)("ul",{className:"flex min-w-0 flex-col divide-y divide-line/60","aria-label":"Changed files",children:a.map(s=>(0,t.jsxs)("li",{className:"flex min-w-0 items-center gap-2 py-1.5 first:pt-0 last:pb-0",children:[(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-ink",title:s.previousPath?`${s.previousPath} → ${s.path}`:s.path,children:s.previousPath?`${s.previousPath} → ${s.path}`:s.path}),(0,t.jsx)("span",{className:"shrink-0 capitalize text-ink-3",children:s.operation.replaceAll("_"," ")}),s.additions!=null||s.deletions!=null?(0,t.jsxs)("span",{className:"shrink-0 font-mono text-(length:--text-micro) text-ink-3",children:[s.additions==null?"":`+${s.additions}`," ",s.deletions==null?"":`−${s.deletions}`]}):null]},`${s.operation}:${s.path}`))}),n>0?(0,t.jsxs)("p",{className:"mt-1.5 text-ink-3",children:[n," more ",n===1?"file":"files"," not shown"]}):null]})}o(qe,"WorkspaceChangeDetails");function Ve({item:e}){const a={path:e.path,resourceKind:"file",line:e.line,column:null,raw:e.path};return(0,t.jsxs)("div",{className:"flex min-w-0 flex-col gap-2",children:[(0,t.jsx)(fe,{workspaceFileRef:a,label:e.path}),e.preview?e.presentation==="document"?(0,t.jsx)("div",{className:"max-h-(--sz-64) overflow-auto rounded-sm bg-bg-3/30 p-2 text-ink",children:(0,t.jsx)(T,{children:e.preview})}):(0,t.jsx)("pre",{className:"max-h-(--sz-64) overflow-auto whitespace-pre-wrap rounded-sm bg-bg-3/50 p-2 font-mono text-(length:--text-micro) text-ink",children:e.preview}):(0,t.jsx)("p",{className:"text-ink-3",children:"Preview unavailable."}),e.previewTruncated?(0,t.jsx)("p",{className:"text-ink-3",children:"Preview truncated by the runner."}):null]})}o(Ve,"WorkspaceFileDetails");function Z(e,a=!1){switch(e.surface){case"provider_activity":return e.details.length>0||e.steps.length>0||e.links.length>0||e.children.length>0||e.output||e.outputTruncated?(0,t.jsx)(Ue,{item:e,neutral:a}):null;case"workspace_change":return(0,t.jsx)(qe,{item:e});case"workspace_file":return(0,t.jsx)(Ve,{item:e});case"resource":case"runtime_request":case"run_result":case"run_terminal":return null}}o(Z,"detailContent");function J(e){if(e)try{const a=new URL(e,"https://wardmote.invalid");return a.protocol==="https:"||a.protocol==="http:"?e:void 0}catch{return}}o(J,"safeActivityHref");function Ge(e){return e.surface==="resource"?!!J(e.href):Z(e)!==null||e.surface==="provider_activity"&&!!e.summary?.trim()}o(Ge,"hasTaskChatProtocolActivityDetails");function Ke({item:e,neutral:a=!1}){const n=Z(e,a);if(e.surface==="resource"){const s=J(e.href);return s?(0,t.jsx)("a",{href:s,className:"text-ink underline",children:e.title}):(0,t.jsx)("p",{children:e.title})}return(0,t.jsxs)(t.Fragment,{children:[e.surface==="provider_activity"&&e.summary?(0,t.jsx)("p",{className:"whitespace-pre-wrap break-words",children:e.summary}):null,n]})}o(Ke,"TaskChatProtocolActivityDetails");function Y(e,a){if(e.kind==="tool"){const d=j({name:e.rawName??e.name,target:e.target}),i=a&&(e.status==="pending"||e.status==="in_progress");return{icon:d.icon,label:e.status==="failed"?d.failedLabel:e.status==="interrupted"?d.interruptedLabel:i?d.runningLabel:d.completedLabel,target:e.target,mono:!0,running:i}}if(e.kind==="thinking"){const d=a&&!!e.streaming;return{icon:B,label:d?"Thinking":"Thought",target:e.lines.filter(i=>i.trim()).at(-1)?.trim(),mono:!1,running:d}}if(e.kind==="protocol"){const d=K(e);return d?{icon:d.icon,label:Ee(e,d),target:d.detail,mono:!0,running:a&&X(e)}:null}if(e.kind==="marker")return{icon:O,label:e.label,target:e.detail,mono:!1,running:!1};const{used:n,size:s,inputTokens:c,outputTokens:u,costUsd:r}=e.usage,p=[s>0?`${n.toLocaleString()}/${s.toLocaleString()} ctx`:void 0,c!=null||u!=null?`↑${(c??0).toLocaleString()} ↓${(u??0).toLocaleString()}`:void 0,r!=null?`$${r.toFixed(4)}`:void 0].filter(Boolean).join(" · ");return{icon:R,label:e.label??"Token usage",target:p||e.detail,mono:!1,running:!1}}o(Y,"presentation");function Xe({item:e,active:a}){const n=Y(e,a);if(!n)return null;const s=n.icon;return(0,t.jsxs)("span",{className:"flex min-w-0 flex-1 items-center gap-2","data-activity-row":e.id,"data-activity-family":e.kind==="protocol"?e.surface==="provider_activity"?e.family:e.surface:void 0,children:[(0,t.jsx)("span",{className:"flex size-5 shrink-0 items-center justify-center","data-activity-icon":!0,children:(0,t.jsx)(s,{className:"size-3.5","aria-hidden":"true"})}),(0,t.jsxs)("span",{className:"flex min-w-0 flex-1 items-center gap-2 overflow-hidden whitespace-nowrap",children:[(0,t.jsx)("span",{className:m("max-w-full shrink-0 truncate text-xs",n.running&&"text-ink"),children:n.label}),n.target?(0,t.jsx)("span",{title:n.target,className:m("truncate text-xs text-ink-3",n.mono&&"font-mono"),children:n.target}):null]})]})}o(Xe,"ActivityContent");function Qe({item:e}){return e.kind==="thinking"?(0,t.jsx)(T,{softBreaks:!0,children:e.lines.join(`
|
|
2
2
|
`)}):e.kind==="usage"?(0,t.jsx)($e,{item:e}):e.kind==="protocol"?(0,t.jsx)(Ke,{item:e,neutral:!0}):e.kind==="marker"?(0,t.jsx)("p",{className:"whitespace-pre-wrap break-words",children:e.detail??e.label}):(0,t.jsxs)(t.Fragment,{children:[e.target?(0,t.jsx)("p",{className:"break-all font-mono",children:e.target}):null,e.detail?(0,t.jsx)("pre",{className:"whitespace-pre-wrap break-words font-mono",children:e.detail}):null,e.decision?(0,t.jsxs)("p",{children:["Permission ",e.decision]}):null,e.diff?(0,t.jsxs)("p",{className:"break-all font-mono",children:[e.diff.path," · +",e.diff.added," −",e.diff.removed]}):null]})}o(Qe,"ActivityDetails");function Ze(e){return e.kind==="protocol"?Ge(e):e.kind==="thinking"?e.lines.some(a=>a.trim()):e.kind==="tool"?!!(e.target?.trim()||e.detail?.trim()||e.diff||e.decision):e.kind==="marker"?!!e.detail?.trim():!!(e.detail||e.usage.size>0||e.usage.inputTokens!=null||e.usage.outputTokens!=null||e.usage.costUsd!=null)}o(Ze,"hasActivityDetails");var Je=24;function Ye(e){const a=(0,h.useRef)(null),n=(0,h.useRef)(e),s=(0,h.useRef)(0),c=(0,h.useCallback)(()=>{const r=a.current;r&&(n.current=!0,r.scrollTop=r.scrollHeight,s.current=r.scrollTop)},[]),u=(0,h.useCallback)(()=>{const r=a.current;if(!r)return;const p=r.scrollTop,d=p-s.current;if(s.current=p,d<-24){n.current=!1;return}d>0&&r.scrollHeight-p-r.clientHeight<=Je&&(n.current=!0)},[]);return(0,h.useLayoutEffect)(()=>{e&&c()},[e,c]),(0,h.useEffect)(()=>{const r=a.current;if(!r||typeof ResizeObserver>"u")return;const p=new ResizeObserver(()=>{n.current&&(r.scrollTop=r.scrollHeight,s.current=r.scrollTop)});for(const d of r.children)p.observe(d);return()=>p.disconnect()},[]),{ref:a,onScroll:u}}o(Ye,"useFollowDetailBottom");var et=new Set;function ee(e){return e.items.filter(a=>Y(a,!1)!==null)}o(ee,"visibleActivities");function tt(e){const a=e.flatMap(n=>ee(n).map(s=>s.id));return new Set(a.slice(-3))}o(tt,"newestActivityIds");function te({item:e,active:a,auto:n,current:s=!1}){const[c,u]=A(`runner-detail:${e.id}`,n),[r,p]=(0,h.useState)(c),d=Ye(c&&s===!0);c&&!r&&p(!0);const i=(0,h.useId)(),l=Ze(e),f=(0,t.jsx)(Xe,{item:e,active:a});return(0,t.jsxs)("li",{className:"min-w-0","data-activity-item-id":e.id,"data-activity-open":l?c:void 0,"data-testid":s?"task-chat-activity-current":void 0,children:[l?(0,t.jsxs)("button",{type:"button",className:"flex h-8 w-full min-w-0 items-center gap-2 rounded-sm text-left text-ink-3 hover:text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus",onClick:o(()=>u(!c),"onClick"),"aria-expanded":c,"aria-controls":r?i:void 0,children:[f,(0,t.jsx)(_,{className:m("size-3.5 shrink-0",c&&"rotate-90"),"aria-hidden":"true"})]}):(0,t.jsx)("div",{className:"flex h-8 w-full min-w-0 items-center gap-2 text-ink-3",children:f}),l&&r?(0,t.jsx)("div",{id:i,hidden:!c,ref:d.ref,onScroll:d.onScroll,className:"flex max-h-(--sz-64) min-w-0 flex-col gap-2 overflow-y-auto rounded-md bg-bg-3/40 p-3 text-xs leading-relaxed text-ink-3 [&>*]:shrink-0","data-testid":"task-chat-runner-activity-detail",children:(0,t.jsx)("div",{className:"flex min-w-0 flex-col gap-2","data-testid":"task-chat-runner-activity-body",children:(0,t.jsx)(Qe,{item:e})})}):null]})}o(te,"ExpandedActivity");function at({phaseId:e,activities:a,openIds:n,active:s}){const[c,u]=A(`runner-earlier:${e}`,!1),r=(0,h.useId)(),p=a.at(-1),d=a.filter(l=>!n.has(l.id)).length,i=a.filter(l=>c||n.has(l.id));return(0,t.jsxs)("div",{className:"flex min-w-0 flex-col gap-1",children:[d>0?(0,t.jsxs)("button",{type:"button",className:"flex h-8 w-full min-w-0 items-center gap-2 rounded-sm text-left text-xs text-ink-3 hover:text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus","data-testid":"task-chat-activity-earlier-toggle",onClick:o(()=>u(!c),"onClick"),"aria-expanded":c,"aria-controls":r,children:[(0,t.jsx)("span",{className:"flex size-5 shrink-0 items-center justify-center",children:(0,t.jsx)(_,{className:m("size-3.5",c&&"rotate-90"),"aria-hidden":"true"})}),(0,t.jsx)("span",{children:c?`Hide ${d} earlier`:`+${d} earlier`})]}):null,(0,t.jsx)("ol",{id:r,className:"flex min-w-0 flex-col gap-1","aria-label":"Activity history","data-testid":"task-chat-runner-activity-list",children:i.map(l=>(0,t.jsx)(te,{item:l,active:s&&l===p,auto:n.has(l.id),current:l===p},l.id))})]})}o(at,"LiveActivities");function nt({phaseId:e,activities:a}){const[n,s]=A(e,!1),c=(0,h.useId)(),u=He(a),r=u.icon,p=`${a.length} ${a.length===1?"activity":"activities"}`;return(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsxs)("button",{type:"button",className:"flex min-h-8 w-full min-w-0 items-center gap-2 rounded-sm text-left text-ink-3 hover:text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus","data-testid":"task-chat-activity-phase-toggle",onClick:o(()=>s(!n),"onClick"),"aria-expanded":n,"aria-controls":n?c:void 0,"aria-label":`${n?"Collapse":"Expand"} ${u.fullLabel.toLowerCase()} (${p})`,children:[(0,t.jsxs)("span",{className:"flex h-8 min-w-0 flex-1 items-center gap-2 text-xs","data-completed-summary":!0,children:[(0,t.jsx)("span",{className:"flex size-5 shrink-0 items-center justify-center",children:(0,t.jsx)(r,{className:"size-3.5","aria-hidden":"true"})}),(0,t.jsx)("span",{className:"truncate",title:u.fullLabel,children:u.label})]}),(0,t.jsxs)("span",{className:"flex shrink-0 items-center gap-1 text-xs",children:[n?p:null,(0,t.jsx)(_,{className:m("size-3.5",n&&"rotate-90"),"aria-hidden":"true"})]})]}),n?(0,t.jsx)("ol",{id:c,className:"flex min-w-0 flex-col gap-1","aria-label":"Activity history","data-testid":"task-chat-runner-activity-list",children:a.map(d=>(0,t.jsx)(te,{item:d,active:!1,auto:!1},d.id))}):null]})}o(nt,"SettledActivities");function Mt({item:e,openActivityIds:a}){const n=ee(e),s=a??(e.active?tt([e]):et),c=n.some(u=>s.has(u.id));return(0,t.jsxs)("section",{className:"flex min-w-0 flex-col gap-2","data-testid":"task-chat-activity-phase","data-activity-group":e.id,"data-activity-mode":c?"live":"settled",children:[e.interstitial?(0,t.jsx)("div",{className:"min-w-0 px-1 text-sm text-ink/90","data-testid":"task-chat-phase-interstitial",children:(0,t.jsx)(T,{softBreaks:!0,linkIssueReferences:!0,children:e.interstitial.text})}):null,c?(0,t.jsx)(at,{phaseId:e.id,activities:n,openIds:s,active:e.active}):n.length>0?(0,t.jsx)(nt,{phaseId:e.id,activities:n}):null]})}o(Mt,"TaskChatRunnerActivityGroup");function Et({browser:e,label:a="Browser",onOpen:n}){const s=e.status==="closed"||e.status==="failed";return(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2 py-1 text-sm","aria-label":`${a} session`,children:[(0,t.jsx)(le,{className:"size-4 shrink-0 text-ink-3","aria-hidden":!0}),(0,t.jsx)("span",{children:a}),(0,t.jsxs)("span",{className:"text-ink-3",children:["· ",e.status]}),n&&(0,t.jsx)(v,{variant:"ghost",size:"sm",onClick:o(()=>n(e.id),"onClick"),children:s?"View session":"Open browser"})]})}o(Et,"TaskBrowserActivity");function Bt({item:e}){return(0,t.jsx)("article",{className:"rounded-lg border border-line bg-bg-2 p-3","aria-label":`Project created: ${e.name}`,children:(0,t.jsxs)("div",{className:"flex items-start gap-3",children:[(0,t.jsx)(Re,{className:"mt-0.5 size-4 shrink-0 text-ink-3","aria-hidden":!0}),(0,t.jsxs)("div",{className:"min-w-0 flex-1 space-y-1",children:[(0,t.jsx)("p",{className:"text-xs text-ink-3",children:"Project created"}),(0,t.jsx)(w,{to:`/projects/${e.projectId}`,className:"break-words text-sm font-medium hover:underline focus-visible:underline",children:e.name}),e.description&&(0,t.jsx)("p",{className:"line-clamp-3 text-sm text-ink-3",children:e.description}),e.repositories.length>0&&(0,t.jsx)("ul",{className:"space-y-1 pt-1",children:e.repositories.map(a=>(0,t.jsxs)("li",{className:"flex min-w-0 items-center gap-2 text-xs text-ink-3",children:[(0,t.jsx)(H,{className:"size-3 shrink-0","aria-hidden":!0}),(0,t.jsx)("a",{className:"truncate hover:underline focus-visible:underline",href:a.url,target:"_blank",rel:"noreferrer",children:a.name})]},a.id))})]})]})})}o(Bt,"TaskChatProjectCreatedCard");var st={session_start:pe,interrupted:ve,turn_boundary:me};function Ht({item:e,onTryAgain:a,tryAgainPending:n=!1}){const[s,c]=(0,h.useState)(!1),u=(0,h.useId)(),r=Ne(),p=e.tone==="neutral"?je:st[e.variant],d=e.variant==="interrupted"&&e.tone!=="neutral",i=e.createdAtIso?ie(e.createdAtIso):void 0,l=o(()=>{Promise.resolve().then(()=>a?.()).catch(()=>{})},"handleTryAgain");if(e.credentialAccess){const{agentName:f,credentialName:g,deniedUser:b,settingsHref:y}=e.credentialAccess;return(0,t.jsxs)("div",{role:"alert","data-testid":"task-chat-credential-access-notice",className:"tc-enter-marker flex w-full items-start gap-3 rounded-lg border border-bad/40 bg-bad/10 p-4 text-sm",children:[(0,t.jsx)(ge,{className:"mt-0.5 size-5 shrink-0 text-bad","aria-hidden":!0}),(0,t.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-2",children:[(0,t.jsxs)("p",{className:"font-semibold text-bad",children:[f," couldn’t start"]}),(0,t.jsxs)("p",{className:"break-words font-medium text-ink",children:[f," is configured to use ",g||"an AI credential",", but ",b==="you"?"you don’t":`${b} doesn’t`," have access to that credential."]}),(0,t.jsxs)("p",{className:"text-ink-3",children:["Choose an AI connection ",b==="you"?"you can":`${b} can`," use, or ask an administrator to update ",f,"’s connection. Then try again."]}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2 pt-1",children:[(0,t.jsx)(v,{asChild:!0,variant:"secondary",size:"sm",children:(0,t.jsx)(w,{to:y,children:"Change AI connection"})}),e.runHref&&(0,t.jsx)(v,{asChild:!0,variant:"ghost",size:"sm",children:(0,t.jsx)(w,{to:e.runHref,children:"View run"})})]})]})]})}return e.collapsible?(0,t.jsxs)("div",{className:"tc-enter-marker flex flex-col items-start py-1 text-xs text-ink-3","data-testid":"task-chat-collapsible-marker",children:[(0,t.jsxs)("div",{className:"flex max-w-(--pct-85) items-center gap-1.5",children:[(0,t.jsxs)("button",{type:"button",onClick:o(()=>c(f=>!f),"onClick"),"aria-expanded":s,"aria-controls":u,className:m("flex min-w-0 items-center gap-1.5 rounded-md px-2 py-0.5",d?"text-bad":"text-ink-3","hover:bg-bg-3/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus/50"),children:[(0,t.jsx)(p,{className:"h-3.5 w-3.5 shrink-0","aria-hidden":!0}),(0,t.jsx)("span",{className:"truncate font-medium",children:e.label}),i?(0,t.jsxs)("span",{className:"shrink-0 text-ink-3/70",children:["· ",i]}):null,(0,t.jsx)(de,{className:m("tc-notice-chevron h-3.5 w-3.5 shrink-0 transition-transform",s&&"rotate-180"),"aria-hidden":!0})]}),a&&!s?(0,t.jsx)(v,{type:"button",variant:"secondary",size:"xs",onClick:l,disabled:n,"data-testid":"task-chat-run-failed-try-again",children:n?"Trying again...":"Try again"}):null]}),s?(0,t.jsxs)("div",{id:u,"data-testid":"task-chat-collapsible-marker-details",className:"mt-1 w-full max-w-(--pct-85) overflow-hidden rounded-lg border border-line bg-bg-3/25 text-left text-sm dark:bg-bg-3/15",children:[e.detail?(0,t.jsx)("div",{className:"px-3 py-2.5 text-ink/90",children:e.detail}):null,e.runHref||e.planHref||a?(0,t.jsxs)("div",{className:"flex items-center justify-end gap-2 border-t border-line/70 bg-bg/50 px-3 py-2 dark:bg-bg/30",children:[e.planHref?(0,t.jsx)(v,{asChild:!0,variant:"ghost",size:"xs",children:(0,t.jsx)(w,{to:e.planHref,children:"View saved plan"})}):null,e.runHref?(0,t.jsx)(v,{asChild:!0,variant:"ghost",size:"xs",children:(0,t.jsx)(w,{to:e.runHref,children:"View run"})}):null,a?(0,t.jsx)(v,{type:"button",size:"xs",onClick:l,disabled:n,"data-testid":"task-chat-run-failed-try-again",children:n?"Trying again...":"Try again"}):null]}):null]}):null]}):(0,t.jsxs)("div",{className:"tc-enter-marker flex items-center gap-2 py-1 text-xs text-ink-3",role:r?"separator":void 0,"aria-label":r?e.label:void 0,children:[(0,t.jsx)("span",{className:m("h-px flex-1",d?"border-t border-dashed border-bad/50":"bg-line")}),(0,t.jsxs)("span",{className:m("flex items-center gap-1.5",d&&"text-bad"),children:[(0,t.jsx)(p,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{className:"font-medium",children:e.label}),e.detail?(0,t.jsxs)("span",{className:"text-ink-3",children:["· ",e.detail]}):null,a?(0,t.jsx)(v,{type:"button",variant:"secondary",size:"xs",onClick:l,disabled:n,"data-testid":"task-chat-run-failed-try-again",children:n?"Trying again...":"Try again"}):null]}),(0,t.jsx)("span",{className:m("h-px flex-1",d?"border-t border-dashed border-bad/50":"bg-line")})]})}o(Ht,"TaskChatMarker");export{tt as a,Pt as c,Mt as i,A as l,Bt as n,$e as o,Et as r,Ae as s,Ht as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var L=Object.defineProperty;var l=(e,a)=>L(e,"name",{value:a,configurable:!0});import{i as P}from"./rolldown-runtime-ZpX3ckPj.js";import{l as u,na as O,t as V,ta as H}from"./createLucideIcon-DJi9suAC.js";import{ot as C}from"./router-2UfGeejU.js";import{t as T}from"./bot-C9arfJWx.js";import{t as G}from"./check-Ctsrlfa-.js";import{t as U}from"./chevron-down-BCvxsWfI.js";import{t as X}from"./chevron-right-s7L6hXXq.js";import{t as Y}from"./circle-question-mark-B1jR2is9.js";import{t as J}from"./circle-IAHLDvLO.js";import{o as Z,t as K}from"./MarkdownBody-BTjuUgFa.js";import{t as ee}from"./external-link-nl1b263c.js";import{t as I}from"./file-code-corner-CmZ_RihF.js";import{t as S}from"./file-text-Cw7ntqRx.js";import{t as se}from"./RichWorkProductCard-JGHGU_RI.js";import{n as te,t as z}from"./QuestionForm-B8-PWz3B.js";import{r as ne,t as p}from"./button-CMwV3L1P.js";import{t as q}from"./shield-check-B0HVjzM_.js";import{t as ae}from"./triangle-alert-CBVKiaXB.js";import{t as le}from"./x-DRDFdlYE.js";import{a as F,n as B,s as W,t as A}from"./dialog-CKUblzlR.js";import{t as re}from"./textarea-BRPEfJ-g.js";import{_ as ie,a as oe,f as ce,r as de}from"./TaskChatComposerTakeoverContext-BJAHPHve.js";import{Ba as ue,ya as _}from"./index-DDoARkPG.js";var Q={name:"package-check",size:24,node:[["path",{d:"M12 22V12",key:"d0xqtd"}],["path",{d:"m16 17 2 2 4-4",key:"uh5qu3"}],["path",{d:"M21 11.127V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.729l7 4a2 2 0 0 0 2 .001l1.32-.753",key:"kpkbpo"}],["path",{d:"M3.29 7 12 12l8.71-5",key:"19ckod"}],["path",{d:"m7.5 4.27 8.997 5.148",key:"9yrvtv"}]]};Q.node;var w=V(Q),x=P(O(),1),s=P(H(),1),xe={plan:C,tool_execution:_,research:S,delegation:T,model_identity:T,context:w,artifact:w,review:q,hook:C,memory:S,safety:q,terminal:_,wait:ue,provider_notice:ae};function g(e){return["failed","blocked","denied","cancelled","interrupted"].includes(e)?"text-bad":["running","pending","in_progress","waiting"].includes(e)?"text-(--status-agent-running)":["completed","done","succeeded","passed","resolved"].includes(e)?"text-(--status-task-icon-done)":"text-ink-3"}l(g,"statusTone");function N({status:e,className:a}){return["running","pending","in_progress","waiting"].includes(e)?(0,s.jsx)(ne,{"aria-hidden":!0,className:u("h-4 w-4 animate-spin",g(e),a)}):["failed","blocked","denied","cancelled","interrupted"].includes(e)?(0,s.jsx)(le,{"aria-hidden":!0,className:u("h-4 w-4",g(e),a)}):["completed","done","succeeded","passed","resolved"].includes(e)?(0,s.jsx)(G,{"aria-hidden":!0,className:u("h-4 w-4",g(e),a)}):(0,s.jsx)(J,{"aria-hidden":!0,className:u("h-4 w-4",g(e),a)})}l(N,"StatusIcon");function j({icon:e,title:a,status:t,summary:n,children:c,testId:o,presentation:k="timeline"}){const h=(0,s.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,s.jsx)(e,{"aria-hidden":!0,className:"h-4 w-4 shrink-0 text-ink-3"}),(0,s.jsx)("strong",{className:"min-w-0 truncate text-sm font-medium text-ink",children:a}),t&&t!=="pending"?(0,s.jsxs)("span",{className:u("inline-flex shrink-0 items-center gap-1 text-xs capitalize",g(t)),children:[(0,s.jsx)(N,{status:t,className:"h-3.5 w-3.5"}),t.replaceAll("_"," ")]}):null]});return k==="takeover"?(0,s.jsxs)("article",{className:"overflow-hidden","data-testid":o,children:[(0,s.jsx)(de,{children:h}),n?(0,s.jsx)("p",{className:u("text-sm text-ink-3",!!c&&"mb-3"),children:n}):null,c]}):(0,s.jsxs)("article",{className:u("overflow-hidden",k==="timeline"&&"rounded-md border border-line bg-bg-2/60"),"data-testid":o,children:[(0,s.jsxs)("header",{className:"flex min-w-0 items-start gap-2 px-3 py-2.5",children:[(0,s.jsx)(e,{"aria-hidden":!0,className:"mt-0.5 h-4 w-4 shrink-0 text-ink-3"}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-x-2 gap-y-1",children:[(0,s.jsx)("strong",{className:"text-sm font-medium text-ink",children:a}),t?(0,s.jsxs)("span",{className:u("inline-flex items-center gap-1 text-xs capitalize",g(t)),children:[(0,s.jsx)(N,{status:t,className:"h-3.5 w-3.5"}),t.replaceAll("_"," ")]}):null]}),n?(0,s.jsx)("p",{className:"mt-1 text-sm text-ink-3",children:n}):null]})]}),c?(0,s.jsx)("div",{className:"border-t border-line/70 px-3 py-2.5",children:c}):null]})}l(j,"CardShell");function pe({steps:e}){return e.length===0?null:(0,s.jsx)("ol",{className:"flex flex-col gap-1.5","aria-label":"Plan steps",children:e.map(a=>(0,s.jsxs)("li",{className:"flex items-start gap-2 text-sm",children:[(0,s.jsx)(N,{status:a.status,className:"mt-0.5 shrink-0"}),(0,s.jsx)("span",{className:u("min-w-0 flex-1",a.status==="completed"&&"text-ink-3 line-through"),children:a.label})]},a.id))})}l(pe,"PlanSteps");function he({item:e}){const a=xe[e.family],t=e.details.length>0||e.links.length>0||e.children.length>0||!!e.output;return(0,s.jsxs)(j,{icon:a,title:e.title,status:e.status,summary:e.summary,testId:`task-chat-provider-${e.family}`,children:[e.steps.length>0?(0,s.jsx)(pe,{steps:e.steps}):null,e.children.length>0?(0,s.jsx)("ul",{className:"flex flex-col gap-2","aria-label":"Delegated agents",children:e.children.map(n=>(0,s.jsxs)("li",{className:"rounded-sm bg-bg-3/40 px-2.5 py-2 text-sm",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(N,{status:n.status,className:"shrink-0"}),(0,s.jsx)("strong",{className:"font-medium",children:n.title}),(0,s.jsx)("span",{className:u("ml-auto text-xs capitalize",g(n.status)),children:n.status})]}),n.metadata?(0,s.jsx)("p",{className:"mt-1 text-xs text-ink-3",children:n.metadata}):null,n.summary?(0,s.jsx)("p",{className:"mt-1 text-sm text-ink-3",children:n.summary}):null]},n.id))}):null,e.links.length>0?(0,s.jsx)("ul",{className:"flex flex-col gap-2","aria-label":"Research sources",children:e.links.map(n=>(0,s.jsxs)("li",{children:[(0,s.jsxs)("a",{className:"inline-flex items-center gap-1 text-sm font-medium text-accent hover:underline",href:n.href,target:"_blank",rel:"noreferrer",children:[n.label,(0,s.jsx)(ee,{"aria-hidden":!0,className:"h-3.5 w-3.5"})]}),n.description?(0,s.jsx)("p",{className:"text-xs text-ink-3",children:n.description}):null]},n.href))}):null,t?(0,s.jsxs)("details",{className:u((e.steps.length>0||e.links.length>0||e.children.length>0)&&"mt-2"),children:[(0,s.jsxs)("summary",{className:"flex cursor-pointer list-none items-center gap-1 text-xs font-medium text-ink-3",children:[(0,s.jsx)(U,{"aria-hidden":!0,className:"h-3.5 w-3.5"})," Details"]}),e.details.length>0?(0,s.jsx)("dl",{className:"mt-2 flex min-w-0 flex-col gap-1.5 text-xs",children:e.details.map(n=>(0,s.jsxs)("div",{className:"grid min-w-0 grid-cols-1 gap-0.5 sm:grid-cols-(--gtc-task-chat-details) sm:gap-3",children:[(0,s.jsx)("dt",{className:"text-ink-3",children:n.label}),(0,s.jsx)("dd",{className:u("min-w-0 break-words text-ink",n.mono&&"font-mono"),children:n.value})]},`${n.label}:${n.value}`))}):null,e.output?(0,s.jsx)("pre",{className:"mt-2 max-h-(--sz-64) overflow-auto whitespace-pre-wrap rounded-sm bg-bg-3/50 p-2 font-mono text-xs text-ink",children:e.output}):null,e.outputTruncated?(0,s.jsx)("p",{className:"mt-1 text-xs text-ink-3",children:"Output truncated to 8 KiB."}):null]}):null]})}l(he,"ProviderActivityCard");function me(e){return(0,s.jsxs)("span",{className:"shrink-0 font-mono text-xs text-ink-3",children:[e.additions==null?"":`+${e.additions}`,e.additions!=null&&e.deletions!=null?" ":"",e.deletions==null?"":`−${e.deletions}`]})}l(me,"diffStats");function fe({item:e}){const[a,t]=(0,x.useState)(null),[n,c]=(0,x.useState)(!1),o=e.files.find(i=>i.path===a)??null,k=n?e.files:e.files.slice(0,3),h=e.totals.files||e.files.length,m=`${h} ${h===1?"file":"files"}`,b=[e.totals.additions==null?null:`+${e.totals.additions}`,e.totals.deletions==null?null:`−${e.totals.deletions}`].filter(Boolean).join(" "),d=e.complete?`${m} changed${b?` · ${b}`:""}`:"Workspace changes in progress";return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(j,{icon:C,title:"Workspace changes",status:e.complete?"completed":"running",summary:d,testId:"task-chat-workspace-change",children:[(0,s.jsx)("div",{className:"flex flex-col gap-1",children:k.map(i=>(0,s.jsxs)("button",{type:"button",className:"flex min-w-0 items-center gap-2 rounded-sm px-2 py-1.5 text-left text-sm hover:bg-bg-3/60",onClick:l(()=>t(i.path),"onClick"),children:[(0,s.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,s.jsx)("span",{className:"block truncate font-mono",children:i.previousPath?`${i.previousPath} → ${i.path}`:i.path}),(0,s.jsxs)("span",{className:"text-xs capitalize text-ink-3",children:[i.binary?"binary · ":"",i.operation.replaceAll("_"," ")]})]}),me(i)]},`${i.operation}:${i.path}`))}),(0,s.jsxs)("div",{className:"mt-2 flex flex-wrap items-center gap-2",children:[e.files.length>3?(0,s.jsx)(p,{type:"button",size:"sm",variant:"ghost",onClick:l(()=>c(i=>!i),"onClick"),children:n?"Show fewer files":`Show ${e.files.length-3} more files`}):null,e.files.length>0?(0,s.jsx)(p,{type:"button",size:"sm",variant:"secondary",onClick:l(()=>t(e.files[0].path),"onClick"),children:"Review diff"}):null]})]}),(0,s.jsx)(A,{open:o!==null,onOpenChange:l(i=>{i||t(null)},"onOpenChange"),children:(0,s.jsxs)(B,{className:"w-full max-w-(--pct-90) overflow-hidden",children:[(0,s.jsx)(F,{children:(0,s.jsx)(W,{className:"font-mono text-sm",children:o?.path??"Workspace diff"})}),e.files.length>1?(0,s.jsx)("div",{className:"flex max-w-full gap-1 overflow-x-auto pb-1","aria-label":"Changed files",children:e.files.map(i=>(0,s.jsx)(p,{type:"button",size:"sm",variant:i.path===o?.path?"secondary":"ghost",onClick:l(()=>t(i.path),"onClick"),children:i.path},i.path))}):null,o?.binary?(0,s.jsx)("p",{className:"rounded-sm bg-bg-3/50 p-3 text-sm text-ink-3",children:"Binary file; text diff is unavailable."}):o?.diff?(0,s.jsx)("pre",{className:"max-h-(--sz-70vh) overflow-auto whitespace-pre rounded-sm bg-bg-3/50 p-3 font-mono text-xs",children:o.diff}):(0,s.jsx)("p",{className:"rounded-sm bg-bg-3/50 p-3 text-sm text-ink-3",children:"No inline patch was recorded for this file."})]})})]})}l(fe,"WorkspaceChangeCard");function ge({item:e}){const[a,t]=(0,x.useState)(!1),n=e.displayName.includes(".")?e.displayName.split(".").at(-1)?.toUpperCase():"FILE",c=e.presentation==="generic"?"File":je(e.presentation),o=(0,x.useMemo)(()=>({path:e.path,resourceKind:"file",line:e.line,column:null,raw:e.path}),[e.line,e.path]);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(j,{icon:I,title:e.displayName,status:e.source==="runner_verified"?"completed":"informational",summary:`${c} · ${n}${e.line?` · line ${e.line}`:""}`,testId:"task-chat-workspace-file",children:(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,s.jsx)(Z,{workspaceFileRef:o,label:e.path}),(0,s.jsx)(p,{className:"ml-auto",type:"button",size:"sm",variant:"secondary",onClick:l(()=>t(!0),"onClick"),children:"Preview"})]})}),(0,s.jsx)(A,{open:a,onOpenChange:t,children:(0,s.jsxs)(B,{className:"w-full max-w-(--pct-90) overflow-hidden",children:[(0,s.jsx)(F,{children:(0,s.jsx)(W,{children:e.displayName})}),(0,s.jsx)("p",{className:"font-mono text-xs text-ink-3",children:e.path}),e.preview==null?(0,s.jsx)("p",{className:"rounded-sm bg-bg-3/50 p-3 text-sm text-ink-3",children:"Preview unavailable. The verified workspace reference is still available above."}):e.presentation==="document"?(0,s.jsx)("div",{className:"max-h-(--sz-70vh) overflow-auto rounded-sm bg-bg-3/30 p-3",children:(0,s.jsx)(K,{children:e.preview})}):e.presentation==="image"&&e.mediaType?.startsWith("image/")&&e.preview.startsWith("data:")?(0,s.jsx)("img",{className:"max-h-(--sz-70vh) max-w-full object-contain",alt:e.displayName,src:e.preview}):(0,s.jsx)("pre",{className:"max-h-(--sz-70vh) overflow-auto whitespace-pre-wrap rounded-sm bg-bg-3/50 p-3 font-mono text-xs",children:e.preview}),e.previewTruncated?(0,s.jsx)("p",{className:"text-xs text-ink-3",children:"Preview truncated by the runner."}):null]})})]})}l(ge,"WorkspaceFileCard");function je(e){return e.replaceAll("_"," ").replace(/\b\w/g,a=>a.toUpperCase())}l(je,"titleCaseKey");function E({item:e}){const a=e.questionSet;return a?(0,s.jsx)("div",{className:"flex flex-col gap-2","data-testid":"task-chat-runtime-request-history",children:e.response?(0,s.jsx)(te,{questionSet:a,response:e.response}):(0,s.jsxs)("div",{className:"flex flex-col gap-2 text-sm",children:[a.questions.map(t=>(0,s.jsxs)("div",{children:[t.header?(0,s.jsx)("p",{className:"text-xs font-medium text-ink-3",children:t.header}):null,(0,s.jsx)("p",{className:"text-ink",children:t.prompt})]},t.id)),(0,s.jsx)("p",{className:"text-xs text-ink-3",children:e.status==="resolved"?"Answer details were not recorded by this older runtime.":`No answers were submitted; this request was ${e.status}.`})]})}):null}l(E,"RuntimeQuestionHistory");function ke({item:e}){const a=e.status==="resolved"?"Questions answered":e.status==="cancelled"?"Questions cancelled":e.status==="expired"?"Questions expired":"Questions resolved";return(0,s.jsxs)("details",{className:"group","data-testid":"task-chat-runtime-request",children:[(0,s.jsxs)("summary",{className:"flex min-h-8 cursor-pointer list-none items-center gap-2 rounded-sm px-1 py-1.5 text-sm leading-5 text-ink-3 transition-colors hover:text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus",children:[(0,s.jsx)("span",{className:"flex w-6 shrink-0 items-center justify-center","data-testid":"task-chat-runtime-request-icon-slot",children:(0,s.jsx)(Y,{"aria-hidden":!0,className:"h-3.5 w-3.5 shrink-0 text-ink-3","data-testid":"task-chat-runtime-request-icon"})}),(0,s.jsx)("span",{children:a}),(0,s.jsx)(X,{"aria-hidden":!0,className:"ml-auto h-3 w-3 shrink-0 text-ink-3 opacity-0 transition-[opacity,transform] group-hover:opacity-70 group-focus-visible:opacity-70 group-open:rotate-90","data-testid":"task-chat-runtime-request-caret"})]}),(0,s.jsxs)("div",{className:"pb-3 pl-7 pr-1",children:[(0,s.jsxs)("div",{className:"mb-3",children:[(0,s.jsx)("p",{className:"text-sm font-medium text-ink",children:e.questionSet?.title??"Runtime input"}),(0,s.jsx)("p",{className:"mt-1 text-sm text-ink-3",children:e.prompt})]}),(0,s.jsx)(E,{item:e})]})]})}l(ke,"RuntimeQuestionReceipt");function be({item:e,onDecision:a,presentation:t,draftKey:n,imageUploadHandler:c,mentions:o}){const k=e.questionSet?.title??(e.requestType==="permission"?"Runtime permission":"Runtime input"),h=e.fields.length>0?e.fields:[{name:"answer",label:"Response",placeholder:null}],[m,b]=(0,x.useState)(()=>n?ce(n,{}):{}),[d,i]=(0,x.useState)(!1),[$,y]=(0,x.useState)(null);if((0,x.useEffect)(()=>{n||b({}),i(!1),y(null)},[n,e.requestId,e.status]),(0,x.useEffect)(()=>{n&&ie(n,m)},[n,m]),t==="timeline"&&e.requestType==="input"&&e.status!=="pending"&&e.questionSet)return(0,s.jsx)(ke,{item:e});const f=l(async r=>{if(!(!a||e.status!=="pending"||d)){i(!0),y(null);try{await a(e,r),n&&oe(n)}catch(v){i(!1),y(v instanceof Error?v.message:"The runtime request could not be resolved.")}}},"submit"),R=h.some(r=>(m[r.name]??"").trim().length>0);return t==="takeover"&&e.requestType==="input"&&e.status==="pending"&&e.questionSet?(0,s.jsx)(z,{id:e.id,questionSet:e.questionSet,draftKey:n,disabled:!a||d,imageUploadHandler:c,mentions:o,onSubmit:l(r=>f({action:"submit",response:r}),"onSubmit")}):(0,s.jsxs)(j,{icon:q,title:k,status:e.status,summary:e.prompt,testId:"task-chat-runtime-request",presentation:t,children:[e.requestType==="input"&&e.status==="pending"&&e.questionSet?(0,s.jsx)(z,{id:e.id,questionSet:e.questionSet,draftKey:n,disabled:!a||d,imageUploadHandler:c,mentions:o,onSubmit:l(r=>f({action:"submit",response:r}),"onSubmit"),onCancel:t==="timeline"?()=>f({action:"cancel"}):void 0}):e.requestType==="input"&&e.status!=="pending"&&e.questionSet?(0,s.jsx)(E,{item:e}):e.requestType==="input"&&e.status==="pending"?(0,s.jsxs)("form",{className:"flex flex-col gap-3",onSubmit:l(r=>{r.preventDefault(),R&&f({action:"submit",values:m})},"onSubmit"),children:[h.map(r=>{const v=`${e.id}:${r.name}`;return(0,s.jsxs)("label",{className:"flex flex-col gap-1.5 text-sm",htmlFor:v,children:[(0,s.jsx)("span",{className:"font-medium text-ink",children:r.label}),(0,s.jsx)(re,{id:v,value:m[r.name]??"",placeholder:r.placeholder??void 0,disabled:!a||d,rows:2,className:"resize-y border-0 bg-bg-3/35 shadow-none focus-visible:ring-0 focus-visible:ring-offset-0",onChange:l(M=>b(D=>({...D,[r.name]:M.target.value})),"onChange")})]},r.name)}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,s.jsx)(p,{type:"submit",size:"sm",disabled:!a||d||!R,children:d?"Submitting…":"Submit response"}),e.choices.some(r=>r.key==="decline")?(0,s.jsx)(p,{type:"button",size:"sm",variant:"secondary",disabled:!a||d,onClick:l(()=>{f({action:"decline"})},"onClick"),children:"Deny"}):null,t==="timeline"?(0,s.jsx)(p,{type:"button",size:"sm",variant:"secondary",disabled:!a||d,onClick:l(()=>{f({action:"cancel"})},"onClick"),children:"Cancel"}):null]})]}):e.status==="pending"&&e.choices.length>0?(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:e.choices.filter(r=>t==="timeline"||r.key!=="cancel").map(r=>(0,s.jsx)(p,{type:"button",size:"sm",variant:"secondary",disabled:e.status!=="pending"||!a||d,onClick:l(()=>{(r.key==="accept"||r.key==="accept_for_session"||r.key==="decline"||r.key==="cancel")&&f({action:r.key})},"onClick"),children:d?"Submitting…":r.label},r.key))}):null,e.status==="pending"&&!a?(0,s.jsx)("p",{className:"mt-2 text-xs text-ink-3",children:"Resolve this request in the active runtime session."}):null,$?(0,s.jsx)("p",{className:"mt-2 text-xs text-bad",role:"alert",children:$}):null]})}l(be,"RuntimeRequestCard");function ve({item:e}){const a=e.verification.length>0||e.remainingWork.length>0||e.artifacts.length>0||e.blocker;return(0,s.jsx)(j,{icon:w,title:"Run result",status:e.disposition,summary:e.summary,testId:"task-chat-run-result",children:a?(0,s.jsxs)("div",{className:"flex flex-col gap-3 text-sm",children:[e.blocker?(0,s.jsxs)("div",{className:"rounded-sm bg-bg-3/50 p-2",children:[(0,s.jsxs)("strong",{children:["Blocked: ",e.blocker.reasonCode]}),(0,s.jsx)("p",{className:"mt-1 text-ink-3",children:e.blocker.unblockAction})]}):null,e.verification.length>0?(0,s.jsx)("ul",{className:"flex flex-col gap-1","aria-label":"Verification results",children:e.verification.map((t,n)=>(0,s.jsxs)("li",{className:"flex items-start gap-2",children:[(0,s.jsx)(N,{status:t.status,className:"mt-0.5 shrink-0"}),(0,s.jsxs)("span",{children:[(0,s.jsx)("span",{className:"font-mono text-xs",children:t.commandOrCheck}),t.detail?(0,s.jsx)("span",{className:"block text-xs text-ink-3",children:t.detail}):null]})]},`${t.commandOrCheck}:${n}`))}):null,e.remainingWork.length>0?(0,s.jsx)("ul",{className:"list-disc space-y-1 pl-5 text-ink-3",children:e.remainingWork.map((t,n)=>(0,s.jsxs)("li",{children:[t.description,t.blocksCompletion?" · blocks completion":""]},`${t.description}:${n}`))}):null,e.artifacts.length>0?(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:e.artifacts.map(t=>(0,s.jsx)("span",{className:"rounded-sm border border-line px-2 py-1 font-mono text-xs",children:t.title??t.ref},`${t.kind}:${t.ref}`))}):null]}):null})}l(ve,"ResultCard");function Ne({item:e}){return(0,s.jsx)(j,{icon:_,title:"Run ended",status:e.runState,summary:[e.disposition.replaceAll("_"," "),e.stopReason].filter(Boolean).join(" · "),testId:"task-chat-run-terminal"})}l(Ne,"TerminalCard");function we({item:e}){if(e.resourceKind==="deliverable"&&e.workProduct)return(0,s.jsx)(se,{workProduct:e.workProduct,href:e.href});const a=e.resourceKind==="document"?S:e.resourceKind==="attachment"?I:w,t=(0,s.jsx)(j,{icon:a,title:e.title,status:null,summary:e.subtitle,testId:`task-chat-resource-${e.resourceKind}`});return e.href?(0,s.jsx)("a",{className:"block rounded-md focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus",href:e.href,children:t}):t}l(we,"ResourceCard");function Ue({item:e,onRuntimeRequestDecision:a,presentation:t="timeline",draftKey:n,imageUploadHandler:c,mentions:o}){switch(e.surface){case"provider_activity":return(0,s.jsx)(he,{item:e});case"workspace_change":return(0,s.jsx)(fe,{item:e});case"workspace_file":return(0,s.jsx)(ge,{item:e});case"runtime_request":return(0,s.jsx)(be,{item:e,onDecision:a,presentation:t,draftKey:n,imageUploadHandler:c,mentions:o});case"run_result":return(0,s.jsx)(ve,{item:e});case"run_terminal":return(0,s.jsx)(Ne,{item:e});case"resource":return(0,s.jsx)(we,{item:e});default:return e}}l(Ue,"TaskChatProtocolCard");export{Ue as n,w as r,N as t};
|
|
1
|
+
var L=Object.defineProperty;var l=(e,a)=>L(e,"name",{value:a,configurable:!0});import{i as P}from"./rolldown-runtime-ZpX3ckPj.js";import{l as u,na as O,t as V,ta as H}from"./createLucideIcon-DJi9suAC.js";import{ot as C}from"./router-2UfGeejU.js";import{t as T}from"./bot-C9arfJWx.js";import{t as G}from"./check-Ctsrlfa-.js";import{t as U}from"./chevron-down-BCvxsWfI.js";import{t as X}from"./chevron-right-s7L6hXXq.js";import{t as Y}from"./circle-question-mark-B1jR2is9.js";import{t as J}from"./circle-IAHLDvLO.js";import{o as Z,t as K}from"./MarkdownBody-BTjuUgFa.js";import{t as ee}from"./external-link-nl1b263c.js";import{t as I}from"./file-code-corner-CmZ_RihF.js";import{t as S}from"./file-text-Cw7ntqRx.js";import{t as se}from"./RichWorkProductCard-ClpMt_Bh.js";import{n as te,t as z}from"./QuestionForm-B8-PWz3B.js";import{r as ne,t as p}from"./button-CMwV3L1P.js";import{t as q}from"./shield-check-B0HVjzM_.js";import{t as ae}from"./triangle-alert-CBVKiaXB.js";import{t as le}from"./x-DRDFdlYE.js";import{a as F,n as B,s as W,t as A}from"./dialog-CKUblzlR.js";import{t as re}from"./textarea-BRPEfJ-g.js";import{_ as ie,a as oe,f as ce,r as de}from"./TaskChatComposerTakeoverContext-BJAHPHve.js";import{Ba as ue,ya as _}from"./index-3AxqhPET.js";var Q={name:"package-check",size:24,node:[["path",{d:"M12 22V12",key:"d0xqtd"}],["path",{d:"m16 17 2 2 4-4",key:"uh5qu3"}],["path",{d:"M21 11.127V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.729l7 4a2 2 0 0 0 2 .001l1.32-.753",key:"kpkbpo"}],["path",{d:"M3.29 7 12 12l8.71-5",key:"19ckod"}],["path",{d:"m7.5 4.27 8.997 5.148",key:"9yrvtv"}]]};Q.node;var w=V(Q),x=P(O(),1),s=P(H(),1),xe={plan:C,tool_execution:_,research:S,delegation:T,model_identity:T,context:w,artifact:w,review:q,hook:C,memory:S,safety:q,terminal:_,wait:ue,provider_notice:ae};function g(e){return["failed","blocked","denied","cancelled","interrupted"].includes(e)?"text-bad":["running","pending","in_progress","waiting"].includes(e)?"text-(--status-agent-running)":["completed","done","succeeded","passed","resolved"].includes(e)?"text-(--status-task-icon-done)":"text-ink-3"}l(g,"statusTone");function N({status:e,className:a}){return["running","pending","in_progress","waiting"].includes(e)?(0,s.jsx)(ne,{"aria-hidden":!0,className:u("h-4 w-4 animate-spin",g(e),a)}):["failed","blocked","denied","cancelled","interrupted"].includes(e)?(0,s.jsx)(le,{"aria-hidden":!0,className:u("h-4 w-4",g(e),a)}):["completed","done","succeeded","passed","resolved"].includes(e)?(0,s.jsx)(G,{"aria-hidden":!0,className:u("h-4 w-4",g(e),a)}):(0,s.jsx)(J,{"aria-hidden":!0,className:u("h-4 w-4",g(e),a)})}l(N,"StatusIcon");function j({icon:e,title:a,status:t,summary:n,children:c,testId:o,presentation:k="timeline"}){const h=(0,s.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,s.jsx)(e,{"aria-hidden":!0,className:"h-4 w-4 shrink-0 text-ink-3"}),(0,s.jsx)("strong",{className:"min-w-0 truncate text-sm font-medium text-ink",children:a}),t&&t!=="pending"?(0,s.jsxs)("span",{className:u("inline-flex shrink-0 items-center gap-1 text-xs capitalize",g(t)),children:[(0,s.jsx)(N,{status:t,className:"h-3.5 w-3.5"}),t.replaceAll("_"," ")]}):null]});return k==="takeover"?(0,s.jsxs)("article",{className:"overflow-hidden","data-testid":o,children:[(0,s.jsx)(de,{children:h}),n?(0,s.jsx)("p",{className:u("text-sm text-ink-3",!!c&&"mb-3"),children:n}):null,c]}):(0,s.jsxs)("article",{className:u("overflow-hidden",k==="timeline"&&"rounded-md border border-line bg-bg-2/60"),"data-testid":o,children:[(0,s.jsxs)("header",{className:"flex min-w-0 items-start gap-2 px-3 py-2.5",children:[(0,s.jsx)(e,{"aria-hidden":!0,className:"mt-0.5 h-4 w-4 shrink-0 text-ink-3"}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-x-2 gap-y-1",children:[(0,s.jsx)("strong",{className:"text-sm font-medium text-ink",children:a}),t?(0,s.jsxs)("span",{className:u("inline-flex items-center gap-1 text-xs capitalize",g(t)),children:[(0,s.jsx)(N,{status:t,className:"h-3.5 w-3.5"}),t.replaceAll("_"," ")]}):null]}),n?(0,s.jsx)("p",{className:"mt-1 text-sm text-ink-3",children:n}):null]})]}),c?(0,s.jsx)("div",{className:"border-t border-line/70 px-3 py-2.5",children:c}):null]})}l(j,"CardShell");function pe({steps:e}){return e.length===0?null:(0,s.jsx)("ol",{className:"flex flex-col gap-1.5","aria-label":"Plan steps",children:e.map(a=>(0,s.jsxs)("li",{className:"flex items-start gap-2 text-sm",children:[(0,s.jsx)(N,{status:a.status,className:"mt-0.5 shrink-0"}),(0,s.jsx)("span",{className:u("min-w-0 flex-1",a.status==="completed"&&"text-ink-3 line-through"),children:a.label})]},a.id))})}l(pe,"PlanSteps");function he({item:e}){const a=xe[e.family],t=e.details.length>0||e.links.length>0||e.children.length>0||!!e.output;return(0,s.jsxs)(j,{icon:a,title:e.title,status:e.status,summary:e.summary,testId:`task-chat-provider-${e.family}`,children:[e.steps.length>0?(0,s.jsx)(pe,{steps:e.steps}):null,e.children.length>0?(0,s.jsx)("ul",{className:"flex flex-col gap-2","aria-label":"Delegated agents",children:e.children.map(n=>(0,s.jsxs)("li",{className:"rounded-sm bg-bg-3/40 px-2.5 py-2 text-sm",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(N,{status:n.status,className:"shrink-0"}),(0,s.jsx)("strong",{className:"font-medium",children:n.title}),(0,s.jsx)("span",{className:u("ml-auto text-xs capitalize",g(n.status)),children:n.status})]}),n.metadata?(0,s.jsx)("p",{className:"mt-1 text-xs text-ink-3",children:n.metadata}):null,n.summary?(0,s.jsx)("p",{className:"mt-1 text-sm text-ink-3",children:n.summary}):null]},n.id))}):null,e.links.length>0?(0,s.jsx)("ul",{className:"flex flex-col gap-2","aria-label":"Research sources",children:e.links.map(n=>(0,s.jsxs)("li",{children:[(0,s.jsxs)("a",{className:"inline-flex items-center gap-1 text-sm font-medium text-accent hover:underline",href:n.href,target:"_blank",rel:"noreferrer",children:[n.label,(0,s.jsx)(ee,{"aria-hidden":!0,className:"h-3.5 w-3.5"})]}),n.description?(0,s.jsx)("p",{className:"text-xs text-ink-3",children:n.description}):null]},n.href))}):null,t?(0,s.jsxs)("details",{className:u((e.steps.length>0||e.links.length>0||e.children.length>0)&&"mt-2"),children:[(0,s.jsxs)("summary",{className:"flex cursor-pointer list-none items-center gap-1 text-xs font-medium text-ink-3",children:[(0,s.jsx)(U,{"aria-hidden":!0,className:"h-3.5 w-3.5"})," Details"]}),e.details.length>0?(0,s.jsx)("dl",{className:"mt-2 flex min-w-0 flex-col gap-1.5 text-xs",children:e.details.map(n=>(0,s.jsxs)("div",{className:"grid min-w-0 grid-cols-1 gap-0.5 sm:grid-cols-(--gtc-task-chat-details) sm:gap-3",children:[(0,s.jsx)("dt",{className:"text-ink-3",children:n.label}),(0,s.jsx)("dd",{className:u("min-w-0 break-words text-ink",n.mono&&"font-mono"),children:n.value})]},`${n.label}:${n.value}`))}):null,e.output?(0,s.jsx)("pre",{className:"mt-2 max-h-(--sz-64) overflow-auto whitespace-pre-wrap rounded-sm bg-bg-3/50 p-2 font-mono text-xs text-ink",children:e.output}):null,e.outputTruncated?(0,s.jsx)("p",{className:"mt-1 text-xs text-ink-3",children:"Output truncated to 8 KiB."}):null]}):null]})}l(he,"ProviderActivityCard");function me(e){return(0,s.jsxs)("span",{className:"shrink-0 font-mono text-xs text-ink-3",children:[e.additions==null?"":`+${e.additions}`,e.additions!=null&&e.deletions!=null?" ":"",e.deletions==null?"":`−${e.deletions}`]})}l(me,"diffStats");function fe({item:e}){const[a,t]=(0,x.useState)(null),[n,c]=(0,x.useState)(!1),o=e.files.find(i=>i.path===a)??null,k=n?e.files:e.files.slice(0,3),h=e.totals.files||e.files.length,m=`${h} ${h===1?"file":"files"}`,b=[e.totals.additions==null?null:`+${e.totals.additions}`,e.totals.deletions==null?null:`−${e.totals.deletions}`].filter(Boolean).join(" "),d=e.complete?`${m} changed${b?` · ${b}`:""}`:"Workspace changes in progress";return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(j,{icon:C,title:"Workspace changes",status:e.complete?"completed":"running",summary:d,testId:"task-chat-workspace-change",children:[(0,s.jsx)("div",{className:"flex flex-col gap-1",children:k.map(i=>(0,s.jsxs)("button",{type:"button",className:"flex min-w-0 items-center gap-2 rounded-sm px-2 py-1.5 text-left text-sm hover:bg-bg-3/60",onClick:l(()=>t(i.path),"onClick"),children:[(0,s.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,s.jsx)("span",{className:"block truncate font-mono",children:i.previousPath?`${i.previousPath} → ${i.path}`:i.path}),(0,s.jsxs)("span",{className:"text-xs capitalize text-ink-3",children:[i.binary?"binary · ":"",i.operation.replaceAll("_"," ")]})]}),me(i)]},`${i.operation}:${i.path}`))}),(0,s.jsxs)("div",{className:"mt-2 flex flex-wrap items-center gap-2",children:[e.files.length>3?(0,s.jsx)(p,{type:"button",size:"sm",variant:"ghost",onClick:l(()=>c(i=>!i),"onClick"),children:n?"Show fewer files":`Show ${e.files.length-3} more files`}):null,e.files.length>0?(0,s.jsx)(p,{type:"button",size:"sm",variant:"secondary",onClick:l(()=>t(e.files[0].path),"onClick"),children:"Review diff"}):null]})]}),(0,s.jsx)(A,{open:o!==null,onOpenChange:l(i=>{i||t(null)},"onOpenChange"),children:(0,s.jsxs)(B,{className:"w-full max-w-(--pct-90) overflow-hidden",children:[(0,s.jsx)(F,{children:(0,s.jsx)(W,{className:"font-mono text-sm",children:o?.path??"Workspace diff"})}),e.files.length>1?(0,s.jsx)("div",{className:"flex max-w-full gap-1 overflow-x-auto pb-1","aria-label":"Changed files",children:e.files.map(i=>(0,s.jsx)(p,{type:"button",size:"sm",variant:i.path===o?.path?"secondary":"ghost",onClick:l(()=>t(i.path),"onClick"),children:i.path},i.path))}):null,o?.binary?(0,s.jsx)("p",{className:"rounded-sm bg-bg-3/50 p-3 text-sm text-ink-3",children:"Binary file; text diff is unavailable."}):o?.diff?(0,s.jsx)("pre",{className:"max-h-(--sz-70vh) overflow-auto whitespace-pre rounded-sm bg-bg-3/50 p-3 font-mono text-xs",children:o.diff}):(0,s.jsx)("p",{className:"rounded-sm bg-bg-3/50 p-3 text-sm text-ink-3",children:"No inline patch was recorded for this file."})]})})]})}l(fe,"WorkspaceChangeCard");function ge({item:e}){const[a,t]=(0,x.useState)(!1),n=e.displayName.includes(".")?e.displayName.split(".").at(-1)?.toUpperCase():"FILE",c=e.presentation==="generic"?"File":je(e.presentation),o=(0,x.useMemo)(()=>({path:e.path,resourceKind:"file",line:e.line,column:null,raw:e.path}),[e.line,e.path]);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(j,{icon:I,title:e.displayName,status:e.source==="runner_verified"?"completed":"informational",summary:`${c} · ${n}${e.line?` · line ${e.line}`:""}`,testId:"task-chat-workspace-file",children:(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,s.jsx)(Z,{workspaceFileRef:o,label:e.path}),(0,s.jsx)(p,{className:"ml-auto",type:"button",size:"sm",variant:"secondary",onClick:l(()=>t(!0),"onClick"),children:"Preview"})]})}),(0,s.jsx)(A,{open:a,onOpenChange:t,children:(0,s.jsxs)(B,{className:"w-full max-w-(--pct-90) overflow-hidden",children:[(0,s.jsx)(F,{children:(0,s.jsx)(W,{children:e.displayName})}),(0,s.jsx)("p",{className:"font-mono text-xs text-ink-3",children:e.path}),e.preview==null?(0,s.jsx)("p",{className:"rounded-sm bg-bg-3/50 p-3 text-sm text-ink-3",children:"Preview unavailable. The verified workspace reference is still available above."}):e.presentation==="document"?(0,s.jsx)("div",{className:"max-h-(--sz-70vh) overflow-auto rounded-sm bg-bg-3/30 p-3",children:(0,s.jsx)(K,{children:e.preview})}):e.presentation==="image"&&e.mediaType?.startsWith("image/")&&e.preview.startsWith("data:")?(0,s.jsx)("img",{className:"max-h-(--sz-70vh) max-w-full object-contain",alt:e.displayName,src:e.preview}):(0,s.jsx)("pre",{className:"max-h-(--sz-70vh) overflow-auto whitespace-pre-wrap rounded-sm bg-bg-3/50 p-3 font-mono text-xs",children:e.preview}),e.previewTruncated?(0,s.jsx)("p",{className:"text-xs text-ink-3",children:"Preview truncated by the runner."}):null]})})]})}l(ge,"WorkspaceFileCard");function je(e){return e.replaceAll("_"," ").replace(/\b\w/g,a=>a.toUpperCase())}l(je,"titleCaseKey");function E({item:e}){const a=e.questionSet;return a?(0,s.jsx)("div",{className:"flex flex-col gap-2","data-testid":"task-chat-runtime-request-history",children:e.response?(0,s.jsx)(te,{questionSet:a,response:e.response}):(0,s.jsxs)("div",{className:"flex flex-col gap-2 text-sm",children:[a.questions.map(t=>(0,s.jsxs)("div",{children:[t.header?(0,s.jsx)("p",{className:"text-xs font-medium text-ink-3",children:t.header}):null,(0,s.jsx)("p",{className:"text-ink",children:t.prompt})]},t.id)),(0,s.jsx)("p",{className:"text-xs text-ink-3",children:e.status==="resolved"?"Answer details were not recorded by this older runtime.":`No answers were submitted; this request was ${e.status}.`})]})}):null}l(E,"RuntimeQuestionHistory");function ke({item:e}){const a=e.status==="resolved"?"Questions answered":e.status==="cancelled"?"Questions cancelled":e.status==="expired"?"Questions expired":"Questions resolved";return(0,s.jsxs)("details",{className:"group","data-testid":"task-chat-runtime-request",children:[(0,s.jsxs)("summary",{className:"flex min-h-8 cursor-pointer list-none items-center gap-2 rounded-sm px-1 py-1.5 text-sm leading-5 text-ink-3 transition-colors hover:text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus",children:[(0,s.jsx)("span",{className:"flex w-6 shrink-0 items-center justify-center","data-testid":"task-chat-runtime-request-icon-slot",children:(0,s.jsx)(Y,{"aria-hidden":!0,className:"h-3.5 w-3.5 shrink-0 text-ink-3","data-testid":"task-chat-runtime-request-icon"})}),(0,s.jsx)("span",{children:a}),(0,s.jsx)(X,{"aria-hidden":!0,className:"ml-auto h-3 w-3 shrink-0 text-ink-3 opacity-0 transition-[opacity,transform] group-hover:opacity-70 group-focus-visible:opacity-70 group-open:rotate-90","data-testid":"task-chat-runtime-request-caret"})]}),(0,s.jsxs)("div",{className:"pb-3 pl-7 pr-1",children:[(0,s.jsxs)("div",{className:"mb-3",children:[(0,s.jsx)("p",{className:"text-sm font-medium text-ink",children:e.questionSet?.title??"Runtime input"}),(0,s.jsx)("p",{className:"mt-1 text-sm text-ink-3",children:e.prompt})]}),(0,s.jsx)(E,{item:e})]})]})}l(ke,"RuntimeQuestionReceipt");function be({item:e,onDecision:a,presentation:t,draftKey:n,imageUploadHandler:c,mentions:o}){const k=e.questionSet?.title??(e.requestType==="permission"?"Runtime permission":"Runtime input"),h=e.fields.length>0?e.fields:[{name:"answer",label:"Response",placeholder:null}],[m,b]=(0,x.useState)(()=>n?ce(n,{}):{}),[d,i]=(0,x.useState)(!1),[$,y]=(0,x.useState)(null);if((0,x.useEffect)(()=>{n||b({}),i(!1),y(null)},[n,e.requestId,e.status]),(0,x.useEffect)(()=>{n&&ie(n,m)},[n,m]),t==="timeline"&&e.requestType==="input"&&e.status!=="pending"&&e.questionSet)return(0,s.jsx)(ke,{item:e});const f=l(async r=>{if(!(!a||e.status!=="pending"||d)){i(!0),y(null);try{await a(e,r),n&&oe(n)}catch(v){i(!1),y(v instanceof Error?v.message:"The runtime request could not be resolved.")}}},"submit"),R=h.some(r=>(m[r.name]??"").trim().length>0);return t==="takeover"&&e.requestType==="input"&&e.status==="pending"&&e.questionSet?(0,s.jsx)(z,{id:e.id,questionSet:e.questionSet,draftKey:n,disabled:!a||d,imageUploadHandler:c,mentions:o,onSubmit:l(r=>f({action:"submit",response:r}),"onSubmit")}):(0,s.jsxs)(j,{icon:q,title:k,status:e.status,summary:e.prompt,testId:"task-chat-runtime-request",presentation:t,children:[e.requestType==="input"&&e.status==="pending"&&e.questionSet?(0,s.jsx)(z,{id:e.id,questionSet:e.questionSet,draftKey:n,disabled:!a||d,imageUploadHandler:c,mentions:o,onSubmit:l(r=>f({action:"submit",response:r}),"onSubmit"),onCancel:t==="timeline"?()=>f({action:"cancel"}):void 0}):e.requestType==="input"&&e.status!=="pending"&&e.questionSet?(0,s.jsx)(E,{item:e}):e.requestType==="input"&&e.status==="pending"?(0,s.jsxs)("form",{className:"flex flex-col gap-3",onSubmit:l(r=>{r.preventDefault(),R&&f({action:"submit",values:m})},"onSubmit"),children:[h.map(r=>{const v=`${e.id}:${r.name}`;return(0,s.jsxs)("label",{className:"flex flex-col gap-1.5 text-sm",htmlFor:v,children:[(0,s.jsx)("span",{className:"font-medium text-ink",children:r.label}),(0,s.jsx)(re,{id:v,value:m[r.name]??"",placeholder:r.placeholder??void 0,disabled:!a||d,rows:2,className:"resize-y border-0 bg-bg-3/35 shadow-none focus-visible:ring-0 focus-visible:ring-offset-0",onChange:l(M=>b(D=>({...D,[r.name]:M.target.value})),"onChange")})]},r.name)}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,s.jsx)(p,{type:"submit",size:"sm",disabled:!a||d||!R,children:d?"Submitting…":"Submit response"}),e.choices.some(r=>r.key==="decline")?(0,s.jsx)(p,{type:"button",size:"sm",variant:"secondary",disabled:!a||d,onClick:l(()=>{f({action:"decline"})},"onClick"),children:"Deny"}):null,t==="timeline"?(0,s.jsx)(p,{type:"button",size:"sm",variant:"secondary",disabled:!a||d,onClick:l(()=>{f({action:"cancel"})},"onClick"),children:"Cancel"}):null]})]}):e.status==="pending"&&e.choices.length>0?(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:e.choices.filter(r=>t==="timeline"||r.key!=="cancel").map(r=>(0,s.jsx)(p,{type:"button",size:"sm",variant:"secondary",disabled:e.status!=="pending"||!a||d,onClick:l(()=>{(r.key==="accept"||r.key==="accept_for_session"||r.key==="decline"||r.key==="cancel")&&f({action:r.key})},"onClick"),children:d?"Submitting…":r.label},r.key))}):null,e.status==="pending"&&!a?(0,s.jsx)("p",{className:"mt-2 text-xs text-ink-3",children:"Resolve this request in the active runtime session."}):null,$?(0,s.jsx)("p",{className:"mt-2 text-xs text-bad",role:"alert",children:$}):null]})}l(be,"RuntimeRequestCard");function ve({item:e}){const a=e.verification.length>0||e.remainingWork.length>0||e.artifacts.length>0||e.blocker;return(0,s.jsx)(j,{icon:w,title:"Run result",status:e.disposition,summary:e.summary,testId:"task-chat-run-result",children:a?(0,s.jsxs)("div",{className:"flex flex-col gap-3 text-sm",children:[e.blocker?(0,s.jsxs)("div",{className:"rounded-sm bg-bg-3/50 p-2",children:[(0,s.jsxs)("strong",{children:["Blocked: ",e.blocker.reasonCode]}),(0,s.jsx)("p",{className:"mt-1 text-ink-3",children:e.blocker.unblockAction})]}):null,e.verification.length>0?(0,s.jsx)("ul",{className:"flex flex-col gap-1","aria-label":"Verification results",children:e.verification.map((t,n)=>(0,s.jsxs)("li",{className:"flex items-start gap-2",children:[(0,s.jsx)(N,{status:t.status,className:"mt-0.5 shrink-0"}),(0,s.jsxs)("span",{children:[(0,s.jsx)("span",{className:"font-mono text-xs",children:t.commandOrCheck}),t.detail?(0,s.jsx)("span",{className:"block text-xs text-ink-3",children:t.detail}):null]})]},`${t.commandOrCheck}:${n}`))}):null,e.remainingWork.length>0?(0,s.jsx)("ul",{className:"list-disc space-y-1 pl-5 text-ink-3",children:e.remainingWork.map((t,n)=>(0,s.jsxs)("li",{children:[t.description,t.blocksCompletion?" · blocks completion":""]},`${t.description}:${n}`))}):null,e.artifacts.length>0?(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:e.artifacts.map(t=>(0,s.jsx)("span",{className:"rounded-sm border border-line px-2 py-1 font-mono text-xs",children:t.title??t.ref},`${t.kind}:${t.ref}`))}):null]}):null})}l(ve,"ResultCard");function Ne({item:e}){return(0,s.jsx)(j,{icon:_,title:"Run ended",status:e.runState,summary:[e.disposition.replaceAll("_"," "),e.stopReason].filter(Boolean).join(" · "),testId:"task-chat-run-terminal"})}l(Ne,"TerminalCard");function we({item:e}){if(e.resourceKind==="deliverable"&&e.workProduct)return(0,s.jsx)(se,{workProduct:e.workProduct,href:e.href});const a=e.resourceKind==="document"?S:e.resourceKind==="attachment"?I:w,t=(0,s.jsx)(j,{icon:a,title:e.title,status:null,summary:e.subtitle,testId:`task-chat-resource-${e.resourceKind}`});return e.href?(0,s.jsx)("a",{className:"block rounded-md focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus",href:e.href,children:t}):t}l(we,"ResourceCard");function Ue({item:e,onRuntimeRequestDecision:a,presentation:t="timeline",draftKey:n,imageUploadHandler:c,mentions:o}){switch(e.surface){case"provider_activity":return(0,s.jsx)(he,{item:e});case"workspace_change":return(0,s.jsx)(fe,{item:e});case"workspace_file":return(0,s.jsx)(ge,{item:e});case"runtime_request":return(0,s.jsx)(be,{item:e,onDecision:a,presentation:t,draftKey:n,imageUploadHandler:c,mentions:o});case"run_result":return(0,s.jsx)(ve,{item:e});case"run_terminal":return(0,s.jsx)(Ne,{item:e});case"resource":return(0,s.jsx)(we,{item:e});default:return e}}l(Ue,"TaskChatProtocolCard");export{Ue as n,w as r,N as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var ve=Object.defineProperty;var l=(e,n)=>ve(e,"name",{value:n,configurable:!0});import{i as de}from"./rolldown-runtime-ZpX3ckPj.js";import{l as v,na as we,t as je,ta as ye}from"./createLucideIcon-DJi9suAC.js";import{a as Ne,o as Se}from"./star-BZgQbzhV.js";import{n as Ce}from"./ArtifactCard-
|
|
1
|
+
var ve=Object.defineProperty;var l=(e,n)=>ve(e,"name",{value:n,configurable:!0});import{i as de}from"./rolldown-runtime-ZpX3ckPj.js";import{l as v,na as we,t as je,ta as ye}from"./createLucideIcon-DJi9suAC.js";import{a as Ne,o as Se}from"./star-BZgQbzhV.js";import{n as Ce}from"./ArtifactCard-BTf2-JIV.js";import{G as Te,_t as V,an as Ie,et as Re}from"./router-2UfGeejU.js";import{o as _e,r as Ae,t as Me}from"./popover-BhYHYj7q.js";import{t as Ee}from"./arrow-down-Dg4PKbmt.js";import{t as U}from"./check-Ctsrlfa-.js";import{t as Le}from"./chevron-down-BCvxsWfI.js";import{t as G}from"./chevron-right-s7L6hXXq.js";import{i as $e,o as ue}from"./tool-taxonomy-B5zpbkHA.js";import{t as P}from"./MarkdownBody-BTjuUgFa.js";import{t as Oe}from"./copy-_wvZOjTe.js";import{_ as Pe,a as He,c as ze,f as De,g as Be,h as Fe,l as We,m as Ke,n as Ue,o as te,p as Ge,r as Ve,s as F,t as qe}from"./task-chat-attachments-jZNCAKd4.js";import{i as Xe,l as Ye,n as Je,o as Qe,r as Ze,t as et}from"./TaskChatMarker-C40twVjh.js";import{i as tt}from"./RichWorkProductCard-ClpMt_Bh.js";import{t as Y}from"./info-DXpx_HA2.js";import{t as nt}from"./list-todo-BmObdeVq.js";import{r as H,t as J}from"./button-CMwV3L1P.js";import{t as at}from"./maximize-2-DgliXYEr.js";import{t as st}from"./octagon-alert-CeNhknXC.js";import{t as rt}from"./octagon-x-CBcXy1zJ.js";import{n as it}from"./TaskChatProtocolCard--bi_tc6i.js";import{t as lt}from"./shield-check-B0HVjzM_.js";import{t as ot}from"./shield-question-mark-D1_en6pn.js";import{t as ct}from"./shield-x-D-Ice3nf.js";import{t as dt}from"./triangle-alert-CBVKiaXB.js";import{t as z}from"./x-DRDFdlYE.js";import{t as ut}from"./Identity-Cv_2a9qJ.js";import{t as mt}from"./AgentAvatar-DgGEobSY.js";import{n as D}from"./presentation-mode-Bk6TnKr9.js";import{t as ht}from"./use-copy-action-D5dEzo6L.js";import{_ as pt,c as xt,d as ft,h as gt,i as kt,n as bt,o as vt,p as wt}from"./system-notice-comment-CL_SWj_f.js";import{d as jt,s as yt,t as Nt}from"./ImageGalleryModal-DzKBMOnu.js";import{b as St,s as Ct}from"./transcript-adapter-C29ZJiU2.js";import{s as ne}from"./issue-output-CU3gasZ1.js";import{n as Tt}from"./AgentBubbleActionRow-BUAUmJKa.js";var me={name:"scissors",size:24,node:[["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M8.12 8.12 12 12",key:"1alkpv"}],["path",{d:"M20 4 8.12 15.88",key:"xgtan2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M14.8 14.8 20 20",key:"ptml3r"}]]};me.node;var It=je(me),c=de(we(),1),t=de(ye(),1);function Rt(e,n,a){for(const r of e.querySelectorAll("[data-thread-anchor]")){const i=r.getBoundingClientRect();if(i.height>0&&i.bottom>n&&i.top<a)return{id:r.dataset.threadAnchor,top:i.top-n}}return null}l(Rt,"readThreadScrollAnchor");function he(e,n,a){if(!n)return 0;for(const r of e.querySelectorAll("[data-thread-anchor]"))if(r.dataset.threadAnchor===n.id)return r.getBoundingClientRect().top-a-n.top;return 0}l(he,"threadScrollAnchorDelta");var _t=(0,c.createContext)(null),At=(0,c.createContext)(!0);function aa(e){const n=e.state&&typeof e.state=="object"&&"taskDocumentScrollEntry"in e.state?e.state.taskDocumentScrollEntry:null;return n&&typeof n=="object"&&"key"in n&&"hash"in n&&"pathname"in n&&n.pathname===e.pathname&&typeof n.key=="string"&&typeof n.hash=="string"?{key:n.key,hash:n.hash,pathname:e.pathname}:{key:e.key,hash:e.hash,pathname:e.pathname}}l(aa,"taskChatScrollEntry");var $=new Map;function Mt(){const e=(0,c.useContext)(_t),n=(0,c.useContext)(At),a=e?JSON.stringify([e.key,e.hash]):null;return{key:e?.key,hash:e?.hash,ready:n,initialPosition(r,i,m){if(!e)return null;if(e.restore&&a&&$.has(a)){const d=$.get(a);return d.anchor&&[...r.querySelectorAll("[data-thread-anchor]")].some(u=>u.dataset.threadAnchor===d.anchor?.id)?m+he(r,d.anchor,i):d.top}if(e.hash){let d;try{d=decodeURIComponent(e.hash.slice(1))}catch{return null}const u=document.getElementById(d);if(u&&r.contains(u))return m+u.getBoundingClientRect().top-i}return null},remember(r,i){!a||!n||($.set(a,{top:r,anchor:i}),$.size>100&&$.delete($.keys().next().value))}}}l(Mt,"useTaskChatScrollNavigation");var Et={pending:{Icon:H,spin:!1,tone:"text-ink-3"},in_progress:{Icon:H,spin:!0,tone:"text-(--status-agent-running)"},completed:{Icon:U,spin:!1,tone:"text-ink-3"},failed:{Icon:z,spin:!1,tone:"text-bad"},interrupted:{Icon:z,spin:!1,tone:"text-ink-3"}};function Lt({item:e}){const{Icon:n,spin:a,tone:r}=Et[e.status],i=ue(e.rawName??e.name).icon,[m,d]=Ye(e.id,!1),u=!!(e.target||e.detail||e.diff);return(0,t.jsxs)("div",{"data-testid":"task-chat-tool-card",className:"flex min-w-0 max-w-full flex-col text-xs",children:[(0,t.jsxs)("button",{type:"button",onClick:u?()=>d(g=>!g):void 0,"aria-expanded":u?m:void 0,className:v("group/tool -mx-1.5 flex min-h-6 w-full min-w-0 max-w-full items-center gap-2 overflow-hidden rounded-sm px-1.5 py-1 text-left leading-none text-ink-3",u?"cursor-pointer transition-colors hover:bg-bg-3/60 hover:text-ink":"cursor-default"),children:[(0,t.jsx)("span",{className:"flex w-5 shrink-0 items-center justify-center",children:(0,t.jsx)(i,{className:"h-3.5 w-3.5 shrink-0","aria-hidden":!0,"data-testid":"task-chat-tool-icon"})}),(0,t.jsxs)("span",{className:"flex min-w-0 flex-1 items-baseline gap-2 overflow-hidden",children:[(0,t.jsx)("span",{className:"shrink-0 font-medium leading-4",children:e.name}),e.target?(0,t.jsx)("span",{className:"task-chat-collapsed-line-fade min-w-0 flex-1 font-mono text-(length:--text-micro) leading-4",children:e.target}):null]}),(0,t.jsxs)("span",{className:"ml-auto flex shrink-0 items-center gap-2",children:[e.decision?(0,t.jsxs)("span",{className:v("flex items-center gap-1 text-(length:--text-micro)",e.decision==="allowed"?"text-(--status-task-icon-done)":"text-bad"),children:[e.decision==="allowed"?(0,t.jsx)(lt,{className:"h-3 w-3"}):(0,t.jsx)(ct,{className:"h-3 w-3"}),e.decision]}):null,u?(0,t.jsx)(G,{className:v("h-3 w-3 opacity-0 transition-[opacity,transform] group-hover/tool:opacity-80",m?"rotate-90":null),"aria-hidden":!0}):null,(0,t.jsx)(n,{className:v("h-3.5 w-3.5",r,a&&"animate-spin"),"aria-hidden":!0}),e.status==="interrupted"?(0,t.jsx)("span",{className:"text-(length:--text-micro) text-ink-3",children:"Interrupted"}):null]})]}),e.target&&m?(0,t.jsx)("div",{className:"task-chat-expanded-line-wrap ml-1.5 mt-0.5 min-w-0 max-w-full overflow-hidden border-l-2 border-line py-1 pl-2.5 font-mono text-(length:--text-micro) leading-relaxed text-ink-3","data-testid":"task-chat-tool-target-detail",children:e.target}):null,e.detail&&m?(0,t.jsx)("pre",{className:"task-chat-expanded-line-wrap ml-1.5 mt-0.5 min-w-0 max-w-full overflow-hidden whitespace-pre-wrap border-l-2 border-line py-1 pl-2.5 font-mono text-(length:--text-micro) leading-relaxed text-ink-3",children:e.detail}):null,e.diff&&m?(0,t.jsx)("div",{className:"ml-1.5 mt-0.5 border-l-2 border-line py-1 pl-2.5","data-testid":"task-chat-tool-change-summary",children:(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-2 text-(length:--text-micro) text-ink-3",children:[(0,t.jsx)("span",{className:"shrink-0",children:"Changed"}),e.diff.path?(0,t.jsx)("span",{className:"min-w-0 truncate font-mono text-ink",children:e.diff.path}):null,(0,t.jsxs)("span",{className:"ml-auto shrink-0 font-mono",children:["+",e.diff.added," −",e.diff.removed]})]})}):null]})}l(Lt,"TaskChatToolCard");function $t({item:e,defaultOpen:n,rowClassName:a,active:r=!!e.streaming}){const[i,m]=(0,c.useState)(n??!1),d=e.lines.join(`
|
|
2
2
|
`).trim(),u=Ct(d),g=e.channel==="detail"?"Reasoning detail":"Reasoning",h=r?d?`${g}…`:"Thinking…":e.summaryLabel??(d?g:"Thought");return d&&!r?(0,t.jsxs)("div",{className:v("flex min-w-0 items-start gap-1.5 px-1 py-0.5 text-xs font-normal text-ink-3",a),"data-testid":"task-chat-thinking","data-state":"settled",children:[(0,t.jsx)("span",{className:"flex w-5 shrink-0 items-center justify-center",children:(0,t.jsx)(V,{className:"mt-0.5 h-3.5 w-3.5 shrink-0 text-ink-3/50","aria-hidden":!0,"data-testid":"task-chat-thinking-icon"})}),(0,t.jsx)("div",{className:"min-w-0 flex-1","data-testid":"task-chat-thinking-text",children:(0,t.jsx)(P,{softBreaks:!0,linkIssueReferences:!0,children:d})})]}):d?(0,t.jsxs)("div",{className:"flex min-w-0 max-w-full flex-col overflow-hidden text-xs font-normal","data-testid":"task-chat-thinking",children:[(0,t.jsxs)("button",{type:"button","aria-expanded":i,"aria-label":`${i?"Collapse":"Expand"} ${g.toLowerCase()}: ${u}`,onClick:l(()=>m(p=>!p),"onClick"),className:v("group/thinking -mx-1.5 flex w-full min-w-0 max-w-full items-center gap-2 overflow-hidden rounded-sm px-1.5 py-0.5 text-left font-normal text-ink-3 transition-colors hover:text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus",a),children:[(0,t.jsx)("span",{className:"flex w-5 shrink-0 items-center justify-center",children:(0,t.jsx)(V,{className:v("h-3.5 w-3.5 shrink-0",r&&"text-(--status-agent-running)"),"aria-hidden":!0,"data-testid":"task-chat-thinking-icon"})}),r?(0,t.jsx)("span",{className:"shimmer-text shimmer-text-muted shrink-0",children:h}):null,i?null:(0,t.jsx)("span",{className:"task-chat-collapsed-line-fade min-w-0 flex-1","data-testid":"task-chat-thinking-preview",children:u}),(0,t.jsx)(G,{className:v("tc-hover-disclosure-caret h-3 w-3 shrink-0 transition-[opacity,transform] group-hover/thinking:opacity-80 group-focus-visible/thinking:opacity-80",i?"rotate-90 opacity-80":"opacity-0"),"aria-hidden":!0})]}),i?(0,t.jsx)("div",{className:"task-chat-expanded-line-wrap ml-2.5 mt-1 min-w-0 max-w-full overflow-hidden border-l-2 border-line pl-2.5 text-xs font-normal text-ink-3",children:(0,t.jsx)(P,{className:"task-chat-reasoning-markdown",softBreaks:!0,linkIssueReferences:!0,children:d})}):null]}):(0,t.jsxs)("div",{className:v("-mx-1.5 flex min-w-0 items-center gap-2 px-1.5 py-0.5 text-xs font-normal text-ink-3",a),"data-testid":"task-chat-thinking",children:[(0,t.jsx)("span",{className:"flex w-5 shrink-0 items-center justify-center",children:(0,t.jsx)(V,{className:v("h-3.5 w-3.5 shrink-0",r&&"text-(--status-agent-running)"),"aria-hidden":!0,"data-testid":"task-chat-thinking-icon"})}),(0,t.jsx)("span",{className:v(r&&"shimmer-text shimmer-text-muted"),children:h})]})}l($t,"TaskChatThinking");var Ot={in_progress:{Icon:H,spin:!0,tone:"text-(--status-agent-running)",label:"running"},completed:{Icon:U,spin:!1,tone:"text-ink-3",label:"done"},failed:{Icon:z,spin:!1,tone:"text-bad",label:"failed"}};function Pt({item:e}){const n=(0,c.useId)(),a=St(e),{Icon:r,spin:i,tone:m,label:d}=Ot[e.status],u=e.status==="failed"?e.error:void 0;return(0,t.jsxs)("div",{role:"note","aria-label":`${a} (${d})`,"aria-describedby":u?n:void 0,"data-testid":"task-chat-todo-row","data-todo-status":e.status,className:"-mx-1.5 flex min-w-0 max-w-full flex-col overflow-hidden px-1.5 py-1 text-xs text-ink-3",children:[(0,t.jsxs)("div",{className:"flex min-h-4 min-w-0 items-center gap-2 leading-none",children:[(0,t.jsx)("span",{className:"flex w-5 shrink-0 items-center justify-center",children:(0,t.jsx)(nt,{className:"h-3.5 w-3.5 shrink-0","aria-hidden":!0})}),(0,t.jsx)("span",{className:"task-chat-collapsed-line-fade min-w-0 flex-1 truncate leading-4",title:a,children:a}),(0,t.jsx)(r,{"aria-hidden":!0,className:v("h-3.5 w-3.5 shrink-0",m,i&&"animate-spin")})]}),u?(0,t.jsx)("p",{id:n,"data-testid":"task-chat-todo-error",className:"mt-0.5 line-clamp-3 whitespace-pre-wrap break-words pl-7 leading-4 text-bad",title:u,children:u}):null]})}l(Pt,"TaskChatTodoRow");var Ht="System update",zt=80;function Dt(e){const n=e.match(/Latest retry failure: `([^`]+)`/);return n?n[1]:null}l(Dt,"retryFailureCode");function Bt(e){const n=e.match(/Recovery owner: \[([^\]]+)\]\(/)?.[1]?.trim();return n&&n.length>0?n:null}l(Bt,"recoveryOwnerName");function Ft(e){const n=e.split(`
|
|
3
3
|
`).map(i=>i.trim()).find(i=>i.length>0);if(!n)return;const a=n.search(/[.!?](\s|$)/),r=a>=0?n.slice(0,a+1):n;return r.length<=zt?r:`${r.slice(0,79).trimEnd()}…`}l(Ft,"firstSentence");function Wt(e){const n=e.presentation?.title?.trim(),a=e.presentation?.tone;if(n)return{title:n,tone:a??"neutral"};const r=e.body??"",i=Dt(r);if(i==="claude_auth_required")return{title:"Task paused — Claude needs re-authentication",tone:a??"warning"};if(i==="configuration_incomplete"||r.includes("secret/env bindings are missing"))return{title:"Task paused — a secret/config binding is missing",tone:a??"warning"};if(i==="workspace_validation_failed"||r.includes("workspace failed validation"))return{title:"Task paused — workspace problem",tone:a??"warning"};if(r.includes("no live execution path")){const m=Bt(r);return{title:m?`Task paused — waiting on ${m}`:"Task paused — waiting on a recovery owner",tone:a??"warning"}}return{title:Ht,tone:a??"neutral",detail:Ft(r)}}l(Wt,"humanizeSystemNotice");var Kt={neutral:Y,info:Y,success:Ne,warning:dt,danger:st},Ut={neutral:"text-ink-3",info:"text-(--status-task-icon-in_progress)",success:"text-(--status-task-icon-done)",warning:"text-(--status-task-icon-todo)",danger:"text-(--status-task-icon-blocked)"};function Gt({item:e,onTryAgainNoLiveExecutionPath:n,tryAgainNoLiveExecutionPathPending:a=!1}){const r=gt(e.metadata),i=pt(e.metadata),m=D(),[d,u]=(0,c.useState)(!!e.presentation?.detailsDefaultOpen),g=(0,c.useId)(),{title:h,tone:p,detail:k}=Wt({body:e.text,presentation:e.presentation}),x=bt(e.metadata,{runAgentId:e.runAgentId}),w=!(e.presentation?.kind==="system_notice"&&e.presentation.title?.trim().toLowerCase().startsWith("workspace ready")===!0&&x.some(b=>b.title?.trim().toLowerCase()==="workspace")),C=Kt[p],N=e.createdAtIso?Ie(e.createdAtIso):void 0,f=!!n&&(e.presentation?.title?.trim()==="No live execution path"||e.text.toLowerCase().includes("no live execution path")),S=l(()=>{Promise.resolve().then(()=>n?.()).catch(()=>{})},"handleTryAgain");return e.author==="system"&&i?(0,t.jsx)(kt,{...i.props},`${i.actionId}:${i.runId}`):e.author==="system"&&r?(0,t.jsx)(wt,{snapshot:r,createdAt:e.createdAtIso,defaultExpanded:e.presentation?.detailsDefaultOpen}):(0,t.jsxs)("div",{className:v("tc-enter-bubble flex flex-col items-start",m?"py-0.5":"py-1"),"data-testid":"task-chat-system-notice","data-tone":m?p:void 0,role:m?"group":void 0,"aria-label":m?`System update: ${h}`:void 0,children:[(0,t.jsxs)("div",{className:"flex max-w-(--pct-85) items-center gap-1.5",children:[(0,t.jsxs)("button",{type:"button",onClick:l(()=>u(b=>!b),"onClick"),"aria-expanded":d,"aria-controls":g,className:v("flex min-w-0 items-center gap-1.5 rounded-md px-2 py-0.5 text-xs text-ink-3","hover:bg-bg-3/50 hover:text-ink","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus/50"),children:[(0,t.jsx)(C,{className:v("h-3.5 w-3.5 shrink-0",Ut[p]),"aria-hidden":!0}),(0,t.jsx)("span",{className:"truncate font-medium",children:h}),k?(0,t.jsxs)("span",{className:"hidden truncate sm:inline",children:["· ",k]}):null,N?(0,t.jsxs)("span",{className:"shrink-0 text-ink-3/70",children:["· ",N]}):null,(0,t.jsx)(Le,{className:v("tc-notice-chevron h-3.5 w-3.5 shrink-0 transition-transform",d&&"rotate-180"),"aria-hidden":!0})]}),f&&!d?(0,t.jsx)(J,{type:"button",variant:"secondary",size:"xs",onClick:S,disabled:a,"data-testid":"task-chat-no-live-path-try-again",children:a?"Trying again...":"Try again"}):null]}),d?(0,t.jsxs)("div",{id:g,"data-testid":"task-chat-system-notice-details",className:"mt-1 w-full max-w-(--pct-85) overflow-hidden rounded-lg border border-line bg-bg-3/25 text-left text-sm dark:bg-bg-3/15",children:[w?(0,t.jsx)("div",{className:"px-3 py-2.5 text-ink/90",children:(0,t.jsx)(P,{softBreaks:!0,linkIssueReferences:!0,children:e.text})}):null,x.length>0?(0,t.jsx)("div",{className:v("bg-bg/50 dark:bg-bg/30",w&&"border-t border-line/70"),children:(0,t.jsx)(vt,{sections:x,tone:p})}):null,f?(0,t.jsx)("div",{className:"flex justify-end border-t border-line/70 bg-bg/50 px-3 py-2 dark:bg-bg/30",children:(0,t.jsx)(J,{type:"button",size:"xs",onClick:S,disabled:a,"data-testid":"task-chat-no-live-path-try-again",children:a?"Trying again...":"Try again"})}):null]}):null]})}l(Gt,"TaskChatSystemNotice");function pe({agentName:e,agentIcon:n,agent:a}){return(0,t.jsxs)("span",{className:"flex items-center gap-2 px-1","data-testid":"task-chat-agent-identity",children:[(0,t.jsx)("span",{"data-testid":"task-chat-agent-avatar",children:(0,t.jsx)(mt,{agent:a,name:e,size:24})}),(0,t.jsx)("span",{className:"text-sm font-semibold text-ink",children:e})]})}l(pe,"TaskChatAgentIdentity");function ae(e,n,a){return{id:a?.id??e,contentPath:a?.openPath??e,openPath:a?.openPath,downloadPath:a?.downloadPath,contentType:a?.contentType??"",originalFilename:n?.trim()?n:"image"}}l(ae,"galleryItemForMedia");function se(e){return e.filter((n,a)=>e.findIndex(r=>n.id&&r.id===n.id||r.url===n.url)===a)}l(se,"uniqueAttachmentRefs");function Vt(e){return ft(e.item.id)??(0,t.jsx)(qt,{...e})}l(Vt,"TaskChatBubble");function qt({item:e,animateEntry:n=!0,queuedAction:a,attachedTurn:r,beforeTurn:i,hideAgentIdentity:m=!1,actions:d,attachments:u=[],onTryAgainNoLiveExecutionPath:g,tryAgainNoLiveExecutionPathPending:h}){const p=D(),k=(0,c.useContext)(jt),x=(0,c.useContext)(tt),[w,C]=(0,c.useState)(null),N=(0,c.useCallback)(o=>{x?.(o)||C(o)},[x]);if(e.interstitial)return null;if(e.author==="system")return(0,t.jsx)(Gt,{item:e,onTryAgainNoLiveExecutionPath:g,tryAgainNoLiveExecutionPathPending:h});const f=e.author==="human",S=f&&e.isCurrentUser===!0,b=f&&e.sourceChannel==="imessage-photon",{refs:I,text:T}=qe(e.text),j=Ue(T),_=ze(T),A=te(I,u),L=te(j,u),R=u.filter(o=>o.issueCommentId===e.id).map(o=>({id:o.id,name:o.originalFilename?.trim()||"attachment",url:o.contentPath,contentType:o.contentType,byteSize:o.byteSize,openPath:o.openPath,downloadPath:o.downloadPath})),s=se([...L,...A.filter(F),...R.filter(F)]),y=se([...A.filter(o=>!F(o)),...R.filter(o=>!F(o))]),M=[...s,...y.filter(o=>ne(o.contentType,o.name))],ke=w!==null&&!M.some(o=>o.url===w)?[ae(w)]:M.map(o=>ae(o.url,o.name,o)),Z=w===null?-1:Math.max(0,M.findIndex(o=>o.url===w));return(0,t.jsxs)("div",{className:v("flex w-full flex-col gap-1",n&&"tc-enter-bubble",S?"items-end":"items-start"),children:[i?(0,t.jsx)("div",{className:"w-full pb-1",children:i}):null,f&&!e.isCurrentUser&&e.authorName?(0,t.jsx)("span",{className:"px-1 text-sm font-semibold text-ink","data-testid":"task-chat-human-identity","data-author-user-id":e.authorUserId,children:(0,t.jsx)(ut,{name:e.authorName,avatarUrl:xt(e.authorAvatarUrl),size:"default",className:"gap-2"})}):null,!f&&e.authorName&&!m?(0,t.jsx)(pe,{agentName:e.authorName,agentIcon:e.agentIcon,agent:e.agent}):null,_.length>0?(0,t.jsx)("div",{"data-testid":f?"task-chat-human-bubble":"task-chat-agent-bubble",className:v("break-words py-2 text-sm",S?"max-w-(--pct-85) rounded-2xl rounded-br-sm bg-(--liveness-blue) px-3.5 text-white":"w-full bg-transparent px-1 text-ink"),children:(0,t.jsx)(P,{className:S?"wardmote-markdown-on-accent":void 0,softBreaks:!0,linkIssueReferences:!0,onImageClick:N,children:_})}):null,s.length>0?(0,t.jsxs)("div",{className:"flex max-w-(--pct-85) flex-col gap-2","data-testid":"task-chat-bubble-media",children:[(0,t.jsxs)("span",{className:"text-xs text-ink-3",children:["Images · ",s.length]}),(0,t.jsxs)("div",{className:"grid grid-cols-4 gap-2",children:[s.slice(0,s.length>4?3:4).map((o,E)=>(0,t.jsx)("button",{type:"button",className:"group aspect-video min-w-0 overflow-hidden rounded-md bg-bg-3 outline-none focus-visible:ring-2 focus-visible:ring-focus","aria-label":`Open ${o.name||`image ${E+1}`}`,onClick:l(()=>N(o.url),"onClick"),children:(0,t.jsx)("img",{src:o.openPath??o.url,alt:o.name,loading:"lazy",className:"h-full w-full object-cover transition-transform group-hover:scale-(--s-1_02)"})},o.url)),s.length>4?(0,t.jsxs)("button",{type:"button",className:"aspect-video min-w-0 rounded-md bg-bg-3 text-sm font-semibold text-ink outline-none focus-visible:ring-2 focus-visible:ring-focus","aria-label":`Open ${s.length-3} more screenshots`,onClick:l(()=>N(s[3].url),"onClick"),children:["+",s.length-3]}):null]}),(0,t.jsx)("span",{className:"truncate text-xs text-ink-3",children:s.map(o=>o.name||"image").join(" · ")})]}):null,y.length>0?(0,t.jsxs)("div",{className:"flex max-w-(--pct-85) flex-col gap-2",children:[(0,t.jsxs)("span",{className:"text-xs text-ink-3",children:["Files · ",y.length]}),(0,t.jsx)(Ke,{"data-testid":"task-chat-bubble-attachments",children:y.map(o=>{const E=Ve(o),be=E.icon,ee=He(o.byteSize),B=ne(o.contentType,o.name);return(0,t.jsxs)(We,{size:"sm",children:[(0,t.jsx)(Fe,{className:B?"aspect-video group-data-[size=sm]/attachment:w-20":void 0,children:B?(0,t.jsx)(Ce,{artifact:{title:o.name,contentPath:o.openPath??o.url,mediaKind:"video"}}):(0,t.jsx)(be,{"aria-hidden":!0})}),(0,t.jsxs)(De,{children:[(0,t.jsx)(Be,{className:"max-w-48",children:o.name}),(0,t.jsx)(Ge,{className:"max-w-48",children:ee?`${E.label} · ${ee}`:E.label})]}),(0,t.jsx)(Pe,{"aria-label":`Open ${o.name}`,onClick:B?()=>N(o.url):void 0,render:B?(0,t.jsx)("button",{type:"button"}):(0,t.jsx)("a",{href:o.openPath??o.url,onClick:l(O=>{k&&o.id&&yt({contentType:o.contentType??"",originalFilename:o.name})&&!O.metaKey&&!O.ctrlKey&&!O.shiftKey&&!O.altKey&&(O.preventDefault(),k(o.id,o.name))},"onClick"),target:"_blank",rel:"noreferrer"})})]},o.url)})})]}):null,!f&&e.verificationCaveats?.length?(0,t.jsxs)("div",{className:"mx-1 w-(--sz-calc-7) rounded-md border border-amber-500/25 bg-amber-500/5 px-3 py-2 text-xs","data-testid":"task-chat-verification-caveats",children:[(0,t.jsx)("p",{className:"font-medium text-amber-800 dark:text-amber-200",children:"Verification caveat"}),(0,t.jsx)("ul",{className:"mt-1 space-y-1 text-ink-3",children:e.verificationCaveats.map((o,E)=>(0,t.jsxs)("li",{children:[(0,t.jsx)("span",{className:"font-mono text-ink",children:o.commandOrCheck}),o.reasonCode?` · ${o.reasonCode.replaceAll("_"," ")}`:"",o.detail?(0,t.jsx)("span",{className:"block",children:o.detail}):null]},`${o.commandOrCheck}:${E}`))})]}):null,e.optimistic?(0,t.jsxs)("span",{className:"flex items-center gap-1 px-1 text-(length:--text-micro) text-ink-3",children:[(0,t.jsx)("span",{children:e.optimistic==="queued"?"Queued":"Sending…"}),e.optimistic==="queued"?a:null]}):r?(0,t.jsx)("div",{className:"self-stretch","data-testid":"task-chat-bubble-attached-turn",children:r}):d?p?(0,t.jsxs)("div",{className:"flex w-full items-center justify-between gap-2 px-1",children:[e.timestamp||b?(0,t.jsxs)("span",{className:"text-(length:--text-micro) text-ink-3",children:[b?"Sent from iMessage":null,b&&e.timestamp?" · ":null,e.timestamp]}):null,d]}):(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[d,e.timestamp||b?(0,t.jsxs)("span",{className:"px-1 text-(length:--text-micro) text-ink-3",children:[b?"Sent from iMessage":null,b&&e.timestamp?" · ":null,e.timestamp]}):null]}):e.timestamp||b?(0,t.jsxs)("span",{className:"px-1 text-(length:--text-micro) text-ink-3",children:[b?"Sent from iMessage":null,b&&e.timestamp?" · ":null,e.timestamp]}):null,w!==null&&Z>=0?(0,t.jsx)(Nt,{items:ke,initialIndex:Z,open:!0,onOpenChange:l(o=>{o||C(null)},"onOpenChange")}):null]})}l(qt,"TaskChatBubbleContent");function sa({copyText:e,feedback:n,fastResponse:a}){const{copied:r,failed:i,copy:m}=ht(2e3),d=i?"Couldn’t copy message":"Copy message";return(0,t.jsxs)("div",{className:"flex items-center gap-0.5","data-testid":"task-chat-bubble-actions",children:[(0,t.jsx)("button",{type:"button",className:"inline-flex h-7 w-7 items-center justify-center rounded-md text-ink-3 transition-colors hover:bg-bg-3 hover:text-ink",title:d,"aria-label":d,onClick:l(()=>{m(e)},"onClick"),children:r?(0,t.jsx)(U,{className:"h-3.5 w-3.5"}):i?(0,t.jsx)(z,{className:"h-3.5 w-3.5 text-bad"}):(0,t.jsx)(Oe,{className:"h-3.5 w-3.5"})}),a&&(0,t.jsxs)(Me,{children:[(0,t.jsx)(_e,{asChild:!0,children:(0,t.jsx)("button",{type:"button","aria-label":"Message details",title:"Message details",className:"inline-flex h-7 w-7 items-center justify-center rounded-md text-ink-3 hover:bg-bg-3 hover:text-ink",children:(0,t.jsx)(Y,{className:"h-3.5 w-3.5"})})}),(0,t.jsx)(Ae,{className:"text-xs",children:"Platform-generated acknowledgement. The agent’s substantive response follows separately."})]}),n?(0,t.jsx)(Tt,{activeVote:n.activeVote,sharingPreference:n.sharingPreference,termsUrl:n.termsUrl,onVote:n.onVote}):null]})}l(sa,"TaskChatBubbleActions");var xe=3;function Xt(e){const n=e.split(`
|
|
4
4
|
`).map(r=>r.trim()).filter(Boolean),a=n.findIndex(r=>/^#\s+/.test(r));return{title:a>=0?n[a].replace(/^#\s+/,"").trim():"Plan",preview:n.filter((r,i)=>i!==a&&!/^(```|~~~|---+$|\*\*\*+$|___+$)/.test(r)).map(r=>r.replace(/^#{1,6}\s+/,"").replace(/^[-*+]\s+/,"").replace(/^\d+[.)]\s+/,"").replace(/^>\s*/,"").replace(/`([^`]+)`/g,"$1").replace(/\*\*([^*]+)\*\*/g,"$1").replace(/__([^_]+)__/g,"$1").replace(/\[([^\]]+)]\([^)]*\)/g,"$1").trim()).filter(Boolean).slice(0,xe)}}l(Xt,"planPreviewContent");function Yt(e){const n=e.title.trim()&&e.title.trim().toLowerCase()!=="plan"?e.title.trim():"Plan",a=e.steps.map(r=>r.label.trim()).filter(Boolean).slice(0,xe);return a.length===0&&e.summary?.trim()&&a.push(e.summary.trim()),{title:n,preview:a}}l(Yt,"livePlanContent");function Jt(e){if(e.kind==="saved")return e.revision??e.document?.latestRevisionNumber??null;const n=e.activity.details.find(({label:r})=>r==="Revision"||r==="Document Revision");if(!n)return null;const a=Number.parseInt(n.value,10);return Number.isFinite(a)?a:null}l(Jt,"planRevision");function Qt({source:e,href:n=e.kind==="saved"?"#document-plan":null,ariaLabel:a,testId:r="task-chat-plan-preview",className:i}){const m=Jt(e),d=e.kind==="saved"&&e.document?Xt(e.document.body):e.kind==="saved"?{title:e.fallbackTitle?.trim()||"Plan",preview:[]}:Yt(e.activity),u=e.kind==="live",g=m==null?null:`rev ${m}`,h=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 border-b border-line/70 px-3 py-2.5 text-sm text-ink-3",children:[(0,t.jsx)(Re,{"aria-hidden":!0,className:v("h-4 w-4 shrink-0",u&&"text-(--status-agent-running)")}),(0,t.jsx)("span",{className:v("font-medium",u&&"shimmer-text shimmer-text-muted"),"data-testid":u?"task-chat-plan-streaming-status":void 0,children:u?"Writing plan":"Plan"}),g?(0,t.jsxs)("span",{className:v("text-xs",u&&"shimmer-text shimmer-text-muted"),children:["· ",g]}):null,n?(0,t.jsx)(at,{"aria-hidden":!0,className:"ml-auto h-4 w-4 transition-transform group-hover:scale-105 group-hover:text-ink"}):null]}),(0,t.jsxs)("div",{className:"relative max-h-36 overflow-hidden px-4 py-3",children:[(0,t.jsx)("h3",{className:"text-base font-semibold leading-6 text-ink",children:d.title}),d.preview.length>0?(0,t.jsx)("ul",{className:"mt-2 space-y-1.5 text-sm leading-5 text-ink-3",children:d.preview.map((k,x)=>(0,t.jsxs)("li",{className:"flex gap-2",children:[(0,t.jsx)("span",{"aria-hidden":!0,className:"shrink-0 text-ink-3/60",children:"•"}),(0,t.jsx)("span",{className:"line-clamp-1",children:k})]},`${x}-${k}`))}):(0,t.jsx)("p",{className:"mt-1 text-sm text-ink-3",children:u?"Waiting for the first plan step…":"Open the synchronized plan to review it."}),(0,t.jsx)("div",{className:"pointer-events-none absolute inset-x-0 bottom-0 h-8 bg-linear-to-b from-transparent to-bg-2/95"})]})]}),p=v("group block w-full overflow-hidden rounded-md border border-line bg-bg-3/25 text-left",n&&"transition-colors hover:border-ink/25 hover:bg-bg-3/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus",i);return n?(0,t.jsx)("a",{href:n,"data-testid":r,"aria-label":a??`Open Plan${m==null?"":` revision ${m}`}`,className:p,children:h}):(0,t.jsx)("section",{"aria-label":a??"Streaming Plan preview","data-testid":r,className:p,children:h})}l(Qt,"TaskChatPlanPreviewCard");function Zt({item:e,onOpen:n}){return(0,t.jsx)("article",{className:"rounded-lg border border-line bg-bg-2 p-3","aria-label":`Skill created: ${e.name}`,children:(0,t.jsxs)("button",{type:"button",className:"flex w-full items-start gap-3 text-left",onClick:l(()=>n?.(e.skillId,e.name),"onClick"),children:[(0,t.jsx)(Te,{className:"mt-0.5 size-4 shrink-0 text-ink-3","aria-hidden":!0}),(0,t.jsxs)("span",{className:"min-w-0 flex-1 space-y-1",children:[(0,t.jsx)("span",{className:"block text-xs text-ink-3",children:"Skill created"}),(0,t.jsx)("span",{className:"block break-words text-sm font-medium hover:underline focus-visible:underline",children:e.name}),e.description?(0,t.jsx)("span",{className:"block line-clamp-3 text-sm text-ink-3",children:e.description}):null]})]})})}l(Zt,"TaskChatSkillCreatedCard");var q=["Clipping","Organizing","Sorting","Synthesizing","Analyzing","Filing","Collating","Stapling","Indexing","Annotating","Drafting","Proofreading","Alphabetizing","Photocopying","Laminating","Hole-punching","Bookmarking","Highlighting","Typing","Trimming","Aligning","Combining","Whiteboarding","Diagramming","Sketching","Labeling","Sticky-noting"],X=["Brewing","Tinkering","Distilling","Deliberating"],re=(()=>{const e=[],n=Math.max(q.length,X.length);for(let a=0;a<n;a++)a<q.length&&e.push(q[a]),a<X.length&&e.push(X[a]);return e})(),en=1e4;function tn(e){const n=(e??"").trim().toLowerCase();return n==="running"||n==="working"}l(tn,"isGenericStatusLabel");function nn(e){let n=2166136261;for(let a=0;a<e.length;a++)n^=e.charCodeAt(a),n=Math.imul(n,16777619);return n>>>0}l(nn,"fnv1a");function an(e,n=0){const a=Math.floor(Math.max(0,n)/en);return re[(nn(e)+a)%re.length]}l(an,"whimsyWord");var sn=[{name:"--motion-ease-out-expo",group:"Easing",kind:"easing"},{name:"--motion-ease-standard",group:"Easing",kind:"easing"},{name:"--motion-ease-out",group:"Easing",kind:"easing"},{name:"--motion-ease-scroll-pill-in",group:"Easing",kind:"easing"},{name:"--motion-ease-scroll-pill-out",group:"Easing",kind:"easing"},{name:"--motion-ease-in",group:"Easing",kind:"easing"},{name:"--motion-duration-instant",group:"Durations",kind:"time",min:0,max:1e3,step:10},{name:"--motion-duration-fast",group:"Durations",kind:"time",min:0,max:1e3,step:10},{name:"--motion-duration-base",group:"Durations",kind:"time",min:0,max:1e3,step:10},{name:"--motion-duration-slow",group:"Durations",kind:"time",min:0,max:1500,step:10},{name:"--motion-duration-deliberate",group:"Durations",kind:"time",min:0,max:2e3,step:10},{name:"--motion-duration-enter",group:"Durations",kind:"time",min:0,max:1e3,step:10},{name:"--motion-duration-exit",group:"Durations",kind:"time",min:0,max:1e3,step:10},{name:"--motion-duration-swap",group:"Durations",kind:"time",min:0,max:1e3,step:10},{name:"--motion-marker-enter",group:"States",kind:"time",min:0,max:1500,step:10},{name:"--motion-bubble-enter",group:"States",kind:"time",min:0,max:1500,step:10},{name:"--motion-cot-line-stagger",group:"States",kind:"time",min:0,max:300,step:5},{name:"--motion-cot-collapse",group:"States",kind:"time",min:0,max:1500,step:10},{name:"--motion-tool-enter",group:"States",kind:"time",min:0,max:1500,step:10},{name:"--motion-diff-reveal",group:"States",kind:"time",min:0,max:1500,step:10},{name:"--motion-status-enter",group:"States",kind:"time",min:0,max:1500,step:10},{name:"--motion-status-exit",group:"States",kind:"time",min:0,max:1500,step:10},{name:"--motion-approval-pulse",group:"States",kind:"time",min:0,max:3e3,step:20},{name:"--motion-plan-entry-stagger",group:"States",kind:"time",min:0,max:300,step:5},{name:"--motion-plan-check",group:"States",kind:"time",min:0,max:1500,step:10},{name:"--motion-question-page-enter",group:"States",kind:"time",min:0,max:1e3,step:10},{name:"--motion-count-tween",group:"States",kind:"time",min:0,max:1500,step:10},{name:"--motion-streaming-cursor-blink",group:"States",kind:"time",min:0,max:3e3,step:20},{name:"--motion-turn-fold",group:"States",kind:"time",min:0,max:1500,step:10},{name:"--motion-turn-meta",group:"States",kind:"time",min:0,max:1500,step:10},{name:"--motion-line-scroll",group:"States",kind:"time",min:0,max:1500,step:10},{name:"--motion-interstitial-dwell",group:"States",kind:"time",min:0,max:1e4,step:100},{name:"--motion-scroll-pill-enter",group:"States",kind:"time",min:0,max:1500,step:10},{name:"--motion-scroll-pill-exit",group:"States",kind:"time",min:0,max:1500,step:10},{name:"--motion-mobile-nav-enter",group:"States",kind:"time",min:0,max:1500,step:10},{name:"--motion-mobile-nav-exit",group:"States",kind:"time",min:0,max:1500,step:10},{name:"--motion-scrollbar-idle-delay",group:"States",kind:"time",min:0,max:2e3,step:10},{name:"--motion-pane-glide",group:"States",kind:"time",min:0,max:1500,step:10},{name:"--motion-side-panel-tab",group:"States",kind:"time",min:0,max:1500,step:10},{name:"--motion-live-now-sweep",group:"States",kind:"time",min:0,max:5e3,step:100},{name:"--motion-live-now-breathe",group:"States",kind:"time",min:0,max:5e3,step:100}],ra=[{label:"ease-out-expo (house)",value:"cubic-bezier(0.16, 1, 0.3, 1)"},{label:"standard (house)",value:"cubic-bezier(0.4, 0, 0.2, 1)"},{label:"ease-out",value:"cubic-bezier(0, 0, 0.2, 1)"},{label:"ease-in-out",value:"cubic-bezier(0.42, 0, 0.58, 1)"},{label:"linear",value:"linear"}],ia=Array.from(new Set(sn.map(e=>e.group)));function fe(e){const n=e.trim();if(n.endsWith("ms"))return parseFloat(n);if(n.endsWith("s"))return parseFloat(n)*1e3;const a=parseFloat(n);return Number.isFinite(a)?a:0}l(fe,"parseCssTimeMs");function rn(e){if(e==null)return null;const n=Math.round(e/1e3);return n<60?`${n}s`:`${Math.floor(n/60)}m ${n%60}s`}l(rn,"elapsedLabel");function ln(e){if(e==null)return null;const n=Math.max(0,e)/1e3;return n<60?`${n.toFixed(1)}s`:`${Math.floor(n/60)}m ${(n%60).toFixed(1)}s`}l(ln,"liveElapsedLabel");function on(e,n){const[a,r]=(0,c.useState)(()=>Date.now());return(0,c.useEffect)(()=>{if(e==null||!n)return;const i=window.setInterval(()=>r(Date.now()),100);return()=>window.clearInterval(i)},[e,n]),e==null?void 0:Math.max(0,a-e)}l(on,"useLiveElapsedMs");function cn(e,n){return!Number.isFinite(e)||!Number.isFinite(n)||n<=0?0:Math.max(0,Math.round(e/n)-1)}l(cn,"lineScrollOffset");function W(e){const n=getComputedStyle(document.documentElement).getPropertyValue(e),a=fe(n);return Number.isFinite(a)?a:0}l(W,"motionTokenMs");function dn({text:e,streaming:n,leaving:a}){const r=(0,c.useRef)(null),[i,m]=(0,c.useState)(0),[d,u]=(0,c.useState)(!1),[g,h]=(0,c.useState)(!1);(0,c.useLayoutEffect)(()=>{const k=r.current;if(!k)return;const x=l(()=>{const C=parseFloat(window.getComputedStyle(k).lineHeight);m(cn(k.scrollHeight,C))},"measure");if(x(),typeof ResizeObserver>"u")return;const w=new ResizeObserver(x);return w.observe(k),()=>w.disconnect()},[e,n]),(0,c.useEffect)(()=>{const k=requestAnimationFrame(()=>u(!0)),x=window.setTimeout(()=>h(!0),W("--motion-line-scroll"));return()=>{cancelAnimationFrame(k),window.clearTimeout(x)}},[]);const p=d?a?-1:n?-i:0:1;return(0,t.jsx)("span",{className:"tc-line-scroll min-w-0 flex-1","data-testid":"task-chat-live-self-talk","data-streaming":n||void 0,"data-leaving":a||void 0,children:(0,t.jsx)("span",{ref:r,className:v("tc-line-scroll-inner block",!n&&"truncate"),style:{transform:p!==0?`translateY(calc(${p} * 1lh))`:void 0,transition:g&&!a?"none":void 0},children:e})})}l(dn,"LiveSelfTalkLine");function un(e,n){const[a,r]=(0,c.useState)(null),i=(0,c.useRef)(a),m=(0,c.useRef)(null),d=(0,c.useRef)(e),u=(0,c.useRef)(0),g=(0,c.useRef)(null),h=(0,c.useRef)(null),p=(0,c.useRef)(null);return d.current=e,(0,c.useEffect)(()=>{const k=l(f=>{f.current!=null&&(window.clearTimeout(f.current),f.current=null)},"clear"),x=l(f=>{i.current=f,r(f)},"show"),w=l(()=>{k(h),k(p),h.current=window.setTimeout(()=>{if(h.current=null,m.current!=null)return;const f=i.current;f==null||f.streaming||(x({...f,leaving:!0}),p.current=window.setTimeout(()=>{p.current=null,i.current?.leaving&&x(null)},W("--motion-line-scroll")))},W("--motion-interstitial-dwell"))},"scheduleLeave"),C=l((f,S)=>{k(h),k(p),u.current=Date.now(),x({text:f,streaming:S,swapKey:(i.current?.swapKey??0)+1}),S||w()},"swapIn");if(!n){k(g),k(h),k(p),m.current=null,i.current&&x(null);return}const N=i.current;if(e==null){N?.streaming&&(x({...N,streaming:!1}),w());return}if(N==null){C(e,!0);return}if(N.streaming){N.text!==e&&x({...N,text:e});return}if(m.current=e,g.current==null){const f=W("--motion-interstitial-dwell"),S=Math.max(0,u.current+f-Date.now());g.current=window.setTimeout(()=>{g.current=null;const b=m.current;m.current=null,b!=null&&C(b,d.current!=null)},S)}},[e,n]),(0,c.useEffect)(()=>()=>{g.current!=null&&window.clearTimeout(g.current),h.current!=null&&window.clearTimeout(h.current),p.current!=null&&window.clearTimeout(p.current)},[]),a}l(un,"useHeldSelfTalk");var mn={running:{Icon:H,spin:!0,tone:"text-(--status-agent-running)"},working:{Icon:H,spin:!0,tone:"text-(--status-agent-running)"},awaiting_approval:{Icon:ot,spin:!1,tone:"text-accent"},interrupted:{Icon:rt,spin:!1,tone:"text-bad"},refused:{Icon:Se,spin:!1,tone:"text-bad"},truncated:{Icon:It,spin:!1,tone:"text-(--status-agent-paused)"}};function ge({item:e,onApprovalDecision:n,chevronOpen:a,onToggle:r}){const{Icon:i,spin:m,tone:d}=mn[e.status],u=e.status==="awaiting_approval",g=e.status==="running"||e.status==="working",h=on(e.startedAtMs,g),p=un(g?e.selfTalk:void 0,g),k=rn(e.elapsedMs);if(g){const x=ln(h??e.elapsedMs),w=e.selfTalk!=null,C=e.toolName?ue(e.toolName).icon:w?null:$e(e.label),N=w||tn(e.label)?an(e.id,h??e.elapsedMs??0):e.label,f=(0,t.jsxs)("div",{className:"tc-enter-status flex items-center gap-2 py-0.5 text-xs text-ink-3",children:[a!==void 0?(0,t.jsx)("span",{className:"flex h-3.5 w-3.5 shrink-0 items-center justify-center","data-testid":"task-chat-status-caret-slot",children:(0,t.jsx)(G,{className:v("h-3 w-3 transition-transform",a?"rotate-90":null),"aria-hidden":!0})}):null,(0,t.jsx)("span",{className:"flex h-3.5 w-3.5 shrink-0 items-center justify-center","data-testid":"task-chat-status-dot-slot",children:(0,t.jsx)("span",{"aria-hidden":!0,className:"h-2 w-2 animate-pulse rounded-full bg-(--status-agent-running)"})}),C?(0,t.jsx)(C,{className:"h-3.5 w-3.5 shrink-0","aria-hidden":!0}):null,(0,t.jsxs)("span",{className:"flex min-w-0 flex-1 items-baseline gap-2",children:[(0,t.jsxs)("span",{className:"shimmer-text shimmer-text-muted shrink-0 font-medium",children:[N,"…"]}),x?(0,t.jsx)("span",{className:"shrink-0 font-mono tabular-nums text-(length:--text-micro)",children:x}):null,e.detail?(0,t.jsx)("span",{className:"min-w-0 truncate font-mono text-(length:--text-micro)",children:e.detail}):null,e.tokens?(0,t.jsxs)("span",{className:"ml-auto shrink-0 font-mono text-(length:--text-micro)",children:[e.tokens.used.toLocaleString(),"/",e.tokens.size.toLocaleString()," ctx"]}):null]})]});return(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 py-0.5 text-xs text-ink-3","data-testid":"task-chat-interstitial-row",children:[(0,t.jsx)("span",{"aria-hidden":!0,className:"h-3.5 w-3.5 shrink-0"}),p?(0,t.jsx)(dn,{text:p.text,streaming:p.streaming,leaving:p.leaving},p.swapKey):(0,t.jsx)("span",{"aria-hidden":!0,className:"tc-line-scroll min-w-0 flex-1"})]}),r?(0,t.jsx)("button",{type:"button",onClick:r,"aria-expanded":a,className:"-mx-1.5 block w-full rounded-sm px-1.5 text-left transition-colors hover:bg-bg-3/60","data-testid":"task-chat-live-turn",children:f}):f]})}return(0,t.jsxs)("div",{className:v("tc-enter-status flex flex-col gap-2 rounded-lg border px-3 py-2 text-sm",u?"tc-approval border-accent/40 bg-accent/5":"border-line bg-bg-3/40"),children:[(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,t.jsx)(i,{className:v("h-4 w-4 shrink-0",d,m&&"animate-spin")}),(0,t.jsx)("span",{className:"min-w-0 truncate font-medium",children:e.label}),(0,t.jsxs)("span",{className:"ml-auto flex shrink-0 items-center gap-2 text-xs text-ink-3",children:[k?(0,t.jsx)("span",{children:k}):null,e.tokens?(0,t.jsxs)("span",{children:[e.tokens.used.toLocaleString(),"/",e.tokens.size.toLocaleString()," ctx"]}):null]})]}),e.detail?(0,t.jsx)("p",{className:"text-xs text-ink-3",children:e.detail}):null,u&&e.approval?(0,t.jsx)("div",{className:"flex flex-wrap justify-end gap-2 pt-1",children:e.approval.options.map(x=>{const w=x.kind.startsWith("reject");return(0,t.jsx)(J,{variant:w?"secondary":"primary",size:"xs",type:"button",onClick:l(()=>n?.(x.id),"onClick"),children:x.label},x.id)})}):null]})}l(ge,"TaskChatStatusPill");function ie(e){const n=[];return e.durationLabel&&n.push(e.durationLabel),e.toolCount>0&&n.push(`${e.toolCount} tool${e.toolCount===1?"":"s"}`),(e.added>0||e.removed>0)&&n.push(`+${e.added} −${e.removed}`),e.tokensLabel&&n.push(e.tokensLabel),n.join(" · ")}l(ie,"turnSummaryMetrics");function le({item:e,renderChild:n,timestampPrefix:a,leading:r}){const i=D(),m=!e.settled&&e.liveStatus!=null;if(e.standaloneHeader)return(0,t.jsxs)("div",{"data-testid":"task-chat-turn","data-settled":e.settled?"true":"false",children:[e.agentName||!e.historical?(0,t.jsxs)("div",{className:"flex min-h-8 w-full min-w-0 items-center gap-2 pb-1 pt-1.5 text-sm text-ink-3","data-testid":"task-chat-turn-summary","data-turn-position":"identity",children:[e.agentName?(0,t.jsx)(pe,{agentName:e.agentName,agentIcon:e.agentIcon,agent:e.agent}):null,e.historical?null:(0,t.jsxs)("span",{className:"min-w-0 truncate",children:[e.continuedAfterSteering?"Continued after steering · ":"",e.summary.durationLabel?`${e.summary.failed?"Stopped":"Worked"} for ${e.summary.durationLabel}`:e.summary.failed?"Stopped":"Worked"]})]}):null,e.items.length>0?(0,t.jsx)("div",{className:"flex min-w-0 flex-col gap-2 py-1","data-testid":"task-chat-turn-timeline",children:e.items.map(j=>(0,t.jsx)("div",{className:"min-w-0","data-testid":"task-chat-turn-timeline-row","data-timeline-row-id":j.id,"data-thread-anchor":j.id,children:n(j)},j.id))}):null,e.finalResponse?(0,t.jsx)("div",{className:"w-full","data-testid":"task-chat-final-response",children:(0,t.jsx)("div",{className:"break-words px-1 py-2 text-sm text-ink","data-testid":"task-chat-agent-bubble",children:(0,t.jsx)(P,{softBreaks:!0,linkIssueReferences:!0,children:e.finalResponse.text})})}):null]});const d=e.settled?e.items.filter(j=>j.kind==="protocol"&&j.surface==="runtime_request"):[],u=new Set(d.map(j=>j.id)),g=d.length>0?e.items.filter(j=>!u.has(j.id)):e.items,[h,p]=(0,c.useState)(()=>!e.settled&&e.liveStatus==null),[k,x]=(0,c.useState)(h);h&&!k&&x(!0);const[w,C]=(0,c.useState)(e.settled),[N,f]=(0,c.useState)(m);m&&!N&&f(!0),e.settled!==w&&(C(e.settled),e.settled&&!N&&p(!1));const S=g.length>0,b=(e.settled||m)&&!h,I=e.summary.failed?z:U,T=e.settled&&(!e.historical||S)?(0,t.jsxs)("button",{type:"button",onClick:l(()=>p(j=>!j),"onClick"),"aria-expanded":h,className:v("group flex w-full items-center gap-2 px-1 text-ink-3 transition-colors hover:text-ink",e.standaloneHeader?"border-b border-line/70 py-2 text-sm":"py-0.5 text-xs",i&&"min-w-0"),"data-testid":"task-chat-turn-summary",children:[a?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"text-(length:--text-micro)",children:a}),(0,t.jsx)("span",{"aria-hidden":!0,className:"text-(length:--text-micro)",children:"·"})]}):null,!e.standaloneHeader&&!e.historical?(0,t.jsx)(I,{className:"h-3.5 w-3.5 shrink-0"}):null,(0,t.jsx)("span",{children:e.historical?"Activity":e.standaloneHeader&&e.summary.durationLabel?`${e.summary.failed?"Stopped":"Worked"} for ${e.summary.durationLabel}`:e.summary.failed?"Stopped":"Worked"}),!e.standaloneHeader&&ie(e.summary)?(0,t.jsx)("span",{className:"tc-turn-metrics","data-visible":h?"true":"false",children:(0,t.jsx)("span",{className:"min-w-0 overflow-hidden whitespace-nowrap font-mono text-(length:--text-micro)",children:ie(e.summary)})}):null,(0,t.jsx)(G,{className:v("h-3 w-3 shrink-0 transition-transform",e.standaloneHeader&&"ml-auto",h?"rotate-90":null),"aria-hidden":!0})]}):m?(0,t.jsx)(ge,{item:e.liveStatus,chevronOpen:S?h:void 0,onToggle:S?()=>p(j=>!j):void 0}):null;return(0,t.jsxs)("div",{"data-testid":"task-chat-turn","data-settled":e.settled?"true":"false",children:[r?i?(0,t.jsxs)("div",{className:"flex w-full items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"min-w-0",children:T}),(0,t.jsx)("div",{className:"shrink-0",children:r})]}):(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[r,T]}):T,(0,t.jsx)("div",{className:"tc-turn-fold","data-folded":b?"true":"false","aria-hidden":b,children:(0,t.jsx)("div",{children:(0,t.jsx)("div",{className:"flex flex-col gap-2 pt-1",children:k&&g.map(j=>(0,t.jsx)("div",{children:n(j)},j.id))})})}),d.length>0?(0,t.jsx)("div",{className:"flex flex-col gap-2 pt-2","data-testid":"task-chat-turn-persistent-history",children:d.map(j=>(0,t.jsx)("div",{children:n(j)},j.id))}):null]})}l(le,"TaskChatTurn");function hn({children:e,className:n}){return(0,t.jsx)("div",{"data-slot":"task-chat-sticky-header-actions",className:v("sticky top-[calc(var(--mobile-topbar-h,0.5rem)+0.5rem)] z-10 h-0",n),children:(0,t.jsx)("div",{className:"absolute right-0 top-0 rounded-md bg-bg/90 backdrop-blur-sm",children:e})})}l(hn,"TaskChatStickyHeaderActions");var pn=48;function oe(){return typeof window>"u"||typeof window.matchMedia!="function"?!0:window.matchMedia("(prefers-reduced-motion: reduce)").matches}l(oe,"motionDisabled");function xn({children:e,contentKey:n,className:a}){const r=D(),i=Mt(),m=(0,c.useRef)(!1),d=(0,c.useRef)({key:i.key,hash:i.hash}),u=(0,c.useRef)(null),g=(0,c.useRef)(null),h=(0,c.useRef)(!0),p=(0,c.useRef)(!1),k=(0,c.useRef)(null),x=(0,c.useRef)(null),w=(0,c.useRef)(null),[C,N]=(0,c.useState)("hidden"),f=(0,c.useCallback)(()=>{const s=u.current;if(!s)return;s.dataset.scrollActive="true",x.current!==null&&window.clearTimeout(x.current);const y=w.current??fe(getComputedStyle(document.documentElement).getPropertyValue("--motion-scrollbar-idle-delay"));w.current=y,x.current=window.setTimeout(()=>{delete s.dataset.scrollActive,x.current=null,w.current=null},y)},[]),S=(0,c.useCallback)(()=>{N("in")},[]),b=(0,c.useCallback)(()=>{N(s=>s==="hidden"?s:oe()?"hidden":"out")},[]),I=(0,c.useCallback)(()=>{const s=u.current;return s?s.scrollHeight-s.scrollTop-s.clientHeight<=pn:!0},[]),T=(0,c.useCallback)(()=>{const s=u.current;s&&(s.scrollTop=s.scrollHeight)},[]),j=(0,c.useCallback)(()=>{const s=u.current;if(!s)return!1;const y=k.current,M=s.clientHeight;return k.current=M,y==null||y<=0||y===M||!h.current?!1:(T(),!0)},[T]),_=(0,c.useCallback)(()=>{const s=u.current;if(!s)return;const y=s.getBoundingClientRect();g.current=Rt(s,y.top,y.bottom),m.current&&i.remember(s.scrollTop,g.current)},[i.key,i.hash,i.ready]),A=(0,c.useCallback)(()=>{const s=u.current;if(s){if(p.current&&(p.current=!1,h.current=!0,b()),h.current)T();else{const y=he(s,g.current,s.getBoundingClientRect().top);y&&(s.scrollTop+=y)}_()}},[_,T,b]),L=(0,c.useCallback)(()=>{if(_(),f(),j()){b();return}const s=I();if(p.current){s&&(p.current=!1,h.current=!0,b());return}h.current=s,s?b():S()},[_,j,I,b,S,f]),R=(0,c.useCallback)(()=>{const s=u.current;if(s){if(I()){h.current=!0,b();return}p.current=!0,typeof s.scrollTo=="function"&&!oe()?s.scrollTo({top:s.scrollHeight,behavior:"smooth"}):(s.scrollTop=s.scrollHeight,p.current=!1,h.current=!0,b())}},[I,b]);return(0,c.useEffect)(()=>{const s=u.current;if(!s)return;const y=l(()=>{p.current&&(p.current=!1,h.current=!1,S())},"cancelEasing");return s.addEventListener("wheel",y,{passive:!0}),s.addEventListener("touchstart",y,{passive:!0}),()=>{s.removeEventListener("wheel",y),s.removeEventListener("touchstart",y)}},[S]),(0,c.useEffect)(()=>()=>{x.current!==null&&window.clearTimeout(x.current)},[]),(0,c.useLayoutEffect)(()=>{const s=u.current;if(!s||(k.current=s.clientHeight,typeof ResizeObserver>"u"))return;const y=new ResizeObserver(()=>{j()&&b(),A()});return y.observe(s),s.firstElementChild&&y.observe(s.firstElementChild),()=>y.disconnect()},[j,b,A]),(0,c.useLayoutEffect)(()=>{const s=u.current;if((d.current.key!==i.key||d.current.hash!==i.hash)&&(d.current={key:i.key,hash:i.hash},m.current=!1),s&&i.ready&&!m.current){const y=i.initialPosition(s,s.getBoundingClientRect().top,s.scrollTop);y!==null&&(s.scrollTop=y,h.current=I(),_()),m.current=!0}A()},[n,A,i.key,i.hash,i.ready]),(0,t.jsxs)("div",{className:"relative min-h-0 flex-1",children:[(0,t.jsx)("div",{ref:u,onScroll:L,className:v("task-chat-scroll-viewport scrollbar-while-scrolling absolute inset-y-0 left-0 overflow-y-auto",r?"-right-4 overflow-x-hidden pr-4 md:-right-6 md:pr-6":"right-0",a),"data-testid":"task-chat-scroller",children:e}),C!=="hidden"?(0,t.jsx)("button",{type:"button","aria-label":"Scroll to latest",onClick:R,onAnimationEnd:l(()=>{C==="out"&&N("hidden")},"onAnimationEnd"),className:v("absolute left-1/2 flex size-8 items-center justify-center rounded-full border border-line bg-bg shadow-sm hover:bg-bg-3",r?"bottom-7":"bottom-3",C==="out"?"tc-scroll-pill-out":"tc-scroll-pill-in"),children:(0,t.jsx)(Ee,{className:"h-4 w-4"})}):null]})}l(xn,"TaskMessageScroller");var fn=[];function K(e,n,a,r,i,m,d,u="classic",g,h=!1,p,k,x,w=[],C,N){switch(e.kind){case"browser":return(0,t.jsx)(Ze,{browser:e.browser,label:e.label,onOpen:N});case"project_created":return(0,t.jsx)(Je,{item:e});case"skill_created":return(0,t.jsx)(Zt,{item:e,onOpen:C});case"message":{const f=i?.(e),S=e.attachedTurn?.standaloneHeader?{...e.attachedTurn,agentName:e.attachedTurn.agentName??e.authorName,agentIcon:e.attachedTurn.agentIcon??e.agentIcon,agent:e.attachedTurn.agent??e.agent}:e.attachedTurn,b=S?(0,t.jsx)(le,{item:S,timestampPrefix:S.standaloneHeader?void 0:e.timestamp,leading:S.standaloneHeader?void 0:f,renderChild:l(I=>K(I,n,void 0,void 0,void 0,void 0,d,e.attachedTurn?.standaloneHeader?"runner":"classic",void 0,!1,void 0,void 0,void 0,w,C,N),"renderChild")}):void 0;return(0,t.jsx)(Vt,{item:e,animateEntry:!1,actions:e.attachedTurn?.standaloneHeader?f:e.attachedTurn?void 0:f,queuedAction:m?.(e),beforeTurn:e.attachedTurn?.standaloneHeader?b:void 0,attachedTurn:e.attachedTurn?.standaloneHeader?void 0:b,hideAgentIdentity:!!e.attachedTurn?.standaloneHeader,onTryAgainNoLiveExecutionPath:g,tryAgainNoLiveExecutionPathPending:h,attachments:w})}case"marker":return(0,t.jsx)(et,{item:e,onTryAgain:e.id===p&&e.retryable!==!1?e.runId&&k?()=>k(e.runId):g:void 0,tryAgainPending:e.runId?x===e.runId:h});case"thinking":return(0,t.jsx)($t,{item:e});case"tool":return(0,t.jsx)(Lt,{item:e});case"status":return(0,t.jsx)(ge,{item:e,onApprovalDecision:l(f=>n?.(e.id,f),"onApprovalDecision")});case"usage":return(0,t.jsx)(Qe,{item:e});case"activity_phase":return(0,t.jsx)(Xe,{item:e});case"interaction":return a?a(e):null;case"plan_document":return(0,t.jsx)(Qt,{source:{kind:"saved",document:e.document},testId:e.placement==="fallback"?"task-chat-plan-preview-fallback":"task-chat-plan-preview"});case"todo":return(0,t.jsx)(Pt,{item:e});case"brief":return r?r():null;case"turn":return(0,t.jsx)(le,{item:e,renderChild:l(f=>K(f,n,void 0,void 0,void 0,void 0,d,e.standaloneHeader?"runner":"classic",void 0,!1,void 0,void 0,void 0,w,C,N),"renderChild")});case"protocol":return(0,t.jsx)(it,{item:e,onRuntimeRequestDecision:d});default:return e}}l(K,"renderItem");function ce(e){return e.kind==="marker"||e.kind==="message"&&e.author==="system"}l(ce,"isSystemLikeItem");function gn(e,n){if(!n)return;const a=ce(e),r=ce(n);return a&&r?"mt-2":a||r||e.kind==="turn"||n.kind==="turn"?"mt-3":e.kind==="interaction"||n.kind==="interaction"?"mt-4":"mt-6"}l(gn,"taskChatItemSpacingClass");function la({items:e,header:n,headerActions:a,onApprovalDecision:r,onRuntimeRequestDecision:i,renderInteraction:m,renderBrief:d,renderMessageActions:u,renderQueuedAction:g,onTryAgainNoLiveExecutionPath:h,tryAgainNoLiveExecutionPathPending:p=!1,onRetryFailedRun:k,retryFailedRunId:x=null,tail:w,contentKey:C,className:N,scroll:f=!0,attachments:S=fn,onOpenSkill:b,onOpenBrowser:I}){const T=D();let j;if(k||h)for(let R=e.length-1;R>=0;R-=1){const s=e[R];if(s.kind==="marker"&&s.variant==="interrupted"&&(s.label==="Run failed"||s.label==="Usage limit reached")){j=s.id;break}}const _=(0,c.useMemo)(()=>{const R=T?e.map(s=>({item:s,content:K(s,r,m,d,u,g,i,"classic",h,p,j,k,x,S,b,I)})).filter(s=>s.content!==null):[];return(0,t.jsx)(t.Fragment,{children:T?R.map(({item:s,content:y},M)=>(0,t.jsx)("div",{"data-thread-anchor":s.kind==="message"?s.renderKey??s.id:s.id,id:s.kind==="message"?`comment-${s.id}`:void 0,className:gn(s,R[M-1]?.item??null),"data-thread-item-kind":s.kind==="message"?s.author:s.kind,children:y},s.kind==="message"?s.renderKey??s.id:s.id)):e.map((s,y)=>(0,t.jsx)("div",{"data-thread-anchor":s.kind==="message"?s.renderKey??s.id:s.id,id:s.kind==="message"?`comment-${s.id}`:void 0,className:v(y>0&&s.kind==="interaction"&&s.interaction.status!=="pending"&&"-mt-3"),children:K(s,r,m,d,u,g,i,"classic",h,p,j,k,x,S,b,I)},s.kind==="message"?s.renderKey??s.id:s.id))})},[e,T,r,i,m,d,u,g,h,p,j,k,x,S,b,I]),A=(0,c.useMemo)(()=>kn(e),[e]),L=(0,t.jsxs)("div",{className:v("wardmote-mobile-thread mx-auto flex w-full max-w-(--tc-shell-max-w) flex-col px-1 py-3 md:px-4 md:py-4",T?"md:px-0":"gap-5",N),children:[a?(0,t.jsx)(hn,{className:T?void 0:"-mb-5",children:a}):null,n?(0,t.jsx)("div",{className:v("flex flex-col gap-6",T?"pb-4":"pb-2"),"data-testid":"task-chat-thread-header",children:n}):null,_,w?T?(0,t.jsx)("div",{className:"mt-4",children:w}):w:null]});return f?(0,t.jsx)(xn,{contentKey:C??A,children:L}):L}l(la,"TaskChatThreadView");function Q(e){if(e.kind==="message")return e.text.length+(e.attachedTurn?1:0);if(e.kind==="thinking")return e.lines.reduce((n,a)=>n+a.length,0);if(e.kind==="tool")return(e.diff?.lines?.length??0)+(e.status==="completed"?1:0);if(e.kind==="plan_document")return e.document.body.length+e.document.latestRevisionNumber;if(e.kind==="todo")return(e.status==="in_progress"?0:1)+(e.counts?.completed??0);if(e.kind==="turn"){if(e.settled)return 1+(e.finalResponse?.text.length??0);const n=e.liveStatus?e.liveStatus.label.length+(e.liveStatus.detail?.length??0)+(e.liveStatus.selfTalk?.length??0):0;return e.items.reduce((a,r)=>a+Q(r),e.items.length+n+(e.finalResponse?.text.length??0))}return e.kind==="activity_phase"?e.items.reduce((n,a)=>n+Q(a),e.summary.length+(e.interstitial?.text.length??0)):1}l(Q,"signatureOf");function kn(e){return e.reduce((n,a)=>n+Q(a),e.length)}l(kn,"taskChatContentKey");export{aa as _,sn as a,he as b,Qt as c,Vt as d,Pt as f,At as g,_t as h,ra as i,sa as l,Lt as m,kn as n,ia as o,$t as p,hn as r,fe as s,la as t,pe as u,Mt as v,Rt as y};
|
package/dist/assets/{TaskDetailRelationsPanel-CkktN1EC.js → TaskDetailRelationsPanel-DZGkinoJ.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
var m=Object.defineProperty;var r=(s,t)=>m(s,"name",{value:t,configurable:!0});import{i as f}from"./rolldown-runtime-ZpX3ckPj.js";import{ta as k}from"./createLucideIcon-DJi9suAC.js";import{Jt as b,Ut as p,t as g}from"./router-2UfGeejU.js";import{b as j,x as N}from"./MarkdownBody-BTjuUgFa.js";import{t as v}from"./button-CMwV3L1P.js";import{t as y}from"./plus-C6fnr28l.js";import{t as w}from"./StatusIcon-0GcYXDdN.js";import{x as T}from"./index-
|
|
1
|
+
var m=Object.defineProperty;var r=(s,t)=>m(s,"name",{value:t,configurable:!0});import{i as f}from"./rolldown-runtime-ZpX3ckPj.js";import{ta as k}from"./createLucideIcon-DJi9suAC.js";import{Jt as b,Ut as p,t as g}from"./router-2UfGeejU.js";import{b as j,x as N}from"./MarkdownBody-BTjuUgFa.js";import{t as v}from"./button-CMwV3L1P.js";import{t as y}from"./plus-C6fnr28l.js";import{t as w}from"./StatusIcon-0GcYXDdN.js";import{x as T}from"./index-3AxqhPET.js";var e=f(k(),1);function o({items:s,emptyMessage:t,ariaLabel:l,issueLinkState:n}){return s.length===0?(0,e.jsx)("p",{className:"py-6 text-center text-sm text-ink-3",children:t}):(0,e.jsx)("ul",{className:"flex flex-col gap-0.5","aria-label":l,children:s.map(a=>{if(N(a))return(0,e.jsx)("li",{className:"px-2 py-2",children:(0,e.jsx)(j,{identifier:a.identifier})},a.id);const i=a.identifier??a.id;return(0,e.jsx)("li",{children:(0,e.jsxs)(g,{to:p(i),state:n,onClickCapture:r(()=>b(i,n),"onClickCapture"),className:"flex min-w-0 items-center gap-2 rounded-md px-2 py-2 text-sm transition-colors hover:bg-bg-3/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus",title:`${a.identifier?`${a.identifier} — `:""}${a.title}`,children:[a.status?(0,e.jsx)(w,{status:a.status,className:"h-3.5 w-3.5 shrink-0"}):null,(0,e.jsx)("span",{className:"min-w-0 flex-1 truncate",children:a.title}),a.identifier?(0,e.jsx)("span",{className:"shrink-0 font-mono text-xs text-ink-3",children:a.identifier}):null]})},a.id)})})}r(o,"RelationNavigationList");var _=["in_progress","in_review","todo","backlog","blocked"];function S(s){const t=_.map(l=>s.find(n=>n.status===l)).find(l=>!!l)??null;return{nextAction:t,rootBlocker:t?.status==="blocked"?t.blockerAttention?.terminalBlocker??null:null,remainingItems:t?s.filter(l=>l.id!==t.id):s}}r(S,"resolveTaskDetailSubtaskState");function x({items:s,ariaLabel:t,issueLinkState:l}){return(0,e.jsx)("ul",{className:"flex flex-col gap-0.5","aria-label":t,children:s.map(n=>(0,e.jsx)("li",{children:(0,e.jsx)(T,{issue:n,issueLinkState:l,presentation:"task",className:"rounded-md"})},n.id))})}r(x,"TaskDetailTaskList");function $({items:s,onAddSubtask:t,issueLinkState:l}){const n=s.filter(h=>h.status==="done").length,a=s.length>0?Math.round(n/s.length*100):0,{nextAction:i,rootBlocker:c,remainingItems:d}=S(s),u=s.length>0&&n===s.length;return(0,e.jsxs)("section",{className:"flex flex-col gap-4","aria-label":"Subtasks",children:[(0,e.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,e.jsxs)("div",{className:"flex items-center justify-between gap-3 text-xs text-ink-3",children:[(0,e.jsx)("span",{children:"Progress"}),(0,e.jsxs)("span",{className:"font-mono",children:[n," of ",s.length," complete"]})]}),(0,e.jsx)("div",{className:"h-1.5 overflow-hidden rounded-full bg-bg-3",role:"progressbar","aria-label":"Subtask completion","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":a,children:(0,e.jsx)("div",{className:"h-full rounded-full bg-(--status-task-icon-done) transition-[width]",style:{width:`${a}%`}})})]}),c?(0,e.jsxs)("section",{className:"flex flex-col gap-1.5","aria-labelledby":"task-root-blocker-heading",children:[(0,e.jsx)("h3",{id:"task-root-blocker-heading",className:"text-xs font-medium text-ink-3",children:"Root blocker"}),(0,e.jsx)(o,{items:[c],emptyMessage:"",ariaLabel:"Root blocker",issueLinkState:l})]}):null,i?(0,e.jsxs)("section",{className:"flex flex-col gap-1.5","aria-labelledby":"task-next-action-heading",children:[(0,e.jsx)("h3",{id:"task-next-action-heading",className:"text-xs font-medium text-ink-3",children:i.status==="blocked"?"Blocked subtask":"Next action"}),(0,e.jsx)(x,{items:[i],ariaLabel:"Next subtask action",issueLinkState:l})]}):s.length>0?(0,e.jsx)("p",{className:"text-xs text-ink-3",children:u?"All subtasks are complete.":"No remaining subtask actions."}):(0,e.jsx)("p",{className:"py-6 text-center text-sm text-ink-3",children:"No subtasks yet."}),d.length>0?(0,e.jsxs)("section",{className:"flex flex-col gap-1.5","aria-labelledby":"task-other-subtasks-heading",children:[(0,e.jsx)("h3",{id:"task-other-subtasks-heading",className:"text-xs font-medium text-ink-3",children:i?"Other subtasks":"Subtasks"}),(0,e.jsx)(x,{items:d,ariaLabel:i?"Other subtasks":"Subtasks",issueLinkState:l})]}):null,t?(0,e.jsxs)(v,{type:"button",variant:"secondary",size:"sm",className:"self-start",onClick:t,children:[(0,e.jsx)(y,{className:"h-3.5 w-3.5"}),"Add subtask"]}):null]})}r($,"TaskDetailSubtasksPanel");function E({referenced:s,mentionedIn:t,issueLinkState:l}){return(0,e.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,e.jsxs)("section",{className:"flex flex-col gap-2","aria-labelledby":"task-referenced-heading",children:[(0,e.jsx)("h3",{id:"task-referenced-heading",className:"text-xs font-medium text-ink-3",children:"Referenced"}),(0,e.jsx)(o,{items:s,emptyMessage:"This task does not reference another task.",ariaLabel:"Referenced tasks",issueLinkState:l})]}),(0,e.jsxs)("section",{className:"flex flex-col gap-2","aria-labelledby":"task-mentioned-in-heading",children:[(0,e.jsx)("h3",{id:"task-mentioned-in-heading",className:"text-xs font-medium text-ink-3",children:"Mentioned in"}),(0,e.jsx)(o,{items:t,emptyMessage:"No other task mentions this task.",ariaLabel:"Tasks that mention this task",issueLinkState:l})]})]})}r(E,"TaskDetailReferencesPanel");export{x as i,E as n,$ as r,o as t};
|