@yeaft/webchat-agent 1.0.196 → 1.0.197
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/local-runtime/server/handlers/agent-output.js +27 -11
- package/local-runtime/version.json +1 -1
- package/local-runtime/web/app.bundle.js +77 -77
- package/local-runtime/web/app.bundle.js.gz +0 -0
- package/local-runtime/web/index.html +1 -1
- package/package.json +1 -1
- package/yeaft/skills.js +36 -3
- package/yeaft/web-bridge.js +89 -16
|
@@ -285,37 +285,53 @@ export async function handleAgentOutput(agentId, agent, msg) {
|
|
|
285
285
|
await forwardToClients(agentId, msg.conversationId, msg);
|
|
286
286
|
break;
|
|
287
287
|
|
|
288
|
-
case 'slash_commands_update':
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
if (
|
|
292
|
-
|
|
288
|
+
case 'slash_commands_update': {
|
|
289
|
+
const isYeaftCommandSet = msg.commandSet === 'yeaft';
|
|
290
|
+
let slashCommandDescriptions;
|
|
291
|
+
if (isYeaftCommandSet) {
|
|
292
|
+
// Yeaft publishes an authoritative hot-reload snapshot. Keep it out of
|
|
293
|
+
// the Claude cache used by agent_selected and clear removed descriptions.
|
|
294
|
+
agent.yeaftSlashCommands = msg.slashCommands || [];
|
|
295
|
+
if (msg.slashCommandDescriptions) {
|
|
296
|
+
agent.yeaftSlashCommandDescriptions = { ...msg.slashCommandDescriptions };
|
|
297
|
+
}
|
|
298
|
+
slashCommandDescriptions = agent.yeaftSlashCommandDescriptions || {};
|
|
299
|
+
} else {
|
|
300
|
+
// Claude Chat remains the legacy/default command set selected clients receive.
|
|
301
|
+
agent.slashCommands = msg.slashCommands || [];
|
|
302
|
+
if (msg.slashCommandDescriptions) {
|
|
303
|
+
agent.slashCommandDescriptions = { ...agent.slashCommandDescriptions, ...msg.slashCommandDescriptions };
|
|
304
|
+
}
|
|
305
|
+
slashCommandDescriptions = agent.slashCommandDescriptions || {};
|
|
293
306
|
}
|
|
307
|
+
const commandSet = msg.commandSet ? { commandSet: msg.commandSet } : {};
|
|
294
308
|
if (msg.conversationId === '__preload__') {
|
|
295
|
-
// Agent-level preload: broadcast to all owner clients with agentId
|
|
309
|
+
// Agent-level preload: broadcast to all owner clients with agentId.
|
|
296
310
|
for (const [, client] of webClients) {
|
|
297
311
|
if (client.authenticated && (CONFIG.skipAuth || agent.ownerId === client.userId)) {
|
|
298
312
|
await sendToWebClient(client, {
|
|
299
313
|
type: 'slash_commands_update',
|
|
300
314
|
agentId,
|
|
315
|
+
...commandSet,
|
|
301
316
|
slashCommands: msg.slashCommands,
|
|
302
|
-
slashCommandDescriptions
|
|
317
|
+
slashCommandDescriptions,
|
|
303
318
|
});
|
|
304
319
|
}
|
|
305
320
|
}
|
|
306
321
|
} else {
|
|
307
|
-
// Per-conversation update.
|
|
308
|
-
// Yeaft
|
|
309
|
-
// fallback command list in the web store.
|
|
322
|
+
// Per-conversation update. Preserve commandSet so the web store can
|
|
323
|
+
// isolate Yeaft snapshots from the Claude agent-level fallback.
|
|
310
324
|
await forwardToClients(agentId, msg.conversationId, {
|
|
311
325
|
type: 'slash_commands_update',
|
|
312
326
|
agentId,
|
|
313
327
|
conversationId: msg.conversationId,
|
|
328
|
+
...commandSet,
|
|
314
329
|
slashCommands: msg.slashCommands,
|
|
315
|
-
slashCommandDescriptions
|
|
330
|
+
slashCommandDescriptions,
|
|
316
331
|
});
|
|
317
332
|
}
|
|
318
333
|
break;
|
|
334
|
+
}
|
|
319
335
|
|
|
320
336
|
case 'compact_status':
|
|
321
337
|
console.log(`[Compact] Status: ${msg.status} for conversation ${msg.conversationId}`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"1.0.
|
|
1
|
+
{"version":"1.0.197"}
|