Agent runtime: majordomo in-process, Ollama Cloud config, chat endpoint (#56) (#70)
Build image / build-and-push (push) Successful in 6s
Build image / build-and-push (push) Successful in 6s
Co-authored-by: Steve Dudenhoeffer <[email protected]>
This commit was merged in pull request #70.
This commit is contained in:
@@ -191,6 +191,28 @@ type JournalEntry struct {
|
||||
AuthorName string `json:"authorName,omitempty"`
|
||||
}
|
||||
|
||||
// Roles a stored agent message can have.
|
||||
const (
|
||||
AgentRoleUser = "user"
|
||||
AgentRoleAssistant = "assistant"
|
||||
)
|
||||
|
||||
// AgentMessage is one side of a chat exchange with the garden assistant. Only
|
||||
// the text is kept, not the model's full transcript with its tool calls:
|
||||
// continuity needs what was said and what came back, and replaying a stored tool
|
||||
// call would be replaying a decision made against a garden that has since moved
|
||||
// on.
|
||||
type AgentMessage struct {
|
||||
ID int64 `json:"id"`
|
||||
ConversationID int64 `json:"conversationId"`
|
||||
Role string `json:"role"`
|
||||
Body string `json:"body"`
|
||||
// ChangeSetID is what this turn changed, if anything — the handle the chat
|
||||
// panel needs to offer Undo on the message that caused it.
|
||||
ChangeSetID *int64 `json:"changeSetId,omitempty"`
|
||||
CreatedAt string `json:"createdAt"`
|
||||
}
|
||||
|
||||
// RevertConflict reports one entity a revert deliberately left alone, because
|
||||
// reverting it would have discarded a change made after the change set being
|
||||
// reverted. The rest of the change set still reverts.
|
||||
|
||||
Reference in New Issue
Block a user