agentgui 1.0.883 → 1.0.884

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.
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentgui",
3
- "version": "1.0.883",
3
+ "version": "1.0.884",
4
4
  "description": "Multi-agent ACP client with real-time communication",
5
5
  "type": "module",
6
6
  "main": "electron/main.js",
@@ -134,15 +134,29 @@ async function main() {
134
134
 
135
135
  console.log(`[capture] -> ${s.name} (${s.theme})`);
136
136
  await page.goto(s.url, { waitUntil: 'networkidle2' });
137
- await new Promise(r => setTimeout(r, 800));
137
+ // Determinism: wait until the sidebar has transitioned out of "Loading..."
138
+ // and rendered at least one conversation row.
139
+ await page.waitForFunction(() => {
140
+ const ul = document.querySelector('.sidebar-list');
141
+ if (!ul) return false;
142
+ const rows = ul.querySelectorAll('li:not(.sidebar-empty)');
143
+ return rows.length > 0;
144
+ }, { timeout: 8000 }).catch(() => {});
145
+ await new Promise(r => setTimeout(r, 600));
138
146
 
139
147
  if (s.firstConv) {
140
148
  const clicked = await page.evaluate(() => {
141
- const row = document.querySelector('.sidebar-list li, .conversation-item');
149
+ const row = document.querySelector('.sidebar-list li:not(.sidebar-empty), .conversation-item:not(.sidebar-empty)');
142
150
  if (row) { row.click(); return true; }
143
151
  return false;
144
152
  });
145
- if (clicked) await new Promise(r => setTimeout(r, 800));
153
+ if (clicked) {
154
+ await page.waitForFunction(() => {
155
+ const out = document.querySelector('#output');
156
+ return out && out.children.length > 0;
157
+ }, { timeout: 5000 }).catch(() => {});
158
+ await new Promise(r => setTimeout(r, 600));
159
+ }
146
160
  }
147
161
  if (s.openTools) {
148
162
  const clicked = await page.evaluate(() => {