Documentation
¶
Index ¶
- func ContextWithStateWriter(ctx context.Context, w io.Writer) context.Context
- func FetchGitCommits(ctx context.Context, workingDir, base, head string) (string, error)
- func FetchGitDiff(ctx context.Context, workingDir, base, head string, ignoredLockFiles []string) (string, []string, error)
- func RegisterLocalTools(r *Registry, root string, ignoredLockFiles []string, wishlistDir string, ...)
- func RegisterToolWithArgs[T any](r *Registry, def llm.ToolDef, handler func(context.Context, T) (string, error))
- func StateWriterFromContext(ctx context.Context) io.Writer
- func WithAskDeveloperTimeout(ctx context.Context, d time.Duration) context.Context
- func WithTestStreams(ctx context.Context, in io.Reader, out io.Writer) context.Context
- type NoOpUserNotifier
- type Registry
- type ToolHandler
- type UserNotifier
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContextWithStateWriter ¶ added in v0.6.0
ContextWithStateWriter returns a new context carrying the given state writer. This is retained for test assertions and potential downstream integrations where state is logged directly via context (rather than through reporter callbacks).
func FetchGitCommits ¶
FetchGitCommits returns a bulleted list of commit subjects (first line of message) between base and head, excluding merge commits.
func FetchGitDiff ¶
func RegisterLocalTools ¶
func RegisterToolWithArgs ¶ added in v0.5.0
func RegisterToolWithArgs[T any](r *Registry, def llm.ToolDef, handler func(context.Context, T) (string, error))
RegisterToolWithArgs registers a tool that uses a specific struct for its arguments. It handles unmarshaling the arguments and returns an error if they are malformed.
func StateWriterFromContext ¶ added in v0.6.0
StateWriterFromContext extracts the state writer from the context, if present.
func WithAskDeveloperTimeout ¶ added in v0.6.0
WithAskDeveloperTimeout wraps a context to override the ask_developer timeout.
Types ¶
type NoOpUserNotifier ¶ added in v0.6.0
type NoOpUserNotifier struct{}
func (NoOpUserNotifier) NotifyUser ¶ added in v0.6.0
func (NoOpUserNotifier) NotifyUser()
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
func NewRegistry ¶
func NewRegistry() *Registry
func (*Registry) HandleCall ¶
func (*Registry) RegisterTool ¶
func (r *Registry) RegisterTool(def llm.ToolDef, handler ToolHandler)
type UserNotifier ¶ added in v0.6.0
type UserNotifier interface {
NotifyUser()
}