|
1 | 1 | {% extends '@WebProfiler/Profiler/layout.html.twig' %}
|
2 | 2 |
|
| 3 | +{% block head %} |
| 4 | + {{ parent() }} |
| 5 | + <style> |
| 6 | + .profiler-content table.table pre { |
| 7 | + white-space: pre-wrap; |
| 8 | + word-wrap: break-word; |
| 9 | + overflow-wrap: break-word; |
| 10 | + } |
| 11 | + </style> |
| 12 | +{% endblock %} |
| 13 | + |
3 | 14 | {% block toolbar %}
|
4 | 15 | {% if collector.platformCalls|length > 0 %}
|
5 | 16 | {% set icon %}
|
|
13 | 24 | {% set text %}
|
14 | 25 | <div class="sf-toolbar-info-piece">
|
15 | 26 | <div class="sf-toolbar-info-piece">
|
16 |
| - <b class="label">Chat Calls</b> |
17 |
| - <span class="sf-toolbar-status">{{ collector.chatCalls|length }}</span> |
| 27 | + <b class="label">Agent Calls</b> |
| 28 | + <span class="sf-toolbar-status">{{ collector.agentCalls|length }}</span> |
18 | 29 | </div>
|
19 | 30 | <div class="sf-toolbar-info-piece">
|
20 | 31 | <b class="label">Configured Platforms</b>
|
|
62 | 73 | {% block panel %}
|
63 | 74 | <h2>Symfony AI</h2>
|
64 | 75 |
|
65 |
| - <h3>Chat Calls</h3> |
66 |
| - {% if collector.chatCalls|length %} |
| 76 | + <h3>Agent Calls</h3> |
| 77 | + {% if collector.agentCalls|length %} |
67 | 78 | <table class="table">
|
68 | 79 | <thead>
|
69 | 80 | <tr>
|
|
75 | 86 | </tr>
|
76 | 87 | </thead>
|
77 | 88 | <tbody>
|
78 |
| - {% for call in collector.chatCalls %} |
| 89 | + {% for call in collector.agentCalls %} |
79 | 90 | <tr>
|
80 | 91 | <td><code>{{ call.method }}</code></td>
|
81 | 92 | <td class="text-nowrap">{{ (call.duration * 1000)|round(2) }} ms</td>
|
82 |
| - <td>{{ dump(call.input) }}</td> |
83 |
| - <td>{{ dump(call.result) }}</td> |
| 93 | + <td> |
| 94 | + <div style="max-width: 400px; overflow-x: auto;"><pre>{{ dump(call.input) }}</pre></div> |
| 95 | + </td> |
| 96 | + <td> |
| 97 | + <div style="max-width: 400px; overflow-x: auto;"><pre>{{ dump(call.result) }}</pre></div> |
| 98 | + </td> |
84 | 99 | <td>
|
85 | 100 | {% if call.error %}
|
86 |
| - {{ dump(call.error) }} |
| 101 | + <pre>{{ dump(call.error) }}</pre> |
87 | 102 | {% else %}
|
88 | 103 | <span class="text-muted">None</span>
|
89 | 104 | {% endif %}
|
|
94 | 109 | </table>
|
95 | 110 | {% else %}
|
96 | 111 | <div class="empty">
|
97 |
| - <p>No chat calls were made.</p> |
| 112 | + <p>No agent calls were made.</p> |
98 | 113 | </div>
|
99 | 114 | {% endif %}
|
100 | 115 |
|
101 | 116 | <section class="metrics">
|
102 | 117 | <div class="metric-group">
|
103 | 118 | <div class="metric">
|
104 |
| - <span class="value">{{ collector.chatCalls|length }}</span> |
105 |
| - <span class="label">Chat Calls</span> |
| 119 | + <span class="value">{{ collector.agentCalls|length }}</span> |
| 120 | + <span class="label">Agent Calls</span> |
106 | 121 | </div>
|
107 |
| - </div> |
108 |
| - <div class="metric-divider"></div> |
109 |
| - <div class="metric-group"> |
110 | 122 | <div class="metric">
|
111 | 123 | <span class="value">1</span>
|
112 | 124 | <span class="label">Platforms</span>
|
|
128 | 140 | </div>
|
129 | 141 | </div>
|
130 | 142 | </section>
|
| 143 | + |
131 | 144 | <h3>Platform Calls</h3>
|
132 | 145 | {% if collector.platformCalls|length %}
|
133 | 146 | <div class="sf-tabs">
|
|
137 | 150 | {% for call in collector.platformCalls %}
|
138 | 151 | <table class="table">
|
139 | 152 | <thead>
|
140 |
| - <tr> |
141 |
| - <th colspan="2">Call {{ loop.index }}</th> |
142 |
| - </tr> |
| 153 | + <tr> |
| 154 | + <th colspan="2">Call {{ loop.index }}</th> |
| 155 | + </tr> |
143 | 156 | </thead>
|
144 | 157 | <tbody>
|
145 | 158 | <tr>
|
|
174 | 187 | {% endfor %}
|
175 | 188 | </ol>
|
176 | 189 | {% else %}
|
177 |
| - {{ dump(call.input) }} |
| 190 | + <pre>{{ dump(call.input) }}</pre> |
178 | 191 | {% endif %}
|
179 | 192 | </td>
|
180 | 193 | </tr>
|
|
192 | 205 | </ul>
|
193 | 206 | </li>
|
194 | 207 | {% else %}
|
195 |
| - <li>{{ key }}: {{ dump(value) }}</li> |
| 208 | + <li>{{ key }}: <pre>{{ dump(value) }}</pre></li> |
196 | 209 | {% endif %}
|
197 | 210 | {% endfor %}
|
198 | 211 | </ul>
|
|
230 | 243 | {% if collector.tools|length %}
|
231 | 244 | <table class="table">
|
232 | 245 | <thead>
|
233 |
| - <tr> |
234 |
| - <th>Name</th> |
235 |
| - <th>Description</th> |
236 |
| - <th>Class & Method</th> |
237 |
| - <th>Parameters</th> |
238 |
| - </tr> |
| 246 | + <tr> |
| 247 | + <th>Name</th> |
| 248 | + <th>Description</th> |
| 249 | + <th>Class & Method</th> |
| 250 | + <th>Parameters</th> |
| 251 | + </tr> |
239 | 252 | </thead>
|
240 | 253 | <tbody>
|
241 | 254 | {% for tool in collector.tools %}
|
|
272 | 285 | {% for call in collector.toolCalls %}
|
273 | 286 | <table class="table">
|
274 | 287 | <thead>
|
275 |
| - <tr> |
276 |
| - <th colspan="2">{{ call.call.name }}</th> |
277 |
| - </tr> |
| 288 | + <tr> |
| 289 | + <th colspan="2">{{ call.call.name }}</th> |
| 290 | + </tr> |
278 | 291 | </thead>
|
279 | 292 | <tbody>
|
280 |
| - <tr> |
281 |
| - <th>ID</th> |
282 |
| - <td>{{ call.call.id }}</td> |
283 |
| - </tr> |
284 |
| - <tr> |
285 |
| - <th>Arguments</th> |
286 |
| - <td>{{ dump(call.call.arguments) }}</td> |
287 |
| - </tr> |
288 |
| - <tr> |
289 |
| - <th>Result</th> |
290 |
| - <td>{{ dump(call.result) }}</td> |
291 |
| - </tr> |
| 293 | + <tr> |
| 294 | + <th>ID</th> |
| 295 | + <td>{{ call.call.id }}</td> |
| 296 | + </tr> |
| 297 | + <tr> |
| 298 | + <th>Arguments</th> |
| 299 | + <td><pre>{{ dump(call.call.arguments) }}</pre></td> |
| 300 | + </tr> |
| 301 | + <tr> |
| 302 | + <th>Result</th> |
| 303 | + <td><pre>{{ dump(call.result) }}</pre></td> |
| 304 | + </tr> |
292 | 305 | </tbody>
|
293 | 306 | </table>
|
294 | 307 | {% endfor %}
|
|
0 commit comments