You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore(memory): expose a tool for getting the inital data. (#1909)
This refactors the code to extract the Id logic from the PageCollector
and provide it in the heapsnapshot.
We need to use an UID as we need the internal ClassKey to query the
heapsnapshot, but that is a strange string (usually looking like
`,ClassName`) which may get the LLM confused as we use comma separated
output.
**Description:** Capture a heap snapshot of the currently selected page. Use to analyze the memory distribution of JavaScript objects and debug memory leaks.
282
-
283
-
**Parameters:**
284
-
285
-
-**filePath** (string) **(required)**: A path to a .heapsnapshot file to save the heapsnapshot to.
286
-
287
-
---
288
-
289
280
## Network
290
281
291
282
### `get_network_request`
@@ -398,3 +389,15 @@ in the DevTools Elements panel (if any).
398
389
-**verbose** (boolean) _(optional)_: Whether to include all possible information available in the full a11y tree. Default is false.
399
390
400
391
---
392
+
393
+
## Memory
394
+
395
+
### `take_memory_snapshot`
396
+
397
+
**Description:** Capture a heap snapshot of the currently selected page. Use to analyze the memory distribution of JavaScript objects and debug memory leaks.
398
+
399
+
**Parameters:**
400
+
401
+
-**filePath** (string) **(required)**: A path to a .heapsnapshot file to save the heapsnapshot to.
description: `Capture a heap snapshot of the currently selected page. Use to analyze the memory distribution of JavaScript objects and debug memory leaks.`,
'Loads a memory heapsnapshot and returns all available information including statistics, static data, and aggregated node information. Supports pagination for aggregates.',
64
+
annotations: {
65
+
category: ToolCategory.MEMORY,
66
+
readOnlyHint: true,
67
+
conditions: ['experimentalMemory'],
68
+
},
69
+
schema: {
70
+
filePath: zod.string().describe('A path to a .heapsnapshot file to read.'),
71
+
pageIdx: zod
72
+
.number()
73
+
.optional()
74
+
.describe('The page index for pagination of aggregates.'),
75
+
pageSize: zod
76
+
.number()
77
+
.optional()
78
+
.describe('The page size for pagination of aggregates.'),
0 commit comments