agentgui 1.0.774 → 1.0.775
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/static/css/main.css +14 -0
- package/static/js/client.js +16 -2
package/package.json
CHANGED
package/static/css/main.css
CHANGED
|
@@ -3197,6 +3197,20 @@
|
|
|
3197
3197
|
to { transform: translateX(0); opacity: 1; }
|
|
3198
3198
|
}
|
|
3199
3199
|
|
|
3200
|
+
.msg-edit-btn {
|
|
3201
|
+
background: transparent;
|
|
3202
|
+
border: none;
|
|
3203
|
+
cursor: pointer;
|
|
3204
|
+
color: var(--color-text-secondary);
|
|
3205
|
+
font-size: 0.75rem;
|
|
3206
|
+
padding: 0 0.25rem;
|
|
3207
|
+
opacity: 0;
|
|
3208
|
+
transition: opacity 0.15s;
|
|
3209
|
+
margin-left: 0.5rem;
|
|
3210
|
+
}
|
|
3211
|
+
.message-user:hover .msg-edit-btn { opacity: 0.7; }
|
|
3212
|
+
.msg-edit-btn:hover { opacity: 1 !important; color: var(--color-primary); }
|
|
3213
|
+
|
|
3200
3214
|
.preset-btn {
|
|
3201
3215
|
background: transparent;
|
|
3202
3216
|
border: 1px solid var(--color-border);
|
package/static/js/client.js
CHANGED
|
@@ -618,7 +618,21 @@ class AgentGUIClient {
|
|
|
618
618
|
themeToggle.addEventListener('click', () => this.toggleTheme());
|
|
619
619
|
}
|
|
620
620
|
|
|
621
|
-
|
|
621
|
+
if (this.ui.outputEl) {
|
|
622
|
+
this.ui.outputEl.addEventListener('click', async (e) => {
|
|
623
|
+
const editBtn = e.target.closest('[data-edit-msg]');
|
|
624
|
+
if (!editBtn || !this.state.currentConversation) return;
|
|
625
|
+
const msgEl = editBtn.closest('.message-user');
|
|
626
|
+
const textEl = msgEl?.querySelector('.message-text');
|
|
627
|
+
if (!textEl) return;
|
|
628
|
+
const original = textEl.textContent || '';
|
|
629
|
+
const edited = await window.UIDialog?.prompt('Edit message:', original, 'Edit & Re-run');
|
|
630
|
+
if (!edited || edited === original) return;
|
|
631
|
+
this.ui.messageInput.value = edited;
|
|
632
|
+
this.startExecution();
|
|
633
|
+
});
|
|
634
|
+
}
|
|
635
|
+
|
|
622
636
|
this.setupScrollTracking();
|
|
623
637
|
|
|
624
638
|
window.addEventListener('create-new-conversation', (event) => {
|
|
@@ -2164,7 +2178,7 @@ class AgentGUIClient {
|
|
|
2164
2178
|
const uDiv = document.createElement('div');
|
|
2165
2179
|
uDiv.className = 'message message-user';
|
|
2166
2180
|
uDiv.setAttribute('data-msg-id', m.id);
|
|
2167
|
-
uDiv.innerHTML = `<div class="message-role">User
|
|
2181
|
+
uDiv.innerHTML = `<div class="message-role">User<button class="msg-edit-btn" data-edit-msg="${m.id}" title="Edit and re-run">✎</button></div>${this.renderMessageContent(m.content)}<div class="message-timestamp">${new Date(m.created_at).toLocaleString()}</div>`;
|
|
2168
2182
|
frag.appendChild(uDiv);
|
|
2169
2183
|
}
|
|
2170
2184
|
const isActive = sid === activeSessionId;
|