Private
Public Access
1
0

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:
2024-10-20 02:38:42 +00:00
parent 2ea8a73eb5
commit 0384c7cb66
33 changed files with 701 additions and 626 deletions

View File

@@ -28,12 +28,12 @@ func RetryCmd(ctx *lmcli.Context) *cobra.Command {
}
shortName := args[0]
conversation := cmdutil.LookupConversation(ctx, shortName)
c := cmdutil.LookupConversation(ctx, shortName)
// Load the complete thread from the root message
messages, err := ctx.Store.PathToLeaf(conversation.SelectedRoot)
messages, err := ctx.Conversations.PathToLeaf(c.SelectedRoot)
if err != nil {
return fmt.Errorf("Could not retrieve messages for conversation: %s", conversation.Title)
return fmt.Errorf("Could not retrieve messages for conversation: %s", c.Title)
}
offset, _ := cmd.Flags().GetInt("offset")
@@ -67,7 +67,7 @@ func RetryCmd(ctx *lmcli.Context) *cobra.Command {
if len(args) != 0 {
return nil, compMode
}
return ctx.Store.ConversationShortNameCompletions(toComplete), compMode
return ctx.Conversations.ConversationShortNameCompletions(toComplete), compMode
},
}