agentgui 1.0.486 → 1.0.488

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.486",
3
+ "version": "1.0.488",
4
4
  "description": "Multi-agent ACP client with real-time communication",
5
5
  "type": "module",
6
6
  "main": "server.js",
package/static/index.html CHANGED
@@ -522,7 +522,14 @@
522
522
  }
523
523
 
524
524
  .view-toggle-btn:hover { color: var(--color-text-primary); }
525
- .view-toggle-btn.active { color: var(--color-primary); border-bottom-color: var(--color-primary); }
525
+ .view-toggle-btn.active { color: var(--color-primary); border-bottom-color: var(--color-primary); }
526
+
527
+ .view-toggle-btn svg {
528
+ width: 1.2rem;
529
+ height: 1.2rem;
530
+ display: block;
531
+ margin: 0 auto;
532
+ }
526
533
 
527
534
  /* --- Messages scroll area --- */
528
535
  #output-scroll {
@@ -3141,10 +3148,10 @@
3141
3148
 
3142
3149
  <!-- View toggle bar (hidden by default) -->
3143
3150
  <div class="view-toggle-bar" id="viewToggleBar">
3144
- <button class="view-toggle-btn active" data-view="chat">Chat</button>
3145
- <button class="view-toggle-btn" data-view="files">Files</button>
3146
- <button class="view-toggle-btn" data-view="voice" id="voiceTabBtn" style="display:none;">Voice</button>
3147
- <button class="view-toggle-btn" data-view="terminal" id="terminalTabBtn">Terminal</button>
3151
+ <button class="view-toggle-btn active" data-view="chat" title="Chat"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"></path></svg></button>
3152
+ <button class="view-toggle-btn" data-view="files" title="Files"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"></path><polyline points="13 2 13 9 20 9"></polyline></svg></button>
3153
+ <button class="view-toggle-btn" data-view="voice" id="voiceTabBtn" style="display:none;" title="Voice"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z"></path><path d="M19 10v2a7 7 0 0 1-14 0v-2"></path><line x1="12" y1="19" x2="12" y2="23"></line><line x1="8" y1="23" x2="16" y2="23"></line></svg></button>
3154
+ <button class="view-toggle-btn" data-view="terminal" id="terminalTabBtn" title="Terminal"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="4 17 10 11 4 5"></polyline><line x1="12" y1="19" x2="20" y2="19"></line></svg></button>
3148
3155
  </div>
3149
3156
 
3150
3157
  <!-- Messages scroll area -->
@@ -115,16 +115,29 @@
115
115
  }
116
116
  }
117
117
 
118
- // Check if terminal view is initially active
119
- if (document.getElementById('terminalContainer') &&
120
- window.getComputedStyle(document.getElementById('terminalContainer')).display !== 'none') {
121
- console.log('Terminal: Terminal view initially visible, starting');
122
- startTerminal();
118
+ function initTerminalEarly() {
119
+ console.log('Terminal: Initializing terminal early (not yet active)');
120
+ if (!ensureTerm()) {
121
+ console.log('Terminal: Waiting for xterm.js to load');
122
+ setTimeout(initTerminalEarly, 200);
123
+ return;
124
+ }
125
+ console.log('Terminal: Terminal UI initialized and ready for interaction');
126
+ }
127
+
128
+ if (document.readyState === 'loading') {
129
+ document.addEventListener('DOMContentLoaded', initTerminalEarly);
130
+ } else {
131
+ initTerminalEarly();
123
132
  }
124
133
 
125
134
  window.addEventListener('view-switched', function(e) {
126
135
  if (e.detail.view === 'terminal') {
127
- startTerminal();
136
+ if (!termActive) {
137
+ termActive = true;
138
+ connectAndStart();
139
+ setTimeout(function() { if (fitAddon) try { fitAddon.fit(); } catch(_) {} }, 100);
140
+ }
128
141
  } else if (termActive) {
129
142
  stopTerminal();
130
143
  }