@bolloon/bolloon-agent 0.3.24 → 0.3.25

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.
@@ -950,6 +950,10 @@ body {
950
950
  display: flex;
951
951
  align-items: center;
952
952
  gap: 12px;
953
+ /* 2026-08-02: 防止任务徽标 (absolute right:-4px) 把 header 撑出视口 */
954
+ overflow: visible;
955
+ flex-shrink: 1;
956
+ min-width: 0;
953
957
  }
954
958
 
955
959
  .theme-toggle {
@@ -1004,7 +1008,7 @@ body {
1004
1008
  padding: 24px;
1005
1009
  display: flex;
1006
1010
  flex-direction: column;
1007
- gap: 20px;
1011
+ gap: 10px; /* 2026-08-02: 20px → 10px, 气泡间隔收窄 */
1008
1012
  }
1009
1013
 
1010
1014
  .messages::-webkit-scrollbar {
@@ -1223,7 +1227,7 @@ body {
1223
1227
  .time {
1224
1228
  font-size: 11px;
1225
1229
  color: var(--text-muted);
1226
- margin-top: 6px;
1230
+ margin-top: 3px; /* 2026-08-02: 6px → 3px, 收窄消息底部间隔 */
1227
1231
  padding: 0 4px;
1228
1232
  }
1229
1233
 
@@ -1235,7 +1239,7 @@ body {
1235
1239
  .message-actions {
1236
1240
  display: flex;
1237
1241
  gap: 6px;
1238
- margin-top: 8px;
1242
+ margin-top: 5px; /* 2026-08-02: 8px → 5px, 收窄按钮与气泡间隔 */
1239
1243
  padding: 0 4px;
1240
1244
  }
1241
1245
 
@@ -1290,8 +1294,8 @@ body {
1290
1294
 
1291
1295
  /* Markdown Styles */
1292
1296
  .bubble h1, .bubble h2, .bubble h3, .bubble h4, .bubble h5, .bubble h6 {
1293
- margin-top: 16px;
1294
- margin-bottom: 8px;
1297
+ margin-top: 12px; /* 2026-08-02: 16px → 12px */
1298
+ margin-bottom: 6px;
1295
1299
  font-weight: 600;
1296
1300
  }
1297
1301
 
@@ -1300,11 +1304,11 @@ body {
1300
1304
  .bubble h3 { font-size: 1.15em; }
1301
1305
 
1302
1306
  .bubble p {
1303
- margin: 8px 0;
1307
+ margin: 6px 0; /* 2026-08-02: 8px → 6px, markdown 段落紧凑化 */
1304
1308
  }
1305
1309
 
1306
1310
  .bubble ul, .bubble ol {
1307
- margin: 8px 0;
1311
+ margin: 6px 0;
1308
1312
  padding-left: 24px;
1309
1313
  }
1310
1314
 
@@ -1343,7 +1347,7 @@ body {
1343
1347
 
1344
1348
  .bubble table {
1345
1349
  border-collapse: collapse;
1346
- margin: 10px 0;
1350
+ margin: 8px 0; /* 2026-08-02: 10px → 8px */
1347
1351
  width: 100%;
1348
1352
  }
1349
1353
 
@@ -2036,7 +2040,7 @@ body {
2036
2040
  .task-badge {
2037
2041
  position: absolute;
2038
2042
  top: -4px;
2039
- right: -4px;
2043
+ right: 0; /* 2026-08-02: -4px → 0, 防溢出视口 */
2040
2044
  background: var(--accent);
2041
2045
  color: var(--bg);
2042
2046
  font-size: 10px;
@@ -4719,7 +4723,7 @@ body:has(> .api-config-page) {
4719
4723
  * ========================================================================== */
4720
4724
 
4721
4725
  .step-timeline {
4722
- margin: 8px 0 4px 0;
4726
+ margin: 6px 0 3px 0; /* 2026-08-02: 8px 4px → 6px 3px */
4723
4727
  border: 1px solid var(--border);
4724
4728
  border-radius: 6px;
4725
4729
  background: var(--bg-hover);
@@ -221,11 +221,44 @@ function buildEnvContainer(envDetails) {
221
221
  container.appendChild(content);
222
222
  return container;
223
223
  }
224
+ function normalizeMarkdownTables(text) {
225
+ if (!text || !text.includes("|")) return text;
226
+ const lines = text.split("\n");
227
+ const out = [];
228
+ let inTable = false;
229
+ let inCode = false;
230
+ for (let i = 0; i < lines.length; i++) {
231
+ const line = lines[i];
232
+ const trimmed = line.trim();
233
+ if (/^\s*```/.test(line)) {
234
+ inCode = !inCode;
235
+ out.push(line);
236
+ inTable = false;
237
+ continue;
238
+ }
239
+ if (inCode) {
240
+ out.push(line);
241
+ continue;
242
+ }
243
+ if (trimmed.startsWith("|") || /^\|?\s*:?-{2,}\s*(\|\s*:?-{2,}\s*)*\|?\s*$/.test(trimmed)) {
244
+ out.push(line);
245
+ inTable = true;
246
+ } else {
247
+ if (inTable && out.length > 0 && out[out.length - 1].trim() !== "") {
248
+ out.push("");
249
+ }
250
+ inTable = false;
251
+ out.push(line);
252
+ }
253
+ }
254
+ return out.join("\n");
255
+ }
224
256
  function buildBubble(text, type) {
225
257
  const bubble = document.createElement("div");
226
258
  bubble.className = `bubble bubble-${type}`;
227
259
  const marked = window.marked;
228
- bubble.innerHTML = marked ? marked.parse(text) : escapeHtml(text);
260
+ const normalized = marked ? normalizeMarkdownTables(text) : text;
261
+ bubble.innerHTML = marked ? marked.parse(normalized) : escapeHtml(text);
229
262
  return bubble;
230
263
  }
231
264
  function buildMessageActions(div, rawContent, ctx) {
@@ -404,6 +437,10 @@ function resetRendererState() {
404
437
  scrollToBottomTimer = null;
405
438
  }
406
439
  }
440
+ function seedDedupState(lastType, lastContent) {
441
+ if (lastType === "user") lastUserCommand = lastContent || "";
442
+ else if (lastType === "ai") lastAiContent = lastContent || "";
443
+ }
407
444
  const MessageRenderer = {
408
445
  addMessage,
409
446
  handleStreamTokenEvent,
@@ -412,7 +449,8 @@ const MessageRenderer = {
412
449
  flushStepEventBuffer,
413
450
  escapeHtml,
414
451
  getMessagesContainerForCurrent,
415
- resetRendererState
452
+ resetRendererState,
453
+ seedDedupState
416
454
  };
417
455
  if (typeof window !== "undefined") {
418
456
  window.MR = MessageRenderer;
@@ -429,5 +467,6 @@ export {
429
467
  hasStreamingText,
430
468
  injectRecoveredText,
431
469
  replaceStreamingText,
432
- resetRendererState
470
+ resetRendererState,
471
+ seedDedupState
433
472
  };
@@ -33,6 +33,11 @@ function render(timelineEl) {
33
33
  const state = stateMap.get(timelineEl);
34
34
  if (!state) return;
35
35
  const { steps, expanded, showAll } = state;
36
+ if (steps.length === 0) {
37
+ timelineEl.style.display = "none";
38
+ return;
39
+ }
40
+ timelineEl.style.display = "";
36
41
  const titleEl = timelineEl.querySelector("[data-current-tool]");
37
42
  if (titleEl) titleEl.textContent = computeTitle(steps);
38
43
  const dotsEl = timelineEl.querySelector("[data-dots]");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bolloon/bolloon-agent",
3
- "version": "0.3.24",
3
+ "version": "0.3.25",
4
4
  "type": "module",
5
5
  "description": "P2P AI Document Agent - 全局安装后执行 `bolloon` 启动产品",
6
6
  "main": "dist/cli-entry.js",
@@ -12,7 +12,11 @@
12
12
  "license": "MIT",
13
13
  "files": [
14
14
  "dist",
15
- "bin",
15
+ "bin/bolloon.cjs",
16
+ "bin/bolloon.js",
17
+ "bin/bolloon.cmd",
18
+ "bin/bolloon-cli.cjs",
19
+ "bin/bolloon-daemon.sh",
16
20
  "scripts/postinstall.js",
17
21
  "scripts/build-cli.js",
18
22
  "scripts/build-web.ts"
package/bin/ipfs DELETED
Binary file