Commit Graph

232 Commits

Author SHA1 Message Date
Matt Low 2ad93394b1 tui: removed scrollbar 2024-03-17 22:55:02 +00:00
Matt Low f49b772960 tui: minor fixed and cleanup 2024-03-17 22:55:02 +00:00
Matt Low 29d8138dc0 tui: update lodos 2024-03-17 22:55:02 +00:00
Matt Low 3756f6d9e4 tui: add response waiting spinner 2024-03-17 22:55:02 +00:00
Matt Low 41916eb7b3 tui: add LLM response error handling
+ various other small tweaks
2024-03-17 22:55:02 +00:00
Matt Low 3892e68251 tui: add a "scroll bar" and error view 2024-03-17 22:55:02 +00:00
Matt Low 8697284064 tui: generate titles for conversations 2024-03-17 22:55:02 +00:00
Matt Low 383d34f311 tui: persist new conversations as well 2024-03-17 22:55:02 +00:00
Matt Low ac0e380244 tui: add reply persistence 2024-03-17 22:55:02 +00:00
Matt Low c3a3cb0181 tui: improve footer rendering
Made it easier to add segmemts later, better handling of padding
2024-03-17 22:55:02 +00:00
Matt Low 612ea90417 tui: slight function order change 2024-03-17 22:55:02 +00:00
Matt Low 94508b1dbf tui: cache highlighted messages
Syntax highlighting is fairly expensive, and this means we no longer
need to do syntax highlighting on the entire conversaion each time a new
message chunk is received
2024-03-17 22:55:02 +00:00
Matt Low 7e002e5214 tui: adjust message header styling 2024-03-17 22:55:02 +00:00
Matt Low 48e4dea3cf tui: style tweaks 2024-03-17 22:55:02 +00:00
Matt Low 0ab552303d tui: add contentStyle, applied to overall viewport content 2024-03-17 22:55:02 +00:00
Matt Low 6ce42a77f9 tui: update TODO 2024-03-17 22:55:02 +00:00
Matt Low 2cb1a0005d tui: fix conversation loading 2024-03-17 22:55:02 +00:00
Matt Low ea78edf039 tui: use EnabledTools from lmcli.Context 2024-03-17 22:55:02 +00:00
Matt Low 793aaab50e tui: styling tweak 2024-03-17 22:55:02 +00:00
Matt Low 5afc9667c7 tui: add header with title 2024-03-17 22:55:02 +00:00
Matt Low dfafc573e5 tui: handle multi part responses 2024-03-17 22:55:02 +00:00
Matt Low 97f81a0cbb tui: scroll content view with output
clean up msgResponseChunk handling
2024-03-17 22:55:02 +00:00
Matt Low eca120cde6 tui: ability to cancel request in flight 2024-03-17 22:55:02 +00:00
Matt Low 12d4e495d4 tui: add focus switching between input/messages view 2024-03-17 22:55:02 +00:00
Matt Low d8c8262890 tui: removed confirm before send, dynamic footer
footer now rendered based on model data, instead of being set to a fixed
string
2024-03-17 22:55:02 +00:00
Matt Low 758f74aba5 tui: use ctx chroma highlighter 2024-03-17 22:55:02 +00:00
Matt Low 1570c23d63 Add initial TUI 2024-03-17 22:55:02 +00:00
Matt Low 46149e0b67 Attempt to fix anthropic tool calling
Models have been way too eager to use tools when the task does not
require it (for example, reading the filesystem in order to show an
code example)
2024-03-17 22:55:02 +00:00
Matt Low c2c61e2aaa Improve title generation prompt performance
The previous prompt was utterly broken with Anthropic models, they would
just try to continue the conversation
2024-03-17 22:55:02 +00:00
Matt Low 5e880d3b31 Lead anthropic function call XML with newline 2024-03-17 22:55:02 +00:00
Matt Low 62f07dd240 Fix double reply callback on tool calls 2024-03-17 22:55:02 +00:00
Matt Low ec1f326c2a Add store.AddReply 2024-03-14 06:01:42 +00:00
Matt Low db116660a5 Removed tool usage logging to stdout 2024-03-14 06:01:42 +00:00
Matt Low 32eab7aa35 Update anthropic function/tool calling
Strip the function call XML from the returned/saved content, which
should allow for model switching between openai/anthropic (and
others?) within the same conversation involving tool calls.

This involves reconstructing the function call XML when sending requests
to anthropic
2024-03-12 20:54:02 +00:00
Matt Low 91d3c9c2e1 Update ChatCompletionClient
Instead of CreateChatCompletion* accepting a pointer to a slice of reply
messages, it accepts a callback which is called with each successive
reply the conversation.

This gives the caller more flexibility in how it handles replies (e.g.
it can react to them immediately now, instead of waiting for the entire
call to finish)
2024-03-12 20:39:34 +00:00
Matt Low 8bdb155bf7 Update ChatCompletionClient to accept context.Context 2024-03-12 18:24:46 +00:00
Matt Low 045146bb5c Moved flag 2024-03-12 08:03:04 +00:00
Matt Low 2c7bdd8ebf Store enabled tools in lmcli.Context 2024-03-12 08:01:53 +00:00
Matt Low 7d56726c78 Add --model flag completion 2024-03-12 07:43:57 +00:00
Matt Low f2c7d2bdd0 Store ChromaHighlighter in lmcli.Context and use it
In preparation for TUI
2024-03-12 07:43:40 +00:00
Matt Low 0a27b9a8d3 Project refactor, add anthropic API support
- Split pkg/cli/cmd.go into new pkg/cmd package
- Split pkg/cli/functions.go into pkg/lmcli/tools package
- Refactor pkg/cli/openai.go to pkg/lmcli/provider/openai

Other changes:

- Made models configurable
- Slight config reorganization
2024-03-12 01:01:19 -06:00
Matt Low 2611663168 Add --count flag to list command, lower default from 25 to 5 2024-02-22 05:07:16 +00:00
Matt Low 120e61e88b Fixed variable shadowing bug in ls command 2024-02-22 05:00:46 +00:00
Matt Low fa966d30db Update README.md 2024-01-11 10:27:11 -07:00
Matt Low 51ce74ad3a Add --offset flag to edit command 2024-01-09 18:10:05 +00:00
Matt Low b93ee94233 Rename `lsCmd` to `listCmd`, add `ls` as an alias 2024-01-03 17:45:02 +00:00
Matt Low db788760a3 Adjust help messages 2024-01-03 17:27:58 +00:00
Matt Low 242ed886ec Show lmcli usage by default 2024-01-03 17:27:58 +00:00
Matt Low 02a23b9035 Add clone command
Used RunE instead of Run, make adjustments to rootCmd so that we control
how error messages are printed (in main())
2024-01-03 17:26:57 +00:00
Matt Low b3913d0027 Add limit to number of conversations shown by default by `lmcli ls` 2024-01-03 17:26:09 +00:00