agentgui 1.0.774 → 1.0.776

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentgui",
3
- "version": "1.0.774",
3
+ "version": "1.0.776",
4
4
  "description": "Multi-agent ACP client with real-time communication",
5
5
  "type": "module",
6
6
  "main": "electron/main.js",
package/server.js CHANGED
@@ -86,7 +86,6 @@ function buildSystemPrompt(agentId, model, subAgent) {
86
86
  }
87
87
  if (model) parts.push(`Model: ${model}.`);
88
88
  if (subAgent) parts.push(`Subagent: ${subAgent}.`);
89
- parts.push('Be concise. Minimize unnecessary tool calls. Read files before editing. Prefer targeted searches over broad exploration.');
90
89
  return parts.join(' ');
91
90
  }
92
91
 
@@ -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);
@@ -618,7 +618,21 @@ class AgentGUIClient {
618
618
  themeToggle.addEventListener('click', () => this.toggleTheme());
619
619
  }
620
620
 
621
- // Setup scroll position tracking for current conversation
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</div>${this.renderMessageContent(m.content)}<div class="message-timestamp">${new Date(m.created_at).toLocaleString()}</div>`;
2181
+ uDiv.innerHTML = `<div class="message-role">User<button class="msg-edit-btn" data-edit-msg="${m.id}" title="Edit and re-run">&#9998;</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;