@xcanwin/manyoyo 6.1.3 → 6.2.1

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.
@@ -17,14 +17,33 @@
17
17
  return { count, label: `${count} 步 · ${status}` };
18
18
  }
19
19
 
20
- function shouldExpandComposer(state) {
21
- const opts = state && typeof state === 'object' ? state : {};
22
- return Boolean(opts.focused || opts.hasDraft);
20
+ function buildDocumentTitle(agentName) {
21
+ const trimmed = String(agentName || '').trim();
22
+ return trimmed ? `${trimmed} · MANYOYO Web` : 'MANYOYO Web';
23
+ }
24
+
25
+ function mergeTraceIntoReply(messages) {
26
+ const list = Array.isArray(messages) ? messages : [];
27
+ const result = [];
28
+ for (let i = 0; i < list.length; i += 1) {
29
+ const msg = list[i];
30
+ if (msg && msg.streamTrace) {
31
+ const next = list[i + 1];
32
+ if (next && next.role === 'assistant' && !next.streamTrace) {
33
+ result.push(Object.assign({}, next, { timestamp: msg.timestamp, pairedTrace: msg }));
34
+ i += 1;
35
+ continue;
36
+ }
37
+ }
38
+ result.push(msg);
39
+ }
40
+ return result;
23
41
  }
24
42
 
25
43
  window.ManyoyoChatBehavior = {
26
44
  isNearBottom,
27
45
  summarizeTraceFlow,
28
- shouldExpandComposer
46
+ buildDocumentTitle,
47
+ mergeTraceIntoReply
29
48
  };
30
49
  }());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xcanwin/manyoyo",
3
- "version": "6.1.3",
3
+ "version": "6.2.1",
4
4
  "imageVersion": "1.9.1-common",
5
5
  "playwrightCliVersion": "0.1.18",
6
6
  "description": "AI Agent CLI Security Sandbox for Docker and Podman",