attachments

package
v0.1.57 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 22, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultMaxAttachments = 10
	DefaultMaxTotalBytes  = 50 * 1024 * 1024

	DefaultMaxImageBytes = 10 * 1024 * 1024
	DefaultMaxPDFBytes   = 20 * 1024 * 1024
	DefaultMaxAudioBytes = 25 * 1024 * 1024
	DefaultMaxFileBytes  = 20 * 1024 * 1024
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	SessionsDir    string
	SessionID      string
	WorkspaceRoot  string
	MaxAttachments int
	MaxTotalBytes  int64
	MaxImageBytes  int64
	MaxPDFBytes    int64
	MaxAudioBytes  int64
	MaxFileBytes   int64
}

type Prepared

type Prepared struct {
	Ref core.AttachmentRef
}

func Prepare

func Prepare(ctx context.Context, sources []Source, opts Options) ([]Prepared, error)

func PrepareMessageParts

func PrepareMessageParts(ctx context.Context, text string, sources []Source, opts Options) ([]core.MessagePart, []Prepared, error)

type Source

type Source struct {
	Path        string
	DisplayName string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL