AI: Use compact table and shortened URLs in listNetworkRequests

In AI Assistance V2, network request lists from `listNetworkRequests`
are the largest tool-output contributor to conversation history size.
Across Nov 4-6 traffic, responses averaged 31.8k characters per call and
accounted for 38% of historical tool responses.

`ListNetworkRequestsTool#handler()` serialized every request into a JSON
object array string. AIDA request serialization JSON-encoded that string
a second time, escaping quotes across five repeated property keys per
row. Same-origin rows also repeated the full origin prefix, and `data:`
payloads or tracking queries added unbounded text.

- Return a newline-separated `id;url;status;duration;size` table
  preceded by the base origin on non-file pages.
- Strip matching same-origin prefixes on path boundaries, resolving
  imported HAR origins from `documentURL`.
- Truncate `data:` URLs over 80 chars, query or fragment suffixes over
  100 chars, and paths over 300 chars with `...<truncated>`.
- Document the compact table, full-URL lookup with
  `getNetworkRequestDetails`, and initiating-origin filtering in
  `network.md`.

Example (`functionResponse.response` shrinks from 755 B to 416 B on 4
rows, and >60% on 40+ row pages):

  Before (double-JSON-encoded inside functionResponse.response.result):
  [{"id":"1000.1","url":"https://shop.example.com/","statusCode":200,"duration":"45 ms","transferSize":"12.4 kB"},{"id":"1000.2","url":"https://shop.example.com/api/products?category=shoes&sort=popular&utm_source=spring_newsletter&utm_medium=email&utm_campaign=2026_launch_promo_v2","statusCode":200,"duration":"120 ms","transferSize":"8.6 kB"},{"id":"1000.3","url":"https://cdn.3rdparty.com/analytics.js","statusCode":200,"duration":"85 ms","transferSize":"34.2 kB"},{"id":"1000.4","url":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==","statusCode":200,"duration":"0 s","transferSize":"0.0 kB"}]

  After:
  origin: https://shop.example.com (omitted from same-origin /... URLs)
  id;url;status;duration;size
  1000.1;/;200;45 ms;12.4 kB
  1000.2;/api/products?category=shoes&sort=popular&utm_source=spring_newsletter&utm_medium=email&utm_campaign=2026_launch_...<truncated>;200;120 ms;8.6 kB
  1000.3;https://cdn.3rdparty.com/analytics.js;200;85 ms;34.2 kB
  1000.4;data:image/png;base64,...<truncated>;200;0 s;0.0 kB

Fixed: 584261897
Change-Id: Ia9e4eed2c4e4ca6cd49542e165d0911a6c00867c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/8797325
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Alina Varkki <alinavarkki@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
4 files changed
tree: 3a1c09f8948c4ff63365328830f335236d9e4666
  1. .agents/
  2. .gemini/
  3. .github/
  4. .vscode/
  5. build_overrides/
  6. config/
  7. docs/
  8. extension-api/
  9. extensions/
  10. front_end/
  11. inspector_overlay/
  12. mcp/
  13. scripts/
  14. test/
  15. third_party/
  16. v8/
  17. .clang-format
  18. .clang-format-ignore
  19. .editorconfig
  20. .env.template
  21. .geminiignore
  22. .git-blame-ignore-revs
  23. .gitallowed
  24. .gitattributes
  25. .gitignore
  26. .gitmodules
  27. .gn
  28. .mailmap
  29. .npmignore
  30. .npmrc
  31. .style.yapf
  32. .stylelintignore
  33. .stylelintrc.json
  34. AUTHORS
  35. BUILD.gn
  36. codereview.settings
  37. CONTRIBUTING.md
  38. DEPS
  39. DIR_METADATA
  40. dt
  41. dt.bat
  42. eslint.config.mjs
  43. favicon.ico
  44. LICENSE
  45. OWNERS
  46. package-lock.json
  47. package.json
  48. PRESUBMIT.py
  49. PRESUBMIT_test.py
  50. README.md
  51. SECURITY.md
  52. vpython.toml
  53. vpython.toml.uv.lock
  54. WATCHLISTS
README.md

Chrome DevTools frontend

npm package

This repository contains the client side of Chrome DevTools. It contains all the TypeScript and CSS code that runs the DevTools web app.

Source code and documentation

The source code is on chromium.googlesource.com.

The Chromium DevTools documentation tells you how to do these tasks:

  • Set up a DevTools frontend checkout.
  • Use a DevTools frontend checkout.
  • Maintain a DevTools frontend checkout.

The documentation also contains design guidelines and architecture documentation.

Other documentation:

Source mirrors

There is a mirror of the DevTools frontend repository on GitHub.

The DevTools frontend is also available on npm as the chrome-devtools-frontend package. The package does not supply CJS modules or ES modules. Thus, it can be difficult to use this package in other tools. For an example of how to use it, see this file.

The version number of the npm package (for example, 1.0.373466) is the Chromium commit position of the latest frontend Git commit. The version number increases with each Chromium commit. But we publish the package only approximately one time each day.

Contact us

Get the latest news

To get the latest news about DevTools development, do one or more of these steps: