wip: refactoring tui

This commit is contained in:
adamdottv
2025-06-13 11:18:46 -05:00
parent 62b9a30a9c
commit 61396b93ed
4 changed files with 70 additions and 22 deletions

View File

@@ -130,17 +130,16 @@ func (p *chatPage) GetSize() (int, int) {
func (p *chatPage) View() string {
layoutView := p.layout.View()
// TODO: Fix this with our new layout
if p.showCompletionDialog {
_, layoutHeight := p.layout.GetSize()
editorWidth, editorHeight := p.editor.GetSize()
editorWidth, _ := p.editor.GetSize()
editorX, editorY := p.editor.GetPosition()
p.completionDialog.SetWidth(editorWidth)
overlay := p.completionDialog.View()
layoutView = layout.PlaceOverlay(
0,
layoutHeight-editorHeight-lipgloss.Height(overlay),
editorX,
editorY-lipgloss.Height(overlay)+1,
overlay,
layoutView,
)