GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — wip: refactoring tui · klevo/opencode@01050a4

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • .gitignore
  • packages/tui
    • cmd/opencode
      • main.go
    • internal
      • app
        • .DS_Store
        • app.go
      • completions
        • files-folders.go
      • components
        • chat
          • chat.go
          • editor.go
          • message.go
          • messages.go
          • sidebar.go
        • core
          • status.go
        • dialog
          • arguments.go
          • commands.go
          • complete.go
          • custom_commands.go
          • custom_commands_test.go
          • filepicker.go
          • help.go
          • init.go
          • models.go
          • permission.go
          • quit.go
          • session.go
          • theme.go
          • tools.go
        • diff
          • diff.go
        • qr
          • qr.go
        • spinner
          • spinner.go
          • spinner_test.go
        • util
          • simple-list.go
      • config
        • config.go
      • image
        • clipboard_unix.go
        • clipboard_windows.go
        • images.go
      • layout
        • container.go
        • layout.go
        • overlay.go
        • split.go
      • page
        • chat.go
        • page.go
      • state
        • state.go
      • styles
        • background.go
        • icons.go
        • markdown.go
        • styles.go
      • theme
        • ayu.go
        • catppuccin.go
        • dracula.go
        • flexoki.go
        • gruvbox.go
        • manager.go
        • monokai.go
        • onedark.go
        • opencode.go
        • theme.go
        • theme_test.go
        • tokyonight.go
        • tron.go
      • tui
        • tui.go
      • util
        • util.go

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎.gitignore‎

Copy file name to clipboard
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1+
.DS_Store
12
node_modules
23
.opencode
34
.sst
4-
app.log
55
.env
Collapse file

‎packages/tui/cmd/opencode/main.go‎

Copy file name to clipboardExpand all lines: packages/tui/cmd/opencode/main.go
+5-5Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ import (
1010

1111
tea "github.com/charmbracelet/bubbletea"
1212
zone "github.com/lrstanley/bubblezone"
13+
"github.com/sst/opencode/internal/app"
1314
"github.com/sst/opencode/internal/pubsub"
1415
"github.com/sst/opencode/internal/tui"
15-
"github.com/sst/opencode/internal/tui/app"
1616
"github.com/sst/opencode/pkg/client"
1717
)
1818

@@ -46,7 +46,7 @@ func main() {
4646
ctx, cancel := context.WithCancel(context.Background())
4747
defer cancel()
4848

49-
app, err := app.New(ctx, httpClient)
49+
app_, err := app.New(ctx, httpClient)
5050
if err != nil {
5151
slog.Error("Failed to create app", "error", err)
5252
// return err
@@ -55,7 +55,7 @@ func main() {
5555
// Set up the TUI
5656
zone.NewGlobal()
5757
program := tea.NewProgram(
58-
tui.New(app),
58+
tui.NewModel(app_),
5959
tea.WithAltScreen(),
6060
)
6161

@@ -78,7 +78,7 @@ func main() {
7878
}()
7979

8080
// Setup the subscriptions, this will send services events to the TUI
81-
ch, cancelSubs := setupSubscriptions(app, ctx)
81+
ch, cancelSubs := setupSubscriptions(app_, ctx)
8282

8383
// Create a context for the TUI message handler
8484
tuiCtx, tuiCancel := context.WithCancel(ctx)
@@ -113,7 +113,7 @@ func main() {
113113
cancelSubs()
114114

115115
// Then shutdown the app
116-
app.Shutdown()
116+
app_.Shutdown()
117117

118118
// Then cancel TUI message handler
119119
tuiCancel()
Collapse file

‎packages/tui/internal/app/.DS_Store‎

Copy file name to clipboard
6 KB
Binary file not shown.
Collapse file

‎packages/tui/internal/tui/app/app.go‎ ‎packages/tui/internal/app/app.go‎packages/tui/internal/tui/app/app.go renamed to packages/tui/internal/app/app.go

Copy file name to clipboardExpand all lines: packages/tui/internal/app/app.go
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ import (
99
"log/slog"
1010

1111
tea "github.com/charmbracelet/bubbletea"
12+
"github.com/sst/opencode/internal/config"
1213
"github.com/sst/opencode/internal/fileutil"
14+
"github.com/sst/opencode/internal/state"
1315
"github.com/sst/opencode/internal/status"
14-
"github.com/sst/opencode/internal/tui/config"
15-
"github.com/sst/opencode/internal/tui/state"
16-
"github.com/sst/opencode/internal/tui/theme"
17-
"github.com/sst/opencode/internal/tui/util"
16+
"github.com/sst/opencode/internal/theme"
17+
"github.com/sst/opencode/internal/util"
1818
"github.com/sst/opencode/pkg/client"
1919
)
2020

Collapse file

‎packages/tui/internal/completions/files-folders.go‎

Copy file name to clipboardExpand all lines: packages/tui/internal/completions/files-folders.go
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"github.com/lithammer/fuzzysearch/fuzzy"
1010
"github.com/sst/opencode/internal/fileutil"
1111
"github.com/sst/opencode/internal/status"
12-
"github.com/sst/opencode/internal/tui/components/dialog"
12+
"github.com/sst/opencode/internal/components/dialog"
1313
)
1414

1515
type filesAndFoldersContextGroup struct {
Collapse file

‎…tui/internal/tui/components/chat/chat.go‎ ‎…ges/tui/internal/components/chat/chat.go‎packages/tui/internal/tui/components/chat/chat.go renamed to packages/tui/internal/components/chat/chat.go packages/tui/internal/tui/components/chat/chat.go renamed to packages/tui/internal/components/chat/chat.go

Copy file name to clipboardExpand all lines: packages/tui/internal/components/chat/chat.go
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ import (
66

77
"github.com/charmbracelet/lipgloss"
88
"github.com/charmbracelet/x/ansi"
9-
"github.com/sst/opencode/internal/tui/app"
10-
"github.com/sst/opencode/internal/tui/styles"
11-
"github.com/sst/opencode/internal/tui/theme"
9+
"github.com/sst/opencode/internal/app"
10+
"github.com/sst/opencode/internal/styles"
11+
"github.com/sst/opencode/internal/theme"
1212
)
1313

1414
type SendMsg struct {
Collapse file

‎…i/internal/tui/components/chat/editor.go‎ ‎…s/tui/internal/components/chat/editor.go‎packages/tui/internal/tui/components/chat/editor.go renamed to packages/tui/internal/components/chat/editor.go packages/tui/internal/tui/components/chat/editor.go renamed to packages/tui/internal/components/chat/editor.go

Copy file name to clipboardExpand all lines: packages/tui/internal/components/chat/editor.go
+7-7Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ import (
1313
"github.com/charmbracelet/bubbles/textarea"
1414
tea "github.com/charmbracelet/bubbletea"
1515
"github.com/charmbracelet/lipgloss"
16+
"github.com/sst/opencode/internal/app"
17+
"github.com/sst/opencode/internal/components/dialog"
18+
"github.com/sst/opencode/internal/image"
19+
"github.com/sst/opencode/internal/layout"
1620
"github.com/sst/opencode/internal/status"
17-
"github.com/sst/opencode/internal/tui/app"
18-
"github.com/sst/opencode/internal/tui/components/dialog"
19-
"github.com/sst/opencode/internal/tui/image"
20-
"github.com/sst/opencode/internal/tui/layout"
21-
"github.com/sst/opencode/internal/tui/styles"
22-
"github.com/sst/opencode/internal/tui/theme"
23-
"github.com/sst/opencode/internal/tui/util"
21+
"github.com/sst/opencode/internal/styles"
22+
"github.com/sst/opencode/internal/theme"
23+
"github.com/sst/opencode/internal/util"
2424
)
2525

2626
type editorCmp struct {
Collapse file

‎…/internal/tui/components/chat/message.go‎ ‎…/tui/internal/components/chat/message.go‎packages/tui/internal/tui/components/chat/message.go renamed to packages/tui/internal/components/chat/message.go packages/tui/internal/tui/components/chat/message.go renamed to packages/tui/internal/components/chat/message.go

Copy file name to clipboardExpand all lines: packages/tui/internal/components/chat/message.go
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ import (
88

99
"github.com/charmbracelet/lipgloss"
1010
"github.com/charmbracelet/x/ansi"
11-
"github.com/sst/opencode/internal/tui/components/diff"
12-
"github.com/sst/opencode/internal/tui/styles"
13-
"github.com/sst/opencode/internal/tui/theme"
11+
"github.com/sst/opencode/internal/components/diff"
12+
"github.com/sst/opencode/internal/styles"
13+
"github.com/sst/opencode/internal/theme"
1414
"github.com/sst/opencode/pkg/client"
1515
"golang.org/x/text/cases"
1616
"golang.org/x/text/language"
Collapse file

‎…internal/tui/components/chat/messages.go‎ ‎…tui/internal/components/chat/messages.go‎packages/tui/internal/tui/components/chat/messages.go renamed to packages/tui/internal/components/chat/messages.go packages/tui/internal/tui/components/chat/messages.go renamed to packages/tui/internal/components/chat/messages.go

Copy file name to clipboardExpand all lines: packages/tui/internal/components/chat/messages.go
+5-5Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ import (
99
"github.com/charmbracelet/bubbles/viewport"
1010
tea "github.com/charmbracelet/bubbletea"
1111
"github.com/charmbracelet/lipgloss"
12-
"github.com/sst/opencode/internal/tui/app"
13-
"github.com/sst/opencode/internal/tui/components/dialog"
14-
"github.com/sst/opencode/internal/tui/state"
15-
"github.com/sst/opencode/internal/tui/styles"
16-
"github.com/sst/opencode/internal/tui/theme"
12+
"github.com/sst/opencode/internal/app"
13+
"github.com/sst/opencode/internal/components/dialog"
14+
"github.com/sst/opencode/internal/state"
15+
"github.com/sst/opencode/internal/styles"
16+
"github.com/sst/opencode/internal/theme"
1717
"github.com/sst/opencode/pkg/client"
1818
)
1919

Collapse file

‎…/internal/tui/components/chat/sidebar.go‎ ‎…/tui/internal/components/chat/sidebar.go‎packages/tui/internal/tui/components/chat/sidebar.go renamed to packages/tui/internal/components/chat/sidebar.go packages/tui/internal/tui/components/chat/sidebar.go renamed to packages/tui/internal/components/chat/sidebar.go

Copy file name to clipboardExpand all lines: packages/tui/internal/components/chat/sidebar.go
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ import (
77

88
tea "github.com/charmbracelet/bubbletea"
99
"github.com/charmbracelet/lipgloss"
10-
"github.com/sst/opencode/internal/tui/app"
11-
"github.com/sst/opencode/internal/tui/state"
12-
"github.com/sst/opencode/internal/tui/styles"
13-
"github.com/sst/opencode/internal/tui/theme"
10+
"github.com/sst/opencode/internal/app"
11+
"github.com/sst/opencode/internal/state"
12+
"github.com/sst/opencode/internal/styles"
13+
"github.com/sst/opencode/internal/theme"
1414
)
1515

1616
type sidebarCmp struct {

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.