Documentation
¶
Index ¶
- type AIServiceGeneration
- type AIServicePrompt
- type ChatData
- type ChatTab
- type ChatTabWithWorkspace
- type ComposerData
- type ComposerEntry
- type CursorItem
- type Message
- type WorkspaceReader
- func (wr *WorkspaceReader) FindWorkspaces() ([]string, error)
- func (wr *WorkspaceReader) GetChatByID(chatID string) (*ChatTab, string, error)
- func (wr *WorkspaceReader) GetChatData(dbPath string) (*ChatData, error)
- func (wr *WorkspaceReader) GetLatestChat() (*ChatTab, error)
- func (wr *WorkspaceReader) GetLatestWorkspace() (string, error)
- func (wr *WorkspaceReader) ListAllChats() ([]ChatTabWithWorkspace, error)
- func (wr *WorkspaceReader) OpenWorkspaceDB(dbPath string) (*gorm.DB, error)
- func (wr *WorkspaceReader) SearchChats(query string) ([]ChatTabWithWorkspace, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AIServiceGeneration ¶
type AIServiceGeneration struct {
UnixMs int64 `json:"unixMs"`
GenerationUUID string `json:"generationUUID"`
Type string `json:"type"`
TextDescription string `json:"textDescription"`
ConversationID string `json:"conversationId,omitempty"`
Role string `json:"role,omitempty"`
}
AIServiceGeneration represents the richer aiService.generations data structure
type AIServicePrompt ¶
type AIServicePrompt struct {
Text string `json:"text"`
Timestamp int64 `json:"timestamp,omitempty"`
ID string `json:"id,omitempty"`
Role string `json:"role,omitempty"`
CreatedAt time.Time `json:"createdAt,omitempty"`
}
AIServicePrompt represents the structure of aiService.prompts data
type ChatData ¶
type ChatData struct {
Tabs []ChatTab `json:"tabs"`
}
ChatData represents the complete chat data structure from Cursor
type ChatTab ¶
type ChatTab struct {
ID string `json:"id"`
Title string `json:"title,omitempty"`
Messages []Message `json:"messages"`
Timestamp int64 `json:"timestamp"`
CreatedAt time.Time `json:"createdAt,omitempty"`
UpdatedAt time.Time `json:"updatedAt,omitempty"`
}
ChatTab represents a single chat conversation in Cursor
func (*ChatTab) ExtractTechnicalConcepts ¶
ExtractTechnicalConcepts analyzes chat content for technical terms
func (*ChatTab) GetContentPreview ¶
GetContentPreview returns a preview of the chat content
func (*ChatTab) GetDisplayTitle ¶
GetDisplayTitle returns a human-readable title for the chat tab
func (*ChatTab) ToMarkdown ¶
ToMarkdown converts the chat tab to markdown format
type ChatTabWithWorkspace ¶
type ChatTabWithWorkspace struct {
ChatTab
WorkspacePath string `json:"workspacePath"`
WorkspaceName string `json:"workspaceName"`
}
ChatTabWithWorkspace extends ChatTab with workspace information
type ComposerData ¶
type ComposerData struct {
AllComposers []ComposerEntry `json:"allComposers"`
}
ComposerData represents the structure of composer.composerData
type ComposerEntry ¶
type ComposerEntry struct {
Type string `json:"type"`
ComposerID string `json:"composerId"`
Name string `json:"name"` // The actual chat title!
CreatedAt int64 `json:"createdAt"`
UnifiedMode string `json:"unifiedMode"`
ForceMode string `json:"forceMode"`
HasUnreadMessages bool `json:"hasUnreadMessages"`
Messages []Message `json:"messages,omitempty"`
}
type CursorItem ¶
type CursorItem struct {
Key string `gorm:"column:key;primaryKey"`
Value string `gorm:"column:value"`
}
CursorItem represents a key-value item in Cursor's state.vscdb
func (CursorItem) TableName ¶
func (CursorItem) TableName() string
TableName specifies the table name for CursorItem
type Message ¶
type Message struct {
ID string `json:"id,omitempty"`
Role string `json:"role"` // "user" or "assistant"
Content string `json:"content"`
Timestamp int64 `json:"timestamp"`
CreatedAt time.Time `json:"createdAt,omitempty"`
}
Message represents a single message in the chat
type WorkspaceReader ¶
type WorkspaceReader struct {
StoragePath string
}
WorkspaceReader provides access to Cursor's workspace storage
func NewWorkspaceReader ¶
func NewWorkspaceReader() *WorkspaceReader
NewWorkspaceReader creates a new workspace reader
func NewWorkspaceReaderWithPath ¶
func NewWorkspaceReaderWithPath(path string) *WorkspaceReader
NewWorkspaceReaderWithPath creates a reader with custom storage path
func (*WorkspaceReader) FindWorkspaces ¶
func (wr *WorkspaceReader) FindWorkspaces() ([]string, error)
FindWorkspaces returns all available workspace database paths
func (*WorkspaceReader) GetChatByID ¶
func (wr *WorkspaceReader) GetChatByID(chatID string) (*ChatTab, string, error)
GetChatByID retrieves a specific chat by its ID
func (*WorkspaceReader) GetChatData ¶
func (wr *WorkspaceReader) GetChatData(dbPath string) (*ChatData, error)
GetChatData retrieves and parses chat data from workspace
func (*WorkspaceReader) GetLatestChat ¶
func (wr *WorkspaceReader) GetLatestChat() (*ChatTab, error)
GetLatestChat returns the most recent chat from the latest workspace
func (*WorkspaceReader) GetLatestWorkspace ¶
func (wr *WorkspaceReader) GetLatestWorkspace() (string, error)
GetLatestWorkspace returns the most recently modified workspace
func (*WorkspaceReader) ListAllChats ¶
func (wr *WorkspaceReader) ListAllChats() ([]ChatTabWithWorkspace, error)
ListAllChats returns all chats from all workspaces with workspace info
func (*WorkspaceReader) OpenWorkspaceDB ¶
func (wr *WorkspaceReader) OpenWorkspaceDB(dbPath string) (*gorm.DB, error)
OpenWorkspaceDB opens a GORM connection to a workspace database
func (*WorkspaceReader) SearchChats ¶
func (wr *WorkspaceReader) SearchChats(query string) ([]ChatTabWithWorkspace, error)
SearchChats searches for chats containing specific text