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

Function workspaceSessionRows

internal/cli/workspace.go:533–557  ·  view source on GitHub ↗
(items []SessionRecord, human bool)

Source from the content-addressed store, hash-verified

531}
532
533func workspaceSessionRows(items []SessionRecord, human bool) [][]string {
534 rows := make([][]string, 0, len(items))
535 for _, item := range items {
536 row := []string{
537 item.ID,
538 item.Name,
539 item.AgentName,
540 string(item.State),
541 displaySessionWorkspace(item),
542 formatTime(item.UpdatedAt),
543 }
544 if human {
545 row = []string{
546 stringOrDash(item.ID),
547 stringOrDash(item.Name),
548 stringOrDash(item.AgentName),
549 stringOrDash(string(item.State)),
550 stringOrDash(displaySessionWorkspace(item)),
551 stringOrDash(formatTime(item.UpdatedAt)),
552 }
553 }
554 rows = append(rows, row)
555 }
556 return rows
557}
558
559func workspaceAgentRows(items []AgentRecord, human bool) [][]string {
560 rows := make([][]string, 0, len(items))

Callers 2

Calls 4

displaySessionWorkspaceFunction · 0.85
formatTimeFunction · 0.85
stringOrDashFunction · 0.85
appendFunction · 0.85

Tested by

no test coverage detected