agentgui 1.0.539 → 1.0.540

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.539",
3
+ "version": "1.0.540",
4
4
  "description": "Multi-agent ACP client with real-time communication",
5
5
  "type": "module",
6
6
  "main": "server.js",
@@ -1976,84 +1976,7 @@ class StreamingRenderer {
1976
1976
  return div;
1977
1977
  }
1978
1978
 
1979
- /**
1980
- * Render file read event with image detection
1981
- */
1982
- renderFileRead(event) {
1983
- const div = document.createElement('div');
1984
- div.className = 'event-file-read mb-3 p-3 rounded border border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-900';
1985
- div.dataset.eventId = event.id || '';
1986
- div.dataset.eventType = 'file_read';
1987
-
1988
- const filePath = event.path || '';
1989
- const fileName = pathBasename(filePath);
1990
- const isImage = this.isImagePath(filePath);
1991
-
1992
- let html = `
1993
- <div style="display:flex;align-items:center;gap:0.5rem;margin-bottom:${isImage ? '0.75rem' : '0'}">
1994
- <svg viewBox="0 0 20 20" fill="currentColor" style="width:1rem;height:1rem;color:var(--color-info)">
1995
- <path d="M8 16a2 2 0 100-4 2 2 0 000 4zM9 2a1 1 0 011 1v2h2V3a1 1 0 112 0v2h2V3a1 1 0 112 0v2h2a2 2 0 012 2v2h2a1 1 0 110 2h-2v2h2a1 1 0 110 2h-2v2a2 2 0 01-2 2h-2v2a1 1 0 11-2 0v-2h-2v2a1 1 0 11-2 0v-2H9a2 2 0 01-2-2v-2H5a1 1 0 110-2h2V9H5a1 1 0 010-2h2V5H5a1 1 0 010-2h2V3a1 1 0 011-1z"/>
1996
- </svg>
1997
- <code style="font-size:0.75rem;color:var(--color-text-primary);font-family:'Monaco','Menlo','Ubuntu Mono',monospace">${this.escapeHtml(filePath)}</code>
1998
- </div>
1999
- `;
2000
-
2001
- if (isImage) {
2002
- html += `<div style="margin-top:0.75rem" class="lazy-image-container" data-image-path="${this.escapeHtml(filePath)}"></div>`;
2003
- }
2004
-
2005
- div.innerHTML = html;
2006
-
2007
- if (isImage) {
2008
- const container = div.querySelector('.lazy-image-container');
2009
- if (container && window.imageLoader) {
2010
- const imgElement = window.imageLoader.createImageElement(filePath);
2011
- container.appendChild(imgElement);
2012
- }
2013
- }
2014
-
2015
- return div;
2016
- }
2017
-
2018
- /**
2019
- * Render file write event
2020
- */
2021
- renderFileWrite(event) {
2022
- const div = document.createElement('div');
2023
- div.className = 'event-file-write mb-3 p-3 rounded border border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-900';
2024
- div.dataset.eventId = event.id || '';
2025
- div.dataset.eventType = 'file_write';
2026
-
2027
- const filePath = event.path || '';
2028
- const icon = '<svg viewBox="0 0 20 20" fill="currentColor" style="width:1rem;height:1rem;color:var(--color-success)"><path d="M11 3a1 1 0 10-2 0v1a1 1 0 102 0V3zM15.657 5.757a1 1 0 00-1.414-1.414l-.707.707a1 1 0 001.414 1.414l.707-.707zM18 10a1 1 0 01-1 1h-1a1 1 0 110-2h1a1 1 0 011 1zM16.243 15.657a1 1 0 001.414-1.414l-.707-.707a1 1 0 00-1.414 1.414l.707.707zM10 15a1 1 0 01-1-1v-1a1 1 0 112 0v1a1 1 0 01-1 1zM5.757 16.243a1 1 0 01-1.414-1.414l.707-.707a1 1 0 011.414 1.414l-.707.707zM5 10a1 1 0 01-1-1V8a1 1 0 012 0v1a1 1 0 01-1 1zM5.757 5.757a1 1 0 000-1.414l-.707-.707a1 1 0 00-1.414 1.414l.707.707zM10 5a1 1 0 011-1h1a1 1 0 110 2h-1a1 1 0 01-1-1z"/></svg>';
2029
-
2030
- div.innerHTML = `
2031
- <div style="display:flex;align-items:center;gap:0.5rem">
2032
- ${icon}
2033
- <code style="font-size:0.75rem;color:var(--color-text-primary);font-family:'Monaco','Menlo','Ubuntu Mono',monospace">${this.escapeHtml(filePath)}</code>
2034
- </div>
2035
- `;
2036
1979
 
2037
- return div;
2038
- }
2039
-
2040
- /**
2041
- * Check if a path is an image file
2042
- */
2043
- isImagePath(filePath) {
2044
- if (!filePath || typeof filePath !== 'string') return false;
2045
- const imageExts = ['png', 'jpg', 'jpeg', 'gif', 'webp', 'svg'];
2046
- const ext = this.getFileExtension(filePath);
2047
- return imageExts.includes(ext);
2048
- }
2049
-
2050
- /**
2051
- * Extract file extension
2052
- */
2053
- getFileExtension(filePath) {
2054
- const match = filePath.match(/\.([^.]+)$/);
2055
- return match ? match[1].toLowerCase() : '';
2056
- }
2057
1980
 
2058
1981
  /**
2059
1982
  * Render generic event with formatted key-value pairs