From b5a95f289bfff5f8ebb1eaa032fd6b3089ee7a93 Mon Sep 17 00:00:00 2001 From: Wu Sheng Date: Fri, 25 Sep 2026 09:35:17 +0800 Subject: [PATCH] Move the conversation renderer to Horizon 88e0110 The Prompt tab's What it added mode said the request before was not among the loaded bodies whenever it had nothing to compare with. For every LangChain call, and for the first call of any chain, the request names no request before it, so nothing was missing. Horizon's renderer now says the request names none before it (apache/skywalking-horizon-ui#173), and the embedded copy moves to that commit. --- docs/en/changes/changes.md | 5 +++-- internal/view/conversation-view/HORIZON_COMMIT | 2 +- internal/view/conversation-view/conversation-view.js | 4 ++++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/docs/en/changes/changes.md b/docs/en/changes/changes.md index 942353d..5fd2ff6 100644 --- a/docs/en/changes/changes.md +++ b/docs/en/changes/changes.md @@ -20,8 +20,9 @@ own words, `system`, `human`, `ai` and `tool`, with the tool calls an `ai` message made and each tool result under the call it answers. A response shows the answer, the model and the token counts. What it added stays unavailable for a LangChain call, because no request names the one - before it. The renderer is Horizon's, now pinned at `297f020`, which also draws a light theme's - scrollbars and other native controls light. + before it, and it now says so. It used to say the request before was not among the loaded bodies, + here and for the first call of any chain, where nothing is missing. The renderer is Horizon's, now + pinned at `88e0110`, which also draws a light theme's scrollbars and other native controls light. ## Claude Code diff --git a/internal/view/conversation-view/HORIZON_COMMIT b/internal/view/conversation-view/HORIZON_COMMIT index a4e85ad..5d6822b 100644 --- a/internal/view/conversation-view/HORIZON_COMMIT +++ b/internal/view/conversation-view/HORIZON_COMMIT @@ -1,3 +1,3 @@ -commit 297f0205e502a3bc795d236356a31364dec65b5c +commit 88e0110add7c9d592e1dcf251a4eb6efb8c699a9 package @skywalking-horizon-ui/conversation-view 1.1.0-dev source https://github.com/apache/skywalking-horizon-ui.git diff --git a/internal/view/conversation-view/conversation-view.js b/internal/view/conversation-view/conversation-view.js index 29f81a9..8af3490 100644 --- a/internal/view/conversation-view/conversation-view.js +++ b/internal/view/conversation-view/conversation-view.js @@ -1179,6 +1179,7 @@ const ENGLISH = { promptWholeBody: "The body", promptChanges: "What it added", promptNoPrevious: "The request before this one is not among the loaded bodies, so there is nothing to compare with.", + promptNoPreviousNamed: "This request names no request before it, so there is nothing to compare with.", promptSystem: "System prompt", promptTools: "Tools ({count})", promptMessages: "Messages ({count})", @@ -2385,6 +2386,7 @@ function drawRequest(ctx, e, read2, sides, store) { `; if (!state.promptWhole) { + if (previous === UNNAMED) return `${modes}
${esc(s.promptNoPreviousNamed)}
`; if (!previous) return `${modes}
${esc(s.promptNoPrevious)}
`; return `${modes}${drawDelta(ctx, e, deltaOf(previous, read2), read2, previous.messages.length)}`; } @@ -2410,10 +2412,12 @@ function drawRequest(ctx, e, read2, sides, store) { const whole = section(ctx, e, "request-raw", s.promptWholeBody, "", json(ctx, read2.raw, `${e.id}|req|raw`)); return `${modes}${system}${tools}${messages}${settings2}${whole}`; } +const UNNAMED = "unnamed"; function previousRequest(ctx, e, sides, store) { var _a, _b, _c; if (!sides.request) return null; const mine = store.manifestAt(sides.request.seq, sides.request.row); + if (mine && !mine.previous_request) return UNNAMED; if (!(mine == null ? void 0 : mine.previous_request)) return null; const response = store.responseOfRequestId(mine.previous_request); if (!(response == null ? void 0 : response.manifest.call)) return null;