gen step detail content fix

3clyp50 committed Jan 21, 2026 at 14:57 UTC 0acc14a315251e71e230b6ea370d41a3b7b8efd1
2 files changed +43 -6
webui/components/modals/process-step-detail/process-step-detail.html
+39 -4
@@ -31,17 +31,17 @@
31 </div>
32 <div class="header-actions">
33 <button class="btn btn-action-header copy-all"
34 - @click="$store.stepDetail.copyToClipboard($store.stepDetail.formatStepForCopy($store.stepDetail.selectedStepForDetail))"
34 + @click.stop="$store.stepDetail.copyToClipboard($store.stepDetail.formatStepForCopy($store.stepDetail.selectedStepForDetail)).then(() => { $el.classList.add('copied'); setTimeout(() => $el.classList.remove('copied'), 1500) })"
35 title="Copy Complete Step with Metadata">
36 <span class="material-symbols-outlined">copy_all</span> All
37 </button>
38 <button class="btn btn-action-header copy-content"
39 - @click="$store.stepDetail.copyToClipboard($store.stepDetail.getStepPrimaryContent($store.stepDetail.selectedStepForDetail))"
40 - title="Copy Primary Content Only">
39 + @click.stop="$store.stepDetail.copyToClipboard($store.stepDetail.getStepPrimaryContent($store.stepDetail.selectedStepForDetail)).then(() => { $el.classList.add('copied'); setTimeout(() => $el.classList.remove('copied'), 1500) })"
40 + title="Copy Raw LLM Response">
41 <span class="material-symbols-outlined">content_copy</span> Content
42 </button>
43 <button class="btn btn-action-header toggle-raw"
44 - @click="showRaw = !showRaw"
44 + @click.stop="showRaw = !showRaw"
45 :class="{ 'active': showRaw }"
46 title="Toggle Raw JSON View">
47 <span class="material-symbols-outlined">data_object</span>
@@ -105,6 +105,13 @@
105 </template>
106 </div>
107 </template>
108 + <!-- Raw LLM Response (content field) -->
109 + <template x-if="$store.stepDetail.selectedStepForDetail?.content">
110 + <div class="content-block raw-response-block">
111 + <h4><span class="material-symbols-outlined">smart_toy</span> Raw Response</h4>
112 + <pre class="raw-response-content" x-text="$store.stepDetail.selectedStepForDetail?.content"></pre>
113 + </div>
114 + </template>
115 </div>
116 </template>
117
@@ -305,6 +312,16 @@
312 border-color: var(--color-primary);
313 }
314
315 + .btn-action-header.copied {
316 + background: var(--color-success, #22c55e);
317 + border-color: var(--color-success, #22c55e);
318 + color: white;
319 + }
320 +
321 + .btn-action-header.copied .material-symbols-outlined::before {
322 + content: 'check';
323 + }
324 +
325 .modal-body {
326 flex: 1;
327 overflow-y: auto;
@@ -390,6 +407,24 @@
407 font-style: italic;
408 }
409
410 + .raw-response-block {
411 + margin-top: 1rem;
412 + }
413 +
414 + .raw-response-content {
415 + background: var(--color-background);
416 + padding: 1rem;
417 + border-radius: 8px;
418 + font-family: var(--font-mono);
419 + font-size: 0.85rem;
420 + margin: 0;
421 + max-height: 50vh;
422 + overflow: auto;
423 + white-space: pre-wrap;
424 + word-break: break-word;
425 + color: var(--color-text);
426 + }
427 +
428 .tool-call-block {
429 margin-bottom: 1rem;
430 }
webui/components/modals/process-step-detail/step-detail-store.js
+4 -2
@@ -63,13 +63,15 @@ const model = {
63 },
64
65 // Get primary content for a step (type-aware)
66 + // For "Copy Content" button - returns the main content, not metadata
67 getStepPrimaryContent(step) {
68 if (!step) return "";
69 if (step.type === "code_exe") {
70 return step.content || "";
71 }
71 - if (step.type === "agent" && step.kvps) {
72 - return step.kvps.thoughts || step.kvps.headline || step.content || "";
72 + if (step.type === "agent") {
73 + // Raw LLM response is in content field - this is the primary content
74 + return step.content || "";
75 }
76 if ((step.type === "tool" || step.type === "mcp") && step.kvps) {
77 return step.kvps.result || step.content || "";