sessionname

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package sessionname creates stable display names for Codog sessions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RenderJSON

func RenderJSON(out io.Writer, report Report) error

func RenderText

func RenderText(out io.Writer, report Report)

func Suggest

func Suggest(text string, options Options) string

func Unique

func Unique(base string, exists func(string) (bool, error)) (string, int, error)

Types

type Options

type Options struct {
	Prefix    string
	MaxWords  int
	MaxLength int
}

type Report

type Report struct {
	Kind           string   `json:"kind"`
	Action         string   `json:"action"`
	Status         string   `json:"status"`
	SessionID      string   `json:"session_id"`
	SuggestedID    string   `json:"suggested_id"`
	Source         string   `json:"source"`
	SourceText     string   `json:"source_text,omitempty"`
	MessageCount   int      `json:"message_count"`
	CollisionCount int      `json:"collision_count"`
	Renamed        bool     `json:"renamed"`
	OldID          string   `json:"old_id,omitempty"`
	NewID          string   `json:"new_id,omitempty"`
	Path           string   `json:"path,omitempty"`
	Messages       []string `json:"messages,omitempty"`
}

Jump to

Keyboard shortcuts

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