Skip to content

Commit 03410c5

Browse files
DOC-5581 remove Chat about Code feature with Augment
1 parent 5bdbdd5 commit 03410c5

File tree

4 files changed

+21
-113
lines changed

4 files changed

+21
-113
lines changed

assets/css/index.css

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1296,15 +1296,7 @@ a[href*="#no-click"], img[src*="#no-click"] {
12961296
@apply bg-redis-red-600 border-redis-red-600;
12971297
}
12981298

1299-
.chat-btn {
1300-
@apply inline-flex items-center px-4 py-2 border border-redis-pen-700 text-sm font-medium rounded-md;
1301-
@apply text-redis-ink-900 bg-white hover:bg-redis-pen-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-redis-red-500;
1302-
@apply transition-colors duration-200;
1303-
}
13041299

1305-
.chat-btn:hover {
1306-
@apply border-redis-red-500 text-redis-red-600;
1307-
}
13081300

13091301
.start-again-btn {
13101302
@apply inline-flex items-center px-3 py-2 border border-orange-500 text-sm font-medium rounded-md;
@@ -1353,7 +1345,6 @@ a[href*="#no-click"], img[src*="#no-click"] {
13531345
.copy-btn,
13541346
.download-btn,
13551347
.jupyter-btn,
1356-
.chat-btn,
13571348
.start-again-btn {
13581349
@apply flex-1 justify-center;
13591350
}
@@ -1379,8 +1370,7 @@ a[href*="#no-click"], img[src*="#no-click"] {
13791370
.generate-btn:focus,
13801371
.copy-btn:focus,
13811372
.download-btn:focus,
1382-
.jupyter-btn:focus,
1383-
.chat-btn:focus {
1373+
.jupyter-btn:focus {
13841374
@apply outline-none ring-2 ring-offset-2 ring-redis-red-500;
13851375
}
13861376

@@ -1444,14 +1434,6 @@ a[href*="#no-click"], img[src*="#no-click"] {
14441434
background: #718096;
14451435
}
14461436

1447-
/* Code Chat Section Styles */
1448-
.code-chat-section {
1449-
@apply mt-8 border-t border-redis-pen-700 pt-8;
1450-
}
1451-
1452-
.code-chat-header {
1453-
@apply mb-4;
1454-
}
14551437

14561438
/* Markdown Rendering Styles for Chat Messages */
14571439
.chat-message .message-content h1,

content/develop/ai/agent-builder/_index.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ Select the **Try in Jupyter** button to run the code in a notebook, load a sampl
5454

5555
The generated code includes detailed setup instructions and best practices to get you started quickly. If you want to generate another agent, select the **Start again** button.
5656

57-
Use the **Chat about code** button to ask questions about your agent code and learn how to customize it.
5857

5958
## Learn more
6059

layouts/shortcodes/agent-builder.html

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,6 @@ <h4 class="text-lg font-medium text-redis-ink-900 mb-4">Generated Agent Code</h4
7777
</svg>
7878
Try in Jupyter
7979
</button>
80-
<button type="button" id="chat-about-code-btn" class="chat-btn">
81-
<svg class="w-4 h-4 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
82-
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 10h.01M12 10h.01M16 10h.01M9 16H5a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v8a2 2 0 01-2 2h-5l-5 4v-4z"/>
83-
</svg>
84-
Chat about code
85-
</button>
8680
<button type="button" id="start-again-btn" class="start-again-btn">
8781
<svg class="w-4 h-4 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
8882
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"/>
@@ -100,44 +94,6 @@ <h4 class="text-lg font-medium text-redis-ink-900 mb-4">Generated Agent Code</h4
10094
</div>
10195
</div>
10296

103-
<!-- Code Chat Section -->
104-
<div id="code-chat-section" class="code-chat-section agent-builder-hidden">
105-
<div class="code-chat-header">
106-
<div class="flex justify-between items-center mb-4">
107-
<h4 class="text-lg font-medium text-redis-ink-900">Chat About Your Code</h4>
108-
<button id="close-code-chat-btn" class="text-redis-pen-600 hover:text-redis-ink-900 focus:outline-none focus:ring-2 focus:ring-redis-red-500 focus:ring-offset-2 rounded-md p-1">
109-
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
110-
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"/>
111-
</svg>
112-
</button>
113-
</div>
114-
</div>
115-
116-
<!-- Code Chat Interface -->
117-
<div id="code-chat-container" class="chat-container">
118-
<div id="code-chat-messages" class="chat-messages">
119-
<!-- Initial message will be added by JavaScript -->
120-
</div>
121-
122-
<!-- Code Chat Input -->
123-
<div class="chat-input-container">
124-
<div class="chat-input-wrapper">
125-
<input
126-
type="text"
127-
id="code-chat-input"
128-
class="chat-input"
129-
placeholder="Ask a question about your generated code..."
130-
autocomplete="off"
131-
>
132-
<button id="code-chat-send" class="send-button" disabled>
133-
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
134-
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 19l9 2-9-18-9 18 9-2zm0 0v-8"/>
135-
</svg>
136-
</button>
137-
</div>
138-
</div>
139-
</div>
140-
</div>
14197
</div>
14298

14399
<!-- Load the agent builder JavaScript -->

static/js/agent-builder.js

Lines changed: 20 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -113,14 +113,7 @@
113113
copyBtn: document.getElementById('copy-code-btn'),
114114
downloadBtn: document.getElementById('download-code-btn'),
115115
tryJupyterBtn: document.getElementById('try-jupyter-btn'),
116-
chatAboutCodeBtn: document.getElementById('chat-about-code-btn'),
117-
startAgainBtn: document.getElementById('start-again-btn'),
118-
codeChatSection: document.getElementById('code-chat-section'),
119-
codeChatContainer: document.getElementById('code-chat-container'),
120-
codeChatMessages: document.getElementById('code-chat-messages'),
121-
codeChatInput: document.getElementById('code-chat-input'),
122-
codeChatSend: document.getElementById('code-chat-send'),
123-
closeCodeChatBtn: document.getElementById('close-code-chat-btn')
116+
startAgainBtn: document.getElementById('start-again-btn')
124117
};
125118

126119
// Check if elements exist (shortcode might not be on this page)
@@ -786,7 +779,6 @@ public class ${formData.agentName.replace(/\s+/g, '')}
786779
const copyBtn = document.getElementById('copy-code-btn');
787780
const downloadBtn = document.getElementById('download-code-btn');
788781
const tryJupyterBtn = document.getElementById('try-jupyter-btn');
789-
const chatAboutCodeBtn = document.getElementById('chat-about-code-btn');
790782

791783
// Attach listeners only if they haven't been attached yet
792784
if (copyBtn && !copyBtn.hasAttribute('data-listener-attached')) {
@@ -807,23 +799,6 @@ public class ${formData.agentName.replace(/\s+/g, '')}
807799
tryJupyterBtn.setAttribute('data-listener-attached', 'true');
808800
}
809801

810-
if (chatAboutCodeBtn && !chatAboutCodeBtn.hasAttribute('data-listener-attached')) {
811-
chatAboutCodeBtn.addEventListener('click', function(event) {
812-
event.preventDefault();
813-
openCodeChat();
814-
});
815-
chatAboutCodeBtn.setAttribute('data-listener-attached', 'true');
816-
}
817-
818-
// Add close code chat button listener
819-
const closeCodeChatBtn = document.getElementById('close-code-chat-btn');
820-
if (closeCodeChatBtn && !closeCodeChatBtn.hasAttribute('data-listener-attached')) {
821-
closeCodeChatBtn.addEventListener('click', function(event) {
822-
event.preventDefault();
823-
closeCodeChat();
824-
});
825-
closeCodeChatBtn.setAttribute('data-listener-attached', 'true');
826-
}
827802

828803
// Add start again button listener
829804
const startAgainBtn = document.getElementById('start-again-btn');
@@ -977,7 +952,8 @@ public class ${formData.agentName.replace(/\s+/g, '')}
977952
}
978953

979954
// Code Chat Functions
980-
function openCodeChat() {
955+
/* Removed: Code Chat Functions */
956+
/* function openCodeChat() {
981957
const code = elements.codeSection.dataset.code;
982958
if (!code) {
983959
alert('No code available to chat about');
@@ -1014,10 +990,18 @@ public class ${formData.agentName.replace(/\s+/g, '')}
1014990
elements.codeChatSection.scrollIntoView({ behavior: 'smooth' });
1015991
}
1016992
993+
*/
994+
1017995
function closeCodeChat() {
1018-
elements.codeChatSection.classList.add('agent-builder-hidden');
1019-
elements.codeChatInput.value = '';
1020-
elements.codeChatSend.disabled = true;
996+
if (elements.codeChatSection) {
997+
elements.codeChatSection.classList.add('agent-builder-hidden');
998+
}
999+
if (elements.codeChatInput) {
1000+
elements.codeChatInput.value = '';
1001+
}
1002+
if (elements.codeChatSend) {
1003+
elements.codeChatSend.disabled = true;
1004+
}
10211005

10221006
// Don't reactivate the wizard - it should remain inactive until "Start again" is clicked
10231007
// The wizard was made inactive when code was generated, not when chat was opened
@@ -1031,7 +1015,9 @@ public class ${formData.agentName.replace(/\s+/g, '')}
10311015
elements.codeSection.classList.add('agent-builder-hidden');
10321016

10331017
// Hide code chat section
1034-
elements.codeChatSection.classList.add('agent-builder-hidden');
1018+
if (elements.codeChatSection) {
1019+
elements.codeChatSection.classList.add('agent-builder-hidden');
1020+
}
10351021

10361022
// Reactivate the initial wizard
10371023
elements.chatContainer.classList.remove('agent-builder-inactive');
@@ -1076,25 +1062,10 @@ public class ${formData.agentName.replace(/\s+/g, '')}
10761062
elements.chatInput.focus();
10771063
}
10781064

1079-
function setupCodeChatListeners() {
1080-
// Input change listener
1081-
elements.codeChatInput.addEventListener('input', handleCodeChatInputChange);
1082-
1083-
// Enter key listener
1084-
elements.codeChatInput.addEventListener('keydown', handleCodeChatKeyDown);
1065+
/* Removed: Code Chat listeners and handlers as feature is removed */
1066+
function setupCodeChatListeners() { /* no-op */ }
10851067

1086-
// Prevent search modal on slash
1087-
elements.codeChatInput.addEventListener('keydown', preventSearchModalOnSlash);
1088-
1089-
// Send button listener
1090-
elements.codeChatSend.addEventListener('click', handleCodeChatSend);
1091-
}
1092-
1093-
function removeCodeChatListeners() {
1094-
elements.codeChatInput.removeEventListener('input', handleCodeChatInputChange);
1095-
elements.codeChatInput.removeEventListener('keydown', handleCodeChatKeyDown);
1096-
elements.codeChatSend.removeEventListener('click', handleCodeChatSend);
1097-
}
1068+
function removeCodeChatListeners() { /* no-op */ }
10981069

10991070
function handleCodeChatInputChange() {
11001071
const input = elements.codeChatInput.value.trim();

0 commit comments

Comments
 (0)