Skip to content

Commit 67bfe42

Browse files
Merge pull request #496 from tryAGI/bot/auto-format_202501130520
style:Run dotnet format
2 parents 1d04ec1 + 06b4485 commit 67bfe42

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

src/Cli/src/Commands/DoCommand.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ private static async Task HandleAsync(string input, string inputPath, string out
2323
var llm = await Helpers.GetChatModelAsync().ConfigureAwait(false);
2424
llm.RequestSent += (_, request) => Console.WriteLine($"RequestSent: {request.Messages.AsHistory()}");
2525
llm.ResponseReceived += (_, response) => Console.WriteLine($"ResponseReceived: {response}");
26-
26+
2727
var fileSystemService = new FileSystemService();
2828
llm.AddGlobalTools(fileSystemService.AsTools(), fileSystemService.AsCalls());
29-
29+
3030
var response = await llm.GenerateAsync(inputText);
31-
31+
3232
await Helpers.WriteOutputAsync(response, outputPath).ConfigureAwait(false);
3333
}
3434
}

src/Cli/src/Commands/FileSystemService.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public async Task<IList<string>> FindFilePathsByContentAsync(
3434
CancellationToken cancellationToken = default)
3535
{
3636
var paths = new List<string>();
37-
37+
3838
Console.WriteLine($"Searching for files in \"{directory}\" containing \"{content}\"...");
3939

4040
foreach (var path in Directory.EnumerateFiles(directory, "*.*", SearchOption.AllDirectories))
@@ -46,7 +46,7 @@ public async Task<IList<string>> FindFilePathsByContentAsync(
4646
{
4747
continue;
4848
}
49-
49+
5050
//FileInfo info = new FileInfo(path);
5151
var text = await File.ReadAllTextAsync(path, cancellationToken).ConfigureAwait(false);
5252

@@ -62,7 +62,7 @@ public async Task<IList<string>> FindFilePathsByContentAsync(
6262
// ignore
6363
}
6464
}
65-
65+
6666
Console.WriteLine($"Found {paths.Count} files:");
6767
foreach (var path in paths)
6868
{
@@ -71,16 +71,16 @@ public async Task<IList<string>> FindFilePathsByContentAsync(
7171

7272
return paths;
7373
}
74-
74+
7575
public async Task<string> ReadContentAsync(
7676
string path,
7777
CancellationToken cancellationToken = default)
7878
{
7979
Console.WriteLine($"Reading file at path: {path}");
80-
80+
8181
return await File.ReadAllTextAsync(path, cancellationToken).ConfigureAwait(false);
8282
}
83-
83+
8484
public async Task<string> WriteContentAsync(
8585
string path,
8686
string newContent,
@@ -101,11 +101,11 @@ public async Task<string> WriteContentAsync(
101101
break;
102102
}
103103
}
104-
104+
105105
await File.WriteAllTextAsync(path, newContent, cancellationToken).ConfigureAwait(false);
106-
106+
107107
Console.WriteLine("File written.");
108-
108+
109109
return "File written.";
110110
}
111111
}

0 commit comments

Comments
 (0)