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.
This commit is contained in:
@@ -3,7 +3,7 @@ package tui
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"git.mlow.ca/mlow/lmcli/pkg/api"
|
||||
"git.mlow.ca/mlow/lmcli/pkg/conversation"
|
||||
"git.mlow.ca/mlow/lmcli/pkg/lmcli"
|
||||
"git.mlow.ca/mlow/lmcli/pkg/tui/model"
|
||||
"git.mlow.ca/mlow/lmcli/pkg/tui/shared"
|
||||
@@ -130,13 +130,13 @@ func (m *Model) View() string {
|
||||
}
|
||||
|
||||
type LaunchOptions struct {
|
||||
InitialConversation *api.Conversation
|
||||
InitialConversation *conversation.Conversation
|
||||
InitialView shared.View
|
||||
}
|
||||
|
||||
type LaunchOption func(*LaunchOptions)
|
||||
|
||||
func WithInitialConversation(conv *api.Conversation) LaunchOption {
|
||||
func WithInitialConversation(conv *conversation.Conversation) LaunchOption {
|
||||
return func(opts *LaunchOptions) {
|
||||
opts.InitialConversation = conv
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user