feat: remove unused helper functions for string and int64 value extraction

This commit is contained in:
mlogclub
2026-04-14 11:13:19 +08:00
parent a5b0ddc760
commit 974f8a788b
-31
View File
@@ -1,7 +1,6 @@
package tools
import (
"fmt"
"strings"
"cs-agent/internal/ai/runtime/registry"
@@ -35,36 +34,6 @@ func ParseConfirmationDecision(value string) Decision {
return ""
}
func getStringValue(data map[string]any, key string) string {
value, ok := data[key]
if !ok || value == nil {
return ""
}
switch v := value.(type) {
case string:
return v
default:
return fmt.Sprintf("%v", v)
}
}
func getInt64Value(data map[string]any, key string) int64 {
value, ok := data[key]
if !ok || value == nil {
return 0
}
switch v := value.(type) {
case float64:
return int64(v)
case int64:
return v
case int:
return int64(v)
default:
return 0
}
}
func NewRuntimeStaticTool(toolCode string) registry.Tool {
switch toolx.NormalizeToolCodeAlias(strings.TrimSpace(toolCode)) {
case toolx.GraphTriageServiceRequest.Code: