Documentation
¶
Overview ¶
Package export provides conversation export functionality in multiple formats. ABOUTME: Export interface and dispatcher for conversation exports ABOUTME: Supports multiple export formats (Markdown, JSON, HTML)
Package export provides conversation export functionality in multiple formats. ABOUTME: HTML exporter for conversations with syntax highlighting ABOUTME: Uses Chroma for code block syntax highlighting with color themes
Package export provides conversation export functionality in multiple formats. ABOUTME: JSON exporter for conversations with full structure ABOUTME: Produces complete JSON export suitable for parsing and round-trip
Package export provides conversation export functionality in multiple formats. ABOUTME: Markdown exporter for conversations with frontmatter metadata ABOUTME: Produces clean, readable Markdown with YAML frontmatter
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ConversationData ¶
type ConversationData struct {
ID string `json:"id"`
Title string `json:"title"`
Model string `json:"model"`
SystemPrompt string `json:"system_prompt,omitempty"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
}
ConversationData represents conversation metadata
type ConversationExport ¶
type ConversationExport struct {
Conversation ConversationData `json:"conversation"`
Messages []MessageData `json:"messages"`
}
ConversationExport represents the full conversation export structure
type Exporter ¶
type Exporter interface {
Export(conv *storage.Conversation, messages []*storage.Message, w io.Writer) error
}
Exporter defines the interface for conversation exporters
type HTMLExporter ¶
type HTMLExporter struct{}
HTMLExporter exports conversations as HTML with syntax highlighting
func (*HTMLExporter) Export ¶
func (e *HTMLExporter) Export(conv *storage.Conversation, messages []*storage.Message, w io.Writer) error
Export implements the Exporter interface for HTML format
type JSONExporter ¶
type JSONExporter struct{}
JSONExporter exports conversations as JSON
func (*JSONExporter) Export ¶
func (e *JSONExporter) Export(conv *storage.Conversation, messages []*storage.Message, w io.Writer) error
Export implements the Exporter interface for JSON format
type MarkdownExporter ¶
type MarkdownExporter struct{}
MarkdownExporter exports conversations as Markdown with YAML frontmatter
func (*MarkdownExporter) Export ¶
func (e *MarkdownExporter) Export(conv *storage.Conversation, messages []*storage.Message, w io.Writer) error
Export implements the Exporter interface for Markdown format
type MessageData ¶
type MessageData struct {
ID string `json:"id"`
ConversationID string `json:"conversation_id"`
Role string `json:"role"`
Content string `json:"content"`
ToolCalls json.RawMessage `json:"tool_calls,omitempty"`
Metadata json.RawMessage `json:"metadata,omitempty"`
CreatedAt string `json:"created_at"`
}
MessageData represents a message with metadata