Documentation
¶
Index ¶
- func EnsureSessionImageAssets(sess *session.Session)
- func ExtractLineRange(content string, startLine, endLine int) string
- func IsUnavailableError(err error) bool
- func NextSessionImageID(sess *session.Session) int
- func NormalizeProviderType(value string) (string, bool)
- func ResolvePastedLineReference(input string, state PastedState) (string, error)
- func ResolvePastedSelection(state PastedState, pasteID, startLineStr, endLineStr string) (string, error)
- func ResolveSessionID(summaries []session.Summary, prefix string) (string, error)
- type ActiveSkill
- type CompactSessionResult
- type Dependencies
- type FileType
- type ImagePayload
- type PastedContent
- type PastedState
- type Service
- func (s *Service) ActivateSkill(sess *session.Session, name string, args map[string]string) (SkillActivation, error)
- func (s *Service) ApplyStartupField(req StartupFieldRequest) (StartupFieldResult, error)
- func (s *Service) ClearActiveSkill(sess *session.Session) (SkillClearResult, error)
- func (s *Service) CompactSession(sess *session.Session) (CompactSessionResult, error)
- func (s *Service) DeleteSkill(sess *session.Session, name string) (SkillDeleteResult, error)
- func (s *Service) EnsureSessionImageAssets(sess *session.Session)
- func (s *Service) FindSessionAssetByImageID(sess *session.Session, imageID int) (StoredImageRef, bool)
- func (s *Service) HydrateHistoricalAssets(sess *session.Session, current map[string]ImagePayload) map[string]ImagePayload
- func (s *Service) ListSessions(limit int) ([]session.Summary, error)
- func (s *Service) LoadPastedContents(sess *session.Session) (PastedState, error)
- func (s *Service) LoadRecentPrompts(limit int) ([]history.PromptEntry, error)
- func (s *Service) LoadSessionImageAsset(sess *session.Session, assetID string) (assets.ImageBlob, error)
- func (s *Service) LoadSkillCatalog(sess *session.Session) (SkillCatalog, error)
- func (s *Service) NewSession(workspace string) (*session.Session, error)
- func (s *Service) NextSessionImageID(sess *session.Session) int
- func (s *Service) PutSessionImage(sess *session.Session, imageID int, mediaType, fileName string, data []byte) (StoredImage, error)
- func (s *Service) PutSessionImageFromPath(sess *session.Session, imageID int, path string) (StoredImage, error)
- func (s *Service) ResumeSession(workspace, id string) (*session.Session, error)
- func (s *Service) RunPromptWithInput(ctx context.Context, sess *session.Session, prompt agent.RunPromptInput, ...) error
- func (s *Service) SavePastedContents(sess *session.Session, state PastedState) error
- func (s *Service) SaveSession(sess *session.Session) error
- func (s *Service) VerifyStartupAPIKey(req StartupVerifyRequest) (StartupVerifyResult, error)
- type SkillActivation
- type SkillCatalog
- type SkillClearResult
- type SkillDeleteResult
- type SkillDescriptor
- type SkillDiagnostic
- type StartupFieldRequest
- type StartupFieldResult
- type StartupVerifyRequest
- type StartupVerifyResult
- type StoredImage
- type StoredImageRef
- type UIAPI
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractLineRange ¶
func IsUnavailableError ¶
func NextSessionImageID ¶
func NormalizeProviderType ¶
func ResolvePastedLineReference ¶
func ResolvePastedLineReference(input string, state PastedState) (string, error)
func ResolvePastedSelection ¶
func ResolvePastedSelection(state PastedState, pasteID, startLineStr, endLineStr string) (string, error)
Types ¶
type CompactSessionResult ¶
type Dependencies ¶
type ImagePayload ¶
type PastedContent ¶
type PastedContent struct {
ID string `json:"id"`
Content string `json:"content"`
Lines int `json:"lines"`
Time time.Time `json:"time"`
Preview string `json:"preview"`
}
func FindPastedContent ¶
func FindPastedContent(state PastedState, pasteID string) (PastedContent, bool)
type PastedState ¶
type PastedState struct {
NextID int
Order []string
Contents map[string]PastedContent
}
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(deps Dependencies) *Service
func (*Service) ActivateSkill ¶
func (*Service) ApplyStartupField ¶
func (s *Service) ApplyStartupField(req StartupFieldRequest) (StartupFieldResult, error)
func (*Service) ClearActiveSkill ¶
func (s *Service) ClearActiveSkill(sess *session.Session) (SkillClearResult, error)
func (*Service) CompactSession ¶
func (s *Service) CompactSession(sess *session.Session) (CompactSessionResult, error)
func (*Service) DeleteSkill ¶
func (*Service) EnsureSessionImageAssets ¶
func (*Service) FindSessionAssetByImageID ¶
func (*Service) HydrateHistoricalAssets ¶
func (s *Service) HydrateHistoricalAssets(sess *session.Session, current map[string]ImagePayload) map[string]ImagePayload
func (*Service) LoadPastedContents ¶
func (s *Service) LoadPastedContents(sess *session.Session) (PastedState, error)
func (*Service) LoadRecentPrompts ¶
func (s *Service) LoadRecentPrompts(limit int) ([]history.PromptEntry, error)
func (*Service) LoadSessionImageAsset ¶
func (*Service) LoadSkillCatalog ¶
func (s *Service) LoadSkillCatalog(sess *session.Session) (SkillCatalog, error)
func (*Service) NewSession ¶
func (*Service) NextSessionImageID ¶
func (*Service) PutSessionImage ¶
func (*Service) PutSessionImageFromPath ¶
func (*Service) ResumeSession ¶
func (*Service) RunPromptWithInput ¶
func (*Service) SavePastedContents ¶
func (s *Service) SavePastedContents(sess *session.Session, state PastedState) error
func (*Service) VerifyStartupAPIKey ¶
func (s *Service) VerifyStartupAPIKey(req StartupVerifyRequest) (StartupVerifyResult, error)
type SkillActivation ¶
type SkillCatalog ¶
type SkillCatalog struct {
Active *ActiveSkill
Items []SkillDescriptor
Diagnostics []SkillDiagnostic
}
type SkillClearResult ¶
type SkillDeleteResult ¶
type SkillDescriptor ¶
type SkillDiagnostic ¶
type StartupFieldRequest ¶
type StartupFieldRequest struct {
Field string
Value string
ConfigPath string
Provider config.ProviderConfig
}
type StartupFieldResult ¶
type StartupFieldResult struct {
ConfigPath string
Provider config.ProviderConfig
}
type StartupVerifyRequest ¶
type StartupVerifyRequest struct {
APIKey string
ConfigPath string
Provider config.ProviderConfig
}
type StartupVerifyResult ¶
type StartupVerifyResult struct {
ConfigPath string
Provider config.ProviderConfig
Ready bool
Check provider.Availability
WrittenPath string
SaveErr error
}
type StoredImage ¶
type StoredImageRef ¶
type StoredImageRef struct {
AssetID llm.AssetID
Meta session.ImageAssetMeta
}
type UIAPI ¶
type UIAPI interface {
LoadSkillCatalog(sess *session.Session) (SkillCatalog, error)
ActivateSkill(sess *session.Session, name string, args map[string]string) (SkillActivation, error)
ClearActiveSkill(sess *session.Session) (SkillClearResult, error)
DeleteSkill(sess *session.Session, name string) (SkillDeleteResult, error)
NewSession(workspace string) (*session.Session, error)
ResumeSession(workspace, id string) (*session.Session, error)
SaveSession(sess *session.Session) error
ListSessions(limit int) ([]session.Summary, error)
LoadRecentPrompts(limit int) ([]history.PromptEntry, error)
CompactSession(sess *session.Session) (CompactSessionResult, error)
ApplyStartupField(req StartupFieldRequest) (StartupFieldResult, error)
VerifyStartupAPIKey(req StartupVerifyRequest) (StartupVerifyResult, error)
EnsureSessionImageAssets(sess *session.Session)
NextSessionImageID(sess *session.Session) int
PutSessionImage(sess *session.Session, imageID int, mediaType, fileName string, data []byte) (StoredImage, error)
PutSessionImageFromPath(sess *session.Session, imageID int, path string) (StoredImage, error)
FindSessionAssetByImageID(sess *session.Session, imageID int) (StoredImageRef, bool)
LoadSessionImageAsset(sess *session.Session, assetID string) (assets.ImageBlob, error)
HydrateHistoricalAssets(sess *session.Session, current map[string]ImagePayload) map[string]ImagePayload
LoadPastedContents(sess *session.Session) (PastedState, error)
SavePastedContents(sess *session.Session, state PastedState) error
RunPromptWithInput(ctx context.Context, sess *session.Session, prompt agent.RunPromptInput, mode string, sink io.Writer) error
}
Click to show internal directories.
Click to hide internal directories.