instructions

package
v0.11.0-beta.2 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2026 License: Apache-2.0, MIT Imports: 8 Imported by: 0

Documentation

Overview

Package instructions loads explicitly authorized workspace guidance. It does not search the process cwd, home directory, or ancestors of the workspace.

Index

Constants

View Source
const MaxFileBytes = 32 * 1024
View Source
const MaxTotalBytes = 64 * 1024

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Enabled    bool   `toml:"enabled"`
	GlobalFile string `toml:"global_file"`
	// Directory is relative to the session workspace; empty means its root.
	Directory string `toml:"directory"`
}

type Source

type Source struct {
	// contains filtered or unexported fields
}

Source retains paths, never file contents. Each prompt reloads current files.

func New

func New(workspace string, cfg Config) (*Source, error)

func (*Source) Render

func (s *Source) Render() string

Render bounds input and emits whole files only. Errors omit that file, with a visible diagnostic rather than silently injecting a truncated directive.

func (*Source) SetDirectory

func (s *Source) SetDirectory(directory string) error

SetDirectory selects a contained active directory atomically. Invalid changes leave the previous selection intact. This does not change tool working paths.

Jump to

Keyboard shortcuts

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