Commit graph

161 commits

Author SHA1 Message Date
Toby Padilla d79049bab7 feat: use cool spinner by default 2023-04-25 20:04:06 -05:00
Toby Padilla 16aeaf0819 feat: limit prompt chars to model max 2023-04-24 18:08:54 -05:00
Christian Rocha 72e012002c
chore: remove extraneous const 2023-04-24 15:12:22 -04:00
Toby Padilla 20812482f4 feat: add flags to echo the prefix and stdin 2023-04-24 14:11:25 -05:00
Christian Rocha 4cd9dfb529 fix: use custom renderer for spinner styling 2023-04-24 13:46:20 -05:00
Christian Rocha e97e80cb73 chore: lint 2023-04-24 13:46:20 -05:00
Christian Rocha e1c6c413f0 feat: put cycling char spinner behind a flag; default to dots 2023-04-24 13:46:20 -05:00
Christian Rocha 359af0332b chore: also add spinner to alt-generator anim 2023-04-24 13:46:20 -05:00
Christian Rocha 0340162ffe chore: go mod tidy 2023-04-24 13:46:20 -05:00
Christian Rocha 0e982d34c1 feat: alternate-generating sequence 2023-04-24 13:46:20 -05:00
Toby Padilla 6c3c7e9669 fix: use original markdown prefix 2023-04-21 13:15:15 -05:00
Toby Padilla 5faeca8707 feat: refactor config and prefix 2023-04-21 13:15:10 -05:00
Carlos Alexandro Becker 6102d84a19
feat: add version flag
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-04-21 14:03:47 +00:00
Toby Padilla fdcf2cd72c chore: rename Model to mods 2023-04-20 16:46:42 -05:00
Toby Padilla c16c133307 fix: still show errors with -q flag 2023-04-20 13:57:54 -05:00
Toby Padilla f307d7f388 feat: move client calls and errors to bubble tea 2023-04-20 13:02:24 -05:00
Ayman Bagabas a23454d9b1 feat: tidy styles 2023-04-19 15:44:00 -05:00
Ayman Bagabas cc909e8b67 feat: use context to stop openai 2023-04-19 15:44:00 -05:00
Ayman Bagabas 8357b6c7b1 feat: cache colors 2023-04-19 15:44:00 -05:00
Ayman Bagabas f0f1e6d3de feat: use color 237 to highlight env variable 2023-04-19 15:44:00 -05:00
Ayman Bagabas fd3641e4a1 fix: spinner race condition
There are two things writing to stderr, spinner and error messages.
Chat writes to stdout.

Run Chat in a goroutine and wait for it to finish. Meanwhile, run the
spinner with stderr in main. Once Chat finishes, exit the spinner and
print output to stdout.

This also uses a separate Lipgloss renderer for stderr instead of doing
the hacky `lipgloss.SetColorProfile(termenv.NewOutput...)`.

Add `prettyError` to style error messages with lipgloss.

Signed-off-by: Ayman Bagabas <ayman.bagabas@gmail.com>
2023-04-19 15:44:00 -05:00
Christian Rocha 562403d4e6
feat: add description in usage 2023-04-18 12:02:44 -04:00
Christian Rocha f524b4cdd6
chore: minor formatting edits to usage 2023-04-18 11:56:03 -04:00
Christian Rocha c2ab2982c0
chore(readme): add Charm footer 2023-04-18 07:35:57 -04:00
Christian Rocha 4c4a3e1c58
chore: add license 2023-04-18 07:34:33 -04:00
Christian Rocha 21540d32cf
fix(lint): ignore math/rand security warning 2023-04-18 07:31:51 -04:00
Christian Rocha ef70e90d5e
fix: pflag 'help requested' error 2023-04-18 07:29:16 -04:00
Christian Rocha 364e0843b7
fix(lint): don't export config 2023-04-18 07:21:20 -04:00
Christian Rocha 3d2de21b4a
feat: random example in usage 2023-04-17 22:09:51 -04:00
Toby Padilla 559044d90d feat: move to pflag 2023-04-17 18:46:13 -05:00
Toby Padilla 03aba7b9ef feat: added temperature, topP and max token flags 2023-04-13 18:37:57 -05:00
Toby Padilla 3515156a1c chore: bump deps 2023-04-12 18:35:30 -05:00
Maas Lalani 2dd2f4c814 feat: remove log.Fatal 2023-04-12 16:16:39 -05:00
Maas Lalani 078368f5f4 feat: -q, -t, -md alternative flag options 2023-04-12 12:32:18 -05:00
Ayman Bagabas c991b2ffbf
fix: use lipgloss renderer for spinner (#4)
* fix: use lipgloss renderer for spinner

tea programs should use a termenv output

* fix: print gpt output after spinner

Print GPT output last after tea draws its last frame and exits.

Fixes: https://github.com/charmbracelet/mods/pull/5

* fix: typo

---------

Co-authored-by: Christian Rocha <christian@rocha.is>
2023-04-12 12:43:59 -04:00
Carlos A Becker 9dc6885bcc fix: some linting issues
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2023-04-12 11:26:34 -05:00
Carlos A Becker 0d520c9cba build: add build/release process 2023-04-12 11:26:34 -05:00
Christian Rocha edd3c77634
fix: tighten gap between spinner and text
The dot spinner glyphs are two runes wide, however they visibly appear
more or less in the left half of the glyph leaving which gives them
a space on the right side that's about one cell wide.
2023-04-07 09:26:31 -04:00
Toby Padilla 3c303d25b9 chore: move main() to end of file 2023-04-06 11:44:22 -05:00
Toby Padilla e62eb85b90 feat: lip gloss styled usage 2023-04-06 11:39:32 -05:00
Maas Lalani 902191abd8
fix: use quitMsg 2023-04-03 21:05:43 -04:00
Maas Lalani 5fe33708d3 fix: package name and go version 2023-04-03 19:58:51 -05:00
Maas Lalani b781a8592a fix: --no-spinner flag 2023-04-03 19:58:33 -05:00
Maas Lalani 0843740438 feat: allow -s=false to hide spinner 2023-04-03 19:58:33 -05:00
Maas Lalani bd6241b357 chore(spinner): change Loading to Generating... 2023-04-03 19:58:33 -05:00
Maas Lalani 47401a9b5c chore: remove quitMsg 2023-04-03 19:58:33 -05:00
Maas Lalani 36c5c3d93c fix: detect ColorProfile from stderr 2023-04-03 19:58:33 -05:00
Maas Lalani e68be30ac7 feat(spinner): adds gum-like spinner to mod while waiting 2023-04-03 19:58:33 -05:00
Toby Padilla bdc93eeb7d chore: update openai api client 2023-04-03 16:28:32 -05:00
Carlos A Becker 370dc02edd fix: small improvements 2023-04-03 12:36:32 -05:00