load

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: 14 Imported by: 0

Documentation

Overview

Package load extracts index content from context files and handles load-gate logic during session startup.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractIndex

func ExtractIndex(content string) string

ExtractIndex returns the content between INDEX:START and INDEX:END markers within a context file.

Parameters:

  • content: full file content to search

Returns:

  • string: trimmed index content, or empty string if markers are not found or improperly ordered

func WriteOversizeFlag

func WriteOversizeFlag(
	contextDir string, totalTokens int, perFile []entity.FileTokenEntry,
)

WriteOversizeFlag writes an injection-oversize flag file when the total injected tokens exceed the configured threshold. The flag file is read by check-context-size to emit an oversize warning.

Parameters:

  • contextDir: absolute path to the .context/ directory
  • totalTokens: total injected token count
  • perFile: per-file token breakdown for diagnostics

Types

This section is empty.

Jump to

Keyboard shortcuts

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