cmd

package
v0.2.32 Latest Latest
Warning

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

Go to latest
Published: May 12, 2026 License: MIT Imports: 43 Imported by: 0

Documentation

Index

Constants

View Source
const UserFlaggedIssueKey = "langsmith_user_flagged_issue"

UserFlaggedIssueKey is the feedback key used to mark a trace as flagged for issues-agent review.

Variables

This section is empty.

Functions

func BuildRunQueryParams

func BuildRunQueryParams(f *FilterFlags, isRoot bool, defaultLimit int) langsmith.RunQueryParams

BuildRunQueryParams builds RunQueryParams from FilterFlags.

func ExitError added in v0.2.15

func ExitError(msg string)

ExitError prints an error to stderr and exits.

func ExitErrorf added in v0.2.15

func ExitErrorf(format string, args ...any)

ExitErrorf prints a formatted error to stderr and exits.

func GetAPIKey added in v0.2.15

func GetAPIKey() string

GetAPIKey resolves the API key from flag → env → profile.

func GetAPIURL added in v0.2.15

func GetAPIURL() string

GetAPIURL resolves the API URL from flag → env → profile → default.

func GetFormat added in v0.2.15

func GetFormat() string

GetFormat returns the output format.

func GetOAuthAccessToken added in v0.2.26

func GetOAuthAccessToken() string

GetOAuthAccessToken resolves the access token from the active OAuth profile.

func GetWorkspaceID added in v0.2.26

func GetWorkspaceID() string

GetWorkspaceID resolves the workspace ID from env → profile.

func MustGetClient added in v0.2.15

func MustGetClient() *client.Client

MustGetClient creates a LangSmith client or exits with an error.

func NewRootCmd

func NewRootCmd(rawVersion, displayVersion string) *cobra.Command

NewRootCmd creates the top-level `langsmith` command.

func ResolveProject

func ResolveProject(flagValue string) string

ResolveProject resolves the project name from flag → env.

Types

type FilterFlags

type FilterFlags struct {
	TraceIDs     string
	Limit        int
	Project      string
	LastNMinutes int
	Since        string
	Before       string
	Cursor       string
	ErrorFlag    bool
	NoErrorFlag  bool
	Name         string
	RunType      string
	MinLatency   float64
	MaxLatency   float64
	MinTokens    int
	Tags         string
	Metadata     string
	RawFilter    string
}

FilterFlags holds common filter flag values.

type FlaggedTrace added in v0.2.17

type FlaggedTrace struct {
	TraceID string
	Comment string
}

FlaggedTrace is a single user-flagged trace with its optional review comment.

func FetchFlaggedTraces added in v0.2.17

func FetchFlaggedTraces(ctx context.Context, c *client.Client, sessionID string, lastNMinutes int) []FlaggedTrace

FetchFlaggedTraces paginates /api/v1/feedback for the user-flagged issue feedback key on the given session and returns the set of flagged traces. Failures are logged to stderr and surfaced as partial results — callers get whatever was successfully fetched before the error.

If lastNMinutes > 0, only flagged traces created within the window are returned. Otherwise all flagged traces for the session are returned.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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