| | | 1 | | using UIBlazor.Services; |
| | | 2 | | |
| | | 3 | | namespace UIBlazor.Agents; |
| | | 4 | | |
| | 64 | 5 | | public class BuiltInAgent(IVsBridge vsBridge, ISkillService skillService, IInternalExecutor internalExecutor) |
| | | 6 | | { |
| | 64 | 7 | | public IReadOnlyList<Tool> Tools = |
| | 64 | 8 | | [ |
| | 64 | 9 | | // File operations |
| | 64 | 10 | | new() |
| | 64 | 11 | | { |
| | 64 | 12 | | Name = BuiltInToolEnum.ReadFiles, |
| | 64 | 13 | | DisplayName = SharedResource.ToolReadFiles, |
| | 64 | 14 | | Category = ToolCategory.ReadFiles, |
| | 64 | 15 | | Description = "Request to read the contents of one or more files. File path can be relative or absolute.", |
| | 64 | 16 | | ExampleToSystemMessage = $""" |
| | 64 | 17 | | SYNTAX EXAMPLES: |
| | 64 | 18 | | C:\user\project\src\file.cs [L100:C50] — Starts at line 100, includes 50 lines. |
| | 64 | 19 | | C:\user\project\src\file.cs [L100] — Starts at line 100, goes to the end. |
| | 64 | 20 | | src\file.cs — Includes the entire file. Relative path. |
| | 64 | 21 | | |
| | 64 | 22 | | OPTIONAL PARAMETERS: |
| | 64 | 23 | | Use the following format at the end of the file path: [Lstart_line:Cline_count] |
| | 64 | 24 | | L[start_line]: A 1-based start line. (e.g., L100). Default: first line. |
| | 64 | 25 | | C[line_count]: The number of lines to include. (e.g., C50). Default: until the end |
| | 64 | 26 | | |
| | 64 | 27 | | For example, to read a specific range, from 100 to 150 line: |
| | 64 | 28 | | <function name="{BuiltInToolEnum.ReadFiles}"> |
| | 64 | 29 | | C:\user\project\large_file.cs [L100:C50] |
| | 64 | 30 | | </function> |
| | 64 | 31 | | |
| | 64 | 32 | | Example to read the entire files (up to 7 at once): |
| | 64 | 33 | | <function name="{BuiltInToolEnum.ReadFiles}"> |
| | 64 | 34 | | C:\user\project\file.cs |
| | 64 | 35 | | \fil2.cs [L550] |
| | 64 | 36 | | \fil3.cs [L100:C50] |
| | 64 | 37 | | </function> |
| | 64 | 38 | | """, |
| | 64 | 39 | | NativeTool = BuiltInToolDefs.MapMethodToTool(typeof(BuiltInToolDefs).GetMethod(nameof(BuiltInToolDefs.ReadFi |
| | 1 | 40 | | ExecuteAsync = (args, c) => vsBridge.ExecuteToolAsync(BuiltInToolEnum.ReadFiles, args, c) |
| | 64 | 41 | | }, |
| | 64 | 42 | | new() |
| | 64 | 43 | | { |
| | 64 | 44 | | Name = BuiltInToolEnum.ReadOpenFile, |
| | 64 | 45 | | DisplayName = SharedResource.ToolReadOpenFile, |
| | 64 | 46 | | Category = ToolCategory.ReadFiles, |
| | 64 | 47 | | Description = $""" |
| | 64 | 48 | | To view the user's currently open file, use the {BuiltInToolEnum.ReadOpenFile} tool. |
| | 64 | 49 | | The tool returns the absolute file path and its line-numbered content (e.g. "1 | const x = 1") |
| | 64 | 50 | | If the user is asking about a file and you don't see any code, use this to check the current f |
| | 64 | 51 | | """, |
| | 64 | 52 | | ExampleToSystemMessage = $""" |
| | 64 | 53 | | For example |
| | 64 | 54 | | <function name="{BuiltInToolEnum.ReadOpenFile}"></function> |
| | 64 | 55 | | """, |
| | 0 | 56 | | ExecuteAsync = (args, c) => vsBridge.ExecuteToolAsync(BuiltInToolEnum.ReadOpenFile, args, c) |
| | 64 | 57 | | }, |
| | 64 | 58 | | new() |
| | 64 | 59 | | { |
| | 64 | 60 | | Name = BuiltInToolEnum.CreateFile, |
| | 64 | 61 | | DisplayName = SharedResource.ToolCreateFile, |
| | 64 | 62 | | Category = ToolCategory.WriteFiles, |
| | 64 | 63 | | Description = """ |
| | 64 | 64 | | To create a NEW file with the relative or absolute filepath and new contents. |
| | 64 | 65 | | Note: The old file will be overwritten if it exists. |
| | 64 | 66 | | Use this when you need to make large changes to a single file and it's easier to recreate it. |
| | 64 | 67 | | """, |
| | 64 | 68 | | ExampleToSystemMessage = $""" |
| | 64 | 69 | | For example, to create a file located at 'C:\user\project\file.cs', you would respo |
| | 64 | 70 | | <function name="{BuiltInToolEnum.CreateFile}"> |
| | 64 | 71 | | C:\user\project\file.cs |
| | 64 | 72 | | Contents of the file. |
| | 64 | 73 | | And second line of this file. |
| | 64 | 74 | | </function> |
| | 64 | 75 | | """, |
| | 0 | 76 | | ExecuteAsync = (args, c) => vsBridge.ExecuteToolAsync(BuiltInToolEnum.CreateFile, args, c) |
| | 64 | 77 | | }, |
| | 64 | 78 | | new() |
| | 64 | 79 | | { |
| | 64 | 80 | | Name = BuiltInToolEnum.ApplyDiff, |
| | 64 | 81 | | DisplayName = SharedResource.ToolApplyDiff, |
| | 64 | 82 | | Category = ToolCategory.WriteFiles, |
| | 64 | 83 | | Description = $""" |
| | 64 | 84 | | Performs precise, surgical modifications to a file using SEARCH/REPLACE blocks. |
| | 64 | 85 | | Use this tool to modify existing code with 100% accuracy. |
| | 64 | 86 | | |
| | 64 | 87 | | STRUCTURE: |
| | 64 | 88 | | [file_path] |
| | 64 | 89 | | <<<<<<< SEARCH [:start_line:] |
| | 64 | 90 | | [exact content to find] |
| | 64 | 91 | | ======= |
| | 64 | 92 | | [new content to replace with] |
| | 64 | 93 | | >>>>>>> REPLACE |
| | 64 | 94 | | |
| | 64 | 95 | | OPTIONAL PARAMETERS: |
| | 64 | 96 | | - :start_line:: A hint for the line number to speed up searching. Example: `<<<<<<< SEARCH :10:` |
| | 64 | 97 | | |
| | 64 | 98 | | CRITICAL RULES: |
| | 64 | 99 | | 1. EXACT MATCH: The SEARCH block must match the file content exactly (including spaces, tabs, and indent |
| | 64 | 100 | | 2. BREVITY: Keep each SEARCH block under 15 lines. If the change is larger, use multiple consecutive SEA |
| | 64 | 101 | | 3. EFFICIENCY: Combine all related changes for a single file into one {BuiltInToolEnum.ApplyDiff} call w |
| | 64 | 102 | | 4. INTEGRITY: Ensure syntax balance (brackets, quotes) is maintained after the replacement. |
| | 64 | 103 | | 5. UNCERTAINTY: If you don't have the exact text, you MUST use {BuiltInToolEnum.ReadFiles} first. |
| | 64 | 104 | | """, |
| | 64 | 105 | | ExampleToSystemMessage = $""" |
| | 64 | 106 | | For example: |
| | 64 | 107 | | <function name="{BuiltInToolEnum.ApplyDiff}"> |
| | 64 | 108 | | C:\path\to\file.cs |
| | 64 | 109 | | <<<<<<< SEARCH :10: |
| | 64 | 110 | | old code |
| | 64 | 111 | | ======= |
| | 64 | 112 | | new code |
| | 64 | 113 | | >>>>>>> REPLACE |
| | 64 | 114 | | </function> |
| | 64 | 115 | | |
| | 64 | 116 | | Example for multi replacments in one file: |
| | 64 | 117 | | <function name="{BuiltInToolEnum.ApplyDiff}"> |
| | 64 | 118 | | C:\path\to\file.cs |
| | 64 | 119 | | <<<<<<< SEARCH |
| | 64 | 120 | | old code |
| | 64 | 121 | | ======= |
| | 64 | 122 | | new code |
| | 64 | 123 | | >>>>>>> REPLACE |
| | 64 | 124 | | |
| | 64 | 125 | | <<<<<<< SEARCH :40: |
| | 64 | 126 | | var z = "old code"; |
| | 64 | 127 | | ======= |
| | 64 | 128 | | // this is new code |
| | 64 | 129 | | var isNew = true; |
| | 64 | 130 | | var z = isNew ? "new code" : "old code"; |
| | 64 | 131 | | >>>>>>> REPLACE |
| | 64 | 132 | | </function> |
| | 64 | 133 | | """, |
| | 64 | 134 | | NativeTool = BuiltInToolDefs.MapMethodToTool(typeof(BuiltInToolDefs).GetMethod(nameof(BuiltInToolDefs.ApplyD |
| | 1 | 135 | | ExecuteAsync = (args, c) => vsBridge.ExecuteToolAsync(BuiltInToolEnum.ApplyDiff, args, c) |
| | 64 | 136 | | }, |
| | 64 | 137 | | |
| | 64 | 138 | | // Search and navigation |
| | 64 | 139 | | new() |
| | 64 | 140 | | { |
| | 64 | 141 | | Name = BuiltInToolEnum.SearchFiles, |
| | 64 | 142 | | DisplayName = SharedResource.ToolSearchFiles, |
| | 64 | 143 | | Category = ToolCategory.ReadFiles, |
| | 64 | 144 | | Description = "To return a list of files with patches in solution directory based on a search regex pattern, |
| | 64 | 145 | | ExampleToSystemMessage = $""" |
| | 64 | 146 | | For example: |
| | 64 | 147 | | <function name="{BuiltInToolEnum.SearchFiles}"> |
| | 64 | 148 | | ^.*\.cs$ |
| | 64 | 149 | | </function> |
| | 64 | 150 | | """, |
| | 0 | 151 | | ExecuteAsync = (args, c) => vsBridge.ExecuteToolAsync(BuiltInToolEnum.SearchFiles, args, c) |
| | 64 | 152 | | }, |
| | 64 | 153 | | new() |
| | 64 | 154 | | { |
| | 64 | 155 | | Name = BuiltInToolEnum.GrepSearch, |
| | 64 | 156 | | DisplayName = SharedResource.ToolGrepSearch, |
| | 64 | 157 | | Category = ToolCategory.ReadFiles, |
| | 64 | 158 | | Description = "To perform a grep search within the project, call the grep_search tool with the regex pattern |
| | 64 | 159 | | ExampleToSystemMessage = $""" |
| | 64 | 160 | | For example: |
| | 64 | 161 | | <function name="{BuiltInToolEnum.GrepSearch}"> |
| | 64 | 162 | | ^.*?main_services.* |
| | 64 | 163 | | </function> |
| | 64 | 164 | | """, |
| | 0 | 165 | | ExecuteAsync = (args, c) => vsBridge.ExecuteToolAsync(BuiltInToolEnum.GrepSearch, args, c) |
| | 64 | 166 | | }, |
| | 64 | 167 | | new() |
| | 64 | 168 | | { |
| | 64 | 169 | | Name = BuiltInToolEnum.Dir, |
| | 64 | 170 | | DisplayName = SharedResource.ToolDir, |
| | 64 | 171 | | Category = ToolCategory.ReadFiles, |
| | 64 | 172 | | Description = "To list files and folders in a given directory, call this tool with \"dirPath\" and \"recursi |
| | 64 | 173 | | ExampleToSystemMessage = $""" |
| | 64 | 174 | | For example: |
| | 64 | 175 | | <function name="{BuiltInToolEnum.Dir}"> |
| | 64 | 176 | | C:\path\to\dir |
| | 64 | 177 | | false |
| | 64 | 178 | | </function> |
| | 64 | 179 | | """, |
| | 0 | 180 | | ExecuteAsync = (args, c) => vsBridge.ExecuteToolAsync(BuiltInToolEnum.Dir, args, c) |
| | 64 | 181 | | }, |
| | 64 | 182 | | |
| | 64 | 183 | | // Project and build |
| | 64 | 184 | | new() |
| | 64 | 185 | | { |
| | 64 | 186 | | Name = BuiltInToolEnum.Build, |
| | 64 | 187 | | DisplayName = SharedResource.ToolBuild, |
| | 64 | 188 | | Category = ToolCategory.ReadFiles, |
| | 64 | 189 | | Description = "To build solution in Visual Studio. With action - Build, Rebuild or Clean. When any errors re |
| | 64 | 190 | | ExampleToSystemMessage = $""" |
| | 64 | 191 | | For example: |
| | 64 | 192 | | <function name="{BuiltInToolEnum.Build}"> |
| | 64 | 193 | | build |
| | 64 | 194 | | </function> |
| | 64 | 195 | | """, |
| | 0 | 196 | | ExecuteAsync = (args, c) => vsBridge.ExecuteToolAsync(BuiltInToolEnum.Build, args, c) |
| | 64 | 197 | | }, |
| | 64 | 198 | | new() |
| | 64 | 199 | | { |
| | 64 | 200 | | Name = BuiltInToolEnum.RunTests, |
| | 64 | 201 | | DisplayName = SharedResource.ToolRunTests, |
| | 64 | 202 | | Category = ToolCategory.ReadFiles, |
| | 64 | 203 | | Description = "To run all tests in solution. When any errors returns errors list. Note: the solution build w |
| | 64 | 204 | | ExampleToSystemMessage = $""" |
| | 64 | 205 | | For example: |
| | 64 | 206 | | <function name="{BuiltInToolEnum.RunTests}"> |
| | 64 | 207 | | </function> |
| | 64 | 208 | | """, |
| | 0 | 209 | | ExecuteAsync = (args, c) => vsBridge.ExecuteToolAsync(BuiltInToolEnum.RunTests, args, c) |
| | 64 | 210 | | }, |
| | 64 | 211 | | new() |
| | 64 | 212 | | { |
| | 64 | 213 | | Name = BuiltInToolEnum.GetErrors, |
| | 64 | 214 | | DisplayName = SharedResource.ToolGetErrors, |
| | 64 | 215 | | Category = ToolCategory.ReadFiles, |
| | 64 | 216 | | Description = "To get error list of current solution and current file from Visual Studio.", |
| | 64 | 217 | | ExampleToSystemMessage = $""" |
| | 64 | 218 | | For example: |
| | 64 | 219 | | <function name="{BuiltInToolEnum.GetErrors}"></function> |
| | 64 | 220 | | """, |
| | 0 | 221 | | ExecuteAsync = (args, c) => vsBridge.ExecuteToolAsync(BuiltInToolEnum.GetErrors) |
| | 64 | 222 | | }, |
| | 64 | 223 | | new() |
| | 64 | 224 | | { |
| | 64 | 225 | | Name = BuiltInToolEnum.GetProjectInfo, |
| | 64 | 226 | | DisplayName = SharedResource.ToolGetProjectInfo, |
| | 64 | 227 | | Category = ToolCategory.ReadFiles, |
| | 64 | 228 | | Description = "Get information about the solution and projects. Returns list of projects, their types, targe |
| | 64 | 229 | | ExampleToSystemMessage = $""" |
| | 64 | 230 | | For example: |
| | 64 | 231 | | <function name="{BuiltInToolEnum.GetProjectInfo}"></function> |
| | 64 | 232 | | """, |
| | 0 | 233 | | ExecuteAsync = (args, c) => vsBridge.ExecuteToolAsync(BuiltInToolEnum.GetProjectInfo, args, c) |
| | 64 | 234 | | }, |
| | 64 | 235 | | new() |
| | 64 | 236 | | { |
| | 64 | 237 | | Name = BuiltInToolEnum.GetSolutionStructure, |
| | 64 | 238 | | DisplayName = SharedResource.ToolGetSolutionStructure, |
| | 64 | 239 | | Category = ToolCategory.ReadFiles, |
| | 64 | 240 | | Description = "Get a tree-like structure of the entire solution, including projects, folders, and files.", |
| | 64 | 241 | | ExampleToSystemMessage = $""" |
| | 64 | 242 | | For example: |
| | 64 | 243 | | <function name="{BuiltInToolEnum.GetSolutionStructure}"></function> |
| | 64 | 244 | | """, |
| | 0 | 245 | | ExecuteAsync = (args, c) => vsBridge.ExecuteToolAsync(BuiltInToolEnum.GetSolutionStructure) |
| | 64 | 246 | | }, |
| | 64 | 247 | | |
| | 64 | 248 | | // Execution |
| | 64 | 249 | | new() |
| | 64 | 250 | | { |
| | 64 | 251 | | Name = BuiltInToolEnum.Bash, |
| | 64 | 252 | | DisplayName = SharedResource.ToolExec, |
| | 64 | 253 | | Category = ToolCategory.Execution, |
| | 64 | 254 | | Description = """ |
| | 64 | 255 | | To run a shell command (Git Bash). |
| | 64 | 256 | | The shell is stateless. Avoid using single quotes inside your commands if possible. |
| | 64 | 257 | | When suggesting subsequent shell commands ALWAYS format them in shell command blocks. |
| | 64 | 258 | | Do NOT perform actions requiring special/admin privileges. |
| | 64 | 259 | | Choose terminal commands and scripts optimized for win32 and x64. |
| | 64 | 260 | | """, |
| | 64 | 261 | | ExampleToSystemMessage = $""" |
| | 64 | 262 | | For example: |
| | 64 | 263 | | <function name="{BuiltInToolEnum.Bash}"> |
| | 64 | 264 | | git diff HEAD |
| | 64 | 265 | | </function> |
| | 64 | 266 | | """, |
| | 1 | 267 | | ExecuteAsync = (args, c) => vsBridge.ExecuteToolAsync(BuiltInToolEnum.Bash, args, c) |
| | 64 | 268 | | }, |
| | 64 | 269 | | |
| | 64 | 270 | | // Git operations |
| | 64 | 271 | | new() |
| | 64 | 272 | | { |
| | 64 | 273 | | Name = BuiltInToolEnum.GitStatus, |
| | 64 | 274 | | DisplayName = SharedResource.ToolGitStatus, |
| | 64 | 275 | | Category = ToolCategory.ReadFiles, |
| | 64 | 276 | | Description = "Check git status of the current repository.", |
| | 64 | 277 | | ExampleToSystemMessage = $""" |
| | 64 | 278 | | For example: |
| | 64 | 279 | | <function name="{BuiltInToolEnum.GitStatus}"> |
| | 64 | 280 | | </function> |
| | 64 | 281 | | """, |
| | 0 | 282 | | ExecuteAsync = (args, c) => vsBridge.ExecuteToolAsync(BuiltInToolEnum.GitStatus, args, c) |
| | 64 | 283 | | }, |
| | 64 | 284 | | new() |
| | 64 | 285 | | { |
| | 64 | 286 | | Name = BuiltInToolEnum.GitLog, |
| | 64 | 287 | | DisplayName = SharedResource.ToolGitLog, |
| | 64 | 288 | | Category = ToolCategory.ReadFiles, |
| | 64 | 289 | | Description = "View git commit history with changed files in commits. Can specify number of commits to displ |
| | 64 | 290 | | ExampleToSystemMessage = $""" |
| | 64 | 291 | | For example: |
| | 64 | 292 | | <function name="{BuiltInToolEnum.GitLog}"> |
| | 64 | 293 | | 10 |
| | 64 | 294 | | </function> |
| | 64 | 295 | | """, |
| | 0 | 296 | | ExecuteAsync = (args, c) => vsBridge.ExecuteToolAsync(BuiltInToolEnum.GitLog, args, c) |
| | 64 | 297 | | }, |
| | 64 | 298 | | new() |
| | 64 | 299 | | { |
| | 64 | 300 | | Name = BuiltInToolEnum.GitDiff, |
| | 64 | 301 | | DisplayName = SharedResource.ToolGitDiff, |
| | 64 | 302 | | Category = ToolCategory.ReadFiles, |
| | 64 | 303 | | Description = "View full git diff for specific commit or HEAD.", |
| | 64 | 304 | | ExampleToSystemMessage = $""" |
| | 64 | 305 | | For example: |
| | 64 | 306 | | <function name="{BuiltInToolEnum.GitDiff}"> |
| | 64 | 307 | | 87b9cdf |
| | 64 | 308 | | </function> |
| | 64 | 309 | | """, |
| | 0 | 310 | | ExecuteAsync = (args, c) => vsBridge.ExecuteToolAsync(BuiltInToolEnum.GitDiff, args, c) |
| | 64 | 311 | | }, |
| | 64 | 312 | | new() |
| | 64 | 313 | | { |
| | 64 | 314 | | Name = BasicEnum.SwitchMode, |
| | 64 | 315 | | DisplayName = SharedResource.ToolSwitchMode, |
| | 64 | 316 | | Category = ToolCategory.ModeSwitch, |
| | 64 | 317 | | Description = "Switch the current application mode. Available modes: Chat, Agent, Plan. Use this when you ne |
| | 64 | 318 | | ExampleToSystemMessage = $""" |
| | 64 | 319 | | For example, to switch to Agent mode: |
| | 64 | 320 | | <function name="{BasicEnum.SwitchMode}"> |
| | 64 | 321 | | Agent |
| | 64 | 322 | | </function> |
| | 64 | 323 | | """, |
| | 0 | 324 | | ExecuteAsync = (args, c) => internalExecutor.ExecuteToolAsync(BasicEnum.SwitchMode, args, c) |
| | 64 | 325 | | }, |
| | 64 | 326 | | |
| | 64 | 327 | | // Skills |
| | 64 | 328 | | new() |
| | 64 | 329 | | { |
| | 64 | 330 | | Name = BasicEnum.ReadSkillContent, |
| | 64 | 331 | | DisplayName = SharedResource.ToolReadSkillContent, |
| | 64 | 332 | | Category = ToolCategory.ReadFiles, |
| | 64 | 333 | | Description = """ |
| | 64 | 334 | | Load the full content of a skill when you need detailed instructions. |
| | 64 | 335 | | Skills are pre-listed in your system prompt with name and description. |
| | 64 | 336 | | Use this tool only when you determine a skill is relevant to the current task. |
| | 64 | 337 | | For parameter use skill name. |
| | 64 | 338 | | """, |
| | 64 | 339 | | ExampleToSystemMessage = $""" |
| | 64 | 340 | | For example, to load a specific skill: |
| | 64 | 341 | | <function name="{BasicEnum.ReadSkillContent}"> |
| | 64 | 342 | | Example skill name |
| | 64 | 343 | | </function> |
| | 64 | 344 | | """, |
| | 64 | 345 | | ExecuteAsync = skillService.LoadSkillContentMarkDownAsync |
| | 64 | 346 | | }, |
| | 64 | 347 | | new() |
| | 64 | 348 | | { |
| | 64 | 349 | | Name = BuiltInToolEnum.DeleteFile, |
| | 64 | 350 | | DisplayName = SharedResource.ToolDeleteFile, |
| | 64 | 351 | | Category = ToolCategory.DeleteFiles, |
| | 64 | 352 | | Description = "To delete a file, use this tool with the relative or absolute filepath.", |
| | 64 | 353 | | ExampleToSystemMessage = $""" |
| | 64 | 354 | | For example, to delete a file located at 'path\\to\\file.cs', you would respond wit |
| | 64 | 355 | | <function name="{BuiltInToolEnum.DeleteFile}"> |
| | 64 | 356 | | C:\path\to\file.cs |
| | 64 | 357 | | </function> |
| | 64 | 358 | | """, |
| | 0 | 359 | | ExecuteAsync = (args, c) => vsBridge.ExecuteToolAsync(BuiltInToolEnum.DeleteFile, args, c) |
| | 64 | 360 | | }, |
| | 64 | 361 | | |
| | 64 | 362 | | // TODO |
| | 64 | 363 | | // User interaction |
| | 64 | 364 | | //new() |
| | 64 | 365 | | //{ |
| | 64 | 366 | | // Name = BasicEnum.AskUser, |
| | 64 | 367 | | // DisplayName = SharedResource.ToolAskUser, |
| | 64 | 368 | | // Category = ToolCategory.ReadFiles, |
| | 64 | 369 | | // Description = """ |
| | 64 | 370 | | // Ask the user a question and present options for them to choose from. |
| | 64 | 371 | | // Use this when you need clarification or user input to proceed. |
| | 64 | 372 | | // The user can select one of the provided options or enter their own answer. |
| | 64 | 373 | | // Parameters: |
| | 64 | 374 | | // - question: The question to ask the user - first line |
| | 64 | 375 | | // - options: A list of options for the user to choose from (one per line) |
| | 64 | 376 | | // """, |
| | 64 | 377 | | // ExampleToSystemMessage = $""" |
| | 64 | 378 | | // For example, to ask which file to open: |
| | 64 | 379 | | // <function name="{BasicEnum.AskUser}"> |
| | 64 | 380 | | // Which file would you like me to open? |
| | 64 | 381 | | // src/main.cs |
| | 64 | 382 | | // src/utils.cs |
| | 64 | 383 | | // src/config.cs |
| | 64 | 384 | | // </function> |
| | 64 | 385 | | // """, |
| | 64 | 386 | | // ExecuteAsync = (args, c) => internalExecutor.ExecuteToolAsync(BasicEnum.AskUser, args, c) |
| | 64 | 387 | | //} |
| | 64 | 388 | | ]; |
| | | 389 | | } |