cc-viewer 1.7.22 → 1.8.0
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 +19 -0
- package/cli.js +92 -11
- package/concepts/ar/GlobalSettings.md +2 -2
- package/concepts/ar/Tool-Artifact.md +7 -0
- package/concepts/ar/Tool-EndConversation.md +35 -0
- package/concepts/ar/Tool-LSP.md +6 -1
- package/concepts/ar/Tool-ListAgents.md +35 -0
- package/concepts/ar/Tool-ListConnectors.md +34 -0
- package/concepts/ar/Tool-ListMcpResources.md +35 -0
- package/concepts/ar/Tool-ListPlugins.md +35 -0
- package/concepts/ar/Tool-ListSkills.md +37 -0
- package/concepts/ar/Tool-Monitor.md +7 -0
- package/concepts/ar/Tool-Projects.md +46 -0
- package/concepts/ar/Tool-ProposeGoal.md +43 -0
- package/concepts/ar/Tool-PushNotification.md +6 -0
- package/concepts/ar/Tool-REPL.md +47 -0
- package/concepts/ar/Tool-ReadMcpResource.md +32 -0
- package/concepts/ar/Tool-ReadMcpResourceDir.md +32 -0
- package/concepts/ar/Tool-ReadNotifications.md +27 -0
- package/concepts/ar/Tool-RemoteTrigger.md +7 -0
- package/concepts/ar/Tool-ScheduleWakeup.md +5 -0
- package/concepts/ar/Tool-SearchMcpRegistry.md +31 -0
- package/concepts/ar/Tool-SendFeedback.md +38 -0
- package/concepts/ar/Tool-SendFile.md +36 -0
- package/concepts/ar/Tool-SendMessage.md +5 -0
- package/concepts/ar/Tool-SendUserFile.md +38 -0
- package/concepts/ar/Tool-SendUserMessage.md +38 -0
- package/concepts/ar/Tool-SuggestConnectors.md +28 -0
- package/concepts/ar/Tool-SuggestPluginInstall.md +39 -0
- package/concepts/ar/Tool-SuggestSkills.md +33 -0
- package/concepts/ar/Tool-TaskCreate.md +6 -0
- package/concepts/ar/Tool-TaskGet.md +6 -0
- package/concepts/ar/Tool-TaskList.md +6 -0
- package/concepts/ar/Tool-TaskUpdate.md +6 -0
- package/concepts/ar/Tool-TodoWrite.md +43 -0
- package/concepts/ar/Tool-ToolSearch.md +5 -0
- package/concepts/ar/Tool-WebSearch.md +6 -0
- package/concepts/ar/Tools.md +26 -4
- package/concepts/da/GlobalSettings.md +2 -2
- package/concepts/da/Tool-Artifact.md +8 -1
- package/concepts/da/Tool-EndConversation.md +35 -0
- package/concepts/da/Tool-LSP.md +6 -1
- package/concepts/da/Tool-ListAgents.md +35 -0
- package/concepts/da/Tool-ListConnectors.md +34 -0
- package/concepts/da/Tool-ListMcpResources.md +35 -0
- package/concepts/da/Tool-ListPlugins.md +35 -0
- package/concepts/da/Tool-ListSkills.md +37 -0
- package/concepts/da/Tool-Monitor.md +7 -0
- package/concepts/da/Tool-Projects.md +46 -0
- package/concepts/da/Tool-ProposeGoal.md +43 -0
- package/concepts/da/Tool-PushNotification.md +6 -0
- package/concepts/da/Tool-REPL.md +47 -0
- package/concepts/da/Tool-ReadMcpResource.md +32 -0
- package/concepts/da/Tool-ReadMcpResourceDir.md +32 -0
- package/concepts/da/Tool-ReadNotifications.md +27 -0
- package/concepts/da/Tool-RemoteTrigger.md +7 -0
- package/concepts/da/Tool-ScheduleWakeup.md +5 -0
- package/concepts/da/Tool-SearchMcpRegistry.md +31 -0
- package/concepts/da/Tool-SendFeedback.md +38 -0
- package/concepts/da/Tool-SendFile.md +36 -0
- package/concepts/da/Tool-SendMessage.md +5 -0
- package/concepts/da/Tool-SendUserFile.md +38 -0
- package/concepts/da/Tool-SendUserMessage.md +38 -0
- package/concepts/da/Tool-SuggestConnectors.md +28 -0
- package/concepts/da/Tool-SuggestPluginInstall.md +39 -0
- package/concepts/da/Tool-SuggestSkills.md +33 -0
- package/concepts/da/Tool-TaskCreate.md +6 -0
- package/concepts/da/Tool-TaskGet.md +6 -0
- package/concepts/da/Tool-TaskList.md +6 -0
- package/concepts/da/Tool-TaskUpdate.md +6 -0
- package/concepts/da/Tool-TodoWrite.md +43 -0
- package/concepts/da/Tool-ToolSearch.md +5 -0
- package/concepts/da/Tool-WebSearch.md +6 -0
- package/concepts/da/Tools.md +26 -4
- package/concepts/de/GlobalSettings.md +2 -2
- package/concepts/de/Tool-Artifact.md +7 -0
- package/concepts/de/Tool-EndConversation.md +35 -0
- package/concepts/de/Tool-LSP.md +6 -1
- package/concepts/de/Tool-ListAgents.md +35 -0
- package/concepts/de/Tool-ListConnectors.md +34 -0
- package/concepts/de/Tool-ListMcpResources.md +35 -0
- package/concepts/de/Tool-ListPlugins.md +35 -0
- package/concepts/de/Tool-ListSkills.md +37 -0
- package/concepts/de/Tool-Monitor.md +7 -0
- package/concepts/de/Tool-Projects.md +46 -0
- package/concepts/de/Tool-ProposeGoal.md +43 -0
- package/concepts/de/Tool-PushNotification.md +6 -0
- package/concepts/de/Tool-REPL.md +47 -0
- package/concepts/de/Tool-ReadMcpResource.md +32 -0
- package/concepts/de/Tool-ReadMcpResourceDir.md +32 -0
- package/concepts/de/Tool-ReadNotifications.md +27 -0
- package/concepts/de/Tool-RemoteTrigger.md +7 -0
- package/concepts/de/Tool-ScheduleWakeup.md +5 -0
- package/concepts/de/Tool-SearchMcpRegistry.md +30 -0
- package/concepts/de/Tool-SendFeedback.md +38 -0
- package/concepts/de/Tool-SendFile.md +36 -0
- package/concepts/de/Tool-SendMessage.md +5 -0
- package/concepts/de/Tool-SendUserFile.md +38 -0
- package/concepts/de/Tool-SendUserMessage.md +38 -0
- package/concepts/de/Tool-SuggestConnectors.md +28 -0
- package/concepts/de/Tool-SuggestPluginInstall.md +39 -0
- package/concepts/de/Tool-SuggestSkills.md +33 -0
- package/concepts/de/Tool-TaskCreate.md +6 -0
- package/concepts/de/Tool-TaskGet.md +6 -0
- package/concepts/de/Tool-TaskList.md +6 -0
- package/concepts/de/Tool-TaskUpdate.md +6 -0
- package/concepts/de/Tool-TodoWrite.md +43 -0
- package/concepts/de/Tool-ToolSearch.md +5 -0
- package/concepts/de/Tool-WebSearch.md +6 -0
- package/concepts/de/Tools.md +26 -4
- package/concepts/en/GlobalSettings.md +2 -2
- package/concepts/en/Tool-Artifact.md +7 -0
- package/concepts/en/Tool-EndConversation.md +35 -0
- package/concepts/en/Tool-LSP.md +5 -0
- package/concepts/en/Tool-ListAgents.md +35 -0
- package/concepts/en/Tool-ListConnectors.md +34 -0
- package/concepts/en/Tool-ListMcpResources.md +35 -0
- package/concepts/en/Tool-ListPlugins.md +35 -0
- package/concepts/en/Tool-ListSkills.md +37 -0
- package/concepts/en/Tool-Monitor.md +7 -0
- package/concepts/en/Tool-Projects.md +46 -0
- package/concepts/en/Tool-ProposeGoal.md +43 -0
- package/concepts/en/Tool-PushNotification.md +6 -0
- package/concepts/en/Tool-REPL.md +47 -0
- package/concepts/en/Tool-ReadMcpResource.md +32 -0
- package/concepts/en/Tool-ReadMcpResourceDir.md +32 -0
- package/concepts/en/Tool-ReadNotifications.md +27 -0
- package/concepts/en/Tool-RemoteTrigger.md +7 -0
- package/concepts/en/Tool-ScheduleWakeup.md +5 -0
- package/concepts/en/Tool-SearchMcpRegistry.md +31 -0
- package/concepts/en/Tool-SendFeedback.md +38 -0
- package/concepts/en/Tool-SendFile.md +36 -0
- package/concepts/en/Tool-SendMessage.md +5 -0
- package/concepts/en/Tool-SendUserFile.md +38 -0
- package/concepts/en/Tool-SendUserMessage.md +38 -0
- package/concepts/en/Tool-SuggestConnectors.md +28 -0
- package/concepts/en/Tool-SuggestPluginInstall.md +39 -0
- package/concepts/en/Tool-SuggestSkills.md +33 -0
- package/concepts/en/Tool-TaskCreate.md +6 -0
- package/concepts/en/Tool-TaskGet.md +6 -0
- package/concepts/en/Tool-TaskList.md +6 -0
- package/concepts/en/Tool-TaskUpdate.md +6 -0
- package/concepts/en/Tool-TodoWrite.md +43 -0
- package/concepts/en/Tool-ToolSearch.md +5 -0
- package/concepts/en/Tool-WebSearch.md +6 -0
- package/concepts/en/Tools.md +26 -4
- package/concepts/es/GlobalSettings.md +2 -2
- package/concepts/es/Tool-Artifact.md +7 -0
- package/concepts/es/Tool-EndConversation.md +35 -0
- package/concepts/es/Tool-LSP.md +5 -0
- package/concepts/es/Tool-ListAgents.md +35 -0
- package/concepts/es/Tool-ListConnectors.md +34 -0
- package/concepts/es/Tool-ListMcpResources.md +35 -0
- package/concepts/es/Tool-ListPlugins.md +35 -0
- package/concepts/es/Tool-ListSkills.md +37 -0
- package/concepts/es/Tool-Monitor.md +7 -0
- package/concepts/es/Tool-Projects.md +46 -0
- package/concepts/es/Tool-ProposeGoal.md +43 -0
- package/concepts/es/Tool-PushNotification.md +6 -0
- package/concepts/es/Tool-REPL.md +47 -0
- package/concepts/es/Tool-ReadMcpResource.md +32 -0
- package/concepts/es/Tool-ReadMcpResourceDir.md +32 -0
- package/concepts/es/Tool-ReadNotifications.md +27 -0
- package/concepts/es/Tool-RemoteTrigger.md +7 -0
- package/concepts/es/Tool-ScheduleWakeup.md +5 -0
- package/concepts/es/Tool-SearchMcpRegistry.md +31 -0
- package/concepts/es/Tool-SendFeedback.md +38 -0
- package/concepts/es/Tool-SendFile.md +36 -0
- package/concepts/es/Tool-SendMessage.md +5 -0
- package/concepts/es/Tool-SendUserFile.md +38 -0
- package/concepts/es/Tool-SendUserMessage.md +38 -0
- package/concepts/es/Tool-SuggestConnectors.md +28 -0
- package/concepts/es/Tool-SuggestPluginInstall.md +39 -0
- package/concepts/es/Tool-SuggestSkills.md +33 -0
- package/concepts/es/Tool-TaskCreate.md +6 -0
- package/concepts/es/Tool-TaskGet.md +6 -0
- package/concepts/es/Tool-TaskList.md +6 -0
- package/concepts/es/Tool-TaskUpdate.md +6 -0
- package/concepts/es/Tool-TodoWrite.md +43 -0
- package/concepts/es/Tool-ToolSearch.md +5 -0
- package/concepts/es/Tool-WebSearch.md +6 -0
- package/concepts/es/Tools.md +26 -4
- package/concepts/fr/GlobalSettings.md +2 -2
- package/concepts/fr/Tool-Artifact.md +7 -0
- package/concepts/fr/Tool-EndConversation.md +35 -0
- package/concepts/fr/Tool-LSP.md +5 -0
- package/concepts/fr/Tool-ListAgents.md +35 -0
- package/concepts/fr/Tool-ListConnectors.md +34 -0
- package/concepts/fr/Tool-ListMcpResources.md +35 -0
- package/concepts/fr/Tool-ListPlugins.md +35 -0
- package/concepts/fr/Tool-ListSkills.md +37 -0
- package/concepts/fr/Tool-Monitor.md +7 -0
- package/concepts/fr/Tool-Projects.md +46 -0
- package/concepts/fr/Tool-ProposeGoal.md +43 -0
- package/concepts/fr/Tool-PushNotification.md +6 -0
- package/concepts/fr/Tool-REPL.md +47 -0
- package/concepts/fr/Tool-ReadMcpResource.md +32 -0
- package/concepts/fr/Tool-ReadMcpResourceDir.md +32 -0
- package/concepts/fr/Tool-ReadNotifications.md +27 -0
- package/concepts/fr/Tool-RemoteTrigger.md +7 -0
- package/concepts/fr/Tool-ScheduleWakeup.md +5 -0
- package/concepts/fr/Tool-SearchMcpRegistry.md +31 -0
- package/concepts/fr/Tool-SendFeedback.md +38 -0
- package/concepts/fr/Tool-SendFile.md +36 -0
- package/concepts/fr/Tool-SendMessage.md +5 -0
- package/concepts/fr/Tool-SendUserFile.md +38 -0
- package/concepts/fr/Tool-SendUserMessage.md +38 -0
- package/concepts/fr/Tool-SuggestConnectors.md +28 -0
- package/concepts/fr/Tool-SuggestPluginInstall.md +39 -0
- package/concepts/fr/Tool-SuggestSkills.md +33 -0
- package/concepts/fr/Tool-TaskCreate.md +6 -0
- package/concepts/fr/Tool-TaskGet.md +6 -0
- package/concepts/fr/Tool-TaskList.md +6 -0
- package/concepts/fr/Tool-TaskUpdate.md +6 -0
- package/concepts/fr/Tool-TodoWrite.md +43 -0
- package/concepts/fr/Tool-ToolSearch.md +5 -0
- package/concepts/fr/Tool-WebSearch.md +6 -0
- package/concepts/fr/Tools.md +26 -4
- package/concepts/it/GlobalSettings.md +2 -2
- package/concepts/it/Tool-Artifact.md +7 -0
- package/concepts/it/Tool-EndConversation.md +35 -0
- package/concepts/it/Tool-LSP.md +5 -0
- package/concepts/it/Tool-ListAgents.md +35 -0
- package/concepts/it/Tool-ListConnectors.md +34 -0
- package/concepts/it/Tool-ListMcpResources.md +35 -0
- package/concepts/it/Tool-ListPlugins.md +35 -0
- package/concepts/it/Tool-ListSkills.md +37 -0
- package/concepts/it/Tool-Monitor.md +7 -0
- package/concepts/it/Tool-Projects.md +46 -0
- package/concepts/it/Tool-ProposeGoal.md +43 -0
- package/concepts/it/Tool-PushNotification.md +6 -0
- package/concepts/it/Tool-REPL.md +47 -0
- package/concepts/it/Tool-ReadMcpResource.md +32 -0
- package/concepts/it/Tool-ReadMcpResourceDir.md +32 -0
- package/concepts/it/Tool-ReadNotifications.md +27 -0
- package/concepts/it/Tool-RemoteTrigger.md +7 -0
- package/concepts/it/Tool-ScheduleWakeup.md +5 -0
- package/concepts/it/Tool-SearchMcpRegistry.md +31 -0
- package/concepts/it/Tool-SendFeedback.md +38 -0
- package/concepts/it/Tool-SendFile.md +36 -0
- package/concepts/it/Tool-SendMessage.md +5 -0
- package/concepts/it/Tool-SendUserFile.md +38 -0
- package/concepts/it/Tool-SendUserMessage.md +38 -0
- package/concepts/it/Tool-SuggestConnectors.md +28 -0
- package/concepts/it/Tool-SuggestPluginInstall.md +39 -0
- package/concepts/it/Tool-SuggestSkills.md +33 -0
- package/concepts/it/Tool-TaskCreate.md +6 -0
- package/concepts/it/Tool-TaskGet.md +6 -0
- package/concepts/it/Tool-TaskList.md +6 -0
- package/concepts/it/Tool-TaskUpdate.md +6 -0
- package/concepts/it/Tool-TodoWrite.md +43 -0
- package/concepts/it/Tool-ToolSearch.md +5 -0
- package/concepts/it/Tool-WebSearch.md +6 -0
- package/concepts/it/Tools.md +26 -4
- package/concepts/ja/GlobalSettings.md +2 -2
- package/concepts/ja/Tool-Artifact.md +7 -0
- package/concepts/ja/Tool-EndConversation.md +35 -0
- package/concepts/ja/Tool-LSP.md +5 -0
- package/concepts/ja/Tool-ListAgents.md +35 -0
- package/concepts/ja/Tool-ListConnectors.md +34 -0
- package/concepts/ja/Tool-ListMcpResources.md +35 -0
- package/concepts/ja/Tool-ListPlugins.md +35 -0
- package/concepts/ja/Tool-ListSkills.md +37 -0
- package/concepts/ja/Tool-Monitor.md +7 -0
- package/concepts/ja/Tool-Projects.md +46 -0
- package/concepts/ja/Tool-ProposeGoal.md +43 -0
- package/concepts/ja/Tool-PushNotification.md +6 -0
- package/concepts/ja/Tool-REPL.md +47 -0
- package/concepts/ja/Tool-ReadMcpResource.md +32 -0
- package/concepts/ja/Tool-ReadMcpResourceDir.md +32 -0
- package/concepts/ja/Tool-ReadNotifications.md +27 -0
- package/concepts/ja/Tool-RemoteTrigger.md +7 -0
- package/concepts/ja/Tool-ScheduleWakeup.md +5 -0
- package/concepts/ja/Tool-SearchMcpRegistry.md +31 -0
- package/concepts/ja/Tool-SendFeedback.md +38 -0
- package/concepts/ja/Tool-SendFile.md +36 -0
- package/concepts/ja/Tool-SendMessage.md +5 -0
- package/concepts/ja/Tool-SendUserFile.md +38 -0
- package/concepts/ja/Tool-SendUserMessage.md +38 -0
- package/concepts/ja/Tool-SuggestConnectors.md +28 -0
- package/concepts/ja/Tool-SuggestPluginInstall.md +39 -0
- package/concepts/ja/Tool-SuggestSkills.md +33 -0
- package/concepts/ja/Tool-TaskCreate.md +6 -0
- package/concepts/ja/Tool-TaskGet.md +6 -0
- package/concepts/ja/Tool-TaskList.md +6 -0
- package/concepts/ja/Tool-TaskUpdate.md +6 -0
- package/concepts/ja/Tool-TodoWrite.md +43 -0
- package/concepts/ja/Tool-ToolSearch.md +5 -0
- package/concepts/ja/Tool-WebSearch.md +6 -0
- package/concepts/ja/Tools.md +26 -4
- package/concepts/ko/GlobalSettings.md +2 -2
- package/concepts/ko/Tool-Artifact.md +7 -0
- package/concepts/ko/Tool-EndConversation.md +35 -0
- package/concepts/ko/Tool-LSP.md +5 -0
- package/concepts/ko/Tool-ListAgents.md +35 -0
- package/concepts/ko/Tool-ListConnectors.md +34 -0
- package/concepts/ko/Tool-ListMcpResources.md +35 -0
- package/concepts/ko/Tool-ListPlugins.md +35 -0
- package/concepts/ko/Tool-ListSkills.md +37 -0
- package/concepts/ko/Tool-Monitor.md +7 -0
- package/concepts/ko/Tool-Projects.md +46 -0
- package/concepts/ko/Tool-ProposeGoal.md +43 -0
- package/concepts/ko/Tool-PushNotification.md +6 -0
- package/concepts/ko/Tool-REPL.md +47 -0
- package/concepts/ko/Tool-ReadMcpResource.md +32 -0
- package/concepts/ko/Tool-ReadMcpResourceDir.md +32 -0
- package/concepts/ko/Tool-ReadNotifications.md +27 -0
- package/concepts/ko/Tool-RemoteTrigger.md +7 -0
- package/concepts/ko/Tool-ScheduleWakeup.md +5 -0
- package/concepts/ko/Tool-SearchMcpRegistry.md +31 -0
- package/concepts/ko/Tool-SendFeedback.md +38 -0
- package/concepts/ko/Tool-SendFile.md +36 -0
- package/concepts/ko/Tool-SendMessage.md +5 -0
- package/concepts/ko/Tool-SendUserFile.md +38 -0
- package/concepts/ko/Tool-SendUserMessage.md +38 -0
- package/concepts/ko/Tool-SuggestConnectors.md +28 -0
- package/concepts/ko/Tool-SuggestPluginInstall.md +39 -0
- package/concepts/ko/Tool-SuggestSkills.md +33 -0
- package/concepts/ko/Tool-TaskCreate.md +6 -0
- package/concepts/ko/Tool-TaskGet.md +6 -0
- package/concepts/ko/Tool-TaskList.md +6 -0
- package/concepts/ko/Tool-TaskUpdate.md +6 -0
- package/concepts/ko/Tool-TodoWrite.md +43 -0
- package/concepts/ko/Tool-ToolSearch.md +5 -0
- package/concepts/ko/Tool-WebSearch.md +6 -0
- package/concepts/ko/Tools.md +26 -4
- package/concepts/no/GlobalSettings.md +2 -2
- package/concepts/no/Tool-Artifact.md +7 -0
- package/concepts/no/Tool-EndConversation.md +35 -0
- package/concepts/no/Tool-LSP.md +7 -2
- package/concepts/no/Tool-ListAgents.md +35 -0
- package/concepts/no/Tool-ListConnectors.md +34 -0
- package/concepts/no/Tool-ListMcpResources.md +35 -0
- package/concepts/no/Tool-ListPlugins.md +35 -0
- package/concepts/no/Tool-ListSkills.md +37 -0
- package/concepts/no/Tool-Monitor.md +7 -0
- package/concepts/no/Tool-Projects.md +46 -0
- package/concepts/no/Tool-ProposeGoal.md +43 -0
- package/concepts/no/Tool-PushNotification.md +6 -0
- package/concepts/no/Tool-REPL.md +47 -0
- package/concepts/no/Tool-ReadMcpResource.md +32 -0
- package/concepts/no/Tool-ReadMcpResourceDir.md +32 -0
- package/concepts/no/Tool-ReadNotifications.md +27 -0
- package/concepts/no/Tool-RemoteTrigger.md +7 -0
- package/concepts/no/Tool-ScheduleWakeup.md +5 -0
- package/concepts/no/Tool-SearchMcpRegistry.md +31 -0
- package/concepts/no/Tool-SendFeedback.md +38 -0
- package/concepts/no/Tool-SendFile.md +36 -0
- package/concepts/no/Tool-SendMessage.md +5 -0
- package/concepts/no/Tool-SendUserFile.md +38 -0
- package/concepts/no/Tool-SendUserMessage.md +38 -0
- package/concepts/no/Tool-SuggestConnectors.md +28 -0
- package/concepts/no/Tool-SuggestPluginInstall.md +39 -0
- package/concepts/no/Tool-SuggestSkills.md +33 -0
- package/concepts/no/Tool-TaskCreate.md +6 -0
- package/concepts/no/Tool-TaskGet.md +6 -0
- package/concepts/no/Tool-TaskList.md +6 -0
- package/concepts/no/Tool-TaskUpdate.md +6 -0
- package/concepts/no/Tool-TodoWrite.md +43 -0
- package/concepts/no/Tool-ToolSearch.md +5 -0
- package/concepts/no/Tool-WebSearch.md +6 -0
- package/concepts/no/Tools.md +26 -4
- package/concepts/pl/GlobalSettings.md +2 -2
- package/concepts/pl/Tool-Artifact.md +7 -0
- package/concepts/pl/Tool-EndConversation.md +35 -0
- package/concepts/pl/Tool-LSP.md +5 -0
- package/concepts/pl/Tool-ListAgents.md +35 -0
- package/concepts/pl/Tool-ListConnectors.md +34 -0
- package/concepts/pl/Tool-ListMcpResources.md +35 -0
- package/concepts/pl/Tool-ListPlugins.md +35 -0
- package/concepts/pl/Tool-ListSkills.md +37 -0
- package/concepts/pl/Tool-Monitor.md +7 -0
- package/concepts/pl/Tool-Projects.md +46 -0
- package/concepts/pl/Tool-ProposeGoal.md +43 -0
- package/concepts/pl/Tool-PushNotification.md +6 -0
- package/concepts/pl/Tool-REPL.md +47 -0
- package/concepts/pl/Tool-ReadMcpResource.md +32 -0
- package/concepts/pl/Tool-ReadMcpResourceDir.md +32 -0
- package/concepts/pl/Tool-ReadNotifications.md +27 -0
- package/concepts/pl/Tool-RemoteTrigger.md +7 -0
- package/concepts/pl/Tool-ScheduleWakeup.md +5 -0
- package/concepts/pl/Tool-SearchMcpRegistry.md +31 -0
- package/concepts/pl/Tool-SendFeedback.md +38 -0
- package/concepts/pl/Tool-SendFile.md +36 -0
- package/concepts/pl/Tool-SendMessage.md +5 -0
- package/concepts/pl/Tool-SendUserFile.md +38 -0
- package/concepts/pl/Tool-SendUserMessage.md +38 -0
- package/concepts/pl/Tool-SuggestConnectors.md +28 -0
- package/concepts/pl/Tool-SuggestPluginInstall.md +39 -0
- package/concepts/pl/Tool-SuggestSkills.md +33 -0
- package/concepts/pl/Tool-TaskCreate.md +6 -0
- package/concepts/pl/Tool-TaskGet.md +6 -0
- package/concepts/pl/Tool-TaskList.md +6 -0
- package/concepts/pl/Tool-TaskUpdate.md +6 -0
- package/concepts/pl/Tool-TodoWrite.md +43 -0
- package/concepts/pl/Tool-ToolSearch.md +5 -0
- package/concepts/pl/Tool-WebSearch.md +6 -0
- package/concepts/pl/Tools.md +26 -4
- package/concepts/pt-BR/GlobalSettings.md +2 -2
- package/concepts/pt-BR/Tool-Artifact.md +7 -0
- package/concepts/pt-BR/Tool-EndConversation.md +35 -0
- package/concepts/pt-BR/Tool-LSP.md +5 -0
- package/concepts/pt-BR/Tool-ListAgents.md +35 -0
- package/concepts/pt-BR/Tool-ListConnectors.md +34 -0
- package/concepts/pt-BR/Tool-ListMcpResources.md +35 -0
- package/concepts/pt-BR/Tool-ListPlugins.md +35 -0
- package/concepts/pt-BR/Tool-ListSkills.md +37 -0
- package/concepts/pt-BR/Tool-Monitor.md +7 -0
- package/concepts/pt-BR/Tool-Projects.md +46 -0
- package/concepts/pt-BR/Tool-ProposeGoal.md +43 -0
- package/concepts/pt-BR/Tool-PushNotification.md +6 -0
- package/concepts/pt-BR/Tool-REPL.md +47 -0
- package/concepts/pt-BR/Tool-ReadMcpResource.md +32 -0
- package/concepts/pt-BR/Tool-ReadMcpResourceDir.md +32 -0
- package/concepts/pt-BR/Tool-ReadNotifications.md +27 -0
- package/concepts/pt-BR/Tool-RemoteTrigger.md +7 -0
- package/concepts/pt-BR/Tool-ScheduleWakeup.md +5 -0
- package/concepts/pt-BR/Tool-SearchMcpRegistry.md +31 -0
- package/concepts/pt-BR/Tool-SendFeedback.md +38 -0
- package/concepts/pt-BR/Tool-SendFile.md +36 -0
- package/concepts/pt-BR/Tool-SendMessage.md +5 -0
- package/concepts/pt-BR/Tool-SendUserFile.md +38 -0
- package/concepts/pt-BR/Tool-SendUserMessage.md +38 -0
- package/concepts/pt-BR/Tool-SuggestConnectors.md +28 -0
- package/concepts/pt-BR/Tool-SuggestPluginInstall.md +39 -0
- package/concepts/pt-BR/Tool-SuggestSkills.md +33 -0
- package/concepts/pt-BR/Tool-TaskCreate.md +6 -0
- package/concepts/pt-BR/Tool-TaskGet.md +6 -0
- package/concepts/pt-BR/Tool-TaskList.md +6 -0
- package/concepts/pt-BR/Tool-TaskUpdate.md +6 -0
- package/concepts/pt-BR/Tool-TodoWrite.md +43 -0
- package/concepts/pt-BR/Tool-ToolSearch.md +5 -0
- package/concepts/pt-BR/Tool-WebSearch.md +6 -0
- package/concepts/pt-BR/Tools.md +26 -4
- package/concepts/ru/GlobalSettings.md +2 -2
- package/concepts/ru/Tool-Artifact.md +7 -0
- package/concepts/ru/Tool-EndConversation.md +35 -0
- package/concepts/ru/Tool-LSP.md +5 -0
- package/concepts/ru/Tool-ListAgents.md +35 -0
- package/concepts/ru/Tool-ListConnectors.md +34 -0
- package/concepts/ru/Tool-ListMcpResources.md +35 -0
- package/concepts/ru/Tool-ListPlugins.md +35 -0
- package/concepts/ru/Tool-ListSkills.md +37 -0
- package/concepts/ru/Tool-Monitor.md +7 -0
- package/concepts/ru/Tool-Projects.md +46 -0
- package/concepts/ru/Tool-ProposeGoal.md +43 -0
- package/concepts/ru/Tool-PushNotification.md +6 -0
- package/concepts/ru/Tool-REPL.md +47 -0
- package/concepts/ru/Tool-ReadMcpResource.md +32 -0
- package/concepts/ru/Tool-ReadMcpResourceDir.md +32 -0
- package/concepts/ru/Tool-ReadNotifications.md +27 -0
- package/concepts/ru/Tool-RemoteTrigger.md +7 -0
- package/concepts/ru/Tool-ScheduleWakeup.md +5 -0
- package/concepts/ru/Tool-SearchMcpRegistry.md +31 -0
- package/concepts/ru/Tool-SendFeedback.md +38 -0
- package/concepts/ru/Tool-SendFile.md +36 -0
- package/concepts/ru/Tool-SendMessage.md +5 -0
- package/concepts/ru/Tool-SendUserFile.md +38 -0
- package/concepts/ru/Tool-SendUserMessage.md +38 -0
- package/concepts/ru/Tool-SuggestConnectors.md +28 -0
- package/concepts/ru/Tool-SuggestPluginInstall.md +39 -0
- package/concepts/ru/Tool-SuggestSkills.md +33 -0
- package/concepts/ru/Tool-TaskCreate.md +6 -0
- package/concepts/ru/Tool-TaskGet.md +6 -0
- package/concepts/ru/Tool-TaskList.md +6 -0
- package/concepts/ru/Tool-TaskUpdate.md +6 -0
- package/concepts/ru/Tool-TodoWrite.md +43 -0
- package/concepts/ru/Tool-ToolSearch.md +5 -0
- package/concepts/ru/Tool-WebSearch.md +6 -0
- package/concepts/ru/Tools.md +26 -4
- package/concepts/th/GlobalSettings.md +2 -2
- package/concepts/th/Tool-Artifact.md +7 -0
- package/concepts/th/Tool-EndConversation.md +35 -0
- package/concepts/th/Tool-LSP.md +5 -0
- package/concepts/th/Tool-ListAgents.md +35 -0
- package/concepts/th/Tool-ListConnectors.md +34 -0
- package/concepts/th/Tool-ListMcpResources.md +35 -0
- package/concepts/th/Tool-ListPlugins.md +35 -0
- package/concepts/th/Tool-ListSkills.md +37 -0
- package/concepts/th/Tool-Monitor.md +7 -0
- package/concepts/th/Tool-Projects.md +46 -0
- package/concepts/th/Tool-ProposeGoal.md +43 -0
- package/concepts/th/Tool-PushNotification.md +6 -0
- package/concepts/th/Tool-REPL.md +47 -0
- package/concepts/th/Tool-ReadMcpResource.md +32 -0
- package/concepts/th/Tool-ReadMcpResourceDir.md +32 -0
- package/concepts/th/Tool-ReadNotifications.md +27 -0
- package/concepts/th/Tool-RemoteTrigger.md +7 -0
- package/concepts/th/Tool-ScheduleWakeup.md +5 -0
- package/concepts/th/Tool-SearchMcpRegistry.md +31 -0
- package/concepts/th/Tool-SendFeedback.md +38 -0
- package/concepts/th/Tool-SendFile.md +36 -0
- package/concepts/th/Tool-SendMessage.md +5 -0
- package/concepts/th/Tool-SendUserFile.md +38 -0
- package/concepts/th/Tool-SendUserMessage.md +38 -0
- package/concepts/th/Tool-SuggestConnectors.md +28 -0
- package/concepts/th/Tool-SuggestPluginInstall.md +39 -0
- package/concepts/th/Tool-SuggestSkills.md +33 -0
- package/concepts/th/Tool-TaskCreate.md +6 -0
- package/concepts/th/Tool-TaskGet.md +6 -0
- package/concepts/th/Tool-TaskList.md +6 -0
- package/concepts/th/Tool-TaskUpdate.md +6 -0
- package/concepts/th/Tool-TodoWrite.md +43 -0
- package/concepts/th/Tool-ToolSearch.md +5 -0
- package/concepts/th/Tool-WebSearch.md +13 -7
- package/concepts/th/Tools.md +26 -4
- package/concepts/tr/GlobalSettings.md +2 -2
- package/concepts/tr/Tool-Artifact.md +7 -0
- package/concepts/tr/Tool-EndConversation.md +35 -0
- package/concepts/tr/Tool-LSP.md +5 -0
- package/concepts/tr/Tool-ListAgents.md +35 -0
- package/concepts/tr/Tool-ListConnectors.md +34 -0
- package/concepts/tr/Tool-ListMcpResources.md +35 -0
- package/concepts/tr/Tool-ListPlugins.md +35 -0
- package/concepts/tr/Tool-ListSkills.md +37 -0
- package/concepts/tr/Tool-Monitor.md +7 -0
- package/concepts/tr/Tool-Projects.md +46 -0
- package/concepts/tr/Tool-ProposeGoal.md +43 -0
- package/concepts/tr/Tool-PushNotification.md +6 -0
- package/concepts/tr/Tool-REPL.md +47 -0
- package/concepts/tr/Tool-ReadMcpResource.md +32 -0
- package/concepts/tr/Tool-ReadMcpResourceDir.md +32 -0
- package/concepts/tr/Tool-ReadNotifications.md +27 -0
- package/concepts/tr/Tool-RemoteTrigger.md +7 -0
- package/concepts/tr/Tool-ScheduleWakeup.md +5 -0
- package/concepts/tr/Tool-SearchMcpRegistry.md +31 -0
- package/concepts/tr/Tool-SendFeedback.md +38 -0
- package/concepts/tr/Tool-SendFile.md +36 -0
- package/concepts/tr/Tool-SendMessage.md +5 -0
- package/concepts/tr/Tool-SendUserFile.md +38 -0
- package/concepts/tr/Tool-SendUserMessage.md +38 -0
- package/concepts/tr/Tool-SuggestConnectors.md +28 -0
- package/concepts/tr/Tool-SuggestPluginInstall.md +39 -0
- package/concepts/tr/Tool-SuggestSkills.md +33 -0
- package/concepts/tr/Tool-TaskCreate.md +6 -0
- package/concepts/tr/Tool-TaskGet.md +6 -0
- package/concepts/tr/Tool-TaskList.md +6 -0
- package/concepts/tr/Tool-TaskUpdate.md +6 -0
- package/concepts/tr/Tool-TodoWrite.md +43 -0
- package/concepts/tr/Tool-ToolSearch.md +5 -0
- package/concepts/tr/Tool-WebSearch.md +6 -0
- package/concepts/tr/Tools.md +26 -4
- package/concepts/uk/GlobalSettings.md +2 -2
- package/concepts/uk/Tool-Artifact.md +7 -0
- package/concepts/uk/Tool-EndConversation.md +35 -0
- package/concepts/uk/Tool-LSP.md +5 -0
- package/concepts/uk/Tool-ListAgents.md +35 -0
- package/concepts/uk/Tool-ListConnectors.md +34 -0
- package/concepts/uk/Tool-ListMcpResources.md +35 -0
- package/concepts/uk/Tool-ListPlugins.md +35 -0
- package/concepts/uk/Tool-ListSkills.md +37 -0
- package/concepts/uk/Tool-Monitor.md +7 -0
- package/concepts/uk/Tool-Projects.md +46 -0
- package/concepts/uk/Tool-ProposeGoal.md +43 -0
- package/concepts/uk/Tool-PushNotification.md +6 -0
- package/concepts/uk/Tool-REPL.md +47 -0
- package/concepts/uk/Tool-ReadMcpResource.md +32 -0
- package/concepts/uk/Tool-ReadMcpResourceDir.md +32 -0
- package/concepts/uk/Tool-ReadNotifications.md +27 -0
- package/concepts/uk/Tool-RemoteTrigger.md +7 -0
- package/concepts/uk/Tool-ScheduleWakeup.md +5 -0
- package/concepts/uk/Tool-SearchMcpRegistry.md +31 -0
- package/concepts/uk/Tool-SendFeedback.md +38 -0
- package/concepts/uk/Tool-SendFile.md +36 -0
- package/concepts/uk/Tool-SendMessage.md +5 -0
- package/concepts/uk/Tool-SendUserFile.md +38 -0
- package/concepts/uk/Tool-SendUserMessage.md +38 -0
- package/concepts/uk/Tool-SuggestConnectors.md +28 -0
- package/concepts/uk/Tool-SuggestPluginInstall.md +39 -0
- package/concepts/uk/Tool-SuggestSkills.md +33 -0
- package/concepts/uk/Tool-TaskCreate.md +6 -0
- package/concepts/uk/Tool-TaskGet.md +6 -0
- package/concepts/uk/Tool-TaskList.md +6 -0
- package/concepts/uk/Tool-TaskUpdate.md +6 -0
- package/concepts/uk/Tool-TodoWrite.md +43 -0
- package/concepts/uk/Tool-ToolSearch.md +5 -0
- package/concepts/uk/Tool-WebSearch.md +6 -0
- package/concepts/uk/Tools.md +26 -4
- package/concepts/zh/GlobalSettings.md +2 -2
- package/concepts/zh/Tool-Artifact.md +7 -0
- package/concepts/zh/Tool-EndConversation.md +35 -0
- package/concepts/zh/Tool-LSP.md +5 -0
- package/concepts/zh/Tool-ListAgents.md +35 -0
- package/concepts/zh/Tool-ListConnectors.md +34 -0
- package/concepts/zh/Tool-ListMcpResources.md +35 -0
- package/concepts/zh/Tool-ListPlugins.md +35 -0
- package/concepts/zh/Tool-ListSkills.md +37 -0
- package/concepts/zh/Tool-Monitor.md +7 -0
- package/concepts/zh/Tool-Projects.md +46 -0
- package/concepts/zh/Tool-ProposeGoal.md +43 -0
- package/concepts/zh/Tool-PushNotification.md +6 -0
- package/concepts/zh/Tool-REPL.md +47 -0
- package/concepts/zh/Tool-ReadMcpResource.md +32 -0
- package/concepts/zh/Tool-ReadMcpResourceDir.md +32 -0
- package/concepts/zh/Tool-ReadNotifications.md +27 -0
- package/concepts/zh/Tool-RemoteTrigger.md +7 -0
- package/concepts/zh/Tool-ScheduleWakeup.md +5 -0
- package/concepts/zh/Tool-SearchMcpRegistry.md +31 -0
- package/concepts/zh/Tool-SendFeedback.md +38 -0
- package/concepts/zh/Tool-SendFile.md +36 -0
- package/concepts/zh/Tool-SendMessage.md +5 -0
- package/concepts/zh/Tool-SendUserFile.md +38 -0
- package/concepts/zh/Tool-SendUserMessage.md +38 -0
- package/concepts/zh/Tool-SuggestConnectors.md +28 -0
- package/concepts/zh/Tool-SuggestPluginInstall.md +39 -0
- package/concepts/zh/Tool-SuggestSkills.md +33 -0
- package/concepts/zh/Tool-TaskCreate.md +6 -0
- package/concepts/zh/Tool-TaskGet.md +6 -0
- package/concepts/zh/Tool-TaskList.md +6 -0
- package/concepts/zh/Tool-TaskUpdate.md +6 -0
- package/concepts/zh/Tool-TodoWrite.md +43 -0
- package/concepts/zh/Tool-ToolSearch.md +5 -0
- package/concepts/zh/Tool-WebSearch.md +6 -0
- package/concepts/zh/Tools.md +26 -4
- package/concepts/zh-TW/GlobalSettings.md +2 -2
- package/concepts/zh-TW/Tool-Artifact.md +7 -0
- package/concepts/zh-TW/Tool-EndConversation.md +35 -0
- package/concepts/zh-TW/Tool-LSP.md +5 -0
- package/concepts/zh-TW/Tool-ListAgents.md +35 -0
- package/concepts/zh-TW/Tool-ListConnectors.md +34 -0
- package/concepts/zh-TW/Tool-ListMcpResources.md +35 -0
- package/concepts/zh-TW/Tool-ListPlugins.md +35 -0
- package/concepts/zh-TW/Tool-ListSkills.md +37 -0
- package/concepts/zh-TW/Tool-Monitor.md +7 -0
- package/concepts/zh-TW/Tool-Projects.md +46 -0
- package/concepts/zh-TW/Tool-ProposeGoal.md +43 -0
- package/concepts/zh-TW/Tool-PushNotification.md +6 -0
- package/concepts/zh-TW/Tool-REPL.md +47 -0
- package/concepts/zh-TW/Tool-ReadMcpResource.md +32 -0
- package/concepts/zh-TW/Tool-ReadMcpResourceDir.md +32 -0
- package/concepts/zh-TW/Tool-ReadNotifications.md +27 -0
- package/concepts/zh-TW/Tool-RemoteTrigger.md +7 -0
- package/concepts/zh-TW/Tool-ScheduleWakeup.md +5 -0
- package/concepts/zh-TW/Tool-SearchMcpRegistry.md +31 -0
- package/concepts/zh-TW/Tool-SendFeedback.md +38 -0
- package/concepts/zh-TW/Tool-SendFile.md +36 -0
- package/concepts/zh-TW/Tool-SendMessage.md +5 -0
- package/concepts/zh-TW/Tool-SendUserFile.md +38 -0
- package/concepts/zh-TW/Tool-SendUserMessage.md +38 -0
- package/concepts/zh-TW/Tool-SuggestConnectors.md +28 -0
- package/concepts/zh-TW/Tool-SuggestPluginInstall.md +39 -0
- package/concepts/zh-TW/Tool-SuggestSkills.md +33 -0
- package/concepts/zh-TW/Tool-TaskCreate.md +6 -0
- package/concepts/zh-TW/Tool-TaskGet.md +6 -0
- package/concepts/zh-TW/Tool-TaskList.md +6 -0
- package/concepts/zh-TW/Tool-TaskUpdate.md +6 -0
- package/concepts/zh-TW/Tool-TodoWrite.md +43 -0
- package/concepts/zh-TW/Tool-ToolSearch.md +5 -0
- package/concepts/zh-TW/Tool-WebSearch.md +6 -0
- package/concepts/zh-TW/Tools.md +26 -4
- package/dist/assets/{App-BaKGIW0-.js → App-CCu0y2Cq.js} +2 -2
- package/dist/assets/{MdxEditorPanel-DG-UE0PC.js → MdxEditorPanel-BBhgTmDk.js} +1 -1
- package/dist/assets/{Mobile-CQaUYdaf.js → Mobile-vN4lyiaz.js} +1 -1
- package/dist/assets/{ProxyStatsModal-j-Aty9Lu.js → ProxyStatsModal-BOflqr0R.js} +1 -1
- package/dist/assets/index-C3BRHDVF.js +2 -0
- package/dist/assets/seqResourceLoaders-DI0G5nu1.css +41 -0
- package/dist/assets/seqResourceLoaders-DpYqp6SP.js +2 -0
- package/dist/index.html +1 -1
- package/findcc.js +17 -8
- package/node_modules/@ccv/core/package.json +13 -0
- package/{server/lib → node_modules/@ccv/core/src}/approval-modal-prefs.js +1 -1
- package/node_modules/@ccv/core/src/clearCheckpoint.js +7 -0
- package/{src/utils → node_modules/@ccv/core/src}/contentFilter.js +207 -141
- package/{server/lib → node_modules/@ccv/core/src}/context-rules.js +2 -2
- package/{server/lib → node_modules/@ccv/core/src}/delta-reconstructor.js +60 -4
- package/{server/lib → node_modules/@ccv/core/src}/error-report.js +5 -4
- package/{server/lib → node_modules/@ccv/core/src}/session-boundary.js +3 -3
- package/{src/utils → node_modules/@ccv/core/src}/teammateDetector.js +9 -0
- package/{server/lib → node_modules/@ccv/core/src}/tools-xml-formatter.js +3 -3
- package/{server/lib → node_modules/@ccv/core/src}/v2-transcript-normalizer.js +1 -1
- package/{server/lib → node_modules/@ccv/core/src}/voice-pack-events.js +2 -2
- package/package.json +11 -96
- package/server/_paths.js +28 -7
- package/server/i18n.js +60 -0
- package/server/interceptor.js +36 -11
- package/server/lib/adapters/dingtalk-adapter.js +2 -2
- package/server/lib/adapters/discord-adapter.js +2 -2
- package/server/lib/adapters/feishu-adapter.js +2 -2
- package/server/lib/adapters/wecom-adapter.js +2 -2
- package/server/lib/approval-policy.js +29 -0
- package/server/lib/{ask-store.js → ask/ask-store.js} +3 -3
- package/server/lib/{perm-bridge.js → ask/perm-bridge.js} +5 -5
- package/server/lib/chat-queue.js +341 -0
- package/server/lib/cli-inject.js +1 -1
- package/server/lib/context-watcher.js +3 -3
- package/server/lib/create_system_prompt.js +0 -9
- package/server/lib/enrich-plan-input.js +1 -1
- package/server/lib/ensure-hooks.js +2 -2
- package/server/lib/file-access-policy.js +6 -1
- package/server/lib/file-api.js +17 -1
- package/server/lib/{dingtalk-bridge.js → im/dingtalk-bridge.js} +1 -1
- package/server/lib/{im-append-system.js → im/im-append-system.js} +5 -13
- package/server/lib/{im-bridge-core.js → im/im-bridge-core.js} +12 -6
- package/server/lib/{im-config.js → im/im-config.js} +1 -1
- package/server/lib/im/im-deny.js +4 -0
- package/server/lib/{im-lang.js → im/im-lang.js} +1 -1
- package/server/lib/{im-lock.js → im/im-lock.js} +2 -2
- package/server/lib/{im-process-manager.js → im/im-process-manager.js} +1 -1
- package/server/lib/{im-senders.js → im/im-senders.js} +1 -1
- package/server/lib/{im-skills.js → im/im-skills.js} +2 -2
- package/server/lib/interceptor-core.js +8 -5
- package/server/lib/kv-cache-analyzer.js +6 -5
- package/server/lib/launch-config.js +321 -0
- package/server/lib/log-file-utils.js +21 -0
- package/server/lib/log-management.js +6 -17
- package/server/lib/log-stream.js +1 -1
- package/server/lib/log-watcher.js +1 -1
- package/server/lib/model-system-prompts.js +1 -1
- package/server/lib/prefs-store.js +2 -2
- package/server/lib/project-prefs.js +6 -6
- package/server/lib/project-state.js +15 -0
- package/server/lib/{proxy-retry.js → proxy/proxy-retry.js} +2 -2
- package/server/lib/{proxy-stats.js → proxy/proxy-stats.js} +3 -3
- package/server/lib/sdk-adapter.js +6 -74
- package/server/lib/sdk-manager.js +383 -278
- package/server/lib/skills-api.js +1 -1
- package/server/lib/spawn-model-resolver.js +21 -6
- package/server/lib/stats-worker.js +2 -2
- package/server/lib/system-prompt-files.js +11 -10
- package/server/lib/system-prompt-render.js +23 -7
- package/server/lib/system-prompt-snapshots.js +452 -0
- package/server/lib/updater.js +63 -3
- package/server/lib/user-prompt-extract.js +5 -5
- package/server/lib/v2/adapter.js +3 -3
- package/server/lib/v2/conversation-store.js +1 -1
- package/server/lib/v2/convert.js +3 -3
- package/server/lib/v2/jsonl-read.js +1 -1
- package/server/lib/v2/live-feed.js +3 -3
- package/server/lib/v2/meta-rows.js +3 -3
- package/server/lib/v2/replay.js +1 -1
- package/server/lib/v2/session-list.js +1 -1
- package/server/lib/v2/session-owner.js +1 -1
- package/server/lib/v2/v2-writer.js +26 -1
- package/server/lib/v2/verify.js +1 -1
- package/server/lib/voice-pack-manager.js +4 -5
- package/server/lib/wire-compress.js +1 -1
- package/server/proxy.js +5 -5
- package/server/pty-manager.js +282 -184
- package/server/routes/ask-perm.js +1 -1
- package/server/routes/dingtalk.js +3 -3
- package/server/routes/events.js +2 -2
- package/server/routes/im.js +5 -5
- package/server/routes/preferences.js +3 -3
- package/server/routes/workspaces.js +1 -1
- package/server/server.js +207 -58
- package/server/system-prompt-templates/systemPromptModel.md +0 -8
- package/server/system-prompt-templates/systemPromptVariables.ar.md +0 -7
- package/server/system-prompt-templates/systemPromptVariables.da.md +0 -7
- package/server/system-prompt-templates/systemPromptVariables.de.md +0 -7
- package/server/system-prompt-templates/systemPromptVariables.es.md +0 -7
- package/server/system-prompt-templates/systemPromptVariables.fr.md +0 -7
- package/server/system-prompt-templates/systemPromptVariables.it.md +0 -7
- package/server/system-prompt-templates/systemPromptVariables.ja.md +0 -7
- package/server/system-prompt-templates/systemPromptVariables.ko.md +0 -7
- package/server/system-prompt-templates/systemPromptVariables.md +0 -7
- package/server/system-prompt-templates/systemPromptVariables.no.md +0 -7
- package/server/system-prompt-templates/systemPromptVariables.pl.md +0 -7
- package/server/system-prompt-templates/systemPromptVariables.pt-BR.md +0 -7
- package/server/system-prompt-templates/systemPromptVariables.ru.md +0 -7
- package/server/system-prompt-templates/systemPromptVariables.th.md +0 -7
- package/server/system-prompt-templates/systemPromptVariables.tr.md +0 -7
- package/server/system-prompt-templates/systemPromptVariables.uk.md +0 -7
- package/server/system-prompt-templates/systemPromptVariables.zh-TW.md +0 -7
- package/server/system-prompt-templates/systemPromptVariables.zh.md +0 -7
- package/concepts/ar/Tool-TeamCreate.md +0 -53
- package/concepts/ar/Tool-TeamDelete.md +0 -44
- package/concepts/ar/Tool-executeCode.md +0 -47
- package/concepts/ar/Tool-getDiagnostics.md +0 -44
- package/concepts/da/Tool-TeamCreate.md +0 -53
- package/concepts/da/Tool-TeamDelete.md +0 -44
- package/concepts/da/Tool-executeCode.md +0 -47
- package/concepts/da/Tool-getDiagnostics.md +0 -44
- package/concepts/de/Tool-TeamCreate.md +0 -53
- package/concepts/de/Tool-TeamDelete.md +0 -44
- package/concepts/de/Tool-executeCode.md +0 -47
- package/concepts/de/Tool-getDiagnostics.md +0 -44
- package/concepts/en/Tool-TeamCreate.md +0 -53
- package/concepts/en/Tool-TeamDelete.md +0 -44
- package/concepts/en/Tool-executeCode.md +0 -47
- package/concepts/en/Tool-getDiagnostics.md +0 -44
- package/concepts/es/Tool-TeamCreate.md +0 -53
- package/concepts/es/Tool-TeamDelete.md +0 -44
- package/concepts/es/Tool-executeCode.md +0 -47
- package/concepts/es/Tool-getDiagnostics.md +0 -44
- package/concepts/fr/Tool-TeamCreate.md +0 -53
- package/concepts/fr/Tool-TeamDelete.md +0 -44
- package/concepts/fr/Tool-executeCode.md +0 -47
- package/concepts/fr/Tool-getDiagnostics.md +0 -44
- package/concepts/it/Tool-TeamCreate.md +0 -53
- package/concepts/it/Tool-TeamDelete.md +0 -44
- package/concepts/it/Tool-executeCode.md +0 -47
- package/concepts/it/Tool-getDiagnostics.md +0 -44
- package/concepts/ja/Tool-TeamCreate.md +0 -53
- package/concepts/ja/Tool-TeamDelete.md +0 -44
- package/concepts/ja/Tool-executeCode.md +0 -47
- package/concepts/ja/Tool-getDiagnostics.md +0 -44
- package/concepts/ko/Tool-TeamCreate.md +0 -53
- package/concepts/ko/Tool-TeamDelete.md +0 -44
- package/concepts/ko/Tool-executeCode.md +0 -47
- package/concepts/ko/Tool-getDiagnostics.md +0 -44
- package/concepts/no/Tool-TeamCreate.md +0 -53
- package/concepts/no/Tool-TeamDelete.md +0 -44
- package/concepts/no/Tool-executeCode.md +0 -47
- package/concepts/no/Tool-getDiagnostics.md +0 -44
- package/concepts/pl/Tool-TeamCreate.md +0 -53
- package/concepts/pl/Tool-TeamDelete.md +0 -44
- package/concepts/pl/Tool-executeCode.md +0 -47
- package/concepts/pl/Tool-getDiagnostics.md +0 -44
- package/concepts/pt-BR/Tool-TeamCreate.md +0 -53
- package/concepts/pt-BR/Tool-TeamDelete.md +0 -44
- package/concepts/pt-BR/Tool-executeCode.md +0 -47
- package/concepts/pt-BR/Tool-getDiagnostics.md +0 -44
- package/concepts/ru/Tool-TeamCreate.md +0 -53
- package/concepts/ru/Tool-TeamDelete.md +0 -44
- package/concepts/ru/Tool-executeCode.md +0 -47
- package/concepts/ru/Tool-getDiagnostics.md +0 -44
- package/concepts/th/Tool-TeamCreate.md +0 -53
- package/concepts/th/Tool-TeamDelete.md +0 -44
- package/concepts/th/Tool-executeCode.md +0 -41
- package/concepts/th/Tool-getDiagnostics.md +0 -32
- package/concepts/tr/Tool-TeamCreate.md +0 -53
- package/concepts/tr/Tool-TeamDelete.md +0 -44
- package/concepts/tr/Tool-executeCode.md +0 -47
- package/concepts/tr/Tool-getDiagnostics.md +0 -44
- package/concepts/uk/Tool-TeamCreate.md +0 -53
- package/concepts/uk/Tool-TeamDelete.md +0 -44
- package/concepts/uk/Tool-executeCode.md +0 -47
- package/concepts/uk/Tool-getDiagnostics.md +0 -44
- package/concepts/zh/Tool-TeamCreate.md +0 -53
- package/concepts/zh/Tool-TeamDelete.md +0 -44
- package/concepts/zh/Tool-executeCode.md +0 -47
- package/concepts/zh/Tool-getDiagnostics.md +0 -44
- package/concepts/zh-TW/Tool-TeamCreate.md +0 -53
- package/concepts/zh-TW/Tool-TeamDelete.md +0 -44
- package/concepts/zh-TW/Tool-executeCode.md +0 -47
- package/concepts/zh-TW/Tool-getDiagnostics.md +0 -44
- package/dist/assets/index-CyiyzBfV.js +0 -2
- package/dist/assets/seqResourceLoaders-BgD_Rwvc.css +0 -41
- package/dist/assets/seqResourceLoaders-XMiEIVyV.js +0 -2
- package/src/utils/apiUrl.js +0 -26
- package/src/utils/askFallback.js +0 -21
- package/src/utils/askOptionDesc.js +0 -55
- package/src/utils/askPortalMatcher.js +0 -54
- package/src/utils/autoApproveOptions.js +0 -27
- package/src/utils/avatarAnimationPostPass.js +0 -49
- package/src/utils/builtinPresets.js +0 -18
- package/src/utils/clearCheckpoint.js +0 -7
- package/src/utils/commandValidator.js +0 -45
- package/src/utils/contextRaw.js +0 -18
- package/src/utils/contextSidebarNavigation.js +0 -16
- package/src/utils/contextTurns.js +0 -117
- package/src/utils/displayScaleHelper.js +0 -47
- package/src/utils/effectiveModel.js +0 -17
- package/src/utils/entry-slim.js +0 -563
- package/src/utils/entryCache.js +0 -144
- package/src/utils/errorReport.js +0 -6
- package/src/utils/fileExpandedPathsStorage.js +0 -70
- package/src/utils/fileIcons.jsx +0 -36
- package/src/utils/fileOpen.js +0 -37
- package/src/utils/formatters.js +0 -48
- package/src/utils/gitApi.js +0 -50
- package/src/utils/gitTreeBuilder.js +0 -19
- package/src/utils/helpers.js +0 -854
- package/src/utils/identityHeal.js +0 -108
- package/src/utils/imConnState.js +0 -59
- package/src/utils/imOrigin.js +0 -24
- package/src/utils/imTr.js +0 -7
- package/src/utils/imageCompress.js +0 -83
- package/src/utils/imageDownscale.js +0 -28
- package/src/utils/imageResize.js +0 -112
- package/src/utils/ingestPipeline.js +0 -47
- package/src/utils/isProxyMode.js +0 -11
- package/src/utils/lazyWithReload.js +0 -53
- package/src/utils/markdown.js +0 -30
- package/src/utils/markdownIncremental.js +0 -39
- package/src/utils/markdownProfiler.js +0 -113
- package/src/utils/mdExtensionDetect.js +0 -64
- package/src/utils/memoryLinkParser.js +0 -44
- package/src/utils/modalMask.js +0 -15
- package/src/utils/modelSuggestions.js +0 -48
- package/src/utils/monotime.js +0 -6
- package/src/utils/pinnedMenu.js +0 -55
- package/src/utils/presetShortcuts.js +0 -14
- package/src/utils/projectAlias.js +0 -135
- package/src/utils/promptClassifier.js +0 -112
- package/src/utils/promptDetect.js +0 -196
- package/src/utils/promptNav.js +0 -60
- package/src/utils/ptyChunkBuilder.js +0 -251
- package/src/utils/quickMenuHoverIntent.js +0 -35
- package/src/utils/rateLimitParser.js +0 -119
- package/src/utils/readResultPool.js +0 -106
- package/src/utils/refreshCachedItemProp.js +0 -30
- package/src/utils/resizeCalc.js +0 -21
- package/src/utils/resolveLocalized.js +0 -17
- package/src/utils/searchApi.js +0 -47
- package/src/utils/searchReplace.js +0 -51
- package/src/utils/seqResourceLoaders.js +0 -79
- package/src/utils/sessionManager.js +0 -482
- package/src/utils/sessionMerge.js +0 -239
- package/src/utils/skillModalController.js +0 -111
- package/src/utils/skillsParser.js +0 -116
- package/src/utils/slashCommandLabels.js +0 -80
- package/src/utils/splitDragCalc.js +0 -73
- package/src/utils/stickyBottomController.js +0 -643
- package/src/utils/svgSanitize.js +0 -48
- package/src/utils/systemTags.js +0 -47
- package/src/utils/tClaude.js +0 -20
- package/src/utils/teamModalBuilder.js +0 -351
- package/src/utils/teamSessionParser.js +0 -190
- package/src/utils/teammateAvatars.js +0 -194
- package/src/utils/termDiag.js +0 -114
- package/src/utils/terminalClipboard.js +0 -117
- package/src/utils/terminalWriteQueue.js +0 -398
- package/src/utils/thinkingMerge.js +0 -49
- package/src/utils/toolCatalog.js +0 -29
- package/src/utils/toolResultBuilder.js +0 -411
- package/src/utils/toolResultClassifier.js +0 -16
- package/src/utils/toolResultCore.js +0 -194
- package/src/utils/toolsDiff.js +0 -44
- package/src/utils/toolsXmlFormatter.js +0 -3
- package/src/utils/ultraplanController.js +0 -109
- package/src/utils/ultraplanExperts.js +0 -86
- package/src/utils/ultraplanTemplates.js +0 -154
- package/src/utils/userImageRefs.js +0 -49
- package/src/utils/v3Assembler.js +0 -125
- package/src/utils/v3Rows.js +0 -49
- package/src/utils/voicePackPlayer.js +0 -233
- package/src/utils/webSearchGrouping.js +0 -111
- package/src/utils/workflowFormat.js +0 -52
- package/src/utils/workflowRuns.js +0 -118
- package/src/utils/workflowStore.js +0 -94
- /package/{src/utils → node_modules/@ccv/core/src}/requestType.js +0 -0
- /package/server/lib/{ask-bridge.js → ask/ask-bridge.js} +0 -0
- /package/server/lib/{ask-constants.js → ask/ask-constants.js} +0 -0
- /package/server/lib/{ask-reaper.js → ask/ask-reaper.js} +0 -0
- /package/server/lib/{dingtalk-config.js → im/dingtalk-config.js} +0 -0
- /package/server/lib/{im-log-watcher.js → im/im-log-watcher.js} +0 -0
- /package/server/lib/{proxy-env.js → proxy/proxy-env.js} +0 -0
- /package/server/lib/{proxy-errors.js → proxy/proxy-errors.js} +0 -0
|
@@ -1,643 +0,0 @@
|
|
|
1
|
-
// StickyBottomController — vanilla JS controller for ChatView 流式吸底状态机
|
|
2
|
-
//
|
|
3
|
-
// 收敛 7 处独立 scrollTop 写入与 3 套并行吸底机制到单一权威路径。
|
|
4
|
-
// 关键不变量:_lockDepth >= 0;dispose 后 _lockDepth === 0 且不再变化。
|
|
5
|
-
// 详见 /Users/sky/.claude/plans/modular-floating-hopper.md (v2.1)。
|
|
6
|
-
//
|
|
7
|
-
// 用户滚动优先(user-scroll intent 暂停窗口):
|
|
8
|
-
// scroll 事件分不清「用户滚」还是「程序滚」,只能靠 _lockDepth 屏蔽——但 SSE 流式期间
|
|
9
|
-
// startSmoothFollow 的缓动链被高频重启、锁几乎常驻,用户上滑信号全被吃掉,困死在吸底态。
|
|
10
|
-
// 解法:直接监听不可伪造的用户输入(wheel / touch / pointer 拖动),进入「用户滚动中」
|
|
11
|
-
// 暂停窗口:窗口内一切自动追底(缓动 / RO 跟底 / 新消息硬贴底)停摆,sticky 随阈值实时
|
|
12
|
-
// 翻转;最后一次输入后 userScrollIdleMs(默认 300ms)判定停手,做一次终判并恢复追底。
|
|
13
|
-
// 详见 /Users/sky/.claude/plans/snug-purring-wadler.md。
|
|
14
|
-
|
|
15
|
-
const NOOP = () => {};
|
|
16
|
-
const DEFAULT_THRESHOLD_ENTER = 10;
|
|
17
|
-
const DEFAULT_THRESHOLD_LEAVE = 50;
|
|
18
|
-
// Virtuoso 路径下 footer 子树(lastResponse / spinner / streamingLiveItem 三段)高度抖动会让
|
|
19
|
-
// Virtuoso 内部的 atBottom 误判翻转。匹配 Virtuoso atBottomThreshold:60,notifyAtBottom 用此值
|
|
20
|
-
// 兜底:仅当真实 DOM 距离 > 60px 才信任 atBottom=false 翻 sticky。
|
|
21
|
-
const DEFAULT_AT_BOTTOM_PX = 60;
|
|
22
|
-
// _setSticky 决策去重窗口(ms):同 rAF tick 内 RO + Virtuoso atBottomStateChange 双发时合并。
|
|
23
|
-
// 选 16ms 对齐 60Hz 一帧;高刷屏(120Hz/144Hz)下相当于 2 帧,可能压制合法翻转——若实测有手感
|
|
24
|
-
// 问题可改 8ms 或动态读 screen.refreshRate(P2 backlog,待手动验证)。
|
|
25
|
-
const STICKY_DECISION_DEDUP_MS = 16;
|
|
26
|
-
|
|
27
|
-
// 平滑追底(startSmoothFollow → step)的帧率节流间隔(ms)。
|
|
28
|
-
// step 缓动本会跟随 rAF 跑满显示器刷新率——120Hz ProMotion 屏上 ~120fps,每帧读写 scrollTop
|
|
29
|
-
// 触发一次 forced reflow(trace 实测 get/set scrollTop 是 #1 JS 热点 + 229 Layout/s)。
|
|
30
|
-
// 流式追底肉眼无需如此密集:门控到 ~30fps(33ms)即与刷新率解耦、视觉等效,主线程 layout/paint
|
|
31
|
-
// 负载降 ~4×。可经 opts.smoothFollowMinFrameMs 调整(设 0 = 关闭节流,恢复每帧)。
|
|
32
|
-
const DEFAULT_SMOOTH_FOLLOW_MIN_FRAME_MS = 33;
|
|
33
|
-
|
|
34
|
-
// 用户停手判定空窗(ms):最后一次用户输入(wheel/touch/pointer 拖动)后超过此时长视为停手,
|
|
35
|
-
// 触发终判并恢复自动追底。触控板惯性 wheel 事件流与 momentum scroll 事件会持续刷新窗口。
|
|
36
|
-
const DEFAULT_USER_SCROLL_IDLE_MS = 300;
|
|
37
|
-
// pointer 拖动资格判定(slop):pointerdown 后位移超过此值才算「拖动」开窗。纯点击(展开
|
|
38
|
-
// 工具结果 / 复制 / 加载更早)零位移,不开窗——否则每次点击都暂停追底 300ms,且点击展开
|
|
39
|
-
// 导致内容长高 >thresholdLeave 时会被终判误降级踢出吸底。
|
|
40
|
-
const POINTER_DRAG_SLOP_PX = 5;
|
|
41
|
-
|
|
42
|
-
export class StickyBottomController {
|
|
43
|
-
constructor(opts = {}) {
|
|
44
|
-
this._getSticky = opts.getSticky || (() => false);
|
|
45
|
-
this._setStickyExternal = opts.setSticky || NOOP;
|
|
46
|
-
this._getMode = opts.getMode || (() => 'desktop');
|
|
47
|
-
this._thresholdEnter = opts.thresholdEnter ?? DEFAULT_THRESHOLD_ENTER;
|
|
48
|
-
this._thresholdLeave = opts.thresholdLeave ?? DEFAULT_THRESHOLD_LEAVE;
|
|
49
|
-
// 兼容映射:旧 touchSuppressMs 语义被统一空窗超集覆盖;显式传入且未传 userScrollIdleMs
|
|
50
|
-
// 时沿用其值(?? 保证 0 这种合法值不被默认值吞掉)。
|
|
51
|
-
this._userScrollIdleMs = opts.userScrollIdleMs ?? opts.touchSuppressMs ?? DEFAULT_USER_SCROLL_IDLE_MS;
|
|
52
|
-
this._atBottomPx = opts.atBottomPx ?? DEFAULT_AT_BOTTOM_PX;
|
|
53
|
-
this._smoothFollowMinFrameMs = opts.smoothFollowMinFrameMs ?? DEFAULT_SMOOTH_FOLLOW_MIN_FRAME_MS;
|
|
54
|
-
this._now = opts.now || (() => Date.now());
|
|
55
|
-
// 定时器可注入(与 opts.now 对称):测试单一时钟源,避免 fake-timer 双钟漂移
|
|
56
|
-
this._setTimeout = opts.setTimeout || ((fn, ms) => setTimeout(fn, ms));
|
|
57
|
-
this._clearTimeout = opts.clearTimeout || ((id) => clearTimeout(id));
|
|
58
|
-
this._onUserScrollChange = opts.onUserScrollChange || NOOP;
|
|
59
|
-
|
|
60
|
-
this._lockDepth = 0;
|
|
61
|
-
this._smoothLockHeld = false;
|
|
62
|
-
this._followTarget = 0;
|
|
63
|
-
this._smoothFollowRafId = null;
|
|
64
|
-
this._scrollHandlerRafId = null;
|
|
65
|
-
// Set 而非 Array:流式高频 writeUnderLock 时 add/delete 都 O(1);Array.filter 是 O(n)
|
|
66
|
-
// 累积成 O(n²) 帧成本,是 perf-auditor 找出的 P0 内存泄漏路径。
|
|
67
|
-
this._writeLockRafIds = new Set();
|
|
68
|
-
this._resizeObserver = null;
|
|
69
|
-
this._boundEl = null;
|
|
70
|
-
this._touchListenersAttached = false;
|
|
71
|
-
// 决策去重快照:拆为两字段而非 { value, ts } 对象,避免 _setSticky 高频调用时重复 GC
|
|
72
|
-
this._lastStickyValue = null; // boolean | null(null = 尚无决策)
|
|
73
|
-
this._lastStickyTs = 0;
|
|
74
|
-
this._disposed = false;
|
|
75
|
-
|
|
76
|
-
// ── 用户滚动意图状态 ──
|
|
77
|
-
// _pointerHold / _touchHold 必须是两个独立布尔:触摸设备浏览器接管滚动时会发
|
|
78
|
-
// pointercancel,单布尔会被它误清掉 touch 的 hold → 手指按住不动 >空窗 即被终判拽底。
|
|
79
|
-
this._pointerHold = false;
|
|
80
|
-
this._touchHold = false;
|
|
81
|
-
this._pointerTracking = false; // pointerdown 已发生、等待 slop 升级
|
|
82
|
-
this._pointerDownX = 0;
|
|
83
|
-
this._pointerDownY = 0;
|
|
84
|
-
this._touchSession = false; // touchstart 已发生(区分测试直调 _onTouchEnd 的旧路径)
|
|
85
|
-
this._touchMoved = false; // touchstart 后是否有 touchmove(tap 判定)
|
|
86
|
-
this._touchIgnored = false; // touchstart 落在容器外(横滑代码块/DiffView 等),整段序列不开窗
|
|
87
|
-
this._lastUserIntentTs = 0; // 0 = 从未有过意图
|
|
88
|
-
this._userIdleTimer = null;
|
|
89
|
-
this._userScrollActive = false; // 窗口开/关沿(onUserScrollChange 去抖)
|
|
90
|
-
|
|
91
|
-
this._onScroll = () => {
|
|
92
|
-
if (this._disposed) return;
|
|
93
|
-
if (this._lockDepth > 0) return;
|
|
94
|
-
this._extendMomentumWindow();
|
|
95
|
-
this._scheduleStickyDecision();
|
|
96
|
-
};
|
|
97
|
-
|
|
98
|
-
// virtuoso 模式的轻量 scroll 监听:仅做 momentum 延展(安卓 fling 惯性常超空窗,无延展
|
|
99
|
-
// 会在惯性中被终判补追杀掉 fling),不做 sticky 决策——决策权威仍是 notifyAtBottom。
|
|
100
|
-
this._onVirtuosoScroll = () => {
|
|
101
|
-
if (this._disposed) return;
|
|
102
|
-
if (this._lockDepth > 0) return;
|
|
103
|
-
this._extendMomentumWindow();
|
|
104
|
-
};
|
|
105
|
-
|
|
106
|
-
this._onWheel = (e) => {
|
|
107
|
-
if (this._disposed) return;
|
|
108
|
-
const dy = (e && typeof e.deltaY === 'number') ? e.deltaY : 0;
|
|
109
|
-
// 上滚恒为意图;下滚仅在未吸底时算意图(贴底下滚无位移可言,不为此打断追底)
|
|
110
|
-
if (dy < 0 || !this._getSticky()) this._noteUserIntent();
|
|
111
|
-
};
|
|
112
|
-
|
|
113
|
-
this._onPointerDown = (e) => {
|
|
114
|
-
if (this._disposed) return;
|
|
115
|
-
if (e && e.pointerType === 'touch') return; // 触摸由 touch 通道负责
|
|
116
|
-
const el = this._boundEl;
|
|
117
|
-
// 纵向滚动条区域按下(offsetX 超出 clientWidth):滚动条拖动期间浏览器不派发
|
|
118
|
-
// pointermove 给页面,slop 升级不可用 → 直接按时间戳开窗,拖动产生的 scroll 事件
|
|
119
|
-
// 经 momentum 延展续窗。
|
|
120
|
-
if (el && e && e.target === el && typeof e.offsetX === 'number'
|
|
121
|
-
&& typeof el.clientWidth === 'number' && e.offsetX >= el.clientWidth) {
|
|
122
|
-
this._noteUserIntent();
|
|
123
|
-
return;
|
|
124
|
-
}
|
|
125
|
-
this._pointerTracking = true;
|
|
126
|
-
this._pointerDownX = (e && typeof e.clientX === 'number') ? e.clientX : 0;
|
|
127
|
-
this._pointerDownY = (e && typeof e.clientY === 'number') ? e.clientY : 0;
|
|
128
|
-
};
|
|
129
|
-
|
|
130
|
-
this._onPointerMove = (e) => {
|
|
131
|
-
if (this._disposed) return;
|
|
132
|
-
if (e && e.pointerType === 'touch') return;
|
|
133
|
-
if (!this._pointerTracking || this._pointerHold) return;
|
|
134
|
-
const dx = ((e && typeof e.clientX === 'number') ? e.clientX : 0) - this._pointerDownX;
|
|
135
|
-
const dy = ((e && typeof e.clientY === 'number') ? e.clientY : 0) - this._pointerDownY;
|
|
136
|
-
if ((dx * dx + dy * dy) > POINTER_DRAG_SLOP_PX * POINTER_DRAG_SLOP_PX) {
|
|
137
|
-
this._pointerHold = true; // slop 达标:拖滚动条外的内容拖动(选文本等)
|
|
138
|
-
this._noteUserIntent({ setTs: false }); // hold 本身即意图,时间戳等释放时再记
|
|
139
|
-
}
|
|
140
|
-
};
|
|
141
|
-
|
|
142
|
-
this._onPointerUp = (e) => {
|
|
143
|
-
if (this._disposed) return;
|
|
144
|
-
if (e && e.pointerType === 'touch') return;
|
|
145
|
-
this._pointerTracking = false;
|
|
146
|
-
if (!this._pointerHold) return; // 纯点击从未开窗,无事可做
|
|
147
|
-
this._pointerHold = false;
|
|
148
|
-
this._lastUserIntentTs = this._now();
|
|
149
|
-
this._armUserIdleTimer();
|
|
150
|
-
};
|
|
151
|
-
|
|
152
|
-
this._onTouchStart = (ev) => {
|
|
153
|
-
if (this._disposed) return;
|
|
154
|
-
// 容器子树过滤:touch 监听挂在 document,横滑代码块/DiffView、滑 RoleFilterBar 等
|
|
155
|
-
// 「非滚 chat」的触摸不应暂停追底。事件无 target(测试直调)时跳过过滤,保持旧语义。
|
|
156
|
-
const el = this._boundEl;
|
|
157
|
-
if (el && ev && ev.target && typeof el.contains === 'function' && !el.contains(ev.target)) {
|
|
158
|
-
this._touchIgnored = true;
|
|
159
|
-
return;
|
|
160
|
-
}
|
|
161
|
-
this._touchIgnored = false;
|
|
162
|
-
this._touchSession = true;
|
|
163
|
-
this._touchMoved = false;
|
|
164
|
-
this._touchHold = true;
|
|
165
|
-
this._noteUserIntent({ setTs: false });
|
|
166
|
-
};
|
|
167
|
-
|
|
168
|
-
this._onTouchMove = () => {
|
|
169
|
-
if (this._touchHold) this._touchMoved = true;
|
|
170
|
-
};
|
|
171
|
-
|
|
172
|
-
this._onTouchEnd = () => {
|
|
173
|
-
if (this._disposed) return;
|
|
174
|
-
if (this._touchIgnored) { this._touchIgnored = false; return; } // 容器外序列整段忽略
|
|
175
|
-
const wasSession = this._touchSession;
|
|
176
|
-
const moved = this._touchMoved;
|
|
177
|
-
this._touchSession = false;
|
|
178
|
-
this._touchHold = false;
|
|
179
|
-
if (wasSession && !moved) {
|
|
180
|
-
// 纯 tap(点展开/复制等):不起空窗,立即关窗,RO 跟底不中断
|
|
181
|
-
this._lastUserIntentTs = 0;
|
|
182
|
-
this._cancelUserIdleTimer();
|
|
183
|
-
if (!this.isUserScrolling()) this._setUserScrollActive(false);
|
|
184
|
-
return;
|
|
185
|
-
}
|
|
186
|
-
// 拖动结束(或测试直调 _onTouchEnd 的旧 touch 抑制路径):起空窗计时
|
|
187
|
-
this._lastUserIntentTs = this._now();
|
|
188
|
-
this._armUserIdleTimer();
|
|
189
|
-
};
|
|
190
|
-
|
|
191
|
-
// pointerup 丢失兜底(alt-tab、原生右键菜单等场景收不到 up):hold 永挂 = 追底永久死亡
|
|
192
|
-
this._onWindowBlur = () => {
|
|
193
|
-
if (this._disposed) return;
|
|
194
|
-
if (!this._pointerHold && !this._touchHold && !this._pointerTracking) return;
|
|
195
|
-
this._pointerHold = false;
|
|
196
|
-
this._touchHold = false;
|
|
197
|
-
this._pointerTracking = false;
|
|
198
|
-
this._touchSession = false;
|
|
199
|
-
this._lastUserIntentTs = this._now();
|
|
200
|
-
this._armUserIdleTimer();
|
|
201
|
-
};
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
_raf(fn) {
|
|
205
|
-
if (typeof globalThis.requestAnimationFrame === 'function') {
|
|
206
|
-
return globalThis.requestAnimationFrame(fn);
|
|
207
|
-
}
|
|
208
|
-
// SSR / 缺失 rAF 环境:setTimeout 0 兜底(同步语义不可恢复,但至少不挂死)
|
|
209
|
-
return setTimeout(fn, 0);
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
_cancelRaf(id) {
|
|
213
|
-
if (id == null) return;
|
|
214
|
-
if (typeof globalThis.cancelAnimationFrame === 'function') {
|
|
215
|
-
try { globalThis.cancelAnimationFrame(id); } catch {}
|
|
216
|
-
} else {
|
|
217
|
-
try { clearTimeout(id); } catch {}
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
_setSticky(value) {
|
|
222
|
-
if (this._disposed) return;
|
|
223
|
-
const ts = this._now();
|
|
224
|
-
if (this._lastStickyValue === value && (ts - this._lastStickyTs) < STICKY_DECISION_DEDUP_MS) {
|
|
225
|
-
return;
|
|
226
|
-
}
|
|
227
|
-
this._lastStickyValue = value;
|
|
228
|
-
this._lastStickyTs = ts;
|
|
229
|
-
try { this._setStickyExternal(value); } catch {}
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
// ── 用户滚动意图机制 ──────────────────────────────────────────────────────
|
|
233
|
-
|
|
234
|
-
// 统一意图入口:wheel / touchstart / pointer 拖动达标 / 滚动条按下 都汇到这里。
|
|
235
|
-
// setTs=false 用于 hold 型意图(按住期间 isUserScrolling 由 hold 撑着,时间戳等释放再记,
|
|
236
|
-
// 这样纯 tap 可以无痕撤销、不留 300ms 尾巴)。
|
|
237
|
-
_noteUserIntent({ setTs = true } = {}) {
|
|
238
|
-
if (this._disposed) return;
|
|
239
|
-
if (setTs) this._lastUserIntentTs = this._now();
|
|
240
|
-
// 逃逸关键步:同步释放缓动锁,让紧随其后的 scroll / atBottomStateChange 信号不再被锁吃掉
|
|
241
|
-
this.cancelSmoothFollow();
|
|
242
|
-
this._setUserScrollActive(true);
|
|
243
|
-
this._armUserIdleTimer();
|
|
244
|
-
// 主动调度一次决策 rAF(绕过事件层锁检查):意图可能恰落在 writeUnderLock 双 rAF 残留
|
|
245
|
-
// 锁(≤2 帧)内,首批 scroll 事件被吞——主动决策保证「上滑立刻显示按钮」真正立刻。
|
|
246
|
-
this._scheduleStickyDecision();
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
// 窗口开/关沿(去抖:仅翻转沿发回调)。故意不查 _disposed:dispose 路径也要把关沿发出去,
|
|
250
|
-
// 保证不变量「dispose 后 _userScrollActive === false 且关沿回调已发」(宿主有 _unmounted 兜底)。
|
|
251
|
-
_setUserScrollActive(active) {
|
|
252
|
-
if (this._userScrollActive === active) return;
|
|
253
|
-
this._userScrollActive = active;
|
|
254
|
-
try { this._onUserScrollChange(active); } catch {}
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
// 自检重排定时器:armed 即不动(高频 wheel 只刷时间戳零 churn),到点时不满空窗按剩余重排
|
|
258
|
-
_armUserIdleTimer() {
|
|
259
|
-
if (this._userIdleTimer != null) return;
|
|
260
|
-
this._userIdleTimer = this._setTimeout(() => {
|
|
261
|
-
this._userIdleTimer = null;
|
|
262
|
-
this._onUserIdle();
|
|
263
|
-
}, this._userScrollIdleMs);
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
_cancelUserIdleTimer() {
|
|
267
|
-
if (this._userIdleTimer == null) return;
|
|
268
|
-
try { this._clearTimeout(this._userIdleTimer); } catch {}
|
|
269
|
-
this._userIdleTimer = null;
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
// 停手终判:用户停止手动滚动后按位置重新判定 sticky,并在吸底时恢复追底补欠距
|
|
273
|
-
_onUserIdle() {
|
|
274
|
-
if (this._disposed) return;
|
|
275
|
-
// hold 中到点:不重排(剩余时间为负会 setTimeout(0) 自旋),靠 pointerup/touchend 接力 re-arm
|
|
276
|
-
if (this._pointerHold || this._touchHold) return;
|
|
277
|
-
const elapsed = this._now() - this._lastUserIntentTs;
|
|
278
|
-
if (this._lastUserIntentTs > 0 && elapsed < this._userScrollIdleMs) {
|
|
279
|
-
this._userIdleTimer = this._setTimeout(() => {
|
|
280
|
-
this._userIdleTimer = null;
|
|
281
|
-
this._onUserIdle();
|
|
282
|
-
}, Math.max(0, this._userScrollIdleMs - elapsed));
|
|
283
|
-
return;
|
|
284
|
-
}
|
|
285
|
-
const el = this._boundEl;
|
|
286
|
-
if (!el) {
|
|
287
|
-
// 无绑定元素也必须关沿,否则宿主 userScrolling 永真、followOutput 永久残废
|
|
288
|
-
this._setUserScrollActive(false);
|
|
289
|
-
return;
|
|
290
|
-
}
|
|
291
|
-
this.refreshFollowTarget(el);
|
|
292
|
-
// 终判按模式分流:desktop 用 enter/leave 滞回;virtuoso 用 atBottomPx 单边界——
|
|
293
|
-
// 否则 gap∈(thresholdLeave, atBottomPx] 区间终判翻 false 会被下一次 Virtuoso
|
|
294
|
-
// atBottomStateChange(true) 强行推翻、用户被拽回。
|
|
295
|
-
let sticky = this._getSticky();
|
|
296
|
-
if (this._getMode() === 'virtuoso') {
|
|
297
|
-
const realGap = (el.scrollHeight ?? 0) - (el.scrollTop ?? 0) - (el.clientHeight ?? 0);
|
|
298
|
-
if (Number.isFinite(realGap)) sticky = realGap <= this._atBottomPx;
|
|
299
|
-
} else {
|
|
300
|
-
const gap = this._followTarget - (el.scrollTop ?? 0);
|
|
301
|
-
if (gap <= this._thresholdEnter) sticky = true;
|
|
302
|
-
else if (gap > this._thresholdLeave) sticky = false;
|
|
303
|
-
// 中间带:维持现状
|
|
304
|
-
}
|
|
305
|
-
this._setSticky(sticky);
|
|
306
|
-
this._setUserScrollActive(false);
|
|
307
|
-
if (sticky) this.startSmoothFollow(el);
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
// sticky 决策(rAF 防抖统一通道):_onScroll 事件路径与 _noteUserIntent 主动路径共用
|
|
311
|
-
_scheduleStickyDecision() {
|
|
312
|
-
if (this._scrollHandlerRafId !== null) return;
|
|
313
|
-
this._scrollHandlerRafId = this._raf(() => {
|
|
314
|
-
this._scrollHandlerRafId = null;
|
|
315
|
-
if (this._disposed) return;
|
|
316
|
-
const el = this._boundEl;
|
|
317
|
-
if (!el) return;
|
|
318
|
-
// 窗口内缓动停摆、_followTarget 无人保鲜,内容长高时用冻结值会造成「滚回旧底部
|
|
319
|
-
// sticky 闪现又被终判翻回」的按钮闪烁——决策前刷新(成本与 30fps 缓动同阶,仅交互期)
|
|
320
|
-
if (this.isUserScrolling()) this.refreshFollowTarget(el);
|
|
321
|
-
const sticky = this._getSticky();
|
|
322
|
-
if (this._getMode() === 'virtuoso') {
|
|
323
|
-
// virtuoso 用与 notifyAtBottom 真值修正层一致的 60px 单边界,避免双权威打架
|
|
324
|
-
const realGap = (el.scrollHeight ?? 0) - (el.scrollTop ?? 0) - (el.clientHeight ?? 0);
|
|
325
|
-
if (!Number.isFinite(realGap)) return;
|
|
326
|
-
if (sticky && realGap > this._atBottomPx) this._setSticky(false);
|
|
327
|
-
else if (!sticky && realGap <= this._atBottomPx) this._setSticky(true);
|
|
328
|
-
return;
|
|
329
|
-
}
|
|
330
|
-
const gap = this._followTarget - el.scrollTop;
|
|
331
|
-
if (sticky && gap > this._thresholdLeave) {
|
|
332
|
-
this._setSticky(false);
|
|
333
|
-
} else if (!sticky && gap <= this._thresholdEnter) {
|
|
334
|
-
this._setSticky(true);
|
|
335
|
-
}
|
|
336
|
-
});
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
// 松手惯性期续窗:窗口活跃且非按住时,scroll 事件刷新意图时间戳(hold 期由 hold 自己撑窗)。
|
|
340
|
-
// 调用方必须先过 _lockDepth 检查——程序滚在锁内短路,不会误延展。
|
|
341
|
-
_extendMomentumWindow() {
|
|
342
|
-
if (this._pointerHold || this._touchHold) return;
|
|
343
|
-
if (this._lastUserIntentTs <= 0) return;
|
|
344
|
-
if ((this._now() - this._lastUserIntentTs) >= this._userScrollIdleMs) return;
|
|
345
|
-
this._lastUserIntentTs = this._now();
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
// 是否处于「用户滚动中」窗口:hold 撑着,或最后一次意图在空窗内。
|
|
349
|
-
// _lastUserIntentTs > 0 臂必须保留(「从未有过意图」→ false,小时钟注入下依赖)。
|
|
350
|
-
isUserScrolling() {
|
|
351
|
-
if (this._pointerHold || this._touchHold) return true;
|
|
352
|
-
if (this._lastUserIntentTs <= 0) return false;
|
|
353
|
-
return (this._now() - this._lastUserIntentTs) < this._userScrollIdleMs;
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
// 旧名薄别名(touch 抑制语义已被统一空窗超集覆盖;既有测试直调此名)
|
|
357
|
-
_isWithinTouchSuppress() { return this.isUserScrolling(); }
|
|
358
|
-
|
|
359
|
-
// 显式动作(「回到底部」按钮、移动端面板切换)清除用户滚动窗口:用户明确要贴底,
|
|
360
|
-
// 残留窗口不应再抑制任何自动追底
|
|
361
|
-
resetUserScrollState() {
|
|
362
|
-
this._pointerHold = false;
|
|
363
|
-
this._touchHold = false;
|
|
364
|
-
this._pointerTracking = false;
|
|
365
|
-
this._touchSession = false;
|
|
366
|
-
this._touchMoved = false;
|
|
367
|
-
this._touchIgnored = false;
|
|
368
|
-
this._lastUserIntentTs = 0;
|
|
369
|
-
this._cancelUserIdleTimer();
|
|
370
|
-
this._setUserScrollActive(false);
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
// ── 生命周期 ──────────────────────────────────────────────────────────────
|
|
374
|
-
|
|
375
|
-
_attachTouchListenersOnce() {
|
|
376
|
-
if (this._touchListenersAttached) return;
|
|
377
|
-
if (typeof document === 'undefined' || typeof document.addEventListener !== 'function') return;
|
|
378
|
-
this._touchListenersAttached = true;
|
|
379
|
-
try { document.addEventListener('touchstart', this._onTouchStart, { passive: true }); } catch {}
|
|
380
|
-
try { document.addEventListener('touchmove', this._onTouchMove, { passive: true }); } catch {}
|
|
381
|
-
try { document.addEventListener('touchend', this._onTouchEnd, { passive: true }); } catch {}
|
|
382
|
-
try { document.addEventListener('touchcancel', this._onTouchEnd, { passive: true }); } catch {}
|
|
383
|
-
try { document.addEventListener('pointerup', this._onPointerUp, { passive: true }); } catch {}
|
|
384
|
-
try { document.addEventListener('pointercancel', this._onPointerUp, { passive: true }); } catch {}
|
|
385
|
-
if (typeof window !== 'undefined' && typeof window.addEventListener === 'function') {
|
|
386
|
-
try { window.addEventListener('blur', this._onWindowBlur); } catch {}
|
|
387
|
-
}
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
_detachTouchListeners() {
|
|
391
|
-
if (!this._touchListenersAttached) return;
|
|
392
|
-
if (typeof document === 'undefined' || typeof document.removeEventListener !== 'function') return;
|
|
393
|
-
try { document.removeEventListener('touchstart', this._onTouchStart); } catch {}
|
|
394
|
-
try { document.removeEventListener('touchmove', this._onTouchMove); } catch {}
|
|
395
|
-
try { document.removeEventListener('touchend', this._onTouchEnd); } catch {}
|
|
396
|
-
try { document.removeEventListener('touchcancel', this._onTouchEnd); } catch {}
|
|
397
|
-
try { document.removeEventListener('pointerup', this._onPointerUp); } catch {}
|
|
398
|
-
try { document.removeEventListener('pointercancel', this._onPointerUp); } catch {}
|
|
399
|
-
if (typeof window !== 'undefined' && typeof window.removeEventListener === 'function') {
|
|
400
|
-
try { window.removeEventListener('blur', this._onWindowBlur); } catch {}
|
|
401
|
-
}
|
|
402
|
-
this._touchListenersAttached = false;
|
|
403
|
-
}
|
|
404
|
-
|
|
405
|
-
bind(el) {
|
|
406
|
-
if (this._disposed) return;
|
|
407
|
-
if (el === this._boundEl) return; // idempotent
|
|
408
|
-
if (this._boundEl) this._detachFromBoundEl();
|
|
409
|
-
this._boundEl = el || null;
|
|
410
|
-
if (!el) return;
|
|
411
|
-
const mode = this._getMode();
|
|
412
|
-
if (mode !== 'virtuoso') {
|
|
413
|
-
try { el.addEventListener('scroll', this._onScroll, { passive: true }); } catch {}
|
|
414
|
-
} else {
|
|
415
|
-
try { el.addEventListener('scroll', this._onVirtuosoScroll, { passive: true }); } catch {}
|
|
416
|
-
}
|
|
417
|
-
try { el.addEventListener('wheel', this._onWheel, { passive: true }); } catch {}
|
|
418
|
-
try { el.addEventListener('pointerdown', this._onPointerDown, { passive: true }); } catch {}
|
|
419
|
-
try { el.addEventListener('pointermove', this._onPointerMove, { passive: true }); } catch {}
|
|
420
|
-
if (typeof ResizeObserver !== 'undefined') {
|
|
421
|
-
try {
|
|
422
|
-
this._resizeObserver = new ResizeObserver(() => this.handleScrollerResize(el));
|
|
423
|
-
this._resizeObserver.observe(el);
|
|
424
|
-
} catch {}
|
|
425
|
-
}
|
|
426
|
-
this.refreshFollowTarget(el);
|
|
427
|
-
this._attachTouchListenersOnce();
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
_detachFromBoundEl() {
|
|
431
|
-
const el = this._boundEl;
|
|
432
|
-
if (!el) return;
|
|
433
|
-
try { el.removeEventListener('scroll', this._onScroll); } catch {}
|
|
434
|
-
try { el.removeEventListener('scroll', this._onVirtuosoScroll); } catch {}
|
|
435
|
-
try { el.removeEventListener('wheel', this._onWheel); } catch {}
|
|
436
|
-
try { el.removeEventListener('pointerdown', this._onPointerDown); } catch {}
|
|
437
|
-
try { el.removeEventListener('pointermove', this._onPointerMove); } catch {}
|
|
438
|
-
if (this._resizeObserver) {
|
|
439
|
-
try { this._resizeObserver.disconnect(); } catch {}
|
|
440
|
-
this._resizeObserver = null;
|
|
441
|
-
}
|
|
442
|
-
this._boundEl = null;
|
|
443
|
-
// 换绑/解绑(Virtuoso 卸载走 bind(null),不经 unbind)必须:
|
|
444
|
-
// ① 取消缓动链并释放其锁——只 cancel rAF 不 release 会留下孤儿锁(_lockDepth 卡 1),
|
|
445
|
-
// 在重新 bind 前堵死 _onScroll/notifyAtBottom/RO 三条决策入口;
|
|
446
|
-
// ② 复位用户滚动窗口——否则定时器带着 null el 到点、userScrolling 开沿永不关闭。
|
|
447
|
-
this.cancelSmoothFollow();
|
|
448
|
-
this.resetUserScrollState();
|
|
449
|
-
}
|
|
450
|
-
|
|
451
|
-
unbind() {
|
|
452
|
-
this.cancelSmoothFollow(); // _boundEl 已空时 _detachFromBoundEl 早退,孤儿锁在此兜底释放
|
|
453
|
-
this._detachFromBoundEl();
|
|
454
|
-
this.resetUserScrollState();
|
|
455
|
-
if (this._scrollHandlerRafId !== null) {
|
|
456
|
-
this._cancelRaf(this._scrollHandlerRafId);
|
|
457
|
-
this._scrollHandlerRafId = null;
|
|
458
|
-
}
|
|
459
|
-
if (this._smoothFollowRafId !== null) {
|
|
460
|
-
this._cancelRaf(this._smoothFollowRafId);
|
|
461
|
-
this._smoothFollowRafId = null;
|
|
462
|
-
}
|
|
463
|
-
for (const id of this._writeLockRafIds) this._cancelRaf(id);
|
|
464
|
-
this._writeLockRafIds.clear();
|
|
465
|
-
}
|
|
466
|
-
|
|
467
|
-
dispose() {
|
|
468
|
-
if (this._disposed) return;
|
|
469
|
-
// 先关沿再置 _disposed:保证关沿回调发得出去(不变量:dispose 后 _userScrollActive===false)
|
|
470
|
-
this.resetUserScrollState();
|
|
471
|
-
this._disposed = true;
|
|
472
|
-
this.unbind();
|
|
473
|
-
this._detachTouchListeners();
|
|
474
|
-
this._lockDepth = 0;
|
|
475
|
-
this._smoothLockHeld = false;
|
|
476
|
-
}
|
|
477
|
-
|
|
478
|
-
isLocked() { return this._lockDepth > 0; }
|
|
479
|
-
|
|
480
|
-
refreshFollowTarget(el) {
|
|
481
|
-
if (this._disposed) return;
|
|
482
|
-
const target = el || this._boundEl;
|
|
483
|
-
if (!target) return;
|
|
484
|
-
const sh = target.scrollHeight ?? 0;
|
|
485
|
-
const ch = target.clientHeight ?? 0;
|
|
486
|
-
this._followTarget = Math.max(0, sh - ch);
|
|
487
|
-
}
|
|
488
|
-
|
|
489
|
-
// Single authoritative scrollTop write entry.
|
|
490
|
-
// 双 rAF 后 _lockDepth--。期间 _onScroll / RO writeUnderLock 都会被锁短路。
|
|
491
|
-
// 所有入参守卫(disposed / el / 类型 / 数值有限性)必须在 _lockDepth++ 之前完成,
|
|
492
|
-
// 防极端值(NaN/Infinity)/非法元素让 lock 白占一个 rAF 周期(防 DoS + 防御)。
|
|
493
|
-
// 注意:不查 isUserScrolling——这是显式动作(回到底部按钮等)的通道,必须保持畅通;
|
|
494
|
-
// 自动追底调用方各自把关。
|
|
495
|
-
writeUnderLock(el, target) {
|
|
496
|
-
if (this._disposed) return;
|
|
497
|
-
if (!el) return;
|
|
498
|
-
if (typeof el.scrollTop !== 'number') return;
|
|
499
|
-
if (!Number.isFinite(target)) return;
|
|
500
|
-
this._lockDepth++;
|
|
501
|
-
try { el.scrollTop = target; } catch {}
|
|
502
|
-
let inner = null;
|
|
503
|
-
const outer = this._raf(() => {
|
|
504
|
-
this._writeLockRafIds.delete(outer);
|
|
505
|
-
if (this._disposed) return;
|
|
506
|
-
inner = this._raf(() => {
|
|
507
|
-
this._writeLockRafIds.delete(inner);
|
|
508
|
-
if (this._disposed) return;
|
|
509
|
-
this._lockDepth = Math.max(0, this._lockDepth - 1);
|
|
510
|
-
});
|
|
511
|
-
if (inner != null) this._writeLockRafIds.add(inner);
|
|
512
|
-
});
|
|
513
|
-
if (outer != null) this._writeLockRafIds.add(outer);
|
|
514
|
-
}
|
|
515
|
-
|
|
516
|
-
// 单次锁短路一帧(handleLoadMore 桌面分支用:裸写 scrollTop 后让 RO fire 被吃掉)
|
|
517
|
-
suppressOnce() {
|
|
518
|
-
if (this._disposed) return;
|
|
519
|
-
this._lockDepth++;
|
|
520
|
-
const id = this._raf(() => {
|
|
521
|
-
this._writeLockRafIds.delete(id);
|
|
522
|
-
if (this._disposed) return;
|
|
523
|
-
this._lockDepth = Math.max(0, this._lockDepth - 1);
|
|
524
|
-
});
|
|
525
|
-
if (id != null) this._writeLockRafIds.add(id);
|
|
526
|
-
}
|
|
527
|
-
|
|
528
|
-
// 缓动追底:双 rAF 等 layout 完,然后 step easeOut(35% gap,min 1px max 120px)
|
|
529
|
-
// _smoothLockHeld 是 owner 标记,整条 step 链占 1 个 lock 引用;嵌套 startSmoothFollow
|
|
530
|
-
// 不重复 increment(已持有 owner 的 lock)。
|
|
531
|
-
// 帧率节流:step 用 _smoothFollowMinFrameMs(默认 33ms≈30fps)门控——未到间隔的帧只重排
|
|
532
|
-
// rAF、不读写 scrollTop,避免每帧 forced reflow(与显示器刷新率解耦,可经 opts 调整)。
|
|
533
|
-
// 用户滚动窗口内整体停摆(入口 + step 双守卫):SSE 高频重启在窗口内全部 no-op,
|
|
534
|
-
// 锁不会被重新抓走,用户的 scroll 信号得以进入决策通道。
|
|
535
|
-
startSmoothFollow(el) {
|
|
536
|
-
if (this._disposed) return;
|
|
537
|
-
if (this.isUserScrolling()) return;
|
|
538
|
-
const scroller = el || this._boundEl;
|
|
539
|
-
if (!scroller) return;
|
|
540
|
-
if (!this._smoothLockHeld) {
|
|
541
|
-
this._lockDepth++;
|
|
542
|
-
this._smoothLockHeld = true;
|
|
543
|
-
}
|
|
544
|
-
if (this._smoothFollowRafId !== null) {
|
|
545
|
-
this._cancelRaf(this._smoothFollowRafId);
|
|
546
|
-
this._smoothFollowRafId = null;
|
|
547
|
-
}
|
|
548
|
-
// 上一次实际移动 scrollTop 的时间戳(闭包内,每条 step 链独立);0 = 首帧立即移动,不被节流
|
|
549
|
-
let lastMoveTs = 0;
|
|
550
|
-
const release = () => {
|
|
551
|
-
if (!this._smoothLockHeld) return;
|
|
552
|
-
this._smoothLockHeld = false;
|
|
553
|
-
this._lockDepth = Math.max(0, this._lockDepth - 1);
|
|
554
|
-
};
|
|
555
|
-
const step = () => {
|
|
556
|
-
this._smoothFollowRafId = null;
|
|
557
|
-
if (this._disposed) { release(); return; }
|
|
558
|
-
if (!this._getSticky()) { release(); return; }
|
|
559
|
-
// 竞态臂:意图事件经 cancelSmoothFollow 同步取消链,这里兜两帧之间事件未及取消的极端情况
|
|
560
|
-
if (this.isUserScrolling()) { release(); return; }
|
|
561
|
-
// 帧率门控:距上次移动不足 _smoothFollowMinFrameMs 则跳过本帧(不触碰 layout),仅重排 rAF。
|
|
562
|
-
// disposed / sticky 守卫放在门控之前,保证取消语义在节流期间仍即时生效。
|
|
563
|
-
if (this._smoothFollowMinFrameMs > 0 && (this._now() - lastMoveTs) < this._smoothFollowMinFrameMs) {
|
|
564
|
-
this._smoothFollowRafId = this._raf(step);
|
|
565
|
-
return;
|
|
566
|
-
}
|
|
567
|
-
const target = this._followTarget;
|
|
568
|
-
const current = scroller.scrollTop ?? 0;
|
|
569
|
-
const gap = target - current;
|
|
570
|
-
// 非有限数(scroller 异常 / target 缓存被污染)防御:直接 release 避免死循环 step
|
|
571
|
-
if (!Number.isFinite(gap)) { release(); return; }
|
|
572
|
-
if (gap <= 0.5) {
|
|
573
|
-
try { scroller.scrollTop = target; } catch {}
|
|
574
|
-
release();
|
|
575
|
-
return;
|
|
576
|
-
}
|
|
577
|
-
lastMoveTs = this._now();
|
|
578
|
-
const delta = Math.max(1, Math.min(gap * 0.35, 120));
|
|
579
|
-
try { scroller.scrollTop = current + delta; } catch {}
|
|
580
|
-
this._smoothFollowRafId = this._raf(step);
|
|
581
|
-
};
|
|
582
|
-
// 双 rAF:先让新内容 layout 完成再测量 target
|
|
583
|
-
this._smoothFollowRafId = this._raf(() => {
|
|
584
|
-
if (this._disposed) { release(); return; }
|
|
585
|
-
this._smoothFollowRafId = this._raf(() => {
|
|
586
|
-
if (this._disposed) { release(); return; }
|
|
587
|
-
this.refreshFollowTarget(scroller);
|
|
588
|
-
step();
|
|
589
|
-
});
|
|
590
|
-
});
|
|
591
|
-
}
|
|
592
|
-
|
|
593
|
-
cancelSmoothFollow() {
|
|
594
|
-
if (this._disposed) return;
|
|
595
|
-
if (this._smoothFollowRafId !== null) {
|
|
596
|
-
this._cancelRaf(this._smoothFollowRafId);
|
|
597
|
-
this._smoothFollowRafId = null;
|
|
598
|
-
}
|
|
599
|
-
if (this._smoothLockHeld) {
|
|
600
|
-
this._smoothLockHeld = false;
|
|
601
|
-
this._lockDepth = Math.max(0, this._lockDepth - 1);
|
|
602
|
-
}
|
|
603
|
-
}
|
|
604
|
-
|
|
605
|
-
// RO 回调统一入口:尺寸变 → 刷缓存 → sticky 时跟到底(受 lock + 用户滚动窗口守卫)
|
|
606
|
-
handleScrollerResize(el) {
|
|
607
|
-
if (this._disposed) return;
|
|
608
|
-
const target = el || this._boundEl;
|
|
609
|
-
if (!target) return;
|
|
610
|
-
this.refreshFollowTarget(target);
|
|
611
|
-
if (!this._getSticky()) return;
|
|
612
|
-
if (this._lockDepth > 0) return;
|
|
613
|
-
if (this.isUserScrolling()) return;
|
|
614
|
-
this.writeUnderLock(target, this._followTarget);
|
|
615
|
-
}
|
|
616
|
-
|
|
617
|
-
// Virtuoso atBottomStateChange 接管入口。
|
|
618
|
-
//
|
|
619
|
-
// 这个方法整合两层职责(按下到上):
|
|
620
|
-
// ── (A) Virtuoso 真值修正层 ──
|
|
621
|
-
// Virtuoso footer 子树(lastResponse / spinner / streamingLiveItem 三段)高度抖动
|
|
622
|
-
// 会让内部 atBottom 误判翻转。用真实 DOM 距离 ≤/> _atBottomPx 兜底,过滤掉抖动。
|
|
623
|
-
// ── (B) 状态翻转决策层 ──
|
|
624
|
-
// 走 _setSticky 享受 16ms 决策去重(合并同 tick 内 RO + Virtuoso 双发)。
|
|
625
|
-
//
|
|
626
|
-
// 锁期间统一短路(保留 Virtuoso 真实 atBottom 不可靠)。未来若有 iPad 等新 scroller 出
|
|
627
|
-
// 类似 atBottom 不可靠场景,可考虑把 (A) 抽成可插拔的 correctionFn。
|
|
628
|
-
notifyAtBottom(isAtBottom) {
|
|
629
|
-
if (this._disposed) return;
|
|
630
|
-
if (this._lockDepth > 0) return;
|
|
631
|
-
// (A) 真值修正:DOM 实测距离 vs _atBottomPx 兜底
|
|
632
|
-
const el = this._boundEl;
|
|
633
|
-
if (el && typeof el.scrollHeight === 'number') {
|
|
634
|
-
const realGap = (el.scrollHeight ?? 0) - (el.scrollTop ?? 0) - (el.clientHeight ?? 0);
|
|
635
|
-
if (!isAtBottom && this._getSticky() && realGap <= this._atBottomPx) return;
|
|
636
|
-
if (isAtBottom && !this._getSticky() && realGap > this._atBottomPx) return;
|
|
637
|
-
}
|
|
638
|
-
// (B) 翻转决策:走 _setSticky 决策去重
|
|
639
|
-
this._setSticky(!!isAtBottom);
|
|
640
|
-
}
|
|
641
|
-
}
|
|
642
|
-
|
|
643
|
-
export default StickyBottomController;
|