refactor: stabilize runtime and unify config

This commit is contained in:
lpf
2026-03-14 21:40:12 +08:00
parent 60eee65fec
commit 341e578c9f
75 changed files with 3081 additions and 1627 deletions

View File

@@ -40,10 +40,8 @@ func (t *CameraTool) Parameters() map[string]interface{} {
}
func (t *CameraTool) Execute(ctx context.Context, args map[string]interface{}) (string, error) {
filename := ""
if v, ok := args["filename"].(string); ok && v != "" {
filename = v
} else {
filename := MapStringArg(args, "filename")
if filename == "" {
filename = fmt.Sprintf("snap_%d.jpg", time.Now().Unix())
}