chore: add version

Kujtim Hoxha created

Change summary

internal/tui/page/chat/chat.go | 10 +++++++++-
todos.md                       |  2 +-
2 files changed, 10 insertions(+), 2 deletions(-)

Detailed changes

internal/tui/page/chat/chat.go 🔗

@@ -20,6 +20,7 @@ import (
 	"github.com/charmbracelet/crush/internal/tui/page"
 	"github.com/charmbracelet/crush/internal/tui/styles"
 	"github.com/charmbracelet/crush/internal/tui/util"
+	"github.com/charmbracelet/crush/internal/version"
 	"github.com/charmbracelet/lipgloss/v2"
 )
 
@@ -307,7 +308,14 @@ func (p *chatPage) View() tea.View {
 		style := t.S().Base.
 			Border(lipgloss.RoundedBorder()).
 			BorderForeground(t.BorderFocus)
-		details := style.Render(p.compactSidebar.View().String())
+		version := t.S().Subtle.Padding(0, 1).AlignHorizontal(lipgloss.Right).Width(p.wWidth - 4).Render(version.Version)
+		details := style.Render(
+			lipgloss.JoinVertical(
+				lipgloss.Left,
+				p.compactSidebar.View().String(),
+				version,
+			),
+		)
 		layers = append(layers, lipgloss.NewLayer(details).X(1).Y(1))
 	}
 	canvas := lipgloss.NewCanvas(

todos.md 🔗

@@ -25,7 +25,7 @@
   - [ ] Message length (I saw the message go beyond the correct length when there are errors)
   - [ ] Address UX issues
   - [ ] Fix issue with numbers (padding) view tool
-- [ ] Implement responsive mode
+- [x] Implement responsive mode
 - [ ] Update interactive mode to use the spinner
 - [ ] Revisit the core list component
   - [ ] This component has become super complex we might need to fix this.