bootstrap

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

Documentation

Overview

Package bootstrap checks plugin installation status and emits warnings during context bootstrap.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListContextFiles

func ListContextFiles(dir string) []string

ListContextFiles reads the given directory and returns sorted .md filenames.

Parameters:

  • dir: absolute path to the context directory.

Returns:

  • []string: sorted list of Markdown filenames, or nil on read error.

func ParseNumberedLines

func ParseNumberedLines(text string) []string

ParseNumberedLines splits a numbered multiline string into individual items, stripping the leading "N. " prefix from each line. Empty lines are skipped.

Parameters:

  • text: multiline string with "1. ...\n2. ..." formatting

Returns:

  • []string: list of items with number prefixes removed

func PluginWarning

func PluginWarning() string

PluginWarning returns a warning string if the ctx plugin is installed but not enabled in either global or local settings.

Returns:

  • string: warning message, or empty string if no warning is needed.

func WrapFileList

func WrapFileList(files []string, maxWidth int, indent string) string

WrapFileList formats file names as a comma-separated list, wrapping lines at approximately maxWidth characters. Continuation lines are prefixed with the given indent string. Returns the "none" label from assets when the list is empty.

Parameters:

  • files: list of filenames to format.
  • maxWidth: approximate character width before wrapping.
  • indent: prefix string for each line.

Returns:

  • string: formatted, wrapped file list.

Types

This section is empty.

Jump to

Keyboard shortcuts

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