summaryrefslogtreecommitdiffhomepage
path: root/internal/tui
diff options
context:
space:
mode:
authorKujtim Hoxha <[email protected]>2025-04-14 14:09:17 +0200
committerKujtim Hoxha <[email protected]>2025-04-21 13:41:27 +0200
commit0130bde1edabb81d82dbce9d2d562966d2dee133 (patch)
tree351436a114f790205460575ba15226ab35d6a1fc /internal/tui
parent0b3e5f5bd42a02c2a15b394b3768e517dc43f39c (diff)
downloadopencode-0130bde1edabb81d82dbce9d2d562966d2dee133.tar.gz
opencode-0130bde1edabb81d82dbce9d2d562966d2dee133.zip
remove node dependency and implement diff format
Diffstat (limited to 'internal/tui')
-rw-r--r--internal/tui/components/dialog/permission.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/tui/components/dialog/permission.go b/internal/tui/components/dialog/permission.go
index 344310eb6..d147f89cd 100644
--- a/internal/tui/components/dialog/permission.go
+++ b/internal/tui/components/dialog/permission.go
@@ -9,7 +9,7 @@ import (
tea "github.com/charmbracelet/bubbletea"
"github.com/charmbracelet/glamour"
"github.com/charmbracelet/lipgloss"
- "github.com/kujtimiihoxha/termai/internal/git"
+ "github.com/kujtimiihoxha/termai/internal/diff"
"github.com/kujtimiihoxha/termai/internal/llm/tools"
"github.com/kujtimiihoxha/termai/internal/permission"
"github.com/kujtimiihoxha/termai/internal/tui/components/core"
@@ -242,7 +242,7 @@ func (p *permissionDialogCmp) render() string {
// Calculate content height dynamically based on window size
maxContentHeight := p.height - lipgloss.Height(headerContent) - lipgloss.Height(form) - 2 - 2 - 1
p.contentViewPort.Height = maxContentHeight
- diff, err := git.FormatDiff(pr.Diff, p.contentViewPort.Width)
+ diff, err := diff.FormatDiff(pr.Diff, diff.WithTotalWidth(p.contentViewPort.Width))
if err != nil {
diff = fmt.Sprintf("Error formatting diff: %v", err)
}
@@ -291,7 +291,7 @@ func (p *permissionDialogCmp) render() string {
// Calculate content height dynamically based on window size
maxContentHeight := p.height - lipgloss.Height(headerContent) - lipgloss.Height(form) - 2 - 2 - 1
p.contentViewPort.Height = maxContentHeight
- diff, err := git.FormatDiff(pr.Diff, p.contentViewPort.Width)
+ diff, err := diff.FormatDiff(pr.Diff, diff.WithTotalWidth(p.contentViewPort.Width))
if err != nil {
diff = fmt.Sprintf("Error formatting diff: %v", err)
}