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

Method generateToolsConfig

pkg/cli/interactive.go:682–705  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

680}
681
682func (b *InteractiveWorkflowBuilder) generateToolsConfig() string {
683 if len(b.Tools) == 0 {
684 return ""
685 }
686
687 var config strings.Builder
688 config.WriteString("tools:\n")
689
690 // Add standard tools
691 for _, tool := range b.Tools {
692 switch tool {
693 case "github":
694 // Use default toolsets (context, repos, issues, pull_requests)
695 // which matches the DefaultGitHubToolsets constant.
696 config.WriteString(" github:\n toolsets: [default]\n")
697 case "bash":
698 config.WriteString(" bash:\n")
699 default:
700 fmt.Fprintf(&config, " %s:\n", tool)
701 }
702 }
703
704 return config.String()
705}
706
707func (b *InteractiveWorkflowBuilder) generateSafeOutputsConfig() string {
708 if len(b.SafeOutputs) == 0 {

Calls 1

StringMethod · 0.45

Tested by 1