mirror of
https://gitcode.com/JianFeeeee/homeagent-sdk.git
synced 2026-10-15 12:15:11 +00:00
docs: 修正全部文档使其与源码实现一致
- Plugin.Start(sdk *PluginSDK) 接口签名改为指针 - 方法表重写: 移除 CallLLM/QueryKnowledge/SetMemory 等不存在方法 - IOInjector 参数顺序修正为 (source, channel, text) - 删除虚构 SDKConfig, 替换为实际 New() 构造函数签名 - .hmap 内容描述一致化 (plugin.so + plugin.dll + main.lua) - 添加 meta/ 包元数据文件
This commit is contained in:
33
tools/plugindev/cmd_clean.go
Normal file
33
tools/plugindev/cmd_clean.go
Normal file
@ -0,0 +1,33 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
)
|
||||
|
||||
func cmdClean(args []string) {
|
||||
outDir := "dist"
|
||||
if len(args) > 0 && args[0] == "--outdir" && len(args) > 1 {
|
||||
outDir = args[1]
|
||||
}
|
||||
|
||||
dirs := []string{"build", outDir}
|
||||
for _, d := range dirs {
|
||||
if _, err := os.Stat(d); os.IsNotExist(err) {
|
||||
continue
|
||||
}
|
||||
if err := os.RemoveAll(d); err != nil {
|
||||
fmt.Printf("error: remove %s: %v\n", d, err)
|
||||
} else {
|
||||
fmt.Printf("removed %s/\n", d)
|
||||
}
|
||||
}
|
||||
|
||||
// also clean generated files
|
||||
for _, f := range []string{"plugin.json", "z_bridge_gen.go"} {
|
||||
if _, err := os.Stat(f); err == nil {
|
||||
os.Remove(f)
|
||||
fmt.Printf("removed %s\n", f)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user