MCPcopy Create free account
hub / github.com/diillson/chatcli / finalizeGraphViewArgs

Function finalizeGraphViewArgs

cli/plugins/builtin_graphview.go:412–425  ·  view source on GitHub ↗
(out graphViewArgs)

Source from the content-addressed store, hash-verified

410}
411
412func finalizeGraphViewArgs(out graphViewArgs) (graphViewArgs, error) {
413 out.Source = strings.ToLower(strings.TrimSpace(out.Source))
414 switch out.Source {
415 case "", "json":
416 out.Source = "json"
417 case "knowledge", "conversation":
418 default:
419 return out, fmt.Errorf("unknown source %q (use json, knowledge or conversation)", out.Source)
420 }
421 if out.Theme != "light" {
422 out.Theme = "dark"
423 }
424 return out, nil
425}
426
427// resolveGraphData produces the renderable data for the chosen source.
428func resolveGraphData(cfg graphViewArgs) (GraphData, error) {

Callers 1

parseGraphViewArgsFunction · 0.85

Calls 1

ErrorfMethod · 0.80

Tested by

no test coverage detected