Documentation
¶
Overview ¶
Packages context provides functionality for loading and managing .context/ files.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EstimateTokens ¶
EstimateTokens provides a rough token count estimate for content. Uses a simple heuristic: ~4 characters per token for English text. This is a conservative estimate for Claude/GPT-style tokenizers.
func EstimateTokensString ¶
EstimateTokensString estimates tokens for a string.
Types ¶
type FileInfo ¶
type FileInfo struct {
Name string
Path string
Size int64
ModTime time.Time
Content []byte
IsEmpty bool
Tokens int
Summary string
}
FileInfo represents metadata about a context file.
type NotFoundError ¶
type NotFoundError struct {
Dir string
}
NotFoundError is returned when the context directory doesn't exist.
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
Click to show internal directories.
Click to hide internal directories.