feat(plugin): add pre-reset plugin data event (#5957)

This commit is contained in:
InfinityPacer
2026-06-17 06:34:15 +08:00
committed by GitHub
parent d5bac81881
commit 93056ed1ff
4 changed files with 75 additions and 1 deletions
+13
View File
@@ -64,6 +64,19 @@ class ChainEventData(BaseEventData):
pass
class PluginDataResetEventData(ChainEventData):
"""
PluginDataReset 事件的数据模型。
在主程序清空某个插件配置或插件数据前发出,插件可在数据被删除前完成
自有状态补偿。事件处理器只应处理 plugin_id 与自身匹配的事件。
"""
plugin_id: str = Field(..., description="即将被重置的插件 ID")
reset_config: bool = Field(default=False, description="是否即将重置插件配置")
reset_data: bool = Field(default=False, description="是否即将重置插件数据")
class AgentLLMProviderEventData(ChainEventData):
"""
Agent LLM 供应商选择事件数据。