mcp: add search, markdown, links, and over tools

This commit is contained in:
Adrià Arrufat
2026-02-25 20:24:57 +09:00
parent 5fea4cf760
commit 9b3fa809bf
3 changed files with 125 additions and 26 deletions

View File

@@ -8,23 +8,19 @@ pub const McpServer = struct {
allocator: std.mem.Allocator,
app: *App,
// Browser State
http_client: *HttpClient,
notification: *lp.Notification,
browser: *lp.Browser,
session: *lp.Session,
page: *lp.Page,
// Thread synchronization
io_thread: ?std.Thread = null,
queue_mutex: std.Thread.Mutex = .{},
queue_condition: std.Thread.Condition = .{},
message_queue: std.ArrayListUnmanaged([]const u8) = .empty,
// State
is_running: std.atomic.Value(bool) = std.atomic.Value(bool).init(false),
// Stdio
stdout_mutex: std.Thread.Mutex = .{},
const Self = @This();
@@ -64,7 +60,6 @@ pub const McpServer = struct {
}
self.message_queue.deinit(self.allocator);
// Clean up browser state
self.browser.deinit();
self.allocator.destroy(self.browser);
self.notification.deinit();