input

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatFilesXML

func FormatFilesXML(files []FileContent, stdin string) string

FormatFilesXML formats file contents as XML for inclusion in prompts

func HasStdin

func HasStdin() bool

HasStdin returns true if stdin has data available (not a TTY)

func ReadStdin

func ReadStdin() (string, error)

ReadStdin reads all content from stdin Returns empty string if stdin is a TTY or has no data

Types

type FileContent

type FileContent struct {
	Path    string // File path or special identifier (e.g., "clipboard")
	Content string // The text content
}

FileContent represents content read from a file or other source

func ReadFiles

func ReadFiles(paths []string) ([]FileContent, error)

ReadFiles reads content from the given paths Special values:

  • "clipboard": reads text from system clipboard
  • Glob patterns (e.g., "*.go"): expands and reads all matching files
  • Regular paths: reads file content directly

Jump to

Keyboard shortcuts

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