agentgui 1.0.488 → 1.0.489
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/claude-runner.js +2 -1
- package/package.json +1 -1
- package/static/js/client.js +7 -12
package/lib/claude-runner.js
CHANGED
|
@@ -1152,7 +1152,8 @@ export async function runClaudeWithStreaming(prompt, cwd, agentId = 'claude-code
|
|
|
1152
1152
|
enhancedConfig.systemPrompt = '';
|
|
1153
1153
|
}
|
|
1154
1154
|
if (agentId && agentId !== 'claude-code') {
|
|
1155
|
-
const
|
|
1155
|
+
const displayAgentId = agentId.split('-·-')[0];
|
|
1156
|
+
const agentPrefix = `use ${displayAgentId} subagent to. `;
|
|
1156
1157
|
if (!enhancedConfig.systemPrompt.includes(agentPrefix)) {
|
|
1157
1158
|
enhancedConfig.systemPrompt = agentPrefix + enhancedConfig.systemPrompt;
|
|
1158
1159
|
}
|
package/package.json
CHANGED
package/static/js/client.js
CHANGED
|
@@ -360,8 +360,8 @@ class AgentGUIClient {
|
|
|
360
360
|
this.ui.sendButton = document.querySelector('[data-send-button]');
|
|
361
361
|
this.ui.cliSelector = document.querySelector('[data-cli-selector]');
|
|
362
362
|
this.ui.agentSelector = document.querySelector('[data-agent-selector]');
|
|
363
|
-
this.ui.modelSelector = document.querySelector('[data-model-selector]');
|
|
364
|
-
this.ui.voiceCliSelector = document.querySelector('[data-voice-cli-selector]');
|
|
363
|
+
this.ui.modelSelector = document.querySelector('[data-model-selector]');
|
|
364
|
+
this.ui.voiceCliSelector = document.querySelector('[data-voice-cli-selector]');
|
|
365
365
|
this.ui.voiceModelSelector = document.querySelector('[data-voice-model-selector]');
|
|
366
366
|
|
|
367
367
|
if (this.ui.cliSelector) {
|
|
@@ -1578,10 +1578,11 @@ class AgentGUIClient {
|
|
|
1578
1578
|
this.wsManager.sendMessage({ type: 'subscribe', conversationId });
|
|
1579
1579
|
}
|
|
1580
1580
|
|
|
1581
|
-
let finalPrompt = prompt;
|
|
1582
|
-
if (subAgent && agentId === 'claude-code') {
|
|
1583
|
-
|
|
1584
|
-
|
|
1581
|
+
let finalPrompt = prompt;
|
|
1582
|
+
if (subAgent && agentId === 'claude-code') {
|
|
1583
|
+
const displaySubAgent = subAgent.split('-·-')[0];
|
|
1584
|
+
finalPrompt = `use ${displaySubAgent} subagent to ${prompt} optimize for speech keep it short optimize for clarity`;
|
|
1585
|
+
}
|
|
1585
1586
|
const streamBody = { id: conversationId, content: finalPrompt, agentId };
|
|
1586
1587
|
if (model) streamBody.model = model;
|
|
1587
1588
|
if (subAgent) streamBody.subAgent = subAgent;
|
|
@@ -1979,9 +1980,6 @@ class AgentGUIClient {
|
|
|
1979
1980
|
if (this.ui.cliSelector) {
|
|
1980
1981
|
this.ui.cliSelector.disabled = true;
|
|
1981
1982
|
}
|
|
1982
|
-
if (this.ui.agentSelector) {
|
|
1983
|
-
this.ui.agentSelector.disabled = true;
|
|
1984
|
-
}
|
|
1985
1983
|
|
|
1986
1984
|
this.loadModelsForAgent(agentId).then(() => {
|
|
1987
1985
|
if (this.ui.modelSelector && model) {
|
|
@@ -1998,9 +1996,6 @@ class AgentGUIClient {
|
|
|
1998
1996
|
this.ui.cliSelector.style.display = 'inline-block';
|
|
1999
1997
|
}
|
|
2000
1998
|
}
|
|
2001
|
-
if (this.ui.agentSelector) {
|
|
2002
|
-
this.ui.agentSelector.disabled = false;
|
|
2003
|
-
}
|
|
2004
1999
|
if (this.ui.modelSelector) {
|
|
2005
2000
|
this.ui.modelSelector.disabled = false;
|
|
2006
2001
|
}
|