@openscout/scout 0.2.84 → 0.2.86
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 +1 -1
- package/bin/scoutd +0 -0
- package/dist/build-manifest.json +3 -3
- package/dist/client/assets/ActivityScreen-C7AwUogt.js +1 -0
- package/dist/client/assets/{AddProjectForm-Czb5uwou.js → AddProjectForm-BNRpRPod.js} +1 -1
- package/dist/client/assets/AgentAvatar-B1xvQ7ej.js +1 -0
- package/dist/client/assets/AgentConfigurationScreen-BoBQpyz5.js +1 -0
- package/dist/client/assets/AgentDefinitionsWorkspace-rw3vh8Lm.js +1 -0
- package/dist/client/assets/{AgentDetailCard-Biq8b2gv.js → AgentDetailCard-FelCxQrT.js} +1 -1
- package/dist/client/assets/AgentFloorView-Crdw8Uo5.js +1 -0
- package/dist/client/assets/AgentInfoScreen-Cge7HHbV.js +1 -0
- package/dist/client/assets/{AgentLaneCard-C4DMQR-c.js → AgentLaneCard-CRDG74C1.js} +1 -1
- package/dist/client/assets/{AgentLaneChrome-D1xNNf7A.js → AgentLaneChrome-CWFqUdch.js} +1 -1
- package/dist/client/assets/AgentLaneDetailSheet-DCIIg3Zp.js +4 -0
- package/dist/client/assets/{AgentLaneSummaryResize-C9loK-st.js → AgentLaneSummaryResize-yTM4GQAJ.js} +1 -1
- package/dist/client/assets/AgentLanesEmbedScreen-BJLwXSNp.js +1 -0
- package/dist/client/assets/{AgentLanesPreflight-M7iDXdP2.js → AgentLanesPreflight-DJeDRTAN.js} +1 -1
- package/dist/client/assets/AgentLanesView-CbY9qD0z.js +2 -0
- package/dist/client/assets/{AgentLiveActions-0iy8QZ1T.js → AgentLiveActions-Bn3zeZBN.js} +1 -1
- package/dist/client/assets/AgentSessions-czl5zT7A.js +6 -0
- package/dist/client/assets/AgentsConsole-CoT2crwq.js +1 -0
- package/dist/client/assets/{AgentsScreen-Bww6HgFs.js → AgentsScreen-BcPM-z1T.js} +1 -1
- package/dist/client/assets/AgentsSubnav-3_vpn2bT.js +1 -0
- package/dist/client/assets/AstronautSuit-BADl7m8x.js +1 -0
- package/dist/client/assets/{AtopView-h_aFoNkP.js → AtopView-DymBCiXv.js} +1 -1
- package/dist/client/assets/{BackToPicker-BXp5E2ck.js → BackToPicker-CqYhOaLB.js} +1 -1
- package/dist/client/assets/BriefingDetailScreen-DDfZ8ci1.js +1 -0
- package/dist/client/assets/{BriefingsScreen-BTsvr5fv.js → BriefingsScreen-CLvSOJjy.js} +1 -1
- package/dist/client/assets/{BrokerMetadataPanel-jg7odHQp.js → BrokerMetadataPanel-DFAH-NO6.js} +1 -1
- package/dist/client/assets/BrokerScreen-Bkvu92jk.js +5 -0
- package/dist/client/assets/{Canvas-BePL08RR.js → Canvas-KyTsDJlB.js} +1 -1
- package/dist/client/assets/ChatCollapsedStrip-Bjjqa30K.js +1 -0
- package/dist/client/assets/{CodeDiffPane-86odpBSt.js → CodeDiffPane-C9HT1dCT.js} +1 -1
- package/dist/client/assets/{CodeProjectPicker-8svr_S_A.js → CodeProjectPicker-5Y3GvXkM.js} +1 -1
- package/dist/client/assets/{CodeScreen-CJ2RgB32.js → CodeScreen-DpN9kQvm.js} +1 -1
- package/dist/client/assets/ConversationComposer-Ce7Byw48.js +1 -0
- package/dist/client/assets/ConversationFeedRows-DygDfQn_.js +1 -0
- package/dist/client/assets/ConversationHeader-C3sg0ULI.js +1 -0
- package/dist/client/assets/ConversationPanels-Dg4Y2GgX.js +6 -0
- package/dist/client/assets/ConversationScreen-BP5tdz2k.css +1 -0
- package/dist/client/assets/ConversationScreen-CjWWmuuh.js +1 -0
- package/dist/client/assets/ConversationStatus-BhVIYQza.js +1 -0
- package/dist/client/assets/CrewWorkspaces-B6YIyw1z.css +1 -0
- package/dist/client/assets/CrewWorkspaces-CDU-wy1Y.js +1 -0
- package/dist/client/assets/{DataTable-CGw5CECG.js → DataTable-oJP339bX.js} +1 -1
- package/dist/client/assets/{DispatchAftermath-DowTb7uO.js → DispatchAftermath-CH02HAVw.js} +1 -1
- package/dist/client/assets/DocumentFocusViewer-DmtFisY9.js +1 -0
- package/dist/client/assets/{EmbeddableSurfacesLab-CxfJXS2g.js → EmbeddableSurfacesLab-84b9I3fy.js} +1 -1
- package/dist/client/assets/{EmptyState-BUvllvA6.js → EmptyState-BnDda92b.js} +1 -1
- package/dist/client/assets/{FileViewerPane-BM4AD_bo.js → FileViewerPane-Dg7_88pv.js} +1 -1
- package/dist/client/assets/FlightObserveScreen-DL3Xhl0h.js +1 -0
- package/dist/client/assets/{FollowScreen-DG0osbUp.js → FollowScreen-DcFBqr6l.js} +1 -1
- package/dist/client/assets/{HarnessMark-MztYnrGK.js → HarnessMark-DGZ6o6Ct.js} +1 -1
- package/dist/client/assets/{HarnessesScreen-BWqirBjK.js → HarnessesScreen-DTDL-XaA.js} +1 -1
- package/dist/client/assets/{HerdrSession-6sFln7WX.js → HerdrSession-DV2hD6Yh.js} +1 -1
- package/dist/client/assets/HomeHero-7JwycwFY.css +1 -0
- package/dist/client/assets/HomeHero-CENwVZ45.js +1 -0
- package/dist/client/assets/HostAdvisorView-PgiZUkd_.js +1 -0
- package/dist/client/assets/{KnowledgeSearchInspector-BOIhFWd2.js → KnowledgeSearchInspector-DNQjeWZO.js} +1 -1
- package/dist/client/assets/KnowledgeSearchScreen-Bj80IgR0.js +1 -0
- package/dist/client/assets/{LaneToolHoverCard-CcEiQC6B.js → LaneToolHoverCard-197xYmRp.js} +1 -1
- package/dist/client/assets/LaneTraceDetailSheet-BztwvOv9.js +1 -0
- package/dist/client/assets/{LaneTraceEventFocus-Bl9L0EYb.js → LaneTraceEventFocus-C9cmqxnK.js} +1 -1
- package/dist/client/assets/{MeshCanvas-ZjIuMiRo.js → MeshCanvas-C3_2p9B6.js} +2 -2
- package/dist/client/assets/{MeshCanvasMinimap-C-LQtiX6.js → MeshCanvasMinimap-ZTjYWXTZ.js} +1 -1
- package/dist/client/assets/{MeshScreen-Bs3soujg.js → MeshScreen-lJKaOyGB.js} +1 -1
- package/dist/client/assets/{MeshTopologyView-C0LUyT3K.js → MeshTopologyView-CBjHbAZw.js} +2 -2
- package/dist/client/assets/MessagesScreen-D6MVLvdg.js +1 -0
- package/dist/client/assets/{MissionContextRail-CjGAEGu8.js → MissionContextRail-DXkrbcnZ.js} +1 -1
- package/dist/client/assets/MissionControlView-BCH-Zsp4.js +1 -0
- package/dist/client/assets/MissionFocusOverlay-DbAliOSF.js +1 -0
- package/dist/client/assets/MissionLeftAgentRow-Bx6Pg8_O.js +1 -0
- package/dist/client/assets/MissionLogPane-D06c29Y8.js +1 -0
- package/dist/client/assets/{NewAgentModal-D5e0YUAo.js → NewAgentModal-C18Ajovd.js} +1 -1
- package/dist/client/assets/NewChatComposer-Bgqes0UQ.js +19 -0
- package/dist/client/assets/{NewChatOrigin-BEz6jyqf.js → NewChatOrigin-DpHS2Wmt.js} +1 -1
- package/dist/client/assets/ObserveEmbedScreen-Cmhwai4X.js +2 -0
- package/dist/client/assets/ObserveTextFlow-C1f5oize.js +2 -0
- package/dist/client/assets/ObservedTopologyPanel-D85P6RAk.js +2 -0
- package/dist/client/assets/OpenScoutAppShell-IDI4fuUE.js +88 -0
- package/dist/client/assets/OpsAgentsView-yt0JavoB.js +1 -0
- package/dist/client/assets/OpsScreen-C3yNQqJE.js +1 -0
- package/dist/client/assets/OpsSubnav-BijKI3yG.js +1 -0
- package/dist/client/assets/ProjectAgentProfile-DnIeC16r.js +1 -0
- package/dist/client/assets/{ProjectAgentProfileBar-B1VpwzGD.js → ProjectAgentProfileBar-IDEpKZvI.js} +1 -1
- package/dist/client/assets/ProjectAgentProfileHero-Bh_aISs-.js +1 -0
- package/dist/client/assets/ProjectsInbox-B8Srlklk.js +2 -0
- package/dist/client/assets/ProjectsRail-DqAbdvCf.js +1 -0
- package/dist/client/assets/ProjectsScreen-DKHQ2iEv.js +1 -0
- package/dist/client/assets/ProjectsThreadAside-DpkjYLL2.js +1 -0
- package/dist/client/assets/Provider-Ve8yXaWR.js +1 -0
- package/dist/client/assets/RailRow-B0sRaJc6.css +1 -0
- package/dist/client/assets/RailRow-C4GNGR80.js +1 -0
- package/dist/client/assets/RawSessionsTable-Co3vzwsf.js +1 -0
- package/dist/client/assets/RealtimeVoiceScreen-DMd1CBAf.js +9 -0
- package/dist/client/assets/{RepoDiffEmbedScreen-VLg4caej.js → RepoDiffEmbedScreen-C97Euf4s.js} +1 -1
- package/dist/client/assets/{RepoDiffPageScreen-BelnvgnP.js → RepoDiffPageScreen-DUKLzkrW.js} +1 -1
- package/dist/client/assets/RepoDiffViewer-CovKjSgb.js +7 -0
- package/dist/client/assets/RepoDiffViewerLazy-zIiEmh-e.js +2 -0
- package/dist/client/assets/{ReposScreen-IINK-CFn.js → ReposScreen-BR1LqTf1.js} +6 -6
- package/dist/client/assets/ScoutDeckSurface-BGsVicc2.js +1 -0
- package/dist/client/assets/{ScoutSurface-x_QbcRyk.js → ScoutSurface-BMKW7hSu.js} +1 -1
- package/dist/client/assets/{ScoutbotFxLab-7t9JVvZg.js → ScoutbotFxLab-0O2iDRrF.js} +1 -1
- package/dist/client/assets/{SecondaryNav-Dj30epYF.js → SecondaryNav-cYTw2p39.js} +1 -1
- package/dist/client/assets/{SessionEmbedScreen-s2mJ5Fg9.js → SessionEmbedScreen-mNjT0R6j.js} +1 -1
- package/dist/client/assets/{SessionObserve-DaUrJCMq.js → SessionObserve-zAlFbwFn.js} +1 -1
- package/dist/client/assets/{SessionObserveEvidence-ClUW8jpV.js → SessionObserveEvidence-BVawzqoE.js} +1 -1
- package/dist/client/assets/SessionRefScreen-BmKhf29o.js +1 -0
- package/dist/client/assets/SessionsScreen-CsSqjIY2.js +1 -0
- package/dist/client/assets/SettingsDrawer-Dsj-On_x.css +1 -0
- package/dist/client/assets/SettingsDrawer-DwYQTGi8.js +3 -0
- package/dist/client/assets/SettingsScreen-Btaku7YM.js +1 -0
- package/dist/client/assets/{ShikiPane-Dkwyx--r.js → ShikiPane-DyEJdcvb.js} +1 -1
- package/dist/client/assets/{SlidePanel-CuTeirnk.js → SlidePanel-Dg8_styW.js} +1 -1
- package/dist/client/assets/{SpriteAvatar-DQ3PTb8L.js → SpriteAvatar-DMrSssNZ.js} +1 -1
- package/dist/client/assets/{StatusPill-BJ1ierIR.js → StatusPill-NFFnphtx.js} +1 -1
- package/dist/client/assets/{TailView-CufWcrvf.js → TailView-BfObcZu3.js} +2 -2
- package/dist/client/assets/Terminal-Dr-M9U4u.js +1 -0
- package/dist/client/assets/TerminalEmbedScreen-BmyZkonh.js +1 -0
- package/dist/client/assets/{TerminalRelay-rvUzI9Ek.js → TerminalRelay-lJ2KdMCW.js} +3 -3
- package/dist/client/assets/{TextDocumentSurface-Bc-kHPgG.js → TextDocumentSurface-C7fGlzY8.js} +1 -1
- package/dist/client/assets/{TmuxPeek-DLyDkq_D.js → TmuxPeek-BSeKIjnX.js} +1 -1
- package/dist/client/assets/{VoicePermissionsPanel-CD903y9K.js → VoicePermissionsPanel-BkIGTzgw.js} +1 -1
- package/dist/client/assets/{WorkDetailScreen-D51oI0dH.js → WorkDetailScreen-Cwe-KWK4.js} +3 -3
- package/dist/client/assets/WorkFilesViewer-BBtKRBPv.js +1 -0
- package/dist/client/assets/{activity-BvGruxWG.js → activity-D4W2XZY2.js} +1 -1
- package/dist/client/assets/{addon-fit-Cfq4Ayjd.js → addon-fit-Celjj2yn.js} +1 -1
- package/dist/client/assets/{addon-webgl-B8sIf9-s.js → addon-webgl-Cu4tJ21-.js} +1 -1
- package/dist/client/assets/{ScoutbotBroadcastChip-CxtYZWPZ.css → agent-autocomplete-C7xwIcwd.css} +1 -1
- package/dist/client/assets/agent-autocomplete-Dv-_9dAw.js +2 -0
- package/dist/client/assets/{agent-essentials-yb4wIJlX.js → agent-essentials-CngjUhQj.js} +1 -1
- package/dist/client/assets/agent-identity-DzHGhLdJ.js +1 -0
- package/dist/client/assets/{agent-lane-card-model-q4cwzLX4.js → agent-lane-card-model-CSugZCdy.js} +1 -1
- package/dist/client/assets/{agent-lane-detail-BNNm6FNu.js → agent-lane-detail-D5EIlX7_.js} +1 -1
- package/dist/client/assets/{agent-lane-preview-C33Dwpn7.js → agent-lane-preview-BhplDYGf.js} +1 -1
- package/dist/client/assets/{agent-lanes-BDNktFBZ.css → agent-lanes-DlqcEf0l.css} +1 -1
- package/dist/client/assets/{agent-lanes-model-VYQ5a68i.js → agent-lanes-model-BKOs_32K.js} +2 -2
- package/dist/client/assets/agent-specialization-CNrsRbKA.js +1 -0
- package/dist/client/assets/{api-BkjHJfgJ.js → api-BHHEUSS3.js} +1 -1
- package/dist/client/assets/api-DEHEgJ9m.js +1 -0
- package/dist/client/assets/{arc.es-BBTfhvLE.js → arc.es-DNT50Y-_.js} +1 -1
- package/dist/client/assets/archive-DH49QqFG.js +1 -0
- package/dist/client/assets/{arrow-left-BOht-YQu.js → arrow-left-i-h6JAgs.js} +1 -1
- package/dist/client/assets/arrow-right-B0Yi01Zr.js +1 -0
- package/dist/client/assets/{arrow-up-right-hoR8_oUz.js → arrow-up-right-RBC6k8nn.js} +1 -1
- package/dist/client/assets/{bot-BUK7dOPS.js → bot-r2IuAuJd.js} +1 -1
- package/dist/client/assets/broker-display-Q75fupqG.js +2 -0
- package/dist/client/assets/{cache-Dr0why2k.js → cache-BO2Bd_LV.js} +1 -1
- package/dist/client/assets/{check--esHw52j.js → check-Bfs7hMb1.js} +1 -1
- package/dist/client/assets/{chevron-down-NAhBUkFd.js → chevron-down-Da5tV19_.js} +1 -1
- package/dist/client/assets/{chevron-right-C10o7t_X.js → chevron-right-BMqtBds_.js} +1 -1
- package/dist/client/assets/{chunk-HRAB3GC3-DF8R9rPv.js → chunk-HRAB3GC3-BUVYXXAp.js} +1 -1
- package/dist/client/assets/{clock-of01sAB6.js → clock-DaKLp6Xd.js} +1 -1
- package/dist/client/assets/{code-xml-CLn3TDWF.js → code-xml-ByQsfOI_.js} +1 -1
- package/dist/client/assets/collapsed-strip-raJWthAH.css +1 -0
- package/dist/client/assets/compass-BepM5iWH.js +1 -0
- package/dist/client/assets/{content-Cgj5AWqT.js → content-5hnDC9WE.js} +1 -1
- package/dist/client/assets/content-BRFZ-a6m.js +1 -0
- package/dist/client/assets/content-BYykncDo.js +1 -0
- package/dist/client/assets/content-Be6yyWbJ.js +1 -0
- package/dist/client/assets/content-Bgl_X3ao.js +1 -0
- package/dist/client/assets/content-BopJW1Zx.js +1 -0
- package/dist/client/assets/content-Bv2sfg0w.js +1 -0
- package/dist/client/assets/content-CMBiIZTg.js +1 -0
- package/dist/client/assets/content-CPVqvf5o.js +1 -0
- package/dist/client/assets/content-CbwyFqdI.js +1 -0
- package/dist/client/assets/content-ClQjAWYi.js +1 -0
- package/dist/client/assets/content-Cv2tSAbv.js +1 -0
- package/dist/client/assets/content-DFFe3-Ot.js +1 -0
- package/dist/client/assets/content-DY5hwBmm.js +1 -0
- package/dist/client/assets/content-_IXoxGno.js +1 -0
- package/dist/client/assets/content-j_tewJdE.js +1 -0
- package/dist/client/assets/{conversation-icons-ClBJi21l.js → conversation-icons-C4amK8Sa.js} +1 -1
- package/dist/client/assets/conversation-model-CigSPlKA.js +1 -0
- package/dist/client/assets/conversation-motion-features-_95aZx_1.js +1 -0
- package/dist/client/assets/{copy-Dty8ZYsM.js → copy-De4s38o2.js} +1 -1
- package/dist/client/assets/cpu-Bc268H9Q.js +1 -0
- package/dist/client/assets/{createLucideIcon-Bt67PWH-.js → createLucideIcon-DLlxGjKt.js} +1 -1
- package/dist/client/assets/credentials-qwds23lv.js +1 -0
- package/dist/client/assets/ctx-panel-D_HJ3nhb.css +1 -0
- package/dist/client/assets/discover-DOlk1hG7.js +2 -0
- package/dist/client/assets/embed-entry-BqDJfa87.js +2 -0
- package/dist/client/assets/{external-link-Dem738OJ.js → external-link-BGHC_naA.js} +1 -1
- package/dist/client/assets/{eye-B3lBIwJZ.js → eye-BeCSqJn1.js} +1 -1
- package/dist/client/assets/file-code-corner-CX53Cd9y.js +1 -0
- package/dist/client/assets/{file-text-iF0hyVyU.js → file-text-BVhkMWyC.js} +1 -1
- package/dist/client/assets/gauge-CPcEPmNt.js +1 -0
- package/dist/client/assets/gestures-BXIGYk_p.js +1 -0
- package/dist/client/assets/git-branch-q8Ayc8py.js +1 -0
- package/dist/client/assets/home-moving-signal-DMguaRWR.css +1 -0
- package/dist/client/assets/home-moving-signal-Dm2Z2x0p.js +1 -0
- package/dist/client/assets/{home-now-card-nano-hZl9klbP.js → home-now-card-nano-Djhy6ax0.js} +1 -1
- package/dist/client/assets/home-now-card-xU5LGP7q.js +1 -0
- package/dist/client/assets/hooks-CdKx1CxP.js +2 -0
- package/dist/client/assets/host-advisor-B2Fqs5Dd.css +1 -0
- package/dist/client/assets/index-Bli6bTLU.js +10 -0
- package/dist/client/assets/index-D7UEHxaY.js +1 -0
- package/dist/client/assets/index-DFdlQs_c.js +1 -0
- package/dist/client/assets/index-DhfOMK0D.js +1 -0
- package/dist/client/assets/index-DzlEgstl.css +1 -0
- package/dist/client/assets/index-wLwc74Pu.css +1 -0
- package/dist/client/assets/inspector-panel-B8pigRsg.js +2 -0
- package/dist/client/assets/{keyboard-nav-Chf51dns.js → keyboard-nav-7iEtvu9P.js} +1 -1
- package/dist/client/assets/{lane-observe-BA3g9aVd.js → lane-observe-vfyACHi0.js} +1 -1
- package/dist/client/assets/{lane-roster-store-BiIVlYmG.js → lane-roster-store-pHT3TAVs.js} +1 -1
- package/dist/client/assets/layers-BiZA-Clc.js +1 -0
- package/dist/client/assets/layout-grid-DMpv9CZM.js +1 -0
- package/dist/client/assets/left-BayK4ocL.js +1 -0
- package/dist/client/assets/left-BhZhSrS2.js +1 -0
- package/dist/client/assets/left-BhgU6NOA.js +1 -0
- package/dist/client/assets/left-CY_FGnN7.js +1 -0
- package/dist/client/assets/left-Cq8mjamr.js +1 -0
- package/dist/client/assets/left-DH44V4I_.css +1 -0
- package/dist/client/assets/left-Dnqla0b5.js +2 -0
- package/dist/client/assets/left-Dy403II2.js +2 -0
- package/dist/client/assets/left-R2OOE7VG.css +1 -0
- package/dist/client/assets/left-advisor-oOAtJ9YE.js +1 -0
- package/dist/client/assets/left-agents-TIKe8vW8.js +1 -0
- package/dist/client/assets/left-default-owH0Lwxo.js +1 -0
- package/dist/client/assets/left-lanes-BE_co2lP.js +1 -0
- package/dist/client/assets/left-mission-C_nWUtfA.js +1 -0
- package/dist/client/assets/library-BSVrjn_m.js +1 -0
- package/dist/client/assets/{loader-circle-4LDsy4Ke.js → loader-circle-DoT8gpw6.js} +1 -1
- package/dist/client/assets/{local-agents-DIi2EacM.js → local-agents-BMadXuP1.js} +1 -1
- package/dist/client/assets/mentions-Cd6XticV.js +1 -0
- package/dist/client/assets/{mesh-ops-JZwGuAPn.js → mesh-ops-C0zCLTR8.js} +1 -1
- package/dist/client/assets/{mesh-view-store-Du7VqIT_.js → mesh-view-store-Cpqil_2D.js} +1 -1
- package/dist/client/assets/{message-circle-BM3XgevU.js → message-circle-44KSmbvQ.js} +1 -1
- package/dist/client/assets/{message-markup-BcY1lShv.js → message-markup-DAnnGpWr.js} +1 -1
- package/dist/client/assets/{message-square-ER1_q2pe.js → message-square-DlY4EneU.js} +1 -1
- package/dist/client/assets/mission-control-CnU7dNt1.css +1 -0
- package/dist/client/assets/{mission-control-store-C6w5iVfg.js → mission-control-store-DtjtRs9Z.js} +1 -1
- package/dist/client/assets/{observe-3-jn4SXb.js → observe-DL5_8-Zj.js} +1 -1
- package/dist/client/assets/{operator-attention-BwSPeheT.js → operator-attention-BqoWAlhp.js} +1 -1
- package/dist/client/assets/{page-status-0LPfBC8S.js → page-status-CW8co39E.js} +1 -1
- package/dist/client/assets/persistent-state-DYjP8lqN.js +1 -0
- package/dist/client/assets/{plus-C-2gTcPK.js → plus-64n9qucr.js} +1 -1
- package/dist/client/assets/profile-BkmuseW7.js +1 -0
- package/dist/client/assets/projects-inbox-C0umZMSY.js +1 -0
- package/dist/client/assets/{provider-BvAxRQfE.js → provider-CX9EWecp.js} +1 -1
- package/dist/client/assets/proxy-C35W-YHZ.js +1 -0
- package/dist/client/assets/{radio-v7UAMZGh.js → radio-BjpQTKT0.js} +1 -1
- package/dist/client/assets/{refresh-cw-B5To7b6B.js → refresh-cw-IgN2fZLM.js} +1 -1
- package/dist/client/assets/resolve-panes-CCqRkQdM.js +1 -0
- package/dist/client/assets/resolve-sidebar-context-JkxY8qsV.js +1 -0
- package/dist/client/assets/right-B3PQUHd5.js +1 -0
- package/dist/client/assets/right-B96CBzrV.js +1 -0
- package/dist/client/assets/right-BPirlFC8.js +1 -0
- package/dist/client/assets/right-BUP2Ro_M.js +1 -0
- package/dist/client/assets/right-BVWYPIFX.js +1 -0
- package/dist/client/assets/right-BoAJxwA3.js +1 -0
- package/dist/client/assets/right-C2aOC2li.js +1 -0
- package/dist/client/assets/right-CtPJjgOV.js +1 -0
- package/dist/client/assets/{right-BvoGOUKH.js → right-DqiVyo8v.js} +1 -1
- package/dist/client/assets/right-SfSu0zHC.js +1 -0
- package/dist/client/assets/{rocket-BQQQv2L5.js → rocket-DnmN_YOD.js} +1 -1
- package/dist/client/assets/{router-C65cZYPn.js → router-B0YclXYg.js} +1 -1
- package/dist/client/assets/{scope-views-BOOmgmwx.js → scope-views-Z8aoAmtU.js} +1 -1
- package/dist/client/assets/scout-voice-DvG_3stJ.js +1 -0
- package/dist/client/assets/{scoutbot-BTIErYHo.js → scoutbot-D4vuKzOL.js} +2 -2
- package/dist/client/assets/scoutbot-markdown-BJJyaPu2.js +6 -0
- package/dist/client/assets/{scroll-text-BuneRiAD.js → scroll-text-DRidbcse.js} +1 -1
- package/dist/client/assets/{search-7_n7CxWl.js → search-BbgsEMXa.js} +1 -1
- package/dist/client/assets/secondaryNavConfig-DyC_P9Wx.js +1 -0
- package/dist/client/assets/{selection-bridge-SlGsgHw2.js → selection-bridge-CpzFGx3-.js} +1 -1
- package/dist/client/assets/{send-horizontal-DP16OOIW.js → send-horizontal-BXo2uz3Z.js} +1 -1
- package/dist/client/assets/{server-pYOMFjrT.js → server-Dt3tpiBj.js} +1 -1
- package/dist/client/assets/{session-catalog-_QfQ7fhZ.js → session-catalog-CUQ8LUJY.js} +1 -1
- package/dist/client/assets/{session-table-CYN8e4s3.js → session-table-B4JOKevn.js} +1 -1
- package/dist/client/assets/settings-BzWCF3NF.js +1 -0
- package/dist/client/assets/{sliders-horizontal-D2Z8gz6J.js → sliders-horizontal-7V8B3xsf.js} +1 -1
- package/dist/client/assets/{sparkles-Bth2iK7t.js → sparkles-ytTwpCbZ.js} +1 -1
- package/dist/client/assets/{sse-CL6gctHY.js → sse-CSozY6mp.js} +1 -1
- package/dist/client/assets/system-surfaces-redesign-QVXNeGYw.css +1 -0
- package/dist/client/assets/{tail-display-BRcJltQa.js → tail-display-DcliDVkW.js} +1 -1
- package/dist/client/assets/{tail-events-NLIWLq27.js → tail-events-CrN-Rmxj.js} +1 -1
- package/dist/client/assets/{terminal-By1Lw2i2.js → terminal-BiNIXhna.js} +1 -1
- package/dist/client/assets/{terminal-relay-CjkI5aUy.js → terminal-relay-pSm7_An6.js} +1 -1
- package/dist/client/assets/{terminal-sessions-AmSgHklm.js → terminal-sessions-D4dHTRkt.js} +1 -1
- package/dist/client/assets/{terminal-takeover-7AvNpnkC.js → terminal-takeover-CtA3wcXh.js} +1 -1
- package/dist/client/assets/{runtime-picker-eDEvx2Mz.js → text-BR9Bap0E.js} +1 -1
- package/dist/client/assets/text-rLpBg4_z.css +1 -0
- package/dist/client/assets/{use-conversation-list-BCzY032j.js → use-conversation-list-C0bEXFeH.js} +1 -1
- package/dist/client/assets/{use-fleet-active-asks-CJ6-oj5k.js → use-fleet-active-asks-CK4aw-3G.js} +1 -1
- package/dist/client/assets/{use-mesh-ops-items-D5L-CKe_.js → use-mesh-ops-items-QixBijmT.js} +1 -1
- package/dist/client/assets/use-reduced-motion-BLn59zLn.js +1 -0
- package/dist/client/assets/{use-scout-dev-flags-BohC8seq.js → use-scout-dev-flags-JKb1EhFh.js} +1 -1
- package/dist/client/assets/{useAgentHoverCard-RsLUYyeh.js → useAgentHoverCard-6N8b7qsU.js} +1 -1
- package/dist/client/assets/useContentSecondaryNav-D-hVKzM9.js +1 -0
- package/dist/client/assets/{usePersistentState-D3M4m2Ou.js → usePersistentState-DOEahRlt.js} +1 -1
- package/dist/client/assets/{usePierreRuntime-B4hbNWTz.js → usePierreRuntime-Bq6mXrgd.js} +1 -1
- package/dist/client/assets/{wrench-M4G7WtYB.js → wrench-CQvdf7KT.js} +1 -1
- package/dist/client/assets/{x-ynOfVadO.js → x-BJyPzFnn.js} +1 -1
- package/dist/client/assets/{xterm-DZHyijPp.js → xterm-D6dE_wMr.js} +1 -1
- package/dist/client/assets/zap-rw7uwZht.js +1 -0
- package/dist/client/index.html +2 -2
- package/dist/main.mjs +629 -167
- package/dist/node/main.mjs +454 -270
- package/dist/pairing-runtime-controller.mjs +607 -357
- package/dist/runtime/base-daemon.mjs +384 -21
- package/dist/runtime/broker-daemon.mjs +11024 -10023
- package/dist/runtime/broker-process-manager.mjs +9 -3
- package/dist/runtime/mesh-discover.mjs +9 -3
- package/dist/scout-control-plane-web.mjs +1590 -984
- package/dist/scout-web-server.mjs +1590 -984
- package/package.json +4 -4
- package/dist/client/assets/ActivityScreen-aewI4Ul1.js +0 -1
- package/dist/client/assets/AgentAvatar-DMov24_o.js +0 -1
- package/dist/client/assets/AgentConfigurationScreen-BjG6ECjl.js +0 -1
- package/dist/client/assets/AgentDefinitionsWorkspace-D4MbSMXp.js +0 -1
- package/dist/client/assets/AgentFloorView-h9KDJdw0.js +0 -1
- package/dist/client/assets/AgentInfoScreen-SjhK_SBh.js +0 -1
- package/dist/client/assets/AgentLaneDetailSheet-DnAKe4e3.js +0 -4
- package/dist/client/assets/AgentLanesEmbedScreen-BNOYF16R.js +0 -1
- package/dist/client/assets/AgentLanesView-Ct-Gz5WD.js +0 -2
- package/dist/client/assets/AgentSessions-CDfSfNiE.js +0 -6
- package/dist/client/assets/AgentsConsole-BVxhBqRa.js +0 -1
- package/dist/client/assets/AgentsSubnav-CiIuzxnZ.js +0 -1
- package/dist/client/assets/BriefingDetailScreen-C83o2YfN.js +0 -6
- package/dist/client/assets/BrokerScreen-DplF8d_X.js +0 -5
- package/dist/client/assets/ChatCollapsedStrip-BRljIymi.js +0 -1
- package/dist/client/assets/ContextMenu-CxkmFQcN.js +0 -1
- package/dist/client/assets/ConversationComposer-CWohCCmn.js +0 -1
- package/dist/client/assets/ConversationFeedRows-IWh0JSIL.js +0 -1
- package/dist/client/assets/ConversationHeader-BxTzXl8e.js +0 -1
- package/dist/client/assets/ConversationPanels-D9UCwNkS.js +0 -2
- package/dist/client/assets/ConversationScreen-oZSitVtX.js +0 -1
- package/dist/client/assets/ConversationScreen-yIKEsm-8.css +0 -1
- package/dist/client/assets/ConversationStatus-B6pAbo2w.js +0 -1
- package/dist/client/assets/DocumentFocusViewer-DRKjNG9s.js +0 -1
- package/dist/client/assets/FleetSearch-CYeWn85V.js +0 -1
- package/dist/client/assets/FleetSearch-EXOe8ulE.css +0 -1
- package/dist/client/assets/FlightObserveScreen-DYJJ3Z2B.js +0 -1
- package/dist/client/assets/HomeHero-BPBArHXa.js +0 -1
- package/dist/client/assets/HomeHero-DEl-WBsT.css +0 -1
- package/dist/client/assets/KnowledgeSearchScreen-BP8tD-Bh.js +0 -1
- package/dist/client/assets/LaneTraceDetailSheet-B4i1Ut4R.js +0 -1
- package/dist/client/assets/MessageComposerSuggestions-Dfc3PH2y.js +0 -1
- package/dist/client/assets/MessagesScreen-TgSL5KMc.js +0 -1
- package/dist/client/assets/MissionControlView-D629w2A8.js +0 -1
- package/dist/client/assets/MissionFocusOverlay-Bubrr8Gc.js +0 -1
- package/dist/client/assets/MissionLeftAgentRow-DokImu4Y.js +0 -1
- package/dist/client/assets/MissionLogPane-Cs0LuIkn.js +0 -1
- package/dist/client/assets/NewChatComposer-S08F6_La.js +0 -19
- package/dist/client/assets/ObserveEmbedScreen-CHx2sEAA.js +0 -2
- package/dist/client/assets/ObserveTextFlow-_ApDwRCO.js +0 -2
- package/dist/client/assets/ObservedTopologyPanel-ByW7Ar7p.js +0 -2
- package/dist/client/assets/OpenScoutAppShell-DTmnbG-h.js +0 -88
- package/dist/client/assets/OpsAgentsView-DiFuHcJs.js +0 -1
- package/dist/client/assets/OpsScreen-CCR3U_9P.js +0 -1
- package/dist/client/assets/OpsSubnav-CZs_OL2N.js +0 -1
- package/dist/client/assets/PlanView-C54eAzig.js +0 -1
- package/dist/client/assets/ProjectAgentProfile-BEfYOaxc.js +0 -1
- package/dist/client/assets/ProjectAgentProfileHero-B4f_AoCr.js +0 -1
- package/dist/client/assets/ProjectsInbox-DoPZ17FC.js +0 -2
- package/dist/client/assets/ProjectsRail-CWOkZjsY.js +0 -1
- package/dist/client/assets/ProjectsScreen-Dse0Q6p6.js +0 -1
- package/dist/client/assets/ProjectsThreadAside-DMnfyPLE.js +0 -1
- package/dist/client/assets/Provider-DKZWuzSR.js +0 -1
- package/dist/client/assets/RailRow-Cf9LOiEj.css +0 -1
- package/dist/client/assets/RailRow-DIGd3MMM.js +0 -1
- package/dist/client/assets/RawSessionsTable-Zkl4YDvz.js +0 -1
- package/dist/client/assets/RealtimeVoiceScreen-B_PMJxY_.js +0 -1
- package/dist/client/assets/RepoDiffViewer-VrUJw33u.js +0 -7
- package/dist/client/assets/RepoDiffViewerLazy-BPg_JkYW.js +0 -2
- package/dist/client/assets/ScoutDeckSurface-MbwGp6Ab.js +0 -1
- package/dist/client/assets/ScoutbotBroadcastChip-DAKQKB25.js +0 -2
- package/dist/client/assets/ScoutbotRealtimeVoiceCall-Br4bYVAx.js +0 -1
- package/dist/client/assets/SessionRefScreen-DLZNFZFK.js +0 -1
- package/dist/client/assets/SessionsScreen-D-hN1n4k.js +0 -1
- package/dist/client/assets/SettingsDrawer-BFsnww-k.js +0 -3
- package/dist/client/assets/SettingsDrawer-UX7pFJU_.css +0 -1
- package/dist/client/assets/SettingsScreen-Bc3Xtv5V.js +0 -1
- package/dist/client/assets/Terminal-D_OmdFmr.js +0 -1
- package/dist/client/assets/TerminalEmbedScreen-D21ytNXW.js +0 -1
- package/dist/client/assets/WorkFilesViewer-BDMNbxE4.js +0 -1
- package/dist/client/assets/agent-identity-BxCsXnDp.js +0 -1
- package/dist/client/assets/api-h5zurxmi.js +0 -1
- package/dist/client/assets/broker-display-pp33bLsu.js +0 -2
- package/dist/client/assets/collapsed-strip-Dz-of2SM.css +0 -1
- package/dist/client/assets/content-B-SUUhXj.js +0 -1
- package/dist/client/assets/content-BRY2vo1_.js +0 -1
- package/dist/client/assets/content-BTm0mVyD.js +0 -1
- package/dist/client/assets/content-BTqvyb5E.js +0 -1
- package/dist/client/assets/content-BjDaXmSD.js +0 -1
- package/dist/client/assets/content-BrR6deGh.js +0 -1
- package/dist/client/assets/content-C5yvBEMy.js +0 -1
- package/dist/client/assets/content-CkhG__-v.js +0 -1
- package/dist/client/assets/content-CudIBsiP.js +0 -1
- package/dist/client/assets/content-DBb7ppd5.js +0 -1
- package/dist/client/assets/content-DEw_kGyK.js +0 -1
- package/dist/client/assets/content-DIy0DCzK.js +0 -1
- package/dist/client/assets/content-THl9hRAo.js +0 -1
- package/dist/client/assets/content-vi9FbmV9.js +0 -1
- package/dist/client/assets/content-wcgPMGVf.js +0 -1
- package/dist/client/assets/conversation-model-CHwHZNw-.js +0 -1
- package/dist/client/assets/conversation-motion-features-zU0k3Agz.js +0 -1
- package/dist/client/assets/ctx-panel-B4s49N9e.css +0 -1
- package/dist/client/assets/discover-NDAqNvKt.js +0 -2
- package/dist/client/assets/embed-entry-BVR09F6e.js +0 -2
- package/dist/client/assets/home-moving-signal-C8dTXieA.js +0 -1
- package/dist/client/assets/home-moving-signal-CAa0V91u.css +0 -1
- package/dist/client/assets/home-now-card-BgvVcE83.js +0 -1
- package/dist/client/assets/hooks-DBIezYS2.js +0 -2
- package/dist/client/assets/index-BMwKgdz_.js +0 -1
- package/dist/client/assets/index-Bu-fckyR.css +0 -1
- package/dist/client/assets/index-BxoufAPA.js +0 -1
- package/dist/client/assets/index-Cj7NnSxI.js +0 -1
- package/dist/client/assets/index-CvF09yvf.css +0 -1
- package/dist/client/assets/index-o4FKpU7Z.js +0 -10
- package/dist/client/assets/inspector-panel-Dy2cVTCi.js +0 -2
- package/dist/client/assets/left-BC7p5QbT.js +0 -1
- package/dist/client/assets/left-BCSGqccQ.js +0 -1
- package/dist/client/assets/left-BSyj8PuJ.js +0 -2
- package/dist/client/assets/left-Bk3XnxPD.css +0 -1
- package/dist/client/assets/left-CCoobxPS.css +0 -1
- package/dist/client/assets/left-DDnxNUxd.js +0 -1
- package/dist/client/assets/left-DLoDKxT5.js +0 -2
- package/dist/client/assets/left-O-TBH7JB.js +0 -1
- package/dist/client/assets/left-agents-Dk9Y89lb.js +0 -1
- package/dist/client/assets/left-default-B3JBRQNJ.js +0 -1
- package/dist/client/assets/left-lanes-30Oe_3RM.js +0 -1
- package/dist/client/assets/left-mission-DEl4-7xu.js +0 -1
- package/dist/client/assets/left-plan-B4qdm4Gn.js +0 -2
- package/dist/client/assets/left-rvUOB14X.js +0 -1
- package/dist/client/assets/library-DDKSLFJ_.js +0 -1
- package/dist/client/assets/mentions-CvDaviLJ.js +0 -1
- package/dist/client/assets/mission-control-m3BTDQ9l.css +0 -1
- package/dist/client/assets/model-Co0zkMIc.js +0 -1
- package/dist/client/assets/plan-view-D56fneVF.css +0 -1
- package/dist/client/assets/profile-DW80Gn5k.js +0 -1
- package/dist/client/assets/projects-inbox-DCeD3FfV.js +0 -1
- package/dist/client/assets/resolve-panes-BDi9Qx4R.js +0 -1
- package/dist/client/assets/resolve-sidebar-context-HE-5eZYa.js +0 -1
- package/dist/client/assets/right-BDf_yTv6.js +0 -1
- package/dist/client/assets/right-C-bgjYg-.js +0 -1
- package/dist/client/assets/right-C3JdEfYQ.js +0 -1
- package/dist/client/assets/right-CYIs2tEe.js +0 -1
- package/dist/client/assets/right-CyRCv6Up.js +0 -1
- package/dist/client/assets/right-DBYGtoRv.js +0 -1
- package/dist/client/assets/right-o3LHMiKa.js +0 -1
- package/dist/client/assets/right-oPrcx9MX.js +0 -1
- package/dist/client/assets/right-sSvBUK-j.js +0 -1
- package/dist/client/assets/runtime-picker-vhm0gtLs.css +0 -1
- package/dist/client/assets/scout-voice-B7kXlkcl.js +0 -1
- package/dist/client/assets/secondaryNavConfig-CSFDCQAf.js +0 -1
- package/dist/client/assets/system-surfaces-redesign-B7GQhfpw.css +0 -1
- package/dist/client/assets/text-DsBWV_4k.js +0 -1
- package/dist/client/assets/use-reduced-motion-CqXpVXv-.js +0 -1
- package/dist/client/assets/useContentSecondaryNav-DOr5yHbT.js +0 -1
- /package/dist/client/assets/{document-focus-viewer-BSC_JwVE.css → DocumentFocusViewer-BSC_JwVE.css} +0 -0
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{r as a,j as e}from"./index-Bli6bTLU.js";import{r as us}from"./index-DFdlQs_c.js";import{D as hs}from"./text-BR9Bap0E.js";import{E as Ce}from"./EmptyState-BnDda92b.js";import{y as fs,C as ms,z as ps,R as bs,A as ys,B as gs}from"./NewChatComposer-Bgqes0UQ.js";import{a as ne}from"./api-DEHEgJ9m.js";import{c as xs}from"./clipboard-e3fSpeo7.js";import{u as js}from"./sse-CSozY6mp.js";import{b as Ee}from"./status-tone-BM_zuRy1.js";import{t as Ie,b as Ye,n as V}from"./time-Dhsh_2EG.js";import{u as Ge}from"./Provider-Ve8yXaWR.js";import{o as Oe}from"./openContent-C6XO6kr5.js";import{g as ks,b as oe,h as Xe,d as vs,i as ws,j as Ns,k as Ss,l as Rs}from"./broker-display-Q75fupqG.js";import{BrokerMetadataPanel as As}from"./BrokerMetadataPanel-DFAH-NO6.js";import{DispatchAftermath as Cs}from"./DispatchAftermath-CH02HAVw.js";import{i as Is,c as $s,n as _e}from"./keyboard-nav-7iEtvu9P.js";import{ShikiPane as Ds}from"./ShikiPane-DyEJdcvb.js";import{d as Es}from"./types-B0PlfpKc.js";/* empty css */import{L as ke}from"./loader-circle-DoT8gpw6.js";import{R as Fs}from"./refresh-cw-IgN2fZLM.js";import{X as $e}from"./x-BJyPzFnn.js";import{c as Ne}from"./createLucideIcon-DLlxGjKt.js";import{E as Ke}from"./external-link-BGHC_naA.js";import{C as Ms}from"./chevron-down-Da5tV19_.js";import{S as Ls}from"./sparkles-ytTwpCbZ.js";import{P as Ts}from"./plus-64n9qucr.js";import{S as Ps}from"./send-horizontal-BXo2uz3Z.js";import{A as Ue}from"./arrow-right-B0Yi01Zr.js";import{C as Bs}from"./check-Bfs7hMb1.js";import{C as zs}from"./copy-De4s38o2.js";import{M as qs}from"./message-square-DlY4EneU.js";import{R as Os}from"./radio-BjpQTKT0.js";import{M as _s,b as Ks}from"./DocumentFocusViewer-DmtFisY9.js";import{B as Us}from"./bot-r2IuAuJd.js";const Hs=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],Js=Ne("arrow-down",Hs);const Qs=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-4 8",key:"7n84p3"}]],Ws=Ne("at-sign",Qs);const Vs=[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]],Ys=Ne("hash",Vs);const Gs=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]],Xs=Ne("paperclip",Gs),Zs=160;function He(s){const t=new URLSearchParams({limit:String(Zs)});return s&&t.set("cursor",s),`/api/broker?${t.toString()}`}const Je={index:-1,request:0};function er(s,t){return{index:t,request:s.request+1}}function Ze(s,t){return t===s.index?s:{index:t,request:s.request}}function sr(s,t){return s.index<t?s:Ze(s,t>0?t-1:-1)}function rr(s,t){return s.request!==t}function tr({enabled:s,rowCount:t,onActivateRow:n,onClearSelection:o}){const[d,u]=a.useState(Je),b=d.index,f=a.useRef(new Map),c=a.useRef(Je.request),v=a.useCallback(y=>{u(m=>er(m,typeof y=="function"?y(m.index):y))},[]),j=a.useCallback(y=>{u(m=>Ze(m,typeof y=="function"?y(m.index):y))},[]);a.useEffect(()=>{if(!rr(d,c.current)||(c.current=d.request,d.index<0))return;const y=f.current.get(d.index);y?.scrollIntoView({block:"nearest"}),y?.focus()},[d]),a.useEffect(()=>{u(y=>sr(y,t))},[t]);const I=a.useCallback((y,m)=>{m?f.current.set(y,m):f.current.delete(y)},[]);a.useEffect(()=>{if(!s)return;const y=m=>{if(document.querySelector(".sys-broker-page")&&!(Is(m.target)||$s())&&t!==0){if(m.key==="Escape"){o&&(m.preventDefault(),o(),j(-1));return}if(m.key==="ArrowDown"||m.key==="j"){m.preventDefault(),v(N=>_e(N,t,1));return}if(m.key==="ArrowUp"||m.key==="k"){m.preventDefault(),v(N=>_e(N,t,-1));return}if(m.key==="Home"||m.key==="g"&&!m.shiftKey){m.preventDefault(),v(0);return}if(m.key==="End"||m.key==="G"){m.preventDefault(),v(t-1);return}if(m.key==="Enter"||m.key===" "){const N=b<0?0:b;m.preventDefault(),v(N),n(N)}}};return window.addEventListener("keydown",y),()=>window.removeEventListener("keydown",y)},[s,b,v,n,o,t,j]);const U=a.useCallback(y=>({tabIndex:b===y?0:-1,ref:m=>I(y,m),onFocus:()=>j(y)}),[b,I,j]);return{focusedIndex:b,setFocusedIndex:j,getRowFocusProps:U}}const be=["all","delivered","failed"],ar={all:"All",delivered:"Delivered",failed:"Failed"};function nr(s){switch(s){case"success":return"Success";case"failed_query":return"Query failure";case"failed_delivery":return"Delivery failure";default:return"Delivery attempt"}}function es(s){return s.messageId??s.deliveryId??s.invocationId??s.id}function ss(s){switch(Ee(s.kind,s.status)){case"success":return"Delivered";case"danger":return"Failed";case"working":return"Pending";case"warning":return"Held";default:return s.status?s.status.charAt(0).toUpperCase()+s.status.slice(1):"Queued"}}function ve(s){if(!s)return"··";const t=s.trim().split(/\s+/).filter(Boolean);if(t.length===0)return"··";const n=t[t.length-1];return/^\d+$/.test(n)?n.slice(-2):t.length>=2?(t[0][0]+t[1][0]).toUpperCase():s.trim().slice(0,2).toUpperCase()}function or(s){const t=V(s)??0;return new Date(t).toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit"})}function Qe(s){const t=V(s);return t===null?"—":new Date(t).toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})}function Se(s,t,n=0){if(!s||typeof s!="object"||Array.isArray(s)||n>3)return;const o=s;for(const d of t)if(o[d]!==void 0&&o[d]!==null)return o[d];for(const d of Object.values(o)){const u=Se(d,t,n+1);if(u!==void 0)return u}}function K(s,...t){const n=Se(s.metadata,t);return typeof n!="string"&&typeof n!="number"?null:String(n).trim()||null}function we(s,...t){const n=Se(s.metadata,t);return typeof n=="number"||typeof n=="string"?V(n):null}function rs(s){switch(s){case"dm":return"Direct · agent";case"channel":return"Channel";case"broadcast":return"Broadcast";case null:return"No route";default:return s.replaceAll("_"," ")}}function De(s,t){if(t==="to")return s.route==="channel"?"Channel":s.route==="broadcast"?"Broadcast":s.target?.toLowerCase().includes("operator")?"Operator":"Agent lane";const n=K(s,"class","actorClass")?.toLowerCase();return n==="operator"||n==="human"?"Operator":n==="agent"?"Agent":s.actorName?.toLowerCase().includes("operator")?"Operator":"Sender"}function ir(s){const t=Se(s.metadata,["latencyMs","durationMs"]);if(typeof t=="number"&&Number.isFinite(t)&&t>=0)return t<1e3?`${Math.round(t)}ms`:`${(t/1e3).toFixed(t<1e4?1:0)}s`;const n=we(s,"sentAt","createdAt")??V(s.ts),o=we(s,"deliveredAt","completedAt");if(n===null||o===null||o<n)return"—";const d=o-n;return d<1e3?`${d}ms`:`${(d/1e3).toFixed(d<1e4?1:0)}s`}function Fe({route:s}){switch(s){case"channel":return e.jsx(Ys,{size:12,"aria-hidden":"true"});case"broadcast":return e.jsx(Os,{size:12,"aria-hidden":"true"});case"dm":return e.jsx(Ws,{size:12,"aria-hidden":"true"});default:return e.jsx(qs,{size:12,"aria-hidden":"true"})}}function lr(s,t){if(!t)return null;const n=t.trim().replace(/^@/,"").toLowerCase();return s.find(o=>[o.id,o.name,o.handle,o.selector,o.defaultSelector,o.conversationId,o.harnessSessionId].some(d=>d?.trim().replace(/^@/,"").toLowerCase()===n))??null}function We(s,t,n){const o=n==="from"?s.actorName:s.target,d=lr(t,o),u=d?.name??o??(n==="from"?"Unknown":"No target"),b=d?"Agent":n==="to"&&s.conversationId?"Session route":De(s,n);return{label:u,kind:b,agent:d}}function cr(s,t,n){const o=n.agent??t.agent;return[{label:"From",value:t.kind},{label:"To",value:n.kind},{label:"Target",value:s.target??n.label},{label:"Channel",value:rs(s.route)},{label:"Project",value:o?.project??K(s,"project","projectName")},{label:"Branch",value:o?.branch??K(s,"branch")},{label:"Runtime",value:o?[o.harness,o.model,o.reasoningEffort].filter(Boolean).join(" · ")||null:[K(s,"harness"),K(s,"model")].filter(Boolean).join(" · ")||null},{label:"Machine",value:o?.authorityNodeName??o?.homeNodeName??o?.authorityNodeId??o?.homeNodeId??K(s,"machine","machineName","nodeName")}].filter(d=>!!d.value)}function Ve({party:s,route:t,side:n}){return e.jsxs("span",{className:`sys-broker-route-end sys-broker-route-end--${n}`,children:[e.jsx("span",{className:"sys-broker-avatar sys-broker-endpoint-avatar","aria-hidden":"true",children:s.agent||n==="from"?ve(s.label):e.jsx(Fe,{route:t})}),e.jsx("span",{className:"sys-broker-endpoint-name",title:s.label,children:s.label})]})}function dr({attempt:s,agents:t}){const n=We(s,t,"from"),o=We(s,t,"to"),d=cr(s,n,o),u=`dispatch-route-${s.id}`;return e.jsxs("span",{className:"sys-broker-route",tabIndex:0,"aria-describedby":u,children:[e.jsx(Ve,{party:n,route:s.route,side:"from"}),e.jsx(Ue,{className:"sys-broker-route-arrow",size:11,"aria-hidden":"true"}),e.jsx(Ve,{party:o,route:s.route,side:"to"}),e.jsxs("span",{className:"sys-broker-endpoint-card",id:u,role:"tooltip",children:[e.jsx("span",{className:"sys-broker-endpoint-card-head",children:e.jsxs("span",{className:"sys-broker-endpoint-card-edge",children:[e.jsx("span",{className:"sys-broker-avatar sys-broker-endpoint-avatar","aria-hidden":"true",children:ve(n.label)}),e.jsx("strong",{children:n.label}),e.jsx(Ue,{className:"sys-broker-route-arrow",size:11,"aria-hidden":"true"}),e.jsx("span",{className:"sys-broker-avatar sys-broker-endpoint-avatar","aria-hidden":"true",children:o.agent?ve(o.label):e.jsx(Fe,{route:s.route})}),e.jsx("strong",{children:o.label})]})}),e.jsx("span",{className:"sys-broker-endpoint-card-body",children:d.map(b=>e.jsxs("span",{className:"sys-broker-endpoint-card-field",children:[e.jsx("small",{children:b.label}),e.jsx("code",{title:b.value,children:b.value})]},b.label))})]})]})}function ye(s){const t=V(s)??0,n=new Date(t);return`${n.getFullYear()}-${n.getMonth()}-${n.getDate()}`}function ur(s,t=Date.now()){const n=V(s)??0,o=new Date(n),d=new Date(t),u=new Date(t);return u.setDate(u.getDate()-1),ye(s)===ye(d.getTime())?"Today":ye(s)===ye(u.getTime())?"Yesterday":o.toLocaleDateString(void 0,{month:"short",day:"numeric",year:o.getFullYear()===d.getFullYear()?void 0:"numeric"})}function hr(s,t,n){return{...t,source:s.source,attempts:[...s.attempts,...t.attempts],failedQueries:s.failedQueries,failedDeliveries:s.failedDeliveries,dialogue:s.dialogue,ledger:{...t.ledger,cursors:{...s.ledger.cursors,[n]:t.ledger.cursors[n]},hasMore:{...s.ledger.hasMore,[n]:t.ledger.hasMore[n]}}}}function fr({navigate:s,embedded:t=!1,initialAttemptId:n}){const{route:o,agents:d,selectedBrokerAttempt:u,inspectBrokerAttempt:b,clearBrokerAttempt:f}=Ge(),[c,v]=a.useState(null),j=o.view==="broker"?o.filter??"all":"all",[I,U]=a.useState(!0),[y,m]=a.useState(!1),[N,Y]=a.useState(!1),[ae,B]=a.useState(null),E=a.useRef(null),F=a.useRef(0),z=a.useRef(null),M=a.useCallback(async(i="initial")=>{const h=++F.current;!E.current&&i!=="background"?(U(!0),B(null)):m(!0);try{const x=await ne(He());if(h!==F.current)return;E.current=x,v(x),B(null)}catch(x){if(h!==F.current)return;B(x instanceof Error?x.message:String(x))}finally{h===F.current&&(U(!1),m(!1))}},[]),G=a.useCallback(async()=>{const i=E.current;if(!i||N)return;const h="attempts",x=i.ledger.cursors[h];if(!x||!i.ledger.hasMore[h])return;const T=++F.current;Y(!0),B(null);try{const P=await ne(He(x));if(T!==F.current)return;const se=E.current,ue=se?hr(se,P,h):P;E.current=ue,v(ue)}catch(P){if(T!==F.current)return;B(P instanceof Error?P.message:String(P))}finally{T===F.current&&Y(!1)}},[N]),le=a.useCallback(()=>{z.current||(z.current=setTimeout(()=>{z.current=null,M("background")},250))},[M]);a.useEffect(()=>(M("initial"),()=>{z.current&&clearTimeout(z.current)}),[M]),js(i=>{(i.kind==="message.posted"||i.kind==="delivery.planned"||i.kind==="delivery.attempted"||i.kind==="delivery.state.changed"||i.kind==="scout.dispatched")&&le()});const k=a.useMemo(()=>{if(!c)return[];const i=new Map(c.dialogue.map(h=>[h.id,h.body]));return ks(c.attempts).map(h=>{const x=h.messageId?i.get(h.messageId):null;return x&&x!==h.detail?{...h,detail:x}:h})},[c]),A=a.useMemo(()=>{switch(j){case"delivered":return k.filter(i=>!oe(i));case"failed":return k.filter(oe);default:return k}},[j,k]),ge=c?.ledger.hasMore.attempts??!1,X=a.useMemo(()=>({all:k.length,delivered:k.filter(i=>!oe(i)).length,failed:k.filter(oe).length}),[k]),$=a.useMemo(()=>{const i=o.view==="broker"?o.attemptId:void 0;return!c||!i?null:k.find(h=>h.id===i)??c.attempts.find(h=>h.id===i)??c.failedQueries.find(h=>h.id===i)??c.failedDeliveries.find(h=>h.id===i)??null},[c,k,o]),Z=$?`${$.id}\0${$.status}\0${$.ts}`:null,D=u?`${u.id}\0${u.status}\0${u.ts}`:null;a.useEffect(()=>{$&&Z!==D&&b($)},[D,b,$,Z]);const[C,S]=a.useState(null),q=a.useRef(!1),O=a.useCallback(i=>{if(t){q.current=!0,S(i);return}b(i)},[t,b]),H=a.useCallback(()=>{if(t){q.current=!0,S(null);return}f()},[f,t]),J=a.useCallback(i=>{const h=A[i];h&&(O(h),window.dispatchEvent(new CustomEvent("scout:set-inspector-width",{detail:{width:520}})))},[A,O]),{getRowFocusProps:ce,setFocusedIndex:xe}=tr({enabled:!!c&&A.length>0,rowCount:A.length,onActivateRow:J,onClearSelection:H}),de=C?.id??null,L=C?`${C.id} ${C.status} ${C.ts}`:null;a.useEffect(()=>{if(!t||!de)return;const i=k.find(h=>h.id===de);i&&`${i.id} ${i.status} ${i.ts}`!==L&&S(i)},[t,de,L,k]),a.useEffect(()=>{if(!t||!n||!c||q.current||C)return;const i=k.find(h=>h.id===n)??c.attempts.find(h=>h.id===n)??c.failedQueries.find(h=>h.id===n)??c.failedDeliveries.find(h=>h.id===n);i&&(q.current=!0,S(i))},[c,t,C,k,n]),a.useEffect(()=>{const i=o.view==="broker"?o.attemptId:void 0;if(!i)return;const h=A.findIndex(x=>x.id===i);h>=0&&xe(h)},[A,j,o,xe]);const ee=a.useCallback(i=>{const x=(be.indexOf(j)+i+be.length)%be.length,T=be[x];s({view:"broker",...T==="all"?{}:{filter:T}})},[j,s]),R=t?C:null;return e.jsx("div",{className:`s-ops${t?" s-ops--embedded":""}${R?" s-ops--split":""}`,children:e.jsxs("div",{className:"s-ops-body",children:[e.jsxs("div",{className:"sys-surface-page sys-surface-page-wide sys-surface-page-fluid sys-broker-page",children:[e.jsxs("div",{className:"sys-ledger-toolbar","aria-label":"Dispatch controls",children:[c?e.jsx("div",{className:"sys-tab-row sys-tab-row--toolbar",role:"tablist","aria-label":"Dispatch message filters",onKeyDown:i=>{i.key==="ArrowRight"?(i.preventDefault(),ee(1)):i.key==="ArrowLeft"&&(i.preventDefault(),ee(-1))},children:be.map(i=>e.jsxs("button",{type:"button",role:"tab","aria-selected":j===i,className:`sys-tab${j===i?" sys-tab-active":""}`,onClick:()=>s({view:"broker",...i==="all"?{}:{filter:i}}),children:[e.jsx("span",{children:ar[i]}),e.jsx("span",{className:"sys-tab-count",children:X[i]})]},i))}):e.jsx("div",{className:"sys-ledger-kicker",children:"Dispatch ledger"}),e.jsxs("div",{className:"sys-page-actions sys-ledger-actions",children:[e.jsx("div",{className:"sys-sync-note",children:I?"Loading dispatch ledger...":c?`Updated ${Ie(c.generatedAt)}${c.source?.latestMessageAt?` · latest message ${Ie(c.source.latestMessageAt)}`:""}`:"Waiting for dispatch data"}),e.jsx("button",{type:"button",className:"s-btn",disabled:I||y,onClick:()=>{M("manual")},children:y?"Refreshing...":"Refresh"})]})]}),ae&&e.jsxs("div",{className:"sys-banner sys-banner-warning",children:[e.jsx("strong",{children:"Refresh failed."}),e.jsx("span",{children:ae})]}),y&&c&&e.jsxs("div",{className:"sys-broker-source-note",role:"status","aria-live":"polite",children:[e.jsx(ke,{className:"sys-broker-source-spinner",size:12,"aria-hidden":"true"}),e.jsx("strong",{children:"Updating dispatches…"})]}),!y&&c?.source?.mode==="sqlite_projection"&&c.source.status==="degraded"&&c.source.detail&&e.jsxs("div",{className:"sys-broker-source-note sys-broker-source-note--warning",role:"status","aria-label":c.source.detail,title:c.source.detail,children:[e.jsx("span",{className:"sys-broker-source-dot","aria-hidden":"true"}),e.jsx("strong",{children:"Dispatch may be out of date"}),e.jsx("span",{children:"Live broker unavailable; showing saved dispatch history."})]}),I&&!c&&e.jsx(Ce,{title:"Loading dispatch",body:"Reading the dispatch database snapshot."}),!I&&!c&&!ae&&e.jsx(Ce,{title:"No dispatch data",body:"No dispatch rows are available yet."}),c&&e.jsxs(e.Fragment,{children:[e.jsx(mr,{attempts:A,agents:d,selectedAttemptId:t?C?.id??null:u?.id??(o.view==="broker"?o.attemptId??null:null),onInspect:O,getRowFocusProps:ce}),A.length>0&&ge&&e.jsx("div",{className:"sys-ledger-footer",children:e.jsx("button",{type:"button",className:"s-btn",disabled:N,onClick:()=>{G()},children:N?"Loading older...":"Load older"})})]})]}),R&&e.jsx("div",{className:"s-broker-embed-detail",children:e.jsx(ts,{attempt:R,navigate:s,onClose:H})})]})})}function mr({attempts:s,agents:t,selectedAttemptId:n,onInspect:o,getRowFocusProps:d}){if(s.length===0)return e.jsx(Ce,{title:"No dispatch rows",body:"No dispatch rows are available yet."});const u=s.reduce((b,f,c)=>{const v=ye(f.ts),j=b[b.length-1];return j?.key===v?j.attempts.push({attempt:f,index:c}):b.push({key:v,label:ur(f.ts),attempts:[{attempt:f,index:c}]}),b},[]);return e.jsxs("div",{className:"sys-broker-wire","aria-label":"Dispatch ledger",children:[e.jsxs("div",{className:"sys-broker-wire-head","aria-hidden":"true",children:[e.jsx("span",{className:"sys-broker-col sys-broker-col--route",children:"Route"}),e.jsx("span",{className:"sys-broker-col sys-broker-col--msg",children:"Message"}),e.jsx("span",{className:"sys-broker-col sys-broker-col--time",children:"Time"})]}),u.map(b=>e.jsxs("section",{className:"sys-broker-day","aria-labelledby":`dispatch-day-${b.key}`,children:[e.jsxs("header",{className:"sys-broker-day-head",children:[e.jsx("h2",{id:`dispatch-day-${b.key}`,children:b.label}),e.jsxs("span",{children:[b.attempts.length," ",b.attempts.length===1?"dispatch":"dispatches"]})]}),e.jsx("div",{className:"sys-broker-wire-body",role:"list",children:b.attempts.map(({attempt:f,index:c})=>{const v=Ee(f.kind,f.status),j=oe(f),I=!j&&(v==="working"||v==="warning"),U=Xe(f),y=ss(f),m=j?U:I?y:null,N=()=>{o(f),window.dispatchEvent(new CustomEvent("scout:set-inspector-width",{detail:{width:520}}))};return e.jsxs("div",{role:"listitem",className:`sys-broker-wire-row${j?" sys-broker-wire-row--failure":I?" sys-broker-wire-row--pending":""}${n===f.id?" sys-broker-wire-row--selected":""}`,"aria-label":`${y}. Inspect ${f.detail}`,onClick:N,...d(c),children:[e.jsx("div",{className:"sys-broker-cell sys-broker-col--route",children:e.jsx(dr,{attempt:f,agents:t})}),e.jsxs("div",{className:"sys-broker-cell sys-broker-col--msg",children:[e.jsx("span",{className:"sys-broker-msg",title:f.detail,children:f.detail}),m&&e.jsx("span",{className:`sys-broker-msg-error sys-broker-msg-error--${j?"danger":"warning"}`,title:m,children:m})]}),e.jsx("div",{className:"sys-broker-cell sys-broker-col--time",children:e.jsx("time",{className:"sys-broker-time-abs",title:`${Ie(f.ts)} · ${Ye(f.ts)}`,children:or(f.ts)})})]},f.id)})})]},b.key))]})}function pr(s){const t=es(s);return[{label:"Kind",value:nr(s.kind)},{label:"Time",value:Ye(s.ts)},{label:"Actor",value:s.actorName},{label:"Target",value:s.target},{label:"Route",value:s.route},{label:"Conversation",value:s.conversationId},{label:"Reference",value:t},{label:"Message",value:s.messageId===t?null:s.messageId},{label:"Delivery",value:s.deliveryId===t?null:s.deliveryId},{label:"Invocation",value:s.invocationId===t?null:s.invocationId}].filter(n=>!!n.value)}function ie({value:s,subject:t,className:n}){const[o,d]=a.useState("idle"),u=a.useRef(null);a.useEffect(()=>{d("idle")},[s]),a.useEffect(()=>()=>{u.current&&clearTimeout(u.current)},[]);const b=a.useCallback(async()=>{const v=await xs(s);u.current&&clearTimeout(u.current),d(v?"copied":"failed"),u.current=setTimeout(()=>{d("idle"),u.current=null},1500)},[s]),f=o==="copied",c=o==="failed";return e.jsx("button",{type:"button",className:`sys-copy-btn${n?` ${n}`:""}${f?" sys-copy-btn--copied":""}${c?" sys-copy-btn--failed":""}`,onClick:()=>{b()},title:f?`Copied ${t}`:c?"Copy failed":`Copy ${t}`,"aria-label":f?`Copied ${t}`:c?`Copy ${t} failed`:`Copy ${t}`,children:f?e.jsx(Bs,{size:14,"aria-hidden":"true"}):e.jsx(zs,{size:14,"aria-hidden":"true"})})}function br(s){const t=s.trim();if(t.startsWith("{")||t.startsWith("["))try{return{code:JSON.stringify(JSON.parse(t),null,2),path:"payload.json",language:"JSON"}}catch{}return{code:s,path:"payload.md",language:"Text · Markdown"}}function yr({payload:s}){const t=a.useMemo(()=>br(s),[s]),[n,o]=a.useState(!1),d=a.useRef(null),u=t.code.split(`
|
|
2
|
+
`).length;a.useEffect(()=>{const f=d.current;!f||!n||f.open||f.showModal()},[n]),a.useEffect(()=>{o(!1)},[s]);const b=e.jsx("div",{className:"sys-broker-payload-code","data-language":t.path==="payload.json"?"json":"markdown",role:"region","aria-label":`Dispatch payload, ${t.language}`,tabIndex:0,children:e.jsx(Ds,{code:t.code,path:t.path})});return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"sys-broker-payload-head",children:[e.jsx("span",{className:"sys-detail-label",children:"Payload"}),e.jsxs("span",{className:"sys-broker-payload-meta",children:[t.language," · ",u," ",u===1?"line":"lines"]}),e.jsx(ie,{value:s,subject:"payload"}),e.jsx("button",{type:"button",className:"sys-copy-btn sys-broker-payload-expand",onClick:()=>o(!0),title:"Expand payload","aria-label":"Expand payload",children:e.jsx(_s,{size:14,"aria-hidden":"true"})})]}),e.jsx("div",{className:"sys-broker-payload-resizer",children:b}),n&&us.createPortal(e.jsxs("dialog",{ref:d,className:"sys-broker-payload-dialog","aria-label":"Expanded dispatch payload",onCancel:f=>{f.preventDefault(),o(!1)},onClose:()=>o(!1),children:[e.jsxs("header",{className:"sys-broker-payload-dialog-head",children:[e.jsxs("div",{children:[e.jsx("span",{className:"sys-detail-label",children:"Dispatch payload"}),e.jsxs("span",{className:"sys-broker-payload-meta",children:[t.language," · ",u," ",u===1?"line":"lines"]})]}),e.jsx(ie,{value:s,subject:"payload"}),e.jsx("button",{type:"button",className:"sys-copy-btn",onClick:()=>o(!1),title:"Return payload to inspector","aria-label":"Return payload to inspector",children:e.jsx(Ks,{size:14,"aria-hidden":"true"})})]}),e.jsx("div",{className:"sys-broker-payload-dialog-body",children:b})]}),document.body)]})}function gr({attempt:s}){const t=Rs(s);return e.jsxs("div",{className:"sys-broker-route-failure",role:"status",children:[e.jsx("span",{className:"sys-broker-route-failure-mark","aria-hidden":"true",children:e.jsx($e,{size:14})}),e.jsxs("div",{children:[e.jsx("span",{className:"sys-detail-label",children:"Routing stopped"}),e.jsx("strong",{children:t}),e.jsx("p",{children:s.detail})]}),e.jsx(ie,{value:s.detail,subject:"failure detail"})]})}function ts({attempt:s,navigate:t,onClose:n}){const{route:o,agents:d,scoutbotAgentId:u}=Ge(),b=pr(s),f=vs(s.metadata),c=oe(s),v=s.kind==="failed_query",j=Xe(s),I=Ee(s.kind,s.status),U=we(s,"sentAt","createdAt")??V(s.ts),y=we(s,"deliveredAt","completedAt")??V(s.ts),m=es(s),[N,Y]=a.useState("idle"),[ae,B]=a.useState(null),[E,F]=a.useState(null),[z,M]=a.useState(""),[G,le]=a.useState(""),[k,A]=a.useState("idle"),[ge,X]=a.useState(null),[$,Z]=a.useState(""),[D,C]=a.useState(""),[S,q]=a.useState(""),[O,H]=a.useState(""),[J,ce]=a.useState("medium"),[xe,de]=a.useState(null),[L,ee]=a.useState([]),[R,i]=a.useState("idle"),[h,x]=a.useState(null),T=K(s,"harness"),P=K(s,"model"),se=K(s,"reasoningEffort","effort"),ue=a.useRef(null),Me=a.useRef(null),Re=a.useMemo(()=>ws(s),[s]),w=a.useMemo(()=>d.filter(r=>!r.retiredFromFleet&&!r.staleLocalRegistration).slice().sort((r,l)=>r.id===u?-1:l.id===u?1:(l.updatedAt??0)-(r.updatedAt??0)||r.name.localeCompare(l.name)),[d,u]),he=a.useMemo(()=>Ns(s,w)?.id??"",[s,w]),fe=w.some(r=>r.id===u)?u:w[0]?.id??"",je=w[0]?.id??"",re=w.find(r=>r.id===fe)??null,as=a.useMemo(()=>{const r=new Map;for(const l of w){const p=l.projectRoot?.trim()||l.cwd?.trim();if(!p)continue;const g=p.split("/").filter(Boolean).at(-1)??p;r.set(p,l.project?.trim()||g)}return[...r.entries()].map(([l,p])=>({path:l,label:p}))},[w]),Le=a.useRef({originalTargetAgentId:he,firstRoutableAgentId:je,defaultForwardAgentId:fe,defaultForwardAgent:re,effort:"medium"});Le.current={originalTargetAgentId:he,firstRoutableAgentId:je,defaultForwardAgentId:fe,defaultForwardAgent:re,effort:K(s,"reasoningEffort","effort")||"medium"};const me=a.useRef(!1);a.useEffect(()=>{const r=Le.current;me.current=!1,Y("idle"),B(null),F(null),M(""),le(r.originalTargetAgentId||r.firstRoutableAgentId),A("idle"),X(null),Z(r.defaultForwardAgentId),C(r.defaultForwardAgent?.projectRoot?.trim()||r.defaultForwardAgent?.cwd?.trim()||""),q(r.defaultForwardAgent?.harness?.trim()||""),H(r.defaultForwardAgent?.model?.trim()||""),ce(r.effort),ee([]),i("idle"),x(null)},[s.id]),a.useEffect(()=>{me.current||(le(r=>r||he||je),Z(r=>r||fe),C(r=>r||re?.projectRoot?.trim()||re?.cwd?.trim()||""),q(r=>r||re?.harness?.trim()||""),H(r=>r||re?.model?.trim()||""))},[re,fe,je,he]),a.useEffect(()=>{const r=new URLSearchParams({scope:"global+project"});D&&r.set("projectRoot",D);let l=!1;return ne(`/api/runner/options?${r.toString()}`).then(p=>{!l&&p.schemaVersion==="openscout.runtime-capabilities.v1"&&de(p)}).catch(()=>{}),()=>{l=!0}},[D]);const ns=a.useCallback(r=>{M(r),window.requestAnimationFrame(()=>ue.current?.focus())},[]),os=a.useCallback(async()=>{const r=w.find(l=>l.id===G);if(!(!r||k==="sending")){A("sending"),X(null);try{const l=await ne("/api/ask",{method:"POST",body:JSON.stringify({body:s.detail,targetAgentId:r.id,targetLabel:r.name,...T||P||se?{execution:{...T?{harness:T}:{},...P?{model:P}:{},...se?{reasoningEffort:se}:{},session:"new"}}:{},metadata:{source:"scout-dispatch-redispatch",originalDispatchId:s.id,...s.messageId?{originalMessageId:s.messageId}:{},...s.conversationId?{originalConversationId:s.conversationId}:{}}})}),p=l.flightId??l.flight?.id;A("sent"),X(`New dispatch sent to ${r.name}${p?` · ${p}`:""}`)}catch(l){A("failed"),X(`Retry failed. ${l instanceof Error?l.message:String(l)}`)}}},[s,G,k,se,T,P,w]),Te=a.useCallback(async()=>{const r=z.trim(),l=w.find(p=>p.id===$);if(!(!r||!l||R==="sending")){i("sending"),x(L.length>0?`Uploading ${L.length} ${L.length===1?"attachment":"attachments"}…`:null);try{const p=L.length>0?await fs(L):[],g=await ne("/api/ask",{method:"POST",body:JSON.stringify({body:`${r}
|
|
3
|
+
|
|
4
|
+
Attached dispatch context:
|
|
5
|
+
${Re}`,targetAgentId:l.id,targetLabel:l.name,...p.length>0?{attachments:p}:{},execution:{...S?{harness:S}:{},...O?{model:O}:{},...J?{reasoningEffort:J}:{}},metadata:{source:"scout-dispatch-forward",originalDispatchId:s.id,...D?{targetProjectPath:D}:{},...s.messageId?{originalMessageId:s.messageId}:{},...s.conversationId?{originalConversationId:s.conversationId}:{}}})}),Q=g.flightId??g.flight?.id;i("sent"),x(`Request sent to ${l.name}${Q?` · ${Q}`:""}`),M(""),ee([])}catch(p){i("failed"),x(`Request wasn't sent. ${p instanceof Error?p.message:String(p)}`)}}},[s,Re,$,J,L,S,O,D,R,z,w]),is=a.useCallback(r=>{const l=r.filter(ms),p=r.length-l.length;l.length>0&&(ee(g=>[...g,...l]),i("idle"),x(null)),p>0&&(i("failed"),x("Attach markdown, code, an image, or a video clip."))},[]),ls=c?["Get a second opinion","Propose a recovery plan","Draft a follow-up"]:["Summarize this dispatch","Draft a follow-up","What changed?"],_=w.find(r=>r.id===G)??null,te=w.find(r=>r.id===$)??null,pe=w.filter(r=>D?(r.projectRoot?.trim()||r.cwd?.trim())===D:!0),Pe=xe??bs,Ae=a.useMemo(()=>{const r=ps(Pe),l=[O,te?.harness===S?te.model:null,...pe.filter(g=>g.harness===S).map(g=>g.model)].map(g=>g?.trim()).filter(g=>!!g);let p=r.harnesses;return p.some(g=>g.value===S)||(p=[{value:S,label:S||"default",models:[]},...p]),p=p.map(g=>{if(g.value!==S)return g;const Q=g.models.some(W=>W.value==="")?g.models:[{value:"",label:"Default",note:"harness picks"},...g.models],ds=new Set(Q.map(W=>W.value)),qe=l.filter(W=>!ds.has(W)).map(W=>({value:W,label:W,note:"observed"}));return qe.length===0&&Q===g.models?g:{...g,models:[...Q,...qe]}}),{...r,harnesses:p}},[Pe,te,S,O,pe]);a.useEffect(()=>{const r=ys(Ae,S);!r||r.some(l=>l.value===J)||ce(r.find(l=>l.value==="medium")?.value??r[0]?.value??"")},[Ae,S,J]);const cs=a.useCallback(async()=>{Y("running"),B(null);try{const r=await ne("/api/broker/dispatch-review",{method:"POST",body:JSON.stringify(Ss(s))});Y("sent"),F(r.conversationId),B(r.conversationId?`Report started${r.targetLabel?` with ${r.targetLabel}`:""}. Open the conversation to follow it.`:`Report started${r.targetLabel?` with ${r.targetLabel}`:""}${r.flightId?` · ${r.flightId}`:""}.`)}catch(r){Y("failed"),B(`Couldn't start the report. ${r instanceof Error?r.message:String(r)}`)}},[s]),Be=c?e.jsxs("div",{className:"sys-broker-action-row",children:[e.jsxs("div",{className:"sys-broker-action-line",children:[e.jsx("span",{className:"sys-broker-action-label",id:"dispatch-report-title",children:"Failure report"}),e.jsxs("button",{type:"button",className:"sys-broker-report-button",disabled:N==="running"||N==="sent"&&!E,onClick:()=>{if(E){Oe(t,{view:"conversation",conversationId:E},{returnTo:o});return}cs()},children:[N==="running"?e.jsx(ke,{size:13,className:"sys-broker-action-spinner","aria-hidden":"true"}):E?e.jsx(Ke,{size:13,"aria-hidden":"true"}):e.jsx(Us,{size:13,"aria-hidden":"true"}),N==="running"?"Starting report…":E?"Open report conversation":"Start failure report"]})]}),ae&&e.jsx("div",{className:`sys-broker-review-status sys-broker-review-status--${N}`,role:"status",children:ae})]}):null,ze=e.jsxs("div",{className:"sys-broker-action-row",children:[e.jsxs("div",{className:"sys-broker-action-line",children:[e.jsx("span",{className:"sys-broker-action-label",id:"dispatch-redispatch-title",children:"Retry"}),e.jsxs("div",{className:"sys-broker-redispatch-controls",children:[e.jsx("select",{"aria-label":"Retry destination",value:G,disabled:k==="sending"||w.length===0,onChange:r=>{le(r.target.value),A("idle"),X(null)},children:w.length===0?e.jsx("option",{value:"",children:"No agents available"}):e.jsxs(e.Fragment,{children:[!G&&e.jsx("option",{value:"",children:"Original destination unavailable"}),w.map(r=>e.jsxs("option",{value:r.id,children:[r.id===u?"Scout":r.name,r.project?` · ${r.project}`:""]},r.id))]})}),e.jsxs("button",{type:"button",className:"sys-broker-redispatch-send",disabled:!_||k==="sending",onClick:()=>{os()},children:[k==="sending"?e.jsx(ke,{size:13,className:"sys-broker-action-spinner","aria-hidden":"true"}):e.jsx(Fs,{size:13,"aria-hidden":"true"}),k==="sending"?"Retrying…":"Retry dispatch"]})]})]}),_&&e.jsxs("div",{className:"sys-broker-action-target-meta",children:[_.harness&&e.jsx("span",{children:_.harness}),_.model&&e.jsx("span",{children:_.model}),(_.cwd??_.projectRoot)&&e.jsx("code",{children:_.cwd??_.projectRoot})]}),ge&&e.jsx("div",{className:`sys-broker-action-status sys-broker-action-status--${k}`,role:"status",children:ge})]});return e.jsxs("aside",{className:"sys-panel sys-broker-inspector","aria-label":"Dispatch route inspector",children:[e.jsx("header",{className:"sys-broker-inspector-head",children:e.jsxs("div",{className:"sys-broker-inspector-status",children:[e.jsx("span",{className:`sys-broker-dot sys-broker-dot--${I}`,"aria-hidden":"true"}),e.jsx("strong",{className:`sys-broker-state sys-broker-state--${I}`,children:ss(s)}),e.jsx("code",{title:m,children:m}),e.jsx(ie,{value:Re,subject:"dispatch context",className:"sys-broker-inspector-copy"}),e.jsx("button",{type:"button",className:"sys-copy-btn sys-broker-inspector-close",onClick:n,title:"Close inspector","aria-label":"Close inspector",children:e.jsx($e,{size:14,"aria-hidden":"true"})})]})}),e.jsxs("div",{className:"sys-broker-inspector-body",children:[e.jsxs("section",{className:"sys-broker-route-stack","aria-label":"Dispatch route",children:[e.jsxs("div",{className:"sys-broker-route-party",children:[e.jsx("span",{className:"sys-broker-avatar sys-broker-route-avatar","aria-hidden":"true",children:ve(s.actorName)}),e.jsxs("div",{className:"sys-broker-route-party-copy",children:[e.jsxs("span",{className:"sys-detail-label",children:["From · ",De(s,"from")]}),e.jsx("strong",{children:s.actorName??"Unknown sender"})]})]}),e.jsx(Js,{className:"sys-broker-route-down",size:17,"aria-hidden":"true"}),e.jsxs("div",{className:"sys-broker-route-party",children:[e.jsx("span",{className:"sys-broker-route-target-icon","aria-hidden":"true",children:e.jsx(Fe,{route:s.route})}),e.jsxs("div",{className:"sys-broker-route-party-copy",children:[e.jsxs("span",{className:"sys-detail-label",children:["To · ",De(s,"to")]}),e.jsx("code",{title:s.target??"No target",children:s.target??"No target"})]}),s.conversationId&&e.jsxs("button",{type:"button",className:"sys-broker-route-button",onClick:()=>Oe(t,{view:"conversation",conversationId:s.conversationId},{returnTo:o}),children:[e.jsx(Ke,{size:11,"aria-hidden":"true"}),"Route"]})]})]}),e.jsxs("dl",{className:"sys-broker-delivery-grid",children:[e.jsxs("div",{children:[e.jsx("dt",{children:"Channel"}),e.jsx("dd",{children:rs(s.route)})]}),e.jsxs("div",{children:[e.jsx("dt",{children:"Latency"}),e.jsx("dd",{className:"sys-broker-delivery-accent",children:ir(s)})]}),e.jsxs("div",{children:[e.jsx("dt",{children:"Sent"}),e.jsx("dd",{children:Qe(U)})]}),e.jsxs("div",{children:[e.jsx("dt",{children:c?"Failed":"Delivered"}),e.jsx("dd",{children:Qe(y)})]})]}),e.jsxs("section",{className:"sys-broker-payload",children:[v?e.jsx(gr,{attempt:s}):e.jsx(yr,{payload:s.detail}),c&&!v&&j&&e.jsxs("div",{className:"sys-broker-inspector-error",role:"status",children:[e.jsx("span",{className:"sys-broker-inspector-error-label",children:"Error"}),e.jsx("p",{children:j})]})]}),e.jsx(Cs,{attempt:s,targetAgentId:he||null,navigate:t,returnTo:o}),e.jsx("section",{className:"sys-broker-actions","aria-label":"Dispatch actions",children:v?e.jsxs(e.Fragment,{children:[Be,ze]}):e.jsxs(e.Fragment,{children:[ze,Be]})}),e.jsxs("details",{className:"sys-broker-technical",children:[e.jsxs("summary",{children:[e.jsx("span",{children:"Technical details"}),e.jsx(Ms,{size:13,"aria-hidden":"true"})]}),e.jsx("div",{className:"sys-broker-inspector-rows",children:b.map(r=>e.jsxs("div",{className:"sys-broker-inspector-row",children:[e.jsx("span",{className:"sys-detail-label",children:r.label}),e.jsx("code",{className:"sys-detail-value",children:r.value}),e.jsx(ie,{value:r.value,subject:r.label.toLowerCase()})]},r.label))}),e.jsxs("div",{className:"sys-broker-metadata",children:[e.jsxs("div",{className:"sys-broker-metadata-head",children:[e.jsx("span",{className:"sys-detail-label",children:"Metadata"}),e.jsx(ie,{value:f,subject:"metadata",className:"sys-broker-metadata-copy"})]}),e.jsx(As,{metadata:s.metadata,rawJson:f})]})]})]}),e.jsxs("section",{className:"sys-broker-forward","aria-labelledby":"dispatch-forward-title",children:[e.jsx("div",{className:"sys-broker-forward-head",children:e.jsx("span",{id:"dispatch-forward-title",className:"sys-broker-action-label",children:"Follow up"})}),e.jsxs("div",{id:"dispatch-forward-content",children:[e.jsx("div",{className:"sys-broker-forward-intro",children:e.jsx("div",{className:"sys-broker-ask-prompts","aria-label":"Suggested requests",children:ls.map(r=>e.jsxs("button",{type:"button",onClick:()=>ns(r),children:[e.jsx(Ls,{size:11,"aria-hidden":"true"}),r]},r))})}),e.jsxs("form",{className:"sys-broker-message-composer",onSubmit:r=>{r.preventDefault(),Te()},children:[e.jsx("label",{htmlFor:"dispatch-message-input",children:"Request"}),e.jsx("textarea",{ref:ue,id:"dispatch-message-input",value:z,rows:3,placeholder:`What should ${te?.id===u?"Scout":te?.name??"this agent"} investigate or do?`,disabled:R==="sending",onChange:r=>{M(r.target.value),R!=="idle"&&(i("idle"),x(null))},onKeyDown:r=>{r.key==="Enter"&&(r.metaKey||r.ctrlKey)&&(r.preventDefault(),Te())}}),L.length>0&&e.jsx("div",{className:"sys-broker-composer-attachments","aria-label":"Attachments",children:L.map((r,l)=>e.jsxs("span",{children:[e.jsx(Xs,{size:10,"aria-hidden":"true"}),e.jsx("span",{title:r.name,children:r.name}),e.jsx("button",{type:"button",onClick:()=>ee(p=>p.filter((g,Q)=>Q!==l)),"aria-label":`Remove ${r.name}`,children:e.jsx($e,{size:10,"aria-hidden":"true"})})]},`${r.name}:${r.size}:${l}`))}),e.jsxs("footer",{children:[e.jsxs("div",{className:"sys-broker-composer-left",children:[e.jsx("input",{ref:Me,type:"file",multiple:!0,hidden:!0,disabled:R==="sending",onChange:r=>{is([...r.target.files??[]]),r.target.value=""}}),e.jsx("button",{type:"button",className:"sys-broker-composer-attach",disabled:R==="sending",onClick:()=>Me.current?.click(),"aria-label":"Attach files",title:"Attach files",children:e.jsx(Ts,{size:16,"aria-hidden":"true"})}),e.jsx("span",{className:"sys-broker-message-attachment",title:m,children:"Dispatch context included"})]}),e.jsxs("div",{className:"sys-broker-composer-targets",children:[e.jsx("span",{className:"sys-broker-composer-route-label",children:"Send to"}),e.jsxs("label",{title:"Project target",children:[e.jsx("span",{children:"Project"}),e.jsxs("select",{"aria-label":"Project target",value:D,disabled:R==="sending",onChange:r=>{const l=r.target.value,p=w.find(g=>!l||(g.projectRoot?.trim()||g.cwd?.trim())===l)??null;me.current=!0,C(l),p&&(Z(p.id),q(p.harness?.trim()||""),H(p.model?.trim()||""))},children:[e.jsx("option",{value:"",children:"Any project"}),as.map(r=>e.jsx("option",{value:r.path,children:r.label},r.path))]})]}),e.jsxs("label",{title:"Agent target",children:[e.jsx("span",{children:"Agent"}),e.jsx("select",{"aria-label":"Agent target",value:$,disabled:R==="sending"||pe.length===0,onChange:r=>{const l=w.find(p=>p.id===r.target.value)??null;me.current=!0,Z(r.target.value),l&&(C(l.projectRoot?.trim()||l.cwd?.trim()||""),q(l.harness?.trim()||""),H(l.model?.trim()||"")),i("idle"),x(null)},children:pe.length===0?e.jsx("option",{value:"",children:"No agents"}):pe.map(r=>e.jsx("option",{value:r.id,children:r.id===u?"Scout":r.name},r.id))})]}),e.jsx(gs,{catalog:Ae,value:{harness:S,model:O,effort:J},onChange:r=>{me.current=!0,q(r.harness),H(r.model),ce(r.effort)},disabled:R==="sending"}),e.jsx(hs,{className:"sys-broker-composer-mic",disabled:R==="sending",onAppend:r=>M(l=>l.trim()?`${l.trimEnd()} ${r}`:r),onError:r=>{i("failed"),x(r)}})]}),e.jsx("button",{type:"submit",className:"sys-broker-composer-send",disabled:!z.trim()||!te||R==="sending","aria-label":`Ask ${te?.name??"recipient"} about this dispatch`,children:R==="sending"?e.jsx(ke,{size:14,className:"sys-broker-action-spinner","aria-hidden":"true"}):e.jsx(Ps,{size:14,"aria-hidden":"true"})})]})]}),h&&e.jsx("div",{className:`sys-broker-action-status sys-broker-action-status--${R}`,role:"status",children:h})]})]})]})}const xr=Es({id:"dispatch",label:"Dispatch",route:{view:"broker"},webPath:"/dispatch",screen:"BrokerScreen",embed:{path:"/embed/dispatch",profile:"macos.dispatch",rootClassName:"s-broker-embed",chrome:{showSecondaryNav:!1,showPageStatusBar:!1},ownsInternalRoutes:!0,resolveEmbedProps:s=>{const t=s.get("attempt")?.trim();return t?{initialAttemptId:t}:{}},hosts:{macos:!0}}}),st=Object.freeze(Object.defineProperty({__proto__:null,BrokerAttemptInspector:ts,BrokerScreen:fr,scoutSurface:xr},Symbol.toStringTag,{value:"Module"}));export{ts as B,fr as a,He as b,st as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as n,j as i}from"./index-
|
|
1
|
+
import{r as n,j as i}from"./index-Bli6bTLU.js";const _=({panOffset:h,scale:a,onPan:R,onPanStart:E,onPanEnd:u,isPanLocked:d=!1,onClick:k,showGuides:g=!1,onGuidesChange:$,gridOpacity:C=1})=>{const[B,X]=n.useState(g),[G,K]=n.useState(!1),o=n.useRef(!1),v=n.useRef({x:0,y:0}),r=n.useRef({active:!1,startX:0,startY:0}),j=n.useRef(null),x=n.useRef(null),y=n.useRef(null),A=4,H=n.useRef({x:0,y:0}),w=n.useRef(0),b=n.useRef(!1);n.useEffect(()=>{X(g)},[g]);const Y=n.useCallback(e=>{const s=e;return s?s.tagName==="INPUT"||s.tagName==="TEXTAREA"||s.isContentEditable:!1},[]),z=n.useCallback(e=>{const s=e;return s?!!s.closest('button, [role="button"], a, input, textarea, select, [data-interactive="true"]'):!1},[]),c=n.useCallback(e=>{o.current=e,K(e)},[]);n.useEffect(()=>{const e=t=>{if(w.current=t.buttons,r.current.active&&(t.buttons&1)!==1&&(r.current.active=!1),o.current&&(t.buttons&1)!==1){c(!1),r.current.active=!1,u?.(),document.body.style.cursor="";return}if(d&&o.current){c(!1),r.current.active=!1,u?.(),document.body.style.cursor="";return}const l=j.current?.getBoundingClientRect(),f=l?t.clientX-l.left:t.clientX,V=l?t.clientY-l.top:t.clientY;if(H.current={x:f,y:V},x.current&&(x.current.style.left=`${f}px`),y.current&&(y.current.style.top=`${V}px`),r.current.active&&!o.current){const P=t.clientX-r.current.startX,Q=t.clientY-r.current.startY;Math.hypot(P,Q)>=A&&(r.current.active=!1,c(!0),b.current=!0,E?.(),v.current={x:t.clientX,y:t.clientY},document.body.style.cursor="grabbing")}o.current&&(R({x:(t.clientX-v.current.x)/a,y:(t.clientY-v.current.y)/a}),v.current={x:t.clientX,y:t.clientY})},s=t=>{w.current=t.buttons,r.current.active=!1,o.current&&(c(!1),u?.(),document.body.style.cursor="")},I=t=>{(t.metaKey||t.ctrlKey)&&t.key==="\\"&&(t.preventDefault(),X(l=>{const f=!l;return $?.(f),f}))},m=()=>{r.current.active=!1,s(new MouseEvent("mouseup"))};return window.addEventListener("mousemove",e),window.addEventListener("mouseup",s),window.addEventListener("keydown",I),window.addEventListener("blur",m),document.addEventListener("visibilitychange",m),()=>{window.removeEventListener("mousemove",e),window.removeEventListener("mouseup",s),window.removeEventListener("keydown",I),window.removeEventListener("blur",m),document.removeEventListener("visibilitychange",m)}},[R,u,E,a,Y,z,d,c,$]),n.useEffect(()=>{!d||!o.current||(c(!1),u?.(),document.body.style.cursor="")},[d,u,c]);const U=e=>{b.current=!1,!(d||e.button!==0)&&(Y(e.target)||z(e.target)||(w.current=e.buttons,r.current={active:!0,startX:e.clientX,startY:e.clientY},e.preventDefault()))},F=e=>{!b.current&&k&&k(e),b.current=!1},[M,W]=n.useState({w:0,h:0});n.useEffect(()=>{const e=()=>W({w:window.innerWidth,h:window.innerHeight});return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]);const S=Math.max(.4,Math.min(2,a)),p=100*S,L=20*S,q="var(--hud-canvas-dot-minor)",J="var(--hud-canvas-dot-major)",N="color-mix(in srgb, oklch(var(--accent)) 18%, transparent)",T=(M.w/2+h.x*a)%p,D=(M.h/2+h.y*a)%p;return i.jsxs("div",{ref:j,className:`absolute inset-0 z-0 overflow-hidden bg-background ${G?"cursor-grabbing":"cursor-grab"}`,onMouseDown:U,onClick:F,children:[i.jsx("div",{className:"absolute pointer-events-none",style:{inset:"-100px",opacity:.8*C,transition:"opacity 1s ease",backgroundImage:`radial-gradient(circle, ${q} 1px, transparent 1px)`,backgroundSize:`${L}px ${L}px`,backgroundPosition:`${T+100}px ${D+100}px`}}),i.jsx("div",{className:"absolute pointer-events-none",style:{inset:"-100px",opacity:.45*C,transition:"opacity 1s ease",backgroundImage:`radial-gradient(circle, ${J} 1.5px, transparent 1.5px)`,backgroundSize:`${p}px ${p}px`,backgroundPosition:`${T+100}px ${D+100}px`}}),B&&i.jsxs(i.Fragment,{children:[i.jsx("div",{ref:x,className:"absolute top-0 bottom-0 w-px pointer-events-none",style:{left:0,backgroundColor:N}}),i.jsx("div",{ref:y,className:"absolute left-0 right-0 h-px pointer-events-none",style:{top:0,backgroundColor:N}})]})]})};export{_ as C};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as s,r as j}from"./index-Bli6bTLU.js";import{i as $,d as B,e as w,a as W}from"./conversation-model-CigSPlKA.js";import{l as O,i as q,a as E,p as T}from"./conversation-prefs-DNre-Lcx.js";import{u as G,m as J,e as K}from"./Provider-Ve8yXaWR.js";import{d as Q}from"./router-B0YclXYg.js";import{l as D,i as C,s as X}from"./sessionRead-CvFz2RHv.js";import{u as Y}from"./use-conversation-list-C0bEXFeH.js";import{u as Z}from"./use-fleet-active-asks-CK4aw-3G.js";import{i as ee}from"./colors-BtO5_zlx.js";import{A as se}from"./AgentAvatar-B1xvQ7ej.js";/* empty css */function te({children:n,count:t,tone:a="default",title:l,onClick:i}){const d=["collapsed-strip-label",a!=="default"&&`collapsed-strip-label--${a}`,t!=null&&"collapsed-strip-label--has-count",i&&"collapsed-strip-label--button"].filter(Boolean).join(" "),o=s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"collapsed-strip-label-mark","aria-hidden":!0}),i?s.jsx("span",{className:"collapsed-strip-label-expand","aria-hidden":!0,children:"›"}):null,s.jsx("span",{className:"collapsed-strip-label-text",children:n}),t!=null?s.jsx("span",{className:"collapsed-strip-label-count",children:t}):null]});return i?s.jsx("button",{type:"button",className:d,title:l??n,"aria-label":l??n,onClick:i,children:o}):s.jsx("div",{className:d,title:l??n,children:o})}function ae({label:n,emptyMark:t="·",showLabel:a=!0,labelTone:l="default",labelCount:i,onLabelClick:d,children:o}){const v=!o||Array.isArray(o)&&o.length===0,p=a?s.jsx(te,{tone:l,count:i,onClick:d,title:d?`Expand ${n}`:void 0,children:n}):null;return v?s.jsxs("div",{className:"collapsed-strip collapsed-strip--empty","aria-hidden":!0,children:[p,s.jsx("span",{className:"collapsed-strip-empty-mark",children:t})]}):s.jsxs("div",{className:"collapsed-strip",role:"list","aria-label":n,children:[p,o]})}function Ce(){return s.jsx("div",{className:"collapsed-strip-rule","aria-hidden":!0})}function ne({title:n,active:t,tone:a="default",ava:l,avaColor:i,glyph:d,avatarNode:o,dot:v,pinned:p,onClick:b}){const m=["collapsed-chip",a==="channel"&&"collapsed-chip--channel",a==="neutral"&&"collapsed-chip--neutral",a==="attention"&&"collapsed-chip--attention",a==="unread"&&"collapsed-chip--unread",t&&"collapsed-chip--active",p&&"collapsed-chip--pinned"].filter(Boolean).join(" ");return s.jsxs("button",{type:"button",role:"listitem",className:m,title:n,"aria-label":n,"aria-current":t?"page":void 0,onClick:b,children:[o?s.jsx("span",{className:"collapsed-chip-avatar-wrap",children:o}):l?s.jsx("span",{className:"collapsed-chip-ava",style:i?{"--ava-color":i}:void 0,children:l}):s.jsx("span",{className:`collapsed-chip-glyph${typeof d=="string"&&d.length>1?" collapsed-chip-glyph--long":""}`,children:d}),v?s.jsx("span",{className:["collapsed-chip-dot",v==="attention"&&"collapsed-chip-dot--attention",v==="live"&&"collapsed-chip-dot--live"].filter(Boolean).join(" "),"aria-hidden":!0}):null,p?s.jsx("span",{className:"collapsed-chip-pin","aria-hidden":!0}):null]})}function Ie(n){const t=n.trim(),a=t.split(/[\s/_-]+/).filter(Boolean);if(a.length>=2){const l=a[a.length-1];return/^\d+$/.test(l)&&a.length>=3?(a[a.length-2][0]??"?").toUpperCase():(l[0]??"?").toUpperCase()}return(t[0]??"?").toUpperCase()}const le=3,ie=3,oe=4,re=3;function y(n,t){return[...n].sort((a,l)=>{const i=C(a.lastMessageAt,a.id,t)?0:1,d=C(l.lastMessageAt,l.id,t)?0:1;return i!==d?i-d:(l.lastMessageAt??0)-(a.lastMessageAt??0)})}function ce({onExpand:n}){const{route:t,navigate:a,agents:l}=G(),{sessions:i}=Y(),d=Z(),[o,v]=j.useState(()=>O()),[p,b]=j.useState(()=>D()),m=Q(t),S=j.useMemo(()=>J(l,m),[l,m]),P=j.useMemo(()=>{const e=new Map;for(const f of l)e.set(f.id,f);return e},[l]),R=t.view==="messages"||t.view==="conversation"?t.conversationId:void 0;j.useEffect(()=>{v(O()),b(D())},[]);const r=j.useMemo(()=>{const e=K(i,S,m).filter(c=>!q(c.id,o)),f=e.filter(c=>E(c.id,o)).sort((c,x)=>T(x.id,o)-T(c.id,o)||(x.lastMessageAt??0)-(c.lastMessageAt??0)).slice(0,le),g=new Set(f.map(c=>c.id)),h=e.filter(c=>!g.has(c.id));return{pinned:f,channels:y(h.filter(w),p).slice(0,ie),dms:y(h.filter(B),p).slice(0,oe),observed:y(h.filter($),p).slice(0,re),totals:{channels:h.filter(w).length,dms:h.filter(B).length,observed:h.filter($).length,pinned:e.filter(c=>E(c.id,o)).length}}},[i,S,m,o,p]),U=e=>{b(X(e.id)),a({view:"messages",conversationId:e.id,...m?{machineId:m}:{}})},k=[...r.pinned,...r.channels,...r.dms,...r.observed],I=k.filter(e=>C(e.lastMessageAt,e.id,p)).length,M=(e,f=!1)=>{const g=W(e),h=w(e),c=C(e.lastMessageAt,e.id,p),x=h?void 0:pe(e,g),V=x??g,A=e.agentId?P.get(e.agentId):void 0,L=e.agentId?d.get(e.agentId):void 0,_=L?.status==="needs_attention",z=L?.status==="working",F=A?ee(A.state):!1,H=_?"attention":c?"unread":z||F?"live":null;return s.jsx(ne,{title:f?`${g} · pinned`:x?`${g} · ${x}`:g,active:e.id===R,tone:h?"channel":_?"attention":c?"unread":"default",avatarNode:h?void 0:s.jsx(se,{agent:A,name:V,size:28,tile:!0,presence:!1}),glyph:h?de(g):void 0,dot:H,pinned:f,onClick:()=>U(e)},e.id)},u=[];return r.pinned.length&&u.push(s.jsx(N,{mark:"Pin",count:r.totals.pinned,showMark:u.length>0,children:r.pinned.map(e=>M(e,!0))},"pin")),r.channels.length&&u.push(s.jsx(N,{mark:"#",count:r.totals.channels,showMark:u.length>0,children:r.channels.map(e=>M(e))},"ch")),r.dms.length&&u.push(s.jsx(N,{mark:"DM",count:r.totals.dms,showMark:u.length>0,children:r.dms.map(e=>M(e))},"dm")),r.observed.length&&u.push(s.jsx(N,{mark:"Obs",count:r.totals.observed,showMark:u.length>0,children:r.observed.map(e=>M(e))},"obs")),s.jsx(ae,{label:"Chat",emptyMark:"#",labelTone:I>0?"accent":"default",labelCount:I>0?I:k.length||void 0,onLabelClick:n,children:u})}function de(n){const a=n.replace(/^#+/,"").match(/[a-z0-9]/i)?.[0]?.toLowerCase()??"?";return s.jsxs("span",{className:"collapsed-chip-channel-badge",children:[s.jsx("span",{className:"collapsed-chip-channel-hash","aria-hidden":!0,children:"#"}),s.jsx("span",{className:"collapsed-chip-channel-text",children:a})]})}function pe(n,t){const a=t.toLowerCase();for(const l of n.participants??[]){const i=l.displayName||l.label;if(i&&i.toLowerCase()!==a)return i}}function N({mark:n,count:t,showMark:a=!0,children:l}){return s.jsxs("div",{className:"collapsed-strip-section",role:"group","aria-label":n,children:[a?s.jsxs("div",{className:"collapsed-strip-section-mark",title:t!=null?`${n} · ${t}`:n,children:[s.jsx("span",{className:"collapsed-strip-section-mark-text",children:n}),t!=null&&t>0?s.jsx("span",{className:"collapsed-strip-section-mark-count",children:t>99?"99+":t}):null]}):null,l]})}const Ae=Object.freeze(Object.defineProperty({__proto__:null,ChatCollapsedStrip:ce},Symbol.toStringTag,{value:"Module"}));export{ae as C,ce as a,ne as b,Ie as c,Ce as d,Ae as e};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o,j as a}from"./index-
|
|
1
|
+
import{r as o,j as a}from"./index-Bli6bTLU.js";import{f as k}from"./cache-BO2Bd_LV.js";import{u as F,f as I,l as N,L as _,D}from"./usePierreRuntime-Bq6mXrgd.js";/* empty css */const R=["unstaged","staged","branch"];function L(n){if(!n.startsWith("/"))return null;const t=[];for(const e of n.split("/"))if(!(!e||e==="."))if(e===".."){if(t.length===0)return null;t.pop()}else t.push(e);return t}function A(n,t){const e=L(n),s=L(t);return!e||!s||s.length<=e.length||e.some((c,u)=>s[u]!==c)?null:s.slice(e.length).join("/")}function y(n,t){return n.files.findIndex(e=>e.newPath===t||e.oldPath===t)}function K(n,t){return n.find(e=>y(e,t)>=0)?.kind??null}const M=()=>{},T=()=>{};function O({root:n,file:t}){const e=o.useMemo(()=>A(n,t),[t,n]),[s,c]=o.useState(null),[u,d]=o.useState("loading"),[P,m]=o.useState(null),[S,h]=o.useState(null),{pierre:j,pierrePhase:v,pierreError:C,pierreTheme:b,retryPierre:E}=F(s);o.useEffect(()=>{let r=!1;if(c(null),d("loading"),m(null),h(null),!e){d("ready");return}return k(n,R,{files:[e],tier:"patch"}).then(i=>{r||(c(i.snapshot),h(K(i.snapshot.layers,e)),d("ready"))},i=>{r||(m(i instanceof Error?i.message:String(i)),d("error"))}),()=>{r=!0}},[e,n]);const f=o.useMemo(()=>e?s?.layers.filter(r=>y(r,e)>=0)??[]:[],[e,s]),l=f.find(r=>r.kind===S)??f[0]??null,p=l&&e?y(l,e):-1,g=l&&p>=0?I(l.files[p],p):null;return u==="loading"?a.jsx("div",{className:"s-code-empty",children:"Loading file changes…"}):u==="error"?a.jsx("div",{className:"s-code-empty",children:P??"Couldn’t load this file’s changes."}):!s||!l||!g?a.jsx("div",{className:"s-code-empty",children:"No tracked patch is available. The file is clean, or it is untracked and has no Git baseline yet."}):a.jsxs("div",{className:"s-code-diff",children:[f.length>1?a.jsx("div",{className:"s-code-diffLayers",role:"tablist","aria-label":"Change layer",children:f.map(r=>{const i=N(r),x=r.kind===l.kind;return a.jsxs("button",{type:"button",role:"tab","aria-selected":x,className:"s-code-diffLayer","data-selected":x||void 0,onClick:()=>h(r.kind),children:[_[r.kind],a.jsxs("span",{children:["+",i.add," −",i.del]})]},r.kind)})}):null,a.jsx(D,{layer:l,patchLayer:l,patchPhase:"ready",patchError:null,selectedFileKey:g,renderKey:s.render.renderKey,theme:b,layout:"split",pierre:j,pierrePhase:v,pierreError:C,onRetryPierre:E,onIncludeLineContext:M,onIncludeSelectionContext:T,contextActions:!1})]})}const G=Object.freeze(Object.defineProperty({__proto__:null,CodeDiffPane:O},Symbol.toStringTag,{value:"Module"}));export{O as C,G as a,A as r};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as h,j as i}from"./index-
|
|
1
|
+
import{r as h,j as i}from"./index-Bli6bTLU.js";import{C as ne}from"./chevron-down-Da5tV19_.js";import{S as oe}from"./search-BbgsEMXa.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-o4FKpU7Z.js";import{a as G}from"./api-h5zurxmi.js";import{c as je}from"./clipboard-e3fSpeo7.js";import{f as ze}from"./scoutbot-BTIErYHo.js";import{g as Ae,f as Ce}from"./api-BkjHJfgJ.js";import{d as Ke}from"./types-B0PlfpKc.js";import{r as Oe,C as He}from"./CodeDiffPane-86odpBSt.js";import{r as qe,a as Ge,w as Ve,b as Xe,f as xe,C as Je,s as Qe}from"./CodeProjectPicker-8svr_S_A.js";import{ShikiPane as Ye}from"./ShikiPane-Dkwyx--r.js";/* empty css */import{A as Ze}from"./arrow-left-BOht-YQu.js";import{C as et}from"./chevron-right-C10o7t_X.js";import{C as tt}from"./check--esHw52j.js";import{C as nt}from"./copy-Dty8ZYsM.js";import"./cache-Dr0why2k.js";import"./usePierreRuntime-B4hbNWTz.js";import"./chunk-HRAB3GC3-DF8R9rPv.js";/* empty css */import"./chevron-down-NAhBUkFd.js";import"./createLucideIcon-Bt67PWH-.js";import"./search-7_n7CxWl.js";const st=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 V(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 rt(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 it(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"&&st.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 Nt({route:i,navigate:l,root:k,file:g,project:f,path:x,wt:u,line:Le,endLine:Ne,returnConversationId:Re,embedded:X=!1}){const I=k??i?.root??null,B=g??i?.file??null,p=f??i?.project??null,b=x??i?.path??null,P=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(()=>I??(p?null:qe())),[y,Q]=s.useState(()=>new Map),[L,U]=s.useState(()=>new Set),[de,ue]=s.useState(null),[a,W]=s.useState(B),[c,_]=s.useState(null),[Ee,Y]=s.useState(!1),[fe,z]=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,A]=s.useState(()=>p?{phase:"resolving"}:{phase:"idle"}),ne=p?`${p}\0${b??""}\0${P??""}`: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 G(`/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){U(d=>new Set([...d,...n]));for(const d of n)E(d)}},[E]);s.useEffect(()=>{if(!p)return;const e=`${p}\0${b??""}\0${P??""}`;if(R.current===e)return;const t=n=>{R.current=e;const d=b?`${n}/${b}`:null;A({phase:"idle"}),J(n),W(d),$(n,d)};if(h){const n=rt(h,p,P);if(n){t(n.root);return}}se.current!==e&&(A({phase:"resolving"}),G(`/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);A({phase:"failed",message:d.includes(p)?d:`Can't resolve project "${p}": ${d}`})}))},[p,b,P,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=Ge(o),t=he.current,n=t?ye(o,t):[];e?(Q(new Map(Object.entries(e.entries))),U(new Set([...e.expanded,...n])),!t&&e.selectedFile&&W(e.selectedFile)):(Q(new Map),U(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||(Ve(o,{entries:y,expanded:L,selectedFile:a}),Xe(o))},[o,y,L,a]),s.useEffect(()=>{!I||!B||$(I,B)},[I,B,$]);const re=s.useRef(new Map),ie=s.useRef(new Set),$e=3e4,K=s.useCallback(e=>{const t=re.current.get(e);return t?Date.now()-t.at>$e?(re.current.delete(e),null):t.preview:null},[]),O=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=>{K(e)||ie.current.has(e)||(ie.current.add(e),G(`/api/file/preview?path=${encodeURIComponent(e)}`).then(t=>O(e,t)).catch(()=>{}).finally(()=>ie.current.delete(e)))},[K,O]);s.useEffect(()=>{if(Z("idle"),!a){_(null),z(null);return}const e=K(a);if(e){_(e.kind==="file"?e:null),z(null),Y(!1);return}let t=!1;return Y(!0),z(null),G(`/api/file/preview?path=${encodeURIComponent(a)}`).then(n=>{t||(O(a,n),_(n.kind==="file"?n:null))}).catch(n=>{t||(_(null),z(n instanceof Error?n.message:String(n)))}).finally(()=>{t||Y(!1)}),()=>{t=!0}},[a,K,O]);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 H=s.useCallback((e,t)=>{X||!l||l(me(e,t))},[X,l,me]),Te=s.useCallback(e=>{U(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),W(e),o&&H(o,e)},[o,H]),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]),q=!!(o&&a&&Oe(o,a));s.useEffect(()=>{q||ee("source")},[q]);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,A({phase:"idle"}),te(e.line&&e.line>0?{line:e.line,...e.endLine&&e.endLine>=e.line?{endLine:e.endLine}:{}}:null),W(e.file??null),J(e.root),e.file&&$(e.root,e.file),H(e.root,e.file??null)},[$,H]);return r.jsxs("div",{className:"s-code-screen","data-embedded":X||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(Ze,{size:13,strokeWidth:1.9,"aria-hidden":!0}),r.jsx("span",{children:"Back to thread"})]}):null,r.jsx(Je,{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:Qe(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(et,{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:it(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}),q?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:[V(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(tt,{size:12,"aria-hidden":!0}):r.jsx(nt,{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"&&q&&o&&a?r.jsx(He,{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 ",V(256*1024)," of ",V(c.sizeBytes)," ·"," ",r.jsx("a",{href:c.rawUrl,target:"_blank",rel:"noreferrer",children:"open raw"})]}):null,r.jsx(Ye,{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," · ",V(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 Rt=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{Nt as CodeContent,Rt as scoutSurface};
|
|
1
|
+
import{r as s,j as r}from"./index-Bli6bTLU.js";import{a as G}from"./api-DEHEgJ9m.js";import{c as je}from"./clipboard-e3fSpeo7.js";import{f as ze}from"./scoutbot-D4vuKzOL.js";import{g as Ae,f as Ce}from"./api-BHHEUSS3.js";import{d as Ke}from"./types-B0PlfpKc.js";import{r as Oe,C as He}from"./CodeDiffPane-C9HT1dCT.js";import{r as qe,a as Ge,w as Ve,b as Xe,f as xe,C as Je,s as Qe}from"./CodeProjectPicker-5Y3GvXkM.js";import{ShikiPane as Ye}from"./ShikiPane-DyEJdcvb.js";/* empty css */import{A as Ze}from"./arrow-left-i-h6JAgs.js";import{C as et}from"./chevron-right-BMqtBds_.js";import{C as tt}from"./check-Bfs7hMb1.js";import{C as nt}from"./copy-De4s38o2.js";import"./cache-BO2Bd_LV.js";import"./usePierreRuntime-Bq6mXrgd.js";import"./chunk-HRAB3GC3-BUVYXXAp.js";/* empty css */import"./chevron-down-Da5tV19_.js";import"./createLucideIcon-DLlxGjKt.js";import"./search-BbgsEMXa.js";const st=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 V(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 rt(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 it(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"&&st.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 Nt({route:i,navigate:l,root:k,file:g,project:f,path:x,wt:u,line:Le,endLine:Ne,returnConversationId:Re,embedded:X=!1}){const I=k??i?.root??null,B=g??i?.file??null,p=f??i?.project??null,b=x??i?.path??null,P=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(()=>I??(p?null:qe())),[y,Q]=s.useState(()=>new Map),[L,U]=s.useState(()=>new Set),[de,ue]=s.useState(null),[a,W]=s.useState(B),[c,_]=s.useState(null),[Ee,Y]=s.useState(!1),[fe,z]=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,A]=s.useState(()=>p?{phase:"resolving"}:{phase:"idle"}),ne=p?`${p}\0${b??""}\0${P??""}`: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 G(`/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){U(d=>new Set([...d,...n]));for(const d of n)E(d)}},[E]);s.useEffect(()=>{if(!p)return;const e=`${p}\0${b??""}\0${P??""}`;if(R.current===e)return;const t=n=>{R.current=e;const d=b?`${n}/${b}`:null;A({phase:"idle"}),J(n),W(d),$(n,d)};if(h){const n=rt(h,p,P);if(n){t(n.root);return}}se.current!==e&&(A({phase:"resolving"}),G(`/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);A({phase:"failed",message:d.includes(p)?d:`Can't resolve project "${p}": ${d}`})}))},[p,b,P,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=Ge(o),t=he.current,n=t?ye(o,t):[];e?(Q(new Map(Object.entries(e.entries))),U(new Set([...e.expanded,...n])),!t&&e.selectedFile&&W(e.selectedFile)):(Q(new Map),U(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||(Ve(o,{entries:y,expanded:L,selectedFile:a}),Xe(o))},[o,y,L,a]),s.useEffect(()=>{!I||!B||$(I,B)},[I,B,$]);const re=s.useRef(new Map),ie=s.useRef(new Set),$e=3e4,K=s.useCallback(e=>{const t=re.current.get(e);return t?Date.now()-t.at>$e?(re.current.delete(e),null):t.preview:null},[]),O=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=>{K(e)||ie.current.has(e)||(ie.current.add(e),G(`/api/file/preview?path=${encodeURIComponent(e)}`).then(t=>O(e,t)).catch(()=>{}).finally(()=>ie.current.delete(e)))},[K,O]);s.useEffect(()=>{if(Z("idle"),!a){_(null),z(null);return}const e=K(a);if(e){_(e.kind==="file"?e:null),z(null),Y(!1);return}let t=!1;return Y(!0),z(null),G(`/api/file/preview?path=${encodeURIComponent(a)}`).then(n=>{t||(O(a,n),_(n.kind==="file"?n:null))}).catch(n=>{t||(_(null),z(n instanceof Error?n.message:String(n)))}).finally(()=>{t||Y(!1)}),()=>{t=!0}},[a,K,O]);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 H=s.useCallback((e,t)=>{X||!l||l(me(e,t))},[X,l,me]),Te=s.useCallback(e=>{U(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),W(e),o&&H(o,e)},[o,H]),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]),q=!!(o&&a&&Oe(o,a));s.useEffect(()=>{q||ee("source")},[q]);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,A({phase:"idle"}),te(e.line&&e.line>0?{line:e.line,...e.endLine&&e.endLine>=e.line?{endLine:e.endLine}:{}}:null),W(e.file??null),J(e.root),e.file&&$(e.root,e.file),H(e.root,e.file??null)},[$,H]);return r.jsxs("div",{className:"s-code-screen","data-embedded":X||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(Ze,{size:13,strokeWidth:1.9,"aria-hidden":!0}),r.jsx("span",{children:"Back to thread"})]}):null,r.jsx(Je,{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:Qe(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(et,{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:it(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}),q?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:[V(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(tt,{size:12,"aria-hidden":!0}):r.jsx(nt,{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"&&q&&o&&a?r.jsx(He,{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 ",V(256*1024)," of ",V(c.sizeBytes)," ·"," ",r.jsx("a",{href:c.rawUrl,target:"_blank",rel:"noreferrer",children:"open raw"})]}):null,r.jsx(Ye,{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," · ",V(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 Rt=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{Nt as CodeContent,Rt as scoutSurface};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as h,j as e}from"./index-Bli6bTLU.js";import{A as G}from"./AgentAvatar-B1xvQ7ej.js";import{M as J}from"./text-BR9Bap0E.js";import{C as Y,D as ee,E as O,F as se,M as _}from"./NewChatComposer-Bgqes0UQ.js";import{F as te}from"./file-text-BVhkMWyC.js";import"./index-DFdlQs_c.js";import{c as I}from"./createLucideIcon-DLlxGjKt.js";import{Z as ae}from"./zap-rw7uwZht.js";import{X as ne}from"./x-BJyPzFnn.js";const re=[["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"}]],oe=I("pencil",re);const ce=[["path",{d:"M20 18v-2a4 4 0 0 0-4-4H4",key:"5vmcpk"}],["path",{d:"m9 17-5-5 5-5",key:"nvlc11"}]],ie=I("reply",ce),U="Only markdown, code, images, and video clips can be attached.";function Ce(){const[t,c]=h.useState([]),[g,x]=h.useState(null),[d,p]=h.useState(null),[i,j]=h.useState(0),n=h.useRef(null),f=h.useCallback((r,l="Attached")=>{const m=r.filter(Y);return m.length===0?(r.length>0&&p(U),0):(p(null),c(v=>{const z=new Set(v.map(u=>`${u.name}:${u.size}:${u.lastModified}`)),R=m.filter(u=>!z.has(`${u.name}:${u.size}:${u.lastModified}`));return R.length>0?[...v,...R]:v}),x(m.length===1?`${l} ${m[0]?.name??"1 attachment"}.`:`${l} ${m.length} attachments.`),m.length)},[]),b=h.useCallback(r=>{c(l=>l.filter(m=>m!==r)),x(null)},[]),$=h.useCallback(()=>{c([]),x(null),p(null),j(0)},[]),y=h.useCallback(()=>{n.current?.click()},[]),E=h.useCallback(r=>{const l=ee(r.clipboardData);l.length!==0&&(r.preventDefault(),f(l,"Pasted"))},[f]),k=h.useMemo(()=>({onDragOver:r=>{O(r.dataTransfer)&&(r.preventDefault(),j(l=>l===0?1:l))},onDragLeave:r=>{r.currentTarget.contains(r.relatedTarget)||j(0)},onDrop:r=>{if(!O(r.dataTransfer))return;r.preventDefault(),j(0);const l=se(r.dataTransfer);if(l.length===0){p(U);return}f(l,"Dropped")}}),[f]);return{files:t,hasFiles:t.length>0,feedback:g,error:d,dragActive:i>0,stage:f,remove:b,clear:$,setError:p,openPicker:y,dropHandlers:k,onPaste:E,inputRef:n}}function le(t){if(t<1024)return`${t} B`;const c=t/1024;return c<1024?`${c.toFixed(0)} KB`:`${(c/1024).toFixed(1)} MB`}function de(t){return(t.split(".").pop()?.toUpperCase()??"FILE").slice(0,4)}function me({file:t,onRemove:c}){const g=h.useMemo(()=>URL.createObjectURL(t),[t]);h.useEffect(()=>()=>URL.revokeObjectURL(g),[g]);const x=t.type.startsWith("video/"),d=t.type.startsWith("image/"),p=de(t.name),i=le(t.size);return e.jsxs("div",{className:"s-msg-compose-attachment surface-card surface-card--inset",children:[x?e.jsx("video",{src:g,muted:!0,playsInline:!0}):d?e.jsx("img",{src:g,alt:t.name}):e.jsxs("div",{className:"s-msg-compose-attachment-file",title:`${t.name} (${i})`,children:[e.jsxs("div",{className:"s-msg-compose-attachment-file-icon",children:[e.jsx(te,{size:16,"aria-hidden":"true"}),e.jsx("span",{className:"s-msg-compose-attachment-ext label-xs",children:p})]}),e.jsx("span",{className:"s-msg-compose-attachment-name",children:t.name}),e.jsx("span",{className:"s-msg-compose-attachment-size label-xs text-dim",children:i})]}),e.jsx("button",{type:"button",className:"s-msg-compose-attachment-remove btn btn--ghost btn--icon","aria-label":`Remove ${t.name}`,title:`Remove ${t.name}`,onClick:c,children:"×"})]})}function ue({attachments:t,accept:c="image/*,video/*,text/markdown,.md,.markdown,text/plain,.txt"}){const{files:g,feedback:x,error:d,remove:p,stage:i,inputRef:j}=t;return e.jsxs(e.Fragment,{children:[e.jsx("input",{ref:j,type:"file",multiple:!0,accept:c,className:"s-msg-compose-file-input",onChange:n=>{i([...n.target.files??[]]),n.target.value=""}}),g.length>0?e.jsx("div",{className:"s-msg-compose-attachments","aria-label":"Staged attachments",children:g.map(n=>e.jsx(me,{file:n,onRemove:()=>p(n)},`${n.name}:${n.size}:${n.lastModified}`))}):null,d?e.jsx("div",{className:"s-msg-compose-attach-note","data-tone":"error",role:"alert",children:d}):x?e.jsx("div",{className:"s-msg-compose-attach-note","data-tone":"muted",role:"status",children:x}):null]})}function pe({composeRef:t,draft:c,setDraft:g,composePlaceholder:x,slashState:d,setSlashState:p,filteredSlashCommands:i,applySlashCommand:j,mentionState:n,setMentionState:f,filteredMentions:b,applyMention:$,updateTriggersFromDraft:y,closeSuggestions:E,replyTarget:k,onCancelReply:r,isStopMode:l,sending:m,composeAction:v,onSend:z,onInterrupt:R,attachments:u,isAgentBusy:H,busyIntent:D,onBusyIntentChange:L,queued:N,queueNote:K,onEditQueued:B,editingQueuedId:C,editingAttachmentCount:A,onCancelEdit:W,onUnqueue:S,onSendQueuedNow:Q}){const Z=e.jsxs(e.Fragment,{children:[d.open?e.jsx(_,{label:"Slash commands",items:i.map(s=>({id:s.command,token:s.label,description:s.description})),activeIndex:d.index,onPick:s=>{const a=i[s];a&&j(a)},onActiveIndexChange:s=>p(a=>({...a,index:s}))}):null,n.open?e.jsx(_,{label:"Mention agent",items:b.map(s=>({id:s.id,token:`@${s.handle}`,description:s.name,avatarNode:e.jsx(G,{name:s.name,size:20,tile:!0,presence:!1})})),activeIndex:n.index,onPick:s=>{const a=b[s];a&&$(a)},onActiveIndexChange:s=>f(a=>({...a,index:s}))}):null]}),V=c.trim().length>0,q=C!==null,P=V||u.hasFiles||A>0,F=H&&P,w=F&&D==="steer",T=q?N.findIndex(s=>s.id===C)+1:0,M=F?e.jsxs("div",{className:"s-msg-compose-mode",role:"group","aria-label":"What Send does while this turn is running",children:[e.jsx("button",{type:"button",className:"s-msg-compose-mode-btn","data-mode":"queue","aria-pressed":D==="queue",title:"Hold this draft until the running turn lands",disabled:m,onClick:()=>L("queue"),children:"Queue"}),e.jsx("button",{type:"button",className:"s-msg-compose-mode-btn","data-mode":"steer","aria-pressed":D==="steer",title:"Interrupt the running turn and deliver this now",disabled:m,onClick:()=>L("steer"),children:"Steer"})]}):null,X=N.length>0||M?e.jsxs("div",{className:"s-msg-compose-queue",role:"group","aria-label":"Queued messages",children:[e.jsxs("div",{className:"s-msg-compose-queue-head",children:[e.jsx("span",{className:"s-msg-compose-queue-kicker",children:N.length>0?`Queue · ${N.length}`:"Queues next"}),e.jsx("span",{className:"s-msg-compose-queue-hint",children:q?w?`Rewriting ${T} — send interrupts this turn`:`Rewriting ${T} — send returns it to its place`:N.length>0?w?"Send interrupts this turn":K??"":w?"Interrupts this turn on send":"Sends when this turn lands"}),M]}),N.map((s,a)=>e.jsxs("div",{className:"s-msg-compose-queue-row","data-editing":s.id===C?"true":void 0,children:[e.jsx("span",{className:"s-msg-compose-queue-index",children:a+1}),e.jsx("span",{className:"s-msg-compose-queue-body",children:s.body.trim()||"Attachments only"}),s.attachments.length>0?e.jsxs("span",{className:"s-msg-compose-queue-clip",children:[s.attachments.length," file",s.attachments.length===1?"":"s"]}):null,s.id===C?e.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 ${a+1}`,onClick:W,children:"Cancel edit"}):e.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 ${a+1}`,disabled:m||q,onClick:()=>B(s.id),children:[e.jsx(oe,{size:11,"aria-hidden":"true"}),e.jsx("span",{children:"Edit"})]}),e.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 ${a+1} now`,disabled:m||s.id===C,onClick:()=>Q(s.id),children:[e.jsx(ae,{size:11,"aria-hidden":"true"}),e.jsx("span",{children:"Send now"})]}),e.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 ${a+1}`,onClick:()=>S(s.id),children:"×"})]},s.id))]}):null;return e.jsx(J,{density:"thread",value:c,onChange:(s,a)=>{g(s),y(s,a?.caret??s.length)},onSend:z,placeholder:x,sending:m,stopMode:l,onStop:R,canSend:P,sendTitle:w?"Steer — interrupt this turn and send now (Cmd+Enter)":F?"Queue for the next turn (Cmd+Enter)":"Send (Cmd+Enter)",sendAriaLabel:w?"Steer — interrupt this turn and send now (Cmd+Enter)":F?"Queue message for the next turn (Cmd+Enter)":v==="steer"?"Send follow-up (Cmd+Enter)":"Send message (Cmd+Enter)",showAttach:!0,onAttach:u.openPicker,onPaste:u.onPaste,dropHandlers:u.dropHandlers,dragActive:u.dragActive,textareaRef:t,overlay:Z,above:X,aboveAttached:!0,header:e.jsxs(e.Fragment,{children:[k?e.jsxs("div",{className:"s-thread-compose-reply surface-card surface-card--inset",role:"status",children:[e.jsx(ie,{className:"s-thread-compose-reply-icon text-muted",size:13,strokeWidth:1.8,"aria-hidden":"true"}),e.jsx("span",{className:"s-thread-compose-reply-label label-xs text-muted",children:"Replying to"}),e.jsx("span",{className:"s-thread-compose-reply-actor chip chip--sm chip--mono chip--neutral",children:k.actorLabel}),e.jsx("span",{className:"s-thread-compose-reply-preview text-muted",title:k.preview,children:k.preview}),e.jsx("button",{type:"button",className:"s-thread-compose-reply-cancel btn btn--ghost btn--icon","aria-label":"Cancel reply",title:"Cancel reply",onClick:r,children:e.jsx(ne,{size:13,strokeWidth:1.8,"aria-hidden":"true"})})]}):null,q&&A>0?e.jsxs("div",{className:"s-msg-compose-carried",role:"status",children:[A," file",A===1?"":"s"," stay attached to this draft"]}):null,e.jsx(ue,{attachments:u})]}),tools:e.jsxs("span",{className:"s-thread-compose-hint s-msg-compose-tools-hint",children:[e.jsx("kbd",{className:"s-kbd",children:"/"})," commands"," · ",e.jsx("kbd",{className:"s-kbd",children:"@"})," agents"]}),onSelect:s=>{const a=s.currentTarget;y(a.value,a.selectionStart)},onBlur:()=>{setTimeout(E,120)},onKeyDown:s=>{if(!(d.open&&i.length>0||n.open&&b.length>0))return!1;if(s.key==="ArrowDown")return d.open?p(o=>({...o,index:(o.index+1)%i.length})):n.open&&f(o=>({...o,index:(o.index+1)%b.length})),!0;if(s.key==="ArrowUp")return d.open?p(o=>({...o,index:(o.index-1+i.length)%i.length})):n.open&&f(o=>({...o,index:(o.index-1+b.length)%b.length})),!0;if(s.key==="Escape")return E(),!0;if((s.key==="Enter"||s.key==="Tab")&&!s.shiftKey&&!s.metaKey&&!s.ctrlKey&&!s.altKey){if(d.open){const o=i[d.index]??i[0];o&&j(o)}else if(n.open){const o=b[n.index]??b[0];o&&$(o)}return!0}return!1}})}const we=Object.freeze(Object.defineProperty({__proto__:null,ConversationComposer:pe},Symbol.toStringTag,{value:"Module"}));export{pe as C,we as a,Ce as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as t}from"./index-Bli6bTLU.js";import{M as p}from"./message-markup-DAnnGpWr.js";import{f as d}from"./conversation-model-CigSPlKA.js";import{t as n}from"./time-Dhsh_2EG.js";import"./mentions-Cd6XticV.js";import"./colors-BtO5_zlx.js";import"./index-DFdlQs_c.js";import"./api-DEHEgJ9m.js";import"./Provider-Ve8yXaWR.js";import"./provider-CX9EWecp.js";import"./router-B0YclXYg.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-D4dHTRkt.js";import"./sse-CSozY6mp.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-D4vuKzOL.js";import"./DocumentFocusViewer-DmtFisY9.js";import"./createLucideIcon-DLlxGjKt.js";import"./TextDocumentSurface-C7fGlzY8.js";import"./file-text-BVhkMWyC.js";import"./x-BJyPzFnn.js";import"./chevron-right-BMqtBds_.js";import"./code-xml-ByQsfOI_.js";import"./arrow-left-i-h6JAgs.js";import"./arrow-right-B0Yi01Zr.js";import"./scout-voice-DvG_3stJ.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-7iEtvu9P.js";import"./NewChatComposer-Bgqes0UQ.js";import"./text-BR9Bap0E.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-DoT8gpw6.js";import"./HarnessMark-DGZ6o6Ct.js";import"./NewChatOrigin-DpHS2Wmt.js";import"./chevron-down-Da5tV19_.js";import"./search-BbgsEMXa.js";import"./chunk-HRAB3GC3-BUVYXXAp.js";import"./AgentDetailCard-FelCxQrT.js";import"./AgentLiveActions-Bn3zeZBN.js";import"./terminal-takeover-CtA3wcXh.js";import"./openContent-C6XO6kr5.js";import"./eye-BeCSqJn1.js";import"./terminal-BiNIXhna.js";function l({at:a}){const i=d(a);return t.jsxs("div",{className:"s-thread-day-divider","aria-label":i,children:[t.jsx("span",{className:"s-thread-day-line","aria-hidden":"true"}),t.jsx("span",{className:"s-thread-day-label",children:i}),t.jsx("span",{className:"s-thread-day-line","aria-hidden":"true"})]})}function it({row:a,expanded:i,showDayDivider:e,onToggle:s}){const m=`${a.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:a.createdAt}),a.messages.map(r=>t.jsx("span",{id:`msg-${r.id}`,className:"s-thread-fanout-anchor","aria-hidden":"true"},r.id)),t.jsxs("button",{type:"button",className:"s-thread-fanout-summary","aria-expanded":i,onClick:s,title:a.recipients.join(", "),children:[t.jsx("span",{className:"s-thread-fanout-caret","aria-hidden":"true",children:i?"▾":"▸"}),t.jsx("span",{className:"s-thread-fanout-label",children:m}),t.jsx("span",{className:"s-thread-fanout-time",children:n(a.createdAt)})]}),i&&t.jsxs("div",{className:"s-thread-fanout-detail",children:[t.jsx("ul",{className:"s-thread-fanout-recipients",children:a.messages.map((r,o)=>t.jsx("li",{className:"s-thread-fanout-recipient",children:a.recipients[o]},r.id))}),t.jsx("div",{className:"s-thread-fanout-body",children:t.jsx(p,{text:a.messages[0].body})})]})]})}export{it as FanOutRow,l as ThreadDayDivider};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as k,j as e}from"./index-Bli6bTLU.js";import{c as A}from"./clipboard-e3fSpeo7.js";import{d as G}from"./router-B0YclXYg.js";import{A as M}from"./AgentAvatar-B1xvQ7ej.js";import{H as K}from"./HarnessMark-DGZ6o6Ct.js";import{a as J}from"./Provider-Ve8yXaWR.js";import{H as Q}from"./agent-identity-DzHGhLdJ.js";import{n as Z,c as ee}from"./colors-BtO5_zlx.js";import{B as te}from"./BackToPicker-CqYhOaLB.js";import{o as P}from"./openContent-C6XO6kr5.js";import{AstronautSuit as se}from"./AstronautSuit-BADl7m8x.js";import{w as ne,x as ae}from"./conversation-model-CigSPlKA.js";import{E as re}from"./eye-BeCSqJn1.js";import{c as oe}from"./createLucideIcon-DLlxGjKt.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-D4dHTRkt.js";import"./api-DEHEgJ9m.js";import"./SpriteAvatar-DMrSssNZ.js";import"./provider-CX9EWecp.js";import"./sse-CSozY6mp.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-D4vuKzOL.js";import"./DocumentFocusViewer-DmtFisY9.js";import"./TextDocumentSurface-C7fGlzY8.js";import"./file-text-BVhkMWyC.js";import"./x-BJyPzFnn.js";import"./chevron-right-BMqtBds_.js";import"./code-xml-ByQsfOI_.js";import"./arrow-left-i-h6JAgs.js";import"./arrow-right-B0Yi01Zr.js";import"./scout-voice-DvG_3stJ.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-7iEtvu9P.js";import"./NewChatComposer-Bgqes0UQ.js";import"./text-BR9Bap0E.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-DoT8gpw6.js";import"./index-DFdlQs_c.js";import"./NewChatOrigin-DpHS2Wmt.js";import"./chevron-down-Da5tV19_.js";import"./search-BbgsEMXa.js";import"./chunk-HRAB3GC3-BUVYXXAp.js";import"./time-Dhsh_2EG.js";const ie=[["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"}]],le=oe("user-plus",ie),X=150,_=320,ce=1.4,de=1.1,V=5,me=22,W=5200,he=1,pe=1200;function ue(n){k.useEffect(()=>{const s=n.current;if(!s||window.matchMedia?.("(prefers-reduced-motion: reduce)").matches)return;let i=[],r=[],x=-9999,m=-9999,u=0;const c=()=>{i=[],r=[],s.querySelectorAll(".sprite-cell--eye circle").forEach(o=>{const a=o.getBoundingClientRect();if(!a.width)return;const h=o.closest("[data-state]");i.push({el:o,cx:a.left+a.width/2,cy:a.top+a.height/2,working:h?.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})})},y=o=>o<X?1:o>_?0:(_-o)/(_-X),f=o=>{for(const a of i){const h=x-a.cx,N=m-a.cy,b=Math.hypot(h,N),p=y(b),v=b<1?1:b;let j=h/v*ce*p;const w=N/v*de*p;if(a.working&&p<1){const S=o%W/W;j+=Math.sin(S*Math.PI*2)*he*(1-p)}a.el.style.transform=`translate(${j.toFixed(2)}px, ${w.toFixed(2)}px)`}for(const a of r){const h=x-a.cx,N=Math.hypot(h,m-a.cy),b=y(N),p=Math.max(-V,Math.min(V,h/me))*b;a.el.style.transform=p===0?"":`rotate(${p.toFixed(2)}deg)`}u=requestAnimationFrame(f)},d=o=>{x=o.clientX,m=o.clientY};c();const L=window.setInterval(c,pe);return u=requestAnimationFrame(f),window.addEventListener("resize",c),document.addEventListener("pointermove",d,{passive:!0}),()=>{cancelAnimationFrame(u),window.clearInterval(L),window.removeEventListener("resize",c),document.removeEventListener("pointermove",d);for(const o of i)o.el.style.transform="";for(const o of r)o.el.style.transform=""}},[n])}function E(n,s,i){const r=i?Q[i.trim().toLowerCase()]:void 0;return{"--fp-z":String(n-s),"--fp-i":String(s),...r==null?{}:{"--fp-suit-hue":String(r)}}}function xe(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 O({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 R({count:n,className:s,style:i,rosterId:r,expanded:x,onClick:m}){const u=`${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":`${u}; open participant list`,"aria-haspopup":"dialog","aria-controls":r,"aria-expanded":x,onClick:m,children:e.jsxs("span",{className:"s-thread-participant-face s-thread-participant-face--overflow",children:["+",xe(n)]})})}function ot({showBackNav:n,isDm:s,navigate:i,route:r,canonicalConversationId:x,threadTitle:m,agentId:u,sessionId:c,detailRoute:y,participants:f,operator:d,canAddParticipants:L,onToggleAddParticipant:o}){const a=J(),h=G(r),N=k.useRef(null),b=k.useRef(null),p=k.useId(),[v,j]=k.useState(!1);ue(N);const w=f.slice(0,4),S=Math.max(f.length-w.length,0),z=Math.max(f.length-2,0),B=Math.max(f.length-1,0),C=w.length+(S>0?1:0)+(d.active?1:0);k.useEffect(()=>{if(!v)return;const t=g=>{b.current?.contains(g.target)||j(!1)},l=g=>{g.key==="Escape"&&j(!1)};return document.addEventListener("mousedown",t),document.addEventListener("keydown",l),()=>{document.removeEventListener("mousedown",t),document.removeEventListener("keydown",l)}},[v]);const $=t=>t.agent?{view:"agents-v2",agentId:t.agent.id,...h?{machineId:h}:{}}:t.sessionId?{view:"sessions",sessionId:t.sessionId,...h?{machineId:h}:{}}:null,H=t=>{const l=$(t);l&&(j(!1),P(i,l,{returnTo:r}))};return e.jsxs("div",{className:"s-thread-center-header",onClick:t=>{t.target?.closest("button,a,input,select,textarea")||!s||!y||P(i,y,{returnTo:r})},style:s&&y?{cursor:"pointer"}:void 0,onContextMenu:t=>{const l=[{kind:"action",label:"Copy Title",onSelect:()=>{A(m)}}];u&&l.push({kind:"action",label:"Copy Agent ID",onSelect:()=>{A(u)}}),!u&&c&&l.push({kind:"action",label:"Copy Session ID",onSelect:()=>{A(c)}}),l.push({kind:"action",label:"Copy Conversation ID",onSelect:()=>{A(x)}}),a(t,l)},children:[n&&e.jsx(te,{slot:"conversation",fallback:{view:"inbox"},navigate:i,label:"Back",className:"s-thread-header-back"}),e.jsx("div",{className:"s-thread-center-header-info",children:s&&y?e.jsx("button",{type:"button",className:"s-thread-center-header-name",title:`Open ${m} details`,onClick:()=>P(i,y,{returnTo:r}),children:m}):e.jsx("span",{className:"s-thread-center-header-name",children:m})}),e.jsxs("div",{className:"s-thread-center-header-right",children:[f.length>0&&e.jsxs("div",{className:"s-thread-participants",ref:t=>{N.current=t,b.current=t},"aria-label":"Conversation participants",children:[w.map((t,l)=>{const g=[t.harness,t.model,t.reasoningEffort].filter(Boolean).join(" · ")||null,I=t.agent?Z(t.agent.state??null,t.agent):null,U=t.agent?ee(t.agent.state??null,t.agent):"Session participant",q=$(t),T=q?t.agent?"Open profile":"Open session":null,Y=[t.name,g,U,T].filter(Boolean).join(", "),D=e.jsxs(e.Fragment,{children:[e.jsxs("span",{className:"s-thread-participant-face",children:[e.jsx(se,{}),e.jsx(M,{agent:t.agent??void 0,name:t.name,placement:"turn",size:28,className:"s-thread-participant-avatar"})]}),t.harness?e.jsx(K,{harness:t.harness,size:9,className:"s-thread-participant-harness",title:null}):null,e.jsx(O,{name:t.name,runtime:g,state:U,action:T})]}),F={className:"s-thread-participant",style:E(C,l,t.harness),"data-state":I??void 0,"data-compact-hidden":l>=2?"true":void 0,"data-narrow-hidden":l>=1?"true":void 0,"aria-label":Y};return q?e.jsx("button",{type:"button",...F,className:`${F.className} s-thread-participant--button`,onClick:()=>H(t),children:D},t.id):e.jsx("span",{...F,role:"group",tabIndex:0,children:D},t.id)}),S>0?e.jsx(R,{count:S,className:"s-thread-participant--desktop-overflow",style:E(C,w.length),rosterId:p,expanded:v,onClick:()=>j(t=>!t)}):null,z>0?e.jsx(R,{count:z,className:"s-thread-participant--compact-overflow",style:E(C,2),rosterId:p,expanded:v,onClick:()=>j(t=>!t)}):null,B>0?e.jsx(R,{count:B,className:"s-thread-participant--narrow-overflow",style:E(C,1),rosterId:p,expanded:v,onClick:()=>j(t=>!t)}):null,d.active?e.jsxs("span",{className:"s-thread-participant s-thread-participant--operator",style:E(C,C-1),role:"group",tabIndex:0,"aria-label":`${d.name}, you, in this conversation`,children:[e.jsx("span",{className:"s-thread-participant-face",children:e.jsx(M,{name:d.name,placement:"turn",size:28,className:"s-thread-participant-avatar"})}),e.jsx(O,{name:`${d.name} (you)`,runtime:null,state:"In this conversation",action:null})]}):e.jsxs("span",{className:"s-thread-participant-observer",role:"group",tabIndex:0,"aria-label":`${d.name}, observing, not in this conversation`,children:[e.jsx(re,{size:15,strokeWidth:1.9,"aria-hidden":"true"}),e.jsx(O,{name:d.name,runtime:null,state:"Observing, not in this conversation",action:null})]}),v?e.jsxs("div",{id:p,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=$(t),g=[t.harness,t.model].filter(Boolean).join(" · "),I=e.jsxs(e.Fragment,{children:[e.jsx(M,{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:()=>H(t),children:I},t.id):e.jsx("div",{className:"s-thread-participant-roster-row",children:I},t.id)}),d.active?e.jsxs("div",{className:"s-thread-participant-roster-row",children:[e.jsx(M,{name:d.name,placement:"turn",size:24,className:"s-thread-participant-roster-avatar"}),e.jsxs("span",{children:[e.jsxs("strong",{children:[d.name," (you)"]}),e.jsx("small",{children:"Operator"})]})]}):null]})]}):null]}),L&&e.jsx("button",{type:"button",className:"s-thread-add-participant-trigger",onClick:o,title:"Add participant","aria-label":"Add participant",children:e.jsx(le,{size:14,strokeWidth:1.9,"aria-hidden":"true"})})]})]})}function it({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:()=>{A(n)},children:[e.jsx("span",{children:ne()}),e.jsx("strong",{children:ae(n)})]}),s&&e.jsxs("span",{className:"s-thread-identity-chip",title:s,children:[e.jsx("span",{children:"Alias"}),e.jsx("strong",{children:s})]})]})}function lt({agents:n,addParticipantId:s,setAddParticipantId:i,addingParticipant:r,addParticipantError:x,onCancel:m,onSubmit:u}){return e.jsxs("form",{className:"s-thread-add-participant",onSubmit:c=>{c.preventDefault(),u()},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:m,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"})]})]}),x&&e.jsx("div",{className:"s-thread-add-participant-error",children:x})]})}export{lt as AddParticipantForm,ot as ConversationHeader,it as ConversationIdentityRow};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/conversation-motion-features-_95aZx_1.js","assets/gestures-BXIGYk_p.js","assets/index-Bli6bTLU.js","assets/index-DzlEgstl.css","assets/use-reduced-motion-BLn59zLn.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{j as e,r as g,_ as z}from"./index-Bli6bTLU.js";import{n as W,t as B,o as O,r as D,p as U,m as F,c as K,q as H,s as q}from"./conversation-model-CigSPlKA.js";import{n as G,d as L,f as V,s as J}from"./colors-BtO5_zlx.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-Ve8yXaWR.js";import{o as E}from"./openContent-C6XO6kr5.js";import{g as Y,c as Z,b as ee,e as te,f as se}from"./tail-display-DcliDVkW.js";import{u as ae}from"./use-reduced-motion-BLn59zLn.js";import{L as ie,m as f}from"./proxy-C35W-YHZ.js";import{C as ne}from"./chevron-down-Da5tV19_.js";import{C as re}from"./chevron-right-BMqtBds_.js";import{A as oe}from"./activity-D4W2XZY2.js";import{T as ce}from"./terminal-BiNIXhna.js";import{M as le}from"./message-circle-44KSmbvQ.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 De(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 Ue(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 Fe(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 Ke(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 He(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 qe(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 Ge(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 Ve(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-_95aZx_1.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
|
+
`:"",a.arg?`args: ${a.arg}
|
|
4
|
+
`:"",a.outcome?`outcome: ${a.outcome}
|
|
5
|
+
`:"",a.text?`text: ${a.text}
|
|
6
|
+
`:"",`timestamp: ${b(a.ts)}`]})})]})]},a.id)})})]})}function R({events:s,limit:t=3,compact:o=!1}){const r=s.slice(0,t);return r.length===0?null:e.jsx("ol",{className:`s-thread-motion-events${o?" s-thread-motion-events--compact":""}`,"aria-label":"Latest run activity",children:r.map((i,c)=>e.jsxs("li",{className:"s-thread-motion-event-card",children:[e.jsx("span",{className:"s-thread-motion-event-dot",children:e.jsx("span",{className:`dot dot--sm ${c===0?"dot--working dot--pulse dot--glow":"dot--neutral"}`})}),e.jsx("span",{className:"s-thread-motion-event-kind chip chip--sm chip--mono chip--ghost",children:W(i.kind)}),e.jsx("span",{className:"s-thread-motion-event-summary",children:B(i)??"Activity recorded"}),e.jsx("time",{className:"label-xs",title:b(i.ts),children:w(i.ts)})]},i.id))})}function be(){const s=ae();return e.jsx(ie,{features:je,strict:!0,children:e.jsxs(f.section,{className:"s-thread-skeleton","aria-busy":"true","aria-live":"polite",initial:s?!1:{opacity:0,y:6},animate:{opacity:1,y:0},transition:{duration:.2,ease:[.2,.7,.3,1]},children:[e.jsxs("div",{className:"s-thread-skeleton-intro",role:"status",children:[e.jsxs("div",{className:"s-thread-loader-mark","aria-hidden":"true",children:[e.jsx(f.span,{className:"s-thread-loader-orbit",animate:s?void 0:{rotate:360},transition:{duration:3.2,ease:"linear",repeat:1/0},children:e.jsx("span",{})}),e.jsx(f.span,{className:"s-thread-loader-core",animate:s?void 0:{scale:[.88,1,.88],opacity:[.58,1,.58]},transition:{duration:1.8,ease:"easeInOut",repeat:1/0}})]}),e.jsxs("span",{className:"s-thread-skeleton-copy",children:[e.jsx("strong",{children:"Composer ready"}),e.jsx("span",{children:"Gathering the conversation…"})]})]}),e.jsx("div",{className:"s-thread-skeleton-turns","aria-hidden":"true",children:fe.map((t,o)=>e.jsxs(f.div,{className:"s-thread-skeleton-turn",initial:s?!1:{opacity:0,y:7},animate:{opacity:1,y:0},transition:{delay:s?0:.05+o*.055,duration:.24,ease:[.2,.7,.3,1]},children:[e.jsx("span",{className:"s-thread-skeleton-avatar"}),e.jsxs("div",{className:"s-thread-skeleton-lines",children:[e.jsx("span",{className:"s-thread-skeleton-line s-thread-skeleton-line--head",style:{width:t.head}}),e.jsx("span",{className:"s-thread-skeleton-line",style:{width:t.body}}),e.jsx("span",{className:"s-thread-skeleton-line s-thread-skeleton-line--short",style:{width:t.short}})]})]},`${t.head}-${t.body}`))})]})})}function Ne({sessions:s,activeConversationId:t,needsYouIds:o,lastViewed:r,navigate:i}){const c=s.filter(d=>o.has(d.id)||d.agentId&&o.has(d.agentId)),l=g.useMemo(()=>O(s),[s]);return e.jsx("aside",{className:"s-thread-rail",children:e.jsxs("div",{className:"s-thread-rail-scroll",children:[c.length>0&&e.jsxs("div",{className:"s-thread-rail-section s-thread-rail-section--needs-you",children:[e.jsx("div",{className:"s-thread-rail-section-label",children:"Needs you"}),c.map(d=>e.jsx(_,{session:d,active:d.id===t,unread:C(d.lastMessageAt,d.id,r),needsYou:!0,navigate:i},`needs-${d.id}`))]}),l.map(d=>e.jsxs("div",{className:"s-thread-rail-section",children:[e.jsx("div",{className:"s-thread-rail-section-label",children:d.workspace}),d.sessions.map(n=>e.jsx(_,{session:n,active:n.id===t,unread:C(n.lastMessageAt,n.id,r),needsYou:!1,navigate:i},n.id))]},d.workspace))]})})}function ye({sessionMeta:s,agents:t,flights:o,conversationId:r,navigate:i,route:c}){const l=g.useMemo(()=>s?s.participantIds.filter(a=>a!=="operator").map(a=>D(t,[a])).filter(a=>a!==null):[],[s,t]),d={id:"operator",name:"You",handle:"operator",activity:null,state:"ready",agent:null},n=g.useMemo(()=>l.map(a=>({id:a.id,name:a.name,handle:F(a)??K(a.id)??a.id,activity:U(a,o,r),state:G(a.state),agent:a})),[l,o,r]),h=[d,...n];return e.jsxs("aside",{className:"s-thread-sidebar",children:[e.jsxs("div",{className:"s-thread-sidebar-section",children:[e.jsx("div",{className:"s-thread-sidebar-label",children:"In this conversation"}),h.map(a=>{const p=e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"s-ops-avatar",style:{"--size":"28px",background:L(a.name)},children:a.name[0]?.toUpperCase()??"?"}),e.jsxs("div",{className:"s-thread-sidebar-participant-info",children:[e.jsx("span",{className:"s-thread-sidebar-participant-name",children:a.name}),e.jsxs("span",{className:"s-thread-sidebar-participant-handle",children:["@",a.handle]})]}),e.jsx("div",{className:"s-thread-sidebar-participant-activity",children:a.activity?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"s-thread-sidebar-activity-dot s-thread-sidebar-activity-dot--pulse",style:{background:"var(--green)"}}),e.jsx("span",{className:"s-thread-sidebar-activity-label",children:a.activity})]}):V(a.state)||a.id==="operator"?e.jsx("span",{className:"s-thread-sidebar-activity-dot",style:{background:J(a.state)}}):e.jsx("span",{className:"s-thread-sidebar-activity-dot",style:{background:"var(--dim)"}})})]});return a.agent?e.jsx("button",{type:"button",className:"s-thread-sidebar-participant s-thread-sidebar-participant--clickable",onClick:()=>E(i,{view:"agents-v2",agentId:a.agent.id},{returnTo:c}),title:`Open ${a.name} profile`,children:p},a.id):e.jsx("div",{className:"s-thread-sidebar-participant",children:p},a.id)})]}),n.length>0&&e.jsxs("div",{className:"s-thread-sidebar-section",children:[e.jsx("div",{className:"s-thread-sidebar-label",children:"Conversation mesh"}),e.jsx(we,{participants:n})]})]})}function ke({agentName:s,title:t,detail:o,snapshot:r,events:i,steps:c,phase:l,tone:d,workspaceName:n,branch:h,startedAt:a,onOpenTrace:p,onOpenTerminal:u,onSteer:m}){const x=a?w(a):"now";return e.jsxs("section",{className:`s-thread-motion-panel s-thread-motion-panel--${d}`,"aria-live":"polite",children:[e.jsxs("div",{className:"s-thread-motion-head",children:[e.jsx("div",{className:"s-thread-motion-beacon","aria-hidden":"true",children:e.jsx("span",{})}),e.jsxs("div",{className:"s-thread-motion-title-block",children:[e.jsx("div",{className:"s-thread-motion-kicker",children:"Currently working"}),e.jsx("h2",{children:t}),e.jsx("p",{children:o})]})]}),e.jsx("div",{className:"s-thread-motion-meter","aria-hidden":"true",children:Se.map((S,T)=>e.jsx("span",{style:{"--bar-height":`${S}%`,"--bar-delay":`${T*74}ms`}},`${S}-${T}`))}),e.jsxs("dl",{className:"s-thread-motion-stats",children:[e.jsxs("div",{children:[e.jsx("dt",{children:"Session"}),e.jsx("dd",{children:x})]}),e.jsxs("div",{children:[e.jsx("dt",{children:"Activity"}),e.jsx("dd",{children:r.activityLabel})]}),e.jsxs("div",{children:[e.jsx("dt",{children:"Last"}),e.jsx("dd",{children:r.lastActivityLabel})]})]}),e.jsxs("div",{className:"s-thread-motion-latest",children:[e.jsx("span",{children:s}),e.jsx("strong",{children:r.latest})]}),c.length>0?e.jsx(k,{steps:c,phase:null,limit:6}):i.length>0?e.jsx(R,{events:i,limit:4}):l?e.jsx(k,{steps:c,phase:l,limit:6}):e.jsxs("div",{className:"s-thread-motion-waiting",children:[e.jsx("span",{children:"Session created"}),e.jsx("strong",{children:"waiting for the first trace event"})]}),(n||h)&&e.jsxs("div",{className:"s-thread-motion-chips",children:[n&&e.jsx("span",{children:n}),h&&e.jsx("span",{children:h})]}),e.jsx(P,{onOpenTrace:p,onOpenTerminal:u,onSteer:m})]})}function _({session:s,active:t,unread:o,needsYou:r,navigate:i}){const{route:c}=X(),l=H(s),d=(s.agentName??l)[0]?.toUpperCase()??"?",n=s.kind==="direct",h=q(s.workspaceRoot)??s.kind;return e.jsxs("button",{type:"button",className:["s-thread-rail-item",t&&"s-thread-rail-item--active",r&&"s-thread-rail-item--needs-you"].filter(Boolean).join(" "),onClick:()=>E(i,{view:"conversation",conversationId:s.id},{returnTo:c}),children:[n?e.jsx("div",{className:"s-thread-rail-avatar",style:{background:L(s.agentName??l)},children:d}):e.jsx("div",{className:"s-thread-rail-avatar s-thread-rail-avatar--channel",children:"#"}),e.jsxs("div",{className:"s-thread-rail-body",children:[e.jsx("span",{className:"s-thread-rail-name",children:l}),e.jsx("span",{className:"s-thread-rail-sub",children:h})]}),e.jsxs("div",{className:"s-thread-rail-trailing",children:[o&&!r&&e.jsx("span",{className:"s-thread-rail-presence-dot",style:{background:"var(--accent)"}}),r&&e.jsx("span",{className:"s-thread-rail-badge s-thread-rail-badge--amber",children:"!"})]})]})}function we({participants:s}){const c=s.map((l,d)=>{const n=2*Math.PI*d/s.length-Math.PI/2;return{...l,x:130+55*Math.cos(n),y:80+55*Math.sin(n)}});return e.jsx("div",{className:"s-thread-mini-mesh",children:e.jsxs("svg",{viewBox:"0 0 260 160","aria-label":"Conversation participant mesh",children:[c.map(l=>e.jsx("line",{x1:130,y1:80,x2:l.x,y2:l.y,className:"s-thread-mini-mesh-edge"},`edge-${l.id}`)),e.jsx("circle",{cx:130,cy:80,r:16,className:"s-thread-mini-mesh-node s-thread-mini-mesh-node--center"}),e.jsx("text",{x:130,y:80,className:"s-thread-mini-mesh-label s-thread-mini-mesh-label--center",children:"OP"}),c.map(l=>e.jsxs("g",{children:[e.jsx("circle",{cx:l.x,cy:l.y,r:16,className:"s-thread-mini-mesh-node",style:l.state==="in_turn"||l.state==="in_flight"?{stroke:"var(--green)"}:void 0}),e.jsx("text",{x:l.x,y:l.y,className:"s-thread-mini-mesh-label",children:l.name.slice(0,3).toUpperCase()})]},`node-${l.id}`))]})})}const Se=[42,76,54,88,34,66,92,48,72,38,84,58],Je=Object.freeze(Object.defineProperty({__proto__:null,ChannelRail:Ne,PresenceSidebar:ye,ThreadLoadingSkeleton:be,ThreadMotionPanel:ke,WorkingTurnActions:P,WorkingTurnActivityPreview:R,WorkingTurnSteps:k},Symbol.toStringTag,{value:"Module"}));export{Je as C,M as T,k as W,Ke as a,De as b,be as c,Ve as d,ke as e,R as f,P as g,qe as l,Fe as m,He as o,Ge as s,Ue as t};
|