Skip to content

Commit 428da52

Browse files
committed
Move the TUI to pkg
Signed-off-by: David Gageot <david.gageot@docker.com>
1 parent e81cb64 commit 428da52

21 files changed

Lines changed: 39 additions & 39 deletions

File tree

cmd/root/run.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import (
2222

2323
"github.com/docker/cagent/internal/app"
2424
"github.com/docker/cagent/internal/telemetry"
25-
"github.com/docker/cagent/internal/tui"
2625
"github.com/docker/cagent/pkg/chat"
2726
"github.com/docker/cagent/pkg/content"
2827
"github.com/docker/cagent/pkg/evaluation"
@@ -31,6 +30,7 @@ import (
3130
"github.com/docker/cagent/pkg/session"
3231
"github.com/docker/cagent/pkg/team"
3332
"github.com/docker/cagent/pkg/teamloader"
33+
"github.com/docker/cagent/pkg/tui"
3434
)
3535

3636
var (
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ import (
66
"github.com/charmbracelet/bubbles/v2/textarea"
77
tea "github.com/charmbracelet/bubbletea/v2"
88

9-
"github.com/docker/cagent/internal/tui/core"
10-
"github.com/docker/cagent/internal/tui/core/layout"
11-
"github.com/docker/cagent/internal/tui/styles"
9+
"github.com/docker/cagent/pkg/tui/core"
10+
"github.com/docker/cagent/pkg/tui/core/layout"
11+
"github.com/docker/cagent/pkg/tui/styles"
1212
)
1313

1414
// SendMsg represents a message to send

internal/tui/components/message/message.go renamed to pkg/tui/components/message/message.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ import (
99
tea "github.com/charmbracelet/bubbletea/v2"
1010
"github.com/charmbracelet/glamour/v2"
1111

12-
"github.com/docker/cagent/internal/tui/core/layout"
13-
"github.com/docker/cagent/internal/tui/styles"
14-
"github.com/docker/cagent/internal/tui/types"
12+
"github.com/docker/cagent/pkg/tui/core/layout"
13+
"github.com/docker/cagent/pkg/tui/styles"
14+
"github.com/docker/cagent/pkg/tui/types"
1515
)
1616

1717
// Model represents a view that can render a message

internal/tui/components/messages/messages.go renamed to pkg/tui/components/messages/messages.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ import (
1212
"github.com/charmbracelet/lipgloss/v2"
1313

1414
"github.com/docker/cagent/internal/app"
15-
"github.com/docker/cagent/internal/tui/components/message"
16-
"github.com/docker/cagent/internal/tui/components/tool"
17-
"github.com/docker/cagent/internal/tui/core"
18-
"github.com/docker/cagent/internal/tui/core/layout"
19-
"github.com/docker/cagent/internal/tui/types"
2015
"github.com/docker/cagent/pkg/runtime"
2116
"github.com/docker/cagent/pkg/tools"
17+
"github.com/docker/cagent/pkg/tui/components/message"
18+
"github.com/docker/cagent/pkg/tui/components/tool"
19+
"github.com/docker/cagent/pkg/tui/core"
20+
"github.com/docker/cagent/pkg/tui/core/layout"
21+
"github.com/docker/cagent/pkg/tui/types"
2222
)
2323

2424
// Model represents a chat message list component

internal/tui/components/sidebar/sidebar.go renamed to pkg/tui/components/sidebar/sidebar.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ import (
99
tea "github.com/charmbracelet/bubbletea/v2"
1010
"github.com/charmbracelet/lipgloss/v2"
1111

12-
"github.com/docker/cagent/internal/tui/components/todo"
13-
"github.com/docker/cagent/internal/tui/core/layout"
14-
"github.com/docker/cagent/internal/tui/styles"
1512
"github.com/docker/cagent/pkg/runtime"
13+
"github.com/docker/cagent/pkg/tui/components/todo"
14+
"github.com/docker/cagent/pkg/tui/core/layout"
15+
"github.com/docker/cagent/pkg/tui/styles"
1616
)
1717

1818
// Model represents a sidebar component

internal/tui/components/statusbar/statusbar.go renamed to pkg/tui/components/statusbar/statusbar.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import (
55

66
"github.com/charmbracelet/bubbles/v2/key"
77
"github.com/charmbracelet/lipgloss/v2"
8-
"github.com/docker/cagent/internal/tui/core"
9-
"github.com/docker/cagent/internal/tui/styles"
108
"github.com/docker/cagent/internal/version"
9+
"github.com/docker/cagent/pkg/tui/core"
10+
"github.com/docker/cagent/pkg/tui/styles"
1111
)
1212

1313
// StatusBar represents the status bar component that displays key bindings help
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"strings"
77

88
"github.com/charmbracelet/lipgloss/v2"
9-
"github.com/docker/cagent/internal/tui/styles"
9+
"github.com/docker/cagent/pkg/tui/styles"
1010
)
1111

1212
// Todo represents a single todo item
File renamed without changes.
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ import (
1111
"github.com/charmbracelet/glamour/v2"
1212

1313
"github.com/docker/cagent/internal/app"
14-
"github.com/docker/cagent/internal/tui/core/layout"
15-
"github.com/docker/cagent/internal/tui/styles"
16-
"github.com/docker/cagent/internal/tui/types"
14+
"github.com/docker/cagent/pkg/tui/core/layout"
15+
"github.com/docker/cagent/pkg/tui/styles"
16+
"github.com/docker/cagent/pkg/tui/types"
1717
)
1818

1919
// toolModel implements Model

0 commit comments

Comments
 (0)