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

Function renderViewSafeOutputs

pkg/cli/view_command.go:199–216  ·  view source on GitHub ↗

renderViewSafeOutputs reads safe-output-items.jsonl from runDir and prints a human-friendly summary of every item that was created during the run. A missing or empty manifest is silently ignored.

(runDir string)

Source from the content-addressed store, hash-verified

197// human-friendly summary of every item that was created during the run.
198// A missing or empty manifest is silently ignored.
199func renderViewSafeOutputs(runDir string) {
200 items := extractCreatedItemsFromManifest(runDir)
201 if len(items) == 0 {
202 return
203 }
204
205 fmt.Fprintln(os.Stdout)
206 fmt.Fprintln(os.Stdout, console.FormatSectionHeader("Safe Outputs"))
207 for _, item := range items {
208 line := " " + item.Type
209 if item.URL != "" {
210 line += " " + item.URL
211 } else if item.Repo != "" && item.Number > 0 {
212 line += fmt.Sprintf(" %s#%d", item.Repo, item.Number)
213 }
214 fmt.Fprintln(os.Stdout, line)
215 }
216}

Callers 1

ViewWorkflowRunFunction · 0.85

Calls 2

FormatSectionHeaderFunction · 0.92

Tested by

no test coverage detected