core

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2026 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package core provides formatting, sorting, preview, and type definitions for the status command. Subcommand cmd/run.go imports core for all status display logic.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileStatus

type FileStatus struct {
	Name    string   `json:"name"`
	Tokens  int      `json:"tokens"`
	Size    int64    `json:"size"`
	IsEmpty bool     `json:"is_empty"`
	Summary string   `json:"summary"`
	ModTime string   `json:"mod_time"`
	Preview []string `json:"preview,omitempty"`
}

FileStatus represents a single file's status in JSON output.

Fields:

  • Name: Filename (e.g., "TASKS.md")
  • Tokens: Estimated token count for this file
  • Size: File size in bytes
  • IsEmpty: True if the file has no meaningful content
  • Summary: Brief description of file contents
  • ModTime: Last modification time (RFC3339 format)
  • Preview: Content preview lines (only with --verbose)

type Output

type Output struct {
	ContextDir  string       `json:"context_dir"`
	TotalFiles  int          `json:"total_files"`
	TotalTokens int          `json:"total_tokens"`
	TotalSize   int64        `json:"total_size"`
	Files       []FileStatus `json:"files"`
}

Output represents the JSON output format for the status command.

Fields:

  • ContextDir: Path to the .context/ directory
  • TotalFiles: Number of context files found
  • TotalTokens: Estimated total token count across all files
  • TotalSize: Total size in bytes across all files
  • Files: Individual file status entries

Directories

Path Synopsis
Package out writes context status as JSON or formatted text to command output.
Package out writes context status as JSON or formatted text to command output.
Package preview extracts short content previews from context files for status display.
Package preview extracts short content previews from context files for status display.
Package sort orders context files by priority and recency for status output.
Package sort orders context files by priority and recency for status output.

Jump to

Keyboard shortcuts

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