provider

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound      = errors.New("session not found")
	ErrNotInstalled  = errors.New("provider not installed")
	ErrAlreadyExists = errors.New("session already migrated")
	ErrEmptySession  = errors.New("session has no messages")
)

Functions

This section is empty.

Types

type DiscoverOpts

type DiscoverOpts struct {
	ProjectFilter string
	Limit         int
}

type PathSpec

type PathSpec struct {
	Label string
	Path  string
	Env   string
}

type Provider

type Provider interface {
	ID() string
	DisplayName() string
	DefaultPaths() []PathSpec
	Installed() bool
	Discover(ctx context.Context, opts DiscoverOpts) ([]model.Summary, error)
	Load(ctx context.Context, ref SessionRef) (*model.Conversation, error)
	Write(ctx context.Context, conv *model.Conversation, opts WriteOpts) (*WriteResult, error)
	SupportsResume() bool
	ResumeCommand(result WriteResult) string
}

type SessionRef

type SessionRef struct {
	ID          string
	Provider    string
	StoragePath string
	ProjectPath string
}

type StubProvider

type StubProvider struct {
	// contains filtered or unexported fields
}

func NewStub

func NewStub(id, displayName, docURL string, paths ...PathSpec) *StubProvider

func (*StubProvider) DefaultPaths

func (s *StubProvider) DefaultPaths() []PathSpec

func (*StubProvider) Discover

func (*StubProvider) DisplayName

func (s *StubProvider) DisplayName() string

func (*StubProvider) DocURL

func (s *StubProvider) DocURL() string

func (*StubProvider) ID

func (s *StubProvider) ID() string

func (*StubProvider) Installed

func (s *StubProvider) Installed() bool

func (*StubProvider) Load

func (*StubProvider) ResumeCommand

func (s *StubProvider) ResumeCommand(WriteResult) string

func (*StubProvider) SupportsResume

func (s *StubProvider) SupportsResume() bool

func (*StubProvider) Write

type WriteOpts

type WriteOpts struct {
	ProjectPath string
	DryRun      bool
}

type WriteResult

type WriteResult struct {
	SessionID     string
	StoragePath   string
	ProjectPath   string
	AlreadyExists bool
}

Jump to

Keyboard shortcuts

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