utils

package
v0.30.1 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MergeByKey

func MergeByKey[T any, K comparable](base, additional []T, key func(T) K) []T

MergeByKey appends items from additional into base when their key is not yet present.

func NewCopilotLogIterator

func NewCopilotLogIterator(path string) iter.Seq2[copilot.SessionEvent, error]

NewCopilotLogIterator creates an iterator for an events.jsonl formatted log

func NewSessionToSlog added in v0.26.0

func NewSessionToSlog() copilot.SessionEventHandler

NewSessionToSlog creates a function compatible with copilot.Session.On that will emit log entries, to slog, when the log level is set to slog.LevelDebug.

func Ptr

func Ptr[T any](v T) *T

func ResolvePaths

func ResolvePaths(paths []string, baseDir string) []string

ResolvePaths resolves a list of paths relative to a base directory. Absolute paths are returned unchanged, relative paths are resolved relative to the base directory.

Types

This section is empty.

Jump to

Keyboard shortcuts

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