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:
@@ -30,7 +30,7 @@ func RenameCmd(ctx *lmcli.Context) *cobra.Command {
|
||||
|
||||
generate, _ := cmd.Flags().GetBool("generate")
|
||||
if generate {
|
||||
messages, err := ctx.Store.PathToLeaf(conversation.SelectedRoot)
|
||||
messages, err := ctx.Conversations.PathToLeaf(conversation.SelectedRoot)
|
||||
if err != nil {
|
||||
return fmt.Errorf("Could not retrieve conversation messages: %v", err)
|
||||
}
|
||||
@@ -46,7 +46,7 @@ func RenameCmd(ctx *lmcli.Context) *cobra.Command {
|
||||
}
|
||||
|
||||
conversation.Title = title
|
||||
err = ctx.Store.UpdateConversation(conversation)
|
||||
err = ctx.Conversations.UpdateConversation(conversation)
|
||||
if err != nil {
|
||||
lmcli.Warn("Could not update conversation title: %v\n", err)
|
||||
}
|
||||
@@ -57,7 +57,7 @@ func RenameCmd(ctx *lmcli.Context) *cobra.Command {
|
||||
if len(args) != 0 {
|
||||
return nil, compMode
|
||||
}
|
||||
return ctx.Store.ConversationShortNameCompletions(toComplete), compMode
|
||||
return ctx.Conversations.ConversationShortNameCompletions(toComplete), compMode
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user