(items []SessionRecord, human bool)
| 531 | } |
| 532 | |
| 533 | func 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 | |
| 559 | func workspaceAgentRows(items []AgentRecord, human bool) [][]string { |
| 560 | rows := make([][]string, 0, len(items)) |
no test coverage detected