mirror of
https://gitcode.com/JianFeeeee/HomeAgent.git
synced 2026-09-24 19:08:10 +00:00
RegisterStage: add scope parameter, remove RegisterStageOwnTools
- SDK: RegisterStage(stage, handler, scope...) with StageScopeGlobal/StageScopeOwnTools - Delete RegisterStageOwnTools, migrate cmd and qq plugins - Internal SDK: add StageScope alias - Docs: update all zh/en docs for C ABI buildmode and stage scope - C ABI: fix nil errorOut in Handle.Start/Handle.Stop (SIGSEGV fix) - C ABI header: add dispatch IDs 26-45 for Settings/Doc/Knowledge/LLM/Social/TextMemory
This commit is contained in:
@ -214,7 +214,7 @@ func (p *Plugin) Start(s *sdk.PluginSDK) error {
|
||||
}, nil
|
||||
})
|
||||
|
||||
s.RegisterStageOwnTools(sdk.StageBeforeToolcall, func(ctx *sdk.StageContext) error {
|
||||
s.RegisterStage(sdk.StageBeforeToolcall, func(ctx *sdk.StageContext) error {
|
||||
if len(ctx.ToolCalls) == 0 {
|
||||
return nil
|
||||
}
|
||||
@ -233,7 +233,7 @@ func (p *Plugin) Start(s *sdk.PluginSDK) error {
|
||||
return nil
|
||||
}
|
||||
return nil
|
||||
})
|
||||
}, sdk.StageScopeOwnTools)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user