Skip to content

Commit 8b46d74

Browse files
committed
tracy 2.12.0
1 parent fd2f702 commit 8b46d74

4 files changed

Lines changed: 76 additions & 0 deletions

File tree

β€Žtracy/cs/extensions.texyβ€Ž

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,29 @@ Pokud mΓ‘ bΓ½t vΓ½chozΓ­ stav sbalenΓ½, doplňte obΔ›ma elementΕ―m tΕ™Γ­du `trac
104104
Counter pouΕΎijte statickΓ½, aby se nevytvΓ‘Ε™ely duplicitnΓ­ ID na jednΓ© strΓ‘nce.
105105

106106

107+
Podpora AI agentΕ― .{data-version:2.12}
108+
--------------------------------------
109+
110+
KdyΕΎ prohlΓ­ΕΎeč ovlΓ‘dΓ‘ AI agent, Tracy poΕ‘le markdown shrnutΓ­ Tracy Baru do JS konzole. VlastnΓ­ panely mohou nabΓ­dnout svΕ―j markdown pΕ™idΓ‘nΓ­m metody `getAgentInfo(): ?string` do tΕ™Γ­dy implementujΓ­cΓ­ `IBarPanel`:
111+
112+
```php
113+
class DatabasePanel implements Tracy\IBarPanel
114+
{
115+
public function getTab(): string { /* ... */ }
116+
public function getPanel(): string { /* ... */ }
117+
118+
public function getAgentInfo(): ?string
119+
{
120+
return "## Database\n\n- Dotazy: {$this->count}\n- Celkový čas: {$this->time} ms\n";
121+
}
122+
}
123+
```
124+
125+
VrΓ‘cenΓ½ markdown se zaΕ™adΓ­ do markdown shrnutΓ­ baru. Pokud metoda chybΓ­ nebo vrΓ‘tΓ­ `null`, panel se ve shrnutΓ­ vynechΓ‘.
126+
127+
VΓ­ce v [integraci Tracy s AI agenty |guide#Podpora AI agentΕ―].
128+
129+
107130
RozΕ‘Γ­Ε™enΓ­ pro Bluescreen
108131
========================
109132

β€Žtracy/cs/guide.texyβ€Ž

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,21 @@ Pokud pouΕΎΓ­vΓ‘te celΓ½ Nette Framework, lze toto a dalΕ‘Γ­ nastavit v [konfigu
182182
Aby vΓ‘m vΕ‘ak nezaplavila e-mailovou schrΓ‘nku, poΕ‘le vΕΎdy **pouze jednu zprΓ‘vu** a vytvoΕ™Γ­ soubor `email-sent`. VΓ½vojΓ‘Ε™ po pΕ™ijetΓ­ e-mailovΓ© notifikace zkontroluje log, opravΓ­ aplikaci a smaΕΎe monitorovacΓ­ soubor, čímΕΎ se opΔ›t aktivuje odesΓ­lΓ‘nΓ­ e-mailΕ―.
183183

184184

185+
Podpora AI agentΕ― .{data-version:2.12}
186+
======================================
187+
188+
KdyΕΎ vaΕ‘i aplikaci ovlΓ‘dΓ‘ AI agent pΕ™es prohlΓ­ΕΎeč (Chrome DevTools MCP, Playwright, Puppeteer), Tracy jej detekuje podle JavaScriptovΓ© vlastnosti `navigator.webdriver` a posΓ­lΓ‘ markdown verzi hlavnΓ­ch diagnostickΓ½ch vΓ½stupΕ― do konzole prohlΓ­ΕΎeče vedle standardnΓ­ho UI:
189+
190+
- **BlueScreen** – vΓ½jimka, stack trace a hodnoty promΔ›nnΓ½ch se poΕ‘lou do `console.error()` vedle červenΓ© obrazovky, a to pro synchronnΓ­ vykreslovΓ‘nΓ­ i AJAXovΓ© chyby.
191+
- **Tracy Bar** – markdown shrnutΓ­ hlavnΓ­ch panelΕ― (SQL, Errors, Dumps) se poΕ‘le do `console.log()`.
192+
- **`Debugger::dump()`** – plain text varianta vedle bΔ›ΕΎnΓ©ho HTML vΓ½pisu, aby dumpy nezΕ―staly pohΕ™benΓ© ve strΓ‘nce.
193+
- **ProdukčnΓ­ 500 strΓ‘nka** – `console.error()` agentovi sdΔ›lΓ­, ΕΎe doΕ‘lo k chybΔ› a ΕΎe jejΓ­ detaily jsou zalogovanΓ© na serveru.
194+
195+
Detekce nastavΓ­ cookie `tracy-webdriver=1`; pokud chcete markdown vΓ½stup vidΔ›t z normΓ‘lnΓ­ho prohlΓ­ΕΎeče, cookie si nastavte ručnΔ› v DevTools. Aktivace agenta neovlivňuje `.md` sourozence, kteΕ™Γ­ se zapisujΓ­ vedle kaΕΎdΓ©ho `log/exception-*.html` bez podmΓ­nek – ti jsou vstupem pro dΓ‘vkovΓ© zpracovΓ‘nΓ­ produkčnΓ­ch logΕ―.
196+
197+
VlastnΓ­ panely Tracy Baru mohou nabΓ­dnout svΕ―j markdown vΓ½stup implementacΓ­ [`getAgentInfo()` |extensions#Podpora AI agentΕ―]. Pro uΕΎivatele Claude Code obsahuje [Nette plugin |https://ai.nette.org/en/claude-code] skill `tracy-debugging`, kterΓ½ agentovi vysvΔ›tluje, jak číst Tracy vΓ½stup z `list_console_messages()`.
198+
199+
185200
OtevΓ­rΓ‘nΓ­ v editoru
186201
===================
187202

β€Žtracy/en/extensions.texyβ€Ž

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,29 @@ If the default state is collapsed, add the class `tracy-collapsed` to both eleme
104104
Use a static counter to prevent duplicate IDs on one page.
105105

106106

107+
AI Agent Support .{data-version:2.12}
108+
-------------------------------------
109+
110+
When an AI agent drives the browser, Tracy sends a markdown summary of the Tracy Bar to the JS console. Custom panels can supply their own markdown by adding a `getAgentInfo(): ?string` method to their `IBarPanel` implementation:
111+
112+
```php
113+
class DatabasePanel implements Tracy\IBarPanel
114+
{
115+
public function getTab(): string { /* ... */ }
116+
public function getPanel(): string { /* ... */ }
117+
118+
public function getAgentInfo(): ?string
119+
{
120+
return "## Database\n\n- Queries: {$this->count}\n- Total time: {$this->time} ms\n";
121+
}
122+
}
123+
```
124+
125+
The returned markdown is included in the bar's markdown summary. When the method is missing or returns `null`, the panel is omitted from the summary.
126+
127+
See [Tracy's AI agent integration |guide#AI Agent Support] for the full picture.
128+
129+
107130
Bluescreen Extensions
108131
=====================
109132

β€Žtracy/en/guide.texyβ€Ž

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,21 @@ If you use the entire Nette Framework, you can set this and others in the [confi
182182
To protect your e-mail box from being flooded, Tracy sends **only one message** and creates a file `email-sent`. When a developer receives the e-mail notification, they check the log, correct the application, and delete the `email-sent` monitoring file. This reactivates the e-mail sending.
183183

184184

185+
AI Agent Support .{data-version:2.12}
186+
=====================================
187+
188+
When an AI agent drives your application through a browser (Chrome DevTools MCP, Playwright, Puppeteer), Tracy detects it via the JavaScript `navigator.webdriver` property and sends a markdown version of the key diagnostics into the browser console alongside the standard UI:
189+
190+
- **BlueScreen** – exception, stack trace and variable values sent to `console.error()` next to the red screen, for both synchronous rendering and AJAX errors.
191+
- **Tracy Bar** – markdown summary of the main panels (SQL, Errors, Dumps) sent to `console.log()`.
192+
- **`Debugger::dump()`** – a plain text variant alongside the regular HTML output, so dumps don't get buried in the page.
193+
- **Production 500 page** – `console.error()` informs the agent that an error has occurred and that details have been logged on the server.
194+
195+
Detection sets the cookie `tracy-webdriver=1`; you can set it manually in DevTools to enable the markdown output from a regular browser. Agent activation does not affect the `.md` siblings written next to every `log/exception-*.html` – those are produced unconditionally and form the basis for batch processing of production logs.
196+
197+
Custom Tracy Bar panels can supply their own markdown by implementing [`getAgentInfo()` |extensions#AI Agent Support]. For Claude Code users, the [Nette plugin |https://ai.nette.org/en/claude-code] includes the `tracy-debugging` skill that teaches the agent how to read Tracy's output from `list_console_messages()`.
198+
199+
185200
Opening Files in the Editor
186201
===========================
187202

0 commit comments

Comments
Β (0)