MCPcopy Index your code
hub / github.com/coder/coder / toSDKFiles

Method toSDKFiles

coderd/x/chatd/chattool/editfiles.go:65–82  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

63}
64
65func (a EditFilesArgs) toSDKFiles() []workspacesdk.FileEdits {
66 files := make([]workspacesdk.FileEdits, len(a.Files))
67 for i, f := range a.Files {
68 edits := make([]workspacesdk.FileEdit, len(f.Edits))
69 for j, e := range f.Edits {
70 edits[j] = workspacesdk.FileEdit{
71 Search: e.OldText,
72 Replace: e.NewText,
73 ReplaceAll: e.ReplaceAll,
74 }
75 }
76 files[i] = workspacesdk.FileEdits{
77 Path: f.Path,
78 Edits: edits,
79 }
80 }
81 return files
82}
83
84func EditFiles(options EditFilesOptions) fantasy.AgentTool {
85 return fantasy.NewAgentTool(

Callers 1

executeEditFilesToolFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected