dsh-diff-approval 0.27.0 → 0.28.0
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/lib/client.js +711 -409
- package/lib/index.js +2 -1
- package/lib/types/client/PendingPanel.d.ts +10 -0
- package/lib/types/client/locales.d.ts +2 -2
- package/lib/types/client/panel-memory.d.ts +12 -0
- package/lib/types/client/slots.d.ts +6 -0
- package/lib/types/types.d.ts +6 -0
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -2482,7 +2482,8 @@ function apply(ctx, config) {
|
|
|
2482
2482
|
files,
|
|
2483
2483
|
workspacePath: workspaceOf(sessionId)?.path,
|
|
2484
2484
|
redoCleared: redoCleared || void 0,
|
|
2485
|
-
commentSkill: commentSkill()
|
|
2485
|
+
commentSkill: commentSkill(),
|
|
2486
|
+
persistError: persistFailureReported
|
|
2486
2487
|
}
|
|
2487
2488
|
};
|
|
2488
2489
|
}
|
|
@@ -155,6 +155,10 @@ export declare const SplitDiff: import("react").ForwardRefExoticComponent<{
|
|
|
155
155
|
renderDiscussion?: (discussion: Discussion, bodyWidth: number, split: boolean) => ReactNode;
|
|
156
156
|
/** The comment action for the current selection, when the panel offers one for it. */
|
|
157
157
|
selectionComment?: ReactNode;
|
|
158
|
+
/** The changed-line runs the overview ruler draws, in whole-file row indices. */
|
|
159
|
+
rulerRuns: readonly RulerRun[];
|
|
160
|
+
/** The go-to popup, which this view centres on its own box (see `gotoDialog`). */
|
|
161
|
+
gotoDialog?: ReactNode;
|
|
158
162
|
} & import("react").RefAttributes<SplitDiffHandle>>;
|
|
159
163
|
/**
|
|
160
164
|
* Reconstruct the plain text of the current selection so auto-wrap's visual
|
|
@@ -164,6 +168,12 @@ export declare const SplitDiff: import("react").ForwardRefExoticComponent<{
|
|
|
164
168
|
* without a newline while the real newline between diff rows is kept.
|
|
165
169
|
*/
|
|
166
170
|
export declare function selectedPlainText(): string | undefined;
|
|
171
|
+
/** One maximal run of same-kind changed rows: what both views' rulers are built from. */
|
|
172
|
+
interface RulerRun {
|
|
173
|
+
start: number;
|
|
174
|
+
end: number;
|
|
175
|
+
kind: 'del' | 'add';
|
|
176
|
+
}
|
|
167
177
|
/** Render the pending-edit review panel and its unified footer action. */
|
|
168
178
|
export declare function PendingPanel({ wide, useSessions, usePending, onRefresh, onKeep, onRevert, onBlockKeep, onBlockRevert, onOpen, onPreviewImage, onPasteReference, onAskAgent, watchChat, onUndo, onRedo, onImportVcs, onRefreshVcs, onBrowse, onAddPath, onKeepAll, onRevertAll, onAckRedoCleared, collapseSidebar, t, docked, dockHost, onOpenDock, closeDock, useDock, }: PendingPanelProps): import("react").JSX.Element;
|
|
169
179
|
export {};
|
|
@@ -16,7 +16,6 @@ export declare const zh: {
|
|
|
16
16
|
'panel.tab.comments': string;
|
|
17
17
|
'panel.commentsEmpty': string;
|
|
18
18
|
'panel.commentOutdated': string;
|
|
19
|
-
'panel.commentEmptyTitle': string;
|
|
20
19
|
'panel.aria': string;
|
|
21
20
|
'panel.stats': string;
|
|
22
21
|
'panel.blockPosition': string;
|
|
@@ -65,6 +64,7 @@ export declare const zh: {
|
|
|
65
64
|
'action.gotoGo': string;
|
|
66
65
|
'action.gotoCancel': string;
|
|
67
66
|
'panel.gotoMissing': string;
|
|
67
|
+
'panel.persistFailed': string;
|
|
68
68
|
'settings.keybindings': string;
|
|
69
69
|
'settings.keybindingsDesc': string;
|
|
70
70
|
'settings.comment': string;
|
|
@@ -248,7 +248,6 @@ export declare const en: {
|
|
|
248
248
|
'panel.tab.comments': string;
|
|
249
249
|
'panel.commentsEmpty': string;
|
|
250
250
|
'panel.commentOutdated': string;
|
|
251
|
-
'panel.commentEmptyTitle': string;
|
|
252
251
|
'panel.aria': string;
|
|
253
252
|
'panel.stats': string;
|
|
254
253
|
'panel.blockPosition': string;
|
|
@@ -297,6 +296,7 @@ export declare const en: {
|
|
|
297
296
|
'action.gotoGo': string;
|
|
298
297
|
'action.gotoCancel': string;
|
|
299
298
|
'panel.gotoMissing': string;
|
|
299
|
+
'panel.persistFailed': string;
|
|
300
300
|
'settings.keybindings': string;
|
|
301
301
|
'settings.keybindingsDesc': string;
|
|
302
302
|
'settings.comment': string;
|
|
@@ -47,6 +47,18 @@ export declare function rememberDiscussions(sessionId: string | undefined, byFil
|
|
|
47
47
|
* @param discussionId - the thread to end; an id that is not there changes nothing.
|
|
48
48
|
*/
|
|
49
49
|
export declare function forgetDiscussion(sessionId: string | undefined, fileId: string, discussionId: string): void;
|
|
50
|
+
/**
|
|
51
|
+
* Drop every thread whose file the list no longer holds.
|
|
52
|
+
*
|
|
53
|
+
* A thread is a block of rows in one file's diff, so a file the reader has kept or reverted out of the
|
|
54
|
+
* list leaves nothing for its comments to hang on: they go with it, and the same path coming back later
|
|
55
|
+
* in this visit starts clean. A new object is published only when something actually goes, so the panes
|
|
56
|
+
* that adopt this record (see `COMMENTS_CHANGED_EVENT`) do not re-adopt an equal object on every poll.
|
|
57
|
+
*
|
|
58
|
+
* @param sessionId - the session the panel is reviewing; nothing is dropped without one.
|
|
59
|
+
* @param listed - the pending entry ids the list is holding.
|
|
60
|
+
*/
|
|
61
|
+
export declare function forgetDiscussionsNotIn(sessionId: string | undefined, listed: readonly string[]): void;
|
|
50
62
|
/**
|
|
51
63
|
* Whether the reader asked not to be asked again about removing one file.
|
|
52
64
|
* @param sessionId - the session the panel is reviewing; nothing is quiet without one.
|
|
@@ -24,6 +24,12 @@ export interface PendingDiffSnapshot {
|
|
|
24
24
|
* same rules inline when it is not.
|
|
25
25
|
*/
|
|
26
26
|
commentSkill?: string | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* The last failure to write the pending state to disk, or absent while writes are working. The
|
|
29
|
+
* panel says so once: the file is what makes the list survive a restart, so a reader who is never
|
|
30
|
+
* told finds the list gone later with nothing to explain it (see the wire type).
|
|
31
|
+
*/
|
|
32
|
+
persistError?: string | undefined;
|
|
27
33
|
/** Latched when an external change created a fresh undo checkpoint that
|
|
28
34
|
* superseded the redo history; the panel surfaces it once (deferred if the
|
|
29
35
|
* panel is closed) via a bottom-right notice. */
|
package/lib/types/types.d.ts
CHANGED
|
@@ -66,6 +66,12 @@ export interface DiffApprovalListValue {
|
|
|
66
66
|
* is set, and carries the same rules inline when it is not.
|
|
67
67
|
*/
|
|
68
68
|
commentSkill?: string | undefined;
|
|
69
|
+
/**
|
|
70
|
+
* The last failure to write the pending state to disk, or absent while writes are working. The
|
|
71
|
+
* panel says so once: that file is what makes the list survive a restart, so a reader who is not
|
|
72
|
+
* told about it simply finds the list gone later, with nothing to explain it (issue #6).
|
|
73
|
+
*/
|
|
74
|
+
persistError?: string | undefined;
|
|
69
75
|
}
|
|
70
76
|
/** What the open endpoint asks the OS to do with a file. */
|
|
71
77
|
export type DiffApprovalOpenAction = 'open' | 'reveal';
|
package/package.json
CHANGED