agentgui 1.0.482 → 1.0.484
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/lib/ws-handlers-session.js +19 -0
- package/package.json +1 -1
- package/static/js/voice.js +3 -2
|
@@ -111,6 +111,25 @@ export function register(router, deps) {
|
|
|
111
111
|
router.handle('agent.subagents', async (p) => {
|
|
112
112
|
const agent = discoveredAgents.find(x => x.id === p.id);
|
|
113
113
|
if (p.id === 'claude-code') {
|
|
114
|
+
try {
|
|
115
|
+
const output = execSync('claude agents list', {
|
|
116
|
+
encoding: 'utf-8',
|
|
117
|
+
timeout: 2000,
|
|
118
|
+
stdio: ['pipe', 'pipe', 'pipe']
|
|
119
|
+
});
|
|
120
|
+
let agents = [];
|
|
121
|
+
try {
|
|
122
|
+
agents = JSON.parse(output);
|
|
123
|
+
} catch {
|
|
124
|
+
agents = output.split('\n')
|
|
125
|
+
.map(line => line.trim())
|
|
126
|
+
.filter(line => line && !line.startsWith('-') && !line.startsWith('#'))
|
|
127
|
+
.map(line => ({ id: line.toLowerCase().replace(/\s+/g, '-'), name: line }));
|
|
128
|
+
}
|
|
129
|
+
if (Array.isArray(agents) && agents.length > 0) {
|
|
130
|
+
return { subAgents: agents };
|
|
131
|
+
}
|
|
132
|
+
} catch (_) {}
|
|
114
133
|
const skillsDir = path.join(os.homedir(), '.claude', 'skills');
|
|
115
134
|
try {
|
|
116
135
|
const entries = fs.readdirSync(skillsDir, { withFileTypes: true });
|
package/package.json
CHANGED
package/static/js/voice.js
CHANGED
|
@@ -655,7 +655,7 @@
|
|
|
655
655
|
var emptyMsg = container.querySelector('.voice-empty');
|
|
656
656
|
if (emptyMsg) emptyMsg.remove();
|
|
657
657
|
var lastChild = container.lastElementChild;
|
|
658
|
-
if (!isUser && !_voiceBreakNext && lastChild && lastChild.classList.contains('voice-block') && !lastChild.classList.contains('voice-block-user')) {
|
|
658
|
+
if (!isUser && !_voiceBreakNext && !isLoadingHistory && lastChild && lastChild.classList.contains('voice-block') && !lastChild.classList.contains('voice-block-user')) {
|
|
659
659
|
var contentSpan = lastChild.querySelector('.voice-block-content');
|
|
660
660
|
if (contentSpan) {
|
|
661
661
|
contentSpan.textContent += '\n' + stripHtml(text);
|
|
@@ -830,8 +830,8 @@
|
|
|
830
830
|
if (window.wsClient) {
|
|
831
831
|
window.wsClient.rpc('conv.chunks', { id: conversationId })
|
|
832
832
|
.then(function(data) {
|
|
833
|
-
isLoadingHistory = false;
|
|
834
833
|
if (!data.ok || !Array.isArray(data.chunks) || data.chunks.length === 0) {
|
|
834
|
+
isLoadingHistory = false;
|
|
835
835
|
showVoiceEmpty(container);
|
|
836
836
|
return;
|
|
837
837
|
}
|
|
@@ -850,6 +850,7 @@
|
|
|
850
850
|
}
|
|
851
851
|
});
|
|
852
852
|
if (!hasContent) showVoiceEmpty(container);
|
|
853
|
+
isLoadingHistory = false;
|
|
853
854
|
})
|
|
854
855
|
.catch(function() {
|
|
855
856
|
isLoadingHistory = false;
|