MCPcopy Create free account
hub / github.com/GongShichen/LuminaCode / DecodeInput

Method DecodeInput

tools/builtin.go:765–778  ·  view source on GitHub ↗
(raw map[string]any)

Source from the content-addressed store, hash-verified

763
764func (t *BashTool) SandboxStatus() (available bool, platform string, backend string) {
765 if t == nil || t.sandboxManager == nil {
766 return false, runtime.GOOS, ""
767 }
768 return t.sandboxManager.IsSandboxingEnabled(), t.sandboxManager.Platform(), t.sandboxManager.BackendName()
769}
770
771func (t *BashTool) DecodeInput(raw map[string]any) (any, error) {
772 normalized := copyAnyMap(raw)
773 if value, ok := normalized["timeout"]; ok {
774 if text, isString := value.(string); isString {
775 seconds, errMsg := parseBashTimeoutString(text, true)
776 if errMsg != "" {
777 return nil, fmt.Errorf("%s", errMsg)
778 }
779 millis := int(seconds * 1000)
780 normalized["timeout"] = millis
781 }

Callers

nothing calls this directly

Calls 3

parseBashTimeoutStringFunction · 0.85
copyAnyMapFunction · 0.70
DecodeInputMethod · 0.65

Tested by

no test coverage detected