Documentation
¶
Index ¶
- type ActionRequest
- type Annotation
- type AnnotationIntent
- type AnnotationSeverity
- type AnnotationStatus
- type Event
- type EventType
- type Service
- type Session
- type SessionWithAnnotations
- type Store
- func (s *Store) AddAnnotation(sessionID string, annotation Annotation) (Annotation, bool)
- func (s *Store) AddThreadMessage(annotationID, role, content string) (Annotation, bool)
- func (s *Store) CreateSession(url, projectID string) Session
- func (s *Store) DeleteAnnotation(id string) (Annotation, bool)
- func (s *Store) EmitActionRequested(sessionID string, request ActionRequest)
- func (s *Store) GetAllAnnotationsNeedingAttention() []Annotation
- func (s *Store) GetAllAnnotationsNeedingAttentionByProjectID(projectID string) []Annotation
- func (s *Store) GetAnnotation(id string) (Annotation, bool)
- func (s *Store) GetAnnotationsNeedingAttention(sessionID string) []Annotation
- func (s *Store) GetEventsSince(sessionID string, sequence int64) []Event
- func (s *Store) GetSession(id string) (Session, bool)
- func (s *Store) GetSessionAnnotations(sessionID string) []Annotation
- func (s *Store) GetSessionWithAnnotations(id string) (SessionWithAnnotations, bool)
- func (s *Store) ListSessions() []Session
- func (s *Store) SubscribeAll() (<-chan Event, func())
- func (s *Store) SubscribeSession(sessionID string) (<-chan Event, func())
- func (s *Store) TouchProject(projectID string)
- func (s *Store) TouchSession(sessionID string)
- func (s *Store) UpdateAnnotation(id string, patch map[string]any) (Annotation, bool)
- type ThreadMessage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionRequest ¶
type ActionRequest struct {
SessionID string `json:"sessionId"`
Annotations []Annotation `json:"annotations"`
Output string `json:"output"`
RequestedAt string `json:"timestamp"`
}
type Annotation ¶
type Annotation struct {
ID string `json:"id"`
SessionID string `json:"sessionId,omitempty"`
X float64 `json:"x,omitempty"`
Y float64 `json:"y,omitempty"`
Comment string `json:"comment"`
Element string `json:"element"`
ElementPath string `json:"elementPath"`
Timestamp int64 `json:"timestamp,omitempty"`
SelectedText string `json:"selectedText,omitempty"`
BoundingBox map[string]any `json:"boundingBox,omitempty"`
NearbyText string `json:"nearbyText,omitempty"`
CSSClasses string `json:"cssClasses,omitempty"`
NearbyElements string `json:"nearbyElements,omitempty"`
ComputedStyles string `json:"computedStyles,omitempty"`
FullPath string `json:"fullPath,omitempty"`
Accessibility string `json:"accessibility,omitempty"`
IsMultiSelect bool `json:"isMultiSelect,omitempty"`
IsFixed bool `json:"isFixed,omitempty"`
ReactComponents string `json:"reactComponents,omitempty"`
SourceFile string `json:"sourceFile,omitempty"`
ElementBoundingBoxes []map[string]any `json:"elementBoundingBoxes,omitempty"`
URL string `json:"url,omitempty"`
Intent AnnotationIntent `json:"intent,omitempty"`
Severity AnnotationSeverity `json:"severity,omitempty"`
Status AnnotationStatus `json:"status,omitempty"`
Thread []ThreadMessage `json:"thread,omitempty"`
CreatedAt string `json:"createdAt,omitempty"`
UpdatedAt string `json:"updatedAt,omitempty"`
ResolvedAt string `json:"resolvedAt,omitempty"`
ResolvedBy string `json:"resolvedBy,omitempty"`
AuthorID string `json:"authorId,omitempty"`
}
type AnnotationIntent ¶
type AnnotationIntent string
type AnnotationSeverity ¶
type AnnotationSeverity string
type AnnotationStatus ¶
type AnnotationStatus string
const ( StatusPending AnnotationStatus = "pending" StatusAcknowledged AnnotationStatus = "acknowledged" StatusResolved AnnotationStatus = "resolved" StatusDismissed AnnotationStatus = "dismissed" )
type EventType ¶
type EventType string
const ( EventAnnotationCreated EventType = "annotation.created" EventAnnotationUpdated EventType = "annotation.updated" EventAnnotationDeleted EventType = "annotation.deleted" EventSessionCreated EventType = "session.created" EventSessionUpdated EventType = "session.updated" EventSessionClosed EventType = "session.closed" EventThreadMessage EventType = "thread.message" EventActionRequested EventType = "action.requested" )
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) ListenAndServe ¶
type SessionWithAnnotations ¶
type SessionWithAnnotations struct {
Session
Annotations []Annotation `json:"annotations"`
}
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) AddAnnotation ¶
func (s *Store) AddAnnotation(sessionID string, annotation Annotation) (Annotation, bool)
func (*Store) AddThreadMessage ¶
func (s *Store) AddThreadMessage(annotationID, role, content string) (Annotation, bool)
func (*Store) CreateSession ¶
func (*Store) DeleteAnnotation ¶
func (s *Store) DeleteAnnotation(id string) (Annotation, bool)
func (*Store) EmitActionRequested ¶
func (s *Store) EmitActionRequested(sessionID string, request ActionRequest)
func (*Store) GetAllAnnotationsNeedingAttention ¶
func (s *Store) GetAllAnnotationsNeedingAttention() []Annotation
func (*Store) GetAllAnnotationsNeedingAttentionByProjectID ¶
func (s *Store) GetAllAnnotationsNeedingAttentionByProjectID(projectID string) []Annotation
func (*Store) GetAnnotation ¶
func (s *Store) GetAnnotation(id string) (Annotation, bool)
func (*Store) GetAnnotationsNeedingAttention ¶
func (s *Store) GetAnnotationsNeedingAttention(sessionID string) []Annotation
func (*Store) GetEventsSince ¶
func (*Store) GetSessionAnnotations ¶
func (s *Store) GetSessionAnnotations(sessionID string) []Annotation
func (*Store) GetSessionWithAnnotations ¶
func (s *Store) GetSessionWithAnnotations(id string) (SessionWithAnnotations, bool)
func (*Store) ListSessions ¶
func (*Store) SubscribeAll ¶
func (*Store) SubscribeSession ¶
func (*Store) TouchProject ¶
func (*Store) TouchSession ¶
func (*Store) UpdateAnnotation ¶
Click to show internal directories.
Click to hide internal directories.