utils

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatCardAsMarkdown added in v0.7.2

func FormatCardAsMarkdown(card *api.Card, comments []api.Comment) (string, error)

FormatCardAsMarkdown formats a card with all its comments as AI-optimized markdown

func FormatCommentsForDisplay added in v0.7.2

func FormatCommentsForDisplay(comments []api.Comment) (string, error)

FormatCommentsForDisplay formats a list of comments for display in a pager

func FormatDocumentAsMarkdown added in v0.7.2

func FormatDocumentAsMarkdown(document *api.Document, comments []api.Comment) (string, error)

FormatDocumentAsMarkdown formats a document with all its comments as AI-optimized markdown

func FormatMessageAsMarkdown added in v0.7.2

func FormatMessageAsMarkdown(message *api.Message, comments []api.Comment) (string, error)

FormatMessageAsMarkdown formats a message with all its comments as AI-optimized markdown

func FormatTodoAsMarkdown added in v0.7.2

func FormatTodoAsMarkdown(todo *api.Todo, comments []api.Comment) (string, error)

FormatTodoAsMarkdown formats a todo with all its comments as AI-optimized markdown

func ShowInPager

func ShowInPager(content string, opts *PagerOptions) error

ShowInPager displays content using the configured pager

func SortProjectsByName

func SortProjectsByName(projects []api.Project)

SortProjectsByName sorts a slice of projects alphabetically by name (case-insensitive)

func WriteToPager

func WriteToPager(opts *PagerOptions) (io.WriteCloser, error)

WriteToPager creates a writer that will display content through a pager

Types

type PagerOptions

type PagerOptions struct {
	// Pager command to use (e.g., "less", "more")
	Pager string
	// Whether to force pager even if not a TTY
	Force bool
	// Whether to disable pager
	NoPager bool
}

PagerOptions contains options for the pager

type UserResolver

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

UserResolver helps resolve user identifiers to Person objects

func NewUserResolver

func NewUserResolver(client api.APIClient, projectID string) *UserResolver

NewUserResolver creates a new user resolver for a project

func (*UserResolver) GetPeople

func (ur *UserResolver) GetPeople(ctx context.Context) ([]api.Person, error)

GetPeople returns the cached list of people in the project

func (*UserResolver) ResolveUsers

func (ur *UserResolver) ResolveUsers(ctx context.Context, identifiers []string) ([]int64, error)

ResolveUsers resolves a list of user identifiers to person IDs Supports: - Email addresses: john@example.com - @mentions: @john (matches by name, case-insensitive) - Mixed: @john,jane@example.com

Jump to

Keyboard shortcuts

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