Skip to content

Commit bc94212

Browse files
committed
feat(ai): preview button strings and CSS for edit summary
Add AI_CHAT_PREVIEW_OPEN and AI_CHAT_PREVIEW_VIEWING i18n strings. Add .ai-edit-preview-btn styles with active/hover states for the live preview toggle button in edit summaries.
1 parent 2483a8d commit bc94212

2 files changed

Lines changed: 38 additions & 0 deletions

File tree

src/nls/root/strings.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1931,6 +1931,8 @@ define({
19311931
"AI_CHAT_CODE_EXPAND": "Expand",
19321932
"AI_CHAT_CODE_EXPAND_LINES": "Click to expand - {0} lines",
19331933
"AI_CHAT_CODE_COLLAPSE_FOOTER": "Click to collapse",
1934+
"AI_CHAT_PREVIEW_OPEN": "Preview",
1935+
"AI_CHAT_PREVIEW_VIEWING": "Previewing",
19341936
"AI_CHAT_QUESTION_OTHER": "Type a custom answer\u2026",
19351937
"AI_CHAT_IMAGE_LIMIT": "Maximum {0} images allowed",
19361938
"AI_CHAT_IMAGE_REMOVE": "Remove image",

src/styles/Extn-AIChatPanel.less

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -847,6 +847,42 @@
847847
}
848848
}
849849

850+
.ai-edit-preview-btn {
851+
display: flex;
852+
align-items: center;
853+
gap: 4px;
854+
margin-top: 6px;
855+
background: rgba(102, 187, 106, 0.1);
856+
border: 1px solid rgba(102, 187, 106, 0.25);
857+
color: #66bb6a;
858+
font-size: @sidebar-small-font-size;
859+
padding: 4px 12px;
860+
border-radius: 4px;
861+
cursor: pointer;
862+
transition: background-color 0.15s ease, border-color 0.15s ease;
863+
864+
&:hover:not(.active) {
865+
background: rgba(102, 187, 106, 0.18);
866+
border-color: rgba(102, 187, 106, 0.4);
867+
}
868+
869+
&.active {
870+
background: rgba(102, 187, 106, 0.15);
871+
border-color: rgba(102, 187, 106, 0.3);
872+
color: #66bb6a;
873+
cursor: pointer;
874+
875+
&:hover {
876+
background: rgba(102, 187, 106, 0.1);
877+
border-color: rgba(102, 187, 106, 0.2);
878+
}
879+
}
880+
881+
i {
882+
font-size: 11px;
883+
}
884+
}
885+
850886
/* ── Initial restore point (PUC) ────────────────────────────────────── */
851887
.ai-msg-restore-point {
852888
display: flex;

0 commit comments

Comments
 (0)