@eliya-oss/agent-diff 0.1.0-alpha.51 → 0.1.0-alpha.52
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 +6 -0
- package/dist/main.js +27 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @eliya-oss/agent-diff
|
|
2
2
|
|
|
3
|
+
## 0.1.0-alpha.52
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Pasting into a comment works. The terminal hands a paste over in one piece rather than replaying it as keystrokes, and adiff was only listening for keystrokes, so every paste was read correctly and then thrown away — nothing appeared, and quoting a stack trace or an error message meant retyping it. A paste now lands at the caret in one move. Line breaks survive in a draft and become spaces in the palette, whose query is one line; tabs become two spaces so pasted code keeps its shape; escape sequences and control characters are stripped, because a comment is prose an agent reads back rather than a channel to the screen.
|
|
8
|
+
|
|
3
9
|
## 0.1.0-alpha.51
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/dist/main.js
CHANGED
|
@@ -7,7 +7,7 @@ import { execFile, spawn } from "node:child_process";
|
|
|
7
7
|
import { promisify } from "node:util";
|
|
8
8
|
import { existsSync, mkdirSync, readFileSync, realpathSync, watch } from "node:fs";
|
|
9
9
|
import { fileURLToPath } from "node:url";
|
|
10
|
-
import { ASCIIFontRenderable, BoxRenderable, CodeRenderable, LineNumberRenderable, RGBA, SelectRenderable, StyledText, SyntaxStyle, TextRenderable, bg, createCliRenderer, fg, getTreeSitterClient, pathToFiletype, t } from "@opentui/core";
|
|
10
|
+
import { ASCIIFontRenderable, BoxRenderable, CodeRenderable, LineNumberRenderable, RGBA, SelectRenderable, StyledText, SyntaxStyle, TextRenderable, bg, createCliRenderer, decodePasteBytes, fg, getTreeSitterClient, pathToFiletype, stripAnsiSequences, t } from "@opentui/core";
|
|
11
11
|
//#region \0rolldown/runtime.js
|
|
12
12
|
var __defProp = Object.defineProperty;
|
|
13
13
|
var __esmMin = (fn, res, err) => () => {
|
|
@@ -9230,7 +9230,7 @@ var init_pane = __esmMin((() => {
|
|
|
9230
9230
|
init_commands();
|
|
9231
9231
|
init_init();
|
|
9232
9232
|
init_pane();
|
|
9233
|
-
var version$1 = "0.1.0-alpha.
|
|
9233
|
+
var version$1 = "0.1.0-alpha.52";
|
|
9234
9234
|
//#endregion
|
|
9235
9235
|
//#region src/cli/upgrade.ts
|
|
9236
9236
|
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;
|
|
@@ -12092,7 +12092,7 @@ var init_match = __esmMin((() => {
|
|
|
12092
12092
|
}));
|
|
12093
12093
|
//#endregion
|
|
12094
12094
|
//#region src/tui/reduce.ts
|
|
12095
|
-
var clamp, lastRow, rowsIn, withCursorVisible, moveCursor, stepStop, scrolled, draggedTo, atRow, layerHunk, nextFileWithComments, atComment, nothingOpen, layerComment, PAN_STEP, panned, movePending, moveLayer, inRail, movePanel, layerDown, nextFocus, togglePanel, packedAway, zoom, toggleRail, foldDirectory, foldLayer, foldThread, fold, moveBranch, moveFile, selectHunk, swapEnds, atBranch, startSelection, openCompose, goBack, walkMatches, openPalette, openKeys, movePalette, paletteMatches, offered, paletteChoice, transitions, reduce, atFile, withContext, withFull, revealsAfter, gapOpened, withPending, panBy, withSent, withArrived, withColumns, withLayers, withPulls, withSilentForge, withBranches, withSource, withVouched, restoredTo, withPatches, inserted, typed, backspaced, deleted, caretMoved, caretJumped, caretHomed, withDraft, paletteMoved, paletteClosed, withWaiting, withMatches, withNoticeHere, withNotice;
|
|
12095
|
+
var clamp, lastRow, rowsIn, withCursorVisible, moveCursor, stepStop, scrolled, draggedTo, atRow, layerHunk, nextFileWithComments, atComment, nothingOpen, layerComment, PAN_STEP, panned, movePending, moveLayer, inRail, movePanel, layerDown, nextFocus, togglePanel, packedAway, zoom, toggleRail, foldDirectory, foldLayer, foldThread, fold, moveBranch, moveFile, selectHunk, swapEnds, atBranch, startSelection, openCompose, goBack, walkMatches, openPalette, openKeys, movePalette, paletteMatches, offered, paletteChoice, transitions, reduce, atFile, withContext, withFull, revealsAfter, gapOpened, withPending, panBy, withSent, withArrived, withColumns, withLayers, withPulls, withSilentForge, withBranches, withSource, withVouched, restoredTo, withPatches, inserted, typed, TAB_WIDTH, SPACE_CODE, ERASED_FROM, ERASED_TO, readable, legible, pasted, backspaced, deleted, caretMoved, caretJumped, caretHomed, withDraft, paletteMoved, paletteClosed, withWaiting, withMatches, withNoticeHere, withNotice;
|
|
12096
12096
|
var init_reduce = __esmMin((() => {
|
|
12097
12097
|
init_dist();
|
|
12098
12098
|
init_patch();
|
|
@@ -12648,6 +12648,21 @@ var init_reduce = __esmMin((() => {
|
|
|
12648
12648
|
query: `${state.query}${character}`,
|
|
12649
12649
|
paletteIndex: 0
|
|
12650
12650
|
} : inserted(state, character);
|
|
12651
|
+
TAB_WIDTH = 2;
|
|
12652
|
+
SPACE_CODE = 32;
|
|
12653
|
+
ERASED_FROM = 127;
|
|
12654
|
+
ERASED_TO = 159;
|
|
12655
|
+
readable = (character) => {
|
|
12656
|
+
if (character === "\n") return true;
|
|
12657
|
+
const code = character.codePointAt(0) ?? 0;
|
|
12658
|
+
return code >= SPACE_CODE && (code < ERASED_FROM || code > ERASED_TO);
|
|
12659
|
+
};
|
|
12660
|
+
legible = (text) => Array.from(text.replace(/\r\n?/g, "\n").replace(/\t/g, " ".repeat(TAB_WIDTH))).filter(readable).join("");
|
|
12661
|
+
pasted = (state, text) => {
|
|
12662
|
+
const clean = legible(stripAnsiSequences(text));
|
|
12663
|
+
if (clean.length === 0) return state;
|
|
12664
|
+
return typed(state, state.screen === "palette" ? clean.replace(/\n/g, " ") : clean);
|
|
12665
|
+
};
|
|
12651
12666
|
backspaced = (state) => {
|
|
12652
12667
|
if (state.screen === "palette") return {
|
|
12653
12668
|
...state,
|
|
@@ -14687,6 +14702,7 @@ var init_app = __esmMin((() => {
|
|
|
14687
14702
|
onChip: (key) => this.dispatchTask(this.onKey(asKey(key)))
|
|
14688
14703
|
}));
|
|
14689
14704
|
renderer.keyInput.on("keypress", (key) => this.dispatch(key));
|
|
14705
|
+
renderer.keyInput.on("paste", (event) => this.dispatchPaste(event));
|
|
14690
14706
|
renderer.on("destroy", () => this.stopWatching());
|
|
14691
14707
|
renderer.on("destroy", () => this.stopFading());
|
|
14692
14708
|
renderer.on("destroy", () => this.stopPainting());
|
|
@@ -14736,6 +14752,7 @@ var init_app = __esmMin((() => {
|
|
|
14736
14752
|
answer(intent) {
|
|
14737
14753
|
return Intent.$match(intent, {
|
|
14738
14754
|
Key: ({ key }) => this.onKey(key),
|
|
14755
|
+
Paste: ({ text }) => sync(() => this.onPaste(text)),
|
|
14739
14756
|
Task: ({ run }) => run,
|
|
14740
14757
|
Ping: ({ done }) => asVoid(succeed$2(done, void 0))
|
|
14741
14758
|
});
|
|
@@ -14775,6 +14792,13 @@ var init_app = __esmMin((() => {
|
|
|
14775
14792
|
dispatch(key) {
|
|
14776
14793
|
offerUnsafe(this.intents, Intent.Key({ key }));
|
|
14777
14794
|
}
|
|
14795
|
+
dispatchPaste(event) {
|
|
14796
|
+
offerUnsafe(this.intents, Intent.Paste({ text: decodePasteBytes(event.bytes) }));
|
|
14797
|
+
}
|
|
14798
|
+
onPaste(text) {
|
|
14799
|
+
if (!takesText(this.state.screen)) return;
|
|
14800
|
+
this.commit(pasted(this.state, text));
|
|
14801
|
+
}
|
|
14778
14802
|
fail(cause) {
|
|
14779
14803
|
this.failure = cause instanceof Error ? `${cause.message}\n${cause.stack ?? ""}` : String(cause);
|
|
14780
14804
|
}
|
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.
|
|
26
|
+
"version": "0.1.0-alpha.52",
|
|
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": {
|