Commit Graph

13 Commits

Author SHA1 Message Date
ec21a02ec0 Tweaks/cleanups to conversation management in tui
- Pass around message/conversation values instead of pointers where it
makes more sense, and store values instead of pointers in the globally
(within the TUI) shared `App` (pointers provide no utility here).

- Split conversation persistence into separate conversation/message
  saving stages
2024-10-25 16:57:15 +00:00
07c96082e7 Add LastMessageAt field to conversation
Replaced `LatestConversationMessages` with `LoadConversationList`, which
utilizes `LastMessageAt` for much faster conversation loading in the
conversation listing TUI and `lmcli list` command.
2024-10-22 17:53:13 +00:00
0384c7cb66 Large refactor - it compiles!
This refactor splits out all conversation concerns into a new
`conversation` package. There is now a split between `conversation` and
`api`s representation of `Message`, the latter storing the minimum
information required for interaction with LLM providers. There is
necessary conversation between the two when making LLM calls.
2024-10-22 17:53:13 +00:00
93c2fb3d1e tui: revamp footer (some more)
Simplified layout logic, reorganized elements
2024-10-03 16:47:28 +00:00
5d13c3e056 Add metadata json field to Message, store generation model/provider 2024-09-30 17:44:43 +00:00
327a128b2f Moved api.ChatCompletionProvider, api.Chunk to api/provider 2024-09-30 16:15:42 +00:00
69cdc0a5aa tui: Add setting view with support for changing the current model 2024-09-26 18:32:22 +00:00
3ec2675632 tui: Error handling tweak
Moved errors to bottom of screen, fix infinite loop by typing errors
properly
2024-09-23 04:43:26 +00:00
a46d211e10 Improve TUI system prompt handling
+ allow setting a default agent
2024-09-23 03:00:03 +00:00
b8e3172ce0 Start new conversations from TUI 2024-09-21 02:47:03 +00:00
a488ec4fd8 Fixed message loading
Root messages weren't being loaded since the refactor, and there was
dead code
2024-09-21 02:32:54 +00:00
24b5cdbbf6 More monior TUI refactor/cleanup
`tui/tui.go` is no longer responsible for passing window resize updates
to all views, instead we request a new window size message to be sent at
the same time we enter the view, allowing the view to catch and handle
it.

Add `Initialized` to `tui/shared/View` model, now we only call
`Init` on a view before entering it for the first time, rather than
calling `Init` on all views when the application starts.

Renames file, small cleanups
2024-09-16 14:04:08 +00:00
443c8096d3 TUI refactor
- Clean up, improved startup logic, initial conversation load
- Moved converation/message business logic (mostly) into `model/tui`
2024-09-16 00:48:45 +00:00