Skip to content

Commit 0b68343

Browse files
committed
feat: removing log prefixing, as it was causing unexpected issues
1 parent 5b26d82 commit 0b68343

File tree

5 files changed

+147
-49
lines changed

5 files changed

+147
-49
lines changed

go.mod

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,36 @@ module github.com/nxtcoder17/runfile
33
go 1.22.7
44

55
require (
6-
github.com/charmbracelet/lipgloss v0.13.0
7-
github.com/charmbracelet/log v0.4.0
6+
github.com/alecthomas/chroma/v2 v2.14.0
7+
github.com/charmbracelet/bubbles v0.20.0
8+
github.com/charmbracelet/bubbletea v1.2.4
9+
github.com/charmbracelet/lipgloss v1.0.0
810
github.com/go-task/slim-sprig/v3 v3.0.0
911
github.com/joho/godotenv v1.5.1
1012
github.com/phuslu/log v1.0.112
1113
github.com/urfave/cli/v3 v3.0.0-alpha9
12-
golang.org/x/sync v0.8.0
14+
golang.org/x/sync v0.9.0
1315
sigs.k8s.io/yaml v1.4.0
1416
)
1517

1618
require (
19+
github.com/atotto/clipboard v0.1.4 // indirect
1720
github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
18-
github.com/charmbracelet/x/ansi v0.3.2 // indirect
19-
github.com/go-logfmt/logfmt v0.6.0 // indirect
21+
github.com/charmbracelet/x/ansi v0.4.5 // indirect
22+
github.com/charmbracelet/x/term v0.2.1 // indirect
23+
github.com/dlclark/regexp2 v1.11.0 // indirect
24+
github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect
25+
github.com/google/go-cmp v0.6.0 // indirect
2026
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
2127
github.com/mattn/go-isatty v0.0.20 // indirect
28+
github.com/mattn/go-localereader v0.0.1 // indirect
2229
github.com/mattn/go-runewidth v0.0.16 // indirect
30+
github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect
31+
github.com/muesli/cancelreader v0.2.2 // indirect
2332
github.com/muesli/termenv v0.15.2 // indirect
2433
github.com/rivo/uniseg v0.4.7 // indirect
34+
github.com/stretchr/testify v1.9.0 // indirect
2535
github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 // indirect
26-
golang.org/x/exp v0.0.0-20241004190924-225e2abe05e6 // indirect
27-
golang.org/x/sys v0.26.0 // indirect
36+
golang.org/x/sys v0.27.0 // indirect
37+
golang.org/x/text v0.3.8 // indirect
2838
)

go.sum

Lines changed: 39 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,52 @@
1+
github.com/MakeNowJust/heredoc v1.0.0 h1:cXCdzVdstXyiTqTvfqk9SDHpKNjxuom+DOlyEeQ4pzQ=
2+
github.com/MakeNowJust/heredoc v1.0.0/go.mod h1:mG5amYoWBHf8vpLOuehzbGGw0EHxpZZ6lCpQ4fNJ8LE=
3+
github.com/alecthomas/assert/v2 v2.7.0 h1:QtqSACNS3tF7oasA8CU6A6sXZSBDqnm7RfpLl9bZqbE=
4+
github.com/alecthomas/assert/v2 v2.7.0/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k=
5+
github.com/alecthomas/chroma/v2 v2.14.0 h1:R3+wzpnUArGcQz7fCETQBzO5n9IMNi13iIs46aU4V9E=
6+
github.com/alecthomas/chroma/v2 v2.14.0/go.mod h1:QolEbTfmUHIMVpBqxeDnNBj2uoeI4EbYP4i6n68SG4I=
7+
github.com/alecthomas/repr v0.4.0 h1:GhI2A8MACjfegCPVq9f1FLvIBS+DrQ2KQBFZP1iFzXc=
8+
github.com/alecthomas/repr v0.4.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4=
9+
github.com/atotto/clipboard v0.1.4 h1:EH0zSVneZPSuFR11BlR9YppQTVDbh5+16AmcJi4g1z4=
10+
github.com/atotto/clipboard v0.1.4/go.mod h1:ZY9tmq7sm5xIbd9bOK4onWV4S6X0u6GY7Vn0Yu86PYI=
111
github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k=
212
github.com/aymanbagabas/go-osc52/v2 v2.0.1/go.mod h1:uYgXzlJ7ZpABp8OJ+exZzJJhRNQ2ASbcXHWsFqH8hp8=
3-
github.com/charmbracelet/lipgloss v0.13.0 h1:4X3PPeoWEDCMvzDvGmTajSyYPcZM4+y8sCA/SsA3cjw=
4-
github.com/charmbracelet/lipgloss v0.13.0/go.mod h1:nw4zy0SBX/F/eAO1cWdcvy6qnkDUxr8Lw7dvFrAIbbY=
5-
github.com/charmbracelet/log v0.4.0 h1:G9bQAcx8rWA2T3pWvx7YtPTPwgqpk7D68BX21IRW8ZM=
6-
github.com/charmbracelet/log v0.4.0/go.mod h1:63bXt/djrizTec0l11H20t8FDSvA4CRZJ1KH22MdptM=
7-
github.com/charmbracelet/x/ansi v0.3.2 h1:wsEwgAN+C9U06l9dCVMX0/L3x7ptvY1qmjMwyfE6USY=
8-
github.com/charmbracelet/x/ansi v0.3.2/go.mod h1:dk73KoMTT5AX5BsX0KrqhsTqAnhZZoCBjs7dGWp4Ktw=
13+
github.com/charmbracelet/bubbles v0.20.0 h1:jSZu6qD8cRQ6k9OMfR1WlM+ruM8fkPWkHvQWD9LIutE=
14+
github.com/charmbracelet/bubbles v0.20.0/go.mod h1:39slydyswPy+uVOHZ5x/GjwVAFkCsV8IIVy+4MhzwwU=
15+
github.com/charmbracelet/bubbletea v1.2.4 h1:KN8aCViA0eps9SCOThb2/XPIlea3ANJLUkv3KnQRNCE=
16+
github.com/charmbracelet/bubbletea v1.2.4/go.mod h1:Qr6fVQw+wX7JkWWkVyXYk/ZUQ92a6XNekLXa3rR18MM=
17+
github.com/charmbracelet/lipgloss v1.0.0 h1:O7VkGDvqEdGi93X+DeqsQ7PKHDgtQfF8j8/O2qFMQNg=
18+
github.com/charmbracelet/lipgloss v1.0.0/go.mod h1:U5fy9Z+C38obMs+T+tJqst9VGzlOYGj4ri9reL3qUlo=
19+
github.com/charmbracelet/x/ansi v0.4.5 h1:LqK4vwBNaXw2AyGIICa5/29Sbdq58GbGdFngSexTdRM=
20+
github.com/charmbracelet/x/ansi v0.4.5/go.mod h1:dk73KoMTT5AX5BsX0KrqhsTqAnhZZoCBjs7dGWp4Ktw=
21+
github.com/charmbracelet/x/term v0.2.1 h1:AQeHeLZ1OqSXhrAWpYUtZyX1T3zVxfpZuEQMIQaGIAQ=
22+
github.com/charmbracelet/x/term v0.2.1/go.mod h1:oQ4enTYFV7QN4m0i9mzHrViD7TQKvNEEkHUMCmsxdUg=
923
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
1024
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
11-
github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4=
12-
github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs=
25+
github.com/dlclark/regexp2 v1.11.0 h1:G/nrcoOa7ZXlpoa/91N3X7mM3r8eIlMBBJZvsz/mxKI=
26+
github.com/dlclark/regexp2 v1.11.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8=
27+
github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f h1:Y/CXytFA4m6baUTXGLOoWe4PQhGxaX0KpnayAqC48p4=
28+
github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f/go.mod h1:vw97MGsxSvLiUE2X8qFplwetxpGLQrlU1Q9AUEIzCaM=
1329
github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI=
1430
github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8=
1531
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
1632
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
1733
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
34+
github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM=
35+
github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg=
1836
github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0=
1937
github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4=
2038
github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY=
2139
github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0=
2240
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
2341
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
42+
github.com/mattn/go-localereader v0.0.1 h1:ygSAOl7ZXTx4RdPYinUpg6W99U8jWvWi9Ye2JC/oIi4=
43+
github.com/mattn/go-localereader v0.0.1/go.mod h1:8fBrzywKY7BI3czFoHkuzRoWE9C+EiG4R1k4Cjx5p88=
2444
github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6TULQc=
2545
github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
46+
github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 h1:ZK8zHtRHOkbHy6Mmr5D264iyp3TiX5OmNcI5cIARiQI=
47+
github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6/go.mod h1:CJlz5H+gyd6CUWT45Oy4q24RdLyn7Md9Vj2/ldJBSIo=
48+
github.com/muesli/cancelreader v0.2.2 h1:3I4Kt4BQjOR54NavqnDogx/MIoWBFa0StPA8ELUXHmA=
49+
github.com/muesli/cancelreader v0.2.2/go.mod h1:3XuTXfFS2VjM+HTLZY9Ak0l6eUKfijIfMUZ4EgX0QYo=
2650
github.com/muesli/termenv v0.15.2 h1:GohcuySI0QmI3wN8Ok9PtKGkgkFIk7y6Vpb5PvrY+Wo=
2751
github.com/muesli/termenv v0.15.2/go.mod h1:Epx+iuz8sNs7mNKhxzH4fWXGNpZwUaJKRS1noLXviQ8=
2852
github.com/phuslu/log v1.0.112 h1:vQ0ZFd5O+in/0IQAcjuEl6wRkHiQPw7T0sqwmOjpL0U=
@@ -38,13 +62,14 @@ github.com/urfave/cli/v3 v3.0.0-alpha9 h1:P0RMy5fQm1AslQS+XCmy9UknDXctOmG/q/FZkU
3862
github.com/urfave/cli/v3 v3.0.0-alpha9/go.mod h1:0kK/RUFHyh+yIKSfWxwheGndfnrvYSmYFVeKCh03ZUc=
3963
github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 h1:gEOO8jv9F4OT7lGCjxCBTO/36wtF6j2nSip77qHd4x4=
4064
github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1/go.mod h1:Ohn+xnUBiLI6FVj/9LpzZWtj1/D6lUovWYBkxHVV3aM=
41-
golang.org/x/exp v0.0.0-20241004190924-225e2abe05e6 h1:1wqE9dj9NpSm04INVsJhhEUzhuDVjbcyKH91sVyPATw=
42-
golang.org/x/exp v0.0.0-20241004190924-225e2abe05e6/go.mod h1:NQtJDoLvd6faHhE7m4T/1IY708gDefGGjR/iUW8yQQ8=
43-
golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ=
44-
golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
65+
golang.org/x/sync v0.9.0 h1:fEo0HyrW1GIgZdpbhCRO0PkJajUS5H9IFUztCgEo2jQ=
66+
golang.org/x/sync v0.9.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
67+
golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
4568
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
46-
golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo=
47-
golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
69+
golang.org/x/sys v0.27.0 h1:wBqf8DvsY9Y/2P8gAfPDEYNuS30J4lPHJxXSb/nJZ+s=
70+
golang.org/x/sys v0.27.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
71+
golang.org/x/text v0.3.8 h1:nAL+RVCQ9uMn3vJZbV+MRnydTJFPf8qqY42YiA6MrqY=
72+
golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ=
4873
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
4974
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
5075
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=

pkg/logging/theme.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ func DefaultTheme() *Theme {
6262
LogLevelStyles: [6]lipgloss.Style{
6363
style.Foreground(lipgloss.Color("#bdbfbe")).Faint(true), // TRACE
6464
style.Foreground(lipgloss.Color("#bdbfbe")).Faint(true), // DEBUG
65-
style.UnsetBackground().Foreground(lipgloss.Color("#099dd6")).Faint(true), // INFO
65+
style.UnsetBackground().Foreground(lipgloss.Color("#099dd6")), // INFO
6666
style.UnsetBackground().Foreground(lipgloss.Color("#d6d609")).Faint(true), // WARN
6767
style.UnsetBackground().Foreground(lipgloss.Color("#c76975")), // ERROR
6868
style.UnsetBackground().Foreground(lipgloss.Color("#d6d609")).Bold(true), // UNKNOWN

pkg/runfile/run.go

Lines changed: 65 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package runfile
22

33
import (
44
"bufio"
5+
"bytes"
56
"errors"
67
"fmt"
78
"io"
@@ -11,6 +12,8 @@ import (
1112
"strings"
1213
"sync"
1314

15+
"github.com/alecthomas/chroma/v2/quick"
16+
"github.com/charmbracelet/lipgloss"
1417
fn "github.com/nxtcoder17/runfile/pkg/functions"
1518
"golang.org/x/sync/errgroup"
1619
)
@@ -130,6 +133,7 @@ func runTask(ctx Context, rf *Runfile, args runTaskArgs) *Error {
130133

131134
logger := ctx.With("task", args.taskName, "runfile", runfilePath)
132135
logger.Debug("running task")
136+
133137
task, ok := rf.Tasks[args.taskName]
134138
if !ok {
135139
return formatErr(TaskNotFound)
@@ -169,45 +173,79 @@ func runTask(ctx Context, rf *Runfile, args runTaskArgs) *Error {
169173
continue
170174
}
171175

172-
stdoutR, stdoutW := io.Pipe()
173-
stderrR, stderrW := io.Pipe()
174-
175-
wg := sync.WaitGroup{}
176-
177-
wg.Add(1)
178-
go func() {
179-
defer wg.Done()
180-
logPrefix := fmt.Sprintf("%s ", ctx.theme.TaskPrefixStyle.Render(fmt.Sprintf("[%s]", strings.Join(trail, "/"))))
181-
// processOutput(os.Stdout, stdoutR, &logPrefix)
182-
processOutput(&outputWriter{writer: os.Stdout}, stdoutR, &logPrefix)
183-
}()
184-
185-
wg.Add(1)
186-
go func() {
187-
defer wg.Done()
188-
logPrefix := fmt.Sprintf("%s ", ctx.theme.TaskPrefixStyle.Render(fmt.Sprintf("[%s]", strings.Join(trail, "/"))))
189-
// processOutputLineByLine(os.Stderr, stderrR, &logPrefix)
190-
processOutput(&outputWriter{writer: os.Stderr}, stderrR, &logPrefix)
191-
// processOutputLineByLine(os.Stderr, stderrR, &logPrefix)
192-
}()
176+
// stdoutR, stdoutW := io.Pipe()
177+
// stderrR, stderrW := io.Pipe()
178+
179+
// wg := sync.WaitGroup{}
180+
181+
// [snippet source](https://rderik.com/blog/identify-if-output-goes-to-the-terminal-or-is-being-redirected-in-golang/)
182+
// stdout, _ := os.Stdout.Stat()
183+
// stderr, _ := os.Stderr.Stat()
184+
// isTTY := ((stdout.Mode() & os.ModeCharDevice) == os.ModeCharDevice) && ((stderr.Mode() & os.ModeCharDevice) == os.ModeCharDevice)
185+
//
186+
// if isTTY {
187+
// go func() {
188+
// defer wg.Done()
189+
// logPrefix := fmt.Sprintf("%s ", ctx.theme.TaskPrefixStyle.Render(fmt.Sprintf("[%s]", strings.Join(trail, "/"))))
190+
// processOutput(os.Stdout, stdoutR, &logPrefix)
191+
//
192+
// stderrPrefix := fmt.Sprintf("%s ", ctx.theme.TaskPrefixStyle.Render(fmt.Sprintf("[%s/stderr]", strings.Join(trail, "/"))))
193+
// processOutput(os.Stderr, stderrR, &stderrPrefix)
194+
// }()
195+
// } else {
196+
// wg.Add(1)
197+
// go func() {
198+
// defer wg.Done()
199+
// logPrefix := fmt.Sprintf("%s ", ctx.theme.TaskPrefixStyle.Render(fmt.Sprintf("[%s]", strings.Join(trail, "/"))))
200+
// processOutput(os.Stdout, stdoutR, &logPrefix)
201+
// // if pt.Interactive {
202+
// // processOutput(os.Stdout, stdoutR, &logPrefix)
203+
// // return
204+
// // }
205+
// // processOutputLineByLine(os.Stdout, stdoutR, &logPrefix)
206+
// }()
207+
//
208+
// wg.Add(1)
209+
// go func() {
210+
// defer wg.Done()
211+
// logPrefix := fmt.Sprintf("%s ", ctx.theme.TaskPrefixStyle.Render(fmt.Sprintf("[%s/stderr]", strings.Join(trail, "/"))))
212+
// processOutput(os.Stderr, stderrR, &logPrefix)
213+
// // if pt.Interactive {
214+
// // processOutput(os.Stderr, stderrR, &logPrefix)
215+
// // return
216+
// // }
217+
// // processOutputLineByLine(os.Stderr, stderrR, &logPrefix)
218+
// }()
219+
//
220+
// }
221+
222+
s := lipgloss.NewStyle().BorderForeground(lipgloss.Color("#4388cc")).PaddingLeft(1).PaddingRight(1).Border(lipgloss.RoundedBorder(), true, true, true, true)
223+
224+
hlCode := new(bytes.Buffer)
225+
quick.Highlight(hlCode, strings.TrimSpace(command.Command), "bash", "terminal16m", "onedark")
226+
227+
fmt.Printf("%s\n", s.Render(hlCode.String()))
193228

194229
cmd := createCommand(ctx, cmdArgs{
195230
shell: pt.Shell,
196231
env: ToEnviron(pt.Env),
197232
cmd: command.Command,
198233
workingDir: pt.WorkingDir,
199234
interactive: pt.Interactive,
200-
stdout: stdoutW,
201-
stderr: stderrW,
235+
stdout: os.Stdout,
236+
stderr: os.Stderr,
237+
// stdout: stdoutW,
238+
// stderr: stderrW,
202239
})
240+
203241
if err := cmd.Run(); err != nil {
204242
return formatErr(CommandFailed).WithErr(err)
205243
}
206244

207-
stdoutW.Close()
208-
stderrW.Close()
209-
210-
wg.Wait()
245+
// stdoutW.Close()
246+
// stderrW.Close()
247+
//
248+
// wg.Wait()
211249
}
212250

213251
return nil

pkg/runfile/tui.go

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
package runfile
2+
3+
import (
4+
"github.com/charmbracelet/bubbles/textarea"
5+
tea "github.com/charmbracelet/bubbletea"
6+
)
7+
8+
type model struct {
9+
label string
10+
}
11+
12+
func (m model) Init() tea.Cmd {
13+
return textarea.Blink
14+
}
15+
16+
func (m model) View() string {
17+
// s := lipgloss.NewStyle().Border(lipgloss.BlockBorder(), false, false, false, true)
18+
// return fmt.Sprintf(
19+
// "%s%s%s",
20+
// m.viewport.View(),
21+
// gap,
22+
// m.textarea.View(),
23+
// )
24+
return ""
25+
}

0 commit comments

Comments
 (0)