Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
## Panda

A terminal user interface for chatting with LLMs.

I started this project because I wanted something lightweight that I can run in my terminal to talk with LLMs.
I could not keep up the project with my work and the everchanging landscape of LLMs and their capabilities. I also realized that the terminal is not the right interface for this kind of thing.

However, I had to finish this and get a v0 out (have a bad habit of not being able to move on to a new side-project otherwise). Right now it can only talk to OpenAI's API (you need an OpenAI API Key) and is very basic in features.

![Screenshot](docs/images/screenshot.png)

### Usage

Install with `go install github.com/aavshr/panda@latest` and run with `panda`.

Clone the repository and build with `make build` if you just want to build it yourself.

**Navigation**

- `Esc` to focus out of a section
- `Enter` to focus into a section
- Use arrow keys or `hjkl` to navigate

**Chat**

- Use `Tab` to send a message

**History**

- Use `Enter` to start a new chat in that thread
- Use `Ctrl + D` to delete a thread
- Use `/` to filter threads
Binary file added docs/images/screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion internal/ui/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
"slices"
"time"

"github.com/aavshr/panda/internal/config"

Check failure on line 11 in internal/ui/handlers.go

View workflow job for this annotation

GitHub Actions / lint-build-test

could not import github.com/aavshr/panda/internal/config (-: cannot compile Go 1.23 code) (typecheck)
"github.com/aavshr/panda/internal/db"
"github.com/aavshr/panda/internal/ui/components"
"github.com/aavshr/panda/internal/ui/styles"

Check failure on line 14 in internal/ui/handlers.go

View workflow job for this annotation

GitHub Actions / lint-build-test

could not import github.com/aavshr/panda/internal/ui/styles (-: cannot compile Go 1.23 code) (typecheck)
"github.com/aavshr/panda/internal/utils"

Check failure on line 15 in internal/ui/handlers.go

View workflow job for this annotation

GitHub Actions / lint-build-test

could not import github.com/aavshr/panda/internal/utils (-: cannot compile Go 1.23 code) (typecheck)
tea "github.com/charmbracelet/bubbletea"
)

Expand Down Expand Up @@ -124,7 +124,7 @@
// TODO: more robust behavior for thread creation
// first thread is always for new thread
if m.activeThreadIndex == 0 {
n := 20
n := 25
if len(msg.Value) < n {
n = len(msg.Value)
}
Expand Down
4 changes: 2 additions & 2 deletions internal/ui/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@
m.historyModel = components.NewListModel(&components.NewListModelInput{
Title: titleHistory,
Items: components.NewThreadListItems(m.threads),
Width: conf.historyWidth - 18, // padding
Height: conf.historyHeight - 10, // padding
Width: conf.historyWidth,
Height: conf.historyHeight,
Delegate: components.NewThreadListItemDelegate(),
AllowInfiniteScrolling: false,
})
Expand All @@ -137,7 +137,7 @@
m.chatInputModel = components.NewChatInputModel(conf.chatInputWidth, conf.chatInputHeight)

listContainer := styles.ListContainerStyle()
historyContainer := listContainer.Copy().

Check failure on line 140 in internal/ui/model.go

View workflow job for this annotation

GitHub Actions / lint-build-test

declared and not used: historyContainer (typecheck)
Width(m.conf.historyWidth).
Height(m.conf.historyHeight)
messagesContainer := listContainer.Copy().
Expand Down
Loading