utils

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2026 License: MIT Imports: 9 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 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.

func SessionToSlog

func SessionToSlog(event copilot.SessionEvent)

SessionToSlog tries to be a low-overhead method for dumping out any session events coming from the copilot client to slog. It's safe to add this to your copilot session instances, in their copilot.Session.On handler.

Types

This section is empty.

Jump to

Keyboard shortcuts

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