mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-03-22 04:34:44 +00:00
mcp: improve evaluate error reporting and refactor tool result types
This commit is contained in:
@@ -149,6 +149,20 @@ pub const Resource = struct {
|
||||
mimeType: ?[]const u8 = null,
|
||||
};
|
||||
|
||||
pub fn TextContent(comptime T: type) type {
|
||||
return struct {
|
||||
type: []const u8 = "text",
|
||||
text: T,
|
||||
};
|
||||
}
|
||||
|
||||
pub fn CallToolResult(comptime T: type) type {
|
||||
return struct {
|
||||
content: []const TextContent(T),
|
||||
isError: bool = false,
|
||||
};
|
||||
}
|
||||
|
||||
pub const JsonEscapingWriter = struct {
|
||||
inner_writer: *std.Io.Writer,
|
||||
writer: std.Io.Writer,
|
||||
|
||||
Reference in New Issue
Block a user