rm showThoughts and showJSON

3clyp50 committed Jan 6, 2026 at 18:46 UTC 9dea6efe80982bef0a936a25f475b1132bd14b1c
4 files changed +3 -91
webui/components/messages/process-group/process-group.css
+2 -11
@@ -793,25 +793,16 @@
793 display: flex;
794 }
795
796 -/* Thoughts KVP row - default visible (controlled by showThoughts) */
796 +/* Thoughts KVP row */
797 .step-kvp.msg-thoughts {
798 - display: flex;
799 -}
800 -
801 -.step-kvp.msg-thoughts.hide-thoughts {
798 display: none;
799 }
800
805 -/* JSON pre content - default hidden (controlled by showJson) */
801 +/* JSON pre content - default hidden */
802 .process-step-detail-content pre.msg-json {
803 display: none;
804 }
805
810 -.process-step-detail-content pre.msg-json.show-json {
811 - display: block;
812 - margin-top: var(--spacing-xs);
813 -}
814 -
806 /* Nested Process Steps (Subordinate Agents) */
807
808 .process-nested-container {
webui/components/sidebar/bottom/preferences/preferences-panel.html
-14
@@ -41,20 +41,6 @@
41 <span class="slider"></span>
42 </label>
43 </li>
44 - <li x-data>
45 - <span>Show thoughts</span>
46 - <label class="switch">
47 - <input type="checkbox" x-model="$store.preferences.showThoughts">
48 - <span class="slider"></span>
49 - </label>
50 - </li>
51 - <li x-data>
52 - <span>Show JSON</span>
53 - <label class="switch">
54 - <input type="checkbox" x-model="$store.preferences.showJson">
55 - <span class="slider"></span>
56 - </label>
57 - </li>
44 <li x-data>
45 <span>Show utility messages</span>
46 <label class="switch">
webui/components/sidebar/bottom/preferences/preferences-store.js
-56
@@ -32,24 +32,6 @@ const model = {
32 },
33 _speech: false,
34
35 - get showThoughts() {
36 - return this._showThoughts;
37 - },
38 - set showThoughts(value) {
39 - this._showThoughts = value;
40 - this._applyShowThoughts(value);
41 - },
42 - _showThoughts: true,
43 -
44 - get showJson() {
45 - return this._showJson;
46 - },
47 - set showJson(value) {
48 - this._showJson = value;
49 - this._applyShowJson(value);
50 - },
51 - _showJson: false,
52 -
35 get showUtils() {
36 return this._showUtils;
37 },
@@ -95,20 +77,10 @@ const model = {
77 this._collapseProcessGroups = true;
78 }
79
98 - // Load show thoughts preference
99 - try {
100 - const storedShowThoughts = localStorage.getItem("showThoughts");
101 - this._showThoughts = storedShowThoughts !== "false"; // Default true
102 - } catch {
103 - this._showThoughts = true;
104 - }
105 -
80 // Apply all preferences
81 this._applyDarkMode(this._darkMode);
82 this._applyAutoScroll(this._autoScroll);
83 this._applySpeech(this._speech);
110 - this._applyShowThoughts(this._showThoughts);
111 - this._applyShowJson(this._showJson);
84 this._applyShowUtils(this._showUtils);
85 this._applyCollapseProcessGroups(this._collapseProcessGroups);
86 } catch (e) {
@@ -136,34 +108,6 @@ const model = {
108 if (!value) speechStore.stopAudio();
109 },
110
139 - _applyShowThoughts(value) {
140 - localStorage.setItem("showThoughts", value);
141 -
142 - // For original messages
143 - css.toggleCssProperty(
144 - ".msg-thoughts",
145 - "display",
146 - value ? undefined : "none"
147 - );
148 - // For process steps - toggle class on all existing elements
149 - document.querySelectorAll(".step-kvp.msg-thoughts").forEach((el) => {
150 - el.classList.toggle("hide-thoughts", !value);
151 - });
152 -
153 - // Toggle collapse/expand state for all GEN steps (agent type steps with thoughts)
154 - document.querySelectorAll('.process-step[data-type="agent"]').forEach((el) => {
155 - el.classList.toggle("step-expanded", value);
156 - });
157 - },
158 -
159 - _applyShowJson(value) {
160 - // For original messages
161 - css.toggleCssProperty(".msg-json", "display", value ? "block" : "none");
162 - // For process steps - toggle class on pre elements with msg-json
163 - document.querySelectorAll(".process-step-detail-content pre.msg-json").forEach((el) => {
164 - el.classList.toggle("show-json", value);
165 - });
166 - },
111
112 _applyShowUtils(value) {
113 // For original messages
webui/js/messages.js
+1 -10
@@ -1696,14 +1696,10 @@ function renderStepDetailContent(container, content, kvps, type = null) {
1696 container.appendChild(kvpsDiv);
1697 }
1698
1699 - // Add main content if present (JSON content - controlled by showJson preference)
1699 + // Add main content if present (JSON content)
1700 if (content && content.trim()) {
1701 const pre = document.createElement("pre");
1702 pre.classList.add("msg-json");
1703 - // Apply current preference state
1704 - if (preferencesStore.showJson) {
1705 - pre.classList.add("show-json");
1706 - }
1703 pre.textContent = truncateText(content, 1000);
1704 container.appendChild(pre);
1705 }
@@ -1716,11 +1712,6 @@ function renderThoughts(container, value) {
1712 const thoughtsDiv = document.createElement("div");
1713 thoughtsDiv.classList.add("step-thoughts", "msg-thoughts");
1714
1719 - // Apply current preference state - hide if showThoughts is false
1720 - if (!preferencesStore.showThoughts) {
1721 - thoughtsDiv.classList.add("hide-thoughts");
1722 - }
1723 -
1715 const thoughtText = cleanTextValue(value);
1716
1717 if (thoughtText) {