MCPcopy Create free account
hub / github.com/github/gh-aw / extractToolName

Function extractToolName

pkg/cli/copilot_agent_logs.go:119–128  ·  view source on GitHub ↗

extractToolName extracts a tool name from a log line

(line string)

Source from the content-addressed store, hash-verified

117
118// extractToolName extracts a tool name from a log line
119func extractToolName(line string) string {
120 // Try to extract tool name from various patterns
121 for _, pattern := range toolNamePatterns {
122 if matches := pattern.FindStringSubmatch(line); len(matches) > 1 {
123 return strings.TrimSpace(matches[1])
124 }
125 }
126
127 return ""
128}

Callers 2

TestExtractToolNameFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestExtractToolNameFunction · 0.68