Refactor pkg/lmcli/provider
Moved `ChangeCompletionInterface` to `pkg/api`, moved individual providers to `pkg/api/provider`
This commit is contained in:
@@ -3,8 +3,8 @@ package chat
|
||||
import (
|
||||
"time"
|
||||
|
||||
"git.mlow.ca/mlow/lmcli/pkg/api"
|
||||
models "git.mlow.ca/mlow/lmcli/pkg/lmcli/model"
|
||||
"git.mlow.ca/mlow/lmcli/pkg/lmcli/provider"
|
||||
"git.mlow.ca/mlow/lmcli/pkg/tui/shared"
|
||||
"github.com/charmbracelet/bubbles/cursor"
|
||||
"github.com/charmbracelet/bubbles/spinner"
|
||||
@@ -17,7 +17,7 @@ import (
|
||||
// custom tea.Msg types
|
||||
type (
|
||||
// sent on each chunk received from LLM
|
||||
msgResponseChunk provider.Chunk
|
||||
msgResponseChunk api.Chunk
|
||||
// sent when response is finished being received
|
||||
msgResponseEnd string
|
||||
// a special case of common.MsgError that stops the response waiting animation
|
||||
@@ -83,7 +83,7 @@ type Model struct {
|
||||
editorTarget editorTarget
|
||||
stopSignal chan struct{}
|
||||
replyChan chan models.Message
|
||||
replyChunkChan chan provider.Chunk
|
||||
replyChunkChan chan api.Chunk
|
||||
persistence bool // whether we will save new messages in the conversation
|
||||
|
||||
// ui state
|
||||
@@ -115,7 +115,7 @@ func Chat(shared shared.Shared) Model {
|
||||
|
||||
stopSignal: make(chan struct{}),
|
||||
replyChan: make(chan models.Message),
|
||||
replyChunkChan: make(chan provider.Chunk),
|
||||
replyChunkChan: make(chan api.Chunk),
|
||||
|
||||
wrap: true,
|
||||
selectedMessage: -1,
|
||||
|
||||
Reference in New Issue
Block a user