@openscout/scout 0.2.102 → 0.2.106
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/README.md +37 -0
- package/bin/scout.mjs +6 -0
- package/bin/scoutd +0 -0
- package/dist/build-manifest.json +4 -4
- package/dist/chat.mjs +307 -0
- package/dist/client/assets/ActivityScreen-CZmGwQ2U.js +1 -0
- package/dist/client/assets/{AddProjectForm-DfbjlFfy.js → AddProjectForm-CusDRiVO.js} +1 -1
- package/dist/client/assets/{AdventureEvidence-Dzz9VbuE.js → AdventureEvidence-CyegKk1V.js} +1 -1
- package/dist/client/assets/{AdventureReader-ClMxT0e4.js → AdventureReader-X-hbTOi0.js} +1 -1
- package/dist/client/assets/{AdventureScenery-D548O0x4.js → AdventureScenery-LPXSVP67.js} +1 -1
- package/dist/client/assets/AgentAdventures-BAgxdOF8.js +1 -0
- package/dist/client/assets/AgentAvatar-CrP1eXxk.js +1 -0
- package/dist/client/assets/AgentConfigurationScreen-1L0IQm2w.js +1 -0
- package/dist/client/assets/AgentDefinitionsWorkspace-DguGs7jZ.js +1 -0
- package/dist/client/assets/{AgentDetailCard-CFDE8TLi.js → AgentDetailCard-DtHT3sCo.js} +1 -1
- package/dist/client/assets/AgentFloorView-DH4jiDgw.js +1 -0
- package/dist/client/assets/{AgentFloorWorld-BDJmXl3C.js → AgentFloorWorld-CjoIa6jA.js} +1 -1
- package/dist/client/assets/AgentInfoScreen-DYtmKkeE.js +1 -0
- package/dist/client/assets/{AgentLaneCard-C6YmwPxQ.js → AgentLaneCard-BaZ2g-f8.js} +1 -1
- package/dist/client/assets/{AgentLaneChrome-D9uJ4QY7.js → AgentLaneChrome-TF1SlJSc.js} +1 -1
- package/dist/client/assets/{AgentLaneDetailSheet-KYckCBCX.js → AgentLaneDetailSheet-EzEPsn3g.js} +1 -1
- package/dist/client/assets/{AgentLaneSummaryResize-BBYBS3DO.js → AgentLaneSummaryResize-dpp7YvrX.js} +1 -1
- package/dist/client/assets/AgentLanesEmbedScreen-BlSof_6S.js +1 -0
- package/dist/client/assets/{AgentLanesPreflight-pw2vMO3Q.js → AgentLanesPreflight-Ry-aqDTr.js} +1 -1
- package/dist/client/assets/AgentLanesView-BJi9xXz6.js +2 -0
- package/dist/client/assets/{AgentLiveActions-lYzicnNa.js → AgentLiveActions-CfTupTEl.js} +1 -1
- package/dist/client/assets/AgentMasterScreen-EJhmuKgl.js +1 -0
- package/dist/client/assets/AgentSessions-B1gOhDBf.js +6 -0
- package/dist/client/assets/AgentsConsole-RXGqRvcb.js +1 -0
- package/dist/client/assets/AgentsScreen-ChwMBs11.js +1 -0
- package/dist/client/assets/AgentsSubnav-DwNX4yy0.js +1 -0
- package/dist/client/assets/{AstronautSuit-C-4I5YKi.js → AstronautSuit-Cchnc4Ug.js} +1 -1
- package/dist/client/assets/{AtopView-DKm-ERYC.js → AtopView-gkEp4y__.js} +1 -1
- package/dist/client/assets/{BackToPicker-Bys9ColC.js → BackToPicker-CUkjnoVk.js} +1 -1
- package/dist/client/assets/BriefingDetailScreen-DrlC3qkm.js +1 -0
- package/dist/client/assets/{BriefingsScreen-D4Zf31Y6.js → BriefingsScreen-B1HlBMGZ.js} +1 -1
- package/dist/client/assets/{BrokerMetadataPanel-1GoSl2BV.js → BrokerMetadataPanel-Dk242Yh_.js} +1 -1
- package/dist/client/assets/BrokerScreen-DwOF6bMA.js +8 -0
- package/dist/client/assets/Canvas-X9pVSkw3.js +1 -0
- package/dist/client/assets/{CastPicker-BuwE_JQp.js → CastPicker-BXUtPAGC.js} +1 -1
- package/dist/client/assets/ChannelComposer-DoK7IDGa.js +1 -0
- package/dist/client/assets/ChannelSidebar-e9DOPulb.js +1 -0
- package/dist/client/assets/{CharacterFamilyPreview-CfO3j8Of.js → CharacterFamilyPreview-DMfw7UM_.js} +1 -1
- package/dist/client/assets/ChatAvatar-C3a_o5Hj.js +1 -0
- package/dist/client/assets/ChatBits-CsvxbToF.js +1 -0
- package/dist/client/assets/{ChatCollapsedStrip-TV0j1xTB.js → ChatCollapsedStrip-FEmQ_G9J.js} +1 -1
- package/dist/client/assets/ChatRichInput-DhtwFxQE.js +31 -0
- package/dist/client/assets/ChatRightPanel-C1h_aIkn.js +1 -0
- package/dist/client/assets/ChatSpaceSurface-BXyLYKHn.js +1 -0
- package/dist/client/assets/ChatSpaceTheme-3wLZGsvT.css +1 -0
- package/dist/client/assets/ChatSpaceTheme-CUH8bTZc.js +1 -0
- package/dist/client/assets/{CodeDiffPane-DB6-mqtX.js → CodeDiffPane-DuQRwpgK.js} +1 -1
- package/dist/client/assets/{CodeProjectPicker-B_LNLpIK.js → CodeProjectPicker-ZQ6gSBpg.js} +1 -1
- package/dist/client/assets/{CodeScreen-C9H160XS.js → CodeScreen-BXyKeL5T.js} +1 -1
- package/dist/client/assets/{CommsCanvas-DOKw3Q8i.js → CommsCanvas-THp0r_U8.js} +1 -1
- package/dist/client/assets/{CommsDeck-C18JA7rK.js → CommsDeck-BVmSMV2V.js} +1 -1
- package/dist/client/assets/{CommsFlowGraph-Czg-KTS0.js → CommsFlowGraph-DxoOaLF_.js} +1 -1
- package/dist/client/assets/{CommsFlowMap-CzBWvSa5.js → CommsFlowMap-Vi8ziCPg.js} +1 -1
- package/dist/client/assets/{CommsSelection-g1twA-Lb.js → CommsSelection-BUoRbu9o.js} +1 -1
- package/dist/client/assets/ComposerAttachments-DW0AIb8k.js +1 -0
- package/dist/client/assets/ConversationComposer-CUQyArlk.js +1 -0
- package/dist/client/assets/ConversationFeedRows-DWiOfT-y.js +1 -0
- package/dist/client/assets/ConversationHeader-C-ZWscKj.js +1 -0
- package/dist/client/assets/{ConversationPanels-C9yCAoJy.js → ConversationPanels-D9oC0xG5.js} +2 -2
- package/dist/client/assets/ConversationScreen-9MlMnEo4.css +1 -0
- package/dist/client/assets/ConversationScreen-CUfsQ4MR.js +2 -0
- package/dist/client/assets/ConversationStatus--IPm2nGh.js +1 -0
- package/dist/client/assets/{CrewAvatar-D0c9z5Qr.css → CrewAvatar-BnIPIn_Z.css} +1 -1
- package/dist/client/assets/CrewAvatar-kTznzqcO.js +1 -0
- package/dist/client/assets/{CrewSprite-hgpA3SWB.js → CrewSprite-Dhryjx2c.js} +1 -1
- package/dist/client/assets/CrewStage-vdO0qm3D.js +1 -0
- package/dist/client/assets/CrewWorkspaces-DCBzAAS4.js +1 -0
- package/dist/client/assets/CrewWorkspaces-DDuYMByu.css +1 -0
- package/dist/client/assets/{DataTable-BMOZ1-z8.js → DataTable-aH-jCyDq.js} +1 -1
- package/dist/client/assets/{DispatchAftermath-DDlwqSCY.js → DispatchAftermath-66uQAorV.js} +1 -1
- package/dist/client/assets/{DocumentFocusViewer-f12RRQpV.js → DocumentFocusViewer-DJr0v0D_.js} +1 -1
- package/dist/client/assets/{EmbeddableSurfacesLab-DGl9EMRV.js → EmbeddableSurfacesLab-BBa70EhJ.js} +1 -1
- package/dist/client/assets/{EmptyState-uyYN5piI.js → EmptyState-CZlrHXy-.js} +1 -1
- package/dist/client/assets/{FileViewerPane-HtiDbj9N.js → FileViewerPane-BAO6mtjD.js} +1 -1
- package/dist/client/assets/FleetRollCallHud-C5q2567n.js +1 -0
- package/dist/client/assets/FlightObserveScreen-DZ2mrw91.js +1 -0
- package/dist/client/assets/{FloorContextSheet-DV-SYA0K.js → FloorContextSheet-2_NVPQor.js} +1 -1
- package/dist/client/assets/{FloorExchangePanel-D59nvRCF.js → FloorExchangePanel-BU1pPu8K.js} +1 -1
- package/dist/client/assets/{FloorMessagePasses-BCwsz9VS.js → FloorMessagePasses-cLW2UGNP.js} +1 -1
- package/dist/client/assets/{FloorReplay-BHo79HCD.js → FloorReplay-VFzA6Kxc.js} +1 -1
- package/dist/client/assets/FloorResourcesSheet-C-kQ6Ren.js +1 -0
- package/dist/client/assets/{FloorSavedWork-2tjBoy06.js → FloorSavedWork-BeHDejWz.js} +1 -1
- package/dist/client/assets/FloorTacticalHUD-CO-iiFpb.js +1 -0
- package/dist/client/assets/{FollowScreen-eHXOlK-u.js → FollowScreen-CFfkIbc6.js} +1 -1
- package/dist/client/assets/HarnessMark-C4naWc16.js +1 -0
- package/dist/client/assets/HarnessesScreen-DX3NLcDG.js +1 -0
- package/dist/client/assets/{HerdrSession-CtJOUn7H.js → HerdrSession-_t7yM8vX.js} +2 -2
- package/dist/client/assets/{HomeHero-Cvwx2H0w.js → HomeHero-DouPyNmz.js} +1 -1
- package/dist/client/assets/{HostAdvisorView-CTJXIc1Q.js → HostAdvisorView-CnM1i8hW.js} +1 -1
- package/dist/client/assets/InviteLandingScreen-CEjG2E34.js +1 -0
- package/dist/client/assets/InviteSheet-CwxZtWCl.js +1 -0
- package/dist/client/assets/JumpPalette-O1aJE9gR.js +1 -0
- package/dist/client/assets/{KnowledgeSearchInspector-DwGMVmFL.js → KnowledgeSearchInspector-32n9baT-.js} +1 -1
- package/dist/client/assets/KnowledgeSearchScreen-Dd6jrQ0A.js +1 -0
- package/dist/client/assets/{LaneToolHoverCard-C6YehJqD.js → LaneToolHoverCard-CJa110yk.js} +1 -1
- package/dist/client/assets/LaneTraceDetailSheet-DYrd0BIf.js +1 -0
- package/dist/client/assets/{LaneTraceEventFocus-WLNZZVi_.js → LaneTraceEventFocus-TbrNHRj_.js} +1 -1
- package/dist/client/assets/{MeshCanvas-FDDGE69h.js → MeshCanvas-DWZHYh1A.js} +2 -2
- package/dist/client/assets/{MeshCanvasMinimap-CGRzQCac.js → MeshCanvasMinimap-iswYFpIb.js} +1 -1
- package/dist/client/assets/MeshScreen-8nAzQVbm.js +1 -0
- package/dist/client/assets/{MeshTopologyView-C2Cv_2gx.js → MeshTopologyView-BVvtqI8q.js} +2 -2
- package/dist/client/assets/MessageEmbeds-ksPazAKH.js +1 -0
- package/dist/client/assets/MessagesScreen-C3WB4T21.js +1 -0
- package/dist/client/assets/{MissionContextRail-CVSZJnvX.js → MissionContextRail-D62-Wis8.js} +1 -1
- package/dist/client/assets/MissionControlView-B9cNPXvl.js +1 -0
- package/dist/client/assets/{MissionFocusOverlay-B9SiuO-i.js → MissionFocusOverlay-C1zys3Jv.js} +1 -1
- package/dist/client/assets/MissionLeftAgentRow-vycMV77n.js +1 -0
- package/dist/client/assets/{MissionLogPane-CMBiI29U.js → MissionLogPane-B19lYSY9.js} +1 -1
- package/dist/client/assets/NativeAreaScreen-B1RLa85C.js +1 -0
- package/dist/client/assets/NativeAreaScreen-CV0OhGra.js +1 -0
- package/dist/client/assets/NativeAreaScreen-CzuZt6o1.js +1 -0
- package/dist/client/assets/{NewAgentModal-Cl4nsGhu.js → NewAgentModal-Bh-L-emz.js} +1 -1
- package/dist/client/assets/NewChatComposer-C97-iTMK.js +19 -0
- package/dist/client/assets/{NewChatOrigin-CyPPWTJP.js → NewChatOrigin-DFbF_XvR.js} +1 -1
- package/dist/client/assets/{NodeDetailPanel-BUG8rOb-.js → NodeDetailPanel-CElOEpCh.js} +1 -1
- package/dist/client/assets/{NodeMenu-Fw8ATWQA.js → NodeMenu-B-jjHf1c.js} +1 -1
- package/dist/client/assets/ObserveEmbedScreen-B7Qt69Ms.js +2 -0
- package/dist/client/assets/{ObserveTextFlow-ET0dD1wO.js → ObserveTextFlow-PFnG_10h.js} +2 -2
- package/dist/client/assets/{ObservedTopologyPanel-DkEkQzo-.js → ObservedTopologyPanel-CUTIoLZJ.js} +1 -1
- package/dist/client/assets/OpenScoutAppShell-37PDFfA4.js +31 -0
- package/dist/client/assets/OpsAgentsView-DajlX8LO.js +1 -0
- package/dist/client/assets/OpsScreen-jVcaBKGi.js +1 -0
- package/dist/client/assets/OpsSubnav-BOOYShHE.js +1 -0
- package/dist/client/assets/ProjectAgentProfile-D_wlW4sQ.js +1 -0
- package/dist/client/assets/{ProjectAgentProfileBar-C1fR65Eh.js → ProjectAgentProfileBar-DHuMKJj-.js} +1 -1
- package/dist/client/assets/ProjectAgentProfileHero-Dbebtug1.js +1 -0
- package/dist/client/assets/ProjectsInbox-B8zYE4vP.css +1 -0
- package/dist/client/assets/ProjectsInbox-Cgu7B4--.js +2 -0
- package/dist/client/assets/ProjectsRail-CDWocin_.js +1 -0
- package/dist/client/assets/ProjectsScreen-B_CJycqW.js +1 -0
- package/dist/client/assets/ProjectsThreadAside-1MMl_qUD.js +1 -0
- package/dist/client/assets/Provider-C35yu29I.js +5 -0
- package/dist/client/assets/{RailRow-BYguXNm4.js → RailRow-BjmWK420.js} +1 -1
- package/dist/client/assets/RawSessionsTable-DzT90hWu.js +1 -0
- package/dist/client/assets/RealtimeVoiceScreen-B6ylX3WQ.js +16 -0
- package/dist/client/assets/{RenderedWorkerSprite-CvdWO32C.js → RenderedWorkerSprite-Dhlyg89J.js} +1 -1
- package/dist/client/assets/{ReplayClock-B7JLTp8A.js → ReplayClock-348f17bW.js} +1 -1
- package/dist/client/assets/{ReplayLog-DZTpf2CW.js → ReplayLog-CBnAM3ui.js} +1 -1
- package/dist/client/assets/{ReplayOutpost-CvWQa30T.js → ReplayOutpost-DyRPfNFx.js} +1 -1
- package/dist/client/assets/{RepoDiffEmbedScreen-Cbu0_PJW.js → RepoDiffEmbedScreen-BWxvRDrS.js} +1 -1
- package/dist/client/assets/{RepoDiffPageScreen-Chwm6GXL.js → RepoDiffPageScreen-DN94irmY.js} +1 -1
- package/dist/client/assets/{RepoDiffViewer-C2mb0Wj-.js → RepoDiffViewer-_4JVXBIW.js} +1 -1
- package/dist/client/assets/RepoDiffViewerLazy-XGVC3WXv.js +2 -0
- package/dist/client/assets/{ReposScreen-C7JZQmyh.js → ReposScreen-uMCpt0e9.js} +2 -2
- package/dist/client/assets/{RiggedWorkerCharacter-DNe731GE.js → RiggedWorkerCharacter-q6QRc7_o.js} +1 -1
- package/dist/client/assets/{SageModelStudio-BR1J2D4R.js → SageModelStudio-CNDhZhgD.js} +1 -1
- package/dist/client/assets/{ScoutDeckSurface-flRamdvE.js → ScoutDeckSurface-CUaU4R6T.js} +1 -1
- package/dist/client/assets/{ScoutSurface-BpklGmDL.js → ScoutSurface-3_25USO_.js} +1 -1
- package/dist/client/assets/{ScoutbotFxLab-DeK7ySWZ.js → ScoutbotFxLab-CRqhYe0a.js} +1 -1
- package/dist/client/assets/{SecondaryNav-BkTn5tkq.js → SecondaryNav-D7dbV2qo.js} +1 -1
- package/dist/client/assets/SessionContextStrip-CXfs9hUD.js +1 -0
- package/dist/client/assets/SessionContextStrip-DAIXwtHd.css +1 -0
- package/dist/client/assets/{SessionEmbedScreen-CcQN6xlo.js → SessionEmbedScreen-D0zFmou-.js} +1 -1
- package/dist/client/assets/SessionHopMenu-E6VJZrE0.js +1 -0
- package/dist/client/assets/{SessionObserve-BOBJSfs0.css → SessionObserve-CDdJ7fAE.css} +1 -1
- package/dist/client/assets/SessionObserve-DXxBvejJ.js +12 -0
- package/dist/client/assets/SessionObserveEvidence-Cuj_KHxR.js +1 -0
- package/dist/client/assets/SessionRefScreen-DqLSUlCE.js +1 -0
- package/dist/client/assets/SessionsScreen-BLIRkohT.js +1 -0
- package/dist/client/assets/SettingsDrawer-juCpnbH6.js +3 -0
- package/dist/client/assets/SettingsScreen-BtGzE2-O.js +1 -0
- package/dist/client/assets/{SharedFloorCharacter-CSYG_t9t.js → SharedFloorCharacter-DNEiaOUh.js} +1 -1
- package/dist/client/assets/SharedWorkFloor-0rqtdF-n.css +1 -0
- package/dist/client/assets/SharedWorkFloor-D9mf9KSg.js +2 -0
- package/dist/client/assets/{ShikiPane-BudrOxNK.js → ShikiPane-CRtTYkMj.js} +1 -1
- package/dist/client/assets/{SlidePanel-Datu7XG4.js → SlidePanel-_CHAQdOa.js} +1 -1
- package/dist/client/assets/SpaceSwitcher-BLgSCf_T.js +1 -0
- package/dist/client/assets/{SpriteAvatar-BW1JzkDt.js → SpriteAvatar-CpZWf54-.js} +1 -1
- package/dist/client/assets/{SproutActionSprite-DveCzg6l.js → SproutActionSprite-BSiTS4en.js} +1 -1
- package/dist/client/assets/{StatusPill-MxYClPG5.js → StatusPill-2gCP6H7A.js} +1 -1
- package/dist/client/assets/{TailView-Dn7uWmPz.js → TailView-CYSijNTy.js} +2 -2
- package/dist/client/assets/Terminal-Bi97yb5s.js +4 -0
- package/dist/client/assets/TerminalEmbedScreen-Bqop67Bq.js +1 -0
- package/dist/client/assets/{TerminalHeaderMount-DCGstkZ4.js → TerminalHeaderMount-Cq4OD_xN.js} +1 -1
- package/dist/client/assets/TerminalRelay-DrikpUSJ.js +46 -0
- package/dist/client/assets/{TextDocumentSurface-BhYvAB0o.js → TextDocumentSurface-D52m7Vd8.js} +1 -1
- package/dist/client/assets/{TmuxPeek-BhK0V9Qt.js → TmuxPeek-CXFeweMg.js} +1 -1
- package/dist/client/assets/VoiceControlWell-DF3bjcYA.js +1 -0
- package/dist/client/assets/VoicePathDiagram-CmpHWfO-.js +1 -0
- package/dist/client/assets/{VoicePermissionsPanel-CecFWzva.js → VoicePermissionsPanel-Ok2nfxHw.js} +1 -1
- package/dist/client/assets/VoiceTurnDetails-wAByRaNB.js +8 -0
- package/dist/client/assets/VoiceTurnStage-edoJalLV.js +1 -0
- package/dist/client/assets/VoiceTurnView-D-8g5E4r.js +1 -0
- package/dist/client/assets/WorkDetailScreen-zQkNVy2F.js +5 -0
- package/dist/client/assets/{WorkFilesViewer-DJHftsH9.js → WorkFilesViewer-vNt01sDd.js} +1 -1
- package/dist/client/assets/{WorkRunView-x5PH1byG.js → WorkRunView-BDkR7Edq.js} +1 -1
- package/dist/client/assets/WorldActorTalk-BvSg_b1y.js +1 -0
- package/dist/client/assets/{WorldCharacter-Dn4sIXNP.js → WorldCharacter-CIIlutQq.js} +1 -1
- package/dist/client/assets/WorldMinimap-B6HNgcDe.js +1 -0
- package/dist/client/assets/{WorldSky-DV9bpvXj.js → WorldSky-Jm2Z6dfW.js} +1 -1
- package/dist/client/assets/{activity-CSUhvjD0.js → activity-CIlFrfPJ.js} +1 -1
- package/dist/client/assets/{addon-fit-MR98IWES.js → addon-fit-dFpj9Kfq.js} +1 -1
- package/dist/client/assets/{addon-webgl-CIIKXrvK.js → addon-webgl-BFCGRtGh.js} +1 -1
- package/dist/client/assets/{agent-essentials-8t2il7PV.js → agent-essentials-BGGvT5G6.js} +1 -1
- package/dist/client/assets/{agent-floor-actor-3v9drnxh.js → agent-floor-actor-DW8zLht0.js} +1 -1
- package/dist/client/assets/{agent-lane-card-model-l0stnU9N.js → agent-lane-card-model-CeqQGp-8.js} +1 -1
- package/dist/client/assets/{agent-lane-detail-Db7KyAlf.js → agent-lane-detail-Ti3trpfH.js} +1 -1
- package/dist/client/assets/{agent-lane-preview-B8lsQJOQ.js → agent-lane-preview-Dpa3DuOn.js} +1 -1
- package/dist/client/assets/{agent-lanes-model-CX0wTcnF.js → agent-lanes-model-DMAdqCmK.js} +1 -1
- package/dist/client/assets/{agent-master-model-C-KdOFDK.js → agent-master-model-Bk_yuUXJ.js} +1 -1
- package/dist/client/assets/{agent-specialization-CiVxQsFT.js → agent-specialization-DDc7mLCW.js} +1 -1
- package/dist/client/assets/agents-screen-BYakbO50.css +1 -0
- package/dist/client/assets/{api-B9_IqFKY.js → api-BQYTwoz6.js} +1 -1
- package/dist/client/assets/{api-CaROe5_H.js → api-DSqpVKC7.js} +1 -1
- package/dist/client/assets/{arc.es-BzhWalCl.js → arc.es-C1SQHJ3k.js} +1 -1
- package/dist/client/assets/{arrow-left-PuKdO3NM.js → arrow-left-MVUKauwQ.js} +1 -1
- package/dist/client/assets/{arrow-right-ldbfp4SZ.js → arrow-right-Bp-FpE5V.js} +1 -1
- package/dist/client/assets/{arrow-up-right-Hn754ybA.js → arrow-up-right-BPedAgxO.js} +1 -1
- package/dist/client/assets/{book-open-BlJnpf2U.js → book-open-CV98WMSp.js} +1 -1
- package/dist/client/assets/{bot-CfN9PSBF.js → bot-B4zLQ4IN.js} +1 -1
- package/dist/client/assets/{cache-DEy9E34b.js → cache-DGBo3vIf.js} +1 -1
- package/dist/client/assets/chat-api-DSJMBYoT.js +2 -0
- package/dist/client/assets/chat-message-markup-91DIry6R.js +1 -0
- package/dist/client/assets/chat-space-model-aW3Fd8_U.js +4 -0
- package/dist/client/assets/chat-transport-DNS5CB2I.js +1 -0
- package/dist/client/assets/{check-B8dMv3Is.js → check-lrJ3a73a.js} +1 -1
- package/dist/client/assets/{chevron-down-B5eMsn5c.js → chevron-down-l1mrh5S9.js} +1 -1
- package/dist/client/assets/{chevron-right-C7UGFpkl.js → chevron-right-DrfqcerI.js} +1 -1
- package/dist/client/assets/{chevron-up-BHOEgHcn.js → chevron-up-CETZJzjV.js} +1 -1
- package/dist/client/assets/{chunk-HRAB3GC3-C5X-kFhb.js → chunk-HRAB3GC3-DbVLgbWX.js} +1 -1
- package/dist/client/assets/{clock-DFcRbtrl.js → clock-BV1aqPkK.js} +1 -1
- package/dist/client/assets/{code-xml-BmyLM0I2.js → code-xml-BhcNbLWU.js} +1 -1
- package/dist/client/assets/{coffee-C_D9zooM.js → coffee-D7EAOdCk.js} +1 -1
- package/dist/client/assets/{compass-DTZdCpv9.js → compass-63TUaz5_.js} +1 -1
- package/dist/client/assets/content-B1lgE8qr.js +1 -0
- package/dist/client/assets/content-B5l11YyQ.js +1 -0
- package/dist/client/assets/content-BNZOZEpX.js +1 -0
- package/dist/client/assets/content-BRIxP155.js +1 -0
- package/dist/client/assets/content-BWd8gt8L.js +1 -0
- package/dist/client/assets/content-BfwS2jAK.js +1 -0
- package/dist/client/assets/content-C4p43_eT.js +1 -0
- package/dist/client/assets/content-CdYfaoDV.js +1 -0
- package/dist/client/assets/content-CzldLxw0.js +1 -0
- package/dist/client/assets/content-D-olnc4U.js +1 -0
- package/dist/client/assets/content-DTioimq4.js +1 -0
- package/dist/client/assets/content-LOebm3_d.js +1 -0
- package/dist/client/assets/content-nGlEZhUI.js +1 -0
- package/dist/client/assets/content-oyzDM-LK.js +1 -0
- package/dist/client/assets/content-x1PHxED7.js +1 -0
- package/dist/client/assets/content-zX3ZY3T9.js +1 -0
- package/dist/client/assets/{context-budget-DemtXu7E.js → context-budget-8qFKqM-j.js} +1 -1
- package/dist/client/assets/{conversation-icons-BQ4OeOmr.js → conversation-icons-Tqba2d56.js} +1 -1
- package/dist/client/assets/conversation-model-FxDeWlle.js +1 -0
- package/dist/client/assets/conversation-motion-features-C5zjuNwE.js +1 -0
- package/dist/client/assets/conversations-DoAAO6kA.js +1 -0
- package/dist/client/assets/{copy-D9WUpQRf.js → copy-xKeM5ZtU.js} +1 -1
- package/dist/client/assets/{cpu-Ck_4tB_-.js → cpu-BOTa_WLr.js} +1 -1
- package/dist/client/assets/{createLucideIcon-DkjnzvcJ.js → createLucideIcon-zZ8Hx7er.js} +1 -1
- package/dist/client/assets/{credentials-C4VXz2hr.js → credentials-OeoF-VKJ.js} +1 -1
- package/dist/client/assets/ctx-panel-BC8fpcWJ.css +1 -0
- package/dist/client/assets/direct-voice-BbLPuJ04.js +2 -0
- package/dist/client/assets/direct-voice-DbO7CSv_.css +1 -0
- package/dist/client/assets/discover-DJFxyV1k.js +2 -0
- package/dist/client/assets/embed-entry-Lyvu0Kfc.js +2 -0
- package/dist/client/assets/{external-link-RT4Ph-6-.js → external-link-CUObqmgX.js} +1 -1
- package/dist/client/assets/{eye-CtqSV8BS.js → eye-LrO-cXQt.js} +1 -1
- package/dist/client/assets/{file-code-corner-D_Aptal2.js → file-code-corner-CsU7jJpu.js} +1 -1
- package/dist/client/assets/{file-text-ChtICwub.js → file-text-CnISiiw6.js} +1 -1
- package/dist/client/assets/{flag-CqdOxVkI.js → flag-C4wl8z2-.js} +1 -1
- package/dist/client/assets/fleet-roll-call-BUgf7w-V.css +1 -0
- package/dist/client/assets/{floor-context-model-DZBpo_oD.js → floor-context-model-rWKqaKmV.js} +1 -1
- package/dist/client/assets/{floor-message-passes-CJh9f8Jp.js → floor-message-passes-CO3Ix_wR.js} +1 -1
- package/dist/client/assets/{folder-0fWevPvQ.js → folder-D5prSkzz.js} +1 -1
- package/dist/client/assets/{gauge-Dgtfxf_o.js → gauge-D9_5iJEm.js} +1 -1
- package/dist/client/assets/{gestures-BDCZ1FRG.js → gestures-QZub3Ot9.js} +1 -1
- package/dist/client/assets/{git-branch-CA3cHKCI.js → git-branch-B0_fPLO7.js} +1 -1
- package/dist/client/assets/{go-shortcuts-DKtw4qYx.js → go-shortcuts-DicR7sUf.js} +1 -1
- package/dist/client/assets/home-moving-signal-rpMhsOJB.js +1 -0
- package/dist/client/assets/home-now-card-ByE6Umcx.js +1 -0
- package/dist/client/assets/{home-now-card-nano-D1ScGrgv.js → home-now-card-nano-B5Dv3-pb.js} +1 -1
- package/dist/client/assets/hooks-_eCZZPsR.js +2 -0
- package/dist/client/assets/index-724SdE6r.js +1 -0
- package/dist/client/assets/{index-CvsM3jm8.js → index-CHD0qcfL.js} +1 -1
- package/dist/client/assets/index-CN4rBB_s.css +1 -0
- package/dist/client/assets/index-D1d98iYf.js +1 -0
- package/dist/client/assets/index-EsrkGBcv.js +10 -0
- package/dist/client/assets/index-gGHPA-By.js +1 -0
- package/dist/client/assets/{inspector-panel-BLhDODb3.js → inspector-panel-BkgUDn6G.js} +2 -2
- package/dist/client/assets/{keyboard-nav-CXfav14z.js → keyboard-nav-DDHegDbx.js} +1 -1
- package/dist/client/assets/lane-ask-display-BTVSakyo.js +18 -0
- package/dist/client/assets/{lane-observe-BD21P8BB.js → lane-observe-CteDwdD-.js} +3 -3
- package/dist/client/assets/{lane-roster-store-DzNHP392.js → lane-roster-store-D-RSWjb-.js} +1 -1
- package/dist/client/assets/{layers-Bolb8ejU.js → layers-C8PDiMul.js} +1 -1
- package/dist/client/assets/{layout-grid-DI9tVJ2E.js → layout-grid-Cor2frzj.js} +1 -1
- package/dist/client/assets/left-Bn5X7x2o.js +2 -0
- package/dist/client/assets/left-BqS0fYX1.js +1 -0
- package/dist/client/assets/left-CTCeeeD3.js +1 -0
- package/dist/client/assets/left-DhtVPVux.js +1 -0
- package/dist/client/assets/left-K39b-Wvx.js +2 -0
- package/dist/client/assets/left-KGmueNPt.js +1 -0
- package/dist/client/assets/left-P_GOYB-s.js +1 -0
- package/dist/client/assets/left-advisor-B0N47De2.js +1 -0
- package/dist/client/assets/left-agents-CsSNc51Y.js +1 -0
- package/dist/client/assets/left-default-BlO5LP2T.js +1 -0
- package/dist/client/assets/left-lanes-C4PhaJE6.js +1 -0
- package/dist/client/assets/left-mission-BjTE5vPa.js +1 -0
- package/dist/client/assets/library-CkWNPHRp.js +1 -0
- package/dist/client/assets/{loader-circle-DurUYl7E.js → loader-circle-OvccU82H.js} +1 -1
- package/dist/client/assets/{local-agents-D9fYYRyj.js → local-agents-BqnoxJrq.js} +1 -1
- package/dist/client/assets/log-in-7SnYqW5w.js +1 -0
- package/dist/client/assets/{machine-children-RGS4Q0r6.js → machine-children-DxcqCLmd.js} +1 -1
- package/dist/client/assets/media-blobs-Bi8pxr1u.js +1 -0
- package/dist/client/assets/{mentions-Ctw1ECUC.js → mentions-ByUvhS-v.js} +1 -1
- package/dist/client/assets/{mesh-ops-CGpRk4ik.js → mesh-ops-CiZ8xSAx.js} +1 -1
- package/dist/client/assets/{mesh-view-store-CliSYsmt.js → mesh-view-store-DZvJC4KU.js} +1 -1
- package/dist/client/assets/{message-circle-CSiJj6yo.js → message-circle-CxRVKNE-.js} +1 -1
- package/dist/client/assets/message-markup-BQW5jdJw.js +15 -0
- package/dist/client/assets/message-markup-Zwo3t4cI.js +1 -0
- package/dist/client/assets/{message-square-NmXWtWLR.js → message-square-BxesYglW.js} +1 -1
- package/dist/client/assets/mission-control-model-BpJHDV5D.js +1 -0
- package/dist/client/assets/{mission-control-store-DZ29Mlj1.js → mission-control-store-elEEsIvb.js} +1 -1
- package/dist/client/assets/{mission-wall-DOuGOxQy.js → mission-wall-CAo4BKfa.js} +1 -1
- package/dist/client/assets/monitor-DTTYEb73.js +1 -0
- package/dist/client/assets/{nav-destinations-CyXnw9kh.js → nav-destinations-uorRqFxf.js} +1 -1
- package/dist/client/assets/{observe-CkfOxYx_.js → observe-BJqERJVj.js} +1 -1
- package/dist/client/assets/{operator-attention-DGR4kOog.js → operator-attention-DBaRg5ep.js} +1 -1
- package/dist/client/assets/{page-status-CkS3SZu-.js → page-status-BswZLqvA.js} +1 -1
- package/dist/client/assets/{panel-right-BNTJhy8M.js → panel-right-Bv7sP_fc.js} +1 -1
- package/dist/client/assets/paperclip-BjcuP_Hx.js +1 -0
- package/dist/client/assets/{pause-DWS7YGQ3.js → pause-C2XTlkjs.js} +1 -1
- package/dist/client/assets/{persistent-state-xsuk6Kc-.js → persistent-state-KRk_yb0q.js} +1 -1
- package/dist/client/assets/{pin-DWlD1BOF.js → pin-C2mFOV1l.js} +1 -1
- package/dist/client/assets/{play-D_Pggug4.js → play-FT6K3It1.js} +1 -1
- package/dist/client/assets/{plus-D_wLGJGT.js → plus-DFDDeGKu.js} +1 -1
- package/dist/client/assets/profile-DTmzN16I.js +1 -0
- package/dist/client/assets/{projects-inbox-DvbqJO3q.js → projects-inbox-C0FUCv_p.js} +1 -1
- package/dist/client/assets/projects-inbox-ColX6lpx.css +1 -0
- package/dist/client/assets/provider-Dojd8quC.js +1 -0
- package/dist/client/assets/{proxy-DOG46ja4.js → proxy-AJsmwA6h.js} +1 -1
- package/dist/client/assets/{radio-C_jtwbFP.js → radio-DRoOZsws.js} +1 -1
- package/dist/client/assets/{refresh-cw-Da9DDLk2.js → refresh-cw-BmVr7sCD.js} +1 -1
- package/dist/client/assets/resolve-panes-pbY1fCWi.js +1 -0
- package/dist/client/assets/resolve-sidebar-context-YWkZTq1t.js +1 -0
- package/dist/client/assets/right-49kO-6nD.js +1 -0
- package/dist/client/assets/right-APtItA8A.js +1 -0
- package/dist/client/assets/right-BJwhPqtn.js +1 -0
- package/dist/client/assets/right-BPqrf4ek.js +1 -0
- package/dist/client/assets/right-D7djOy6K.js +1 -0
- package/dist/client/assets/right-DKOUCRob.js +1 -0
- package/dist/client/assets/right-DMNrVzg7.js +1 -0
- package/dist/client/assets/{right-BLJsc2-p.js → right-DWPVB-nK.js} +1 -1
- package/dist/client/assets/right-DppeMCy4.js +1 -0
- package/dist/client/assets/right-GAL5Mw1v.js +1 -0
- package/dist/client/assets/{rocket-DyrYDo8V.js → rocket-CGl4RTV7.js} +1 -1
- package/dist/client/assets/router-DCtl8wqb.js +1 -0
- package/dist/client/assets/runtime-picker-DXu2bOTh.js +1 -0
- package/dist/client/assets/{scope-views-B7PZGlhY.js → scope-views-RUWwCVAr.js} +1 -1
- package/dist/client/assets/scout-voice-CZx60X6E.js +1 -0
- package/dist/client/assets/{scoutbot-markdown-Bz0Vbto2.js → scoutbot-markdown-BKEBSbG0.js} +1 -1
- package/dist/client/assets/{scroll-text-DwC8r2g6.js → scroll-text-DNjxhyO2.js} +1 -1
- package/dist/client/assets/{search-C4VlW_0l.js → search-DT42oyRW.js} +1 -1
- package/dist/client/assets/secondaryNavConfig-CS1svh6n.js +1 -0
- package/dist/client/assets/secondaryNavConfig-D15P1Y9k.css +1 -0
- package/dist/client/assets/{selection-bridge-B5jqyMR9.js → selection-bridge-x3wFUjxj.js} +1 -1
- package/dist/client/assets/{send-horizontal-pOtGI7FM.js → send-horizontal-CH0-fbZE.js} +1 -1
- package/dist/client/assets/{send-to-agent-session-BZGq_ycy.js → send-to-agent-session-DoKCDBJ4.js} +1 -1
- package/dist/client/assets/{server-ms1yxUYJ.js → server-QfsgMLk1.js} +1 -1
- package/dist/client/assets/{session-catalog-s-T_w41t.js → session-catalog-CvSdPHPe.js} +1 -1
- package/dist/client/assets/session-recap-lanes-D-eVJnpY.js +1 -0
- package/dist/client/assets/session-recap-queue-41l2XVkI.js +1 -0
- package/dist/client/assets/{session-table-CDx_16xf.js → session-table-L-pns6Zl.js} +1 -1
- package/dist/client/assets/{sessions-view-DzYGsKWS.js → sessions-view-Dc-QAa7O.js} +1 -1
- package/dist/client/assets/{settings-TJIkkZ0P.js → settings-BVh7kldq.js} +1 -1
- package/dist/client/assets/{shared-work-artifacts-4IIQXQfc.js → shared-work-artifacts-DfNl9KTo.js} +1 -1
- package/dist/client/assets/{sliders-horizontal-CHf3ntw0.js → sliders-horizontal-782VC_yy.js} +1 -1
- package/dist/client/assets/{sparkles-BbOFw3d0.js → sparkles-BjHq_DNK.js} +1 -1
- package/dist/client/assets/{sse-v5QLsOHV.js → sse-BCPRocpq.js} +1 -1
- package/dist/client/assets/system-surfaces-redesign-q2BmCB7e.css +1 -0
- package/dist/client/assets/{tail-events-DQ46QBW1.js → tail-events-d0yAYxR0.js} +1 -1
- package/dist/client/assets/{terminal-96JWDYDL.js → terminal-hQKQygcf.js} +1 -1
- package/dist/client/assets/{terminal-relay-Bfx8pg80.js → terminal-relay-Bxs1hp-j.js} +1 -1
- package/dist/client/assets/{terminal-sessions-Ch9aYlgi.js → terminal-sessions-3RfJpen8.js} +1 -1
- package/dist/client/assets/{terminal-takeover-BlpxpvSp.js → terminal-takeover-Ay5C2c-M.js} +1 -1
- package/dist/client/assets/theme-vars-DNK0nn3k.js +1 -0
- package/dist/client/assets/triangle-alert-CHoRGdVO.js +1 -0
- package/dist/client/assets/use-beside-DoRC1nt0.js +1 -0
- package/dist/client/assets/{use-conversation-list-A_YUf8lo.js → use-conversation-list-CY4JciOV.js} +1 -1
- package/dist/client/assets/{use-fleet-active-asks-DFs_u-vM.js → use-fleet-active-asks-CymmXWH4.js} +1 -1
- package/dist/client/assets/{use-mesh-node-state-Ck9CYplv.js → use-mesh-node-state-BvaqtODo.js} +1 -1
- package/dist/client/assets/{use-mesh-ops-items-Be1WmwCg.js → use-mesh-ops-items-BSYaqH_0.js} +1 -1
- package/dist/client/assets/{use-reduced-motion-D7n3vK8t.js → use-reduced-motion-3gMYZNIp.js} +1 -1
- package/dist/client/assets/use-scout-dev-flags-DS_pYYQd.js +1 -0
- package/dist/client/assets/{useAgentHoverCard-Dr-OjNFF.js → useAgentHoverCard-BANmpjMh.js} +1 -1
- package/dist/client/assets/useContentSecondaryNav-C6OBu-3_.js +1 -0
- package/dist/client/assets/{useEmbedHeadline-BL8wQawZ.js → useEmbedHeadline-D6pJRxUg.js} +1 -1
- package/dist/client/assets/usePersistentState-B8lP7TRb.js +1 -0
- package/dist/client/assets/{usePierreRuntime-DJkRHMoe.js → usePierreRuntime-BAQdiN0L.js} +1 -1
- package/dist/client/assets/useSidebarCollapse-OL_8J5cL.js +1 -0
- package/dist/client/assets/users-BUjx36gx.js +1 -0
- package/dist/client/assets/voice-paths-CJUuBPh3.css +1 -0
- package/dist/client/assets/voice-turn-DftA0iIb.css +1 -0
- package/dist/client/assets/voice-turn-ledger-BMZxlSjg.js +1 -0
- package/dist/client/assets/{wrench-BsMTSeji.js → wrench-DR0i5BU7.js} +1 -1
- package/dist/client/assets/{x-DI1ktCYb.js → x-DAehov0E.js} +1 -1
- package/dist/client/assets/{xterm-B1YBE4Gq.js → xterm-BXQiLVnI.js} +1 -1
- package/dist/client/assets/{zap-sKPkh4sQ.js → zap-CEjZNZbI.js} +1 -1
- package/dist/client/crew/sheets/eye-plate-v1/look-down-left.webp +0 -0
- package/dist/client/crew/sheets/eye-plate-v1/look-down-right.webp +0 -0
- package/dist/client/crew/sheets/eye-plate-v1/look-down.webp +0 -0
- package/dist/client/crew/sheets/eye-plate-v1/look-up-left.webp +0 -0
- package/dist/client/crew/sheets/eye-plate-v1/look-up-right.webp +0 -0
- package/dist/client/crew/sheets/eye-plate-v1/look-up.webp +0 -0
- package/dist/client/crew/sheets/sprout/blink-half.webp +0 -0
- package/dist/client/crew/sheets/sprout/blink-shut.webp +0 -0
- package/dist/client/crew/sheets/sprout/look-down-left.webp +0 -0
- package/dist/client/crew/sheets/sprout/look-down-right.webp +0 -0
- package/dist/client/crew/sheets/sprout/look-down.webp +0 -0
- package/dist/client/crew/sheets/sprout/look-left.webp +0 -0
- package/dist/client/crew/sheets/sprout/look-right.webp +0 -0
- package/dist/client/crew/sheets/sprout/look-up-left.webp +0 -0
- package/dist/client/crew/sheets/sprout/look-up-right.webp +0 -0
- package/dist/client/crew/sheets/sprout/look-up.webp +0 -0
- package/dist/client/index.html +15 -3
- package/dist/drizzle/0019_session_actor_targets.sql +227 -0
- package/dist/drizzle/0020_message_reactions.sql +11 -0
- package/dist/drizzle/README.md +19 -0
- package/dist/drizzle/meta/_journal.json +14 -0
- package/dist/highlights-eq9cgrbb.scm +604 -0
- package/dist/highlights-ghv9g403.scm +205 -0
- package/dist/highlights-hk7bwhj4.scm +284 -0
- package/dist/highlights-r812a2qc.scm +150 -0
- package/dist/highlights-x6tmsnaa.scm +115 -0
- package/dist/injections-73j83es3.scm +27 -0
- package/dist/main.mjs +1721 -837
- package/dist/node/main.mjs +264 -39
- package/dist/pairing-runtime-controller.mjs +1090 -570
- package/dist/runtime/base-daemon.mjs +14272 -61
- package/dist/runtime/broker-daemon.mjs +16999 -1243
- package/dist/runtime/broker-process-manager.mjs +101 -6
- package/dist/runtime/mesh-discover.mjs +101 -6
- package/dist/scout-control-plane-web.mjs +27057 -6178
- package/dist/tree-sitter-javascript-nd0q4pe9.wasm +0 -0
- package/dist/tree-sitter-markdown-411r6y9b.wasm +0 -0
- package/dist/tree-sitter-markdown_inline-j5349f42.wasm +0 -0
- package/dist/tree-sitter-typescript-zxjzwt75.wasm +0 -0
- package/dist/tree-sitter-zig-e78zbjpm.wasm +0 -0
- package/dist/update-helper.mjs +294 -56
- package/package.json +2 -2
- package/dist/client/assets/ActivityScreen-DCALiEXY.js +0 -1
- package/dist/client/assets/AgentAdventures-NwTKeF0F.js +0 -1
- package/dist/client/assets/AgentAvatar-BIwg54Tj.js +0 -1
- package/dist/client/assets/AgentConfigurationScreen-B2Hw0ce1.js +0 -1
- package/dist/client/assets/AgentDefinitionsWorkspace-CwZJ833X.js +0 -1
- package/dist/client/assets/AgentFloorView-l2wNKFob.js +0 -1
- package/dist/client/assets/AgentInfoScreen-ClZM1wQb.js +0 -1
- package/dist/client/assets/AgentLanesEmbedScreen-DqHwqY0X.js +0 -1
- package/dist/client/assets/AgentLanesView-aAyC7lHf.js +0 -2
- package/dist/client/assets/AgentMasterScreen-By6DN0jF.js +0 -1
- package/dist/client/assets/AgentSessions-Cox2zS-e.js +0 -6
- package/dist/client/assets/AgentsConsole-Dq0S_hRA.js +0 -1
- package/dist/client/assets/AgentsScreen-Bi9Lx47B.js +0 -1
- package/dist/client/assets/AgentsSubnav-BOobgtGE.js +0 -1
- package/dist/client/assets/BriefingDetailScreen-sprFl4Nk.js +0 -1
- package/dist/client/assets/BrokerScreen-CejzhRsB.js +0 -8
- package/dist/client/assets/ConversationComposer-B7RU6LKd.js +0 -1
- package/dist/client/assets/ConversationFeedRows-DVqnZQH0.js +0 -1
- package/dist/client/assets/ConversationHeader-CCSU8uo_.js +0 -1
- package/dist/client/assets/ConversationScreen-Brfas2y0.css +0 -1
- package/dist/client/assets/ConversationScreen-tTP6B_F-.js +0 -2
- package/dist/client/assets/ConversationStatus-CK-YfLpi.js +0 -1
- package/dist/client/assets/CrewAvatar-CJhuqTsJ.js +0 -1
- package/dist/client/assets/CrewWorkspaces-4O8dgRUD.js +0 -1
- package/dist/client/assets/CrewWorkspaces-Diq11KDq.css +0 -1
- package/dist/client/assets/FlightObserveScreen-DDXfNbsw.js +0 -1
- package/dist/client/assets/FloorResourcesSheet-Djrgd_ZU.js +0 -1
- package/dist/client/assets/FloorTacticalHUD-Bngao6sn.js +0 -1
- package/dist/client/assets/HarnessMark-Bt47OeHy.js +0 -1
- package/dist/client/assets/HarnessesScreen-M84sFjWY.js +0 -1
- package/dist/client/assets/KnowledgeSearchScreen-WC0WhFio.js +0 -1
- package/dist/client/assets/LaneTraceDetailSheet-mAhj7MJi.js +0 -1
- package/dist/client/assets/MeshScreen-DlfiMlaR.js +0 -1
- package/dist/client/assets/MessagesScreen-BZ7yaGJx.js +0 -1
- package/dist/client/assets/MissionControlView-DpGhxG4a.js +0 -1
- package/dist/client/assets/MissionLeftAgentRow-DhhRRim0.js +0 -1
- package/dist/client/assets/NativeAreaScreen-BQyHHRAM.js +0 -1
- package/dist/client/assets/NativeAreaScreen-Ditv-TYW.js +0 -1
- package/dist/client/assets/NativeAreaScreen-Dq3uPSEI.js +0 -1
- package/dist/client/assets/NewChatComposer-JjLbm3W2.js +0 -19
- package/dist/client/assets/ObserveEmbedScreen-BPiSXXvm.js +0 -2
- package/dist/client/assets/OpenScoutAppShell-CzKbjwCA.js +0 -22
- package/dist/client/assets/OpsAgentsView-CZbtkcQH.js +0 -1
- package/dist/client/assets/OpsScreen-DJq-aBmX.js +0 -1
- package/dist/client/assets/OpsSubnav-9sURjajO.js +0 -1
- package/dist/client/assets/ProjectAgentProfile-q_1tMJIL.js +0 -1
- package/dist/client/assets/ProjectAgentProfileHero-DyEFyTFs.js +0 -1
- package/dist/client/assets/ProjectsInbox-Bs8I__my.js +0 -2
- package/dist/client/assets/ProjectsRail-Deb38OJ1.js +0 -1
- package/dist/client/assets/ProjectsScreen-CgLiYiss.js +0 -1
- package/dist/client/assets/ProjectsThreadAside-C0Yw3yIL.js +0 -1
- package/dist/client/assets/Provider-5Hotn7NQ.js +0 -5
- package/dist/client/assets/RawSessionsTable-DIhmlvk-.js +0 -1
- package/dist/client/assets/RealtimeVoiceScreen-3oU7b7V5.js +0 -1
- package/dist/client/assets/RepoDiffViewerLazy-BQ6ZCrsq.js +0 -2
- package/dist/client/assets/SessionObserve-DaqDhqDI.js +0 -12
- package/dist/client/assets/SessionObserveEvidence-Drv-D8Oh.js +0 -1
- package/dist/client/assets/SessionRefScreen-BOQ1_ydg.js +0 -1
- package/dist/client/assets/SessionsScreen-R8QKvoey.js +0 -1
- package/dist/client/assets/SettingsDrawer-BDapR4E9.js +0 -3
- package/dist/client/assets/SettingsScreen-DirtO7Z0.js +0 -1
- package/dist/client/assets/SharedWorkFloor-BCmdeb3Q.css +0 -1
- package/dist/client/assets/SharedWorkFloor-yPWFLZwX.js +0 -2
- package/dist/client/assets/Terminal-D-DsQlmV.js +0 -4
- package/dist/client/assets/TerminalEmbedScreen-9Gmln759.js +0 -1
- package/dist/client/assets/WorkDetailScreen-CwtRCm_-.js +0 -5
- package/dist/client/assets/WorldActorTalk-uIH2jGqA.js +0 -1
- package/dist/client/assets/WorldMinimap-Blqg0d5r.js +0 -1
- package/dist/client/assets/agent-autocomplete-C7xwIcwd.css +0 -1
- package/dist/client/assets/agent-autocomplete-CeHQpuG9.js +0 -10
- package/dist/client/assets/agents-screen-BMu6PpRY.css +0 -1
- package/dist/client/assets/arrow-down-WoVlkUmg.js +0 -1
- package/dist/client/assets/chunk-JTPDIGGW-ZC-98AHT.js +0 -46
- package/dist/client/assets/chunk-T65CQEWV-CSVUz2rY.js +0 -1
- package/dist/client/assets/chunk-YOZR3KYS-B59jqwO0.js +0 -2
- package/dist/client/assets/content-B5Q4pb9R.js +0 -1
- package/dist/client/assets/content-BK1IfOZs.js +0 -1
- package/dist/client/assets/content-BeEsWLEm.js +0 -1
- package/dist/client/assets/content-BkOwEknW.js +0 -1
- package/dist/client/assets/content-C32W5kAG.js +0 -1
- package/dist/client/assets/content-CoqyLs9v.js +0 -1
- package/dist/client/assets/content-CwpdIS5b.js +0 -1
- package/dist/client/assets/content-DS2OkJ3Q.js +0 -1
- package/dist/client/assets/content-DXKaPDfn.js +0 -1
- package/dist/client/assets/content-DZt5-dkI.js +0 -1
- package/dist/client/assets/content-DbQJH8L1.js +0 -1
- package/dist/client/assets/content-DetoiaHq.js +0 -1
- package/dist/client/assets/content-Dhu3wL7J.js +0 -1
- package/dist/client/assets/content-Dpv34iZu.js +0 -1
- package/dist/client/assets/content-TtQJb61D.js +0 -1
- package/dist/client/assets/content-ymNb2R7g.js +0 -1
- package/dist/client/assets/conversation-model-BGFHoxQ0.js +0 -1
- package/dist/client/assets/conversation-motion-features-9x8uZpwh.js +0 -1
- package/dist/client/assets/conversations-Cbg9h_Af.js +0 -1
- package/dist/client/assets/ctx-panel-F05jXK4Q.css +0 -1
- package/dist/client/assets/discover-C8IOY7_K.js +0 -2
- package/dist/client/assets/embed-entry-CG3CfCbm.js +0 -2
- package/dist/client/assets/home-moving-signal-B7m-ngb2.js +0 -1
- package/dist/client/assets/home-now-card-DduXkHRR.js +0 -1
- package/dist/client/assets/hooks-C6VyQTQe.js +0 -2
- package/dist/client/assets/index-C5cX8dkl.js +0 -1
- package/dist/client/assets/index-C8uS5szO.js +0 -10
- package/dist/client/assets/index-Ck1__1yL.css +0 -1
- package/dist/client/assets/index-ClOOrVG1.js +0 -1
- package/dist/client/assets/index-Crtgfc9I.js +0 -1
- package/dist/client/assets/lane-ask-display-B6iCAVcd.js +0 -18
- package/dist/client/assets/left-B-_z_nqj.js +0 -2
- package/dist/client/assets/left-B1LY7rJc.js +0 -1
- package/dist/client/assets/left-C6bdjWcG.js +0 -2
- package/dist/client/assets/left-CF4iuqlz.js +0 -1
- package/dist/client/assets/left-DLtNyZl1.js +0 -1
- package/dist/client/assets/left-Fpxoq-VY.js +0 -1
- package/dist/client/assets/left-N2wXfTlp.js +0 -1
- package/dist/client/assets/left-advisor-CeIjCKbd.js +0 -1
- package/dist/client/assets/left-agents-upjHVlOj.js +0 -1
- package/dist/client/assets/left-default-08gmdCtb.js +0 -1
- package/dist/client/assets/left-lanes-Cvsp73Hw.js +0 -1
- package/dist/client/assets/left-mission-W1LLaz74.js +0 -1
- package/dist/client/assets/library-DLKBVUJ6.js +0 -1
- package/dist/client/assets/message-markup-DgFSyb3f.js +0 -15
- package/dist/client/assets/mission-control-model-C30vU1Fe.js +0 -1
- package/dist/client/assets/profile-C3KgiZvc.js +0 -1
- package/dist/client/assets/projects-inbox-BIW7nv-H.css +0 -1
- package/dist/client/assets/resolve-panes-DuowGRTk.js +0 -1
- package/dist/client/assets/resolve-sidebar-context-BkTbqteq.js +0 -1
- package/dist/client/assets/right-B9OUA6Ho.js +0 -1
- package/dist/client/assets/right-BDQnjetX.js +0 -1
- package/dist/client/assets/right-BUbKHmRH.js +0 -1
- package/dist/client/assets/right-Ci2IcD4s.js +0 -1
- package/dist/client/assets/right-CmCce3e5.js +0 -1
- package/dist/client/assets/right-D7w0zM5a.js +0 -1
- package/dist/client/assets/right-DIoON_bv.js +0 -1
- package/dist/client/assets/right-E0Jr3VN5.js +0 -1
- package/dist/client/assets/right-lCdAk9dW.js +0 -1
- package/dist/client/assets/router-BKiMcYa7.js +0 -1
- package/dist/client/assets/runtime-picker-DdsttHHc.js +0 -1
- package/dist/client/assets/scout-voice-DOQ_B77g.js +0 -1
- package/dist/client/assets/secondaryNavConfig-DAXIFtVd.js +0 -1
- package/dist/client/assets/secondaryNavConfig-xssF_ubT.css +0 -1
- package/dist/client/assets/system-surfaces-redesign-DKFg4GB5.css +0 -1
- package/dist/client/assets/use-beside-Df-F2Uvg.js +0 -1
- package/dist/client/assets/use-scout-dev-flags-0TXfQcG0.js +0 -1
- package/dist/client/assets/useContentSecondaryNav-CGvMOVGY.js +0 -1
- package/dist/drizzle/meta/0000_snapshot.json +0 -4575
- package/dist/drizzle/meta/0001_snapshot.json +0 -4624
- package/dist/drizzle/meta/0002_snapshot.json +0 -4631
- package/dist/drizzle/meta/0003_snapshot.json +0 -4952
- package/dist/drizzle/meta/0004_snapshot.json +0 -5235
- package/dist/drizzle/meta/0005_snapshot.json +0 -5599
- package/dist/drizzle/meta/0006_snapshot.json +0 -5606
- package/dist/drizzle/meta/0007_snapshot.json +0 -5767
- package/dist/drizzle/meta/0008_snapshot.json +0 -5774
- package/dist/drizzle/meta/0009_snapshot.json +0 -6262
- package/dist/drizzle/meta/0010_snapshot.json +0 -6286
- package/dist/drizzle/meta/0011_snapshot.json +0 -6337
- package/dist/drizzle/meta/0012_snapshot.json +0 -6458
- package/dist/drizzle/meta/0013_snapshot.json +0 -6465
- package/dist/drizzle/meta/0014_snapshot.json +0 -6503
- package/dist/drizzle/meta/0015_snapshot.json +0 -6596
- package/dist/drizzle/meta/0016_snapshot.json +0 -6611
- package/dist/drizzle/meta/0017_snapshot.json +0 -6785
- package/dist/drizzle/meta/0018_snapshot.json +0 -6804
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as h,j as i}from"./index-
|
|
1
|
+
import{r as h,j as i}from"./index-EsrkGBcv.js";import{C as ne}from"./chevron-down-l1mrh5S9.js";import{S as oe}from"./search-DT42oyRW.js";const se=new Set(["hud","tail","terminal","services","pair","osn-auth","notification","code","file"]);function L(e){const t=e?.trim();return t||void 0}function q(e){if(!e)return;const t=Number.parseInt(e,10);return Number.isSafeInteger(t)&&t>0?t:void 0}function ce(e){return e.split("/").filter(t=>t.length>0).map(encodeURIComponent).join("/")}function R(e){return e.map(t=>{try{return decodeURIComponent(t)}catch{return t}}).join("/")}function ie(e){const t=q(e.get("line")),n=q(e.get("endLine")),r=t&&n&&n>=t?n:void 0;return{...L(e.get("wt"))?{wt:L(e.get("wt"))}:{},...t?{line:t}:{},...r?{endLine:r}:{}}}function G(e){const t=e.trim();if(!t)return null;if(t.startsWith("/")||t.startsWith("~/")){const u=t.replace(/^~/,""),d=t.startsWith("~")?t:u;return{root:d,file:d}}if(!/^scout:/i.test(t))return null;let n;try{n=new URL(t)}catch{return null}if(n.protocol.toLowerCase()!=="scout:")return null;const r=(n.hostname||n.host||"").toLowerCase(),c=n.pathname.split("/").filter(u=>u.length>0),s=ie(n.searchParams);if(!r||r==="file"){const u=c;if(u.length===0)return null;const d=`/${R(u)}`,m=L(n.searchParams.get("root")),j=L(n.searchParams.get("file"));return{root:m??d,file:j??d,...s}}if(r==="code"){if(c.length===0){const m=L(n.searchParams.get("root")),j=L(n.searchParams.get("file")),b=L(n.searchParams.get("project")),y=L(n.searchParams.get("path"));return!m&&!j&&!b?{...s}:{...m?{root:m}:{},...j?{file:j}:{},...b?{project:b}:{},...y?{path:y}:{},...s}}const u=R([c[0]]),d=c.length>1?R(c.slice(1)):void 0;return{project:u,...d?{path:d}:{},...s}}if(se.has(r))return null;const a=decodeURIComponent(r),l=c.length>0?R(c):void 0;return{project:a,...l?{path:l}:{},...s}}function ae(e){const t=new URLSearchParams;e.wt&&t.set("wt",e.wt),e.line&&e.line>0&&t.set("line",String(e.line)),e.line&&e.endLine&&e.endLine>=e.line&&t.set("endLine",String(e.endLine));const n=t.toString(),r=n?`?${n}`:"";if(e.project)return`scout://${e.path?`${encodeURIComponent(e.project)}/${ce(e.path)}`:encodeURIComponent(e.project)}${r}`;const c=e.file??e.root;return c?`scout://${c.startsWith("/")?c:`/${c}`}${r}`:`scout://code${r}`}function le(e,t){const n=e.trim();if(!n)return null;let r=null;for(const c of t)(n===c||n.startsWith(`${c}/`))&&(!r||c.length>r.length)&&(r=c);return r?{root:r,file:n===r?null:n}:null}function ue(e){const t=e.trim();return t?!!(t.startsWith("/")||t.startsWith("~/")||/^scout:/i.test(t)):!1}function B(e){return e.toLowerCase().replace(/[^a-z0-9]+/gu,"-").replace(/^-+|-+$/gu,"")}function de(e){const t=e.lastIndexOf("/");return t>=0?e.slice(t+1):e}function fe(e){return e.branch.detached?"detached":e.branch.name??"no branch"}function pe(e){return e.status.clean?"":`${e.status.changedFiles} changed`}function he(e){const t=[];for(const n of e)for(const[r,c]of n.worktrees.entries())t.push({root:c.path,projectId:n.id,projectName:n.name,projectSlug:B(n.name)||B(de(n.name)),worktreeName:c.name,branchLabel:fe(c),dirtyLabel:pe(c),isPrimary:r===0,changedFiles:c.status.changedFiles});return t}function v(e){return e.toLocaleLowerCase().replace(/[\s/_-]+/g," ").trim()}function me(e,t,n=0){const r=v(t);if(!r)return n;const c=r.split(" ").filter(Boolean),s=v(e.projectName),a=v(e.root),l=v(e.branchLabel),u=v(e.worktreeName),d=`${s} ${a} ${l} ${u} ${e.projectSlug}`;if(!c.every(j=>d.includes(j)))return-1;let m=n/100;return s===r||e.projectSlug===r.replace(/\s+/g,"-")?m+=120:s.startsWith(r)||e.projectSlug.startsWith(r.replace(/\s+/g,"-"))?m+=80:s.includes(r)&&(m+=48),(l.startsWith(r)||l.includes(r))&&(m+=34),u.includes(r)&&(m+=24),a.includes(r)&&(m+=20),m+=c.reduce((j,b)=>j+(s.startsWith(b)?12:0),0),m}function ge(e,t,n,r=12){const c=new Map(n.map((a,l)=>[a,n.length-l])),s=e.map(a=>({option:a,score:me(a,t,c.get(a.root)??0)})).filter(a=>a.score>=0);return t.trim()?s.sort((a,l)=>l.score-a.score||a.option.projectName.localeCompare(l.option.projectName)):s.sort((a,l)=>{const u=c.get(a.option.root)??-1,d=c.get(l.option.root)??-1;return u!==d?d-u:a.option.projectName.localeCompare(l.option.projectName)||a.option.branchLabel.localeCompare(l.option.branchLabel)}),s.slice(0,r).map(a=>a.option)}function Y(e){return e.isPrimary?e.projectName:`${e.projectName} · ${e.branchLabel}`}function D(e){return e.dirtyLabel?`${e.branchLabel} · ${e.dirtyLabel}`:e.branchLabel}function O(e){const t=typeof window<"u"?window.__OPEN_SCOUT_HOME:void 0;if(t&&e.startsWith(`${t}/`))return`~/${e.slice(t.length+1)}`;if(e.startsWith("/Users/")){const n=e.slice(7),r=n.indexOf("/");if(r>0)return`~${n.slice(r)}`}if(e.startsWith("/home/")){const n=e.slice(6),r=n.indexOf("/");if(r>0)return`~${n.slice(r)}`}return e}const Q="openscout.code.tree:",_="openscout.code.lastRoot",V="openscout.code.recentRoots",je=8;function Ce(e){if(typeof window>"u")return null;try{const t=window.localStorage.getItem(Q+e);if(!t)return null;const n=JSON.parse(t);return!n||typeof n.entries!="object"||!Array.isArray(n.expanded)?null:n}catch{return null}}function Re(e,t){if(typeof window>"u")return;const n={};for(const r of[e,...t.expanded]){const c=t.entries.get(r);c&&(n[r]=c)}try{window.localStorage.setItem(Q+e,JSON.stringify({entries:n,expanded:[...t.expanded],selectedFile:t.selectedFile,savedAt:Date.now()}))}catch{}}function Oe(){if(typeof window>"u")return null;try{return window.localStorage.getItem(_)}catch{return null}}function M(){if(typeof window>"u")return[];try{const e=window.localStorage.getItem(V);if(!e){const n=window.localStorage.getItem(_);return n?[n]:[]}const t=JSON.parse(e);return Array.isArray(t)?t.filter(n=>typeof n=="string"&&n.length>0):[]}catch{return[]}}function Pe(e){if(!(typeof window>"u"))try{window.localStorage.setItem(_,e);const t=M().filter(r=>r!==e),n=[e,...t].slice(0,je);window.localStorage.setItem(V,JSON.stringify(n))}catch{}}const we=6,be=12;function k(e){return e.toLowerCase().replace(/[^a-z0-9]+/gu,"-").replace(/^-+|-+$/gu,"")}function W(e){const t=e.lastIndexOf("/");return t>=0?e.slice(t+1):e}function X(e,t,n){const r=G(e);if(!r)return null;if(r.root||r.file){const c=t.map(u=>u.root),s=xe(r.file??r.root,c),a=le(s,c);if(a)return{root:a.root,file:a.file,line:r.line,endLine:r.endLine};const l=W(s).includes(".");return{root:l?Le(s):s,file:l?s:null,line:r.line,endLine:r.endLine}}if(r.project){const c=ke(n,r.project,r.wt??null,t);if(!c)return null;const s=r.path?`${c.root}/${r.path}`:null;return{root:c.root,file:s,project:r.project,path:r.path,wt:r.wt,line:r.line,endLine:r.endLine}}return null}function xe(e,t){if(!e.startsWith("~/")&&e!=="~")return e;for(const n of t){const r=n.match(/^(\/Users\/[^/]+)/)??n.match(/^(\/home\/[^/]+)/);if(r)return`${r[1]}${e.slice(1)}`}return e}function Le(e){const t=e.lastIndexOf("/");return t>0?e.slice(0,t):e}function ke(e,t,n,r){if(e){const a=k(t),l=e.projects.find(u=>k(u.name)===a||k(W(u.root))===a);if(l)return{root:(n?l.worktrees.find(d=>d.name===n||d.branch.name===n||k(d.name)===k(n)):l.worktrees[0])?.path??l.root}}const c=k(t),s=r.find(a=>a.projectSlug===c);return s?{root:s.root}:null}function ye(e){if(e.project)return ae({project:e.project,path:e.path,wt:e.wt,line:e.line,endLine:e.endLine});const t=e.file??e.root;return t?O(t):"Deep link"}function Ne({snapshot:e,root:t,onSelect:n}){const[r,c]=h.useState(!1),[s,a]=h.useState(""),[l,u]=h.useState(0),[d,m]=h.useState(()=>M()),j=h.useRef(null),b=h.useRef(null),y=h.useRef(null),N=h.useId().replaceAll(":",""),P=`code-project-results-${N}`,x=h.useMemo(()=>he(e?.projects??[]),[e]),I=h.useMemo(()=>{const o=new Map;for(const f of x)o.set(f.root,f);return o},[x]),C=t?I.get(t)??null:null;h.useEffect(()=>{m(M())},[t,r]);const U=h.useMemo(()=>{const o=[];for(const f of d){const $=I.get(f);if($&&o.push($),o.length>=we)break}return o},[d,I]),w=ue(s),A=w?G(s):null,p=w?X(s,x,e):null,g=h.useMemo(()=>w?[]:ge(x,s,d,be),[x,s,d,w]),Z=(p?1:0)+g.length,S=h.useMemo(()=>{if(!s.trim()||w)return"";const o=g.find(f=>f.projectName.toLocaleLowerCase().startsWith(s.toLocaleLowerCase()));return o&&o.projectName.length>s.length?o.projectName:""},[s,g,w]);h.useEffect(()=>u(0),[s,r]),h.useEffect(()=>{if(!r)return;const o=window.setTimeout(()=>b.current?.focus(),20);return()=>window.clearTimeout(o)},[r]),h.useEffect(()=>{if(!r)return;function o(f){j.current?.contains(f.target)||(c(!1),a(""))}return document.addEventListener("pointerdown",o),()=>document.removeEventListener("pointerdown",o)},[r]);const E=()=>{a(""),c(!1),window.setTimeout(()=>y.current?.focus(),0)},T=o=>{n({root:o}),E()},F=()=>{p&&(n(p),E())},ee=o=>{if(o.key==="ArrowDown")o.preventDefault(),u(f=>Math.min(f+1,Math.max(Z-1,0)));else if(o.key==="ArrowUp")o.preventDefault(),u(f=>Math.max(f-1,0));else if(o.key==="Enter"){if(o.preventDefault(),p&&(l===0||g.length===0)){F();return}const f=p?l-1:l;g[f]&&T(g[f].root)}else o.key==="ArrowRight"&&S&&o.currentTarget.selectionStart===s.length?(o.preventDefault(),a(S)):o.key==="Escape"&&(o.preventDefault(),E())},te=C?Y(C):t?O(t):"Pick a project…",z=C?D(C):null,H=!!p&&l===0,re=p&&l===0?`${N}-deeplink`:g[p?l-1:l]?`${N}-opt-${g[p?l-1:l].root}`:void 0;return i.jsxs("div",{className:"s-code-picker",ref:j,children:[i.jsxs("button",{ref:y,type:"button",className:"s-code-pickerTrigger","aria-haspopup":"listbox","aria-expanded":r,"aria-controls":r?P:void 0,"aria-label":"Project or worktree",onClick:()=>c(o=>!o),children:[i.jsx("span",{className:"s-code-pickerTriggerName",children:te}),z?i.jsx("span",{className:"s-code-pickerTriggerDetail",children:z}):null,i.jsx(ne,{size:13,"aria-hidden":!0,className:"s-code-pickerChevron","data-open":r||void 0})]}),r?i.jsxs("div",{className:"s-code-pickerPanel",role:"dialog","aria-label":"Choose a project",children:[U.length>0&&!w?i.jsx("div",{className:"s-code-pickerRecents","aria-label":"Recent projects",children:U.map(o=>i.jsx("button",{type:"button",className:"s-code-pickerChip","data-active":o.root===t||void 0,title:`${o.projectName} · ${D(o)}
|
|
2
2
|
${o.root}`,onClick:()=>T(o.root),children:Y(o)},o.root))}):null,i.jsxs("div",{className:"s-code-pickerSearch",children:[i.jsx(oe,{size:13,"aria-hidden":!0,className:"s-code-pickerSearchIcon"}),i.jsxs("div",{className:"s-code-pickerInputStack",children:[S?i.jsxs("div",{className:"s-code-pickerGhost","aria-hidden":!0,children:[i.jsx("span",{children:s}),S.slice(s.length)]}):null,i.jsx("input",{ref:b,className:"s-code-pickerInput",type:"search",role:"combobox",value:s,onChange:o=>a(o.currentTarget.value),onKeyDown:ee,placeholder:"Project, scout:// path, or branch…","aria-label":"Find a project","aria-autocomplete":"both","aria-expanded":"true","aria-controls":P,"aria-activedescendant":re,autoComplete:"off",spellCheck:!1})]}),S?i.jsx("kbd",{className:"s-code-pickerHint",children:"→"}):null]}),i.jsxs("div",{className:"s-code-pickerHeading",children:[i.jsx("span",{children:w?p?"Deep link":"Unrecognized link":s.trim()?g.length?"Matches":"No matches":"All projects"}),i.jsx("span",{children:w?p?"open with ↵":"no match":s.trim()?`${g.length} shown`:x.length?`${Math.min(g.length,x.length)} of ${x.length}`:e?"No repos yet":"Loading…"})]}),i.jsxs("div",{id:P,className:"s-code-pickerResults",role:"listbox","aria-label":"Projects",children:[p?i.jsxs("button",{id:`${N}-deeplink`,type:"button",role:"option","aria-selected":H,tabIndex:-1,className:"s-code-pickerOption s-code-pickerOption--deep","data-active":H||void 0,onMouseEnter:()=>u(0),onClick:F,children:[i.jsx("span",{className:"s-code-pickerOptionMain",children:i.jsx("strong",{children:"Open deep link"})}),i.jsx("span",{className:"s-code-pickerOptionPath",title:s.trim(),children:A?ye(A):s.trim()}),i.jsxs("span",{className:"s-code-pickerOptionMeta",children:[O(p.root),p.file?` · ${W(p.file)}`:""]})]}):null,g.map((o,f)=>{const $=p?f+1:f,J=$===l,K=o.root===t;return i.jsxs("button",{id:`${N}-opt-${o.root}`,type:"button",role:"option","aria-selected":J,"aria-current":K||void 0,tabIndex:-1,className:"s-code-pickerOption","data-active":J||void 0,"data-selected":K||void 0,onMouseEnter:()=>u($),onClick:()=>T(o.root),children:[i.jsxs("span",{className:"s-code-pickerOptionMain",children:[i.jsx("strong",{children:o.projectName}),o.isPrimary?null:i.jsx("span",{className:"s-code-pickerWorktree",children:"worktree"})]}),i.jsx("span",{className:"s-code-pickerOptionPath",title:o.root,children:O(o.root)}),i.jsx("span",{className:"s-code-pickerOptionMeta",children:D(o)})]},o.root)})]}),g.length===0&&s.trim()&&!p?i.jsx("div",{className:"s-code-pickerEmpty",role:"status",children:w?"Could not resolve that scout:// link. Try a project slug or absolute path.":`No project matches “${s}”. Try a folder name, branch, path, or scout:// link.`}):null,i.jsxs("div",{className:"s-code-pickerGuide",children:[i.jsxs("span",{children:[i.jsx("kbd",{children:"↑"}),i.jsx("kbd",{children:"↓"})," move"]}),i.jsxs("span",{children:[i.jsx("kbd",{children:"↵"})," open"]}),i.jsxs("span",{children:[i.jsx("kbd",{children:"esc"})," close"]})]})]}):null]})}const Ie=Object.freeze(Object.defineProperty({__proto__:null,CodeProjectPicker:Ne,resolvePickerDeepLink:X},Symbol.toStringTag,{value:"Module"}));export{Ne as C,Ce as a,Pe as b,Ie as c,ae as f,Oe as r,O as s,Re as w};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s,j as r}from"./index-C8uS5szO.js";import{a as V}from"./api-CaROe5_H.js";import{c as je}from"./clipboard-e3fSpeo7.js";import{f as ze}from"./scoutbot-Bk3nyrkj.js";import{g as Ae,f as Ce}from"./api-B9_IqFKY.js";import{d as Ke}from"./types-B0PlfpKc.js";import{u as Oe}from"./useEmbedHeadline-BL8wQawZ.js";import{r as He,C as qe}from"./CodeDiffPane-DB6-mqtX.js";import{r as Ge,a as Ve,w as Xe,b as Je,f as xe,C as Qe,s as Ye}from"./CodeProjectPicker-B_LNLpIK.js";import{ShikiPane as Ze}from"./ShikiPane-BudrOxNK.js";/* empty css */import{A as et}from"./arrow-left-PuKdO3NM.js";import{C as tt}from"./chevron-right-C7UGFpkl.js";import{C as nt}from"./check-B8dMv3Is.js";import{C as st}from"./copy-D9WUpQRf.js";import"./cache-DEy9E34b.js";import"./usePierreRuntime-DJkRHMoe.js";import"./chunk-HRAB3GC3-C5X-kFhb.js";/* empty css */import"./chevron-down-B5eMsn5c.js";import"./createLucideIcon-DkjnzvcJ.js";import"./search-C4VlW_0l.js";const rt=new Set(["node_modules",".git","dist",".next",".build","DerivedData","__pycache__",".venv","target"]);function we(i){const l=i.lastIndexOf("/");return l>0?i.slice(0,l):"/"}function ce(i){const l=i.lastIndexOf("/");return l>=0?i.slice(l+1):i}function X(i){return i<1024?`${i} B`:i<1024*1024?`${(i/1024).toFixed(1)} KB`:`${(i/(1024*1024)).toFixed(1)} MB`}function S(i){return i.toLowerCase().replace(/[^a-z0-9]+/gu,"-").replace(/^-+|-+$/gu,"")}function it(i,l,k){const g=S(l),f=i.projects.find(u=>S(u.name)===g||S(ce(u.root))===g);if(!f)return null;const x=k?f.worktrees.find(u=>u.name===k||u.branch.name===k||S(u.name)===S(k)):f.worktrees[0];return{projectName:f.name,root:x?.path??f.root}}function ye(i,l){if(!l.startsWith(`${i}/`))return[];const k=l.slice(i.length+1).split("/"),g=[];let f=i;for(const x of k.slice(0,-1))f=`${f}/${x}`,g.push(f);return g}function ot(i){switch(i){case"untracked":return"U";case"conflicted":return"C";case"staged":return"S";case"unstaged":return"M";case"staged+unstaged":return"SM";default:return i.charAt(0).toUpperCase()}}function be(i,l,k,g,f){const x=k.get(i);if(!x){f.push({path:`${i}#loading`,name:"Loading…",kind:"file",depth:l,loading:!0});return}for(const u of x)u.kind==="directory"&&rt.has(u.name)||(f.push({path:u.path,name:u.name,kind:u.kind,depth:l}),u.kind==="directory"&&g.has(u.path)&&be(u.path,l+1,k,g,f))}function Et({route:i,navigate:l,root:k,file:g,project:f,path:x,wt:u,line:Le,endLine:Ne,returnConversationId:Re,embedded:I=!1}){Oe("Code",I);const B=k??i?.root??null,P=g??i?.file??null,p=f??i?.project??null,b=x??i?.path??null,U=u??i?.wt??null,j=Le??i?.line,w=Ne??i?.endLine,C=Re??i?.returnConversationId??null,[h,le]=s.useState(()=>Ae()),[o,J]=s.useState(()=>B??(p?null:Ge())),[y,Q]=s.useState(()=>new Map),[L,W]=s.useState(()=>new Set),[de,ue]=s.useState(null),[a,_]=s.useState(P),[c,z]=s.useState(null),[Ee,Y]=s.useState(!1),[fe,A]=s.useState(null),[pe,Z]=s.useState("idle"),[M,ee]=s.useState("source"),[m,te]=s.useState(()=>j&&j>0?{line:j,...w&&w>=j?{endLine:w}:{}}:null),[N,K]=s.useState(()=>p?{phase:"resolving"}:{phase:"idle"}),ne=p?`${p}\0${b??""}\0${U??""}`:null,R=s.useRef(null),se=s.useRef(null),T=s.useRef(ne);T.current!==ne&&(T.current=ne,R.current=null,se.current=null),s.useEffect(()=>{te(j&&j>0?{line:j,...w&&w>=j?{endLine:w}:{}}:null)},[w,j]),s.useEffect(()=>{if(h)return;let e=!1;return Ce("quick",!1,2e4).then(t=>{e||le(t)}).catch(()=>{}),()=>{e=!0}},[h]);const E=s.useCallback(async e=>{try{const t=await V(`/api/file/preview?path=${encodeURIComponent(e)}`);if(t.kind!=="directory")return;const n=t.entries.map(d=>({name:d.name,path:d.path,kind:d.kind}));Q(d=>new Map(d).set(e,n))}catch(t){ue(t instanceof Error?t.message:String(t))}},[]),$=s.useCallback((e,t)=>{if(!t)return;const n=ye(e,t);if(n.length!==0){W(d=>new Set([...d,...n]));for(const d of n)E(d)}},[E]);s.useEffect(()=>{if(!p)return;const e=`${p}\0${b??""}\0${U??""}`;if(R.current===e)return;const t=n=>{R.current=e;const d=b?`${n}/${b}`:null;K({phase:"idle"}),J(n),_(d),$(n,d)};if(h){const n=it(h,p,U);if(n){t(n.root);return}}se.current!==e&&(K({phase:"resolving"}),V(`/api/code/resolve-project?slug=${encodeURIComponent(p)}`).then(n=>{R.current===e||T.current!==e||t(n.root)}).catch(n=>{if(R.current===e||T.current!==e)return;se.current=e;const d=n instanceof Error?n.message:String(n);K({phase:"failed",message:d.includes(p)?d:`Can't resolve project "${p}": ${d}`})}))},[p,b,U,h,$]),s.useEffect(()=>{if(o||p||!h)return;const e=h.projects[0];e&&J(e.worktrees[0]?.path??e.root)},[o,p,h]);const he=s.useRef(a);he.current=a,s.useEffect(()=>{if(!o)return;ue(null);const e=Ve(o),t=he.current,n=t?ye(o,t):[];e?(Q(new Map(Object.entries(e.entries))),W(new Set([...e.expanded,...n])),!t&&e.selectedFile&&_(e.selectedFile)):(Q(new Map),W(new Set(n)));const d=new Set([o,...e?.expanded??[],...n]);for(const ae of d)E(ae);Ce("quick",!1,2e4).then(le).catch(()=>{})},[o,E]),s.useEffect(()=>{!o||y.size===0||(Xe(o,{entries:y,expanded:L,selectedFile:a}),Je(o))},[o,y,L,a]),s.useEffect(()=>{!B||!P||$(B,P)},[B,P,$]);const re=s.useRef(new Map),ie=s.useRef(new Set),$e=3e4,O=s.useCallback(e=>{const t=re.current.get(e);return t?Date.now()-t.at>$e?(re.current.delete(e),null):t.preview:null},[]),H=s.useCallback((e,t)=>{const n=re.current;if(n.set(e,{at:Date.now(),preview:t}),n.size>80){const d=n.keys().next().value;d&&n.delete(d)}},[]),Fe=s.useCallback(e=>{O(e)||ie.current.has(e)||(ie.current.add(e),V(`/api/file/preview?path=${encodeURIComponent(e)}`).then(t=>H(e,t)).catch(()=>{}).finally(()=>ie.current.delete(e)))},[O,H]);s.useEffect(()=>{if(Z("idle"),!a){z(null),A(null);return}const e=O(a);if(e){z(e.kind==="file"?e:null),A(null),Y(!1);return}let t=!1;return Y(!0),A(null),V(`/api/file/preview?path=${encodeURIComponent(a)}`).then(n=>{t||(H(a,n),z(n.kind==="file"?n:null))}).catch(n=>{t||(z(null),A(n instanceof Error?n.message:String(n)))}).finally(()=>{t||Y(!1)}),()=>{t=!0}},[a,O,H]);const Me=s.useMemo(()=>{if(!o)return[];const e=[];return be(o,0,y,L,e),e},[o,y,L]),me=s.useCallback((e,t)=>{const n=C?{returnConversationId:C}:{};if(h){for(const d of h.projects)for(const[ae,ge]of d.worktrees.entries())if(ge.path===e){const ve=t&&t.startsWith(`${e}/`)?t.slice(e.length+1):void 0;return{view:"code",project:S(d.name),...ve?{path:ve}:{},...ae>0?{wt:ge.name}:{},...n}}}return{view:"code",root:e,...t?{file:t}:{},...n}},[C,h]),oe=s.useCallback(()=>{if(!C)return;const e={view:"conversation",conversationId:C};ze({type:"navigate",route:e})||l?.(e)},[l,C]);s.useEffect(()=>{if(!C)return;const e=t=>{if(!t.defaultPrevented&&!(!t.metaKey||t.key!=="[")){if(t.target instanceof HTMLElement){const n=t.target.tagName;if(n==="INPUT"||n==="TEXTAREA"||t.target.isContentEditable)return}t.preventDefault(),oe()}};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[C,oe]);const q=s.useCallback((e,t)=>{I||!l||l(me(e,t))},[I,l,me]),Te=s.useCallback(e=>{W(t=>{const n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}),y.has(e)||E(e)},[y,E]),De=s.useCallback(e=>{te(null),_(e),o&&q(o,e)},[o,q]),v=s.useMemo(()=>{if(!h||!o)return null;for(const e of h.projects)for(const t of e.worktrees)if(t.path===o)return{project:e,worktree:t};return null},[h,o]),F=s.useMemo(()=>{const e=new Map;if(!o||!v)return e;for(const t of v.worktree.status.files)e.set(`${o}/${t.path}`,t.status);return e},[o,v]),Ie=s.useMemo(()=>{const e=new Set;if(!o)return e;for(const t of F.keys()){let n=we(t);for(;n.startsWith(o)&&(e.add(n),n!==o);)n=we(n)}return e},[o,F]),G=!!(o&&a&&He(o,a));s.useEffect(()=>{G||ee("source")},[G]);const Be=a&&o&&a.startsWith(`${o}/`)?a.slice(o.length+1):c?.kind==="file"?c.title:a?ce(a):null,Pe=s.useCallback(async()=>{if(!c||c.kind!=="file"||!c.previewable)return;await je(c.content)&&(Z("copied"),window.setTimeout(()=>Z("idle"),1500))},[c]),[Ue,ke]=s.useState("idle"),D=s.useMemo(()=>{if(!o)return null;if(v){const e=a&&a.startsWith(`${o}/`)?a.slice(o.length+1):void 0,t=v.project.worktrees[0]?.path;return xe({project:S(v.project.name),...e?{path:e}:{},...t&&t!==o?{wt:v.worktree.name}:{},...m?.line?{line:m.line}:{},...m?.endLine?{endLine:m.endLine}:{}})}return xe({...a?{file:a}:{root:o},...m?.line?{line:m.line}:{},...m?.endLine?{endLine:m.endLine}:{}})},[o,a,v,m]),We=s.useCallback(async()=>{if(!D)return;await je(D)&&(ke("copied"),window.setTimeout(()=>ke("idle"),1500))},[D]),_e=s.useCallback(e=>{R.current=T.current,K({phase:"idle"}),te(e.line&&e.line>0?{line:e.line,...e.endLine&&e.endLine>=e.line?{endLine:e.endLine}:{}}:null),_(e.file??null),J(e.root),e.file&&$(e.root,e.file),q(e.root,e.file??null)},[$,q]);return r.jsxs("div",{className:"s-code-screen","data-embedded":I||void 0,children:[r.jsxs("div",{className:"s-code-head",children:[C?r.jsxs("button",{type:"button",className:"s-code-returnThread",onClick:oe,title:"Back to thread (⌘[)",children:[r.jsx(et,{size:13,strokeWidth:1.9,"aria-hidden":!0}),r.jsx("span",{children:"Back to thread"})]}):null,r.jsx(Qe,{snapshot:h,root:o,onSelect:_e}),v?.worktree.diff.branchShortstat?r.jsx("span",{className:"s-code-headStat",children:v.worktree.diff.branchShortstat}):null,o?r.jsx("span",{className:"s-code-headPath",title:o,children:Ye(o)}):null,D?r.jsx("button",{type:"button",className:"s-code-copyLink",title:D,onClick:()=>{We()},children:Ue==="copied"?"Copied scout://":"Copy scout://"}):null]}),r.jsxs("div",{className:"s-code-body",children:[r.jsx("div",{className:"s-code-tree",role:"tree","aria-label":"Files",children:de?r.jsx("div",{className:"s-code-treeNote",children:de}):o?Me.map(e=>e.loading?r.jsx("div",{className:"s-code-node s-code-node--loading",style:{paddingLeft:10+e.depth*14},children:e.name},e.path):r.jsxs("button",{type:"button",role:"treeitem",className:"s-code-node","data-selected":e.path===a||void 0,"data-diff":e.kind==="file"?F.get(e.path):void 0,"aria-expanded":e.kind==="directory"?L.has(e.path):void 0,style:{paddingLeft:10+e.depth*14},onClick:()=>e.kind==="directory"?Te(e.path):De(e.path),onMouseEnter:e.kind==="file"?()=>Fe(e.path):void 0,children:[e.kind==="directory"?r.jsx(tt,{size:11,strokeWidth:2,className:"s-code-nodeChevron","data-open":L.has(e.path)||void 0,"aria-hidden":!0}):r.jsx("span",{className:"s-code-nodeSpacer","aria-hidden":!0}),r.jsx("span",{className:"s-code-nodeName",children:e.name}),e.kind==="file"&&F.has(e.path)?r.jsx("span",{className:"s-code-nodeBadge","data-diff":F.get(e.path),children:ot(F.get(e.path)??"")}):null,e.kind==="directory"&&Ie.has(e.path)?r.jsx("span",{className:"s-code-nodeDot","aria-label":"Contains changes"}):null]},e.path)):N.phase==="resolving"?r.jsxs("div",{className:"s-code-treeNote",children:["Resolving “",p,"”…"]}):N.phase==="failed"?r.jsx("div",{className:"s-code-treeNote",children:N.message}):r.jsx("div",{className:"s-code-treeNote",children:"No repo selected."})}),r.jsxs("div",{className:"s-code-main",children:[a?r.jsxs("div",{className:"s-code-fileHead",children:[r.jsx("span",{className:"s-code-filePath",children:Be}),G?r.jsxs("div",{className:"s-code-fileMode",role:"tablist","aria-label":"File view",children:[r.jsx("button",{type:"button",role:"tab","aria-selected":M==="source","data-selected":M==="source"||void 0,onClick:()=>ee("source"),children:"Source"}),r.jsx("button",{type:"button",role:"tab","aria-selected":M==="changes","data-selected":M==="changes"||void 0,onClick:()=>ee("changes"),children:"Changes"})]}):null,c?.kind==="file"?r.jsxs("span",{className:"s-code-fileMeta",children:[X(c.sizeBytes),c.previewable&&c.truncated?" · truncated":"",m?` · L${m.line}${m.endLine?`–${m.endLine}`:""}`:""]}):null,c?.kind==="file"&&c.previewable?r.jsxs(r.Fragment,{children:[r.jsxs("button",{type:"button",className:"s-code-fileAction",onClick:()=>{Pe()},title:"Copy file contents",children:[pe==="copied"?r.jsx(nt,{size:12,"aria-hidden":!0}):r.jsx(st,{size:12,"aria-hidden":!0}),pe==="copied"?"Copied":"Copy"]}),r.jsx("a",{className:"s-code-fileAction",href:c.rawUrl,target:"_blank",rel:"noreferrer",children:"Raw"})]}):null]}):null,M==="changes"&&G&&o&&a?r.jsx(qe,{root:o,file:a},`${o}\0${a}`):Ee?r.jsxs("div",{className:"s-code-empty",children:["Loading ",a?ce(a):"file","…"]}):fe?r.jsx("div",{className:"s-code-empty",children:fe}):c&&c.kind==="file"&&c.previewable?r.jsxs(r.Fragment,{children:[c.truncated?r.jsxs("div",{className:"s-code-fileNote",children:["Showing the first ",X(256*1024)," of ",X(c.sizeBytes)," ·"," ",r.jsx("a",{href:c.rawUrl,target:"_blank",rel:"noreferrer",children:"open raw"})]}):null,r.jsx(Ze,{code:c.content,path:c.path,focusLine:m?.line,endLine:m?.endLine})]}):c&&c.kind==="file"?r.jsxs("div",{className:"s-code-empty",children:[c.previewReason," · ",X(c.sizeBytes)," ·"," ",r.jsx("a",{href:c.rawUrl,target:"_blank",rel:"noreferrer",children:"open raw"})]}):N.phase==="resolving"?r.jsxs("div",{className:"s-code-empty",children:["Opening ",b??`“${p}”`,"…"]}):N.phase==="failed"?r.jsx("div",{className:"s-code-empty",children:N.message}):r.jsx("div",{className:"s-code-empty",children:"Pick a file to read."})]})]})]})}const $t=Ke({id:"code",label:"Code Browser",route:{view:"code"},webPath:"/code",screen:"CodeContent",embed:{path:"/embed/code",profile:"macos.code",rootClassName:"s-code-embed",chrome:{showSecondaryNav:!1,showPageStatusBar:!1},hosts:{macos:!0},resolveEmbedProps:i=>({root:i.get("root")?.trim()||void 0,file:i.get("file")?.trim()||void 0,project:i.get("project")?.trim()||void 0,path:i.get("path")?.trim()||void 0,wt:i.get("wt")?.trim()||void 0,line:Se(i.get("line")),endLine:Se(i.get("endLine")),returnConversationId:i.get("fromConversation")?.trim()||void 0})}});function Se(i){if(!i)return;const l=Number.parseInt(i,10);return Number.isSafeInteger(l)&&l>0?l:void 0}export{Et as CodeContent,$t as scoutSurface};
|
|
1
|
+
import{r as s,j as r}from"./index-EsrkGBcv.js";import{a as V}from"./api-DSqpVKC7.js";import{c as je}from"./clipboard-e3fSpeo7.js";import{f as ze}from"./scoutbot-Bk3nyrkj.js";import{g as Ae,f as Ce}from"./api-BQYTwoz6.js";import{d as Ke}from"./types-B0PlfpKc.js";import{u as Oe}from"./useEmbedHeadline-D6pJRxUg.js";import{r as He,C as qe}from"./CodeDiffPane-DuQRwpgK.js";import{r as Ge,a as Ve,w as Xe,b as Je,f as xe,C as Qe,s as Ye}from"./CodeProjectPicker-ZQ6gSBpg.js";import{ShikiPane as Ze}from"./ShikiPane-CRtTYkMj.js";/* empty css */import{A as et}from"./arrow-left-MVUKauwQ.js";import{C as tt}from"./chevron-right-DrfqcerI.js";import{C as nt}from"./check-lrJ3a73a.js";import{C as st}from"./copy-xKeM5ZtU.js";import"./cache-DGBo3vIf.js";import"./usePierreRuntime-BAQdiN0L.js";import"./chunk-HRAB3GC3-DbVLgbWX.js";/* empty css */import"./chevron-down-l1mrh5S9.js";import"./createLucideIcon-zZ8Hx7er.js";import"./search-DT42oyRW.js";const rt=new Set(["node_modules",".git","dist",".next",".build","DerivedData","__pycache__",".venv","target"]);function we(i){const l=i.lastIndexOf("/");return l>0?i.slice(0,l):"/"}function ce(i){const l=i.lastIndexOf("/");return l>=0?i.slice(l+1):i}function X(i){return i<1024?`${i} B`:i<1024*1024?`${(i/1024).toFixed(1)} KB`:`${(i/(1024*1024)).toFixed(1)} MB`}function S(i){return i.toLowerCase().replace(/[^a-z0-9]+/gu,"-").replace(/^-+|-+$/gu,"")}function it(i,l,k){const g=S(l),f=i.projects.find(u=>S(u.name)===g||S(ce(u.root))===g);if(!f)return null;const x=k?f.worktrees.find(u=>u.name===k||u.branch.name===k||S(u.name)===S(k)):f.worktrees[0];return{projectName:f.name,root:x?.path??f.root}}function ye(i,l){if(!l.startsWith(`${i}/`))return[];const k=l.slice(i.length+1).split("/"),g=[];let f=i;for(const x of k.slice(0,-1))f=`${f}/${x}`,g.push(f);return g}function ot(i){switch(i){case"untracked":return"U";case"conflicted":return"C";case"staged":return"S";case"unstaged":return"M";case"staged+unstaged":return"SM";default:return i.charAt(0).toUpperCase()}}function be(i,l,k,g,f){const x=k.get(i);if(!x){f.push({path:`${i}#loading`,name:"Loading…",kind:"file",depth:l,loading:!0});return}for(const u of x)u.kind==="directory"&&rt.has(u.name)||(f.push({path:u.path,name:u.name,kind:u.kind,depth:l}),u.kind==="directory"&&g.has(u.path)&&be(u.path,l+1,k,g,f))}function Et({route:i,navigate:l,root:k,file:g,project:f,path:x,wt:u,line:Le,endLine:Ne,returnConversationId:Re,embedded:I=!1}){Oe("Code",I);const B=k??i?.root??null,P=g??i?.file??null,p=f??i?.project??null,b=x??i?.path??null,U=u??i?.wt??null,j=Le??i?.line,w=Ne??i?.endLine,C=Re??i?.returnConversationId??null,[h,le]=s.useState(()=>Ae()),[o,J]=s.useState(()=>B??(p?null:Ge())),[y,Q]=s.useState(()=>new Map),[L,W]=s.useState(()=>new Set),[de,ue]=s.useState(null),[a,_]=s.useState(P),[c,z]=s.useState(null),[Ee,Y]=s.useState(!1),[fe,A]=s.useState(null),[pe,Z]=s.useState("idle"),[M,ee]=s.useState("source"),[m,te]=s.useState(()=>j&&j>0?{line:j,...w&&w>=j?{endLine:w}:{}}:null),[N,K]=s.useState(()=>p?{phase:"resolving"}:{phase:"idle"}),ne=p?`${p}\0${b??""}\0${U??""}`:null,R=s.useRef(null),se=s.useRef(null),T=s.useRef(ne);T.current!==ne&&(T.current=ne,R.current=null,se.current=null),s.useEffect(()=>{te(j&&j>0?{line:j,...w&&w>=j?{endLine:w}:{}}:null)},[w,j]),s.useEffect(()=>{if(h)return;let e=!1;return Ce("quick",!1,2e4).then(t=>{e||le(t)}).catch(()=>{}),()=>{e=!0}},[h]);const E=s.useCallback(async e=>{try{const t=await V(`/api/file/preview?path=${encodeURIComponent(e)}`);if(t.kind!=="directory")return;const n=t.entries.map(d=>({name:d.name,path:d.path,kind:d.kind}));Q(d=>new Map(d).set(e,n))}catch(t){ue(t instanceof Error?t.message:String(t))}},[]),$=s.useCallback((e,t)=>{if(!t)return;const n=ye(e,t);if(n.length!==0){W(d=>new Set([...d,...n]));for(const d of n)E(d)}},[E]);s.useEffect(()=>{if(!p)return;const e=`${p}\0${b??""}\0${U??""}`;if(R.current===e)return;const t=n=>{R.current=e;const d=b?`${n}/${b}`:null;K({phase:"idle"}),J(n),_(d),$(n,d)};if(h){const n=it(h,p,U);if(n){t(n.root);return}}se.current!==e&&(K({phase:"resolving"}),V(`/api/code/resolve-project?slug=${encodeURIComponent(p)}`).then(n=>{R.current===e||T.current!==e||t(n.root)}).catch(n=>{if(R.current===e||T.current!==e)return;se.current=e;const d=n instanceof Error?n.message:String(n);K({phase:"failed",message:d.includes(p)?d:`Can't resolve project "${p}": ${d}`})}))},[p,b,U,h,$]),s.useEffect(()=>{if(o||p||!h)return;const e=h.projects[0];e&&J(e.worktrees[0]?.path??e.root)},[o,p,h]);const he=s.useRef(a);he.current=a,s.useEffect(()=>{if(!o)return;ue(null);const e=Ve(o),t=he.current,n=t?ye(o,t):[];e?(Q(new Map(Object.entries(e.entries))),W(new Set([...e.expanded,...n])),!t&&e.selectedFile&&_(e.selectedFile)):(Q(new Map),W(new Set(n)));const d=new Set([o,...e?.expanded??[],...n]);for(const ae of d)E(ae);Ce("quick",!1,2e4).then(le).catch(()=>{})},[o,E]),s.useEffect(()=>{!o||y.size===0||(Xe(o,{entries:y,expanded:L,selectedFile:a}),Je(o))},[o,y,L,a]),s.useEffect(()=>{!B||!P||$(B,P)},[B,P,$]);const re=s.useRef(new Map),ie=s.useRef(new Set),$e=3e4,O=s.useCallback(e=>{const t=re.current.get(e);return t?Date.now()-t.at>$e?(re.current.delete(e),null):t.preview:null},[]),H=s.useCallback((e,t)=>{const n=re.current;if(n.set(e,{at:Date.now(),preview:t}),n.size>80){const d=n.keys().next().value;d&&n.delete(d)}},[]),Fe=s.useCallback(e=>{O(e)||ie.current.has(e)||(ie.current.add(e),V(`/api/file/preview?path=${encodeURIComponent(e)}`).then(t=>H(e,t)).catch(()=>{}).finally(()=>ie.current.delete(e)))},[O,H]);s.useEffect(()=>{if(Z("idle"),!a){z(null),A(null);return}const e=O(a);if(e){z(e.kind==="file"?e:null),A(null),Y(!1);return}let t=!1;return Y(!0),A(null),V(`/api/file/preview?path=${encodeURIComponent(a)}`).then(n=>{t||(H(a,n),z(n.kind==="file"?n:null))}).catch(n=>{t||(z(null),A(n instanceof Error?n.message:String(n)))}).finally(()=>{t||Y(!1)}),()=>{t=!0}},[a,O,H]);const Me=s.useMemo(()=>{if(!o)return[];const e=[];return be(o,0,y,L,e),e},[o,y,L]),me=s.useCallback((e,t)=>{const n=C?{returnConversationId:C}:{};if(h){for(const d of h.projects)for(const[ae,ge]of d.worktrees.entries())if(ge.path===e){const ve=t&&t.startsWith(`${e}/`)?t.slice(e.length+1):void 0;return{view:"code",project:S(d.name),...ve?{path:ve}:{},...ae>0?{wt:ge.name}:{},...n}}}return{view:"code",root:e,...t?{file:t}:{},...n}},[C,h]),oe=s.useCallback(()=>{if(!C)return;const e={view:"conversation",conversationId:C};ze({type:"navigate",route:e})||l?.(e)},[l,C]);s.useEffect(()=>{if(!C)return;const e=t=>{if(!t.defaultPrevented&&!(!t.metaKey||t.key!=="[")){if(t.target instanceof HTMLElement){const n=t.target.tagName;if(n==="INPUT"||n==="TEXTAREA"||t.target.isContentEditable)return}t.preventDefault(),oe()}};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[C,oe]);const q=s.useCallback((e,t)=>{I||!l||l(me(e,t))},[I,l,me]),Te=s.useCallback(e=>{W(t=>{const n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}),y.has(e)||E(e)},[y,E]),De=s.useCallback(e=>{te(null),_(e),o&&q(o,e)},[o,q]),v=s.useMemo(()=>{if(!h||!o)return null;for(const e of h.projects)for(const t of e.worktrees)if(t.path===o)return{project:e,worktree:t};return null},[h,o]),F=s.useMemo(()=>{const e=new Map;if(!o||!v)return e;for(const t of v.worktree.status.files)e.set(`${o}/${t.path}`,t.status);return e},[o,v]),Ie=s.useMemo(()=>{const e=new Set;if(!o)return e;for(const t of F.keys()){let n=we(t);for(;n.startsWith(o)&&(e.add(n),n!==o);)n=we(n)}return e},[o,F]),G=!!(o&&a&&He(o,a));s.useEffect(()=>{G||ee("source")},[G]);const Be=a&&o&&a.startsWith(`${o}/`)?a.slice(o.length+1):c?.kind==="file"?c.title:a?ce(a):null,Pe=s.useCallback(async()=>{if(!c||c.kind!=="file"||!c.previewable)return;await je(c.content)&&(Z("copied"),window.setTimeout(()=>Z("idle"),1500))},[c]),[Ue,ke]=s.useState("idle"),D=s.useMemo(()=>{if(!o)return null;if(v){const e=a&&a.startsWith(`${o}/`)?a.slice(o.length+1):void 0,t=v.project.worktrees[0]?.path;return xe({project:S(v.project.name),...e?{path:e}:{},...t&&t!==o?{wt:v.worktree.name}:{},...m?.line?{line:m.line}:{},...m?.endLine?{endLine:m.endLine}:{}})}return xe({...a?{file:a}:{root:o},...m?.line?{line:m.line}:{},...m?.endLine?{endLine:m.endLine}:{}})},[o,a,v,m]),We=s.useCallback(async()=>{if(!D)return;await je(D)&&(ke("copied"),window.setTimeout(()=>ke("idle"),1500))},[D]),_e=s.useCallback(e=>{R.current=T.current,K({phase:"idle"}),te(e.line&&e.line>0?{line:e.line,...e.endLine&&e.endLine>=e.line?{endLine:e.endLine}:{}}:null),_(e.file??null),J(e.root),e.file&&$(e.root,e.file),q(e.root,e.file??null)},[$,q]);return r.jsxs("div",{className:"s-code-screen","data-embedded":I||void 0,children:[r.jsxs("div",{className:"s-code-head",children:[C?r.jsxs("button",{type:"button",className:"s-code-returnThread",onClick:oe,title:"Back to thread (⌘[)",children:[r.jsx(et,{size:13,strokeWidth:1.9,"aria-hidden":!0}),r.jsx("span",{children:"Back to thread"})]}):null,r.jsx(Qe,{snapshot:h,root:o,onSelect:_e}),v?.worktree.diff.branchShortstat?r.jsx("span",{className:"s-code-headStat",children:v.worktree.diff.branchShortstat}):null,o?r.jsx("span",{className:"s-code-headPath",title:o,children:Ye(o)}):null,D?r.jsx("button",{type:"button",className:"s-code-copyLink",title:D,onClick:()=>{We()},children:Ue==="copied"?"Copied scout://":"Copy scout://"}):null]}),r.jsxs("div",{className:"s-code-body",children:[r.jsx("div",{className:"s-code-tree",role:"tree","aria-label":"Files",children:de?r.jsx("div",{className:"s-code-treeNote",children:de}):o?Me.map(e=>e.loading?r.jsx("div",{className:"s-code-node s-code-node--loading",style:{paddingLeft:10+e.depth*14},children:e.name},e.path):r.jsxs("button",{type:"button",role:"treeitem",className:"s-code-node","data-selected":e.path===a||void 0,"data-diff":e.kind==="file"?F.get(e.path):void 0,"aria-expanded":e.kind==="directory"?L.has(e.path):void 0,style:{paddingLeft:10+e.depth*14},onClick:()=>e.kind==="directory"?Te(e.path):De(e.path),onMouseEnter:e.kind==="file"?()=>Fe(e.path):void 0,children:[e.kind==="directory"?r.jsx(tt,{size:11,strokeWidth:2,className:"s-code-nodeChevron","data-open":L.has(e.path)||void 0,"aria-hidden":!0}):r.jsx("span",{className:"s-code-nodeSpacer","aria-hidden":!0}),r.jsx("span",{className:"s-code-nodeName",children:e.name}),e.kind==="file"&&F.has(e.path)?r.jsx("span",{className:"s-code-nodeBadge","data-diff":F.get(e.path),children:ot(F.get(e.path)??"")}):null,e.kind==="directory"&&Ie.has(e.path)?r.jsx("span",{className:"s-code-nodeDot","aria-label":"Contains changes"}):null]},e.path)):N.phase==="resolving"?r.jsxs("div",{className:"s-code-treeNote",children:["Resolving “",p,"”…"]}):N.phase==="failed"?r.jsx("div",{className:"s-code-treeNote",children:N.message}):r.jsx("div",{className:"s-code-treeNote",children:"No repo selected."})}),r.jsxs("div",{className:"s-code-main",children:[a?r.jsxs("div",{className:"s-code-fileHead",children:[r.jsx("span",{className:"s-code-filePath",children:Be}),G?r.jsxs("div",{className:"s-code-fileMode",role:"tablist","aria-label":"File view",children:[r.jsx("button",{type:"button",role:"tab","aria-selected":M==="source","data-selected":M==="source"||void 0,onClick:()=>ee("source"),children:"Source"}),r.jsx("button",{type:"button",role:"tab","aria-selected":M==="changes","data-selected":M==="changes"||void 0,onClick:()=>ee("changes"),children:"Changes"})]}):null,c?.kind==="file"?r.jsxs("span",{className:"s-code-fileMeta",children:[X(c.sizeBytes),c.previewable&&c.truncated?" · truncated":"",m?` · L${m.line}${m.endLine?`–${m.endLine}`:""}`:""]}):null,c?.kind==="file"&&c.previewable?r.jsxs(r.Fragment,{children:[r.jsxs("button",{type:"button",className:"s-code-fileAction",onClick:()=>{Pe()},title:"Copy file contents",children:[pe==="copied"?r.jsx(nt,{size:12,"aria-hidden":!0}):r.jsx(st,{size:12,"aria-hidden":!0}),pe==="copied"?"Copied":"Copy"]}),r.jsx("a",{className:"s-code-fileAction",href:c.rawUrl,target:"_blank",rel:"noreferrer",children:"Raw"})]}):null]}):null,M==="changes"&&G&&o&&a?r.jsx(qe,{root:o,file:a},`${o}\0${a}`):Ee?r.jsxs("div",{className:"s-code-empty",children:["Loading ",a?ce(a):"file","…"]}):fe?r.jsx("div",{className:"s-code-empty",children:fe}):c&&c.kind==="file"&&c.previewable?r.jsxs(r.Fragment,{children:[c.truncated?r.jsxs("div",{className:"s-code-fileNote",children:["Showing the first ",X(256*1024)," of ",X(c.sizeBytes)," ·"," ",r.jsx("a",{href:c.rawUrl,target:"_blank",rel:"noreferrer",children:"open raw"})]}):null,r.jsx(Ze,{code:c.content,path:c.path,focusLine:m?.line,endLine:m?.endLine})]}):c&&c.kind==="file"?r.jsxs("div",{className:"s-code-empty",children:[c.previewReason," · ",X(c.sizeBytes)," ·"," ",r.jsx("a",{href:c.rawUrl,target:"_blank",rel:"noreferrer",children:"open raw"})]}):N.phase==="resolving"?r.jsxs("div",{className:"s-code-empty",children:["Opening ",b??`“${p}”`,"…"]}):N.phase==="failed"?r.jsx("div",{className:"s-code-empty",children:N.message}):r.jsx("div",{className:"s-code-empty",children:"Pick a file to read."})]})]})]})}const $t=Ke({id:"code",label:"Code Browser",route:{view:"code"},webPath:"/code",screen:"CodeContent",embed:{path:"/embed/code",profile:"macos.code",rootClassName:"s-code-embed",chrome:{showSecondaryNav:!1,showPageStatusBar:!1},hosts:{macos:!0},resolveEmbedProps:i=>({root:i.get("root")?.trim()||void 0,file:i.get("file")?.trim()||void 0,project:i.get("project")?.trim()||void 0,path:i.get("path")?.trim()||void 0,wt:i.get("wt")?.trim()||void 0,line:Se(i.get("line")),endLine:Se(i.get("endLine")),returnConversationId:i.get("fromConversation")?.trim()||void 0})}});function Se(i){if(!i)return;const l=Number.parseInt(i,10);return Number.isSafeInteger(l)&&l>0?l:void 0}export{Et as CodeContent,$t as scoutSurface};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as I,j as a}from"./index-C8uS5szO.js";import{a as Z,h as _,d as q,p as J}from"./comms-gesture-_aGFo6g3.js";import{f as Q}from"./comms-deck-CBhsXnY-.js";const U={nodeW:178,nodeH:42,rowGap:9,laneGap:124,padX:26,padY:46,shelfRows:9,colGap:20};function ee(t,x,p=new Map){const w=new Map,r=new Map;let f=0;const g=new Map,i=n=>{w.has(n.id)||w.set(n.id,n)};for(const n of t){if(i(n.from),n.from.kind==="operator"){const v=g.get(n.from.id)??{own:0,agent:0};n.message.class==="agent"?v.agent+=n.count:v.own+=n.count,g.set(n.from.id,v)}if(n.kind==="channel"){f+=n.count;for(const v of n.audience)i(v);continue}for(const v of n.audience){if(i(v),v.id===n.from.id)continue;const M=`${n.from.id}->${v.id}`,$=r.get(M);$?$.count+=n.count:r.set(M,{from:n.from.id,to:v.id,count:n.count})}}const d=new Set([...g].filter(([,n])=>n.own===0&&n.agent>0).map(([n])=>n)),b=[...g].filter(([n])=>d.has(n)).reduce((n,[,v])=>n+v.agent,0),o=[...w.values()].map(n=>({id:n.id,short:n.short,kind:n.kind,model:p.get(n.id)?.model??null,harness:p.get(n.id)?.harness??null,disputed:d.has(n.id)})),m=Z(t,x).map(n=>({id:n.id,title:n.title,ms:n.ms,abandoned:n.abandoned,waiterId:n.waiter.id,workerId:n.worker.id}));return{actors:o,tasks:m,pairs:[...r.values()],broadcasts:f,misattributed:b}}function se(t,x,p,w){const r=new Set([w]),f=new Map,g=new Map;for(const i of x)(f.get(i.waiterId)??f.set(i.waiterId,[]).get(i.waiterId)).push(i.workerId),(g.get(i.workerId)??g.set(i.workerId,[]).get(i.workerId)).push(i.waiterId);for(const i of[f,g]){const d=[w];for(let b=0;b<d.length;b+=1)for(const o of i.get(d[b])??[])r.has(o)||(r.add(o),d.push(o))}return r.size<2?{actors:[...t],tasks:[...x],pairs:[...p],setAside:0}:{actors:t.filter(i=>r.has(i.id)),tasks:x.filter(i=>r.has(i.waiterId)&&r.has(i.workerId)),pairs:p.filter(i=>r.has(i.from)&&r.has(i.to)),setAside:t.length-r.size}}function te(t,x){const p=new Map,w=new Map,r=new Map(t.map(d=>[d,0]));for(const d of x)d.from!==d.to&&((p.get(d.from)??p.set(d.from,[]).get(d.from)).push(d.to),(w.get(d.to)??w.set(d.to,[]).get(d.to)).push(d.from),r.set(d.to,(r.get(d.to)??0)+1));const f=new Map,g=t.filter(d=>(r.get(d)??0)===0);for(const d of g)f.set(d,0);const i=new Map(r);for(let d=0;d<g.length;d+=1){const b=g[d];for(const o of p.get(b)??[]){f.set(o,Math.max(f.get(o)??0,(f.get(b)??0)+1));const m=(i.get(o)??0)-1;i.set(o,m),m===0&&g.push(o)}}for(const d of t){if(f.has(d))continue;const b=(w.get(d)??[]).map(o=>f.get(o)).filter(o=>o!==void 0);f.set(d,b.length>0?Math.max(...b)+1:0)}return f}function ne(t,x){return x===0?"In this window":t===0?"Opened the work":t===x?"Did the work":"Passed it on"}function ae(t,x,p,w){const r=U,f=new Map(t.map(s=>[s.id,s])),g=new Map,i=s=>{let c=g.get(s);return c||(c={asked:0,did:0,ms:0,abandoned:0,sent:0,received:0},g.set(s,c)),c};for(const s of t)i(s.id);for(const s of x){i(s.waiterId).asked+=1;const c=i(s.workerId);c.did+=1,c.ms=Math.max(c.ms,s.ms),s.abandoned&&(c.abandoned+=1)}for(const s of p)i(s.from).sent+=s.count,i(s.to).received+=s.count;const d=x.map(s=>({from:s.waiterId,to:s.workerId})),b=t.map(s=>s.id),o=te(b,d),m=new Set;for(const s of d)m.add(s.from),m.add(s.to);const n=new Map;for(const s of p)for(const[c,l]of[[s.from,s.to],[s.to,s.from]]){const u=n.get(c);(!u||s.count>u.count)&&n.set(c,{id:l,count:s.count})}for(const s of b){if(m.has(s))continue;const c=n.get(s);o.set(s,c&&m.has(c.id)?(o.get(c.id)??0)+1:o.get(s)??0)}const v=Math.max(0,...b.map(s=>o.get(s)??0)),M=s=>{const c=i(s);switch(w.order){case"duration":return-c.ms;case"outcome":return-(c.abandoned*1e12+c.ms);case"volume":return-(c.sent+c.received);case"name":return 0}},$=new Map;for(const s of b){const c=o.get(s)??0;($.get(c)??$.set(c,[]).get(c)).push(s)}for(const[,s]of $)s.sort((c,l)=>{const u=M(c)-M(l);return u!==0?u:(f.get(c)?.short??c).localeCompare(f.get(l)?.short??l)});const E=w.mode==="shelf"?Math.max(2,w.shelfRows??r.shelfRows):Number.POSITIVE_INFINITY,A=new Map,H=new Map;let W=r.padX;for(let s=0;s<=v;s+=1){const c=$.get(s)??[],l=Math.max(1,Math.ceil(c.length/E));A.set(s,l),H.set(s,W),W+=l*r.nodeW+(l-1)*r.colGap+r.laneGap}const K=Math.max(W-r.laneGap+r.padX,640),j=[];for(let s=0;s<=v;s+=1){const c=$.get(s)??[],l=A.get(s)??1,u=Math.ceil(c.length/l);c.forEach((e,h)=>{const y=l===1?0:Math.floor(h/u),S=l===1?h:h%u,R=i(e),L=f.get(e);j.push({id:e,short:L?.short??e,kind:L?.kind??"agent",lane:s,col:y,x:(H.get(s)??r.padX)+y*(r.nodeW+r.colGap),y:r.padY+S*(r.nodeH+r.rowGap),w:r.nodeW,h:r.nodeH,asked:R.asked,did:R.did,ms:R.ms,abandoned:R.abandoned,sent:R.sent,received:R.received,model:L?.model??null,harness:L?.harness??null,disputed:L?.disputed??!1,inferred:!m.has(e)})})}const C=new Map(j.map(s=>[s.id,s])),D=Math.max(1,...[...$.entries()].map(([s,c])=>Math.ceil(c.length/(A.get(s)??1)))),N=r.padY*2+D*r.nodeH+(D-1)*r.rowGap,k=new Map;for(const s of x){const c=`${s.waiterId}>${s.workerId}`,l=k.get(c)??{tasks:0,abandoned:0};l.tasks+=1,s.abandoned&&(l.abandoned+=1),k.set(c,l)}const P=Math.max(1,...p.map(s=>s.count)),O=[],T=[],X=(s,c)=>{const l=s.x+s.w,u=s.y+s.h/2,e=c.x,h=c.y+c.h/2,y=Math.max(28,(e-l)/2);return{d:`M ${l} ${u} C ${l+y} ${u}, ${e-y} ${h}, ${e} ${h}`,tip:{x:e,y:h,angle:0}}};if(w.mode==="ladder")for(const s of p){const c=C.get(s.from),l=C.get(s.to);if(!c||!l||c.lane>=l.lane)continue;const u=k.get(`${s.from}>${s.to}`),{d:e,tip:h}=X(c,l);O.push({key:`${s.from}>${s.to}`,from:s.from,to:s.to,count:s.count,tasks:u?.tasks??0,abandoned:u?.abandoned??0,weight:1+Math.round(s.count/P*3),d:e,tip:h})}else{const s=new Map,c=(l,u)=>{const e=`${l}>L${u}`,h=s.get(e)??{from:l,lane:u,count:0,tasks:0,abandoned:0};return s.set(e,h),h};for(const l of x){const u=C.get(l.waiterId),e=C.get(l.workerId);if(!u||!e||u.lane>=e.lane)continue;const h=c(l.waiterId,e.lane);h.tasks+=1,l.abandoned&&(h.abandoned+=1)}for(const l of p){const u=C.get(l.from),e=C.get(l.to);!u||!e||u.lane>=e.lane||(c(l.from,e.lane).count+=l.count)}for(const[l,u]of s){const e=C.get(u.from);if(!e)continue;const h=j.filter(G=>G.lane===u.lane);if(h.length===0)continue;const y=Math.min(...h.map(G=>G.x))-14,S=Math.min(...h.map(G=>G.y))+r.nodeH/2,R=Math.max(...h.map(G=>G.y))+r.nodeH/2,L=e.x+e.w,Y=e.y+e.h/2,B=(S+R)/2,V=Math.max(28,(y-L)/2);T.push({key:l,from:u.from,lane:u.lane,count:u.count,tasks:u.tasks,abandoned:u.abandoned,d:`M ${L} ${Y} C ${L+V} ${Y}, ${y-V} ${B}, ${y} ${B}`,label:{x:L+9,y:Y-7+(u.lane-e.lane-1)*12},bar:{x:y,y1:S,y2:R}})}}return{nodes:j,modelsKnown:j.filter(s=>s.model).length,disputedCount:j.filter(s=>s.disputed).length,edges:O,trunks:T,lanes:[...Array(v+1).keys()].map(s=>({index:s,label:ne(s,v),x:H.get(s)??r.padX,count:($.get(s)??[]).length})),width:K,height:N}}function oe(t,x,p){if(t.length===0)return null;const w=t.find(o=>o.id===x);if(!w)return t.reduce((o,m)=>m.x<o.x||m.x===o.x&&m.y<o.y?m:o).id;const r=o=>`${o.lane}:${o.col}`,f=t.filter(o=>r(o)===r(w)).sort((o,m)=>o.y-m.y);if(p==="first")return f[0]?.id??null;if(p==="last")return f[f.length-1]?.id??null;if(p==="up"||p==="down"){const o=f.findIndex(m=>m.id===w.id);return f[o+(p==="down"?1:-1)]?.id??null}const g=new Map;for(const o of t){const m=r(o),n=g.get(m);n?(n.nodes.push(o),n.x=Math.min(n.x,o.x)):g.set(m,{x:o.x,nodes:[o]})}const i=[...g.values()].sort((o,m)=>o.x-m.x),d=i.findIndex(o=>o.nodes.some(m=>m.id===w.id)),b=i[d+(p==="right"?1:-1)];return b?b.nodes.reduce((o,m)=>Math.abs(m.y-w.y)<Math.abs(o.y-w.y)?m:o).id:null}const re=[{id:"shelf",label:"Shelf",hint:"Wrap the last lane into as many columns as fit, and bundle its edges"},{id:"ladder",label:"Ladder",hint:"One card per row, every edge drawn on its own"}],ce=[{id:"duration",label:"Longest first"},{id:"outcome",label:"Never came back"},{id:"volume",label:"Most said"},{id:"name",label:"By name"}];function ie(t){return(t.includes("/")?t.slice(t.lastIndexOf("/")+1):t).replace(/^(claude|openai|anthropic)-/i,"")}function F(t){return t.model?.trim()?ie(t.model.trim()):t.harness?.trim()||null}function z(t,x){return t.length<=x?t:`${t.slice(0,x-1).trimEnd()}…`}const de={ArrowUp:"up",ArrowDown:"down",ArrowLeft:"left",ArrowRight:"right",Home:"first",End:"last"};function le({node:t,dim:x,on:p,cursor:w,bind:r,onHover:f,onOpen:g,onNav:i,onFocus:d}){const b=_(g),o=F(t),m=`${t.sent+t.received} msgs`,n=t.asked>0?`${t.asked} handed out`:t.ms>0?q(t.ms):null,v=n?`${n} · ${m}`:m,M=o?n??m:v,$=t.disputed?`${t.short} — ${v} — attribution disputed`:`${t.short} — ${v}`;return a.jsxs("g",{className:["cvs-node",t.asked>0?"cvs-node--hub":"",x?"cvs-node--dim":"",p?"cvs-node--on":"",t.disputed?"cvs-node--disputed":""].filter(Boolean).join(" "),transform:`translate(${t.x} ${t.y})`,onMouseEnter:()=>f(t.id),onMouseLeave:()=>f(null),"aria-label":$,"aria-current":p?"true":void 0,ref:r,...b,tabIndex:w?0:-1,onFocus:d,onKeyDown:E=>{const A=de[E.key];if(!A){b.onKeyDown(E);return}E.preventDefault(),i(A)},children:[a.jsx("title",{children:t.disputed?`${t.short} — ${v} — every message under this name is classed as an agent's, so the name is the record's, not a person's`:$}),a.jsx("rect",{className:"cvs-box",x:0,y:0,width:t.w,height:t.h,rx:5}),t.abandoned>0?a.jsx("rect",{className:"cvs-late-mark",x:0,y:0,width:2,height:t.h}):null,a.jsx("text",{className:"cvs-name",x:11,y:17,children:z(t.short,24)}),a.jsx("text",{className:"cvs-meta",x:11,y:31,children:z(M,o?17:30)}),o?a.jsx("text",{className:"cvs-meta cvs-ran",x:t.w-11,y:31,textAnchor:"end",children:z(o,11)}):null,t.inferred?a.jsx("circle",{className:"cvs-inferred",cx:t.w-10,cy:11,r:2.5}):null]})}function fe({passes:t,flights:x,identities:p,rootId:w,focus:r,selectedId:f,onOpen:g}){const[i,d]=I.useState(null),[b,o]=I.useState(null),m=I.useRef(new Map),[n,v]=I.useState("shelf"),[M,$]=I.useState(!1),[E,A]=I.useState("duration"),H=I.useRef(null),[W,K]=I.useState(0);I.useEffect(()=>{const e=H.current;if(!e||typeof ResizeObserver>"u")return;const h=new ResizeObserver(([y])=>K(y?.contentRect.height??0));return h.observe(e),()=>h.disconnect()},[]);const j=I.useMemo(()=>ee(t,x,p),[t,x,p]),C=I.useMemo(()=>w?se(j.actors,j.tasks,j.pairs,w):null,[j,w]),D=C?.setAside??0,N=I.useMemo(()=>C&&!M?{...j,...C}:j,[j,C,M]),k=I.useMemo(()=>{const e=U,h=W>0?Math.max(2,Math.floor((W-e.padY*2+e.rowGap)/(e.nodeH+e.rowGap))):void 0;return ae(N.actors,N.tasks,N.pairs,{mode:n,order:E,shelfRows:h})},[N,n,E,W]);if(k.nodes.length===0)return a.jsx("p",{className:"cf-graph-empty",children:"Nothing has been exchanged in this window yet."});const P=e=>r?r.has(e):!1,O=e=>i!==null?i===e:r?r.has(e):!0,T=(e,h)=>i!==null?i===e||i===h:r?r.has(e)&&r.has(h):!0,X=e=>f===Q(e),s=(e,h)=>{const y=oe(k.nodes,e,h);if(!y||y===e)return;o(y);const S=m.current.get(y);S?.focus(),S?.scrollIntoView({block:"nearest",inline:"nearest"})},c=k.nodes.some(e=>e.id===b)?b:k.nodes[0]?.id??null,l=k.nodes.length-k.modelsKnown,u=N.tasks.filter(e=>e.abandoned).length;return a.jsxs("div",{className:"cvs",children:[a.jsxs("div",{className:"cvs-controls",children:[a.jsx("span",{className:"cvs-ctl-label",children:"Layout"}),a.jsx("div",{className:"cvs-seg",role:"group","aria-label":"Layout",children:re.map(e=>a.jsx("button",{type:"button",className:`cvs-seg-btn${n===e.id?" is-active":""}`,onClick:()=>v(e.id),"aria-pressed":n===e.id,title:e.hint,children:e.label},e.id))}),D>0?a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"cvs-ctl-label",children:"Show"}),a.jsxs("div",{className:"cvs-seg",role:"group","aria-label":"Scope",children:[a.jsx("button",{type:"button",className:`cvs-seg-btn${M?"":" is-active"}`,onClick:()=>$(!1),"aria-pressed":!M,title:"Who asked this agent, and everyone it asked, all the way down",children:"This branch"}),a.jsx("button",{type:"button",className:`cvs-seg-btn${M?" is-active":""}`,onClick:()=>$(!0),"aria-pressed":M,title:"Every participant in this agent's window, whoever they were working for",children:"Everything"})]})]}):null,a.jsx("span",{className:"cvs-ctl-label",children:"Down the lane"}),a.jsx("div",{className:"cvs-seg",role:"group","aria-label":"Order",children:ce.map(e=>a.jsx("button",{type:"button",className:`cvs-seg-btn${E===e.id?" is-active":""}`,onClick:()=>A(e.id),"aria-pressed":E===e.id,children:e.label},e.id))}),g?a.jsx("p",{className:"cvs-hint",children:"Click to select · arrows to move · Esc to clear"}):null]}),a.jsx("div",{className:"cvs-stage",ref:H,children:a.jsxs("svg",{className:"cvs-svg",width:k.width,height:k.height,viewBox:`0 0 ${k.width} ${k.height}`,role:"img","aria-label":"Who asked whom, laid out from who opened the work to who did it",children:[k.lanes.map(e=>a.jsxs("g",{children:[a.jsx("text",{className:"cvs-lane-label",x:e.x,y:20,children:e.label.toUpperCase()}),a.jsx("text",{className:"cvs-lane-count",x:e.x,y:34,children:e.count})]},e.index)),k.edges.map(e=>a.jsxs("g",{className:`cvs-edge${T(e.from,e.to)?"":" cvs-edge--dim"}`,children:[a.jsx("path",{className:"cvs-edge-line",d:e.d,strokeWidth:e.weight}),a.jsx("path",{className:"cvs-edge-tip",d:"M 0 0 L -7 -3.2 L -7 3.2 Z",transform:`translate(${e.tip.x} ${e.tip.y}) rotate(${e.tip.angle})`}),e.abandoned>0?a.jsx("path",{className:"cvs-edge-late",d:e.d,strokeWidth:e.weight}):null,g?a.jsx("path",{className:"cvs-edge-hit",d:e.d,"aria-label":`${e.count} message${e.count===1?"":"s"} — open`,..._(()=>g({kind:"pair",from:e.from,to:e.to})),children:a.jsx("title",{children:`${e.count} message${e.count===1?"":"s"} — open`})}):null]},e.key)),k.trunks.map(e=>a.jsxs("g",{className:`cvs-trunk${O(e.from)?"":" cvs-edge--dim"}`,children:[a.jsxs("title",{children:[`${e.tasks} ask${e.tasks===1?"":"s"} · ${e.count} message${e.count===1?"":"s"}`,e.abandoned>0?` · ${e.abandoned} never came back`:""]}),a.jsx("path",{className:"cvs-edge-line",d:e.d,strokeWidth:2}),e.abandoned>0?a.jsx("path",{className:"cvs-edge-late",d:e.d,strokeWidth:2}):null,a.jsx("path",{className:"cvs-bracket",d:`M ${e.bar.x} ${e.bar.y1} L ${e.bar.x} ${e.bar.y2}`}),a.jsxs("text",{className:"cvs-trunk-label",x:e.label.x,y:e.label.y,children:[e.tasks," ask",e.tasks===1?"":"s"]})]},e.key)),k.nodes.map(e=>a.jsx(le,{node:e,dim:!O(e.id),on:P(e.id),cursor:e.id===c,bind:h=>{h?m.current.set(e.id,h):m.current.delete(e.id)},onHover:d,onOpen:()=>g?.({kind:"actor",actorId:e.id}),onNav:h=>s(e.id,h),onFocus:()=>o(e.id)},e.id))]})}),a.jsxs("div",{className:"cf-legend",children:[a.jsxs("span",{children:[a.jsx("i",{className:"cf-swatch"})," exchange, thicker with volume"]}),u>0&&a.jsxs("span",{children:[a.jsx("i",{className:"cf-swatch cf-swatch--late"})," ",u," ask",u===1?"":"s"," never came back"]}),N.broadcasts>0&&a.jsxs("span",{className:"cf-dim",children:[N.broadcasts," to the whole conversation, which is not a pair"]}),!M&&D>0&&a.jsxs("span",{className:"cf-dim",children:[D," more in this window, on work this agent is not part of"]}),k.disputedCount>0&&a.jsxs("span",{className:"cf-dim",children:[N.misattributed," message",N.misattributed===1?"":"s"," name an operator but are recorded as an agent’s — drawn with a dashed edge, because the name is the record’s and not a person’s"]}),a.jsx("span",{className:"cf-dim",children:l===0?`all ${k.nodes.length} name a model`:`${k.modelsKnown} of ${k.nodes.length} name a model; the rest show the harness that ran them`})]}),N.tasks.length>0&&a.jsx("ol",{className:"cvs-tasks",children:N.tasks.map(e=>{const h={kind:"task",askId:e.id},y=k.nodes.find(S=>S.id===e.workerId);return a.jsx("li",{children:a.jsxs("button",{type:"button",className:`cvs-task${X(h)?" cvs-task--on":""}`,...J(()=>g?.(h)),"aria-current":X(h)?"true":void 0,title:e.title,onMouseEnter:()=>d(e.workerId),onMouseLeave:()=>d(null),children:[a.jsx("span",{className:"cvs-task-title",children:e.title}),a.jsxs("span",{className:"cvs-task-who",children:[k.nodes.find(S=>S.id===e.waiterId)?.short??e.waiterId,a.jsx("i",{className:"cvs-arrow",children:"→"}),y?.short??e.workerId,y&&F(y)?a.jsx("i",{className:"cvs-task-ran",children:F(y)}):null]}),a.jsx("span",{className:`cvs-task-ms${e.abandoned?" cvs-task-ms--late":""}`,children:q(e.ms)})]})},e.id)})})]})}export{fe as CommsCanvas};
|
|
1
|
+
import{r as I,j as a}from"./index-EsrkGBcv.js";import{a as Z,h as _,d as q,p as J}from"./comms-gesture-_aGFo6g3.js";import{f as Q}from"./comms-deck-CBhsXnY-.js";const U={nodeW:178,nodeH:42,rowGap:9,laneGap:124,padX:26,padY:46,shelfRows:9,colGap:20};function ee(t,x,p=new Map){const w=new Map,r=new Map;let f=0;const g=new Map,i=n=>{w.has(n.id)||w.set(n.id,n)};for(const n of t){if(i(n.from),n.from.kind==="operator"){const v=g.get(n.from.id)??{own:0,agent:0};n.message.class==="agent"?v.agent+=n.count:v.own+=n.count,g.set(n.from.id,v)}if(n.kind==="channel"){f+=n.count;for(const v of n.audience)i(v);continue}for(const v of n.audience){if(i(v),v.id===n.from.id)continue;const M=`${n.from.id}->${v.id}`,$=r.get(M);$?$.count+=n.count:r.set(M,{from:n.from.id,to:v.id,count:n.count})}}const d=new Set([...g].filter(([,n])=>n.own===0&&n.agent>0).map(([n])=>n)),b=[...g].filter(([n])=>d.has(n)).reduce((n,[,v])=>n+v.agent,0),o=[...w.values()].map(n=>({id:n.id,short:n.short,kind:n.kind,model:p.get(n.id)?.model??null,harness:p.get(n.id)?.harness??null,disputed:d.has(n.id)})),m=Z(t,x).map(n=>({id:n.id,title:n.title,ms:n.ms,abandoned:n.abandoned,waiterId:n.waiter.id,workerId:n.worker.id}));return{actors:o,tasks:m,pairs:[...r.values()],broadcasts:f,misattributed:b}}function se(t,x,p,w){const r=new Set([w]),f=new Map,g=new Map;for(const i of x)(f.get(i.waiterId)??f.set(i.waiterId,[]).get(i.waiterId)).push(i.workerId),(g.get(i.workerId)??g.set(i.workerId,[]).get(i.workerId)).push(i.waiterId);for(const i of[f,g]){const d=[w];for(let b=0;b<d.length;b+=1)for(const o of i.get(d[b])??[])r.has(o)||(r.add(o),d.push(o))}return r.size<2?{actors:[...t],tasks:[...x],pairs:[...p],setAside:0}:{actors:t.filter(i=>r.has(i.id)),tasks:x.filter(i=>r.has(i.waiterId)&&r.has(i.workerId)),pairs:p.filter(i=>r.has(i.from)&&r.has(i.to)),setAside:t.length-r.size}}function te(t,x){const p=new Map,w=new Map,r=new Map(t.map(d=>[d,0]));for(const d of x)d.from!==d.to&&((p.get(d.from)??p.set(d.from,[]).get(d.from)).push(d.to),(w.get(d.to)??w.set(d.to,[]).get(d.to)).push(d.from),r.set(d.to,(r.get(d.to)??0)+1));const f=new Map,g=t.filter(d=>(r.get(d)??0)===0);for(const d of g)f.set(d,0);const i=new Map(r);for(let d=0;d<g.length;d+=1){const b=g[d];for(const o of p.get(b)??[]){f.set(o,Math.max(f.get(o)??0,(f.get(b)??0)+1));const m=(i.get(o)??0)-1;i.set(o,m),m===0&&g.push(o)}}for(const d of t){if(f.has(d))continue;const b=(w.get(d)??[]).map(o=>f.get(o)).filter(o=>o!==void 0);f.set(d,b.length>0?Math.max(...b)+1:0)}return f}function ne(t,x){return x===0?"In this window":t===0?"Opened the work":t===x?"Did the work":"Passed it on"}function ae(t,x,p,w){const r=U,f=new Map(t.map(s=>[s.id,s])),g=new Map,i=s=>{let c=g.get(s);return c||(c={asked:0,did:0,ms:0,abandoned:0,sent:0,received:0},g.set(s,c)),c};for(const s of t)i(s.id);for(const s of x){i(s.waiterId).asked+=1;const c=i(s.workerId);c.did+=1,c.ms=Math.max(c.ms,s.ms),s.abandoned&&(c.abandoned+=1)}for(const s of p)i(s.from).sent+=s.count,i(s.to).received+=s.count;const d=x.map(s=>({from:s.waiterId,to:s.workerId})),b=t.map(s=>s.id),o=te(b,d),m=new Set;for(const s of d)m.add(s.from),m.add(s.to);const n=new Map;for(const s of p)for(const[c,l]of[[s.from,s.to],[s.to,s.from]]){const u=n.get(c);(!u||s.count>u.count)&&n.set(c,{id:l,count:s.count})}for(const s of b){if(m.has(s))continue;const c=n.get(s);o.set(s,c&&m.has(c.id)?(o.get(c.id)??0)+1:o.get(s)??0)}const v=Math.max(0,...b.map(s=>o.get(s)??0)),M=s=>{const c=i(s);switch(w.order){case"duration":return-c.ms;case"outcome":return-(c.abandoned*1e12+c.ms);case"volume":return-(c.sent+c.received);case"name":return 0}},$=new Map;for(const s of b){const c=o.get(s)??0;($.get(c)??$.set(c,[]).get(c)).push(s)}for(const[,s]of $)s.sort((c,l)=>{const u=M(c)-M(l);return u!==0?u:(f.get(c)?.short??c).localeCompare(f.get(l)?.short??l)});const E=w.mode==="shelf"?Math.max(2,w.shelfRows??r.shelfRows):Number.POSITIVE_INFINITY,A=new Map,H=new Map;let W=r.padX;for(let s=0;s<=v;s+=1){const c=$.get(s)??[],l=Math.max(1,Math.ceil(c.length/E));A.set(s,l),H.set(s,W),W+=l*r.nodeW+(l-1)*r.colGap+r.laneGap}const K=Math.max(W-r.laneGap+r.padX,640),j=[];for(let s=0;s<=v;s+=1){const c=$.get(s)??[],l=A.get(s)??1,u=Math.ceil(c.length/l);c.forEach((e,h)=>{const y=l===1?0:Math.floor(h/u),S=l===1?h:h%u,R=i(e),L=f.get(e);j.push({id:e,short:L?.short??e,kind:L?.kind??"agent",lane:s,col:y,x:(H.get(s)??r.padX)+y*(r.nodeW+r.colGap),y:r.padY+S*(r.nodeH+r.rowGap),w:r.nodeW,h:r.nodeH,asked:R.asked,did:R.did,ms:R.ms,abandoned:R.abandoned,sent:R.sent,received:R.received,model:L?.model??null,harness:L?.harness??null,disputed:L?.disputed??!1,inferred:!m.has(e)})})}const C=new Map(j.map(s=>[s.id,s])),D=Math.max(1,...[...$.entries()].map(([s,c])=>Math.ceil(c.length/(A.get(s)??1)))),N=r.padY*2+D*r.nodeH+(D-1)*r.rowGap,k=new Map;for(const s of x){const c=`${s.waiterId}>${s.workerId}`,l=k.get(c)??{tasks:0,abandoned:0};l.tasks+=1,s.abandoned&&(l.abandoned+=1),k.set(c,l)}const P=Math.max(1,...p.map(s=>s.count)),O=[],T=[],X=(s,c)=>{const l=s.x+s.w,u=s.y+s.h/2,e=c.x,h=c.y+c.h/2,y=Math.max(28,(e-l)/2);return{d:`M ${l} ${u} C ${l+y} ${u}, ${e-y} ${h}, ${e} ${h}`,tip:{x:e,y:h,angle:0}}};if(w.mode==="ladder")for(const s of p){const c=C.get(s.from),l=C.get(s.to);if(!c||!l||c.lane>=l.lane)continue;const u=k.get(`${s.from}>${s.to}`),{d:e,tip:h}=X(c,l);O.push({key:`${s.from}>${s.to}`,from:s.from,to:s.to,count:s.count,tasks:u?.tasks??0,abandoned:u?.abandoned??0,weight:1+Math.round(s.count/P*3),d:e,tip:h})}else{const s=new Map,c=(l,u)=>{const e=`${l}>L${u}`,h=s.get(e)??{from:l,lane:u,count:0,tasks:0,abandoned:0};return s.set(e,h),h};for(const l of x){const u=C.get(l.waiterId),e=C.get(l.workerId);if(!u||!e||u.lane>=e.lane)continue;const h=c(l.waiterId,e.lane);h.tasks+=1,l.abandoned&&(h.abandoned+=1)}for(const l of p){const u=C.get(l.from),e=C.get(l.to);!u||!e||u.lane>=e.lane||(c(l.from,e.lane).count+=l.count)}for(const[l,u]of s){const e=C.get(u.from);if(!e)continue;const h=j.filter(G=>G.lane===u.lane);if(h.length===0)continue;const y=Math.min(...h.map(G=>G.x))-14,S=Math.min(...h.map(G=>G.y))+r.nodeH/2,R=Math.max(...h.map(G=>G.y))+r.nodeH/2,L=e.x+e.w,Y=e.y+e.h/2,B=(S+R)/2,V=Math.max(28,(y-L)/2);T.push({key:l,from:u.from,lane:u.lane,count:u.count,tasks:u.tasks,abandoned:u.abandoned,d:`M ${L} ${Y} C ${L+V} ${Y}, ${y-V} ${B}, ${y} ${B}`,label:{x:L+9,y:Y-7+(u.lane-e.lane-1)*12},bar:{x:y,y1:S,y2:R}})}}return{nodes:j,modelsKnown:j.filter(s=>s.model).length,disputedCount:j.filter(s=>s.disputed).length,edges:O,trunks:T,lanes:[...Array(v+1).keys()].map(s=>({index:s,label:ne(s,v),x:H.get(s)??r.padX,count:($.get(s)??[]).length})),width:K,height:N}}function oe(t,x,p){if(t.length===0)return null;const w=t.find(o=>o.id===x);if(!w)return t.reduce((o,m)=>m.x<o.x||m.x===o.x&&m.y<o.y?m:o).id;const r=o=>`${o.lane}:${o.col}`,f=t.filter(o=>r(o)===r(w)).sort((o,m)=>o.y-m.y);if(p==="first")return f[0]?.id??null;if(p==="last")return f[f.length-1]?.id??null;if(p==="up"||p==="down"){const o=f.findIndex(m=>m.id===w.id);return f[o+(p==="down"?1:-1)]?.id??null}const g=new Map;for(const o of t){const m=r(o),n=g.get(m);n?(n.nodes.push(o),n.x=Math.min(n.x,o.x)):g.set(m,{x:o.x,nodes:[o]})}const i=[...g.values()].sort((o,m)=>o.x-m.x),d=i.findIndex(o=>o.nodes.some(m=>m.id===w.id)),b=i[d+(p==="right"?1:-1)];return b?b.nodes.reduce((o,m)=>Math.abs(m.y-w.y)<Math.abs(o.y-w.y)?m:o).id:null}const re=[{id:"shelf",label:"Shelf",hint:"Wrap the last lane into as many columns as fit, and bundle its edges"},{id:"ladder",label:"Ladder",hint:"One card per row, every edge drawn on its own"}],ce=[{id:"duration",label:"Longest first"},{id:"outcome",label:"Never came back"},{id:"volume",label:"Most said"},{id:"name",label:"By name"}];function ie(t){return(t.includes("/")?t.slice(t.lastIndexOf("/")+1):t).replace(/^(claude|openai|anthropic)-/i,"")}function F(t){return t.model?.trim()?ie(t.model.trim()):t.harness?.trim()||null}function z(t,x){return t.length<=x?t:`${t.slice(0,x-1).trimEnd()}…`}const de={ArrowUp:"up",ArrowDown:"down",ArrowLeft:"left",ArrowRight:"right",Home:"first",End:"last"};function le({node:t,dim:x,on:p,cursor:w,bind:r,onHover:f,onOpen:g,onNav:i,onFocus:d}){const b=_(g),o=F(t),m=`${t.sent+t.received} msgs`,n=t.asked>0?`${t.asked} handed out`:t.ms>0?q(t.ms):null,v=n?`${n} · ${m}`:m,M=o?n??m:v,$=t.disputed?`${t.short} — ${v} — attribution disputed`:`${t.short} — ${v}`;return a.jsxs("g",{className:["cvs-node",t.asked>0?"cvs-node--hub":"",x?"cvs-node--dim":"",p?"cvs-node--on":"",t.disputed?"cvs-node--disputed":""].filter(Boolean).join(" "),transform:`translate(${t.x} ${t.y})`,onMouseEnter:()=>f(t.id),onMouseLeave:()=>f(null),"aria-label":$,"aria-current":p?"true":void 0,ref:r,...b,tabIndex:w?0:-1,onFocus:d,onKeyDown:E=>{const A=de[E.key];if(!A){b.onKeyDown(E);return}E.preventDefault(),i(A)},children:[a.jsx("title",{children:t.disputed?`${t.short} — ${v} — every message under this name is classed as an agent's, so the name is the record's, not a person's`:$}),a.jsx("rect",{className:"cvs-box",x:0,y:0,width:t.w,height:t.h,rx:5}),t.abandoned>0?a.jsx("rect",{className:"cvs-late-mark",x:0,y:0,width:2,height:t.h}):null,a.jsx("text",{className:"cvs-name",x:11,y:17,children:z(t.short,24)}),a.jsx("text",{className:"cvs-meta",x:11,y:31,children:z(M,o?17:30)}),o?a.jsx("text",{className:"cvs-meta cvs-ran",x:t.w-11,y:31,textAnchor:"end",children:z(o,11)}):null,t.inferred?a.jsx("circle",{className:"cvs-inferred",cx:t.w-10,cy:11,r:2.5}):null]})}function fe({passes:t,flights:x,identities:p,rootId:w,focus:r,selectedId:f,onOpen:g}){const[i,d]=I.useState(null),[b,o]=I.useState(null),m=I.useRef(new Map),[n,v]=I.useState("shelf"),[M,$]=I.useState(!1),[E,A]=I.useState("duration"),H=I.useRef(null),[W,K]=I.useState(0);I.useEffect(()=>{const e=H.current;if(!e||typeof ResizeObserver>"u")return;const h=new ResizeObserver(([y])=>K(y?.contentRect.height??0));return h.observe(e),()=>h.disconnect()},[]);const j=I.useMemo(()=>ee(t,x,p),[t,x,p]),C=I.useMemo(()=>w?se(j.actors,j.tasks,j.pairs,w):null,[j,w]),D=C?.setAside??0,N=I.useMemo(()=>C&&!M?{...j,...C}:j,[j,C,M]),k=I.useMemo(()=>{const e=U,h=W>0?Math.max(2,Math.floor((W-e.padY*2+e.rowGap)/(e.nodeH+e.rowGap))):void 0;return ae(N.actors,N.tasks,N.pairs,{mode:n,order:E,shelfRows:h})},[N,n,E,W]);if(k.nodes.length===0)return a.jsx("p",{className:"cf-graph-empty",children:"Nothing has been exchanged in this window yet."});const P=e=>r?r.has(e):!1,O=e=>i!==null?i===e:r?r.has(e):!0,T=(e,h)=>i!==null?i===e||i===h:r?r.has(e)&&r.has(h):!0,X=e=>f===Q(e),s=(e,h)=>{const y=oe(k.nodes,e,h);if(!y||y===e)return;o(y);const S=m.current.get(y);S?.focus(),S?.scrollIntoView({block:"nearest",inline:"nearest"})},c=k.nodes.some(e=>e.id===b)?b:k.nodes[0]?.id??null,l=k.nodes.length-k.modelsKnown,u=N.tasks.filter(e=>e.abandoned).length;return a.jsxs("div",{className:"cvs",children:[a.jsxs("div",{className:"cvs-controls",children:[a.jsx("span",{className:"cvs-ctl-label",children:"Layout"}),a.jsx("div",{className:"cvs-seg",role:"group","aria-label":"Layout",children:re.map(e=>a.jsx("button",{type:"button",className:`cvs-seg-btn${n===e.id?" is-active":""}`,onClick:()=>v(e.id),"aria-pressed":n===e.id,title:e.hint,children:e.label},e.id))}),D>0?a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"cvs-ctl-label",children:"Show"}),a.jsxs("div",{className:"cvs-seg",role:"group","aria-label":"Scope",children:[a.jsx("button",{type:"button",className:`cvs-seg-btn${M?"":" is-active"}`,onClick:()=>$(!1),"aria-pressed":!M,title:"Who asked this agent, and everyone it asked, all the way down",children:"This branch"}),a.jsx("button",{type:"button",className:`cvs-seg-btn${M?" is-active":""}`,onClick:()=>$(!0),"aria-pressed":M,title:"Every participant in this agent's window, whoever they were working for",children:"Everything"})]})]}):null,a.jsx("span",{className:"cvs-ctl-label",children:"Down the lane"}),a.jsx("div",{className:"cvs-seg",role:"group","aria-label":"Order",children:ce.map(e=>a.jsx("button",{type:"button",className:`cvs-seg-btn${E===e.id?" is-active":""}`,onClick:()=>A(e.id),"aria-pressed":E===e.id,children:e.label},e.id))}),g?a.jsx("p",{className:"cvs-hint",children:"Click to select · arrows to move · Esc to clear"}):null]}),a.jsx("div",{className:"cvs-stage",ref:H,children:a.jsxs("svg",{className:"cvs-svg",width:k.width,height:k.height,viewBox:`0 0 ${k.width} ${k.height}`,role:"img","aria-label":"Who asked whom, laid out from who opened the work to who did it",children:[k.lanes.map(e=>a.jsxs("g",{children:[a.jsx("text",{className:"cvs-lane-label",x:e.x,y:20,children:e.label.toUpperCase()}),a.jsx("text",{className:"cvs-lane-count",x:e.x,y:34,children:e.count})]},e.index)),k.edges.map(e=>a.jsxs("g",{className:`cvs-edge${T(e.from,e.to)?"":" cvs-edge--dim"}`,children:[a.jsx("path",{className:"cvs-edge-line",d:e.d,strokeWidth:e.weight}),a.jsx("path",{className:"cvs-edge-tip",d:"M 0 0 L -7 -3.2 L -7 3.2 Z",transform:`translate(${e.tip.x} ${e.tip.y}) rotate(${e.tip.angle})`}),e.abandoned>0?a.jsx("path",{className:"cvs-edge-late",d:e.d,strokeWidth:e.weight}):null,g?a.jsx("path",{className:"cvs-edge-hit",d:e.d,"aria-label":`${e.count} message${e.count===1?"":"s"} — open`,..._(()=>g({kind:"pair",from:e.from,to:e.to})),children:a.jsx("title",{children:`${e.count} message${e.count===1?"":"s"} — open`})}):null]},e.key)),k.trunks.map(e=>a.jsxs("g",{className:`cvs-trunk${O(e.from)?"":" cvs-edge--dim"}`,children:[a.jsxs("title",{children:[`${e.tasks} ask${e.tasks===1?"":"s"} · ${e.count} message${e.count===1?"":"s"}`,e.abandoned>0?` · ${e.abandoned} never came back`:""]}),a.jsx("path",{className:"cvs-edge-line",d:e.d,strokeWidth:2}),e.abandoned>0?a.jsx("path",{className:"cvs-edge-late",d:e.d,strokeWidth:2}):null,a.jsx("path",{className:"cvs-bracket",d:`M ${e.bar.x} ${e.bar.y1} L ${e.bar.x} ${e.bar.y2}`}),a.jsxs("text",{className:"cvs-trunk-label",x:e.label.x,y:e.label.y,children:[e.tasks," ask",e.tasks===1?"":"s"]})]},e.key)),k.nodes.map(e=>a.jsx(le,{node:e,dim:!O(e.id),on:P(e.id),cursor:e.id===c,bind:h=>{h?m.current.set(e.id,h):m.current.delete(e.id)},onHover:d,onOpen:()=>g?.({kind:"actor",actorId:e.id}),onNav:h=>s(e.id,h),onFocus:()=>o(e.id)},e.id))]})}),a.jsxs("div",{className:"cf-legend",children:[a.jsxs("span",{children:[a.jsx("i",{className:"cf-swatch"})," exchange, thicker with volume"]}),u>0&&a.jsxs("span",{children:[a.jsx("i",{className:"cf-swatch cf-swatch--late"})," ",u," ask",u===1?"":"s"," never came back"]}),N.broadcasts>0&&a.jsxs("span",{className:"cf-dim",children:[N.broadcasts," to the whole conversation, which is not a pair"]}),!M&&D>0&&a.jsxs("span",{className:"cf-dim",children:[D," more in this window, on work this agent is not part of"]}),k.disputedCount>0&&a.jsxs("span",{className:"cf-dim",children:[N.misattributed," message",N.misattributed===1?"":"s"," name an operator but are recorded as an agent’s — drawn with a dashed edge, because the name is the record’s and not a person’s"]}),a.jsx("span",{className:"cf-dim",children:l===0?`all ${k.nodes.length} name a model`:`${k.modelsKnown} of ${k.nodes.length} name a model; the rest show the harness that ran them`})]}),N.tasks.length>0&&a.jsx("ol",{className:"cvs-tasks",children:N.tasks.map(e=>{const h={kind:"task",askId:e.id},y=k.nodes.find(S=>S.id===e.workerId);return a.jsx("li",{children:a.jsxs("button",{type:"button",className:`cvs-task${X(h)?" cvs-task--on":""}`,...J(()=>g?.(h)),"aria-current":X(h)?"true":void 0,title:e.title,onMouseEnter:()=>d(e.workerId),onMouseLeave:()=>d(null),children:[a.jsx("span",{className:"cvs-task-title",children:e.title}),a.jsxs("span",{className:"cvs-task-who",children:[k.nodes.find(S=>S.id===e.waiterId)?.short??e.waiterId,a.jsx("i",{className:"cvs-arrow",children:"→"}),y?.short??e.workerId,y&&F(y)?a.jsx("i",{className:"cvs-task-ran",children:F(y)}):null]}),a.jsx("span",{className:`cvs-task-ms${e.abandoned?" cvs-task-ms--late":""}`,children:q(e.ms)})]})},e.id)})})]})}export{fe as CommsCanvas};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o,j as t}from"./index-
|
|
1
|
+
import{r as o,j as t}from"./index-EsrkGBcv.js";/* empty css */import{c as D}from"./conversations-DoAAO6kA.js";import{u as S}from"./use-conversation-list-CY4JciOV.js";import{s as W}from"./agent-master-model-Bk_yuUXJ.js";import{A as L}from"./arrow-up-right-BPedAgxO.js";import{C as R}from"./chevron-right-DrfqcerI.js";import{X as A}from"./x-DAehov0E.js";import"./time-Dhsh_2EG.js";import"./machine-scope-DJt9RZ2w.js";import"./api-DSqpVKC7.js";import"./sse-BCPRocpq.js";import"./index-BWHgHrtv.js";import"./createLucideIcon-zZ8Hx7er.js";const d=260,p=720,h=380,v="openscout.comms.deck.width";function I(){try{const a=Number(window.localStorage.getItem(v));return Number.isFinite(a)&&a>=d&&a<=p?a:h}catch{return h}}function J({ids:a,onClose:g,onStage:j,renderConversation:N}){const[C,k]=o.useState({}),[y,M]=o.useState(()=>new Set),[c,f]=o.useState(null),[x,u]=o.useState(h),m=o.useRef(new Map),{sessions:E}=S();o.useEffect(()=>u(I()),[]);const w=o.useCallback(e=>{M(r=>{const s=new Set(r);return s.has(e)?s.delete(e):s.add(e),s})},[]);return o.useEffect(()=>{if(!c)return;const e=s=>{const i=m.current.get(c);if(!i)return;const n=Math.max(d,Math.min(p,i.getBoundingClientRect().right-s.clientX));k(l=>({...l,[c]:n})),u(n)},r=()=>{f(null),u(s=>{try{window.localStorage.setItem(v,String(s))}catch{}return s})};return window.addEventListener("pointermove",e),window.addEventListener("pointerup",r),()=>{window.removeEventListener("pointermove",e),window.removeEventListener("pointerup",r)}},[c]),a.length===0?null:t.jsx("div",{className:"cdk","aria-label":"Beside the stage",children:a.map(e=>{const r=E.find(n=>W(n,e)),s=r?D(r):e,i=r?.agentName??"Conversation";return y.has(e)?t.jsxs("button",{type:"button",className:"cdk-spine",onClick:()=>w(e),title:`Unfurl — ${s}`,"aria-label":`Unfurl ${i}: ${s}`,children:[t.jsx("span",{className:"cdk-spine-kicker",children:i}),t.jsx("span",{className:"cdk-spine-title",children:s})]},e):t.jsxs("section",{className:"cdk-col",style:{width:C[e]??x},ref:n=>{n?m.current.set(e,n):m.current.delete(e)},children:[t.jsx("div",{className:`cdk-grip${c===e?" cdk-grip--on":""}`,role:"separator","aria-orientation":"vertical","aria-label":`Resize ${s}`,onPointerDown:n=>{n.preventDefault(),f(e)},onKeyDown:n=>{const l=n.key==="ArrowLeft"?24:n.key==="ArrowRight"?-24:0;l&&(n.preventDefault(),k(b=>({...b,[e]:Math.max(d,Math.min(p,(b[e]??x)+l))})))},tabIndex:0}),t.jsxs("header",{className:"cdk-head",children:[t.jsxs("span",{className:"cdk-ident",children:[t.jsx("span",{className:"cdk-kicker",children:i}),t.jsx("span",{className:"cdk-title",title:s,children:s})]}),t.jsx("button",{type:"button",className:"cdk-btn",title:"Move to the stage — it opens there and this column closes","aria-label":"Move to the stage",onClick:()=>j(e),children:t.jsx(L,{size:13,strokeWidth:2,"aria-hidden":!0})}),t.jsx("button",{type:"button",className:"cdk-btn",title:"Furl to a spine","aria-label":"Furl to a spine",onClick:()=>w(e),children:t.jsx(R,{size:13,strokeWidth:2,"aria-hidden":!0})}),t.jsx("button",{type:"button",className:"cdk-btn",title:"Close","aria-label":"Close",onClick:()=>g(e),children:t.jsx(A,{size:13,strokeWidth:2,"aria-hidden":!0})})]}),t.jsx("div",{className:"cdk-live",children:N(e)})]},e)})})}export{J as CommsDeck};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as j,j as n}from"./index-
|
|
1
|
+
import{r as j,j as n}from"./index-EsrkGBcv.js";import{e as O,a as R,d as C}from"./comms-gesture-_aGFo6g3.js";import{CommsCanvas as q}from"./CommsCanvas-THp0r_U8.js";import{mapIdentities as A,CommsFlowMap as Y}from"./CommsFlowMap-Vi8ziCPg.js";import{CommsSelection as D}from"./CommsSelection-BUoRbu9o.js";import{k as H,f as L}from"./comms-deck-CBhsXnY-.js";/* empty css */import"./conversations-DoAAO6kA.js";import"./time-Dhsh_2EG.js";import"./use-conversation-list-CY4JciOV.js";import"./machine-scope-DJt9RZ2w.js";import"./api-DSqpVKC7.js";import"./sse-BCPRocpq.js";import"./index-BWHgHrtv.js";import"./agent-master-model-Bk_yuUXJ.js";import"./x-DAehov0E.js";import"./createLucideIcon-zZ8Hx7er.js";import"./panel-right-Bv7sP_fc.js";const $={gutter:20,column:26,head:22,row:30,gap:22,merge:24},P=9e4,g=(t,a=$)=>a.gutter+t*a.column;function T(t,a,l,u){const d=(a+u)/2;return`M ${t} ${a} C ${t} ${d} ${l} ${d} ${l} ${u}`}function _(t,a,l=$){const u=e=>g(e,l),d=[];let r=l.head;for(const e of t)e.gap>P&&d.length&&(d.push({kind:"quiet",ms:e.gap,y:r}),r+=l.gap),d.push({kind:"pass",pass:e,y:r,column:0}),r+=l.row;const s=d.filter(e=>e.kind==="pass"),h=new Map(s.map(e=>[e.pass.id,e])),w=new Map(s.map(e=>[e.pass.message.id,e])),f=new Map;for(const e of s)f.set(e.pass.from.id,e.y);for(const e of a){const c=h.get(e.answer.id),i=f.get(e.waiter.id);c&&i!==void 0&&f.set(e.waiter.id,Math.max(i,c.y+l.merge))}const p=new Map,m=new Set,M=[],y=new Map,N=[],b=(e,c,i,x)=>{let o=0;for(;m.has(o);)o+=1;m.add(o),p.set(e.id,o);const k={key:`rail-${e.id}-${c}`,actor:e,column:o,y0:i?i.y:c,y1:c};return M.push(k),y.set(e.id,[...y.get(e.id)??[],k]),i&&i.column!==o&&N.push({key:`fork-${x}`,d:T(u(i.column),i.y,u(o),c),pass:i.pass,merge:!1}),o};for(const e of s){const c=e.pass;for(const[o,k]of[...p])(f.get(o)??0)<e.y&&(m.delete(k),p.delete(o));let i=p.get(c.from.id);if(i===void 0){const o=c.replyTo?w.get(c.replyTo):void 0,k=o?{column:o.column,y:o.y,pass:o.pass}:null;i=b(c.from,e.y,k,c.id)}e.column=i;const x=y.get(c.from.id)?.at(-1);if(x&&(x.y1=Math.max(x.y1,e.y)),c.kind!=="channel")for(const o of c.audience)o.id===c.from.id||p.has(o.id)||(f.get(o.id)??-1)<e.y||b(o,e.y,{column:i,y:e.y,pass:c},`${c.id}-${o.id}`)}const S=(e,c)=>[...y.get(e)??[]].reverse().find(i=>i.y0<=c)??null,v=[];for(const e of a){const c=h.get(e.opener.id),i=h.get(e.answer.id);if(!c||!i)continue;const x=i.y+l.merge,o=S(e.waiter.id,x);if(!o||o.column===i.column)continue;N.push({key:`merge-${e.askId}`,d:T(u(i.column),i.y,u(o.column),x),pass:e.answer,merge:!0}),o.y1=Math.max(o.y1,x);const k=e.timedOutAt===null?null:s.find(I=>I.pass.kind==="status"&&I.pass.replyTo===e.opener.message.id)?.y??null;v.push({key:`span-${e.askId}`,column:i.column,y0:c.y,y1:i.y,flight:e,timeoutY:k})}const E=s.reduce((e,c)=>Math.max(e,c.column),0)+1;return{rows:d,rails:M,edges:N,spans:v,columns:E,height:r+12}}const F=4.5,B=128;function G(t){const a=new Date(t),l=u=>String(u).padStart(2,"0");return`${l(a.getHours())}:${l(a.getMinutes())}:${l(a.getSeconds())}`}function X(t,a){return["cf-line",t.kind==="status"?"cf-line--status":"",t.kind==="channel"?"cf-line--channel":"",t.inbound?"cf-line--in":"",a?"cf-line--on":""].filter(Boolean).join(" ")}function Q({pass:t}){return n.jsxs(n.Fragment,{children:[t.askId?n.jsx("span",{className:"cf-tag",children:"answer"}):null,t.count>1?n.jsxs("span",{className:"cf-tag",children:["×",t.count]}):null,t.kind==="channel"?n.jsx("span",{className:"cf-tag",children:"to the conversation"}):null]})}function U({passes:t,flights:a,selectedId:l,onSelect:u}){const d=j.useMemo(()=>_(t,a),[t,a]),r=Math.max(B,g(d.columns-1)+22);return d.rows.length===0?n.jsx("div",{className:"cf-graph-empty",children:n.jsx("p",{children:"Nothing has passed between anyone in this window yet."})}):n.jsxs("div",{className:"cf-graph",style:{height:d.height},children:[n.jsxs("svg",{className:"cf-graph-svg",width:r,height:d.height,viewBox:`0 0 ${r} ${d.height}`,"aria-hidden":"true",children:[d.spans.map(s=>n.jsxs("g",{children:[n.jsx("rect",{className:"cf-wait",x:g(s.column)-5,y:s.y0,width:10,height:Math.max(2,s.y1-s.y0),rx:5}),s.timeoutY!==null?n.jsx("line",{className:"cf-timeout",x1:g(s.column)-7,x2:g(s.column)+7,y1:s.timeoutY,y2:s.timeoutY}):null]},s.key)),d.rails.map(s=>n.jsx("line",{className:s.actor.kind==="broker"?"cf-rail cf-rail--dim":"cf-rail",x1:g(s.column),x2:g(s.column),y1:s.y0,y2:s.y1},s.key)),d.edges.map(s=>n.jsx("path",{className:`cf-edge ${X(s.pass,s.pass.id===l)}`,d:s.d},s.key)),d.rows.map(s=>s.kind==="pass"?n.jsx("circle",{className:s.pass.kind==="status"?"cf-dot cf-dot--status":s.pass.inbound?"cf-dot cf-dot--in":s.pass.kind==="channel"?"cf-dot cf-dot--channel":"cf-dot",cx:g(s.column),cy:s.y,r:s.pass.id===l?F+1.5:F},`dot-${s.pass.id}`):null)]}),d.rows.map(s=>s.kind==="quiet"?n.jsxs("div",{className:"cf-quiet",style:{top:s.y-8,left:r},children:[C(s.ms)," quiet"]},`quiet-${s.y}`):n.jsxs("button",{type:"button",className:`cf-row${s.pass.id===l?" cf-row--on":""}`,style:{top:s.y-$.row/2+3,height:$.row-6,paddingLeft:r},onClick:()=>u?.(s.pass.id),"aria-pressed":s.pass.id===l,title:s.pass.message.body,children:[n.jsx("span",{className:"cf-time",children:G(s.pass.at)}),n.jsxs("span",{className:"cf-route",children:[s.pass.from.short,n.jsx("span",{className:"cf-dim",children:" to "}),s.pass.kind==="channel"?"the conversation":s.pass.audience.map(h=>h.short).join(", ")]}),n.jsx("span",{className:`cf-body${s.pass.kind==="status"?" cf-body--status":""}`,children:s.pass.message.body}),n.jsx(Q,{pass:s.pass})]},s.pass.id)),d.spans.map(s=>n.jsx("div",{className:"cf-merge-label",style:{top:s.y1+$.merge-7,left:g(s.column)+9},children:C(s.flight.answer.at-s.flight.opener.at)},`merge-${s.key}`))]})}function V({passes:t,flights:a,identities:l,view:u,rootId:d,selected:r,onSelect:s,onStage:h,beside:w}){const f=j.useMemo(()=>R(t,a),[t,a]),p=j.useMemo(()=>H(r,f),[r,f]),m=r?L(r):null,M=j.useCallback(()=>s(null),[s]);let y;return u==="canvas"?y=n.jsx(q,{passes:t,flights:a,identities:l,rootId:d,focus:p,selectedId:m,onOpen:s}):u==="map"?y=n.jsx(Y,{passes:t,flights:a,identities:l,focus:p,selectedId:m,onOpen:s}):y=n.jsxs(n.Fragment,{children:[n.jsx(U,{passes:t,flights:a,selectedId:r?.kind==="message"?r.passId:null,onSelect:N=>s({kind:"message",passId:N})}),t.length>0&&n.jsxs("div",{className:"cf-legend",children:[n.jsxs("span",{children:[n.jsx("i",{className:"cf-swatch"})," message"]}),n.jsxs("span",{children:[n.jsx("i",{className:"cf-swatch cf-swatch--in"})," addressed to you"]}),n.jsxs("span",{children:[n.jsx("i",{className:"cf-swatch cf-swatch--status"})," broker status"]}),n.jsxs("span",{children:[n.jsx("i",{className:"cf-swatch cf-swatch--wait"})," waiting on an answer"]}),n.jsxs("span",{children:[n.jsx("i",{className:"cf-swatch cf-swatch--fork"})," work forks and merges back"]}),a.length>0&&n.jsxs("span",{className:"cf-dim",children:[a.length," ask",a.length===1?"":"s"," answered in this window"]})]})]}),n.jsxs("div",{className:"cf-surface",children:[n.jsx("div",{className:"cf-pane",children:y}),r?n.jsx(D,{card:r,passes:t,tasks:f,onClear:M,onStage:h,beside:w}):null]})}function fs({messages:t,view:a,participants:l,onStage:u,beside:d}){const[r,s]=j.useState(null);j.useEffect(()=>s(null),[a]);const h=j.useMemo(()=>A(l),[l]),{passes:w,flights:f}=j.useMemo(()=>{const p=t.filter(m=>!!m.actorId).map(m=>({id:m.id,conversationId:m.conversationId,actorId:m.actorId,actorName:m.actorName,body:m.body,createdAt:m.createdAt,class:m.class,metadata:m.metadata??null,replyToMessageId:m.replyToMessageId??null}));return O(p)},[t]);return n.jsx(V,{passes:w,flights:f,identities:h,view:a,selected:r,onSelect:s,onStage:u,beside:d})}export{U as CommsFlowGraph,fs as CommsFlowPane,V as CommsFlowView};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as d,j as e}from"./index-
|
|
1
|
+
import{r as d,j as e}from"./index-EsrkGBcv.js";import{f as b,a as E,c as I,b as y,h as $,d as L,p as w}from"./comms-gesture-_aGFo6g3.js";import{f as B}from"./comms-deck-CBhsXnY-.js";function F(a){return(a.includes("/")?a.slice(a.lastIndexOf("/")+1):a).replace(/^(claude|openai|anthropic)-/i,"")}function f(a){return a.model?.trim()?F(a.model.trim()):a.harness?.trim()||null}function N(a,c){return a.length<=c?a:`${a.slice(0,c-1).trimEnd()}…`}function C({node:a,dim:c,on:r,onHover:n,onOpen:l}){const i=f(a);return e.jsxs("g",{className:["cfm-node",a.hub?"cfm-node--hub":"",c?"cfm-node--dim":"",r?"cfm-node--on":""].filter(Boolean).join(" "),transform:`translate(${a.x} ${a.y})`,onMouseEnter:()=>n(a.id),onMouseLeave:()=>n(null),"aria-label":`${a.actor.short} — ${a.sent} sent, ${a.received} received`,...$(l),children:[e.jsx("title",{children:`${a.actor.short} — ${a.sent} sent, ${a.received} received`}),e.jsx("rect",{className:"cfm-box",x:-62,y:-21,width:124,height:42,rx:6}),e.jsx("text",{className:"cfm-name",x:0,y:i?-3:5,children:N(a.actor.short,17)}),i?e.jsx("text",{className:`cfm-model${a.model?"":" cfm-model--harness"}`,x:0,y:12,children:N(i,20)}):null]})}function T({passes:a,flights:c,identities:r,focus:n,selectedId:l,onOpen:i}){const[m,u]=d.useState(null),x=d.useMemo(()=>E(a,c),[a,c]),t=d.useMemo(()=>I(a,r),[a,r]),k=d.useMemo(()=>y(t),[t]),p=s=>f(r.get(s)??{model:null,harness:null});if(t.nodes.length===0)return e.jsx("p",{className:"cf-graph-empty",children:"Nothing has been exchanged in this window yet."});const v=s=>n?n.has(s):!1,g=s=>m!==null?m===s:n?n.has(s):!0,j=(s,o)=>m!==null?m===s||m===o:n?n.has(s)&&n.has(o):!0,M=t.nodes.length-t.modelsKnown,h=s=>l===B(s);return e.jsxs("div",{className:"cfm",children:[e.jsxs("svg",{className:"cfm-svg",viewBox:`0 0 ${t.width} ${t.height}`,preserveAspectRatio:"xMidYMid meet",role:"img","aria-label":"Who exchanged work with whom in this window",children:[t.edges.map(s=>e.jsxs("g",{className:`cfm-edge${s.inbound?" cfm-edge--in":""}${j(s.from,s.to)?"":" cfm-edge--dim"}`,children:[e.jsx("path",{className:"cfm-edge-line",d:s.d,strokeWidth:s.weight}),e.jsx("path",{className:"cfm-edge-tip",d:"M 0 0 L -7 -3.2 L -7 3.2 Z",transform:`translate(${s.tip.x} ${s.tip.y}) rotate(${s.tip.angle})`}),i?e.jsx("path",{className:"cfm-edge-hit",d:s.d,"aria-label":`${s.count} message${s.count===1?"":"s"} — open`,...$(()=>i({kind:"pair",from:s.from,to:s.to})),children:e.jsx("title",{children:`${s.count} message${s.count===1?"":"s"} — open`})}):null]},s.key)),t.nodes.map(s=>e.jsx(C,{node:s,dim:!g(s.id),on:v(s.id),onHover:u,onOpen:()=>i?.({kind:"actor",actorId:s.id})},s.id))]}),x.length>0&&e.jsx("ol",{className:"cfm-tasks",children:x.map(s=>{const o={kind:"task",askId:s.id};return e.jsx("li",{children:e.jsxs("button",{type:"button",className:`cfm-task${h(o)?" cfm-task--on":""}`,...w(()=>i?.(o)),"aria-current":h(o)?"true":void 0,title:s.title,children:[e.jsx("span",{className:"cfm-task-title",children:s.title}),e.jsxs("span",{className:"cfm-task-who",children:[s.waiter.short,e.jsx("i",{className:"cfm-arrow",children:"→"}),s.worker.short,p(s.worker.id)?e.jsx("i",{className:"cfm-task-ran",children:p(s.worker.id)}):null]}),e.jsx("span",{className:`cfm-task-ms${s.abandoned?" cfm-task-ms--late":""}`,children:L(s.ms)})]})},s.id)})}),e.jsx("ol",{className:"cfm-pairs",children:k.map(s=>{const o={kind:"pair",from:s.from.id,to:s.to.id};return e.jsx("li",{className:j(s.from.id,s.to.id)?"":"cfm-pair--dim",children:e.jsxs("button",{type:"button",className:`cfm-pair${h(o)?" cfm-pair--on":""}`,...w(()=>i?.(o)),"aria-current":h(o)?"true":void 0,onMouseEnter:()=>u(s.from.id),onMouseLeave:()=>u(null),children:[e.jsxs("span",{className:"cfm-pair-who",children:[s.from.actor.short,e.jsx("i",{className:"cfm-arrow",children:"→"}),s.to.actor.short]}),e.jsxs("span",{className:"cfm-pair-models",children:[f(s.from)??"not stated",e.jsx("i",{className:"cfm-arrow",children:"→"}),f(s.to)??"not stated"]}),e.jsx("span",{className:"cfm-pair-count",children:s.count})]})},s.key)})}),e.jsxs("div",{className:"cf-legend",children:[e.jsxs("span",{children:[e.jsx("i",{className:"cf-swatch"})," exchange, thicker with volume"]}),e.jsxs("span",{children:[e.jsx("i",{className:"cf-swatch cf-swatch--in"})," addressed to you"]}),t.broadcasts>0&&e.jsxs("span",{className:"cf-dim",children:[t.broadcasts," to the whole conversation, which is not a pair"]}),e.jsx("span",{className:"cf-dim",children:M===0?`all ${t.nodes.length} name a model`:`${t.modelsKnown} of ${t.nodes.length} name a model; the rest show the harness that ran them`})]})]})}function W(a){const c=new Map;for(const r of a??[]){if(!r.model&&!r.harness)continue;const n=b(r.actorId),l=c.get(n);c.set(n,{model:l?.model??r.model??null,harness:l?.harness??r.harness??null})}return c}export{T as CommsFlowMap,W as mapIdentities};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as l,j as e}from"./index-
|
|
1
|
+
import{r as l,j as e}from"./index-EsrkGBcv.js";/* empty css */import{c as x}from"./conversations-DoAAO6kA.js";import{u as N}from"./use-conversation-list-CY4JciOV.js";import{s as f}from"./agent-master-model-Bk_yuUXJ.js";import{g as b,h as C,i as y,j as E,D as w}from"./comms-deck-CBhsXnY-.js";import{X as v}from"./x-DAehov0E.js";import{P as K}from"./panel-right-Bv7sP_fc.js";import"./time-Dhsh_2EG.js";import"./machine-scope-DJt9RZ2w.js";import"./api-DSqpVKC7.js";import"./sse-BCPRocpq.js";import"./index-BWHgHrtv.js";import"./createLucideIcon-zZ8Hx7er.js";function M(n){const s=new Date(n),i=a=>String(a).padStart(2,"0");return`${i(s.getHours())}:${i(s.getMinutes())}:${i(s.getSeconds())}`}function S({passes:n}){return n.length===0?e.jsx("p",{className:"cdk-empty",children:"Nothing passed between them in this window."}):e.jsx("div",{className:"cdk-body",children:n.map(s=>e.jsxs("article",{className:["cdk-msg",s.inbound?"cdk-msg--in":"",s.kind==="status"?"cdk-msg--status":""].filter(Boolean).join(" "),children:[e.jsxs("header",{className:"cdk-msg-head",children:[e.jsx("span",{className:"cdk-msg-from",children:s.from.short}),e.jsxs("span",{className:"cdk-msg-to",children:["to ",s.kind==="channel"?"the conversation":s.audience.map(i=>i.short).join(", ")]}),s.count>1?e.jsxs("span",{className:"cdk-msg-tag",children:["×",s.count]}):null,e.jsx("span",{className:"cdk-msg-at",children:M(s.at)})]}),e.jsx("p",{className:"cdk-msg-body",children:s.message.body})]},s.id))})}function _({card:n,passes:s,tasks:i,onClear:a,onStage:u,beside:d}){const m=l.useMemo(()=>b(s),[s]),k=l.useCallback(t=>m.get(t)??t,[m]),h=C(n,i,s,k),g=l.useMemo(()=>y(n,s,i),[n,s,i]),r=l.useMemo(()=>E(n,s,i),[n,s,i]),{sessions:p}=N(),j=t=>{const c=p.find(o=>f(o,t));return c?x(c):t};return l.useEffect(()=>{const t=c=>{if(c.key!=="Escape"||c.defaultPrevented)return;const o=c.target;o&&(o.tagName==="TEXTAREA"||o.tagName==="INPUT"||o.isContentEditable)||a()};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[a]),e.jsxs("aside",{className:"csl","aria-label":"Selection",children:[e.jsxs("header",{className:"cdk-head",children:[e.jsxs("span",{className:"cdk-ident",children:[e.jsxs("span",{className:"cdk-kicker",children:["Selected · ",w[n.kind]]}),e.jsx("span",{className:"cdk-title",title:h,children:h})]}),e.jsx("button",{type:"button",className:"cdk-btn",title:"Clear the selection (Esc)","aria-label":"Clear the selection",onClick:a,children:e.jsx(v,{size:13,strokeWidth:2,"aria-hidden":!0})})]}),r.length>0?e.jsxs("div",{className:"csl-in",children:[e.jsx("span",{className:"csl-in-label",children:r.length===1?"In":`In ${r.length} conversations`}),r.map(t=>{const c=d?.has(t)??!1;return e.jsxs("span",{className:"csl-conv",children:[e.jsx("button",{type:"button",className:"csl-conv-open",title:"Open this conversation on the stage",onClick:()=>u(t),children:j(t)}),d?e.jsx("button",{type:"button",className:`cdk-btn${c?" cdk-btn--on":""}`,title:c?"Close the column beside the stage":"Keep this conversation beside the stage","aria-label":c?"Close beside":"Keep beside","aria-pressed":c,onClick:()=>d.toggle(t),children:e.jsx(K,{size:12,strokeWidth:2,"aria-hidden":!0})}):null]},t)})]}):null,e.jsx(S,{passes:g})]})}export{_ as CommsSelection,S as DeckMessages};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as n,j as a}from"./index-EsrkGBcv.js";import{isRoutableMediaFile as N,readClipboardMediaFiles as D,dataTransferMayContainFiles as b,readRoutableFiles as M}from"./media-blobs-Bi8pxr1u.js";import{F as S}from"./file-text-CnISiiw6.js";const j="Only markdown, code, images, and video clips can be attached.";function y(){const[e,r]=n.useState([]),[c,i]=n.useState(null),[u,l]=n.useState(null),[p,h]=n.useState(0),o=n.useRef(null),g=n.useCallback((t,s="Attached")=>{const m=t.filter(N);return m.length===0?(t.length>0&&l(j),0):(l(null),r(x=>{const C=new Set(x.map(d=>`${d.name}:${d.size}:${d.lastModified}`)),f=m.filter(d=>!C.has(`${d.name}:${d.size}:${d.lastModified}`));return f.length>0?[...x,...f]:x}),i(m.length===1?`${s} ${m[0]?.name??"1 attachment"}.`:`${s} ${m.length} attachments.`),m.length)},[]),$=n.useCallback(t=>{r(s=>s.filter(m=>m!==t)),i(null)},[]),k=n.useCallback(()=>{r([]),i(null),l(null),h(0)},[]),v=n.useCallback(()=>{o.current?.click()},[]),F=n.useCallback(t=>{const s=D(t.clipboardData);s.length!==0&&(t.preventDefault(),g(s,"Pasted"))},[g]),R=n.useMemo(()=>({onDragOver:t=>{b(t.dataTransfer)&&(t.preventDefault(),h(s=>s===0?1:s))},onDragLeave:t=>{t.currentTarget.contains(t.relatedTarget)||h(0)},onDrop:t=>{if(!b(t.dataTransfer))return;t.preventDefault(),h(0);const s=M(t.dataTransfer);if(s.length===0){l(j);return}g(s,"Dropped")}}),[g]);return{files:e,hasFiles:e.length>0,feedback:c,error:u,dragActive:p>0,stage:g,remove:$,clear:k,setError:l,openPicker:v,dropHandlers:R,onPaste:F,inputRef:o}}function T(e){if(e<1024)return`${e} B`;const r=e/1024;return r<1024?`${r.toFixed(0)} KB`:`${(r/1024).toFixed(1)} MB`}function z(e){return(e.split(".").pop()?.toUpperCase()??"FILE").slice(0,4)}function E({file:e,onRemove:r}){const c=n.useMemo(()=>URL.createObjectURL(e),[e]);n.useEffect(()=>()=>URL.revokeObjectURL(c),[c]);const i=e.type.startsWith("video/"),u=e.type.startsWith("image/"),l=z(e.name),p=T(e.size);return a.jsxs("div",{className:"s-msg-compose-attachment surface-card surface-card--inset",children:[i?a.jsx("video",{src:c,muted:!0,playsInline:!0}):u?a.jsx("img",{src:c,alt:e.name}):a.jsxs("div",{className:"s-msg-compose-attachment-file",title:`${e.name} (${p})`,children:[a.jsxs("div",{className:"s-msg-compose-attachment-file-icon",children:[a.jsx(S,{size:16,"aria-hidden":"true"}),a.jsx("span",{className:"s-msg-compose-attachment-ext label-xs",children:l})]}),a.jsx("span",{className:"s-msg-compose-attachment-name",children:e.name}),a.jsx("span",{className:"s-msg-compose-attachment-size label-xs text-dim",children:p})]}),a.jsx("button",{type:"button",className:"s-msg-compose-attachment-remove btn btn--ghost btn--icon","aria-label":`Remove ${e.name}`,title:`Remove ${e.name}`,onClick:r,children:"×"})]})}function B({attachments:e,accept:r="image/*,video/*,text/markdown,.md,.markdown,text/plain,.txt"}){const{files:c,feedback:i,error:u,remove:l,stage:p,inputRef:h}=e;return a.jsxs(a.Fragment,{children:[a.jsx("input",{ref:h,type:"file",multiple:!0,accept:r,className:"s-msg-compose-file-input",onChange:o=>{p([...o.target.files??[]]),o.target.value=""}}),c.length>0?a.jsx("div",{className:"s-msg-compose-attachments","aria-label":"Staged attachments",children:c.map(o=>a.jsx(E,{file:o,onRemove:()=>l(o)},`${o.name}:${o.size}:${o.lastModified}`))}):null,u?a.jsx("div",{className:"s-msg-compose-attach-note","data-tone":"error",role:"alert",children:u}):i?a.jsx("div",{className:"s-msg-compose-attach-note","data-tone":"muted",role:"status",children:i}):null]})}export{B as C,y as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as s}from"./index-EsrkGBcv.js";import{A as J}from"./AgentAvatar-CrP1eXxk.js";import{M as T}from"./runtime-picker-DXu2bOTh.js";import{M as $}from"./NewChatComposer-C97-iTMK.js";import{C as V}from"./ComposerAttachments-DW0AIb8k.js";import"./index-724SdE6r.js";import{c as z}from"./createLucideIcon-zZ8Hx7er.js";import{Z as Y}from"./zap-CEjZNZbI.js";import{X as M}from"./x-DAehov0E.js";import"./Provider-C35yu29I.js";import"./theme-vars-DNK0nn3k.js";import"./provider-Dojd8quC.js";import"./router-DCtl8wqb.js";import"./api-DSqpVKC7.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-3RfJpen8.js";import"./machine-scope-DJt9RZ2w.js";import"./sse-BCPRocpq.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./agent-state-DDhnFEEP.js";import"./scoutbot-Bk3nyrkj.js";import"./model-CBkMvT1w.js";import"./time-Dhsh_2EG.js";import"./DocumentFocusViewer-DJr0v0D_.js";import"./TextDocumentSurface-D52m7Vd8.js";import"./file-text-CnISiiw6.js";import"./index-CHD0qcfL.js";import"./chevron-right-DrfqcerI.js";import"./folder-D5prSkzz.js";import"./chevron-up-CETZJzjV.js";import"./code-xml-BhcNbLWU.js";import"./arrow-left-MVUKauwQ.js";import"./arrow-right-Bp-FpE5V.js";import"./scout-voice-CZx60X6E.js";import"./fx-z37u1o2z.js";import"./voice-turn-ledger-BMZxlSjg.js";import"./keyboard-nav-DDHegDbx.js";import"./media-blobs-Bi8pxr1u.js";import"./chunk-HRAB3GC3-DbVLgbWX.js";import"./SpriteAvatar-CpZWf54-.js";import"./CrewAvatar-kTznzqcO.js";import"./HarnessMark-C4naWc16.js";import"./colors-CFlbwC25.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-OvccU82H.js";import"./conversation-model-FxDeWlle.js";import"./conversations-DoAAO6kA.js";import"./NewChatOrigin-DFbF_XvR.js";import"./chevron-down-l1mrh5S9.js";import"./search-DT42oyRW.js";const S=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],ee=z("pencil",S);const se=[["path",{d:"M20 18v-2a4 4 0 0 0-4-4H4",key:"5vmcpk"}],["path",{d:"m9 17-5-5 5-5",key:"nvlc11"}]],te=z("reply",se);function es({composeRef:P,draft:N,setDraft:R,composePlaceholder:K,slashState:n,setSlashState:b,filteredSlashCommands:r,applySlashCommand:w,mentionState:a,setMentionState:j,filteredMentions:i,applyMention:f,updateTriggersFromDraft:v,closeSuggestions:y,replyTarget:u,onCancelReply:H,isStopMode:L,sending:p,composeAction:_,onSend:I,onInterrupt:W,attachments:c,isAgentBusy:D,busyIntent:k,onBusyIntentChange:C,queued:l,queueNote:F,onEditQueued:O,editingQueuedId:m,editingAttachmentCount:h,onCancelEdit:Q,onUnqueue:Z,onSendQueuedNow:U}){const X=s.jsxs(s.Fragment,{children:[n.open?s.jsx($,{label:"Slash commands",items:r.map(e=>({id:e.command,token:e.label,description:e.description})),activeIndex:n.index,onPick:e=>{const t=r[e];t&&w(t)},onActiveIndexChange:e=>b(t=>({...t,index:e}))}):null,a.open?s.jsx($,{label:"Mention agent",items:i.map(e=>({id:e.id,token:`@${e.handle}`,description:e.name,avatarNode:s.jsx(J,{name:e.name,size:20,tile:!0,presence:!1})})),activeIndex:a.index,onPick:e=>{const t=i[e];t&&f(t)},onActiveIndexChange:e=>j(t=>({...t,index:e}))}):null]}),B=N.trim().length>0,x=m!==null,q=B||c.hasFiles||h>0,g=D&&q,d=g&&k==="steer",A=x?l.findIndex(e=>e.id===m)+1:0,E=g?s.jsxs("div",{className:"s-msg-compose-mode",role:"group","aria-label":"What Send does while this turn is running",children:[s.jsx("button",{type:"button",className:"s-msg-compose-mode-btn","data-mode":"queue","aria-pressed":k==="queue",title:"Hold this draft until the running turn lands",disabled:p,onClick:()=>C("queue"),children:"Queue"}),s.jsx("button",{type:"button",className:"s-msg-compose-mode-btn","data-mode":"steer","aria-pressed":k==="steer",title:"Interrupt the running turn and deliver this now",disabled:p,onClick:()=>C("steer"),children:"Steer"})]}):null,G=l.length>0||E?s.jsxs("div",{className:"s-msg-compose-queue",role:"group","aria-label":"Queued messages",children:[s.jsxs("div",{className:"s-msg-compose-queue-head",children:[s.jsx("span",{className:"s-msg-compose-queue-kicker",children:l.length>0?`Queue · ${l.length}`:"Queues next"}),s.jsx("span",{className:"s-msg-compose-queue-hint",children:x?d?`Rewriting ${A} — send interrupts this turn`:`Rewriting ${A} — send returns it to its place`:l.length>0?d?"Send interrupts this turn":F??"":d?"Interrupts this turn on send":"Sends when this turn lands"}),E]}),l.map((e,t)=>s.jsxs("div",{className:"s-msg-compose-queue-row","data-editing":e.id===m?"true":void 0,children:[s.jsx("span",{className:"s-msg-compose-queue-index",children:t+1}),s.jsx("span",{className:"s-msg-compose-queue-body",children:e.body.trim()||"Attachments only"}),e.attachments.length>0?s.jsxs("span",{className:"s-msg-compose-queue-clip",children:[e.attachments.length," file",e.attachments.length===1?"":"s"]}):null,e.id===m?s.jsx("button",{type:"button",className:"s-msg-compose-queue-edit btn btn--sm btn--ghost",title:"Stop rewriting — leave this row as it was","aria-label":`Cancel rewriting queued message ${t+1}`,onClick:Q,children:"Cancel edit"}):s.jsxs("button",{type:"button",className:"s-msg-compose-queue-edit btn btn--sm btn--ghost",title:"Pull this back into the input box to rewrite it","aria-label":`Edit queued message ${t+1}`,disabled:p||x,onClick:()=>O(e.id),children:[s.jsx(ee,{size:11,"aria-hidden":"true"}),s.jsx("span",{children:"Edit"})]}),s.jsxs("button",{type:"button",className:"s-msg-compose-queue-now btn btn--sm btn--accent",title:"Interrupt this turn and send this now","aria-label":`Send queued message ${t+1} now`,disabled:p||e.id===m,onClick:()=>U(e.id),children:[s.jsx(Y,{size:11,"aria-hidden":"true"}),s.jsx("span",{children:"Send now"})]}),s.jsx("button",{type:"button",className:"s-msg-compose-queue-drop btn btn--ghost btn--icon",title:"Cancel — drop this from the queue","aria-label":`Cancel queued message ${t+1}`,onClick:()=>Z(e.id),children:"×"})]},e.id))]}):null;return s.jsx(T,{density:"thread",value:N,onChange:(e,t)=>{R(e),v(e,t?.caret??e.length)},onSend:I,placeholder:K,sending:p,stopMode:L,onStop:W,canSend:q,sendTitle:d?"Steer — interrupt this turn and send now (Cmd+Enter)":g?"Queue for the next turn (Cmd+Enter)":"Send (Cmd+Enter)",sendAriaLabel:d?"Steer — interrupt this turn and send now (Cmd+Enter)":g?"Queue message for the next turn (Cmd+Enter)":_==="steer"?"Send follow-up (Cmd+Enter)":"Send message (Cmd+Enter)",showAttach:!0,onAttach:c.openPicker,onPaste:c.onPaste,dropHandlers:c.dropHandlers,dragActive:c.dragActive,textareaRef:P,overlay:X,above:G,aboveAttached:!0,header:s.jsxs(s.Fragment,{children:[u?s.jsxs("div",{className:"s-thread-compose-reply surface-card surface-card--inset",role:"status",children:[s.jsx(te,{className:"s-thread-compose-reply-icon text-muted",size:13,strokeWidth:1.8,"aria-hidden":"true"}),s.jsx("span",{className:"s-thread-compose-reply-label label-xs text-muted",children:"Replying to"}),s.jsx("span",{className:"s-thread-compose-reply-actor chip chip--sm chip--mono chip--neutral",children:u.actorLabel}),s.jsx("span",{className:"s-thread-compose-reply-preview text-muted",title:u.preview,children:u.preview}),s.jsx("button",{type:"button",className:"s-thread-compose-reply-cancel btn btn--ghost btn--icon","aria-label":"Cancel reply",title:"Cancel reply",onClick:H,children:s.jsx(M,{size:13,strokeWidth:1.8,"aria-hidden":"true"})})]}):null,x&&h>0?s.jsxs("div",{className:"s-msg-compose-carried",role:"status",children:[h," file",h===1?"":"s"," stay attached to this draft"]}):null,s.jsx(V,{attachments:c})]}),tools:s.jsxs("span",{className:"s-thread-compose-hint s-msg-compose-tools-hint",children:[s.jsx("kbd",{className:"s-kbd",children:"/"})," commands"," · ",s.jsx("kbd",{className:"s-kbd",children:"@"})," agents"]}),onSelect:e=>{const t=e.currentTarget;v(t.value,t.selectionStart)},onBlur:()=>{setTimeout(y,120)},onKeyDown:e=>{if(!(n.open&&r.length>0||a.open&&i.length>0))return!1;if(e.key==="ArrowDown")return n.open?b(o=>({...o,index:(o.index+1)%r.length})):a.open&&j(o=>({...o,index:(o.index+1)%i.length})),!0;if(e.key==="ArrowUp")return n.open?b(o=>({...o,index:(o.index-1+r.length)%r.length})):a.open&&j(o=>({...o,index:(o.index-1+i.length)%i.length})),!0;if(e.key==="Escape")return y(),!0;if((e.key==="Enter"||e.key==="Tab")&&!e.shiftKey&&!e.metaKey&&!e.ctrlKey&&!e.altKey){if(n.open){const o=r[n.index]??r[0];o&&w(o)}else if(a.open){const o=i[a.index]??i[0];o&&f(o)}return!0}return!1}})}export{es as ConversationComposer};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as t}from"./index-EsrkGBcv.js";import{M as p}from"./message-markup-Zwo3t4cI.js";import{f as d}from"./conversation-model-FxDeWlle.js";import{t as n}from"./time-Dhsh_2EG.js";import"./message-markup-BQW5jdJw.js";import"./mentions-ByUvhS-v.js";import"./colors-CFlbwC25.js";import"./agent-state-DDhnFEEP.js";import"./index-724SdE6r.js";import"./api-DSqpVKC7.js";import"./Provider-C35yu29I.js";import"./theme-vars-DNK0nn3k.js";import"./provider-Dojd8quC.js";import"./router-DCtl8wqb.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-3RfJpen8.js";import"./machine-scope-DJt9RZ2w.js";import"./sse-BCPRocpq.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-Bk3nyrkj.js";import"./NewChatComposer-C97-iTMK.js";import"./runtime-picker-DXu2bOTh.js";import"./scout-voice-CZx60X6E.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-OvccU82H.js";import"./createLucideIcon-zZ8Hx7er.js";import"./media-blobs-Bi8pxr1u.js";import"./HarnessMark-C4naWc16.js";import"./NewChatOrigin-DFbF_XvR.js";import"./keyboard-nav-DDHegDbx.js";import"./x-DAehov0E.js";import"./chevron-down-l1mrh5S9.js";import"./search-DT42oyRW.js";import"./file-text-CnISiiw6.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-DJr0v0D_.js";import"./TextDocumentSurface-D52m7Vd8.js";import"./index-CHD0qcfL.js";import"./chevron-right-DrfqcerI.js";import"./folder-D5prSkzz.js";import"./chevron-up-CETZJzjV.js";import"./code-xml-BhcNbLWU.js";import"./arrow-left-MVUKauwQ.js";import"./arrow-right-Bp-FpE5V.js";import"./voice-turn-ledger-BMZxlSjg.js";import"./chunk-HRAB3GC3-DbVLgbWX.js";import"./AgentDetailCard-DtHT3sCo.js";import"./AgentLiveActions-CfTupTEl.js";import"./terminal-takeover-Ay5C2c-M.js";import"./openContent-C6XO6kr5.js";import"./eye-LrO-cXQt.js";import"./terminal-hQKQygcf.js";import"./conversations-DoAAO6kA.js";function l({at:i}){const r=d(i);return t.jsxs("div",{className:"s-thread-day-divider","aria-label":r,children:[t.jsx("span",{className:"s-thread-day-line","aria-hidden":"true"}),t.jsx("span",{className:"s-thread-day-label",children:r}),t.jsx("span",{className:"s-thread-day-line","aria-hidden":"true"})]})}function ht({row:i,expanded:r,showDayDivider:e,onToggle:s}){const m=`${i.recipients.length} recipients`;return t.jsxs("div",{className:["s-thread-feed-block","s-thread-fanout",e&&"s-thread-feed-block--full-width"].filter(Boolean).join(" "),children:[e&&t.jsx(l,{at:i.createdAt}),i.messages.map(a=>t.jsx("span",{id:`msg-${a.id}`,className:"s-thread-fanout-anchor","aria-hidden":"true"},a.id)),t.jsxs("button",{type:"button",className:"s-thread-fanout-summary","aria-expanded":r,onClick:s,title:i.recipients.join(", "),children:[t.jsx("span",{className:"s-thread-fanout-caret","aria-hidden":"true",children:r?"▾":"▸"}),t.jsx("span",{className:"s-thread-fanout-label",children:m}),t.jsx("span",{className:"s-thread-fanout-time",children:n(i.createdAt)})]}),r&&t.jsxs("div",{className:"s-thread-fanout-detail",children:[t.jsx("ul",{className:"s-thread-fanout-recipients",children:i.messages.map((a,o)=>t.jsx("li",{className:"s-thread-fanout-recipient",children:i.recipients[o]},a.id))}),t.jsx("div",{className:"s-thread-fanout-body",children:t.jsx(p,{text:i.messages[0].body})})]})]})}export{ht as FanOutRow,l as ThreadDayDivider};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as S,j as e,H as Z}from"./index-EsrkGBcv.js";import{c as M}from"./clipboard-e3fSpeo7.js";import{d as ee}from"./router-DCtl8wqb.js";import{A as P}from"./AgentAvatar-CrP1eXxk.js";import{H as te}from"./HarnessMark-C4naWc16.js";import{a as se}from"./Provider-C35yu29I.js";import{n as ne,c as ae}from"./agent-state-DDhnFEEP.js";import{B as re}from"./BackToPicker-CUkjnoVk.js";import{o as _}from"./openContent-C6XO6kr5.js";import{AstronautSuit as oe}from"./AstronautSuit-Cchnc4Ug.js";import{n as ie,o as le}from"./conversation-model-FxDeWlle.js";import{E as ce}from"./eye-LrO-cXQt.js";import{P as de}from"./panel-right-Bv7sP_fc.js";import{c as me}from"./createLucideIcon-zZ8Hx7er.js";import"./api-DSqpVKC7.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-3RfJpen8.js";import"./SpriteAvatar-CpZWf54-.js";import"./CrewAvatar-kTznzqcO.js";import"./runtime-picker-DXu2bOTh.js";import"./scout-voice-CZx60X6E.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-OvccU82H.js";import"./colors-CFlbwC25.js";import"./theme-vars-DNK0nn3k.js";import"./provider-Dojd8quC.js";import"./machine-scope-DJt9RZ2w.js";import"./sse-BCPRocpq.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-Bk3nyrkj.js";import"./NewChatComposer-C97-iTMK.js";import"./media-blobs-Bi8pxr1u.js";import"./index-724SdE6r.js";import"./NewChatOrigin-DFbF_XvR.js";import"./keyboard-nav-DDHegDbx.js";import"./x-DAehov0E.js";import"./chevron-down-l1mrh5S9.js";import"./search-DT42oyRW.js";import"./file-text-CnISiiw6.js";import"./model-CBkMvT1w.js";import"./time-Dhsh_2EG.js";import"./DocumentFocusViewer-DJr0v0D_.js";import"./TextDocumentSurface-D52m7Vd8.js";import"./index-CHD0qcfL.js";import"./chevron-right-DrfqcerI.js";import"./folder-D5prSkzz.js";import"./chevron-up-CETZJzjV.js";import"./code-xml-BhcNbLWU.js";import"./arrow-left-MVUKauwQ.js";import"./arrow-right-Bp-FpE5V.js";import"./voice-turn-ledger-BMZxlSjg.js";import"./chunk-HRAB3GC3-DbVLgbWX.js";import"./conversations-DoAAO6kA.js";const he=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]],pe=me("user-plus",he),Y=150,B=320,ue=1.4,xe=1.1,G=5,fe=22,J=5200,ve=1,ge=1200;function je(n){S.useEffect(()=>{const s=n.current;if(!s||window.matchMedia?.("(prefers-reduced-motion: reduce)").matches)return;let i=[],r=[],d=-9999,x=-9999,m=0;const c=()=>{i=[],r=[],s.querySelectorAll(".sprite-cell--eye circle").forEach(o=>{const a=o.getBoundingClientRect();if(!a.width)return;const u=o.closest("[data-state]");i.push({el:o,cx:a.left+a.width/2,cy:a.top+a.height/2,working:u?.dataset.state==="in_flight"})}),s.querySelectorAll(".s-thread-participant-avatar svg").forEach(o=>{const a=o.getBoundingClientRect();a.width&&r.push({el:o,cx:a.left+a.width/2,cy:a.top+a.height/2})})},E=o=>o<Y?1:o>B?0:(B-o)/(B-Y),j=o=>{for(const a of i){const u=d-a.cx,y=x-a.cy,p=Math.hypot(u,y),v=E(p),b=p<1?1:p;let A=u/b*ue*v;const L=y/b*xe*v;if(a.working&&v<1){const w=o%J/J;A+=Math.sin(w*Math.PI*2)*ve*(1-v)}a.el.style.transform=`translate(${A.toFixed(2)}px, ${L.toFixed(2)}px)`}for(const a of r){const u=d-a.cx,y=Math.hypot(u,x-a.cy),p=E(y),v=Math.max(-G,Math.min(G,u/fe))*p;a.el.style.transform=v===0?"":`rotate(${v.toFixed(2)}deg)`}m=requestAnimationFrame(j)},f=o=>{d=o.clientX,x=o.clientY};c();const h=window.setInterval(c,ge);return m=requestAnimationFrame(j),window.addEventListener("resize",c),document.addEventListener("pointermove",f,{passive:!0}),()=>{cancelAnimationFrame(m),window.clearInterval(h),window.removeEventListener("resize",c),document.removeEventListener("pointermove",f);for(const o of i)o.el.style.transform="";for(const o of r)o.el.style.transform=""}},[n])}function I(n,s,i){const r=i?Z[i.trim().toLowerCase()]:void 0;return{"--fp-z":String(n-s),"--fp-i":String(s),...r==null?{}:{"--fp-suit-hue":String(r)}}}function be(n){if(n<1e3)return String(n);const s=n/1e3;return s<10?`${s.toFixed(1).replace(/\.0$/,"")}k`:`${Math.round(s)}k`}function T({name:n,runtime:s,state:i,action:r}){return e.jsxs("span",{className:"s-thread-participant-card","aria-hidden":"true",children:[e.jsx("strong",{children:n}),s?e.jsx("span",{children:s}):null,e.jsx("span",{children:i}),r?e.jsx("span",{className:"s-thread-participant-card-action",children:r}):null]})}function H({count:n,className:s,style:i,rosterId:r,expanded:d,onClick:x}){const m=`${n} more participant${n===1?"":"s"}`;return e.jsx("button",{type:"button",className:`s-thread-participant s-thread-participant--button ${s}`,style:i,"aria-label":`${m}; open participant list`,"aria-haspopup":"dialog","aria-controls":r,"aria-expanded":d,onClick:x,children:e.jsxs("span",{className:"s-thread-participant-face s-thread-participant-face--overflow",children:["+",be(n)]})})}const ye=[{id:"thread",label:"Thread",hint:"The conversation in order"},{id:"flow",label:"Flow",hint:"Who asked whom, who waited, and where the work branched"},{id:"map",label:"Map",hint:"Who exchanges work with whom, and on which model"},{id:"canvas",label:"Canvas",hint:"The same window laid out left to right, with nobody folded away"}];function Nt({showBackNav:n,backLabel:s,isDm:i,navigate:r,route:d,canonicalConversationId:x,threadTitle:m,agentId:c,sessionId:E,detailRoute:j,participants:f,operator:h,canAddParticipants:o,onToggleAddParticipant:a,view:u,onChangeView:y,beside:p}){const v=se(),b=ee(d),A=S.useRef(null),L=S.useRef(null),w=S.useId(),[N,C]=S.useState(!1);je(A);const $=f.slice(0,3),z=Math.max(f.length-$.length,0),U=Math.max(f.length-2,0),W=Math.max(f.length-1,0),k=$.length+(z>0?1:0)+(h.active?1:0);S.useEffect(()=>{if(!N)return;const t=g=>{L.current?.contains(g.target)||C(!1)},l=g=>{g.key==="Escape"&&C(!1)};return document.addEventListener("mousedown",t),document.addEventListener("keydown",l),()=>{document.removeEventListener("mousedown",t),document.removeEventListener("keydown",l)}},[N]);const O=t=>t.agent?{view:"agents-v2",agentId:t.agent.id,...b?{machineId:b}:{}}:t.sessionId?{view:"sessions",sessionId:t.sessionId,...b?{machineId:b}:{}}:null,q=t=>{const l=O(t);l&&(C(!1),_(r,l,{returnTo:d}))};return e.jsxs("div",{className:"s-thread-center-header",onClick:t=>{t.target?.closest("button,a,input,select,textarea")||!i||!j||_(r,j,{returnTo:d})},style:i&&j?{cursor:"pointer"}:void 0,onContextMenu:t=>{const l=[{kind:"action",label:"Copy Title",onSelect:()=>{M(m)}}];c&&l.push({kind:"action",label:"Copy Agent ID",onSelect:()=>{M(c)}}),!c&&E&&l.push({kind:"action",label:"Copy Session ID",onSelect:()=>{M(E)}}),l.push({kind:"action",label:"Copy Conversation ID",onSelect:()=>{M(x)}}),v(t,l)},children:[n&&e.jsx(re,{slot:"conversation",fallback:{view:"inbox"},navigate:r,label:s??"Back",className:"s-thread-header-back"}),e.jsx("div",{className:"s-thread-center-header-info",children:i&&j?e.jsx("button",{type:"button",className:"s-thread-center-header-name",title:`Open ${m} details`,onClick:()=>_(r,j,{returnTo:d}),children:m}):e.jsx("span",{className:"s-thread-center-header-name",title:m,children:m})}),e.jsxs("div",{className:"s-thread-center-header-right",children:[e.jsx("div",{className:"s-thread-view-toggle",role:"group","aria-label":"Conversation view",children:ye.map(t=>e.jsx("button",{type:"button",className:`s-thread-view-option${u===t.id?" s-thread-view-option--on":""}`,"aria-pressed":u===t.id,title:t.hint,onClick:()=>y(t.id),children:t.label},t.id))}),f.length>0&&e.jsxs("div",{className:"s-thread-participants",ref:t=>{A.current=t,L.current=t},"aria-label":"Conversation participants",children:[$.map((t,l)=>{const g=[t.harness,t.model,t.reasoningEffort].filter(Boolean).join(" · ")||null,F=t.agent?ne(t.agent.state??null,t.agent):null,D=t.agent?ae(t.agent.state??null,t.agent):"Session participant",V=O(t),X=V?t.agent?"Open profile":"Open session":null,Q=[t.name,g,D,X].filter(Boolean).join(", "),K=e.jsxs(e.Fragment,{children:[e.jsxs("span",{className:"s-thread-participant-face",children:[e.jsx(oe,{}),e.jsx(P,{agent:t.agent??void 0,name:t.name,placement:"turn",size:28,className:"s-thread-participant-avatar",gaze:"pointer"})]}),t.harness?e.jsx(te,{harness:t.harness,size:9,className:"s-thread-participant-harness",title:null}):null,e.jsx(T,{name:t.name,runtime:g,state:D,action:X})]}),R={className:"s-thread-participant",style:I(k,l,t.harness),"data-state":F??void 0,"data-compact-hidden":l>=2?"true":void 0,"data-narrow-hidden":l>=1?"true":void 0,"aria-label":Q};return V?e.jsx("button",{type:"button",...R,className:`${R.className} s-thread-participant--button`,onClick:()=>q(t),children:K},t.id):e.jsx("span",{...R,role:"group",tabIndex:0,children:K},t.id)}),z>0?e.jsx(H,{count:z,className:"s-thread-participant--desktop-overflow",style:I(k,$.length),rosterId:w,expanded:N,onClick:()=>C(t=>!t)}):null,U>0?e.jsx(H,{count:U,className:"s-thread-participant--compact-overflow",style:I(k,2),rosterId:w,expanded:N,onClick:()=>C(t=>!t)}):null,W>0?e.jsx(H,{count:W,className:"s-thread-participant--narrow-overflow",style:I(k,1),rosterId:w,expanded:N,onClick:()=>C(t=>!t)}):null,h.active?e.jsxs("span",{className:"s-thread-participant s-thread-participant--operator",style:I(k,k-1),role:"group",tabIndex:0,"aria-label":`${h.name}, you, in this conversation`,children:[e.jsx("span",{className:"s-thread-participant-face",children:e.jsx(P,{name:h.name,placement:"turn",size:28,className:"s-thread-participant-avatar",gaze:"pointer"})}),e.jsx(T,{name:`${h.name} (you)`,runtime:null,state:"In this conversation",action:null})]}):e.jsxs("span",{className:"s-thread-participant-observer",role:"group",tabIndex:0,"aria-label":`${h.name}, observing, not in this conversation`,children:[e.jsx(ce,{size:15,strokeWidth:1.9,"aria-hidden":"true"}),e.jsx(T,{name:h.name,runtime:null,state:"Observing, not in this conversation",action:null})]}),N?e.jsxs("div",{id:w,className:"s-thread-participant-roster",role:"dialog","aria-label":"Conversation participants",onClick:t=>t.stopPropagation(),children:[e.jsx("strong",{className:"s-thread-participant-roster-title",children:"Participants"}),e.jsxs("div",{className:"s-thread-participant-roster-list",children:[f.map(t=>{const l=O(t),g=[t.harness,t.model].filter(Boolean).join(" · "),F=e.jsxs(e.Fragment,{children:[e.jsx(P,{agent:t.agent??void 0,name:t.name,placement:"turn",size:24,className:"s-thread-participant-roster-avatar"}),e.jsxs("span",{children:[e.jsx("strong",{children:t.name}),g?e.jsx("small",{children:g}):null]})]});return l?e.jsx("button",{type:"button",className:"s-thread-participant-roster-row",onClick:()=>q(t),children:F},t.id):e.jsx("div",{className:"s-thread-participant-roster-row",children:F},t.id)}),h.active?e.jsxs("div",{className:"s-thread-participant-roster-row",children:[e.jsx(P,{name:h.name,placement:"turn",size:24,className:"s-thread-participant-roster-avatar"}),e.jsxs("span",{children:[e.jsxs("strong",{children:[h.name," (you)"]}),e.jsx("small",{children:"Operator"})]})]}):null]})]}):null]}),p&&e.jsx("button",{type:"button",className:`s-thread-add-participant-trigger${p.on?" is-on":""}`,onClick:p.toggle,title:p.on?"Close the column beside the stage":"Keep this conversation beside the stage","aria-label":p.on?"Close beside":"Keep beside","aria-pressed":p.on,children:e.jsx(de,{size:14,strokeWidth:1.9,"aria-hidden":"true"})}),o&&e.jsx("button",{type:"button",className:"s-thread-add-participant-trigger",onClick:a,title:"Add participant","aria-label":"Add participant",children:e.jsx(pe,{size:14,strokeWidth:1.9,"aria-hidden":"true"})})]})]})}function Ct({canonicalConversationId:n,conversationAlias:s}){return e.jsxs("div",{className:"s-thread-identity-row",children:[e.jsxs("button",{type:"button",className:"s-thread-identity-chip",title:n,onClick:()=>{M(n)},children:[e.jsx("span",{children:ie()}),e.jsx("strong",{children:le(n)})]}),s&&e.jsxs("span",{className:"s-thread-identity-chip",title:s,children:[e.jsx("span",{children:"Alias"}),e.jsx("strong",{children:s})]})]})}function kt({agents:n,addParticipantId:s,setAddParticipantId:i,addingParticipant:r,addParticipantError:d,onCancel:x,onSubmit:m}){return e.jsxs("form",{className:"s-thread-add-participant",onSubmit:c=>{c.preventDefault(),m()},children:[e.jsxs("div",{className:"s-thread-add-participant-row",children:[e.jsxs("div",{className:"s-thread-add-participant-field",children:[e.jsx("label",{className:"s-thread-add-participant-label",htmlFor:"thread-add-participant-select",children:"Agent"}),e.jsx("select",{id:"thread-add-participant-select",className:"s-thread-add-participant-select",value:s,onChange:c=>i(c.target.value),autoFocus:!0,children:n.map(c=>e.jsx("option",{value:c.id,children:c.name},c.id))})]}),e.jsxs("div",{className:"s-thread-add-participant-actions",children:[e.jsx("button",{type:"button",className:"s-btn s-btn-sm",onClick:x,disabled:r,children:"Cancel"}),e.jsx("button",{type:"submit",className:"s-btn s-btn-primary s-btn-sm",disabled:r||s.trim().length===0,children:r?"Adding...":"Add"})]})]}),d&&e.jsx("div",{className:"s-thread-add-participant-error",children:d})]})}export{kt as AddParticipantForm,Nt as ConversationHeader,Ct as ConversationIdentityRow};
|
package/dist/client/assets/{ConversationPanels-C9yCAoJy.js → ConversationPanels-D9oC0xG5.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/conversation-motion-features-
|
|
2
|
-
import{j as e,r as g,_ as z}from"./index-C8uS5szO.js";import{e as W,t as B,g as O,r as D,h as U,m as F,c as K,i as H,p as q}from"./conversation-model-BGFHoxQ0.js";import{n as G,e as V}from"./agent-state-DDhnFEEP.js";import{a as L,s as J}from"./colors-CFlbwC25.js";import{i as C}from"./sessionRead-CvFz2RHv.js";import{n as Q,t as w,f as b}from"./time-Dhsh_2EG.js";import{u as X}from"./Provider-5Hotn7NQ.js";import{o as E}from"./openContent-C6XO6kr5.js";import{f as Y,c as Z,b as ee,e as te,g as se}from"./tail-display-DHSNmvor.js";import{u as ae}from"./use-reduced-motion-D7n3vK8t.js";import{L as ie,m as f}from"./proxy-DOG46ja4.js";import{C as ne}from"./chevron-down-B5eMsn5c.js";import{C as re}from"./chevron-right-C7UGFpkl.js";import{A as oe}from"./activity-CSUhvjD0.js";import{T as ce}from"./terminal-96JWDYDL.js";import{M as le}from"./message-circle-CSiJj6yo.js";const M=60,de={planning:"Planning",inspection:"Inspection",mutation:"Mutations",execution:"Execution",verification:"Verification",coordination:"Coordination"};function N(s){if(s.kind==="think")return"planning";const t=s.tool?.toLowerCase()??"",o=s.arg?.toLowerCase()??"",r=s.text?.toLowerCase()??"",i=s.outcome?.toLowerCase()??"";return t.includes("test")||t.includes("check")||t.includes("lint")||t.includes("typecheck")||t.includes("verify")||/\b(?:bun|npm|pnpm|yarn|cargo|pytest|go|vitest|jest|playwright|cypress)\s+(?:test|run\s+(?:check|test|lint)|check|typecheck)/i.test(o)||/\b(?:\d+\s+pass|all tests passed|test passed|lint clean|tsc clean)\b/i.test(i)?"verification":t==="write"||t==="edit"||t==="strreplace"||t==="str_replace"||t==="delete"||t==="write_file"||t==="edit_file"||t==="patch"||t==="apply_patch"||t==="todowrite"||t==="todo_write"||/\b(?:git\s+apply|git\s+commit|git\s+add|rm\s+|mkdir\s+|touch\s+|sed\s+|awk\s+)/i.test(o)||/^\+\d+\s+[−-]\d+/u.test(i)?"mutation":t==="read"||t==="glob"||t==="grep"||t==="filesearch"||t==="file_search"||t==="list_dir"||t==="list_directory"||t==="view"||t==="fetch"||t==="webfetch"||t==="websearch"||t==="scout_search"||t==="search"||/\b(?:grep|find|rg|cat|head|tail|ls|git\s+status|git\s+diff|git\s+log|git\s+branch)/i.test(o)?"inspection":s.kind==="note"||/\b(?:planning|plan|evaluating|analyzing|reasoning|strategy)\b/i.test(r)?"planning":s.kind==="tool"||t==="bash"||t==="shell"||t==="terminal"||t==="exec"||t==="run"||t==="command"||t==="task"?"execution":"coordination"}function y(s){const t=s.outcome?.toLowerCase()??"";return t.includes("error")||t.includes("fail")||t.includes("exit 1")||t.includes("rejected")||t.includes("timed out")?"error":t.includes("warn")||t.includes("skipped")?"warning":s.outcome||!s.isLatest?"success":s.isActive?"working":"success"}function he(s){if(s<1e3)return`${Math.round(s)}ms`;const t=s/1e3;if(t<60)return`${t.toFixed(1).replace(/\.0$/,"")}s`;const o=Math.floor(t/60),r=Math.round(t%60);return`${o}m ${r}s`}function me(s){if(s.length===0)return[];const t=new Map;for(const c of s)t.set(c.phase,(t.get(c.phase)??0)+(c.repeatCount||1));const r=s.at(-1)?.phase??"planning";return["planning","inspection","mutation","execution","verification","coordination"].filter(c=>(t.get(c)??0)>0).map(c=>({phase:c,label:de[c],count:t.get(c)??0,active:c===r}))}function j(s,t,o){const r=o?.trim();if(!r)return;const i=r.toLowerCase();t.has(i)||(t.add(i),s.push(r))}function Ue(s){const t=[],o=new Set;j(t,o,s.observeSessionId);for(const r of s.flight?.sessions??[])j(t,o,r.sessionId);return j(t,o,s.agent?.harnessSessionId),j(t,o,s.sessionMeta?.harnessSessionId),t}function Fe(s,t){const o=s.sessionId?.trim().toLowerCase();return o?t.some(r=>{const i=r.trim().toLowerCase();return i?o.includes(i)||i.includes(o):!1}):!1}function A(s,t){return s.ts!==t.ts?s.ts-t.ts:s.id.localeCompare(t.id)}function Ke(s,t){const o=new Map;for(const r of[...s,...t])o.set(r.id,r);return[...o.values()].sort(A).slice(-M)}function He(s){const t=Y(s).sort(A),o=Z(t.map(i=>({event:i,meta:ee(i)}))),r=[];for(const i of o){if(i.event.kind==="other")continue;if(i.event.kind==="tool-result"){const m=r.at(-1);m?.kind==="tool"&&(m.outcome=i.meta.result?.outcome??m.outcome??"done",m.ts=i.event.ts,m.status=y({outcome:m.outcome}),m.phase=N({kind:m.kind,tool:m.tool,arg:m.arg,text:m.text,outcome:m.outcome}));continue}const c=ue(i.event),l=pe(i.event,te(i.event,i.meta),c);if(!l&&c!=="think")continue;const d=i.meta.tool,n=i.meta.arg?v(i.meta.arg):void 0,h=i.meta.result?.outcome,a=N({kind:c,tool:d,arg:n,text:l,outcome:h}),p=y({outcome:h}),u={id:i.event.id,ts:i.event.ts,kind:c,text:l,repeatCount:i.repeatCount,phase:a,status:p};d&&(u.tool=d),n&&(u.arg=n),h&&(u.outcome=h),r.push(u)}for(let i=0;i<r.length-1;i++){const c=r[i],l=r[i+1];c&&l&&l.ts>=c.ts&&(c.durationMs=l.ts-c.ts)}return r}const $=160;function v(s){const t=s.replace(/\s+/gu," ").trim();return t.length>$?`${t.slice(0,$-1)}…`:t}const I=/^\[thinking\]\s*$/iu;function ue(s){return I.test(s.summary.trim())?"think":se(s)}function pe(s,t,o){return o==="think"&&I.test(s.summary.trim())?"":v(t)}const xe=15e3;function ge(s){const t=s?.outcome;return typeof t=="string"&&t.trim()?t.trim():void 0}function qe(s){const{observe:t,flight:o}=s;if(!t||!o)return[];const r=t.data.events.filter(n=>n.kind!=="boot"&&n.kind!=="system");if(r.length===0)return[];const i=Q(o.startedAt),c=i!==null?r.filter(n=>typeof n.at=="number"&&n.at>=i-xe):[],d=(c.length>0?c:t.data.live?r:[]).slice(-M).map(n=>{const h=ge(n.result),p=(n.diff?`+${n.diff.add} −${n.diff.del}`:void 0)||h,u=N({kind:n.kind,tool:n.tool,arg:n.arg,text:n.text,outcome:p}),m=y({outcome:p}),x={id:`observe:${t.sessionId??"session"}:${n.id}`,ts:n.at??n.t,kind:n.kind,text:v(n.text||n.tool||"step"),repeatCount:1,phase:u,status:m};return n.tool&&(x.tool=n.tool),n.arg&&(x.arg=v(n.arg)),p&&(x.outcome=p),x});for(let n=0;n<d.length-1;n++){const h=d[n],a=d[n+1];h&&a&&a.ts>=h.ts&&(h.durationMs=a.ts-h.ts)}return d}function Ge(s){const t=s.at(-1);return t?t.tool?t.arg?`${t.tool} · ${t.arg}`:t.tool:t.kind==="think"?t.text||"Thinking":t.text||null:null}function Ve(s){if(s.length===0)return null;const t=s.filter(i=>i.kind==="tool").length,o=s.filter(i=>i.kind==="think").length,r=[];return t>0&&r.push(`${t} tool${t===1?"":"s"}`),o>0&&r.push(`${o} thinking`),r.length===0?`${s.length} step${s.length===1?"":"s"}`:r.join(" · ")}function Je(s){const t=s.flight?.state;return t==="queued"?{label:"Queued",detail:"waiting for the session to come online"}:t==="waking"?{label:"Waking",detail:"starting the session"}:t==="running"||t==="waiting"?s.hasSessionScope?{label:"Session live",detail:"waiting for the first trace line"}:{label:"Session live",detail:"no trace stream for this session yet"}:s.awaitingResponse?{label:"Sent",detail:"waiting for the agent to pick this up"}:null}const fe=[{head:"30%",body:"88%",short:"62%"},{head:"22%",body:"76%",short:"48%"},{head:"34%",body:"82%",short:"68%"}],je=()=>z(()=>import("./conversation-motion-features-9x8uZpwh.js"),__vite__mapDeps([0,1,2,3,4])).then(s=>s.default);function P({onOpenTrace:s,onOpenTerminal:t,onSteer:o,compact:r=!1}){return!s&&!t&&!o?null:e.jsxs("nav",{className:`s-thread-working-actions${r?" s-thread-working-actions--compact":""}`,"aria-label":"Working turn actions",children:[s&&e.jsxs("button",{type:"button",className:"s-thread-working-action s-thread-working-action--primary",onClick:s,title:"Watch this run's live trace",children:[e.jsx(oe,{size:13,strokeWidth:1.9,"aria-hidden":"true"}),e.jsx("span",{children:"Live trace"})]}),t&&e.jsxs("button",{type:"button",className:"s-thread-working-action",onClick:t,title:"Jump into this agent's terminal",children:[e.jsx(ce,{size:13,strokeWidth:1.9,"aria-hidden":"true"}),e.jsx("span",{children:"Terminal"})]}),o&&e.jsxs("button",{type:"button",className:"s-thread-working-action",onClick:o,title:"Write an interrupting message to steer this turn",children:[e.jsx(le,{size:13,strokeWidth:1.9,"aria-hidden":"true"}),e.jsx("span",{children:"Steer…"})]})]})}const ve={think:"Thinking",tool:"Tool",ask:"Prompt",message:"Says",note:"Note",system:"System",boot:"Boot"};function k({steps:s,phase:t,limit:o=5,compact:r=!1}){const[i,c]=g.useState(()=>new Set),l=g.useCallback(a=>{c(p=>{const u=new Set(p);return u.has(a)?u.delete(a):u.add(a),u})},[]),d=g.useMemo(()=>me(s),[s]),n=s.slice(-o),h=s.length-n.length;return n.length===0?t?e.jsxs("div",{className:"s-thread-steps-phase surface-card surface-card--inset",children:[e.jsxs("div",{className:"s-thread-steps-phase-header",children:[e.jsx("span",{className:"dot dot--sm dot--working dot--pulse dot--glow","aria-hidden":"true"}),e.jsx("span",{className:"label-xs text-muted",children:t.label})]}),e.jsx("strong",{className:"s-thread-steps-phase-detail",children:t.detail})]}):null:e.jsxs("div",{className:`s-thread-steps${r?" s-thread-steps--compact":""}`,children:[d.length>0&&e.jsx("div",{className:"s-thread-turn-phases-ribbon",role:"status","aria-label":"Execution phases",children:d.map(a=>e.jsxs("span",{className:`s-thread-turn-phase-chip chip chip--sm chip--mono ${a.active?"chip--working s-thread-turn-phase-chip--active":"chip--neutral"}`,children:[a.active&&e.jsx("span",{className:"dot dot--sm dot--working dot--pulse dot--glow","aria-hidden":"true"}),e.jsx("span",{className:"s-thread-turn-phase-name",children:a.label}),e.jsx("span",{className:"s-thread-turn-phase-count",children:a.count})]},a.phase))}),h>0&&e.jsxs("div",{className:"s-thread-steps-elided label-xs",children:[h," earlier step",h===1?"":"s"]}),e.jsx("ol",{className:"s-thread-steps-list","aria-label":"Live steps in this turn",children:n.map((a,p)=>{const u=p===n.length-1,m=i.has(a.id),x=!!(a.arg&&a.arg.length>30||a.outcome||a.text.length>50);return e.jsxs("li",{className:`s-thread-step-card s-thread-step-card--${a.status}${u?" s-thread-step-card--latest":""}${m?" s-thread-step-card--expanded":""}`,"data-kind":a.kind,"data-phase":a.phase,"data-status":a.status,children:[e.jsxs("div",{className:"s-thread-step-header",children:[e.jsx("span",{className:"s-thread-step-mark s-thread-step-indicator","aria-hidden":"true",children:a.status==="working"||u&&!a.outcome?e.jsx("span",{className:"dot dot--sm dot--working dot--pulse dot--glow"}):a.status==="error"?e.jsx("span",{className:"dot dot--sm dot--danger"}):a.status==="warning"?e.jsx("span",{className:"dot dot--sm dot--warning"}):e.jsx("span",{className:"dot dot--sm dot--success"})}),e.jsx("span",{className:"s-thread-step-kind chip chip--sm chip--mono chip--ghost",children:a.tool?a.tool:ve[a.kind]}),e.jsxs("div",{className:"s-thread-step-body",children:[a.tool?e.jsx("span",{className:"s-thread-step-tool-arg",children:a.arg?e.jsx("code",{className:"s-thread-step-arg-code",children:a.arg}):e.jsx("span",{className:"s-thread-step-tool",children:a.tool})}):e.jsx("span",{className:"s-thread-step-text",children:a.text}),a.repeatCount>1&&e.jsxs("span",{className:"s-thread-step-repeat chip chip--sm chip--mono chip--neutral",children:["×",a.repeatCount]})]}),e.jsxs("div",{className:"s-thread-step-meta",children:[a.outcome&&e.jsx("span",{className:`s-thread-step-outcome chip chip--sm chip--mono ${a.outcome.includes("+")?"chip--success":a.status==="error"?"chip--danger":"chip--neutral"}`,children:a.outcome}),a.durationMs?e.jsx("span",{className:"s-thread-step-duration label-xs",children:he(a.durationMs)}):null,e.jsx("time",{className:"label-xs",title:b(a.ts),children:w(a.ts)}),x&&e.jsx("button",{type:"button",className:"s-thread-step-toggle btn btn--ghost btn--icon","aria-expanded":m,onClick:()=>l(a.id),title:m?"Collapse output":"Expand output",children:m?e.jsx(ne,{size:12}):e.jsx(re,{size:12})})]})]}),m&&e.jsxs("div",{className:"s-thread-step-output surface-card surface-card--inset",children:[e.jsxs("div",{className:"s-thread-step-output-header",children:[e.jsx("span",{className:"label-xs text-muted",children:"Telemetry Detail"}),e.jsxs("span",{className:"label-xs text-dim",children:[a.phase.toUpperCase()," · ",a.status.toUpperCase()]})]}),e.jsx("pre",{className:"s-thread-step-output-code",children:e.jsxs("code",{children:[a.tool?`tool: ${a.tool}
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/conversation-motion-features-C5zjuNwE.js","assets/gestures-QZub3Ot9.js","assets/index-EsrkGBcv.js","assets/index-CN4rBB_s.css","assets/use-reduced-motion-3gMYZNIp.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{j as e,r as g,_ as z}from"./index-EsrkGBcv.js";import{h as W,t as B,i as O,r as D,j as U,m as F,c as K,k as H,p as q}from"./conversation-model-FxDeWlle.js";import{n as G,e as V}from"./agent-state-DDhnFEEP.js";import{a as L,s as J}from"./colors-CFlbwC25.js";import{i as C}from"./sessionRead-CvFz2RHv.js";import{n as Q,t as w,f as b}from"./time-Dhsh_2EG.js";import{u as X}from"./Provider-C35yu29I.js";import{o as E}from"./openContent-C6XO6kr5.js";import{f as Y,c as Z,b as ee,e as te,g as se}from"./tail-display-DHSNmvor.js";import{u as ae}from"./use-reduced-motion-3gMYZNIp.js";import{L as ie,m as f}from"./proxy-AJsmwA6h.js";import{C as ne}from"./chevron-down-l1mrh5S9.js";import{C as re}from"./chevron-right-DrfqcerI.js";import{A as oe}from"./activity-CIlFrfPJ.js";import{T as ce}from"./terminal-hQKQygcf.js";import{M as le}from"./message-circle-CxRVKNE-.js";const M=60,de={planning:"Planning",inspection:"Inspection",mutation:"Mutations",execution:"Execution",verification:"Verification",coordination:"Coordination"};function N(s){if(s.kind==="think")return"planning";const t=s.tool?.toLowerCase()??"",o=s.arg?.toLowerCase()??"",r=s.text?.toLowerCase()??"",i=s.outcome?.toLowerCase()??"";return t.includes("test")||t.includes("check")||t.includes("lint")||t.includes("typecheck")||t.includes("verify")||/\b(?:bun|npm|pnpm|yarn|cargo|pytest|go|vitest|jest|playwright|cypress)\s+(?:test|run\s+(?:check|test|lint)|check|typecheck)/i.test(o)||/\b(?:\d+\s+pass|all tests passed|test passed|lint clean|tsc clean)\b/i.test(i)?"verification":t==="write"||t==="edit"||t==="strreplace"||t==="str_replace"||t==="delete"||t==="write_file"||t==="edit_file"||t==="patch"||t==="apply_patch"||t==="todowrite"||t==="todo_write"||/\b(?:git\s+apply|git\s+commit|git\s+add|rm\s+|mkdir\s+|touch\s+|sed\s+|awk\s+)/i.test(o)||/^\+\d+\s+[−-]\d+/u.test(i)?"mutation":t==="read"||t==="glob"||t==="grep"||t==="filesearch"||t==="file_search"||t==="list_dir"||t==="list_directory"||t==="view"||t==="fetch"||t==="webfetch"||t==="websearch"||t==="scout_search"||t==="search"||/\b(?:grep|find|rg|cat|head|tail|ls|git\s+status|git\s+diff|git\s+log|git\s+branch)/i.test(o)?"inspection":s.kind==="note"||/\b(?:planning|plan|evaluating|analyzing|reasoning|strategy)\b/i.test(r)?"planning":s.kind==="tool"||t==="bash"||t==="shell"||t==="terminal"||t==="exec"||t==="run"||t==="command"||t==="task"?"execution":"coordination"}function y(s){const t=s.outcome?.toLowerCase()??"";return t.includes("error")||t.includes("fail")||t.includes("exit 1")||t.includes("rejected")||t.includes("timed out")?"error":t.includes("warn")||t.includes("skipped")?"warning":s.outcome||!s.isLatest?"success":s.isActive?"working":"success"}function he(s){if(s<1e3)return`${Math.round(s)}ms`;const t=s/1e3;if(t<60)return`${t.toFixed(1).replace(/\.0$/,"")}s`;const o=Math.floor(t/60),r=Math.round(t%60);return`${o}m ${r}s`}function me(s){if(s.length===0)return[];const t=new Map;for(const c of s)t.set(c.phase,(t.get(c.phase)??0)+(c.repeatCount||1));const r=s.at(-1)?.phase??"planning";return["planning","inspection","mutation","execution","verification","coordination"].filter(c=>(t.get(c)??0)>0).map(c=>({phase:c,label:de[c],count:t.get(c)??0,active:c===r}))}function j(s,t,o){const r=o?.trim();if(!r)return;const i=r.toLowerCase();t.has(i)||(t.add(i),s.push(r))}function Ue(s){const t=[],o=new Set;j(t,o,s.observeSessionId);for(const r of s.flight?.sessions??[])j(t,o,r.sessionId);return j(t,o,s.agent?.harnessSessionId),j(t,o,s.sessionMeta?.harnessSessionId),t}function Fe(s,t){const o=s.sessionId?.trim().toLowerCase();return o?t.some(r=>{const i=r.trim().toLowerCase();return i?o.includes(i)||i.includes(o):!1}):!1}function A(s,t){return s.ts!==t.ts?s.ts-t.ts:s.id.localeCompare(t.id)}function Ke(s,t){const o=new Map;for(const r of[...s,...t])o.set(r.id,r);return[...o.values()].sort(A).slice(-M)}function He(s){const t=Y(s).sort(A),o=Z(t.map(i=>({event:i,meta:ee(i)}))),r=[];for(const i of o){if(i.event.kind==="other")continue;if(i.event.kind==="tool-result"){const m=r.at(-1);m?.kind==="tool"&&(m.outcome=i.meta.result?.outcome??m.outcome??"done",m.ts=i.event.ts,m.status=y({outcome:m.outcome}),m.phase=N({kind:m.kind,tool:m.tool,arg:m.arg,text:m.text,outcome:m.outcome}));continue}const c=ue(i.event),l=pe(i.event,te(i.event,i.meta),c);if(!l&&c!=="think")continue;const d=i.meta.tool,n=i.meta.arg?v(i.meta.arg):void 0,h=i.meta.result?.outcome,a=N({kind:c,tool:d,arg:n,text:l,outcome:h}),p=y({outcome:h}),u={id:i.event.id,ts:i.event.ts,kind:c,text:l,repeatCount:i.repeatCount,phase:a,status:p};d&&(u.tool=d),n&&(u.arg=n),h&&(u.outcome=h),r.push(u)}for(let i=0;i<r.length-1;i++){const c=r[i],l=r[i+1];c&&l&&l.ts>=c.ts&&(c.durationMs=l.ts-c.ts)}return r}const $=160;function v(s){const t=s.replace(/\s+/gu," ").trim();return t.length>$?`${t.slice(0,$-1)}…`:t}const I=/^\[thinking\]\s*$/iu;function ue(s){return I.test(s.summary.trim())?"think":se(s)}function pe(s,t,o){return o==="think"&&I.test(s.summary.trim())?"":v(t)}const xe=15e3;function ge(s){const t=s?.outcome;return typeof t=="string"&&t.trim()?t.trim():void 0}function qe(s){const{observe:t,flight:o}=s;if(!t||!o)return[];const r=t.data.events.filter(n=>n.kind!=="boot"&&n.kind!=="system");if(r.length===0)return[];const i=Q(o.startedAt),c=i!==null?r.filter(n=>typeof n.at=="number"&&n.at>=i-xe):[],d=(c.length>0?c:t.data.live?r:[]).slice(-M).map(n=>{const h=ge(n.result),p=(n.diff?`+${n.diff.add} −${n.diff.del}`:void 0)||h,u=N({kind:n.kind,tool:n.tool,arg:n.arg,text:n.text,outcome:p}),m=y({outcome:p}),x={id:`observe:${t.sessionId??"session"}:${n.id}`,ts:n.at??n.t,kind:n.kind,text:v(n.text||n.tool||"step"),repeatCount:1,phase:u,status:m};return n.tool&&(x.tool=n.tool),n.arg&&(x.arg=v(n.arg)),p&&(x.outcome=p),x});for(let n=0;n<d.length-1;n++){const h=d[n],a=d[n+1];h&&a&&a.ts>=h.ts&&(h.durationMs=a.ts-h.ts)}return d}function Ge(s){const t=s.at(-1);return t?t.tool?t.arg?`${t.tool} · ${t.arg}`:t.tool:t.kind==="think"?t.text||"Thinking":t.text||null:null}function Ve(s){if(s.length===0)return null;const t=s.filter(i=>i.kind==="tool").length,o=s.filter(i=>i.kind==="think").length,r=[];return t>0&&r.push(`${t} tool${t===1?"":"s"}`),o>0&&r.push(`${o} thinking`),r.length===0?`${s.length} step${s.length===1?"":"s"}`:r.join(" · ")}function Je(s){const t=s.flight?.state;return t==="queued"?{label:"Queued",detail:"waiting for the session to come online"}:t==="waking"?{label:"Waking",detail:"starting the session"}:t==="running"||t==="waiting"?s.hasSessionScope?{label:"Session live",detail:"waiting for the first trace line"}:{label:"Session live",detail:"no trace stream for this session yet"}:s.awaitingResponse?{label:"Sent",detail:"waiting for the agent to pick this up"}:null}const fe=[{head:"30%",body:"88%",short:"62%"},{head:"22%",body:"76%",short:"48%"},{head:"34%",body:"82%",short:"68%"}],je=()=>z(()=>import("./conversation-motion-features-C5zjuNwE.js"),__vite__mapDeps([0,1,2,3,4])).then(s=>s.default);function P({onOpenTrace:s,onOpenTerminal:t,onSteer:o,compact:r=!1}){return!s&&!t&&!o?null:e.jsxs("nav",{className:`s-thread-working-actions${r?" s-thread-working-actions--compact":""}`,"aria-label":"Working turn actions",children:[s&&e.jsxs("button",{type:"button",className:"s-thread-working-action s-thread-working-action--primary",onClick:s,title:"Watch this run's live trace",children:[e.jsx(oe,{size:13,strokeWidth:1.9,"aria-hidden":"true"}),e.jsx("span",{children:"Live trace"})]}),t&&e.jsxs("button",{type:"button",className:"s-thread-working-action",onClick:t,title:"Jump into this agent's terminal",children:[e.jsx(ce,{size:13,strokeWidth:1.9,"aria-hidden":"true"}),e.jsx("span",{children:"Terminal"})]}),o&&e.jsxs("button",{type:"button",className:"s-thread-working-action",onClick:o,title:"Write an interrupting message to steer this turn",children:[e.jsx(le,{size:13,strokeWidth:1.9,"aria-hidden":"true"}),e.jsx("span",{children:"Steer…"})]})]})}const ve={think:"Thinking",tool:"Tool",ask:"Prompt",message:"Says",note:"Note",system:"System",boot:"Boot"};function k({steps:s,phase:t,limit:o=5,compact:r=!1}){const[i,c]=g.useState(()=>new Set),l=g.useCallback(a=>{c(p=>{const u=new Set(p);return u.has(a)?u.delete(a):u.add(a),u})},[]),d=g.useMemo(()=>me(s),[s]),n=s.slice(-o),h=s.length-n.length;return n.length===0?t?e.jsxs("div",{className:"s-thread-steps-phase surface-card surface-card--inset",children:[e.jsxs("div",{className:"s-thread-steps-phase-header",children:[e.jsx("span",{className:"dot dot--sm dot--working dot--pulse dot--glow","aria-hidden":"true"}),e.jsx("span",{className:"label-xs text-muted",children:t.label})]}),e.jsx("strong",{className:"s-thread-steps-phase-detail",children:t.detail})]}):null:e.jsxs("div",{className:`s-thread-steps${r?" s-thread-steps--compact":""}`,children:[d.length>0&&e.jsx("div",{className:"s-thread-turn-phases-ribbon",role:"status","aria-label":"Execution phases",children:d.map(a=>e.jsxs("span",{className:`s-thread-turn-phase-chip chip chip--sm chip--mono ${a.active?"chip--working s-thread-turn-phase-chip--active":"chip--neutral"}`,children:[a.active&&e.jsx("span",{className:"dot dot--sm dot--working dot--pulse dot--glow","aria-hidden":"true"}),e.jsx("span",{className:"s-thread-turn-phase-name",children:a.label}),e.jsx("span",{className:"s-thread-turn-phase-count",children:a.count})]},a.phase))}),h>0&&e.jsxs("div",{className:"s-thread-steps-elided label-xs",children:[h," earlier step",h===1?"":"s"]}),e.jsx("ol",{className:"s-thread-steps-list","aria-label":"Live steps in this turn",children:n.map((a,p)=>{const u=p===n.length-1,m=i.has(a.id),x=!!(a.arg&&a.arg.length>30||a.outcome||a.text.length>50);return e.jsxs("li",{className:`s-thread-step-card s-thread-step-card--${a.status}${u?" s-thread-step-card--latest":""}${m?" s-thread-step-card--expanded":""}`,"data-kind":a.kind,"data-phase":a.phase,"data-status":a.status,children:[e.jsxs("div",{className:"s-thread-step-header",children:[e.jsx("span",{className:"s-thread-step-mark s-thread-step-indicator","aria-hidden":"true",children:a.status==="working"||u&&!a.outcome?e.jsx("span",{className:"dot dot--sm dot--working dot--pulse dot--glow"}):a.status==="error"?e.jsx("span",{className:"dot dot--sm dot--danger"}):a.status==="warning"?e.jsx("span",{className:"dot dot--sm dot--warning"}):e.jsx("span",{className:"dot dot--sm dot--success"})}),e.jsx("span",{className:"s-thread-step-kind chip chip--sm chip--mono chip--ghost",children:a.tool?a.tool:ve[a.kind]}),e.jsxs("div",{className:"s-thread-step-body",children:[a.tool?e.jsx("span",{className:"s-thread-step-tool-arg",children:a.arg?e.jsx("code",{className:"s-thread-step-arg-code",children:a.arg}):e.jsx("span",{className:"s-thread-step-tool",children:a.tool})}):e.jsx("span",{className:"s-thread-step-text",children:a.text}),a.repeatCount>1&&e.jsxs("span",{className:"s-thread-step-repeat chip chip--sm chip--mono chip--neutral",children:["×",a.repeatCount]})]}),e.jsxs("div",{className:"s-thread-step-meta",children:[a.outcome&&e.jsx("span",{className:`s-thread-step-outcome chip chip--sm chip--mono ${a.outcome.includes("+")?"chip--success":a.status==="error"?"chip--danger":"chip--neutral"}`,children:a.outcome}),a.durationMs?e.jsx("span",{className:"s-thread-step-duration label-xs",children:he(a.durationMs)}):null,e.jsx("time",{className:"label-xs",title:b(a.ts),children:w(a.ts)}),x&&e.jsx("button",{type:"button",className:"s-thread-step-toggle btn btn--ghost btn--icon","aria-expanded":m,onClick:()=>l(a.id),title:m?"Collapse output":"Expand output",children:m?e.jsx(ne,{size:12}):e.jsx(re,{size:12})})]})]}),m&&e.jsxs("div",{className:"s-thread-step-output surface-card surface-card--inset",children:[e.jsxs("div",{className:"s-thread-step-output-header",children:[e.jsx("span",{className:"label-xs text-muted",children:"Telemetry Detail"}),e.jsxs("span",{className:"label-xs text-dim",children:[a.phase.toUpperCase()," · ",a.status.toUpperCase()]})]}),e.jsx("pre",{className:"s-thread-step-output-code",children:e.jsxs("code",{children:[a.tool?`tool: ${a.tool}
|
|
3
3
|
`:"",a.arg?`args: ${a.arg}
|
|
4
4
|
`:"",a.outcome?`outcome: ${a.outcome}
|
|
5
5
|
`:"",a.text?`text: ${a.text}
|