MCPcopy Create free account
hub / github.com/aurora-develop/aurora / pickShellParam

Function pickShellParam

internal/toolcall/recover.go:39–55  ·  view source on GitHub ↗
(paramsJSON json.RawMessage)

Source from the content-addressed store, hash-verified

37}
38
39func pickShellParam(paramsJSON json.RawMessage) string {
40 if len(paramsJSON) == 0 {
41 return "command"
42 }
43 var schema struct {
44 Properties map[string]any `json:"properties"`
45 }
46 if err := json.Unmarshal(paramsJSON, &schema); err != nil || schema.Properties == nil {
47 return "command"
48 }
49 for _, cand := range ShellParamCandidates {
50 if _, ok := schema.Properties[cand]; ok {
51 return cand
52 }
53 }
54 return "command"
55}
56
57// RecoverFromText 兜底:从已输出的纯文本里扫描 JSON 对象,抽出
58// (a) {"name":..., "arguments":...} 或

Callers 1

ResolveShellToolFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected