agentgui 1.0.504 → 1.0.506

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.
@@ -360,6 +360,7 @@ class AgentRunner {
360
360
  };
361
361
  if (config.model) sessionParams.model = config.model;
362
362
  if (config.subAgent) sessionParams.agent = config.subAgent;
363
+ if (config.systemPrompt) sessionParams.systemPrompt = config.systemPrompt;
363
364
  const sessionRequest = {
364
365
  jsonrpc: '2.0',
365
366
  id: ++requestId,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentgui",
3
- "version": "1.0.504",
3
+ "version": "1.0.506",
4
4
  "description": "Multi-agent ACP client with real-time communication",
5
5
  "type": "module",
6
6
  "main": "server.js",
package/server.js CHANGED
@@ -268,7 +268,22 @@ function pushTTSAudio(cacheKey, wav, conversationId, sessionId, voiceId) {
268
268
  }
269
269
 
270
270
 
271
- const SYSTEM_PROMPT = `Plain text. Spoken aloud. Conversational. No markdown, formatting, bullets, or lists. Short sentences. Technical facts only.`;
271
+ const VOICE_INSTRUCTIONS = `Plain text. Spoken aloud. Conversational. No markdown, formatting, bullets, or lists. Short sentences. Technical facts only.`;
272
+
273
+ function buildSystemPrompt(agentId, model, subAgent) {
274
+ const parts = [VOICE_INSTRUCTIONS];
275
+ if (agentId && agentId !== 'claude-code') {
276
+ const displayAgentId = agentId.split('-·-')[0];
277
+ parts.push(`Use ${displayAgentId} subagent for all tasks.`);
278
+ }
279
+ if (model) {
280
+ parts.push(`Model: ${model}.`);
281
+ }
282
+ if (subAgent) {
283
+ parts.push(`Subagent: ${subAgent}.`);
284
+ }
285
+ return parts.join(' ');
286
+ }
272
287
 
273
288
  const activeExecutions = new Map();
274
289
  const activeScripts = new Map();
@@ -3728,13 +3743,14 @@ async function processMessageWithStreaming(conversationId, messageId, sessionId,
3728
3743
 
3729
3744
  const resolvedModel = model || conv?.model || null;
3730
3745
  const resolvedSubAgent = subAgent || conv?.subAgent || null;
3746
+ const unifiedSystemPrompt = buildSystemPrompt(agentId, resolvedModel, resolvedSubAgent);
3731
3747
  const config = {
3732
3748
  verbose: true,
3733
3749
  outputFormat: 'stream-json',
3734
3750
  timeout: 1800000,
3735
3751
  print: true,
3736
3752
  resumeSessionId,
3737
- systemPrompt: SYSTEM_PROMPT,
3753
+ systemPrompt: unifiedSystemPrompt,
3738
3754
  model: resolvedModel || undefined,
3739
3755
  subAgent: resolvedSubAgent || undefined,
3740
3756
  onEvent,
@@ -270,7 +270,13 @@
270
270
 
271
271
  for (var i = 0; i < toolsWithUpdates.length; i++) {
272
272
  operationInProgress.add(toolsWithUpdates[i].id);
273
+ var tool = tools.find(function(t) { return t.id === toolsWithUpdates[i].id; });
274
+ if (tool) {
275
+ tool.status = 'updating';
276
+ tool.progress = 0;
277
+ }
273
278
  }
279
+ render();
274
280
 
275
281
  fetch('/gm/api/tools/update', { method: 'POST' })
276
282
  .then(function(r) { return r.json(); })