@eliya-oss/agent-diff 0.1.0-alpha.89 → 0.1.0-alpha.90

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @eliya-oss/agent-diff
2
2
 
3
+ ## 0.1.0-alpha.90
4
+
5
+ ### Patch Changes
6
+
7
+ - The summary an agent writes with `layers set` is shown above the layers in the review, rather than only in JSON.
8
+
3
9
  ## 0.1.0-alpha.89
4
10
 
5
11
  ### Patch Changes
package/dist/main.js CHANGED
@@ -9811,7 +9811,7 @@ var init_pane = __esmMin((() => {
9811
9811
  init_commands();
9812
9812
  init_init();
9813
9813
  init_pane();
9814
- var version$1 = "0.1.0-alpha.89";
9814
+ var version$1 = "0.1.0-alpha.90";
9815
9815
  //#endregion
9816
9816
  //#region src/cli/upgrade.ts
9817
9817
  var PACKAGE, TAG, RELEASES, REGISTRY, ASK_MS, RUN_MS, CELLAR, COMPILED, INSTALLED, BUN_GLOBAL, routeOf, ROUTES, asRoute, checkoutOf, assetOf, commandFor, NOTES, RUNNABLE, NUMBERS, numbersIn, compare$1, partsOf, newer, tagIn, fetched, askLatest, here, findUpgrade, willUpgrade, runUpgrade, statusOf$1, sayFound, sayDone, attempted, REFRESH_MS, refreshSkills, updatedIn, sayRefreshed, upgradeReport;
@@ -10365,12 +10365,14 @@ var init_layers = __esmMin((() => {
10365
10365
  const found = yield* storedLayers(worktree);
10366
10366
  if (isNone(found)) return {
10367
10367
  layers: [],
10368
- stale: false
10368
+ stale: false,
10369
+ summary: ""
10369
10370
  };
10370
10371
  return {
10371
10372
  layers: reportedLayers(reading.patches, found.value),
10372
10373
  stale: found.value.head !== worktree.head,
10373
- rebased: found.value.base !== worktree.base
10374
+ rebased: found.value.base !== worktree.base,
10375
+ summary: found.value.summary
10374
10376
  };
10375
10377
  });
10376
10378
  fn("Cli.listLayers")(function* (repo, branch) {
@@ -11652,6 +11654,7 @@ var init_model = __esmMin((() => {
11652
11654
  pan: 0,
11653
11655
  layers: [],
11654
11656
  layersStale: false,
11657
+ summary: "",
11655
11658
  pulls: {},
11656
11659
  forge: "asking",
11657
11660
  layerIndex: 0,
@@ -13474,6 +13477,7 @@ var init_reduce = __esmMin((() => {
13474
13477
  ...state,
13475
13478
  layers,
13476
13479
  layersStale: told.stale,
13480
+ summary: told.summary ?? "",
13477
13481
  layerIndex: 0,
13478
13482
  openLayers: [],
13479
13483
  rail: layers.length === 0 ? "tree" : "layers"
@@ -14408,7 +14412,7 @@ var init_diffview = __esmMin((() => {
14408
14412
  }));
14409
14413
  //#endregion
14410
14414
  //#region src/tui/render.ts
14411
- var ROW_HEIGHT, COMPOSE_WIDTH, GUTTER_X, CHIP_GAP, FRAME_PAD, MODAL_ROOM, COMPOSE_CHROME, COMPOSE_ACTION_ROWS, reportActions, actionsText, SNIPPET_LINES, PALETTE_KEY, PALETTE_TITLE, PALETTE_GAP, PALETTE_CHROME, PENDING_CHROME, PALETTE_WIDTH, PANEL_SHARE, PANEL_MAX, PANEL_FLOOR, PANEL_FOOT, PANEL_QUARTER, PANEL_FIFTH, PANE_CHROME, PANE_EDGES, PANE_INSET, BRANCH_WIDTH, BRANCH_NAME_MIN, BRANCH_FIXED, STATE_MIN, EMPTY_LIST, MODAL_MARGIN, shareOf, homeWidth, longestName, longestState, commandRow, modalWidth, panelWidth, panelTop, panelRows, composeRoom, laidOut$1, STICKY_MAX, pickPaint, SELECTION, CURSOR, ACCENT, GAP_PAINT, bar, makeList, makeDiffPane, makePanel, makeListParts, makeListText, makeGutter, makeScroller, makeScrim, makeScroll, makePalette, asking, makePaletteParts, makeChoices, LIST_LEAD, windowed, listText, stack, makeBody, makeHome, makeModals, makeKeysParts, makeFoundParts, FONTS, logoFont, makeLanding, makeLogo, MAC_KEYS, makeComposeParts, makeCompose, clip, clipHead, clipMiddle, clipPath, INDENT_MAX, treeLabel, waitingLabel, inRange, notesOf, notesFor, paired, keptWithin, CHIP_CHUNKS, shortPath, HOME_PATH_MIN, HOME_PATH_CHROME, elide, contextLabel, nameRoom, stateRoom, columns, FORGE_SILENT, unaskedForge, branchHeading, atHome, layersCell, baseLabel, stateCell, branchCells, placeLabel, headerParts, HEADER_GAP, HEADER_PATH_MIN, headerRoom, headerFitted, fallbackScope, treeMarks, treeTail, treeLine, STEP_NUMBER, STEP_LEAD, NOTE_LEAD, STEP_GAP, STALE_ROOM, STALE_LONG, STALE_SHORT, staleBanner, layerRoom, layerFold, layerHead, layerText, layerPaint, PANEL_TITLES, PANEL_ORDER, PANEL_LEAD, PANEL_EMPTY, panelMark, panelWhere, panelBody, panelPair, panelSection, PULL_HINT, panelText, Screen;
14415
+ var ROW_HEIGHT, COMPOSE_WIDTH, GUTTER_X, CHIP_GAP, FRAME_PAD, MODAL_ROOM, COMPOSE_CHROME, COMPOSE_ACTION_ROWS, reportActions, actionsText, SNIPPET_LINES, PALETTE_KEY, PALETTE_TITLE, PALETTE_GAP, PALETTE_CHROME, PENDING_CHROME, PALETTE_WIDTH, PANEL_SHARE, PANEL_MAX, PANEL_FLOOR, PANEL_FOOT, PANEL_QUARTER, PANEL_FIFTH, PANE_CHROME, PANE_EDGES, PANE_INSET, BRANCH_WIDTH, BRANCH_NAME_MIN, BRANCH_FIXED, STATE_MIN, EMPTY_LIST, MODAL_MARGIN, shareOf, homeWidth, longestName, longestState, commandRow, modalWidth, panelWidth, panelTop, panelRows, composeRoom, laidOut$1, STICKY_MAX, pickPaint, SELECTION, CURSOR, ACCENT, GAP_PAINT, bar, makeList, makeDiffPane, makePanel, makeListParts, makeListText, makeGutter, makeScroller, makeScrim, makeScroll, makePalette, asking, makePaletteParts, makeChoices, LIST_LEAD, windowed, listText, stack, makeBody, makeHome, makeModals, makeKeysParts, makeFoundParts, FONTS, logoFont, makeLanding, makeLogo, MAC_KEYS, makeComposeParts, makeCompose, clip, clipHead, clipMiddle, clipPath, INDENT_MAX, treeLabel, waitingLabel, inRange, notesOf, notesFor, paired, keptWithin, CHIP_CHUNKS, shortPath, HOME_PATH_MIN, HOME_PATH_CHROME, elide, SUMMARY_LINES, summaryLines, contextLabel, nameRoom, stateRoom, columns, FORGE_SILENT, unaskedForge, branchHeading, atHome, layersCell, baseLabel, stateCell, branchCells, placeLabel, headerParts, HEADER_GAP, HEADER_PATH_MIN, headerRoom, headerFitted, fallbackScope, treeMarks, treeTail, treeLine, STEP_NUMBER, STEP_LEAD, NOTE_LEAD, STEP_GAP, STALE_ROOM, STALE_LONG, STALE_SHORT, staleBanner, layerRoom, layerFold, layerHead, layerText, layerPaint, PANEL_TITLES, PANEL_ORDER, PANEL_LEAD, PANEL_EMPTY, panelMark, panelWhere, panelBody, panelPair, panelSection, PULL_HINT, panelText, Screen;
14412
14416
  var init_render = __esmMin((() => {
14413
14417
  init_command();
14414
14418
  init_patch();
@@ -14919,6 +14923,15 @@ var init_render = __esmMin((() => {
14919
14923
  `…/${name}`
14920
14924
  ].find((option) => option.length <= room) ?? clipMiddle(name, room);
14921
14925
  };
14926
+ SUMMARY_LINES = 3;
14927
+ summaryLines = (summary, room) => {
14928
+ const said = summary.trim();
14929
+ if (said.length === 0) return [];
14930
+ const lines = wrapped(said, Math.max(1, room));
14931
+ const kept = lines.slice(0, SUMMARY_LINES);
14932
+ const last = kept.at(-1) ?? "";
14933
+ return [...(lines.length > SUMMARY_LINES ? [...kept.slice(0, -1), clip(`${last}…`, room)] : kept).map((line) => ` ${line}`), ""];
14934
+ };
14922
14935
  contextLabel = (context) => {
14923
14936
  if (context === 3) return "";
14924
14937
  return context >= 1e5 ? "whole file" : `±${context}`;
@@ -15404,16 +15417,19 @@ var init_render = __esmMin((() => {
15404
15417
  return Math.max(1, this.listPane.height - edges);
15405
15418
  }
15406
15419
  layerRail(state) {
15407
- const banner = state.layersStale ? 1 : 0;
15408
- const height = Math.max(1, this.listRoom() - banner);
15409
15420
  const room = layerRoom(state, this.paneRoom());
15421
+ const said = summaryLines(state.summary, room.note);
15422
+ const banner = (state.layersStale ? 1 : 0) + said.length;
15423
+ const height = Math.max(1, this.listRoom() - banner);
15410
15424
  const all = layerRows(state, room.title, room.note);
15411
15425
  const whole = railWindow(all, height, state.layerIndex);
15412
15426
  const window = whole.more === 0 ? whole : railWindow(all, Math.max(1, height - 1), state.layerIndex);
15413
15427
  const rows = window.rows.map((row) => fg(layerPaint(state, row))(`${layerText(state, row, room)}\n`));
15414
15428
  const more = window.more > 0 ? [fg(palette.faint)(` … ${window.more} more`)] : [];
15415
15429
  const warn = state.layersStale ? [fg(palette.attention)(`${staleBanner(room.note)}\n`)] : [];
15430
+ const told = said.map((line) => fg(palette.muted)(`${line}\n`));
15416
15431
  return new StyledText([
15432
+ ...told,
15417
15433
  ...warn,
15418
15434
  ...rows,
15419
15435
  ...more
package/package.json CHANGED
@@ -23,7 +23,7 @@
23
23
  "bin": {
24
24
  "adiff": "./bin/adiff.js"
25
25
  },
26
- "version": "0.1.0-alpha.89",
26
+ "version": "0.1.0-alpha.90",
27
27
  "description": "Review the work an agent left you without losing the thread: comments live on the lines, the agent answers them, and each point stays open until you settle it.",
28
28
  "license": "MIT",
29
29
  "repository": {