mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-03-28 23:50:05 +00:00
mcp: handle missing request IDs safely
This commit is contained in:
@@ -172,7 +172,8 @@ pub const tool_list = [_]protocol.Tool{
|
||||
|
||||
pub fn handleList(server: *Server, arena: std.mem.Allocator, req: protocol.Request) !void {
|
||||
_ = arena;
|
||||
try server.sendResult(req.id.?, .{ .tools = &tool_list });
|
||||
const id = req.id orelse return;
|
||||
try server.sendResult(id, .{ .tools = &tool_list });
|
||||
}
|
||||
|
||||
const GotoParams = struct {
|
||||
|
||||
Reference in New Issue
Block a user