Finalize conversation and execution group documentation

This commit is contained in:
2026-11-14 01:35:06 +00:00
parent 31cc0069fc
commit 5c135c5b28
13 changed files with 96 additions and 18 deletions

View File

@@ -4,7 +4,9 @@ import "go.maximumdirect.net/promptkit/internal/domain"
const exchangeString = "promptkit.Exchange{opaque}"
// Exchange is an immutable, in-process snapshot of a completed conversation.
// Exchange is an immutable, reusable in-process snapshot of a completed
// conversation. It is not a persistence or restart format. Different engines
// can continue it, and independent branches do not alter one another.
type Exchange struct{ internal *domain.Exchange }
// ExchangeDetails contains a detached copy of an exchange's logical history.
@@ -14,7 +16,8 @@ type ExchangeDetails struct {
Messages []RenderedMessage `json:"messages"`
}
// Details returns detached history, or zero details for an empty handle.
// Details returns detached history, or zero details for a nil or empty handle.
// Messages include caller and model content and require appropriate handling.
func (e *Exchange) Details() ExchangeDetails {
if e == nil || e.internal == nil {
return ExchangeDetails{}