agentgui 1.0.487 → 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/index.html +12 -5
- 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/index.html
CHANGED
|
@@ -522,7 +522,14 @@
|
|
|
522
522
|
}
|
|
523
523
|
|
|
524
524
|
.view-toggle-btn:hover { color: var(--color-text-primary); }
|
|
525
|
-
.view-toggle-btn.active { color: var(--color-primary); border-bottom-color: var(--color-primary); }
|
|
525
|
+
.view-toggle-btn.active { color: var(--color-primary); border-bottom-color: var(--color-primary); }
|
|
526
|
+
|
|
527
|
+
.view-toggle-btn svg {
|
|
528
|
+
width: 1.2rem;
|
|
529
|
+
height: 1.2rem;
|
|
530
|
+
display: block;
|
|
531
|
+
margin: 0 auto;
|
|
532
|
+
}
|
|
526
533
|
|
|
527
534
|
/* --- Messages scroll area --- */
|
|
528
535
|
#output-scroll {
|
|
@@ -3141,10 +3148,10 @@
|
|
|
3141
3148
|
|
|
3142
3149
|
<!-- View toggle bar (hidden by default) -->
|
|
3143
3150
|
<div class="view-toggle-bar" id="viewToggleBar">
|
|
3144
|
-
<button class="view-toggle-btn active" data-view="chat"
|
|
3145
|
-
<button class="view-toggle-btn" data-view="files"
|
|
3146
|
-
<button class="view-toggle-btn" data-view="voice" id="voiceTabBtn" style="display:none;"
|
|
3147
|
-
<button class="view-toggle-btn" data-view="terminal" id="terminalTabBtn"
|
|
3151
|
+
<button class="view-toggle-btn active" data-view="chat" title="Chat"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"></path></svg></button>
|
|
3152
|
+
<button class="view-toggle-btn" data-view="files" title="Files"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"></path><polyline points="13 2 13 9 20 9"></polyline></svg></button>
|
|
3153
|
+
<button class="view-toggle-btn" data-view="voice" id="voiceTabBtn" style="display:none;" title="Voice"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z"></path><path d="M19 10v2a7 7 0 0 1-14 0v-2"></path><line x1="12" y1="19" x2="12" y2="23"></line><line x1="8" y1="23" x2="16" y2="23"></line></svg></button>
|
|
3154
|
+
<button class="view-toggle-btn" data-view="terminal" id="terminalTabBtn" title="Terminal"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="4 17 10 11 4 5"></polyline><line x1="12" y1="19" x2="20" y2="19"></line></svg></button>
|
|
3148
3155
|
</div>
|
|
3149
3156
|
|
|
3150
3157
|
<!-- Messages scroll area -->
|
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
|
}
|