@eliya-oss/agent-diff 0.1.0-alpha.75 → 0.1.0-alpha.77
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 +12 -0
- package/dist/main.js +124 -105
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @eliya-oss/agent-diff
|
|
2
2
|
|
|
3
|
+
## 0.1.0-alpha.77
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Copying reaches the clipboard inside tmux and screen, and on Linux and Windows rather than only on a Mac. The terminal is handed back if the review fails to open. The parser the diff is coloured by is shut down with the screen.
|
|
8
|
+
|
|
9
|
+
## 0.1.0-alpha.76
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- The filter above the palette and the sheet of keys is a real text box now, like the one a comment is written in: a caret you can move, word jumps, and selection. `return` in a comment belongs to the box, so `shift+return` breaks a line rather than doing nothing.
|
|
14
|
+
|
|
3
15
|
## 0.1.0-alpha.75
|
|
4
16
|
|
|
5
17
|
### 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, StyledText, SyntaxStyle, TextRenderable, TextareaRenderable, bg, createCliRenderer,
|
|
10
|
+
import { ASCIIFontRenderable, BoxRenderable, CodeRenderable, LineNumberRenderable, RGBA, StyledText, SyntaxStyle, TextRenderable, TextareaRenderable, bg, createCliRenderer, defaultTextareaKeyBindings, 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) => () => {
|
|
@@ -2565,7 +2565,7 @@ var CurrentStackFrame, TracerEnabled, TracerTimingEnabled, TracerSpanAnnotations
|
|
|
2565
2565
|
};
|
|
2566
2566
|
};
|
|
2567
2567
|
spanCleaner = /*#__PURE__*/ makeStackCleaner(3);
|
|
2568
|
-
})), Interrupt, causeInterrupt, findFail, findError$1, hasInterrupts, causeFilterInterruptors, causeCombine, causeMap, causePartition, causeSquash, causePrettyErrors, causePrettyError, causePrettyMessage, locationRegExp, cleanErrorStack, addStackAnnotations, interruptCauseStack, currentStackTrace, causePretty, renderPrettyError, renderErrorCause, FiberTypeId, fiberVariance, fiberIdStore, getCurrentFiber, FiberImpl, deferredInterruptCont, fiberMiddleware, fiberStackAnnotations, fiberAwait, fiberAwaitAll, fiberInterrupt, fiberInterruptAs, fiberInterruptAll, succeed$5, failCause$3, fail$2, sync$2, suspend$1, yieldNowWith, yieldNow, succeedNone$1, failCauseSync$1, die, failSync, void_$2, try_$1, promise$1, tryPromise$1, withFiberId, callbackOptions, asyncFinalizer, callback$2, never, gen$1, fnUntraced$1, defineFunctionLength, fnStackCleaner, fn$1, makeFn, fnUntracedEager$1, fromIteratorEagerUnsafe, fromIteratorUnsafe, as$1, asSome, andThen$1, tap$1, asVoid$1, raceAllFirst, raceFirst$1, flatMap$1, OnSuccessProto, effectIsExit, flatMapEager$1, map$2, mapEager$1, exitInterrupt$1, exitIsSuccess, exitFilterCause, exitVoid, exitMap, exitAsVoidAll, updateContext, updateService, contextWith$1, provideContext, provideService, provideServiceImpl, when$1, forever$1, catchCause$1, OnFailureProto, catchCauseFilter, catch_, catchIf, catchTag$1, mapError$1, orElseSucceed$1, ignore$1, option$2, matchCauseEffect, OnSuccessAndFailureProto, matchEffect, match, exit$1, exitPrimitive, ScopeTypeId, ScopeCloseableTypeId, scopeTag, scopeClose, scopeCloseUnsafe, scopeCloseFinalizers, scopeForkUnsafe, scopeAddFinalizerExit, scopeAddFinalizer, scopeAddFinalizerUnsafe, scopeRemoveFinalizerUnsafe, scopeMakeUnsafe, constScopeEmpty, scope, provideScope, scopedWith, acquireRelease$1, onExitPrimitive, onExit$1, onExitFilter, onError$1, onErrorFilter, onInterrupt$1, interrupt$2, uninterruptible$1, setInterruptible, setInterruptibleTrue, setInterruptibleFalse, setFiberInterruptible, interruptible, uninterruptibleMask, whileLoop$1, forEach$1, forEachSequential, iterateEagerImpl, iterateEager, forEachConcurrent, forkUnsafe$1, forkDetach$1, forkIn$1, runForkWith, runFork$1, runPromiseExitWith, runPromiseWith, runPromise$1, runSyncExitWith, runSyncExit$1, runSyncWith, runSync$1, succeedTrue, succeedFalse, Latch, makeLatchUnsafe, bigint0, NoopSpanProto, noopSpan, filterDisablePropagation, makeSpanUnsafe, provideSpanStackFrame, endSpan, useSpan, provideParentSpan, withParentSpan, withSpan$1, ClockRef, MAX_TIMER_MILLIS, ClockImpl, nanosPerMilli, monotonicNowNanos, wallTimeNanos, clockWith, sleep$1, AsyncFiberErrorTypeId, AsyncFiberError, UnknownErrorTypeId, UnknownError, ConsoleRef, logLevelToOrder, LogLevelOrder, isLogLevelGreaterThan, CurrentLoggers, LogToStderr, LoggerTypeId, LoggerProto, loggerMake, formatLabel, formatLogSpan, logWithLevel, colors, defaultDateFormat, defaultLogger, tracerLogger, init_effect = __esmMin((() => {
|
|
2568
|
+
})), Interrupt, causeInterrupt, findFail, findError$1, hasInterrupts, causeFilterInterruptors, causeCombine, causeMap, causePartition, causeSquash, causePrettyErrors, causePrettyError, causePrettyMessage, locationRegExp, cleanErrorStack, addStackAnnotations, interruptCauseStack, currentStackTrace, causePretty, renderPrettyError, renderErrorCause, FiberTypeId, fiberVariance, fiberIdStore, getCurrentFiber, FiberImpl, deferredInterruptCont, fiberMiddleware, fiberStackAnnotations, fiberAwait, fiberAwaitAll, fiberInterrupt, fiberInterruptAs, fiberInterruptAll, succeed$5, failCause$3, fail$2, sync$2, suspend$1, yieldNowWith, yieldNow, succeedNone$1, failCauseSync$1, die, failSync, void_$2, try_$1, promise$1, tryPromise$1, withFiberId, callbackOptions, asyncFinalizer, callback$2, never, gen$1, fnUntraced$1, defineFunctionLength, fnStackCleaner, fn$1, makeFn, fnUntracedEager$1, fromIteratorEagerUnsafe, fromIteratorUnsafe, as$1, asSome, andThen$1, tap$1, asVoid$1, raceAllFirst, raceFirst$1, flatMap$1, OnSuccessProto, effectIsExit, flatMapEager$1, map$2, mapEager$1, exitInterrupt$1, exitIsSuccess, exitFilterCause, exitVoid, exitMap, exitAsVoidAll, updateContext, updateService, contextWith$1, provideContext, provideService, provideServiceImpl, when$1, forever$1, catchCause$1, OnFailureProto, catchCauseFilter, catch_, catchIf, catchTag$1, mapError$1, orElseSucceed$1, ignore$1, option$2, matchCauseEffect, OnSuccessAndFailureProto, matchEffect, match, exit$1, exitPrimitive, ScopeTypeId, ScopeCloseableTypeId, scopeTag, scopeClose, scopeCloseUnsafe, scopeCloseFinalizers, scopeForkUnsafe, scopeAddFinalizerExit, scopeAddFinalizer, scopeAddFinalizerUnsafe, scopeRemoveFinalizerUnsafe, scopeMakeUnsafe, constScopeEmpty, scope, provideScope, scopedWith, acquireRelease$1, onExitPrimitive, onExit$1, ensuring$1, onExitFilter, onError$1, onErrorFilter, onInterrupt$1, interrupt$2, uninterruptible$1, setInterruptible, setInterruptibleTrue, setInterruptibleFalse, setFiberInterruptible, interruptible, uninterruptibleMask, whileLoop$1, forEach$1, forEachSequential, iterateEagerImpl, iterateEager, forEachConcurrent, forkUnsafe$1, forkDetach$1, forkIn$1, runForkWith, runFork$1, runPromiseExitWith, runPromiseWith, runPromise$1, runSyncExitWith, runSyncExit$1, runSyncWith, runSync$1, succeedTrue, succeedFalse, Latch, makeLatchUnsafe, bigint0, NoopSpanProto, noopSpan, filterDisablePropagation, makeSpanUnsafe, provideSpanStackFrame, endSpan, useSpan, provideParentSpan, withParentSpan, withSpan$1, ClockRef, MAX_TIMER_MILLIS, ClockImpl, nanosPerMilli, monotonicNowNanos, wallTimeNanos, clockWith, sleep$1, AsyncFiberErrorTypeId, AsyncFiberError, UnknownErrorTypeId, UnknownError, ConsoleRef, logLevelToOrder, LogLevelOrder, isLogLevelGreaterThan, CurrentLoggers, LogToStderr, LoggerTypeId, LoggerProto, loggerMake, formatLabel, formatLogSpan, logWithLevel, colors, defaultDateFormat, defaultLogger, tracerLogger, init_effect = __esmMin((() => {
|
|
2569
2569
|
init_Array();
|
|
2570
2570
|
init_Context();
|
|
2571
2571
|
init_Duration();
|
|
@@ -3517,6 +3517,7 @@ var CurrentStackFrame, TracerEnabled, TracerTimingEnabled, TracerSpanAnnotations
|
|
|
3517
3517
|
}
|
|
3518
3518
|
});
|
|
3519
3519
|
onExit$1 = /*#__PURE__*/ dual(2, onExitPrimitive);
|
|
3520
|
+
ensuring$1 = /*#__PURE__*/ dual(2, (self, finalizer) => onExit$1(self, (_) => finalizer));
|
|
3520
3521
|
onExitFilter = /*#__PURE__*/ dual(3, (self, filter, f) => onExit$1(self, (exit) => {
|
|
3521
3522
|
const b = filter(exit);
|
|
3522
3523
|
return isFailure(b) ? void_$2 : f(b.success, exit);
|
|
@@ -4414,7 +4415,7 @@ var init_Pull = __esmMin((() => {
|
|
|
4414
4415
|
init_effect();
|
|
4415
4416
|
provideLayer = (self, layer, options) => scopedWith((scope) => flatMap$1(options?.local ? buildWithMemoMap(layer, makeMemoMapUnsafe(), scope) : buildWithScope(layer, scope), (context) => provideContext(self, context)));
|
|
4416
4417
|
provide$1 = /*#__PURE__*/ dual((args) => isEffect(args[0]), (self, source, options) => isContext(source) ? provideContext(self, source) : provideLayer(self, Array.isArray(source) ? mergeAll(...source) : source, options));
|
|
4417
|
-
})), forEach, whileLoop, promise, tryPromise, succeed$1, suspend, sync, void_, callback$1, gen, fail, failCause, failCauseSync, try_, withFiber, flatMap, andThen, tap, option$1, exit, map, as, asVoid, catchTag, catchCause, mapError, ignore, orElseSucceed, sleep, raceFirst, when, contextWith, provide, acquireRelease, onError, onExit, interrupt$1, onInterrupt, uninterruptible, forever, withSpan, forkIn, forkDetach, runFork, runPromise, runSync, runSyncExit, fnUntraced, fn, mapEager, flatMapEager, fnUntracedEager;
|
|
4418
|
+
})), forEach, whileLoop, promise, tryPromise, succeed$1, suspend, sync, void_, callback$1, gen, fail, failCause, failCauseSync, try_, withFiber, flatMap, andThen, tap, option$1, exit, map, as, asVoid, catchTag, catchCause, mapError, ignore, orElseSucceed, sleep, raceFirst, when, contextWith, provide, acquireRelease, ensuring, onError, onExit, interrupt$1, onInterrupt, uninterruptible, forever, withSpan, forkIn, forkDetach, runFork, runPromise, runSync, runSyncExit, fnUntraced, fn, mapEager, flatMapEager, fnUntracedEager;
|
|
4418
4419
|
var init_Effect = __esmMin((() => {
|
|
4419
4420
|
init_Context();
|
|
4420
4421
|
init_core();
|
|
@@ -4454,6 +4455,7 @@ var init_Effect = __esmMin((() => {
|
|
|
4454
4455
|
contextWith = contextWith$1;
|
|
4455
4456
|
provide = provide$1;
|
|
4456
4457
|
acquireRelease = acquireRelease$1;
|
|
4458
|
+
ensuring = ensuring$1;
|
|
4457
4459
|
onError = onError$1;
|
|
4458
4460
|
onExit = onExit$1;
|
|
4459
4461
|
interrupt$1 = interrupt$2;
|
|
@@ -9661,7 +9663,7 @@ var init_pane = __esmMin((() => {
|
|
|
9661
9663
|
init_commands();
|
|
9662
9664
|
init_init();
|
|
9663
9665
|
init_pane();
|
|
9664
|
-
var version$1 = "0.1.0-alpha.
|
|
9666
|
+
var version$1 = "0.1.0-alpha.77";
|
|
9665
9667
|
//#endregion
|
|
9666
9668
|
//#region src/cli/upgrade.ts
|
|
9667
9669
|
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;
|
|
@@ -11394,7 +11396,7 @@ var init_tree = __esmMin((() => {
|
|
|
11394
11396
|
return node.children.reduce((total, child) => total + filesUnder(tree, child), 0);
|
|
11395
11397
|
};
|
|
11396
11398
|
crowdedDirectories = (tree, limit) => tree.nodes.filter((node) => node.kind === "directory" && directFiles(tree, node.id) > limit).map((node) => node.path);
|
|
11397
|
-
})), nothingReviewed, initialState, TREE_MAX, TREE_MIN, TREE_SHARE, DIFF_MIN, DIFF_ROOMY, bodyRoom, treeWidth, reviewWidth, panelFits, panelShown, onLayers, selectedLayer, proseFor, layerFiles, layerHolding, layerOpen, chunked, packed, shortened, wordWrapped, wrapped, NO_NOTE, noteRows$1, proseRow, proseRows$1, titleRows, clipEnd, FILE_LEAD, fileRows, layerRows, railWindow, selectedBranch, selectedPatch, pullHere, knownToHaveNoPull, kept, treeOf, reviewedCountIn, treeRows, crowdedOf, foldersOfFile, isReviewed, treeStart, treeWindow, commentsOn, hiddenLines, markedRows, carriesLine, selectedRows, snippetOf, selectedLineCount, lineOf, brokenAt, laidLine, laidDraft, caretRow, caretColumn, caretOn,
|
|
11399
|
+
})), nothingReviewed, initialState, TREE_MAX, TREE_MIN, TREE_SHARE, DIFF_MIN, DIFF_ROOMY, bodyRoom, treeWidth, reviewWidth, panelFits, panelShown, onLayers, selectedLayer, proseFor, layerFiles, layerHolding, layerOpen, chunked, packed, shortened, wordWrapped, wrapped, NO_NOTE, noteRows$1, proseRow, proseRows$1, titleRows, clipEnd, FILE_LEAD, fileRows, layerRows, railWindow, selectedBranch, selectedPatch, pullHere, knownToHaveNoPull, kept, treeOf, reviewedCountIn, treeRows, crowdedOf, foldersOfFile, isReviewed, treeStart, treeWindow, commentsOn, hiddenLines, markedRows, carriesLine, selectedRows, snippetOf, selectedLineCount, lineOf, brokenAt, laidLine, laidDraft, caretRow, caretColumn, caretOn, COMPOSE_BOX, COMPOSE_MARGIN, COMPOSE_PAD, COMPOSE_LEAST, composeBox, composeRoom$1, composeTarget, pickedText, selectedLines, KEYWORDS, NAME, longestName$1, searchTerm, matchHere, selectionReadout, WHOLE_FILE, CONTEXT_STEPS, wholeFileOff, contextToggled, layerContext, newLineAt, sourceLineAt, rowAtSourceLine, rowShowing, lineOnSide, commentRowsIn, threadsAtRow, stopsAtRow, threadAtStop, threadAtRow, openCommentRows, filesWithComments, answerCount, answersIn, newerOf, sectionOf, sentEntry, panelEntries, panelIndexOf, panelEntry, threadChosen, spokenSince, hunkStarts, changeAround, nextUnreviewed, reviewedCount, fileOrder, layerFile, selectionRange;
|
|
11398
11400
|
var init_model = __esmMin((() => {
|
|
11399
11401
|
init_dist();
|
|
11400
11402
|
init_patch();
|
|
@@ -11429,7 +11431,6 @@ var init_model = __esmMin((() => {
|
|
|
11429
11431
|
anchorRow: 0,
|
|
11430
11432
|
selecting: false,
|
|
11431
11433
|
draft: "",
|
|
11432
|
-
caret: 0,
|
|
11433
11434
|
notice: "",
|
|
11434
11435
|
waiting: "",
|
|
11435
11436
|
query: "",
|
|
@@ -11694,7 +11695,6 @@ var init_model = __esmMin((() => {
|
|
|
11694
11695
|
const last = held.text.endsWith(" ") ? held.text.length - 1 : held.text.length;
|
|
11695
11696
|
return held.from + Math.min(column, Math.max(0, last));
|
|
11696
11697
|
};
|
|
11697
|
-
caretAt = (state) => Math.max(0, Math.min(state.draft.length, state.caret));
|
|
11698
11698
|
COMPOSE_BOX = 72;
|
|
11699
11699
|
COMPOSE_MARGIN = 4;
|
|
11700
11700
|
COMPOSE_PAD = 5;
|
|
@@ -12520,14 +12520,6 @@ var init_command = __esmMin((() => {
|
|
|
12520
12520
|
hint: "send",
|
|
12521
12521
|
listed: false
|
|
12522
12522
|
}),
|
|
12523
|
-
command({
|
|
12524
|
-
action: "compose.newline",
|
|
12525
|
-
category: "Comments",
|
|
12526
|
-
title: "New line",
|
|
12527
|
-
keys: ["return"],
|
|
12528
|
-
screens: ["compose"],
|
|
12529
|
-
listed: false
|
|
12530
|
-
}),
|
|
12531
12523
|
command({
|
|
12532
12524
|
action: "palette.run",
|
|
12533
12525
|
category: "App",
|
|
@@ -12659,7 +12651,7 @@ var init_match = __esmMin((() => {
|
|
|
12659
12651
|
}));
|
|
12660
12652
|
//#endregion
|
|
12661
12653
|
//#region src/tui/reduce.ts
|
|
12662
|
-
var clamp, lastRow, rowsIn, withCursorVisible, moveCursor, stepStop, scrolled, draggedTo, pickedIn, atRow, noneLeft, layerHunk, nextFileWithComments, atComment, nothingOpen, layerComment, PAN_STEP, panned, moveLayer, inRail, railScrolled, movePanel, layerDown, PANES, panesShown, focusStepped, togglePanel, packedAway, zoom, toggleRail, foldDirectory, foldLayer, foldThread, fold, moveBranch, moveFile, selectHunk, swapEnds, atBranch, grownBy, startSelection, openCompose, goBack, walkMatches, openPalette, openKeys, movePalette, paletteMatches, keyMatches, offered, paletteChoice, transitions, reduce, atFile, withContext, withFull, revealsAfter, gapOpened, panBy, withSent, withArrived, withColumns, withLayers, withPulls, withSilentForge, withBranches, withSource, withVouched, restoredTo, openedAt, withPatches,
|
|
12654
|
+
var clamp, lastRow, rowsIn, withCursorVisible, moveCursor, stepStop, scrolled, draggedTo, pickedIn, atRow, noneLeft, layerHunk, nextFileWithComments, atComment, nothingOpen, layerComment, PAN_STEP, panned, moveLayer, inRail, railScrolled, movePanel, layerDown, PANES, panesShown, focusStepped, togglePanel, packedAway, zoom, toggleRail, foldDirectory, foldLayer, foldThread, fold, moveBranch, moveFile, selectHunk, swapEnds, atBranch, grownBy, startSelection, openCompose, goBack, walkMatches, openPalette, openKeys, movePalette, paletteMatches, keyMatches, offered, paletteChoice, transitions, reduce, atFile, withContext, withFull, revealsAfter, gapOpened, panBy, withSent, withArrived, withColumns, withLayers, withPulls, withSilentForge, withBranches, withSource, withVouched, restoredTo, openedAt, withPatches, TAB_WIDTH, SPACE_CODE, ERASED_FROM, ERASED_TO, readable, legible, withDraft, paletteMoved, paletteClosed, withWaiting, withMatches, withNoticeHere, withNotice;
|
|
12663
12655
|
var init_reduce = __esmMin((() => {
|
|
12664
12656
|
init_dist();
|
|
12665
12657
|
init_patch();
|
|
@@ -12959,7 +12951,6 @@ var init_reduce = __esmMin((() => {
|
|
|
12959
12951
|
...state,
|
|
12960
12952
|
screen: "compose",
|
|
12961
12953
|
draft: "",
|
|
12962
|
-
caret: 0,
|
|
12963
12954
|
anchorRow: state.selecting ? state.anchorRow : state.cursor
|
|
12964
12955
|
};
|
|
12965
12956
|
};
|
|
@@ -12973,8 +12964,7 @@ var init_reduce = __esmMin((() => {
|
|
|
12973
12964
|
if (state.screen === "report") return {
|
|
12974
12965
|
...state,
|
|
12975
12966
|
screen: state.returnTo,
|
|
12976
|
-
draft: ""
|
|
12977
|
-
caret: 0
|
|
12967
|
+
draft: ""
|
|
12978
12968
|
};
|
|
12979
12969
|
if (state.screen === "palette") return {
|
|
12980
12970
|
...state,
|
|
@@ -12989,8 +12979,7 @@ var init_reduce = __esmMin((() => {
|
|
|
12989
12979
|
if (state.screen === "compose") return {
|
|
12990
12980
|
...state,
|
|
12991
12981
|
screen: "review",
|
|
12992
|
-
draft: ""
|
|
12993
|
-
caret: 0
|
|
12982
|
+
draft: ""
|
|
12994
12983
|
};
|
|
12995
12984
|
if (state.selecting) return {
|
|
12996
12985
|
...state,
|
|
@@ -13058,7 +13047,6 @@ var init_reduce = __esmMin((() => {
|
|
|
13058
13047
|
"select.swap": swapEnds,
|
|
13059
13048
|
"compose.open": openCompose,
|
|
13060
13049
|
"compose.submit": (state) => state,
|
|
13061
|
-
"compose.newline": (state) => inserted(state, "\n"),
|
|
13062
13050
|
"focus.toggle": (state) => ({
|
|
13063
13051
|
...state,
|
|
13064
13052
|
focus: focusStepped(state, 1),
|
|
@@ -13113,7 +13101,6 @@ var init_reduce = __esmMin((() => {
|
|
|
13113
13101
|
...state,
|
|
13114
13102
|
screen: "report",
|
|
13115
13103
|
draft: "",
|
|
13116
|
-
caret: 0,
|
|
13117
13104
|
returnTo: state.screen
|
|
13118
13105
|
}),
|
|
13119
13106
|
"report.send": (state) => state,
|
|
@@ -13287,20 +13274,6 @@ var init_reduce = __esmMin((() => {
|
|
|
13287
13274
|
anchorRow: 0,
|
|
13288
13275
|
selecting: false
|
|
13289
13276
|
});
|
|
13290
|
-
inserted = (state, text) => {
|
|
13291
|
-
const at = caretAt(state);
|
|
13292
|
-
return {
|
|
13293
|
-
...state,
|
|
13294
|
-
draft: `${state.draft.slice(0, at)}${text}${state.draft.slice(at)}`,
|
|
13295
|
-
caret: at + text.length
|
|
13296
|
-
};
|
|
13297
|
-
};
|
|
13298
|
-
asksAQuery = (state) => state.screen === "palette" || state.screen === "keys";
|
|
13299
|
-
typed = (state, character) => asksAQuery(state) ? {
|
|
13300
|
-
...state,
|
|
13301
|
-
query: `${state.query}${character}`,
|
|
13302
|
-
paletteIndex: 0
|
|
13303
|
-
} : inserted(state, character);
|
|
13304
13277
|
TAB_WIDTH = 2;
|
|
13305
13278
|
SPACE_CODE = 32;
|
|
13306
13279
|
ERASED_FROM = 127;
|
|
@@ -13311,29 +13284,9 @@ var init_reduce = __esmMin((() => {
|
|
|
13311
13284
|
return code >= SPACE_CODE && (code < ERASED_FROM || code > ERASED_TO);
|
|
13312
13285
|
};
|
|
13313
13286
|
legible = (text) => Array.from(text.replace(/\r\n?/g, "\n").replace(/\t/g, " ".repeat(TAB_WIDTH))).filter(readable).join("");
|
|
13314
|
-
pasted = (state, text) => {
|
|
13315
|
-
const clean = legible(stripAnsiSequences(text));
|
|
13316
|
-
if (clean.length === 0) return state;
|
|
13317
|
-
return typed(state, asksAQuery(state) ? clean.replace(/\n/g, " ") : clean);
|
|
13318
|
-
};
|
|
13319
|
-
backspaced = (state) => {
|
|
13320
|
-
if (asksAQuery(state)) return {
|
|
13321
|
-
...state,
|
|
13322
|
-
query: state.query.slice(0, -1),
|
|
13323
|
-
paletteIndex: 0
|
|
13324
|
-
};
|
|
13325
|
-
const at = caretAt(state);
|
|
13326
|
-
if (at === 0) return state;
|
|
13327
|
-
return {
|
|
13328
|
-
...state,
|
|
13329
|
-
draft: `${state.draft.slice(0, at - 1)}${state.draft.slice(at)}`,
|
|
13330
|
-
caret: at - 1
|
|
13331
|
-
};
|
|
13332
|
-
};
|
|
13333
13287
|
withDraft = (state, draft) => ({
|
|
13334
13288
|
...state,
|
|
13335
|
-
draft
|
|
13336
|
-
caret: draft.length
|
|
13289
|
+
draft
|
|
13337
13290
|
});
|
|
13338
13291
|
paletteMoved = (state, delta) => movePalette(state, delta);
|
|
13339
13292
|
paletteClosed = (state) => ({
|
|
@@ -13361,7 +13314,6 @@ var init_reduce = __esmMin((() => {
|
|
|
13361
13314
|
...state,
|
|
13362
13315
|
screen: "review",
|
|
13363
13316
|
draft: "",
|
|
13364
|
-
caret: 0,
|
|
13365
13317
|
selecting: false,
|
|
13366
13318
|
notice
|
|
13367
13319
|
});
|
|
@@ -14158,7 +14110,7 @@ var init_diffview = __esmMin((() => {
|
|
|
14158
14110
|
}));
|
|
14159
14111
|
//#endregion
|
|
14160
14112
|
//#region src/tui/render.ts
|
|
14161
|
-
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_TAIL, EMPTY_LIST, MODAL_MARGIN, shareOf, homeWidth, longestName, 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, makePaletteParts, makeChoices, LIST_LEAD, windowed, listText, stack, makeBody, makeHome, makeModals, makeKeysParts, makeFoundParts, FONTS, logoFont, makeLanding, makeLogo, MAC_KEYS, makeComposeParts, makeCompose, clip, clipHead, clipMiddle, clipPath, treeLabel, waitingLabel, inRange, notesOf, notesFor, paired, keptWithin, CHIP_CHUNKS, shortPath, HOME_PATH_MIN, HOME_PATH_CHROME, elide, contextLabel, nameRoom, columns, FORGE_SILENT, unaskedForge, branchHeading, atHome, layersCell, baseLabel, stateCell, branchCells, 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;
|
|
14113
|
+
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_TAIL, EMPTY_LIST, MODAL_MARGIN, shareOf, homeWidth, longestName, 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, treeLabel, waitingLabel, inRange, notesOf, notesFor, paired, keptWithin, CHIP_CHUNKS, shortPath, HOME_PATH_MIN, HOME_PATH_CHROME, elide, contextLabel, nameRoom, columns, FORGE_SILENT, unaskedForge, branchHeading, atHome, layersCell, baseLabel, stateCell, branchCells, 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;
|
|
14162
14114
|
var init_render = __esmMin((() => {
|
|
14163
14115
|
init_command();
|
|
14164
14116
|
init_patch();
|
|
@@ -14353,10 +14305,25 @@ var init_render = __esmMin((() => {
|
|
|
14353
14305
|
box.width = PALETTE_WIDTH;
|
|
14354
14306
|
return box;
|
|
14355
14307
|
};
|
|
14308
|
+
asking = (renderer, id) => new TextareaRenderable(renderer, {
|
|
14309
|
+
id,
|
|
14310
|
+
height: ROW_HEIGHT,
|
|
14311
|
+
wrapMode: "none",
|
|
14312
|
+
flexShrink: 0,
|
|
14313
|
+
marginLeft: GUTTER_X,
|
|
14314
|
+
marginRight: GUTTER_X,
|
|
14315
|
+
placeholder: "Type to filter…",
|
|
14316
|
+
placeholderColor: palette.faint,
|
|
14317
|
+
backgroundColor: palette.panel,
|
|
14318
|
+
focusedBackgroundColor: palette.panel,
|
|
14319
|
+
textColor: palette.ink,
|
|
14320
|
+
focusedTextColor: palette.ink,
|
|
14321
|
+
cursorColor: palette.ink
|
|
14322
|
+
});
|
|
14356
14323
|
makePaletteParts = (renderer) => {
|
|
14357
14324
|
const box = makePalette(renderer);
|
|
14358
14325
|
const title = bar(renderer, "palette-title", palette.faint);
|
|
14359
|
-
const query =
|
|
14326
|
+
const query = asking(renderer, "palette-query");
|
|
14360
14327
|
const choices = makeChoices(renderer);
|
|
14361
14328
|
box.add(title);
|
|
14362
14329
|
box.add(query);
|
|
@@ -14426,16 +14393,16 @@ var init_render = __esmMin((() => {
|
|
|
14426
14393
|
makeFoundParts = (renderer) => {
|
|
14427
14394
|
const box = makePalette(renderer);
|
|
14428
14395
|
const title = bar(renderer, "found-title", palette.faint);
|
|
14429
|
-
const
|
|
14396
|
+
const peek = bar(renderer, "found-peek", palette.muted);
|
|
14430
14397
|
const choices = makeChoices(renderer);
|
|
14431
14398
|
box.id = "found";
|
|
14432
14399
|
box.add(title);
|
|
14433
14400
|
box.add(choices);
|
|
14434
|
-
box.add(
|
|
14401
|
+
box.add(peek);
|
|
14435
14402
|
return {
|
|
14436
14403
|
box,
|
|
14437
14404
|
title,
|
|
14438
|
-
|
|
14405
|
+
peek,
|
|
14439
14406
|
choices
|
|
14440
14407
|
};
|
|
14441
14408
|
};
|
|
@@ -14512,6 +14479,16 @@ var init_render = __esmMin((() => {
|
|
|
14512
14479
|
name: "backspace",
|
|
14513
14480
|
meta: true,
|
|
14514
14481
|
action: "delete-word-backward"
|
|
14482
|
+
},
|
|
14483
|
+
{
|
|
14484
|
+
name: "return",
|
|
14485
|
+
shift: true,
|
|
14486
|
+
action: "newline"
|
|
14487
|
+
},
|
|
14488
|
+
{
|
|
14489
|
+
name: "return",
|
|
14490
|
+
meta: true,
|
|
14491
|
+
action: "newline"
|
|
14515
14492
|
}
|
|
14516
14493
|
];
|
|
14517
14494
|
makeComposeParts = (renderer) => ({
|
|
@@ -14903,7 +14880,7 @@ var init_render = __esmMin((() => {
|
|
|
14903
14880
|
this.keysChoices = modals.keys.choices;
|
|
14904
14881
|
this.found = modals.found.box;
|
|
14905
14882
|
this.foundTitle = modals.found.title;
|
|
14906
|
-
this.foundPeek = modals.found.
|
|
14883
|
+
this.foundPeek = modals.found.peek;
|
|
14907
14884
|
this.foundChoices = modals.found.choices;
|
|
14908
14885
|
this.assemble(renderer);
|
|
14909
14886
|
}
|
|
@@ -14974,6 +14951,10 @@ var init_render = __esmMin((() => {
|
|
|
14974
14951
|
writing() {
|
|
14975
14952
|
return this.composeBody;
|
|
14976
14953
|
}
|
|
14954
|
+
asking(screen) {
|
|
14955
|
+
if (screen === "palette") return this.paletteQuery;
|
|
14956
|
+
return screen === "keys" ? this.keysQuery : void 0;
|
|
14957
|
+
}
|
|
14977
14958
|
railRows() {
|
|
14978
14959
|
return this.listRoom();
|
|
14979
14960
|
}
|
|
@@ -15027,14 +15008,12 @@ var init_render = __esmMin((() => {
|
|
|
15027
15008
|
paintPalette(state) {
|
|
15028
15009
|
this.palette.visible = state.screen === "palette";
|
|
15029
15010
|
if (state.screen !== "palette") {
|
|
15030
|
-
this.paletteQuery.content = "";
|
|
15031
15011
|
this.paletteTitle.content = "";
|
|
15032
15012
|
this.paletteChoices.content = "";
|
|
15033
15013
|
return;
|
|
15034
15014
|
}
|
|
15035
15015
|
const matches = paletteMatches(state);
|
|
15036
15016
|
this.paletteTitle.content = matches.length === 0 ? "No command matches" : "Commands";
|
|
15037
|
-
this.paletteQuery.content = state.query.length === 0 ? "Type to filter…" : `${state.query}▏`;
|
|
15038
15017
|
const room = panelWidth(this.renderer.width);
|
|
15039
15018
|
const paletteRoom = Math.min(panelRows(this.renderer.height, PANEL_QUARTER), matches.length + PALETTE_CHROME);
|
|
15040
15019
|
this.paletteChoices.content = listText(matches.map((entry) => commandRow(entry, room - MODAL_ROOM)), Math.min(state.paletteIndex, Math.max(0, matches.length - 1)), paletteRoom - PALETTE_CHROME);
|
|
@@ -15047,14 +15026,12 @@ var init_render = __esmMin((() => {
|
|
|
15047
15026
|
this.keys.visible = state.screen === "keys";
|
|
15048
15027
|
if (state.screen !== "keys") {
|
|
15049
15028
|
this.keysTitle.content = "";
|
|
15050
|
-
this.keysQuery.content = "";
|
|
15051
15029
|
this.keysChoices.content = "";
|
|
15052
15030
|
return;
|
|
15053
15031
|
}
|
|
15054
15032
|
const rows = keyMatches(state);
|
|
15055
15033
|
const room = panelWidth(this.renderer.width);
|
|
15056
15034
|
this.keysTitle.content = rows.length === 0 ? "No key matches" : `Keys here, ${rows.length} of them`;
|
|
15057
|
-
this.keysQuery.content = state.query.length === 0 ? "Type to filter…" : `${state.query}▏`;
|
|
15058
15035
|
const keysRoom = Math.min(panelRows(this.renderer.height, PANEL_QUARTER), rows.length + PENDING_CHROME);
|
|
15059
15036
|
this.keysChoices.content = listText(rows.map((entry) => commandRow(entry, room - MODAL_ROOM)), Math.min(state.paletteIndex, Math.max(0, rows.length - 1)), keysRoom - PENDING_CHROME);
|
|
15060
15037
|
this.keys.height = keysRoom;
|
|
@@ -15401,10 +15378,11 @@ var init_render = __esmMin((() => {
|
|
|
15401
15378
|
}));
|
|
15402
15379
|
//#endregion
|
|
15403
15380
|
//#region src/tui/display.ts
|
|
15404
|
-
var Display, paintWith, listenWith, lightWith, shapeOf, displayOn;
|
|
15381
|
+
var ASKING, Display, paintWith, listenWith, lightWith, shapeOf, displayOn;
|
|
15405
15382
|
var init_display = __esmMin((() => {
|
|
15406
15383
|
init_dist();
|
|
15407
15384
|
init_render();
|
|
15385
|
+
ASKING = ["palette", "keys"];
|
|
15408
15386
|
Display = class extends Service()("adiff/Display") {};
|
|
15409
15387
|
paintWith = (screen) => fn("Tui.paint")(function* (state) {
|
|
15410
15388
|
yield* sync(() => screen.update(state));
|
|
@@ -15431,6 +15409,25 @@ var init_display = __esmMin((() => {
|
|
|
15431
15409
|
write: (text) => sync(() => screen.writing().setText(text)),
|
|
15432
15410
|
writeIn: (text) => sync(() => screen.writing().insertText(text)),
|
|
15433
15411
|
writeOn: (on) => sync(() => on ? screen.writing().focus() : screen.writing().blur()),
|
|
15412
|
+
askOn: (which) => sync(() => {
|
|
15413
|
+
for (const name of ASKING) {
|
|
15414
|
+
const box = screen.asking(name);
|
|
15415
|
+
if (box === void 0) continue;
|
|
15416
|
+
if (name === which) {
|
|
15417
|
+
box.setText("");
|
|
15418
|
+
box.focus();
|
|
15419
|
+
} else box.blur();
|
|
15420
|
+
}
|
|
15421
|
+
}),
|
|
15422
|
+
askWith: (text) => sync(() => {
|
|
15423
|
+
for (const name of ASKING) screen.asking(name)?.setText(text);
|
|
15424
|
+
}),
|
|
15425
|
+
onAsked: (told) => sync(() => {
|
|
15426
|
+
for (const name of ASKING) {
|
|
15427
|
+
const box = screen.asking(name);
|
|
15428
|
+
if (box !== void 0) box.onContentChange = () => told(box.plainText);
|
|
15429
|
+
}
|
|
15430
|
+
}),
|
|
15434
15431
|
at: sync(() => screen.scrolledAt()),
|
|
15435
15432
|
rowAt: (visual) => sync(() => screen.rowAtScreen(visual)),
|
|
15436
15433
|
screenRowOf: (row) => sync(() => screen.screenRowOf(row)),
|
|
@@ -15516,7 +15513,7 @@ var init_upgrade = __esmMin((() => {
|
|
|
15516
15513
|
return due ? `adiff ${latest} is out · adiff upgrade` : "";
|
|
15517
15514
|
}).pipe(withSpan("Tui.upgradeHint"));
|
|
15518
15515
|
upgradeHint = worded.pipe(orElseSucceed(() => ""));
|
|
15519
|
-
})),
|
|
15516
|
+
})), KEY_HISTORY, DRAIN_PASSES, TRAIL_HISTORY, clockOf, momentOf, noticeOf, COPIERS, wayland, handOver, throughMultiplexer, copyToClipboard, lineUnder, asKey, openedPull, LISTENS, WRITES, writesInto, listens, laidOut, ARROWS, keyName, App, turnedOver, settledPath, openingOn, launch, told, untilDestroyed, runOn, runTui;
|
|
15520
15517
|
var init_app = __esmMin((() => {
|
|
15521
15518
|
init_dist();
|
|
15522
15519
|
init_report();
|
|
@@ -15533,8 +15530,8 @@ var init_app = __esmMin((() => {
|
|
|
15533
15530
|
init_intent();
|
|
15534
15531
|
init_session();
|
|
15535
15532
|
init_upgrade();
|
|
15536
|
-
PRINTABLE = /^[\S ]$/;
|
|
15537
15533
|
KEY_HISTORY = 40;
|
|
15534
|
+
DRAIN_PASSES = 8;
|
|
15538
15535
|
TRAIL_HISTORY = 20;
|
|
15539
15536
|
clockOf = (elapsed) => {
|
|
15540
15537
|
const seconds = Math.floor(elapsed / 1e3);
|
|
@@ -15546,9 +15543,23 @@ var init_app = __esmMin((() => {
|
|
|
15546
15543
|
return `${clockOf(elapsed)} ${named.padEnd(16)} ${place.padEnd(16)} row ${String(state.cursor + 1).padStart(5)} ${file}`;
|
|
15547
15544
|
};
|
|
15548
15545
|
noticeOf = (notice, elapsed) => `${clockOf(elapsed)} ${"said".padEnd(16)} ${notice}`;
|
|
15546
|
+
COPIERS = {
|
|
15547
|
+
darwin: ["pbcopy"],
|
|
15548
|
+
linux: [
|
|
15549
|
+
"xclip",
|
|
15550
|
+
"-selection",
|
|
15551
|
+
"clipboard"
|
|
15552
|
+
],
|
|
15553
|
+
win32: ["clip"]
|
|
15554
|
+
};
|
|
15555
|
+
wayland = () => process.env["WAYLAND_DISPLAY"] === void 0 ? void 0 : ["wl-copy"];
|
|
15549
15556
|
handOver = (text) => {
|
|
15550
|
-
if (
|
|
15551
|
-
const
|
|
15557
|
+
if (!process.stdout.isTTY) return;
|
|
15558
|
+
const named = wayland() ?? COPIERS[platform()];
|
|
15559
|
+
if (named === void 0) return;
|
|
15560
|
+
const [command, ...rest] = named;
|
|
15561
|
+
if (command === void 0) return;
|
|
15562
|
+
const pipe = spawn(command, [...rest], { stdio: [
|
|
15552
15563
|
"pipe",
|
|
15553
15564
|
"ignore",
|
|
15554
15565
|
"ignore"
|
|
@@ -15557,9 +15568,13 @@ var init_app = __esmMin((() => {
|
|
|
15557
15568
|
pipe.stdin.on("error", () => void 0);
|
|
15558
15569
|
pipe.stdin.end(text);
|
|
15559
15570
|
};
|
|
15571
|
+
throughMultiplexer = (sequence) => {
|
|
15572
|
+
if (process.env["TMUX"] !== void 0) return `\u001BPtmux;\u001B${sequence}\u001B\\`;
|
|
15573
|
+
return process.env["STY"] === void 0 ? sequence : `\u001BP${sequence}\u001B\\`;
|
|
15574
|
+
};
|
|
15560
15575
|
copyToClipboard = (text) => {
|
|
15561
15576
|
const encoded = Buffer.from(text, "utf8").toString("base64");
|
|
15562
|
-
process.stdout.write(`\u001B]52;c;${encoded}\u0007`);
|
|
15577
|
+
process.stdout.write(throughMultiplexer(`\u001B]52;c;${encoded}\u0007`));
|
|
15563
15578
|
handOver(text);
|
|
15564
15579
|
};
|
|
15565
15580
|
lineUnder = (state) => {
|
|
@@ -15643,12 +15658,13 @@ var init_app = __esmMin((() => {
|
|
|
15643
15658
|
}));
|
|
15644
15659
|
renderer.on("selection", () => this.copyDragged());
|
|
15645
15660
|
runSync(options.display.onWritten((text) => this.readBack(text)));
|
|
15661
|
+
runSync(options.display.onAsked((text) => this.askedBack(text)));
|
|
15646
15662
|
renderer.keyInput.on("keypress", (key) => this.dispatch(key));
|
|
15647
15663
|
renderer.keyInput.on("keyrelease", (key) => this.letGo(key));
|
|
15648
|
-
renderer.keyInput.on("paste", (event) => this.dispatchPaste(event));
|
|
15649
15664
|
renderer.on("destroy", () => this.stopWatching());
|
|
15650
15665
|
renderer.on("destroy", () => this.stopFading());
|
|
15651
15666
|
renderer.on("destroy", () => this.stopLighting());
|
|
15667
|
+
renderer.on("destroy", () => void getTreeSitterClient().destroy());
|
|
15652
15668
|
renderer.on("destroy", () => this.stopPainting());
|
|
15653
15669
|
renderer.on("destroy", () => this.stopConsuming());
|
|
15654
15670
|
renderer.on("frame", () => this.syncGeometry());
|
|
@@ -15696,7 +15712,6 @@ var init_app = __esmMin((() => {
|
|
|
15696
15712
|
answer(intent) {
|
|
15697
15713
|
return Intent.$match(intent, {
|
|
15698
15714
|
Key: ({ key }) => this.onKey(key),
|
|
15699
|
-
Paste: ({ text }) => sync(() => this.onPaste(text)),
|
|
15700
15715
|
Task: ({ run }) => run,
|
|
15701
15716
|
Ping: ({ done }) => asVoid(succeed$3(done, void 0))
|
|
15702
15717
|
});
|
|
@@ -15751,25 +15766,28 @@ var init_app = __esmMin((() => {
|
|
|
15751
15766
|
this.grewWithShift = false;
|
|
15752
15767
|
offerUnsafe(this.intents, Intent.Key({ key: asKey("c") }));
|
|
15753
15768
|
}
|
|
15754
|
-
dispatchPaste(event) {
|
|
15755
|
-
offerUnsafe(this.intents, Intent.Paste({ text: decodePasteBytes(event.bytes) }));
|
|
15756
|
-
}
|
|
15757
|
-
onPaste(text) {
|
|
15758
|
-
if (writesInto(this.state.screen)) return;
|
|
15759
|
-
if (!takesText(this.state.screen)) return;
|
|
15760
|
-
this.commit(pasted(this.state, text));
|
|
15761
|
-
}
|
|
15762
15769
|
fail(cause) {
|
|
15763
15770
|
this.failure = cause instanceof Error ? `${cause.message}\n${cause.stack ?? ""}` : String(cause);
|
|
15764
15771
|
}
|
|
15765
15772
|
lastFailure() {
|
|
15766
15773
|
return this.failure;
|
|
15767
15774
|
}
|
|
15768
|
-
|
|
15769
|
-
if (this.consuming === void 0) return Promise.resolve();
|
|
15775
|
+
pinged() {
|
|
15770
15776
|
const done = makeUnsafe$4();
|
|
15771
15777
|
offerUnsafe(this.intents, Intent.Ping({ done }));
|
|
15772
|
-
return
|
|
15778
|
+
return _await(done);
|
|
15779
|
+
}
|
|
15780
|
+
drained() {
|
|
15781
|
+
return gen({ self: this }, function* () {
|
|
15782
|
+
for (let pass = 0; pass < DRAIN_PASSES; pass += 1) {
|
|
15783
|
+
yield* this.pinged();
|
|
15784
|
+
if (sizeUnsafe(this.intents) === 0) return;
|
|
15785
|
+
}
|
|
15786
|
+
});
|
|
15787
|
+
}
|
|
15788
|
+
settled() {
|
|
15789
|
+
if (this.consuming === void 0) return Promise.resolve();
|
|
15790
|
+
return runPromise(andThen(this.drained(), this.stillLighting()));
|
|
15773
15791
|
}
|
|
15774
15792
|
stillLighting() {
|
|
15775
15793
|
const fiber = this.lighting;
|
|
@@ -15977,29 +15995,31 @@ var init_app = __esmMin((() => {
|
|
|
15977
15995
|
yield* effect();
|
|
15978
15996
|
});
|
|
15979
15997
|
}
|
|
15980
|
-
typedIn(key) {
|
|
15981
|
-
if (key.ctrl || key.option || key.meta || key.super === true) return false;
|
|
15982
|
-
return PRINTABLE.test(key.sequence);
|
|
15983
|
-
}
|
|
15984
15998
|
onText(key) {
|
|
15985
15999
|
if (!listens(this.state.screen)) return;
|
|
15986
|
-
if (key.name === "
|
|
15987
|
-
this.commit(backspaced(this.state));
|
|
15988
|
-
return;
|
|
15989
|
-
}
|
|
15990
|
-
if (key.name === "down" || key.name === "up") {
|
|
15991
|
-
this.commit(paletteMoved(this.state, key.name === "down" ? 1 : -1));
|
|
15992
|
-
return;
|
|
15993
|
-
}
|
|
15994
|
-
if (this.typedIn(key)) this.commit(typed(this.state, key.sequence));
|
|
16000
|
+
if (key.name === "down" || key.name === "up") this.commit(paletteMoved(this.state, key.name === "down" ? 1 : -1));
|
|
15995
16001
|
}
|
|
15996
16002
|
turnWriting(next) {
|
|
16003
|
+
if (listens(next.screen) !== listens(this.state.screen) || next.screen !== this.state.screen) runSync(this.display.askOn(listens(next.screen) ? next.screen : void 0));
|
|
15997
16004
|
const was = writesInto(this.state.screen);
|
|
15998
16005
|
const now = writesInto(next.screen);
|
|
15999
16006
|
if (was === now) return;
|
|
16000
16007
|
if (now) runSync(this.display.write(next.draft));
|
|
16001
16008
|
runSync(this.display.writeOn(now));
|
|
16002
16009
|
}
|
|
16010
|
+
askedBack(text) {
|
|
16011
|
+
const clean = legible(text).replaceAll("\n", " ");
|
|
16012
|
+
if (clean !== text) {
|
|
16013
|
+
runSync(this.display.askWith(clean));
|
|
16014
|
+
return;
|
|
16015
|
+
}
|
|
16016
|
+
if (!listens(this.state.screen) || clean === this.state.query) return;
|
|
16017
|
+
this.commit({
|
|
16018
|
+
...this.state,
|
|
16019
|
+
query: clean,
|
|
16020
|
+
paletteIndex: 0
|
|
16021
|
+
});
|
|
16022
|
+
}
|
|
16003
16023
|
readBack(text) {
|
|
16004
16024
|
const clean = legible(stripAnsiSequences(text));
|
|
16005
16025
|
if (clean !== text) {
|
|
@@ -16439,8 +16459,7 @@ var init_app = __esmMin((() => {
|
|
|
16439
16459
|
const closed = {
|
|
16440
16460
|
...this.state,
|
|
16441
16461
|
screen: this.state.returnTo,
|
|
16442
|
-
draft: ""
|
|
16443
|
-
caret: 0
|
|
16462
|
+
draft: ""
|
|
16444
16463
|
};
|
|
16445
16464
|
this.commit(withNotice(closed, `report copied — ${path}`));
|
|
16446
16465
|
});
|
|
@@ -16463,7 +16482,7 @@ var init_app = __esmMin((() => {
|
|
|
16463
16482
|
side: anchor.value.side,
|
|
16464
16483
|
start: anchor.value.start,
|
|
16465
16484
|
end: anchor.value.end,
|
|
16466
|
-
body: this.
|
|
16485
|
+
body: yield* this.display.written,
|
|
16467
16486
|
id: randomUUID(),
|
|
16468
16487
|
at: (/* @__PURE__ */ new Date()).toISOString()
|
|
16469
16488
|
});
|
|
@@ -16545,7 +16564,7 @@ var init_app = __esmMin((() => {
|
|
|
16545
16564
|
exitOnCtrlC: true,
|
|
16546
16565
|
useKittyKeyboard: { events: true }
|
|
16547
16566
|
}));
|
|
16548
|
-
yield* runOn(repo, renderer, sessionPath, branch);
|
|
16567
|
+
yield* ensuring(runOn(repo, renderer, sessionPath, branch), sync(() => renderer.destroy()));
|
|
16549
16568
|
});
|
|
16550
16569
|
}));
|
|
16551
16570
|
//#endregion
|
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.77",
|
|
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": {
|