@mtharrison/loupe 1.6.0 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/client/app.js +34 -0
  2. package/package.json +1 -1
@@ -22851,6 +22851,7 @@ function TraceDetailPanel({
22851
22851
  }
22852
22852
  function renderTabContent(tab, detail, jsonMode, onApplyTagFilter, onApplyTraceFilter) {
22853
22853
  const requestMessages = detail.request.input?.messages || [];
22854
+ const requestStructuredOutput = getRequestStructuredOutput(detail.request);
22854
22855
  const responseMessage = getResponseMessage(detail);
22855
22856
  const toolCalls = getToolCalls(detail);
22856
22857
  const usage = getUsage(detail);
@@ -22883,6 +22884,13 @@ function renderTabContent(tab, detail, jsonMode, onApplyTagFilter, onApplyTraceF
22883
22884
  messages: requestMessages
22884
22885
  }
22885
22886
  ),
22887
+ requestStructuredOutput ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
22888
+ JsonCard,
22889
+ {
22890
+ title: requestStructuredOutput.title,
22891
+ value: requestStructuredOutput.value
22892
+ }
22893
+ ) : null,
22886
22894
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(JsonCard, { title: "Request options", value: detail.request.options }),
22887
22895
  (detail.request.input?.tools || []).length ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
22888
22896
  JsonCard,
@@ -23966,6 +23974,32 @@ function extractTraceRequestPreview(request) {
23966
23974
  }
23967
23975
  return summariseMessageValue(lastUserMessage.content);
23968
23976
  }
23977
+ function getRequestStructuredOutput(request) {
23978
+ const input = request?.input;
23979
+ if (!input || typeof input !== "object") {
23980
+ return null;
23981
+ }
23982
+ if ("response_format" in input && input.response_format !== void 0) {
23983
+ return {
23984
+ title: "Response format",
23985
+ value: input.response_format
23986
+ };
23987
+ }
23988
+ if (input.text && typeof input.text === "object" && "format" in input.text && input.text.format !== void 0) {
23989
+ return {
23990
+ title: "Structured output",
23991
+ value: input.text.format
23992
+ };
23993
+ }
23994
+ const options = request?.options;
23995
+ if (options && typeof options === "object" && "responseFormat" in options && options.responseFormat !== void 0) {
23996
+ return {
23997
+ title: "Response format",
23998
+ value: options.responseFormat
23999
+ };
24000
+ }
24001
+ return null;
24002
+ }
23969
24003
  function extractTraceResponsePreview(trace) {
23970
24004
  if (trace.mode === "stream") {
23971
24005
  const content2 = trace.stream?.reconstructed?.message?.content;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mtharrison/loupe",
3
- "version": "1.6.0",
3
+ "version": "1.7.0",
4
4
  "description": "Lightweight local tracing dashboard for LLM calls",
5
5
  "author": "Matt Harrison",
6
6
  "license": "MIT",