fix(a2a): reject malformed file part URLs as prompt errors
This commit is contained in:
@@ -33,6 +33,14 @@ public sealed class PromptTests : IDisposable
|
||||
Assert.Equal("hello", File.ReadAllText(Path.Combine(_ws, relative)));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task Files_BadUrl_Throws()
|
||||
{
|
||||
var part = Part.FromUrl("not a url", "text/plain", null);
|
||||
await Assert.ThrowsAsync<A2APromptException>(() =>
|
||||
A2APrompt.BuildAsync(Caller, Msg(part), 1024, new HttpClient(), TimeProvider.System, default));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task DataPart_BecomesFencedJson()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user