context

package
v1.10.3 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2026 License: MIT Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package context describes the user's environment to the agent, as a <context> block put before the first message of a conversation (the server ignores system messages unless the agent allows prompt overrides).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Build added in v1.7.0

func Build(s config.Settings, tools bool) string

Build returns the context block for the working directory, or "" when the settings send nothing and tools are off. With tools, it also says which system and shell the commands run on and how to use the tools (toolGuide).

func Files added in v1.7.0

func Files(s config.Settings) []string

Files names the instruction files Build sends, relative to the working directory.

func Prepend added in v1.7.0

func Prepend(block, text string) string

Prepend puts the context block before text, when there is one.

Types

This section is empty.

Jump to

Keyboard shortcuts

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