libero-mcp 0.2.11 → 0.2.12

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.
@@ -292,26 +292,45 @@ export function renderTimelineCells(input) {
292
292
  const textLines = [];
293
293
  textLines.push(" 00 10 20 30 40 50");
294
294
  // ── 表格段(在前)──
295
+ // S9 v0.3: details 段按 symbol 分组紧凑展示
296
+ // 用户痛点:移动端窄屏,原格式 "{time} {symbol} {title} [planned]" 长标题折行后 [planned] 跑到第三行,诡异
297
+ // 新格式:同 symbol 合并到一行,用 · 分隔;移除 [status] 后缀(状态在矩阵方块色已表达)
295
298
  const details = input.details ?? [];
296
299
  if (details.length > 0) {
297
- textLines.push("📋 细项:");
300
+ textLines.push("📋 明细");
298
301
  const inWin = details.filter((d) => d.in_window);
299
302
  const outWin = details.filter((d) => !d.in_window);
300
- for (const d of inWin) {
301
- mark(d.symbol);
302
- textLines.push(`${d.time} ${d.symbol} ${d.title} [${d.status}]`);
303
+ // symbol 分组(保留 inWin 内的原始顺序)
304
+ const groupBySymbol = (list) => {
305
+ const groups = [];
306
+ const symbolToGroup = new Map();
307
+ for (const d of list) {
308
+ mark(d.symbol);
309
+ const entry = `${d.time} ${d.title}`;
310
+ const idx = symbolToGroup.get(d.symbol);
311
+ if (idx === undefined) {
312
+ symbolToGroup.set(d.symbol, groups.length);
313
+ groups.push({ symbol: d.symbol, entries: [entry] });
314
+ }
315
+ else {
316
+ groups[idx].entries.push(entry);
317
+ }
318
+ }
319
+ return groups;
320
+ };
321
+ for (const g of groupBySymbol(inWin)) {
322
+ textLines.push(`${g.symbol} ${g.entries.join(" · ")}`);
303
323
  }
304
324
  if (outWin.length > 0) {
305
- textLines.push("(窗口外↓)");
306
- for (const d of outWin) {
307
- mark(d.symbol);
308
- textLines.push(`${d.time} ${d.symbol} ${d.title} [${d.status}]`);
325
+ textLines.push("(窗口外)");
326
+ for (const g of groupBySymbol(outWin)) {
327
+ textLines.push(`${g.symbol} ${g.entries.join(" · ")}`);
309
328
  }
310
329
  }
311
330
  }
312
331
  else {
313
332
  // pressure E-6: details 空 → 给"该时段无安排"提示,不留空段
314
- textLines.push("📋 细项:该时段无安排");
333
+ textLines.push("📋 明细:该时段无安排");
315
334
  }
316
335
  // ── 矩阵段(在后,作为时间分布概览)──
317
336
  const pushEllipsis = () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "libero-mcp",
3
- "version": "0.2.11",
3
+ "version": "0.2.12",
4
4
  "description": "AI 时间管理教练 MCP 工具集——时间块记录、统计、矩阵诊断、计时、分类、profile",
5
5
  "license": "MIT",
6
6
  "author": "amosyuan",