agentgui 1.0.601 → 1.0.603

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.601",
3
+ "version": "1.0.603",
4
4
  "description": "Multi-agent ACP client with real-time communication",
5
5
  "type": "module",
6
6
  "main": "server.js",
package/server.js CHANGED
@@ -894,6 +894,12 @@ const PROVIDER_CONFIGS = {
894
894
  path.join(os.homedir(), '.config', 'proxypilot', 'config.json')
895
895
  ],
896
896
  configFormat: (apiKey, model) => ({ api_key: apiKey, default_model: model })
897
+ },
898
+ 'codex': {
899
+ name: 'Codex CLI', configPaths: [
900
+ path.join(os.homedir(), '.codex', 'auth.json')
901
+ ],
902
+ configFormat: (apiKey) => ({ auth_mode: 'apikey', OPENAI_API_KEY: apiKey })
897
903
  }
898
904
  };
899
905
 
@@ -917,7 +923,7 @@ function getProviderConfigs() {
917
923
  if (fs.existsSync(configPath)) {
918
924
  const content = fs.readFileSync(configPath, 'utf8');
919
925
  const parsed = JSON.parse(content);
920
- const rawKey = parsed.api_key || parsed.apiKey || parsed.github_token || '';
926
+ const rawKey = parsed.api_key || parsed.apiKey || parsed.github_token || parsed.OPENAI_API_KEY || '';
921
927
  configs[providerId] = {
922
928
  name: config.name,
923
929
  apiKey: maskKey(rawKey),
@@ -751,6 +751,8 @@ class StreamingRenderer {
751
751
  if (block.id) details.dataset.toolUseId = block.id;
752
752
  details.classList.add(this._getBlockTypeClass('tool_use'));
753
753
  details.classList.add(this._getToolColorClass(toolName));
754
+ const normalizedForOpen = toolName.replace(/^mcp__.*?__/, '');
755
+ if (normalizedForOpen === 'TodoWrite') details.open = true;
754
756
  const summary = document.createElement('summary');
755
757
  summary.className = 'folded-tool-bar';
756
758
  const displayName = this.getToolUseDisplayName(toolName);
@@ -1228,17 +1230,8 @@ class StreamingRenderer {
1228
1230
  const content = block.content || '';
1229
1231
  const toolName = block.tool_name || block.name || '';
1230
1232
 
1231
- // Special handling for TodoWrite: render directly without success wrapper
1232
- // Detect by tool name OR by content structure (todos array)
1233
- if ((toolName.includes('TodoWrite') || (typeof content === 'object' && Array.isArray(content?.todos))) && typeof content === 'object' && content.todos && Array.isArray(content.todos)) {
1234
- const statusIcons = { completed: '✅', in_progress: '⚙', pending: '☐' };
1235
- const completedCount = content.todos.filter(t => t.status === 'completed').length;
1236
- const totalCount = content.todos.length;
1237
- const items = content.todos.map(t => `<div class="todo-item"><span class="todo-status">${statusIcons[t.status] || '&#9744;'}</span><span class="todo-text">${this.escapeHtml(t.content || '')}</span></div>`).join('');
1238
- const div = document.createElement('div');
1239
- div.className = 'block-tool-result';
1240
- div.innerHTML = `<details class="folded-tool" open><summary class="folded-tool-bar" style="cursor:pointer;padding:0.5rem;background:var(--color-bg-secondary);border-radius:0.25rem;user-select:none"><span style="font-weight:600;font-size:0.9rem">📋 Tasks</span><span style="margin-left:0.5rem;font-size:0.8rem;color:var(--color-text-secondary)">${completedCount}/${totalCount} complete</span></summary><div class="folded-tool-body tool-param-todos" style="padding:0.75rem">${items}</div></details>`;
1241
- return div;
1233
+ if (toolName.includes('TodoWrite') || (typeof content === 'object' && Array.isArray(content?.todos))) {
1234
+ return null;
1242
1235
  }
1243
1236
 
1244
1237
  const contentStr = typeof content === 'string' ? content : JSON.stringify(content, null, 2);