@yancyyu/openhermit 1.6.42 → 1.6.43
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 +98 -89
- package/bin/hermit.mjs +96 -0
- package/dist-renderer/assets/{ProjectEditorOverlay-DlFQ6mai.js → ProjectEditorOverlay-C98qSs7-.js} +1 -1
- package/dist-renderer/assets/{TeamGraphOverlay-D2TPMPGR.js → TeamGraphOverlay-CsBbZwcL.js} +1 -1
- package/dist-renderer/assets/{_basePickBy-Cmd0RHLQ.js → _basePickBy-ZOyLWjMK.js} +1 -1
- package/dist-renderer/assets/{_baseUniq-BI_iy8ea.js → _baseUniq-DBb726rt.js} +1 -1
- package/dist-renderer/assets/{arc-NzW2mjTP.js → arc-CdiTaR_R.js} +1 -1
- package/dist-renderer/assets/{architectureDiagram-VXUJARFQ-Bzq85AYv.js → architectureDiagram-VXUJARFQ-Cz3sc5TH.js} +1 -1
- package/dist-renderer/assets/{blockDiagram-VD42YOAC-D1PvYS-b.js → blockDiagram-VD42YOAC-DE4c-KJ3.js} +1 -1
- package/dist-renderer/assets/{c4Diagram-YG6GDRKO-D49RKzPC.js → c4Diagram-YG6GDRKO-CmTMDTrV.js} +1 -1
- package/dist-renderer/assets/channel-KTpqi9eT.js +1 -0
- package/dist-renderer/assets/{chunk-4BX2VUAB-fmI_MQmQ.js → chunk-4BX2VUAB-rhHy3tFl.js} +1 -1
- package/dist-renderer/assets/{chunk-55IACEB6-Xsv9RCXZ.js → chunk-55IACEB6-fLZBzuo_.js} +1 -1
- package/dist-renderer/assets/{chunk-B4BG7PRW-BE1KO8Um.js → chunk-B4BG7PRW-DOzxQhim.js} +1 -1
- package/dist-renderer/assets/{chunk-DI55MBZ5-tqJ7Mv7f.js → chunk-DI55MBZ5-COQCcXC5.js} +1 -1
- package/dist-renderer/assets/{chunk-FMBD7UC4-DMD45MVJ.js → chunk-FMBD7UC4-IKU9U_Y4.js} +1 -1
- package/dist-renderer/assets/{chunk-QN33PNHL-DOhGrz-q.js → chunk-QN33PNHL-D6WV154X.js} +1 -1
- package/dist-renderer/assets/{chunk-QZHKN3VN-D8yDgJdD.js → chunk-QZHKN3VN-D90_2DQp.js} +1 -1
- package/dist-renderer/assets/{chunk-TZMSLE5B-BcsEDu7A.js → chunk-TZMSLE5B-BQEil57G.js} +1 -1
- package/dist-renderer/assets/classDiagram-2ON5EDUG-lpzulY5X.js +1 -0
- package/dist-renderer/assets/classDiagram-v2-WZHVMYZB-lpzulY5X.js +1 -0
- package/dist-renderer/assets/clone-CriGymY9.js +1 -0
- package/dist-renderer/assets/{cose-bilkent-S5V4N54A-DlSqGHMX.js → cose-bilkent-S5V4N54A-6WiK6U2P.js} +1 -1
- package/dist-renderer/assets/{dagre-6UL2VRFP-BTT9tSAx.js → dagre-6UL2VRFP-DF4MMuTn.js} +1 -1
- package/dist-renderer/assets/{diagram-PSM6KHXK-Du-U-mK2.js → diagram-PSM6KHXK-CcF1eZ7E.js} +1 -1
- package/dist-renderer/assets/{diagram-QEK2KX5R-jFdHeKas.js → diagram-QEK2KX5R-DYlOVPQB.js} +1 -1
- package/dist-renderer/assets/{diagram-S2PKOQOG-DKLNK2bu.js → diagram-S2PKOQOG-BHXWsZOP.js} +1 -1
- package/dist-renderer/assets/{erDiagram-Q2GNP2WA-CZxHgIIo.js → erDiagram-Q2GNP2WA-GjmuBx8d.js} +1 -1
- package/dist-renderer/assets/{flowDiagram-NV44I4VS-v4XStCD0.js → flowDiagram-NV44I4VS-BuS7YVHk.js} +1 -1
- package/dist-renderer/assets/{ganttDiagram-JELNMOA3-DJjD_BEL.js → ganttDiagram-JELNMOA3-3Teu5tAa.js} +1 -1
- package/dist-renderer/assets/{gitGraphDiagram-V2S2FVAM-BNy-jr03.js → gitGraphDiagram-V2S2FVAM-BiLdCYu5.js} +1 -1
- package/dist-renderer/assets/{graph-DDTrn6je.js → graph-CDP_R8ct.js} +1 -1
- package/dist-renderer/assets/{index-BBp78BAu.js → index-BSZdT-g-.js} +1 -1
- package/dist-renderer/assets/{index-eotrJaYy.js → index-BhWvMqsz.js} +1 -1
- package/dist-renderer/assets/{index-D8_B-cfs.js → index-C2_AupSj.js} +1 -1
- package/dist-renderer/assets/{index-BQrwHZ-k.js → index-C5ujiwAR.js} +580 -588
- package/dist-renderer/assets/index-CIS2CTK9.css +1 -0
- package/dist-renderer/assets/{index-CRKQSG9S.js → index-CVNjLwkq.js} +1 -1
- package/dist-renderer/assets/{index-DR6Wz52b.js → index-CwG3se0q.js} +1 -1
- package/dist-renderer/assets/{infoDiagram-HS3SLOUP-DqnOsuza.js → infoDiagram-HS3SLOUP-DLHUFo72.js} +1 -1
- package/dist-renderer/assets/{journeyDiagram-XKPGCS4Q-DTobaO1d.js → journeyDiagram-XKPGCS4Q-BE07RpJD.js} +1 -1
- package/dist-renderer/assets/{kanban-definition-3W4ZIXB7-HbwVOvWc.js → kanban-definition-3W4ZIXB7-DDHZy4NB.js} +1 -1
- package/dist-renderer/assets/{layout--VYmTcw2.js → layout-5nA5wUxO.js} +1 -1
- package/dist-renderer/assets/{linear-BsJh89Mr.js → linear-BtF1i2qN.js} +1 -1
- package/dist-renderer/assets/{mindmap-definition-VGOIOE7T-BZqUZePd.js → mindmap-definition-VGOIOE7T-Z1Ui9Sqy.js} +1 -1
- package/dist-renderer/assets/{pieDiagram-ADFJNKIX-B1q_nH6P.js → pieDiagram-ADFJNKIX-LCjxckWv.js} +1 -1
- package/dist-renderer/assets/{quadrantDiagram-AYHSOK5B-UD8QhSEu.js → quadrantDiagram-AYHSOK5B-BOwKjSco.js} +1 -1
- package/dist-renderer/assets/{requirementDiagram-UZGBJVZJ-BA_i7Nw8.js → requirementDiagram-UZGBJVZJ-pChP8Znd.js} +1 -1
- package/dist-renderer/assets/{sankeyDiagram-TZEHDZUN-CMTnX-2d.js → sankeyDiagram-TZEHDZUN-DifZ2qpo.js} +1 -1
- package/dist-renderer/assets/{sequenceDiagram-WL72ISMW-BQXDB615.js → sequenceDiagram-WL72ISMW-CJg-WYyY.js} +1 -1
- package/dist-renderer/assets/{splashScene-D0YB9uxm.js → splashScene-94xWCzLA.js} +1 -1
- package/dist-renderer/assets/{stateDiagram-FKZM4ZOC-BAsPXy6X.js → stateDiagram-FKZM4ZOC-DWHOoFdv.js} +1 -1
- package/dist-renderer/assets/stateDiagram-v2-4FDKWEC3-CGYZOoMb.js +1 -0
- package/dist-renderer/assets/{timeline-definition-IT6M3QCI-BdasmVkC.js → timeline-definition-IT6M3QCI-CPgokIo8.js} +1 -1
- package/dist-renderer/assets/{treemap-GDKQZRPO-BkKQqIui.js → treemap-GDKQZRPO-DAVqSR9L.js} +1 -1
- package/dist-renderer/assets/{xychartDiagram-PRI3JC2R-EAlPHOdx.js → xychartDiagram-PRI3JC2R-CCOcGbrD.js} +1 -1
- package/dist-renderer/chat-community-qr.jpg +0 -0
- package/dist-renderer/fonts/Agave-Bold.ttf +0 -0
- package/dist-renderer/fonts/Agave-Regular.ttf +0 -0
- package/dist-renderer/icon.png +0 -0
- package/dist-renderer/icon.rar +0 -0
- package/dist-renderer/index.html +3 -3
- package/package.json +21 -26
- package/src/features/worker-society/core/application/WorkerSocietyService.test.ts +802 -0
- package/src/features/worker-society/core/application/WorkerSocietyService.ts +428 -0
- package/src/features/worker-society/core/application/fakes.ts +101 -0
- package/src/features/worker-society/core/application/ports.ts +70 -0
- package/src/features/worker-society/core/domain/models/society.ts +141 -0
- package/src/features/worker-society/core/domain/policies/societyPolicies.test.ts +739 -0
- package/src/features/worker-society/core/domain/policies/societyPolicies.ts +496 -0
- package/src/features/worker-society/main/adapters/input/societyMcp.test.ts +317 -0
- package/src/features/worker-society/main/adapters/input/societyMcp.ts +257 -0
- package/src/features/worker-society/main/adapters/input/societyRoutes.test.ts +695 -0
- package/src/features/worker-society/main/adapters/input/societyRoutes.ts +194 -0
- package/src/features/worker-society/main/composition/societyComposition.test.ts +74 -0
- package/src/features/worker-society/main/composition/societyComposition.ts +70 -0
- package/src/features/worker-society/main/composition/workerSocietyPlugin.test.ts +69 -0
- package/src/features/worker-society/main/composition/workerSocietyPlugin.ts +67 -0
- package/src/features/worker-society/main/infrastructure/crossTeamMessageGateway.test.ts +132 -0
- package/src/features/worker-society/main/infrastructure/crossTeamMessageGateway.ts +84 -0
- package/src/features/worker-society/main/infrastructure/fsStores.test.ts +216 -0
- package/src/features/worker-society/main/infrastructure/fsStores.ts +113 -0
- package/src/features/worker-society/main/infrastructure/mergingProfileStore.test.ts +195 -0
- package/src/features/worker-society/main/infrastructure/mergingProfileStore.ts +96 -0
- package/src/features/worker-society/renderer/SocietyGraph.tsx +166 -0
- package/src/features/worker-society/renderer/SocietyNodeLabels.tsx +139 -0
- package/src/features/worker-society/renderer/SocietyNodeOverlay.tsx +339 -0
- package/src/features/worker-society/renderer/SocietyView.tsx +437 -0
- package/src/features/worker-society/renderer/index.ts +11 -0
- package/src/features/worker-society/renderer/societyApi.test.ts +259 -0
- package/src/features/worker-society/renderer/societyApi.ts +144 -0
- package/src/features/worker-society/renderer/societyGraphAdapter.test.ts +321 -0
- package/src/features/worker-society/renderer/societyGraphAdapter.ts +240 -0
- package/src/features/worker-society/renderer/societyOverlayActions.test.ts +57 -0
- package/src/features/worker-society/renderer/societyOverlayActions.ts +49 -0
- package/src/features/worker-society/renderer/societyStore.test.ts +218 -0
- package/src/features/worker-society/renderer/societyStore.ts +146 -0
- package/src/features/worker-society/renderer/societyViewUtils.test.ts +81 -0
- package/src/features/worker-society/renderer/societyViewUtils.ts +68 -0
- package/src/main/ipc/extensions.ts +27 -0
- package/src/main/server.ts +1709 -534
- package/src/main/services/ccConnect/CcConnectBridge.ts +26 -11
- package/src/main/services/ccConnect/CcConnectClient.ts +9 -2
- package/src/main/services/ccConnect/workDirReconcile.test.ts +57 -0
- package/src/main/services/ccConnect/workDirReconcile.ts +36 -0
- package/src/main/services/direct-cli/DirectCliSessionManager.test.ts +397 -0
- package/src/main/services/direct-cli/DirectCliSessionManager.ts +508 -0
- package/src/main/services/direct-cli/DirectCliSessionStore.test.ts +79 -0
- package/src/main/services/direct-cli/DirectCliSessionStore.ts +97 -0
- package/src/main/services/direct-cli/__tests__/directCliMessageId.test.ts +40 -0
- package/src/main/services/direct-cli/directCliMessageId.ts +21 -0
- package/src/main/services/direct-cli/index.ts +17 -0
- package/src/main/services/extensions/capability-packs/CapabilityPackLoaderService.ts +637 -0
- package/src/main/services/extensions/catalog/PluginCatalogService.ts +2 -2
- package/src/main/services/loop-assets/LoopAssetsScannerService.ts +657 -0
- package/src/main/services/runtime/providerAwareCliEnv.ts +33 -5
- package/src/main/services/session-intelligence/LocalSessionScanner.ts +156 -71
- package/src/main/services/session-intelligence/SessionUsageParser.ts +103 -8
- package/src/main/services/session-intelligence/UsageTelemetryService.ts +11 -0
- package/src/main/services/session-intelligence/__tests__/teamSessionListMapper.test.ts +104 -0
- package/src/main/services/session-intelligence/teamSessionListMapper.ts +78 -0
- package/src/main/services/system-manager/AdminLoopInitializer.ts +95 -0
- package/src/main/services/system-manager/BuiltinWorkflowSeeder.ts +679 -74
- package/src/main/services/system-manager/SystemManagerConfigService.ts +19 -1
- package/src/main/services/system-manager/WorkflowPromptService.ts +58 -5
- package/src/main/services/system-manager/__tests__/AdminLoopInitializer.test.ts +129 -0
- package/src/main/services/system-manager/__tests__/SystemManagerConfigService.test.ts +60 -0
- package/src/main/services/teams-mvp/CollaborationBoardService.ts +2 -0
- package/src/main/services/teams-mvp/OpsRunbookContext.ts +60 -0
- package/src/main/services/teams-mvp/TaskDispatchService.test.ts +305 -0
- package/src/main/services/teams-mvp/TaskDispatchService.ts +250 -131
- package/src/main/services/teams-mvp/TeamProvisioningService.ts +12 -2
- package/src/main/services/teams-mvp/TeamWorkspaceService.test.ts +207 -0
- package/src/main/services/teams-mvp/TeamWorkspaceService.ts +104 -51
- package/src/main/services/teams-mvp/index.ts +6 -0
- package/src/main/utils/externalPlatformSessionRouting.ts +92 -0
- package/src/main/utils/toolApprovalRules.ts +151 -0
- package/src/renderer/App.tsx +24 -89
- package/src/renderer/api/httpClient.ts +115 -37
- package/src/renderer/api/providers.ts +5 -16
- package/src/renderer/components/chat/CommunityChatView.tsx +81 -0
- package/src/renderer/components/dashboard/DashboardView.tsx +130 -84
- package/src/renderer/components/extensions/ExtensionStoreView.tsx +39 -5
- package/src/renderer/components/extensions/ExtensionsSubTabTrigger.tsx +2 -1
- package/src/renderer/components/extensions/capability-packs/CapabilityPacksPanel.tsx +170 -0
- package/src/renderer/components/layout/PaneContent.tsx +10 -2
- package/src/renderer/components/layout/SortableTab.tsx +4 -0
- package/src/renderer/components/layout/TabBarActions.tsx +13 -16
- package/src/renderer/components/runtime/ProviderRuntimeSettingsDialog.tsx +4 -135
- package/src/renderer/components/schedules/SchedulesView.tsx +22 -14
- package/src/renderer/components/schedules/calendar/CalendarEventBlock.tsx +7 -6
- package/src/renderer/components/settings/SettingsTabs.tsx +24 -21
- package/src/renderer/components/settings/SettingsView.tsx +22 -13
- package/src/renderer/components/settings/components/SettingRow.tsx +13 -5
- package/src/renderer/components/settings/components/SettingsSectionCard.tsx +53 -0
- package/src/renderer/components/settings/components/SettingsSectionHeader.tsx +10 -6
- package/src/renderer/components/settings/components/SettingsSelect.tsx +12 -9
- package/src/renderer/components/settings/components/SettingsToggle.tsx +6 -5
- package/src/renderer/components/settings/components/index.ts +1 -0
- package/src/renderer/components/settings/sections/AdvancedSection.tsx +78 -59
- package/src/renderer/components/settings/sections/CliStatusSection.tsx +32 -44
- package/src/renderer/components/settings/sections/ConfigEditorDialog.tsx +1 -1
- package/src/renderer/components/settings/sections/GeneralSection.tsx +216 -186
- package/src/renderer/components/settings/sections/PlatformsSection.tsx +25 -17
- package/src/renderer/components/settings/sections/TaskBusSection.tsx +63 -22
- package/src/renderer/components/sidebar/SidebarSessions.tsx +120 -80
- package/src/renderer/components/sidebar/SidebarTaskItem.tsx +1 -1
- package/src/renderer/components/splash/splashScene.ts +6 -2
- package/src/renderer/components/system-manager/SystemManagerView.tsx +169 -255
- package/src/renderer/components/tasks/TasksView.tsx +63 -37
- package/src/renderer/components/team/CcSessionsSection.tsx +124 -89
- package/src/renderer/components/team/HarnessBrandLogos.tsx +318 -0
- package/src/renderer/components/team/HarnessSelect.tsx +25 -26
- package/src/renderer/components/team/TeamDetailView.tsx +137 -153
- package/src/renderer/components/team/TeamEmptyState.tsx +9 -37
- package/src/renderer/components/team/TeamListView.tsx +143 -30
- package/src/renderer/components/team/__tests__/CcSessionsSection.hasLocalFile.test.tsx +128 -0
- package/src/renderer/components/team/activity/ActivityItem.tsx +21 -9
- package/src/renderer/components/team/activity/ActivityTimeline.tsx +2 -2
- package/src/renderer/components/team/dialogs/AdvancedCliSection.tsx +1 -1
- package/src/renderer/components/team/dialogs/CreateTaskDialog.tsx +13 -10
- package/src/renderer/components/team/dialogs/CreateTeamDialog.tsx +156 -83
- package/src/renderer/components/team/dialogs/EditTeamDialog.tsx +9 -157
- package/src/renderer/components/team/dialogs/LaunchTeamDialog.tsx +19 -15
- package/src/renderer/components/team/dialogs/PlatformBindingDialog.tsx +48 -10
- package/src/renderer/components/team/dialogs/PlatformManualForm.tsx +11 -12
- package/src/renderer/components/team/dialogs/PlatformSetupQR.tsx +39 -37
- package/src/renderer/components/team/dialogs/RuntimeConfigDialog.tsx +434 -64
- package/src/renderer/components/team/dialogs/SendMessageDialog.tsx +12 -10
- package/src/renderer/components/team/dialogs/TaskDetailDialog.tsx +2 -2
- package/src/renderer/components/team/dialogs/__tests__/CreateTeamDialog.bindProject.test.tsx +399 -0
- package/src/renderer/components/team/dialogs/__tests__/CreateTeamDialog.chineseRepro.test.tsx +253 -0
- package/src/renderer/components/team/dialogs/platformAllowUtils.ts +91 -0
- package/src/renderer/components/team/dialogs/teammateRuntimeCompatibility.tsx +1 -1
- package/src/renderer/components/team/kanban/KanbanTaskCard.test.tsx +41 -0
- package/src/renderer/components/team/kanban/KanbanTaskCard.tsx +41 -86
- package/src/renderer/components/team/loop-console/LoopCommandComposer.tsx +310 -0
- package/src/renderer/components/team/loop-console/LoopConsolePanel.tsx +372 -0
- package/src/renderer/components/team/loop-console/loopSendIntent.test.ts +85 -0
- package/src/renderer/components/team/loop-console/loopSendIntent.ts +221 -0
- package/src/renderer/components/team/loop-console/useLeadSessionToolActivity.ts +74 -0
- package/src/renderer/components/team/loop-console/useLoopCommandSuggestions.ts +165 -0
- package/src/renderer/components/team/loop-console/useLoopConsoleController.ts +266 -0
- package/src/renderer/components/team/members/LeadModelRow.test.tsx +1 -1
- package/src/renderer/components/team/members/LeadModelRow.tsx +5 -3
- package/src/renderer/components/team/members/MemberDetailDialog.tsx +11 -0
- package/src/renderer/components/team/members/MemberDetailStats.tsx +13 -3
- package/src/renderer/components/team/members/MemberDraftRow.test.tsx +1 -1
- package/src/renderer/components/team/members/MemberDraftRow.tsx +1 -1
- package/src/renderer/components/team/members/MemberMessagesTab.tsx +2 -2
- package/src/renderer/components/team/members/MemberStatsTab.tsx +1 -1
- package/src/renderer/components/team/messages/MessageComposer.tsx +150 -44
- package/src/renderer/components/team/messages/MessagesFilterPopover.tsx +2 -2
- package/src/renderer/components/team/messages/MessagesPanel.tsx +34 -28
- package/src/renderer/components/team/schedule/CcCronScheduleDialog.tsx +6 -6
- package/src/renderer/components/team/taskLogs/ExactTaskLogCard.tsx +2 -2
- package/src/renderer/components/team/taskLogs/TaskLogStreamSection.tsx +1 -1
- package/src/renderer/components/terminal/TerminalPanel.tsx +2 -3
- package/src/renderer/components/ui/MentionableTextarea.tsx +5 -1
- package/src/renderer/constants/teamColors.ts +5 -5
- package/src/renderer/hooks/useExtensionsTabState.ts +1 -1
- package/src/renderer/hooks/useMentionDetection.ts +5 -1
- package/src/renderer/hooks/useProjectWorkflowCommands.ts +57 -0
- package/src/renderer/hooks/useTeamSuggestions.ts +2 -0
- package/src/renderer/index.css +19 -2
- package/src/renderer/main.tsx +7 -1
- package/src/renderer/store/index.ts +18 -1
- package/src/renderer/store/slices/extensionsSlice.ts +83 -0
- package/src/renderer/store/slices/tabSlice.ts +61 -0
- package/src/renderer/store/slices/teamSlice.ts +138 -9
- package/src/renderer/types/mention.ts +8 -0
- package/src/renderer/types/tabs.ts +3 -1
- package/src/renderer/utils/__tests__/bindProjectSlug.test.ts +69 -0
- package/src/renderer/utils/__tests__/groupTransformer.test.ts +148 -0
- package/src/renderer/utils/__tests__/initialRoute.test.ts +101 -0
- package/src/renderer/utils/__tests__/leadToolActivity.test.ts +124 -0
- package/src/renderer/utils/__tests__/mergeTeamMessages.test.ts +81 -0
- package/src/renderer/utils/__tests__/teamMessageFiltering.test.ts +213 -0
- package/src/renderer/utils/__tests__/teamMessageKey.test.ts +75 -0
- package/src/renderer/utils/__tests__/workflowCommandExecution.test.ts +173 -0
- package/src/renderer/utils/__tests__/workflowCommandSuggestions.test.ts +59 -0
- package/src/renderer/utils/bindProjectSlug.ts +57 -0
- package/src/renderer/utils/capabilityCommandExecution.ts +113 -0
- package/src/renderer/utils/initialRoute.ts +89 -0
- package/src/renderer/utils/leadToolActivity.ts +117 -0
- package/src/renderer/utils/loopShortcutSuggestions.ts +106 -0
- package/src/renderer/utils/mentionSuggestions.ts +1 -1
- package/src/renderer/utils/slashCommandRegistry.ts +231 -0
- package/src/renderer/utils/teamMentionDirective.ts +31 -0
- package/src/renderer/utils/workflowCommandExecution.ts +96 -0
- package/src/renderer/utils/workflowCommandSuggestions.ts +49 -0
- package/src/shared/types/api.ts +79 -4
- package/src/shared/types/ccConnect.ts +1 -0
- package/src/shared/types/extensions/api.ts +19 -0
- package/src/shared/types/extensions/capabilityPack.ts +118 -0
- package/src/shared/types/extensions/index.ts +29 -1
- package/src/shared/types/index.ts +6 -0
- package/src/shared/types/loopAssets.ts +54 -0
- package/src/shared/types/providers.ts +0 -16
- package/src/shared/types/systemManager.ts +26 -1
- package/src/shared/types/team.ts +41 -5
- package/src/shared/types/terminal.ts +2 -36
- package/src/shared/types/worker.test.ts +28 -0
- package/src/shared/types/worker.ts +3 -0
- package/src/shared/utils/__tests__/effortLevels.test.ts +88 -0
- package/src/shared/utils/__tests__/providerBackend.test.ts +88 -0
- package/src/shared/utils/__tests__/providerLaunchArgs.test.ts +220 -0
- package/src/shared/utils/claudeStreamJson.test.ts +187 -0
- package/src/shared/utils/claudeStreamJson.ts +153 -0
- package/src/shared/utils/providerLaunchArgs.ts +217 -0
- package/src/shared/utils/slashCommands.ts +10 -0
- package/src/types/node-pty.d.ts +8 -0
- package/dist-renderer/assets/channel-Ch7JrfUu.js +0 -1
- package/dist-renderer/assets/classDiagram-2ON5EDUG-z9I4AnFy.js +0 -1
- package/dist-renderer/assets/classDiagram-v2-WZHVMYZB-z9I4AnFy.js +0 -1
- package/dist-renderer/assets/clone-Dfi1Jx6l.js +0 -1
- package/dist-renderer/assets/index-iyjkpSus.css +0 -32
- package/dist-renderer/assets/stateDiagram-v2-4FDKWEC3-DTUIBfce.js +0 -1
- package/src/main/services/system-manager/SystemManagerPtyService.ts +0 -233
- package/src/renderer/components/common/TerminalPane.tsx +0 -213
- package/src/renderer/components/team/dialogs/useTeamEditForm.ts +0 -292
|
@@ -17,9 +17,22 @@ import { useStore } from '@renderer/store';
|
|
|
17
17
|
import { isTeamProvisioningActive } from '@renderer/store/slices/teamSlice';
|
|
18
18
|
import { serializeChipsWithText } from '@renderer/types/inlineChip';
|
|
19
19
|
import { formatAgentRole } from '@renderer/utils/formatAgentRole';
|
|
20
|
+
import { parseTeamMentionDirective } from '@renderer/utils/teamMentionDirective';
|
|
21
|
+
import {
|
|
22
|
+
expandCapabilityCommand,
|
|
23
|
+
resolveCapabilityCommandInput,
|
|
24
|
+
type SelectedCapabilityCommandRef,
|
|
25
|
+
} from '@renderer/utils/capabilityCommandExecution';
|
|
20
26
|
import { buildMemberColorMap } from '@renderer/utils/memberHelpers';
|
|
21
27
|
import { nameColorSet } from '@renderer/utils/projectColor';
|
|
28
|
+
import { getLoopShortcutSuggestions } from '@renderer/utils/loopShortcutSuggestions';
|
|
22
29
|
import { getSuggestedSlashCommandsForProvider } from '@renderer/utils/providerSlashCommands';
|
|
30
|
+
import {
|
|
31
|
+
RESERVED_SLASH_COMMANDS,
|
|
32
|
+
buildCapabilityPackCommandSuggestions,
|
|
33
|
+
buildSlashCommandRegistry,
|
|
34
|
+
collectSlashSuggestionAliases,
|
|
35
|
+
} from '@renderer/utils/slashCommandRegistry';
|
|
23
36
|
import { buildSlashCommandSuggestions } from '@renderer/utils/skillCommandSuggestions';
|
|
24
37
|
import {
|
|
25
38
|
extractTaskRefsFromText,
|
|
@@ -41,6 +54,7 @@ import type {
|
|
|
41
54
|
AttachmentPayload,
|
|
42
55
|
ResolvedTeamMember,
|
|
43
56
|
SendMessageResult,
|
|
57
|
+
SlashCommandMeta,
|
|
44
58
|
TaskRef,
|
|
45
59
|
} from '@shared/types';
|
|
46
60
|
|
|
@@ -62,7 +76,8 @@ interface MessageComposerProps {
|
|
|
62
76
|
summary?: string,
|
|
63
77
|
attachments?: AttachmentPayload[],
|
|
64
78
|
actionMode?: AgentActionMode,
|
|
65
|
-
taskRefs?: TaskRef[]
|
|
79
|
+
taskRefs?: TaskRef[],
|
|
80
|
+
slashCommand?: SlashCommandMeta
|
|
66
81
|
) => void;
|
|
67
82
|
onDispatchTask?: (
|
|
68
83
|
toTeam: string,
|
|
@@ -108,6 +123,7 @@ export const MessageComposer = ({
|
|
|
108
123
|
const dragCounterRef = useRef(0);
|
|
109
124
|
const fileInputRef = useRef<HTMLInputElement>(null);
|
|
110
125
|
const [fileRestrictionError, setFileRestrictionError] = useState<string | null>(null);
|
|
126
|
+
const [selectedCommand, setSelectedCommand] = useState<SelectedCapabilityCommandRef | null>(null);
|
|
111
127
|
const fileRestrictionTimerRef = useRef(0);
|
|
112
128
|
const dismissMentionsRef = useRef<(() => void) | null>(null);
|
|
113
129
|
|
|
@@ -128,7 +144,9 @@ export const MessageComposer = ({
|
|
|
128
144
|
);
|
|
129
145
|
const skillsUserCatalog = useStore((s) => s.skillsUserCatalog);
|
|
130
146
|
const skillsProjectCatalogByProjectPath = useStore((s) => s.skillsProjectCatalogByProjectPath);
|
|
147
|
+
const capabilityPacks = useStore((s) => s.capabilityPacks);
|
|
131
148
|
const fetchSkillsCatalog = useStore((s) => s.fetchSkillsCatalog);
|
|
149
|
+
const fetchCapabilityPacks = useStore((s) => s.fetchCapabilityPacks);
|
|
132
150
|
const currentTeamColor = useStore((s) => {
|
|
133
151
|
if (s.selectedTeamName !== teamName) {
|
|
134
152
|
return nameColorSet(teamName).border;
|
|
@@ -161,24 +179,50 @@ export const MessageComposer = ({
|
|
|
161
179
|
|
|
162
180
|
useEffect(() => {
|
|
163
181
|
void fetchSkillsCatalog(projectPath ?? undefined);
|
|
164
|
-
|
|
182
|
+
void fetchCapabilityPacks();
|
|
183
|
+
}, [fetchCapabilityPacks, fetchSkillsCatalog, projectPath]);
|
|
165
184
|
|
|
166
185
|
const { suggestions: teamMentionSuggestions } = useTeamSuggestions(teamName);
|
|
167
186
|
const { suggestions: taskSuggestions } = useTaskSuggestions(teamName);
|
|
168
187
|
const projectSkills = projectPath ? (skillsProjectCatalogByProjectPath[projectPath] ?? []) : [];
|
|
169
|
-
const slashCommandSuggestions = useMemo<MentionSuggestion[]>(
|
|
170
|
-
|
|
171
|
-
|
|
188
|
+
const slashCommandSuggestions = useMemo<MentionSuggestion[]>(() => {
|
|
189
|
+
const localSuggestions = [
|
|
190
|
+
...getLoopShortcutSuggestions(),
|
|
191
|
+
...buildSlashCommandSuggestions(
|
|
172
192
|
getSuggestedSlashCommandsForProvider(leadProviderId),
|
|
173
193
|
projectSkills,
|
|
174
194
|
skillsUserCatalog,
|
|
175
195
|
leadProviderId
|
|
176
196
|
),
|
|
177
|
-
|
|
197
|
+
];
|
|
198
|
+
const packSuggestions = buildCapabilityPackCommandSuggestions(capabilityPacks, 'team-loop', {
|
|
199
|
+
forceNamespacedAliases: collectSlashSuggestionAliases(localSuggestions),
|
|
200
|
+
});
|
|
201
|
+
return [...localSuggestions, ...packSuggestions];
|
|
202
|
+
}, [capabilityPacks, leadProviderId, projectSkills, skillsUserCatalog]);
|
|
203
|
+
const capabilityRegistry = useMemo(
|
|
204
|
+
() => buildSlashCommandRegistry({ packs: capabilityPacks, scope: 'team-loop' }),
|
|
205
|
+
[capabilityPacks]
|
|
178
206
|
);
|
|
207
|
+
const shadowedAliases = useMemo(() => {
|
|
208
|
+
const aliases = new Set(RESERVED_SLASH_COMMANDS);
|
|
209
|
+
for (const alias of collectSlashSuggestionAliases(
|
|
210
|
+
slashCommandSuggestions.filter((suggestion) => !suggestion.commandRef)
|
|
211
|
+
)) {
|
|
212
|
+
aliases.add(alias);
|
|
213
|
+
}
|
|
214
|
+
return aliases;
|
|
215
|
+
}, [slashCommandSuggestions]);
|
|
179
216
|
|
|
180
217
|
const trimmed = stripEncodedTaskReferenceMetadata(draft.text).trim();
|
|
181
218
|
const standaloneSlashCommand = useMemo(() => parseStandaloneSlashCommand(trimmed), [trimmed]);
|
|
219
|
+
const capabilityCommandResult = useMemo(
|
|
220
|
+
() =>
|
|
221
|
+
resolveCapabilityCommandInput(capabilityRegistry, trimmed, selectedCommand, {
|
|
222
|
+
shadowedAliases,
|
|
223
|
+
}),
|
|
224
|
+
[capabilityRegistry, selectedCommand, shadowedAliases, trimmed]
|
|
225
|
+
);
|
|
182
226
|
|
|
183
227
|
const selectedMember = members.find((m) => m.name === recipient);
|
|
184
228
|
const selectedResolvedColor = selectedMember ? colorMap.get(selectedMember.name) : undefined;
|
|
@@ -192,25 +236,27 @@ export const MessageComposer = ({
|
|
|
192
236
|
const canAttach = supportsAttachments && draft.canAddMore;
|
|
193
237
|
const attachmentRestrictionReason = !supportsAttachments
|
|
194
238
|
? !isLeadRecipient
|
|
195
|
-
? '
|
|
196
|
-
: '
|
|
239
|
+
? '文件只能发送给 Lead'
|
|
240
|
+
: 'Agent 在线时才能添加文件'
|
|
197
241
|
: undefined;
|
|
198
242
|
const attachmentsBlocked = draft.attachments.length > 0 && !supportsAttachments;
|
|
199
243
|
const slashCommandRestrictionReason = standaloneSlashCommand
|
|
200
|
-
?
|
|
201
|
-
?
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
244
|
+
? capabilityCommandResult.status === 'conflict'
|
|
245
|
+
? (capabilityCommandResult.conflictLabel ??
|
|
246
|
+
'能力包命令存在冲突,请从菜单选择带 namespace 的命令。')
|
|
247
|
+
: draft.attachments.length > 0
|
|
248
|
+
? '斜杠命令需要 Lead 在线,且不能与附件同时发送'
|
|
249
|
+
: !isLeadRecipient
|
|
250
|
+
? '斜杠命令只能发送给 Lead'
|
|
251
|
+
: !isTeamAlive
|
|
252
|
+
? '斜杠命令需要 Lead 在线'
|
|
253
|
+
: null
|
|
207
254
|
: null;
|
|
208
255
|
const teamDispatch = useMemo(() => {
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
const subject =
|
|
213
|
-
if (!mentioned || !subject) return null;
|
|
256
|
+
if (!onDispatchTask) return null;
|
|
257
|
+
const parsed = parseTeamMentionDirective(trimmed);
|
|
258
|
+
if (!parsed) return null;
|
|
259
|
+
const { mentioned, subject } = parsed;
|
|
214
260
|
const targetTeam = teamMentionSuggestions.find((team) => {
|
|
215
261
|
const slug = team.id.startsWith('team:') ? team.id.slice('team:'.length) : team.id;
|
|
216
262
|
return slug === mentioned || team.name === mentioned;
|
|
@@ -252,16 +298,53 @@ export const MessageComposer = ({
|
|
|
252
298
|
return;
|
|
253
299
|
}
|
|
254
300
|
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
301
|
+
const send = async () => {
|
|
302
|
+
if (capabilityCommandResult.status === 'resolved' && capabilityCommandResult.resolved) {
|
|
303
|
+
const expanded = await expandCapabilityCommand(
|
|
304
|
+
capabilityCommandResult.resolved,
|
|
305
|
+
'team-loop'
|
|
306
|
+
);
|
|
307
|
+
pendingSendRef.current = true;
|
|
308
|
+
onSend(
|
|
309
|
+
recipient,
|
|
310
|
+
expanded.text,
|
|
311
|
+
expanded.summary,
|
|
312
|
+
undefined,
|
|
313
|
+
undefined,
|
|
314
|
+
taskRefs,
|
|
315
|
+
expanded.slashCommand
|
|
316
|
+
);
|
|
317
|
+
return;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
pendingSendRef.current = true;
|
|
321
|
+
onSend(
|
|
322
|
+
recipient,
|
|
323
|
+
serialized,
|
|
324
|
+
trimmed,
|
|
325
|
+
draft.attachments.length > 0 ? draft.attachments : undefined,
|
|
326
|
+
undefined,
|
|
327
|
+
taskRefs
|
|
328
|
+
);
|
|
329
|
+
};
|
|
330
|
+
|
|
331
|
+
void send().catch((error: unknown) => {
|
|
332
|
+
pendingSendRef.current = false;
|
|
333
|
+
// Reuse the persisted draft; surface the error via console because this path is a local expansion failure
|
|
334
|
+
// before the normal send error store is involved.
|
|
335
|
+
console.error(error);
|
|
336
|
+
});
|
|
337
|
+
}, [
|
|
338
|
+
canSend,
|
|
339
|
+
capabilityCommandResult,
|
|
340
|
+
recipient,
|
|
341
|
+
trimmed,
|
|
342
|
+
onSend,
|
|
343
|
+
draft,
|
|
344
|
+
taskSuggestions,
|
|
345
|
+
teamDispatch,
|
|
346
|
+
onDispatchTask,
|
|
347
|
+
]);
|
|
265
348
|
|
|
266
349
|
// Clear draft only after send completes successfully (sending: true → false, no error)
|
|
267
350
|
useEffect(() => {
|
|
@@ -286,9 +369,7 @@ export const MessageComposer = ({
|
|
|
286
369
|
);
|
|
287
370
|
|
|
288
371
|
const showFileRestrictionError = useCallback(() => {
|
|
289
|
-
setFileRestrictionError(
|
|
290
|
-
attachmentRestrictionReason ?? 'Files can only be sent to the team lead'
|
|
291
|
-
);
|
|
372
|
+
setFileRestrictionError(attachmentRestrictionReason ?? '文件只能发送给 Lead');
|
|
292
373
|
window.clearTimeout(fileRestrictionTimerRef.current);
|
|
293
374
|
fileRestrictionTimerRef.current = window.setTimeout(() => {
|
|
294
375
|
setFileRestrictionError(null);
|
|
@@ -371,6 +452,11 @@ export const MessageComposer = ({
|
|
|
371
452
|
</span>
|
|
372
453
|
) : sendWarning ? (
|
|
373
454
|
<OpenCodeDeliveryWarning warning={sendWarning} debugDetails={sendDebugDetails} />
|
|
455
|
+
) : teamDispatch ? (
|
|
456
|
+
<span className="inline-flex items-center gap-1 rounded bg-indigo-500/10 px-1.5 py-0.5 text-[10px] text-indigo-300">
|
|
457
|
+
<Send size={10} className="shrink-0" />
|
|
458
|
+
将创建跨团队任务:{teamDispatch.slug}
|
|
459
|
+
</span>
|
|
374
460
|
) : lastResult?.deduplicated ? (
|
|
375
461
|
<span className="inline-flex items-center gap-1 rounded bg-amber-500/10 px-1.5 py-0.5 text-[10px] text-amber-300">
|
|
376
462
|
<Check size={10} className="shrink-0" />
|
|
@@ -423,7 +509,7 @@ export const MessageComposer = ({
|
|
|
423
509
|
</TooltipTrigger>
|
|
424
510
|
<TooltipContent side="top">
|
|
425
511
|
{!isTeamAlive
|
|
426
|
-
? '
|
|
512
|
+
? 'Agent 在线时才能添加文件'
|
|
427
513
|
: !draft.canAddMore
|
|
428
514
|
? '已达到附件上限'
|
|
429
515
|
: '添加文件(支持粘贴或拖拽)'}
|
|
@@ -435,7 +521,7 @@ export const MessageComposer = ({
|
|
|
435
521
|
<div className="ml-auto flex shrink-0 items-center gap-2">
|
|
436
522
|
{!isTeamAlive && !isProvisioning && (
|
|
437
523
|
<span className="text-[10px]" style={{ color: 'var(--warning-text)' }}>
|
|
438
|
-
|
|
524
|
+
Agent 离线
|
|
439
525
|
</span>
|
|
440
526
|
)}
|
|
441
527
|
|
|
@@ -570,7 +656,7 @@ export const MessageComposer = ({
|
|
|
570
656
|
error={draft.attachmentError ?? fileRestrictionError}
|
|
571
657
|
onDismissError={draft.clearAttachmentError}
|
|
572
658
|
disabled={attachmentsBlocked}
|
|
573
|
-
disabledHint="
|
|
659
|
+
disabledHint="仅在 Agent 在线且接收人为 Lead 时支持附件。请移除附件或切换接收人。"
|
|
574
660
|
/>
|
|
575
661
|
) : null}
|
|
576
662
|
</div>
|
|
@@ -586,8 +672,8 @@ export const MessageComposer = ({
|
|
|
586
672
|
id={`compose-${teamName}`}
|
|
587
673
|
placeholder={
|
|
588
674
|
isProvisioning
|
|
589
|
-
? '
|
|
590
|
-
: '
|
|
675
|
+
? 'Agent 正在启动中... 指令将排队并在稍后执行。'
|
|
676
|
+
: '输入指令...(回车发送,Shift+Enter 换行)'
|
|
591
677
|
}
|
|
592
678
|
value={draft.text}
|
|
593
679
|
onValueChange={draft.setText}
|
|
@@ -600,14 +686,34 @@ export const MessageComposer = ({
|
|
|
600
686
|
projectPath={projectPath}
|
|
601
687
|
onFileChipInsert={draft.addChip}
|
|
602
688
|
onModEnter={handleSend}
|
|
689
|
+
onSuggestionSelected={(suggestion, insertedText) => {
|
|
690
|
+
if (
|
|
691
|
+
suggestion.type === 'command' &&
|
|
692
|
+
suggestion.commandRef &&
|
|
693
|
+
insertedText.startsWith('/')
|
|
694
|
+
) {
|
|
695
|
+
setSelectedCommand({
|
|
696
|
+
commandRef: suggestion.commandRef,
|
|
697
|
+
command: insertedText as `/${string}`,
|
|
698
|
+
});
|
|
699
|
+
} else {
|
|
700
|
+
setSelectedCommand(null);
|
|
701
|
+
}
|
|
702
|
+
}}
|
|
603
703
|
dismissMentionsRef={dismissMentionsRef}
|
|
604
704
|
extraTips={useMemo(() => {
|
|
605
|
-
const commands =
|
|
606
|
-
|
|
705
|
+
const commands = Array.from(
|
|
706
|
+
new Set(
|
|
707
|
+
slashCommandSuggestions
|
|
708
|
+
.filter((s) => s.type === 'command' && s.command)
|
|
709
|
+
.map((s) => s.command)
|
|
710
|
+
)
|
|
711
|
+
)
|
|
607
712
|
.slice(0, 6)
|
|
608
|
-
.map((s) => s.command)
|
|
609
713
|
.join('、');
|
|
610
|
-
return [
|
|
714
|
+
return [
|
|
715
|
+
`Tips:你可以输入 "/" 来运行命令,如 ${commands} 等;输入 "/loop" 可选择常用模板。`,
|
|
716
|
+
];
|
|
611
717
|
}, [slashCommandSuggestions])}
|
|
612
718
|
surfaceClassName="message-composer-shell message-composer-orbit-surface bg-[var(--color-surface-raised)]"
|
|
613
719
|
surfaceDecoration="orbit-border"
|
|
@@ -645,14 +751,14 @@ export const MessageComposer = ({
|
|
|
645
751
|
onClick={handleSend}
|
|
646
752
|
>
|
|
647
753
|
<Send size={12} />
|
|
648
|
-
|
|
754
|
+
下发
|
|
649
755
|
</button>
|
|
650
756
|
</span>
|
|
651
757
|
</TooltipTrigger>
|
|
652
758
|
{slashCommandRestrictionReason ? (
|
|
653
759
|
<TooltipContent side="top">{slashCommandRestrictionReason}</TooltipContent>
|
|
654
760
|
) : isProvisioning && !sending ? (
|
|
655
|
-
<TooltipContent side="top"
|
|
761
|
+
<TooltipContent side="top">Agent 启动期间暂不可下发</TooltipContent>
|
|
656
762
|
) : null}
|
|
657
763
|
</Tooltip>
|
|
658
764
|
</div>
|
|
@@ -118,7 +118,7 @@ export const MessagesFilterPopover = ({
|
|
|
118
118
|
variant="ghost"
|
|
119
119
|
size="sm"
|
|
120
120
|
className="relative h-7 px-2 text-[var(--color-text-muted)] hover:text-[var(--color-text)]"
|
|
121
|
-
aria-label="
|
|
121
|
+
aria-label="筛选动态"
|
|
122
122
|
>
|
|
123
123
|
<Filter size={14} />
|
|
124
124
|
{activeCount > 0 && (
|
|
@@ -129,7 +129,7 @@ export const MessagesFilterPopover = ({
|
|
|
129
129
|
</Button>
|
|
130
130
|
</PopoverTrigger>
|
|
131
131
|
</TooltipTrigger>
|
|
132
|
-
<TooltipContent side="bottom"
|
|
132
|
+
<TooltipContent side="bottom">筛选动态</TooltipContent>
|
|
133
133
|
</Tooltip>
|
|
134
134
|
<PopoverContent align="end" className="flex max-h-[70vh] w-72 flex-col p-0">
|
|
135
135
|
{/* Scrollable filter sections */}
|
|
@@ -59,6 +59,7 @@ import type {
|
|
|
59
59
|
CcSession,
|
|
60
60
|
InboxMessage,
|
|
61
61
|
ResolvedTeamMember,
|
|
62
|
+
SlashCommandMeta,
|
|
62
63
|
TaskRef,
|
|
63
64
|
TeamTaskWithKanban,
|
|
64
65
|
} from '@shared/types';
|
|
@@ -120,6 +121,8 @@ interface MessagesPanelProps {
|
|
|
120
121
|
inlineScrollContainerRef?: RefObject<HTMLDivElement | null>;
|
|
121
122
|
/** Hide layout-switch controls when the parent owns placement. */
|
|
122
123
|
showPositionControls?: boolean;
|
|
124
|
+
/** Override the inline section title when embedded in a parent surface. */
|
|
125
|
+
sectionTitle?: string;
|
|
123
126
|
}
|
|
124
127
|
|
|
125
128
|
export function reconcilePendingRepliesByMember(
|
|
@@ -199,6 +202,7 @@ export const MessagesPanel = memo(function MessagesPanel({
|
|
|
199
202
|
onTaskIdClick,
|
|
200
203
|
inlineScrollContainerRef,
|
|
201
204
|
showPositionControls = true,
|
|
205
|
+
sectionTitle,
|
|
202
206
|
}: MessagesPanelProps): React.JSX.Element {
|
|
203
207
|
const {
|
|
204
208
|
sendTeamMessage,
|
|
@@ -702,7 +706,8 @@ export const MessagesPanel = memo(function MessagesPanel({
|
|
|
702
706
|
? A
|
|
703
707
|
: never,
|
|
704
708
|
actionMode?: AgentActionMode,
|
|
705
|
-
taskRefs?: TaskRef[]
|
|
709
|
+
taskRefs?: TaskRef[],
|
|
710
|
+
slashCommand?: SlashCommandMeta
|
|
706
711
|
) => {
|
|
707
712
|
const sentAtMs = Date.now();
|
|
708
713
|
onPendingReplyChange((prev) => ({ ...prev, [member]: sentAtMs }));
|
|
@@ -713,6 +718,7 @@ export const MessagesPanel = memo(function MessagesPanel({
|
|
|
713
718
|
attachments,
|
|
714
719
|
actionMode,
|
|
715
720
|
taskRefs,
|
|
721
|
+
slashCommand,
|
|
716
722
|
sessionKey:
|
|
717
723
|
selectedSessionKey && selectedSessionKey !== '__unassigned__'
|
|
718
724
|
? selectedSessionKey
|
|
@@ -941,7 +947,7 @@ export const MessagesPanel = memo(function MessagesPanel({
|
|
|
941
947
|
</Button>
|
|
942
948
|
</TooltipTrigger>
|
|
943
949
|
<TooltipContent side="bottom">
|
|
944
|
-
{messagesCollapsed ? '
|
|
950
|
+
{messagesCollapsed ? '展开全部动态' : '折叠全部动态'}
|
|
945
951
|
</TooltipContent>
|
|
946
952
|
</Tooltip>
|
|
947
953
|
</div>
|
|
@@ -962,7 +968,7 @@ export const MessagesPanel = memo(function MessagesPanel({
|
|
|
962
968
|
onSend={handleSend}
|
|
963
969
|
onDispatchTask={handleDispatchTaskToTeam}
|
|
964
970
|
/>
|
|
965
|
-
{participantFilterBar}
|
|
971
|
+
{showPositionControls ? participantFilterBar : null}
|
|
966
972
|
<StatusBlock
|
|
967
973
|
members={members}
|
|
968
974
|
tasks={tasks}
|
|
@@ -1009,7 +1015,7 @@ export const MessagesPanel = memo(function MessagesPanel({
|
|
|
1009
1015
|
disabled={loadingOlderMessages}
|
|
1010
1016
|
onClick={() => void loadOlderMessages()}
|
|
1011
1017
|
>
|
|
1012
|
-
|
|
1018
|
+
加载更早动态
|
|
1013
1019
|
</Button>
|
|
1014
1020
|
<span className="text-[10px] text-[var(--color-text-muted)]">
|
|
1015
1021
|
已加载 {loadedMessageCount} 条
|
|
@@ -1042,7 +1048,7 @@ export const MessagesPanel = memo(function MessagesPanel({
|
|
|
1042
1048
|
{/* Header */}
|
|
1043
1049
|
<div className="flex shrink-0 items-center gap-2 border-b border-[var(--color-border)] bg-[var(--color-surface-sidebar)] px-3 py-2">
|
|
1044
1050
|
<MessageSquare size={14} className="shrink-0 text-[var(--color-text-muted)]" />
|
|
1045
|
-
<span className="text-sm font-medium text-[var(--color-text)]"
|
|
1051
|
+
<span className="text-sm font-medium text-[var(--color-text)]">动态</span>
|
|
1046
1052
|
{filteredMessages.length > 0 && (
|
|
1047
1053
|
<Badge
|
|
1048
1054
|
variant="secondary"
|
|
@@ -1058,7 +1064,7 @@ export const MessagesPanel = memo(function MessagesPanel({
|
|
|
1058
1064
|
variant="secondary"
|
|
1059
1065
|
className="bg-indigo-500/20 px-1.5 py-0.5 text-[10px] font-normal leading-none text-indigo-600 dark:text-indigo-400"
|
|
1060
1066
|
>
|
|
1061
|
-
{messagesUnreadCount}
|
|
1067
|
+
{messagesUnreadCount} 条新动态
|
|
1062
1068
|
</Badge>
|
|
1063
1069
|
</TooltipTrigger>
|
|
1064
1070
|
<TooltipContent side="bottom">{messagesUnreadCount} 条未读</TooltipContent>
|
|
@@ -1086,13 +1092,13 @@ export const MessagesPanel = memo(function MessagesPanel({
|
|
|
1086
1092
|
size="sm"
|
|
1087
1093
|
className="size-7 p-0 text-[var(--color-text-muted)] hover:text-[var(--color-text-secondary)]"
|
|
1088
1094
|
onClick={() => setMessagesCollapsed((v) => !v)}
|
|
1089
|
-
aria-label={messagesCollapsed ? '
|
|
1095
|
+
aria-label={messagesCollapsed ? '展开全部动态' : '折叠全部动态'}
|
|
1090
1096
|
>
|
|
1091
1097
|
{messagesCollapsed ? <ChevronsUpDown size={14} /> : <ChevronsDownUp size={14} />}
|
|
1092
1098
|
</Button>
|
|
1093
1099
|
</TooltipTrigger>
|
|
1094
1100
|
<TooltipContent side="bottom">
|
|
1095
|
-
{messagesCollapsed ? '
|
|
1101
|
+
{messagesCollapsed ? '展开全部动态' : '折叠全部动态'}
|
|
1096
1102
|
</TooltipContent>
|
|
1097
1103
|
</Tooltip>
|
|
1098
1104
|
<Tooltip>
|
|
@@ -1102,13 +1108,13 @@ export const MessagesPanel = memo(function MessagesPanel({
|
|
|
1102
1108
|
size="sm"
|
|
1103
1109
|
className="size-7 p-0 text-[var(--color-text-muted)] hover:text-[var(--color-text-secondary)]"
|
|
1104
1110
|
onClick={() => setMessagesSearchBarVisible((v) => !v)}
|
|
1105
|
-
aria-label={messagesSearchBarVisible ? '
|
|
1111
|
+
aria-label={messagesSearchBarVisible ? '隐藏动态搜索' : '显示动态搜索'}
|
|
1106
1112
|
>
|
|
1107
1113
|
{messagesSearchBarVisible ? <X size={14} /> : <Search size={14} />}
|
|
1108
1114
|
</Button>
|
|
1109
1115
|
</TooltipTrigger>
|
|
1110
1116
|
<TooltipContent side="bottom">
|
|
1111
|
-
{messagesSearchBarVisible ? '隐藏搜索' : '
|
|
1117
|
+
{messagesSearchBarVisible ? '隐藏搜索' : '搜索动态'}
|
|
1112
1118
|
</TooltipContent>
|
|
1113
1119
|
</Tooltip>
|
|
1114
1120
|
<Tooltip>
|
|
@@ -1118,7 +1124,7 @@ export const MessagesPanel = memo(function MessagesPanel({
|
|
|
1118
1124
|
size="sm"
|
|
1119
1125
|
className="size-7 p-0 text-[var(--color-text-muted)] hover:text-[var(--color-text-secondary)]"
|
|
1120
1126
|
onClick={moveToInline}
|
|
1121
|
-
aria-label="
|
|
1127
|
+
aria-label="将动态移到页面内面板"
|
|
1122
1128
|
>
|
|
1123
1129
|
<PanelLeftClose size={14} />
|
|
1124
1130
|
</Button>
|
|
@@ -1157,7 +1163,7 @@ export const MessagesPanel = memo(function MessagesPanel({
|
|
|
1157
1163
|
onSend={handleSend}
|
|
1158
1164
|
onDispatchTask={handleDispatchTaskToTeam}
|
|
1159
1165
|
/>
|
|
1160
|
-
{participantFilterBar}
|
|
1166
|
+
{showPositionControls ? participantFilterBar : null}
|
|
1161
1167
|
<StatusBlock
|
|
1162
1168
|
members={members}
|
|
1163
1169
|
tasks={tasks}
|
|
@@ -1205,7 +1211,7 @@ export const MessagesPanel = memo(function MessagesPanel({
|
|
|
1205
1211
|
disabled={loadingOlderMessages}
|
|
1206
1212
|
onClick={() => void loadOlderMessages()}
|
|
1207
1213
|
>
|
|
1208
|
-
|
|
1214
|
+
加载更早动态
|
|
1209
1215
|
</Button>
|
|
1210
1216
|
<span className="text-[10px] text-[var(--color-text-muted)]">
|
|
1211
1217
|
已加载 {loadedMessageCount} 条
|
|
@@ -1277,7 +1283,7 @@ export const MessagesPanel = memo(function MessagesPanel({
|
|
|
1277
1283
|
</div>
|
|
1278
1284
|
<div className="flex h-full items-center gap-1.5">
|
|
1279
1285
|
<MessageSquare size={13} className="shrink-0 text-[var(--color-text-muted)]" />
|
|
1280
|
-
<span className="text-[13px] font-medium text-[var(--color-text)]"
|
|
1286
|
+
<span className="text-[13px] font-medium text-[var(--color-text)]">动态</span>
|
|
1281
1287
|
{filteredMessages.length > 0 && (
|
|
1282
1288
|
<Badge
|
|
1283
1289
|
variant="secondary"
|
|
@@ -1293,7 +1299,7 @@ export const MessagesPanel = memo(function MessagesPanel({
|
|
|
1293
1299
|
variant="secondary"
|
|
1294
1300
|
className="bg-indigo-500/20 px-1 py-0 text-[9px] font-normal leading-none text-indigo-600 dark:text-indigo-400"
|
|
1295
1301
|
>
|
|
1296
|
-
{messagesUnreadCount}
|
|
1302
|
+
{messagesUnreadCount} 条新动态
|
|
1297
1303
|
</Badge>
|
|
1298
1304
|
</TooltipTrigger>
|
|
1299
1305
|
<TooltipContent side="top">{messagesUnreadCount} 条未读</TooltipContent>
|
|
@@ -1311,7 +1317,7 @@ export const MessagesPanel = memo(function MessagesPanel({
|
|
|
1311
1317
|
size="sm"
|
|
1312
1318
|
className="size-[22px] p-0 text-indigo-400 hover:bg-indigo-500/10 hover:text-indigo-300"
|
|
1313
1319
|
onClick={handleMarkAllRead}
|
|
1314
|
-
aria-label="
|
|
1320
|
+
aria-label="将全部动态标为已读"
|
|
1315
1321
|
>
|
|
1316
1322
|
<CheckCheck size={13} />
|
|
1317
1323
|
</Button>
|
|
@@ -1326,7 +1332,7 @@ export const MessagesPanel = memo(function MessagesPanel({
|
|
|
1326
1332
|
size="sm"
|
|
1327
1333
|
className="size-[22px] p-0 text-[var(--color-text-muted)] hover:text-[var(--color-text-secondary)]"
|
|
1328
1334
|
onClick={() => setMessagesCollapsed((value) => !value)}
|
|
1329
|
-
aria-label={messagesCollapsed ? '
|
|
1335
|
+
aria-label={messagesCollapsed ? '展开全部动态' : '折叠全部动态'}
|
|
1330
1336
|
>
|
|
1331
1337
|
{messagesCollapsed ? (
|
|
1332
1338
|
<ChevronsUpDown size={14} />
|
|
@@ -1336,7 +1342,7 @@ export const MessagesPanel = memo(function MessagesPanel({
|
|
|
1336
1342
|
</Button>
|
|
1337
1343
|
</TooltipTrigger>
|
|
1338
1344
|
<TooltipContent side="top">
|
|
1339
|
-
{messagesCollapsed ? '
|
|
1345
|
+
{messagesCollapsed ? '展开全部动态' : '折叠全部动态'}
|
|
1340
1346
|
</TooltipContent>
|
|
1341
1347
|
</Tooltip>
|
|
1342
1348
|
<Tooltip>
|
|
@@ -1346,13 +1352,13 @@ export const MessagesPanel = memo(function MessagesPanel({
|
|
|
1346
1352
|
size="sm"
|
|
1347
1353
|
className="size-[22px] p-0 text-[var(--color-text-muted)] hover:text-[var(--color-text-secondary)]"
|
|
1348
1354
|
onClick={() => setMessagesSearchBarVisible((value) => !value)}
|
|
1349
|
-
aria-label={messagesSearchBarVisible ? '
|
|
1355
|
+
aria-label={messagesSearchBarVisible ? '隐藏动态搜索' : '显示动态搜索'}
|
|
1350
1356
|
>
|
|
1351
1357
|
{messagesSearchBarVisible ? <X size={14} /> : <Search size={14} />}
|
|
1352
1358
|
</Button>
|
|
1353
1359
|
</TooltipTrigger>
|
|
1354
1360
|
<TooltipContent side="top">
|
|
1355
|
-
{messagesSearchBarVisible ? '隐藏搜索' : '
|
|
1361
|
+
{messagesSearchBarVisible ? '隐藏搜索' : '搜索动态'}
|
|
1356
1362
|
</TooltipContent>
|
|
1357
1363
|
</Tooltip>
|
|
1358
1364
|
<Tooltip>
|
|
@@ -1363,7 +1369,7 @@ export const MessagesPanel = memo(function MessagesPanel({
|
|
|
1363
1369
|
className="size-[22px] p-0 text-[var(--color-text-muted)] hover:text-[var(--color-text-secondary)]"
|
|
1364
1370
|
onClick={toggleBottomSheetExpansion}
|
|
1365
1371
|
aria-label={
|
|
1366
|
-
isBottomSheetCollapsed ? '
|
|
1372
|
+
isBottomSheetCollapsed ? '展开底部动态面板' : '折叠底部动态面板'
|
|
1367
1373
|
}
|
|
1368
1374
|
>
|
|
1369
1375
|
{isBottomSheetCollapsed ? (
|
|
@@ -1384,7 +1390,7 @@ export const MessagesPanel = memo(function MessagesPanel({
|
|
|
1384
1390
|
size="sm"
|
|
1385
1391
|
className="size-[22px] p-0 text-[var(--color-text-muted)] hover:text-[var(--color-text-secondary)]"
|
|
1386
1392
|
onClick={moveToInline}
|
|
1387
|
-
aria-label="
|
|
1393
|
+
aria-label="将动态移到页面内面板"
|
|
1388
1394
|
>
|
|
1389
1395
|
<PanelBottom size={14} />
|
|
1390
1396
|
</Button>
|
|
@@ -1398,7 +1404,7 @@ export const MessagesPanel = memo(function MessagesPanel({
|
|
|
1398
1404
|
size="sm"
|
|
1399
1405
|
className="size-[22px] p-0 text-[var(--color-text-muted)] hover:text-[var(--color-text-secondary)]"
|
|
1400
1406
|
onClick={moveToSidebar}
|
|
1401
|
-
aria-label="
|
|
1407
|
+
aria-label="将动态移到侧边栏"
|
|
1402
1408
|
>
|
|
1403
1409
|
<PanelLeft size={14} />
|
|
1404
1410
|
</Button>
|
|
@@ -1443,7 +1449,7 @@ export const MessagesPanel = memo(function MessagesPanel({
|
|
|
1443
1449
|
onSend={handleSend}
|
|
1444
1450
|
onDispatchTask={handleDispatchTaskToTeam}
|
|
1445
1451
|
/>
|
|
1446
|
-
{participantFilterBar}
|
|
1452
|
+
{showPositionControls ? participantFilterBar : null}
|
|
1447
1453
|
</div>
|
|
1448
1454
|
</div>
|
|
1449
1455
|
<div className="shrink-0 px-3 pt-2">
|
|
@@ -1495,7 +1501,7 @@ export const MessagesPanel = memo(function MessagesPanel({
|
|
|
1495
1501
|
disabled={loadingOlderMessages}
|
|
1496
1502
|
onClick={() => void loadOlderMessages()}
|
|
1497
1503
|
>
|
|
1498
|
-
|
|
1504
|
+
加载更早动态
|
|
1499
1505
|
</Button>
|
|
1500
1506
|
<span className="text-[10px] text-[var(--color-text-muted)]">
|
|
1501
1507
|
已加载 {loadedMessageCount} 条
|
|
@@ -1530,7 +1536,7 @@ export const MessagesPanel = memo(function MessagesPanel({
|
|
|
1530
1536
|
return (
|
|
1531
1537
|
<CollapsibleTeamSection
|
|
1532
1538
|
sectionId="messages"
|
|
1533
|
-
title=
|
|
1539
|
+
title={sectionTitle ?? '动态'}
|
|
1534
1540
|
icon={<MessageSquare size={14} />}
|
|
1535
1541
|
badge={filteredMessages.length}
|
|
1536
1542
|
secondaryBadge={
|
|
@@ -1568,7 +1574,7 @@ export const MessagesPanel = memo(function MessagesPanel({
|
|
|
1568
1574
|
e.stopPropagation();
|
|
1569
1575
|
moveToBottomSheet();
|
|
1570
1576
|
}}
|
|
1571
|
-
aria-label="
|
|
1577
|
+
aria-label="将动态移到底部面板"
|
|
1572
1578
|
>
|
|
1573
1579
|
<PanelBottom size={14} />
|
|
1574
1580
|
</Button>
|
|
@@ -1585,7 +1591,7 @@ export const MessagesPanel = memo(function MessagesPanel({
|
|
|
1585
1591
|
e.stopPropagation();
|
|
1586
1592
|
moveToSidebar();
|
|
1587
1593
|
}}
|
|
1588
|
-
aria-label="
|
|
1594
|
+
aria-label="将动态移到侧边栏"
|
|
1589
1595
|
>
|
|
1590
1596
|
<PanelLeft size={14} />
|
|
1591
1597
|
</Button>
|