Documentation
¶
Index ¶
Constants ¶
View Source
const (
// ApplyEditToolName is the public name exposed to the agent for applying code edits.
ApplyEditToolName = "apply_edit"
)
Variables ¶
This section is empty.
Functions ¶
func ApplyEditDoc ¶
func ApplyEditDoc() string
Types ¶
type ApplyEditRequest ¶
type ApplyEditRequest struct {
CodeOutput string `json:"code_output"`
}
type ApplyEditTool ¶
type ApplyEditTool struct {
Code *cont.CodeContainer
}
ApplyEditTool applies a CodeOutput XML to an in-memory CodeContainer and persists changes to disk.
The tool expects JSON arguments with a single required field:
- code_output: XML string representing cont.CodeOutput edits (see comments on cont.CodeOutput)
It returns a short summary string indicating which files were written.
func (*ApplyEditTool) InvokableRun ¶
func (t *ApplyEditTool) InvokableRun(ctx context.Context, argumentsInJSON string, _ ...tool.Option) (string, error)
InvokableRun applies the provided CodeOutput XML to the container and writes changed files to disk. Invokable don't return error unless it is unrecoverable. It just returns the error as message to the model and let the model to handle it.
Click to show internal directories.
Click to hide internal directories.