MCPcopy Create free account
hub / github.com/compozy/agh / configPathBundle

Function configPathBundle

internal/cli/config.go:1380–1428  ·  view source on GitHub ↗
(record configPathRecord)

Source from the content-addressed store, hash-verified

1378}
1379
1380func configPathBundle(record configPathRecord) outputBundle {
1381 rows := []keyValue{
1382 {Label: "Home", Value: stringOrDash(record.HomeDir)},
1383 {Label: "Global Config", Value: stringOrDash(record.GlobalConfig)},
1384 {Label: "Global MCP JSON", Value: stringOrDash(record.GlobalMCPJSON)},
1385 {Label: configScopeValue, Value: stringOrDash(record.Scope)},
1386 {Label: "Selected Config Target", Value: stringOrDash(record.SelectedConfigTarget)},
1387 {Label: configManagedValue, Value: strconv.FormatBool(record.Managed)},
1388 {Label: configManagerValue, Value: stringOrDash(record.Manager)},
1389 }
1390 if record.WorkspaceRoot != "" {
1391 rows = append(rows,
1392 keyValue{Label: configWorkspaceValue, Value: record.WorkspaceRoot},
1393 keyValue{Label: "Workspace Config", Value: record.WorkspaceConfig},
1394 keyValue{Label: "Workspace MCP JSON", Value: record.WorkspaceMCPJSON},
1395 )
1396 }
1397 return outputBundle{
1398 jsonValue: record,
1399 human: func() (string, error) {
1400 return renderHumanSection("Config Paths", rows), nil
1401 },
1402 toon: func() (string, error) {
1403 return renderToonObject(
1404 "config_paths",
1405 []string{
1406 "home_dir",
1407 "global_config",
1408 "global_mcp_json",
1409 configScopeKey,
1410 configWorkspaceRootKey,
1411 "selected_config_target",
1412 configManagedKey,
1413 configManagerKey,
1414 },
1415 []string{
1416 record.HomeDir,
1417 record.GlobalConfig,
1418 record.GlobalMCPJSON,
1419 record.Scope,
1420 record.WorkspaceRoot,
1421 record.SelectedConfigTarget,
1422 strconv.FormatBool(record.Managed),
1423 record.Manager,
1424 },
1425 ), nil
1426 },
1427 }
1428}
1429
1430func configValidateBundle(record configValidateRecord) outputBundle {
1431 rows := []keyValue{

Callers 2

newConfigPathCommandFunction · 0.85

Calls 4

stringOrDashFunction · 0.85
appendFunction · 0.85
renderHumanSectionFunction · 0.85
renderToonObjectFunction · 0.85

Tested by 1