MCPcopy
hub / github.com/moncho/dry / renderWorkspaceBody

Method renderWorkspaceBody

app/model.go:1613–1638  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1611}
1612
1613func (m model) renderWorkspaceBody() string {
1614 _, _, topH, activityH := m.workspaceLayout()
1615 tabs := m.renderWorkspaceTabs()
1616 if topH <= 0 {
1617 return tabs
1618 }
1619
1620 if m.workspaceCompactMode() {
1621 m.workspaceLogs.SetFocused(m.activePane == workspacePaneActivity)
1622 if m.activePane == workspacePaneActivity {
1623 return lipgloss.JoinVertical(lipgloss.Left, tabs, m.workspaceLogs.View())
1624 }
1625 return lipgloss.JoinVertical(lipgloss.Left, tabs, m.renderCurrentView())
1626 }
1627
1628 m.populateWorkspaceContextPane()
1629 m.workspaceContext.SetFocused(m.activePane == workspacePaneContext)
1630 m.workspaceLogs.SetFocused(m.activePane == workspacePaneActivity)
1631
1632 top := lipgloss.JoinHorizontal(lipgloss.Top, m.renderCurrentView(), m.workspaceContext.View())
1633 if activityH <= 0 {
1634 return lipgloss.JoinVertical(lipgloss.Left, tabs, top)
1635 }
1636 activity := m.workspaceLogs.View()
1637 return lipgloss.JoinVertical(lipgloss.Left, tabs, top, activity)
1638}
1639
1640func (m *model) populateWorkspaceContextPane() {
1641 context := m.pinnedContext

Calls 7

workspaceLayoutMethod · 0.95
renderWorkspaceTabsMethod · 0.95
workspaceCompactModeMethod · 0.95
renderCurrentViewMethod · 0.95
SetFocusedMethod · 0.45
ViewMethod · 0.45