dsh-git-worktree 0.7.5 → 0.8.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/CHANGELOG.md +15 -0
- package/README.en.md +7 -3
- package/README.md +7 -3
- package/docs/i18n.md +63 -0
- package/lib/adapters/files.d.ts +0 -7
- package/lib/adapters/files.js +4 -3
- package/lib/adapters/files.js.map +1 -1
- package/lib/adapters/git.d.ts +0 -10
- package/lib/adapters/git.js +6 -5
- package/lib/adapters/git.js.map +1 -1
- package/lib/adapters/registry.d.ts +0 -7
- package/lib/adapters/registry.js +2 -1
- package/lib/adapters/registry.js.map +1 -1
- package/lib/adapters/safe-file.d.ts +0 -7
- package/lib/adapters/safe-file.js +5 -4
- package/lib/adapters/safe-file.js.map +1 -1
- package/lib/client/WorktreeCreateRow.js +4 -2
- package/lib/client/WorktreeCreateRow.js.map +1 -1
- package/lib/client/WorktreeReviewRow.js +10 -8
- package/lib/client/WorktreeReviewRow.js.map +1 -1
- package/lib/client/actions.d.ts +3 -2
- package/lib/client/actions.js +17 -13
- package/lib/client/actions.js.map +1 -1
- package/lib/client/console-remote/adapter.d.ts +2 -1
- package/lib/client/console-remote/adapter.js +35 -32
- package/lib/client/console-remote/adapter.js.map +1 -1
- package/lib/client/console-remote/index.js +6 -2
- package/lib/client/console-remote/index.js.map +1 -1
- package/lib/client/i18n.d.ts +25 -0
- package/lib/client/i18n.js +43 -0
- package/lib/client/i18n.js.map +1 -0
- package/lib/client/index.d.ts +1 -1
- package/lib/client/index.js +17 -4
- package/lib/client/index.js.map +1 -1
- package/lib/client/model.d.ts +3 -2
- package/lib/client/model.js +8 -8
- package/lib/client/model.js.map +1 -1
- package/lib/client/pre-session/PreSessionWorktreeToggle.js +14 -12
- package/lib/client/pre-session/PreSessionWorktreeToggle.js.map +1 -1
- package/lib/client/pre-session/controller.js +11 -9
- package/lib/client/pre-session/controller.js.map +1 -1
- package/lib/client/pre-session/index.d.ts +12 -1
- package/lib/client/pre-session/index.js +9 -1
- package/lib/client/pre-session/index.js.map +1 -1
- package/lib/client/review-console/DeliveryProof.js +15 -12
- package/lib/client/review-console/DeliveryProof.js.map +1 -1
- package/lib/client/review-console/PreflightStatus.js +14 -8
- package/lib/client/review-console/PreflightStatus.js.map +1 -1
- package/lib/client/review-console/ReviewActions.js +97 -92
- package/lib/client/review-console/ReviewActions.js.map +1 -1
- package/lib/client/review-console/WorktreeReviewPanel.d.ts +1 -1
- package/lib/client/review-console/WorktreeReviewPanel.js +19 -16
- package/lib/client/review-console/WorktreeReviewPanel.js.map +1 -1
- package/lib/client/review-console/recovery-continuation.d.ts +2 -1
- package/lib/client/review-console/recovery-continuation.js +12 -8
- package/lib/client/review-console/recovery-continuation.js.map +1 -1
- package/lib/client/target-console/TargetStatusAction.js +28 -25
- package/lib/client/target-console/TargetStatusAction.js.map +1 -1
- package/lib/client/target-console/WorktreeConsoleView.js +40 -36
- package/lib/client/target-console/WorktreeConsoleView.js.map +1 -1
- package/lib/client/target-console/WorktreeManagerModal.js +3 -1
- package/lib/client/target-console/WorktreeManagerModal.js.map +1 -1
- package/lib/client/target-console/WorktreeReviewStatus.js +14 -12
- package/lib/client/target-console/WorktreeReviewStatus.js.map +1 -1
- package/lib/client/workspace-sidebar/index.js +4 -2
- package/lib/client/workspace-sidebar/index.js.map +1 -1
- package/lib/client/workspace-sidebar/model.d.ts +2 -1
- package/lib/client/workspace-sidebar/model.js +14 -13
- package/lib/client/workspace-sidebar/model.js.map +1 -1
- package/lib/client.js +2173 -477
- package/lib/commands.js +32 -35
- package/lib/commands.js.map +1 -1
- package/lib/console-host/control-plane.js +82 -81
- package/lib/console-host/control-plane.js.map +1 -1
- package/lib/console-host/errors.js +2 -1
- package/lib/console-host/errors.js.map +1 -1
- package/lib/console-host/projection.js +3 -1
- package/lib/console-host/projection.js.map +1 -1
- package/lib/console-host/review-diff.js +6 -5
- package/lib/console-host/review-diff.js.map +1 -1
- package/lib/console-host/service.d.ts +24 -22
- package/lib/console-host/service.js +54 -51
- package/lib/console-host/service.js.map +1 -1
- package/lib/console-remote/descriptors.js +2 -2
- package/lib/console-remote/descriptors.js.map +1 -1
- package/lib/console-remote/remote.d.ts +22 -21
- package/lib/console-remote/remote.js.map +1 -1
- package/lib/console-remote/schemas.d.ts +4 -0
- package/lib/console-remote/schemas.js +1 -0
- package/lib/console-remote/schemas.js.map +1 -1
- package/lib/i18n/client-messages.d.ts +1523 -0
- package/lib/i18n/client-messages.js +1431 -0
- package/lib/i18n/client-messages.js.map +1 -0
- package/lib/i18n/core.d.ts +12 -0
- package/lib/i18n/core.js +10 -0
- package/lib/i18n/core.js.map +1 -0
- package/lib/i18n/host-messages.d.ts +1463 -0
- package/lib/i18n/host-messages.js +1474 -0
- package/lib/i18n/host-messages.js.map +1 -0
- package/lib/i18n/host.d.ts +9 -0
- package/lib/i18n/host.js +34 -0
- package/lib/i18n/host.js.map +1 -0
- package/lib/i18n/transport-messages.d.ts +10 -0
- package/lib/i18n/transport-messages.js +11 -0
- package/lib/i18n/transport-messages.js.map +1 -0
- package/lib/session-checkout-apply.js +93 -92
- package/lib/session-checkout-apply.js.map +1 -1
- package/lib/session-checkout-module.js +232 -229
- package/lib/session-checkout-module.js.map +1 -1
- package/lib/session-target-context.js +2 -1
- package/lib/session-target-context.js.map +1 -1
- package/lib/tools.d.ts +0 -8
- package/lib/tools.js +108 -96
- package/lib/tools.js.map +1 -1
- package/package.json +2 -1
- package/scripts/dev-dsh-lib.mjs +1 -1
- package/scripts/workspace-sidebar-upstream.mjs +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { jsx as _jsx,
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useClientTranslator, defaultClientTranslator } from '../i18n.js';
|
|
2
3
|
import { useEffect, useId, useRef, useState } from 'react';
|
|
3
4
|
import { Modal } from '@deepseek-ai/dsh-client-ui-primitives';
|
|
4
5
|
import { worktreeConsoleErrorMeta } from '../../console-contract.js';
|
|
@@ -18,20 +19,21 @@ function isStale(error) {
|
|
|
18
19
|
function sameStrings(left, right) {
|
|
19
20
|
return left.length === right.length && left.every((value, index) => value === right[index]);
|
|
20
21
|
}
|
|
21
|
-
function preflightMessage(preflight) {
|
|
22
|
+
function preflightMessage(preflight, t = defaultClientTranslator) {
|
|
22
23
|
if (preflight.status === 'ready')
|
|
23
|
-
return
|
|
24
|
+
return t("sync.preflight.passed.creating.a.reversible.local.preview");
|
|
24
25
|
if (preflight.status === 'local_advanced')
|
|
25
|
-
return
|
|
26
|
+
return t("local.advanced.but.preflight.confirmed.a.safe.merge");
|
|
26
27
|
if (preflight.status === 'already_in_local')
|
|
27
|
-
return
|
|
28
|
+
return t("this.iteration.is.already.in.local.sync.will");
|
|
28
29
|
if (preflight.status === 'conflict')
|
|
29
|
-
return
|
|
30
|
+
return t("sync.preflight.found.conflicting.files.local.is.unchanged", { p0: preflight.conflictingFiles.length });
|
|
30
31
|
if (preflight.status === 'blocked')
|
|
31
|
-
return
|
|
32
|
-
return
|
|
32
|
+
return t("sync.is.temporarily.blocked", { p0: preflight.message });
|
|
33
|
+
return t("sync.preflight.finished.local.is.unchanged");
|
|
33
34
|
}
|
|
34
35
|
export function ReviewActions({ review, adapter, services, identity, target, disabled, unavailableMessage, focusReview, isActive = () => true, onStale, onTargetChange, }) {
|
|
36
|
+
const t = useClientTranslator();
|
|
35
37
|
const formId = useId();
|
|
36
38
|
const moreMenuRef = useRef(null);
|
|
37
39
|
const [submitting, setSubmitting] = useState(null);
|
|
@@ -44,7 +46,8 @@ export function ReviewActions({ review, adapter, services, identity, target, dis
|
|
|
44
46
|
const [retainEnvironment, setRetainEnvironment] = useState(false);
|
|
45
47
|
const [retention, setRetention] = useState('retain_24h');
|
|
46
48
|
const [message, setMessage] = useState(null);
|
|
47
|
-
const [
|
|
49
|
+
const [errorText, setError] = useState(null);
|
|
50
|
+
const error = errorText?.(t) ?? null;
|
|
48
51
|
const [runtimeConflict, setRuntimeConflict] = useState(null);
|
|
49
52
|
const mutationLock = useRef(false);
|
|
50
53
|
const observedTargetRevision = useRef(target?.revision);
|
|
@@ -156,15 +159,15 @@ export function ReviewActions({ review, adapter, services, identity, target, dis
|
|
|
156
159
|
setRuntimeConflict(nextError.continuation);
|
|
157
160
|
setCommitMode(null);
|
|
158
161
|
setError(null);
|
|
159
|
-
setMessage(
|
|
162
|
+
setMessage(() => (t) => t("the.live.write.check.found.conflicts.local.is"));
|
|
160
163
|
finish();
|
|
161
164
|
return;
|
|
162
165
|
}
|
|
163
|
-
setError(nextError);
|
|
166
|
+
setError(() => (t) => (nextError));
|
|
164
167
|
if (nextError.code === 'stale_target')
|
|
165
168
|
onStale(nextError);
|
|
166
169
|
if (nextError.code === 'stale_local' || nextError.code === 'stale_isolated') {
|
|
167
|
-
setMessage(
|
|
170
|
+
setMessage(() => (t) => t("state.changed.before.writing.the.operation.stopped.recover"));
|
|
168
171
|
void refreshPreflight();
|
|
169
172
|
}
|
|
170
173
|
finish();
|
|
@@ -201,7 +204,7 @@ export function ReviewActions({ review, adapter, services, identity, target, dis
|
|
|
201
204
|
return;
|
|
202
205
|
}
|
|
203
206
|
if (latest.status !== 'success' || latest.preflight.status !== 'conflict') {
|
|
204
|
-
setMessage(latest.status === 'success' ? preflightMessage(latest.preflight) :
|
|
207
|
+
setMessage(() => (t) => latest.status === 'success' ? preflightMessage(latest.preflight, t) : t("conflict.preflight.has.not.finished"));
|
|
205
208
|
finish();
|
|
206
209
|
return;
|
|
207
210
|
}
|
|
@@ -210,7 +213,7 @@ export function ReviewActions({ review, adapter, services, identity, target, dis
|
|
|
210
213
|
|| latest.preflight.revision !== preflight.revision
|
|
211
214
|
|| latest.preflight.localHeadOid !== preflight.localHeadOid
|
|
212
215
|
|| !sameStrings(latest.preflight.conflictingFiles, preflight.conflictingFiles)) {
|
|
213
|
-
setError({ code: 'stale_target', message:
|
|
216
|
+
setError(() => (t) => ({ code: 'stale_target', message: t("the.conflict.identity.changed.before.recovery.retry.using") }));
|
|
214
217
|
finish();
|
|
215
218
|
return;
|
|
216
219
|
}
|
|
@@ -237,7 +240,7 @@ export function ReviewActions({ review, adapter, services, identity, target, dis
|
|
|
237
240
|
|| nextTarget.targetSessionId !== identity.sessionId
|
|
238
241
|
|| nextTarget.state !== 'working'
|
|
239
242
|
|| nextTarget.revision !== preflight.revision + 1) {
|
|
240
|
-
setError({ code: 'checkout_mismatch', message:
|
|
243
|
+
setError(() => (t) => ({ code: 'checkout_mismatch', message: t("the.working.identity.returned.by.host.after.resuming") }));
|
|
241
244
|
finish();
|
|
242
245
|
return;
|
|
243
246
|
}
|
|
@@ -249,7 +252,7 @@ export function ReviewActions({ review, adapter, services, identity, target, dis
|
|
|
249
252
|
|| recovery.revision !== nextTarget.revision
|
|
250
253
|
|| recovery.localHeadOid !== preflight.localHeadOid
|
|
251
254
|
|| !sameStrings(recovery.conflictingFiles, preflight.conflictingFiles)) {
|
|
252
|
-
setError({ code: 'checkout_mismatch', message:
|
|
255
|
+
setError(() => (t) => ({ code: 'checkout_mismatch', message: t("host.did.not.return.an.exact.conflict.recovery") }));
|
|
253
256
|
finish();
|
|
254
257
|
return;
|
|
255
258
|
}
|
|
@@ -265,7 +268,7 @@ export function ReviewActions({ review, adapter, services, identity, target, dis
|
|
|
265
268
|
localHeadOid: recovery.localHeadOid,
|
|
266
269
|
conflictingFiles: [...recovery.conflictingFiles],
|
|
267
270
|
});
|
|
268
|
-
setMessage(
|
|
271
|
+
setMessage(() => (t) => t("safely.resumed.working.the.conflict.resolution.request.is"));
|
|
269
272
|
finish();
|
|
270
273
|
};
|
|
271
274
|
const startReviewRegeneration = async (preflight) => {
|
|
@@ -292,7 +295,7 @@ export function ReviewActions({ review, adapter, services, identity, target, dis
|
|
|
292
295
|
|| latest.preflight.checkoutId !== preflight.checkoutId
|
|
293
296
|
|| latest.preflight.reviewId !== preflight.reviewId
|
|
294
297
|
|| latest.preflight.revision !== preflight.revision) {
|
|
295
|
-
setMessage(latest.status === 'success' ? preflightMessage(latest.preflight) :
|
|
298
|
+
setMessage(() => (t) => latest.status === 'success' ? preflightMessage(latest.preflight, t) : t("read.only.recheck.has.not.finished"));
|
|
296
299
|
finish();
|
|
297
300
|
return;
|
|
298
301
|
}
|
|
@@ -311,7 +314,7 @@ export function ReviewActions({ review, adapter, services, identity, target, dis
|
|
|
311
314
|
|| recovery.checkoutId !== preflight.checkoutId
|
|
312
315
|
|| recovery.reviewId !== preflight.reviewId
|
|
313
316
|
|| recovery.revision !== preflight.revision) {
|
|
314
|
-
setError({ code: 'checkout_mismatch', message:
|
|
317
|
+
setError(() => (t) => ({ code: 'checkout_mismatch', message: t("host.did.not.return.an.exact.read.only") }));
|
|
315
318
|
finish();
|
|
316
319
|
return;
|
|
317
320
|
}
|
|
@@ -323,7 +326,7 @@ export function ReviewActions({ review, adapter, services, identity, target, dis
|
|
|
323
326
|
reviewId: recovery.reviewId,
|
|
324
327
|
revision: recovery.revision,
|
|
325
328
|
});
|
|
326
|
-
setMessage(
|
|
329
|
+
setMessage(() => (t) => t("read.only.review.regeneration.is.waiting.for.the"));
|
|
327
330
|
finish();
|
|
328
331
|
};
|
|
329
332
|
const recoverPreflight = (preflight) => {
|
|
@@ -370,7 +373,7 @@ export function ReviewActions({ review, adapter, services, identity, target, dis
|
|
|
370
373
|
finish();
|
|
371
374
|
return;
|
|
372
375
|
}
|
|
373
|
-
setMessage(preflightMessage(inspected.preflight));
|
|
376
|
+
setMessage(() => (t) => preflightMessage(inspected.preflight, t));
|
|
374
377
|
if (inspected.preflight.status === 'conflict' || inspected.preflight.status === 'blocked') {
|
|
375
378
|
finish();
|
|
376
379
|
return;
|
|
@@ -385,7 +388,7 @@ export function ReviewActions({ review, adapter, services, identity, target, dis
|
|
|
385
388
|
return;
|
|
386
389
|
}
|
|
387
390
|
applyTarget(outcome.value.target);
|
|
388
|
-
setMessage(
|
|
391
|
+
setMessage(() => (t) => t("synced.as.a.reversible.local.preview.review.the"));
|
|
389
392
|
finish();
|
|
390
393
|
};
|
|
391
394
|
const openCheckpoint = () => {
|
|
@@ -425,14 +428,14 @@ export function ReviewActions({ review, adapter, services, identity, target, dis
|
|
|
425
428
|
|| nextTarget.state !== 'working'
|
|
426
429
|
|| nextTarget.review !== undefined
|
|
427
430
|
|| nextTarget.checkpoints?.at(-1)?.checkpointId !== saved.checkpointId) {
|
|
428
|
-
setError({ code: 'checkout_mismatch', message:
|
|
431
|
+
setError(() => (t) => ({ code: 'checkout_mismatch', message: t("host.returned.a.mismatched.checkpoint.identity.or.working") }));
|
|
429
432
|
finish();
|
|
430
433
|
return;
|
|
431
434
|
}
|
|
432
435
|
applyTarget(nextTarget);
|
|
433
436
|
setCheckpointOpen(false);
|
|
434
437
|
checkpointRequestId.current = null;
|
|
435
|
-
setMessage(
|
|
438
|
+
setMessage(() => (t) => t("saved.worktree.stage.and.resumed.editing.the.stage", { p0: saved.sequence }));
|
|
436
439
|
finish();
|
|
437
440
|
};
|
|
438
441
|
const resumeRevision = async () => {
|
|
@@ -449,11 +452,11 @@ export function ReviewActions({ review, adapter, services, identity, target, dis
|
|
|
449
452
|
}
|
|
450
453
|
applyTarget(outcome.value.target);
|
|
451
454
|
const drafted = services
|
|
452
|
-
? prefillSessionDraft(services, identity.sessionId,
|
|
455
|
+
? prefillSessionDraft(services, identity.sessionId, t("please.recheck.the.current.worktree.changes.rerun.the"))
|
|
453
456
|
: false;
|
|
454
|
-
setMessage(drafted
|
|
455
|
-
?
|
|
456
|
-
:
|
|
457
|
+
setMessage(() => (t) => drafted
|
|
458
|
+
? t("resumed.editing.and.prefilled.a.new.review.request")
|
|
459
|
+
: t("resumed.editing.recheck.validate.and.generate.a.new"));
|
|
457
460
|
finish();
|
|
458
461
|
};
|
|
459
462
|
const rollbackPreview = async (resumeRevision = false) => {
|
|
@@ -462,7 +465,7 @@ export function ReviewActions({ review, adapter, services, identity, target, dis
|
|
|
462
465
|
let freshProof;
|
|
463
466
|
if (target?.state === 'preview_detached') {
|
|
464
467
|
if (!recoveryIdentity) {
|
|
465
|
-
setError({ code: 'stale_target', message:
|
|
468
|
+
setError(() => (t) => ({ code: 'stale_target', message: t("detached.preview.identity.is.incomplete.please.refresh") }));
|
|
466
469
|
finish();
|
|
467
470
|
return;
|
|
468
471
|
}
|
|
@@ -476,14 +479,15 @@ export function ReviewActions({ review, adapter, services, identity, target, dis
|
|
|
476
479
|
return;
|
|
477
480
|
}
|
|
478
481
|
if (inspected.status !== 'success' || inspected.preflight.status !== 'assessed') {
|
|
479
|
-
setMessage(inspected.status === 'success' && inspected.preflight.status === 'blocked'
|
|
482
|
+
setMessage(() => (t) => inspected.status === 'success' && inspected.preflight.status === 'blocked'
|
|
480
483
|
? inspected.preflight.message
|
|
481
|
-
:
|
|
484
|
+
: t("preview.recovery.preflight.has.not.finished"));
|
|
482
485
|
finish();
|
|
483
486
|
return;
|
|
484
487
|
}
|
|
485
488
|
if (inspected.preflight.proof.rollback.status !== 'safe') {
|
|
486
|
-
|
|
489
|
+
const explanation = inspected.preflight.proof.rollback.message;
|
|
490
|
+
setMessage(() => () => explanation);
|
|
487
491
|
finish();
|
|
488
492
|
return;
|
|
489
493
|
}
|
|
@@ -503,9 +507,9 @@ export function ReviewActions({ review, adapter, services, identity, target, dis
|
|
|
503
507
|
return;
|
|
504
508
|
}
|
|
505
509
|
applyTarget(outcome.value.target);
|
|
506
|
-
setMessage(outcome.value.target.state === 'preview_detached'
|
|
507
|
-
?
|
|
508
|
-
: resumeRevision ?
|
|
510
|
+
setMessage(() => (t) => outcome.value.target.state === 'preview_detached'
|
|
511
|
+
? t("recovery.conditions.changed.before.writing.preview.evidence.and")
|
|
512
|
+
: resumeRevision ? t("local.preview.rolled.back.you.can.continue.editing") : t("local.preview.rolled.back.the.review.can.be"));
|
|
509
513
|
finish();
|
|
510
514
|
};
|
|
511
515
|
const submitCommit = async () => {
|
|
@@ -526,7 +530,7 @@ export function ReviewActions({ review, adapter, services, identity, target, dis
|
|
|
526
530
|
return;
|
|
527
531
|
}
|
|
528
532
|
if (inspected.status !== 'success' || inspected.preflight.status === 'blocked' || inspected.preflight.status === 'conflict') {
|
|
529
|
-
setMessage(inspected.status === 'success' ? preflightMessage(inspected.preflight) :
|
|
533
|
+
setMessage(() => (t) => inspected.status === 'success' ? preflightMessage(inspected.preflight, t) : t("sync.preflight.has.not.finished"));
|
|
530
534
|
finish();
|
|
531
535
|
return;
|
|
532
536
|
}
|
|
@@ -534,7 +538,7 @@ export function ReviewActions({ review, adapter, services, identity, target, dis
|
|
|
534
538
|
let previewProof;
|
|
535
539
|
if (mode === 'finalize_preview' && target?.state === 'preview_detached') {
|
|
536
540
|
if (!recoveryIdentity) {
|
|
537
|
-
setError({ code: 'stale_target', message:
|
|
541
|
+
setError(() => (t) => ({ code: 'stale_target', message: t("detached.preview.identity.is.incomplete.please.refresh") }));
|
|
538
542
|
finish();
|
|
539
543
|
return;
|
|
540
544
|
}
|
|
@@ -548,14 +552,15 @@ export function ReviewActions({ review, adapter, services, identity, target, dis
|
|
|
548
552
|
return;
|
|
549
553
|
}
|
|
550
554
|
if (inspected.status !== 'success' || inspected.preflight.status !== 'assessed') {
|
|
551
|
-
setMessage(inspected.status === 'success' && inspected.preflight.status === 'blocked'
|
|
555
|
+
setMessage(() => (t) => inspected.status === 'success' && inspected.preflight.status === 'blocked'
|
|
552
556
|
? inspected.preflight.message
|
|
553
|
-
:
|
|
557
|
+
: t("preview.recovery.preflight.has.not.finished"));
|
|
554
558
|
finish();
|
|
555
559
|
return;
|
|
556
560
|
}
|
|
557
561
|
if (inspected.preflight.proof.finalize.status !== 'safe') {
|
|
558
|
-
|
|
562
|
+
const explanation = inspected.preflight.proof.finalize.message;
|
|
563
|
+
setMessage(() => () => explanation);
|
|
559
564
|
finish();
|
|
560
565
|
return;
|
|
561
566
|
}
|
|
@@ -574,10 +579,10 @@ export function ReviewActions({ review, adapter, services, identity, target, dis
|
|
|
574
579
|
}
|
|
575
580
|
applyTarget(outcome.value.target);
|
|
576
581
|
if (outcome.value.target.state === 'preview_detached') {
|
|
577
|
-
setMessage(
|
|
582
|
+
setMessage(() => (t) => t("local.changed.a.reliable.commit.is.not.possible"));
|
|
578
583
|
}
|
|
579
584
|
else {
|
|
580
|
-
setMessage(selectedRetention === 'cleanup' ?
|
|
585
|
+
setMessage(() => (t) => selectedRetention === 'cleanup' ? t("committed.to.local.and.started.worktree.cleanup") : t("committed.to.local.and.retained.the.current.environment"));
|
|
581
586
|
}
|
|
582
587
|
setCommitMode(null);
|
|
583
588
|
finish();
|
|
@@ -601,9 +606,9 @@ export function ReviewActions({ review, adapter, services, identity, target, dis
|
|
|
601
606
|
return;
|
|
602
607
|
}
|
|
603
608
|
applyTarget(outcome.value.target);
|
|
604
|
-
setMessage(outcome.value.target.state === 'preview_detached'
|
|
605
|
-
?
|
|
606
|
-
:
|
|
609
|
+
setMessage(() => (t) => outcome.value.target.state === 'preview_detached'
|
|
610
|
+
? t("local.changed.lossless.rollback.is.not.possible.the")
|
|
611
|
+
: t("discarded.this.iteration.s.worktree.changes.local.is"));
|
|
607
612
|
setDiscardOpen(false);
|
|
608
613
|
finish();
|
|
609
614
|
};
|
|
@@ -618,9 +623,9 @@ export function ReviewActions({ review, adapter, services, identity, target, dis
|
|
|
618
623
|
return null;
|
|
619
624
|
}
|
|
620
625
|
if (inspected.status !== 'success' || inspected.preflight.status !== 'assessed') {
|
|
621
|
-
setMessage(inspected.status === 'success' && inspected.preflight.status === 'blocked'
|
|
626
|
+
setMessage(() => (t) => inspected.status === 'success' && inspected.preflight.status === 'blocked'
|
|
622
627
|
? inspected.preflight.message
|
|
623
|
-
:
|
|
628
|
+
: t("preview.recovery.preflight.has.not.finished"));
|
|
624
629
|
return null;
|
|
625
630
|
}
|
|
626
631
|
return inspected.preflight.proof;
|
|
@@ -649,7 +654,7 @@ export function ReviewActions({ review, adapter, services, identity, target, dis
|
|
|
649
654
|
|| continuation.previewId !== recoveryIdentity.expectedPreviewId
|
|
650
655
|
|| continuation.revision !== identity.expectedRevision
|
|
651
656
|
|| continuation.generation !== proof.generation) {
|
|
652
|
-
setError({ code: 'checkout_mismatch', message:
|
|
657
|
+
setError(() => (t) => ({ code: 'checkout_mismatch', message: t("host.did.not.return.an.exact.detached.recovery") }));
|
|
653
658
|
finish();
|
|
654
659
|
return;
|
|
655
660
|
}
|
|
@@ -662,23 +667,23 @@ export function ReviewActions({ review, adapter, services, identity, target, dis
|
|
|
662
667
|
if (!verified.ok || verified.value.target.recoveryContinuation?.kind !== continuation.kind
|
|
663
668
|
|| verified.value.target.recoveryContinuation.requestId !== continuation.requestId
|
|
664
669
|
|| verified.value.target.recoveryContinuation.generation !== continuation.generation) {
|
|
665
|
-
throw new Error(
|
|
670
|
+
throw new Error(t("the.second.host.inspection.did.not.confirm.the"));
|
|
666
671
|
}
|
|
667
672
|
const binding = services.sessions.binding(identity.sessionId);
|
|
668
673
|
const prompt = binding?.session.prompt;
|
|
669
674
|
if (!binding || !prompt)
|
|
670
|
-
throw new Error(
|
|
675
|
+
throw new Error(t("the.owner.session.has.not.provided.the.harness"));
|
|
671
676
|
const result = await prompt.call(binding.session, [{ type: 'text', text: [
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
677
|
+
t("analyze.detached.preview.recovery.in.read.only.mode", { p0: identity.checkoutId, p1: identity.expectedReviewId, p2: recoveryIdentity.expectedPreviewId, p3: proof.generation }),
|
|
678
|
+
t("do.not.modify.the.old.managed.worktree.local"),
|
|
679
|
+
t("explain.the.rollback.finalize.blockers.missing.task.changes"),
|
|
675
680
|
].join('\n') }], 'queue');
|
|
676
681
|
if (!result.ok)
|
|
677
682
|
throw new Error(`${result.error.code}: ${result.error.message}`);
|
|
678
|
-
setMessage(
|
|
683
|
+
setMessage(() => (t) => t("sent.a.read.only.recovery.analysis.request.to"));
|
|
679
684
|
}
|
|
680
685
|
catch (reason) {
|
|
681
|
-
setError({ code: 'checkout_mismatch', message: reason instanceof Error ? reason.message : String(reason) });
|
|
686
|
+
setError(() => (t) => ({ code: 'checkout_mismatch', message: reason instanceof Error ? reason.message : String(reason) }));
|
|
682
687
|
}
|
|
683
688
|
finish();
|
|
684
689
|
};
|
|
@@ -708,7 +713,7 @@ export function ReviewActions({ review, adapter, services, identity, target, dis
|
|
|
708
713
|
|| continuation.generation !== proof.generation
|
|
709
714
|
|| continuation.checkoutId !== created.value.target.checkoutId
|
|
710
715
|
|| continuation.checkoutId === identity.checkoutId) {
|
|
711
|
-
setError({ code: 'checkout_mismatch', message:
|
|
716
|
+
setError(() => (t) => ({ code: 'checkout_mismatch', message: t("host.returned.a.mismatched.recovery.handoff.identity") }));
|
|
712
717
|
finish();
|
|
713
718
|
return;
|
|
714
719
|
}
|
|
@@ -724,23 +729,23 @@ export function ReviewActions({ review, adapter, services, identity, target, dis
|
|
|
724
729
|
if (!verified.ok || verified.value.target.managedRoot !== created.value.managedRoot
|
|
725
730
|
|| verified.value.target.recoveryContinuation?.kind !== continuation.kind
|
|
726
731
|
|| verified.value.target.recoveryContinuation.requestId !== continuation.requestId) {
|
|
727
|
-
throw new Error(
|
|
732
|
+
throw new Error(t("the.second.host.cwd.check.of.the.new"));
|
|
728
733
|
}
|
|
729
734
|
const binding = services.sessions.binding(created.value.targetSessionId);
|
|
730
735
|
const prompt = binding?.session.prompt;
|
|
731
736
|
if (!binding || !prompt)
|
|
732
|
-
throw new Error(
|
|
737
|
+
throw new Error(t("the.new.owner.session.has.not.provided.the"));
|
|
733
738
|
const result = await prompt.call(binding.session, [{ type: 'text', text: [
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
739
|
+
t("this.is.a.detached.preview.recovery.handoff.the", { p0: identity.checkoutId, p1: identity.expectedReviewId, p2: recoveryIdentity.expectedPreviewId, p3: proof.generation }),
|
|
740
|
+
t("the.new.worktree.is.based.on.the.latest"),
|
|
741
|
+
t("run.the.necessary.validation.and.generate.a.new"),
|
|
737
742
|
].join('\n') }], 'queue');
|
|
738
743
|
if (!result.ok)
|
|
739
744
|
throw new Error(`${result.error.code}: ${result.error.message}`);
|
|
740
|
-
setMessage(
|
|
745
|
+
setMessage(() => (t) => t("created.and.opened.a.fresh.worktree.based.on"));
|
|
741
746
|
}
|
|
742
747
|
catch (reason) {
|
|
743
|
-
setError({ code: 'checkout_mismatch', message: reason instanceof Error ? reason.message : String(reason) });
|
|
748
|
+
setError(() => (t) => ({ code: 'checkout_mismatch', message: reason instanceof Error ? reason.message : String(reason) }));
|
|
744
749
|
}
|
|
745
750
|
finish();
|
|
746
751
|
};
|
|
@@ -761,7 +766,7 @@ export function ReviewActions({ review, adapter, services, identity, target, dis
|
|
|
761
766
|
return;
|
|
762
767
|
}
|
|
763
768
|
applyTarget(outcome.value.target);
|
|
764
|
-
setMessage(outcome.value.target.state === 'delivered' ?
|
|
769
|
+
setMessage(() => (t) => outcome.value.target.state === 'delivered' ? t("worktree.environment.cleaned.up") : t("cleanup.is.still.incomplete.recovery.information.was.retained"));
|
|
765
770
|
finish();
|
|
766
771
|
};
|
|
767
772
|
const openHolder = async () => {
|
|
@@ -779,7 +784,7 @@ export function ReviewActions({ review, adapter, services, identity, target, dis
|
|
|
779
784
|
await openAuthorizedWorktreeTarget(adapter, services, identity.sessionId, holder, isActive);
|
|
780
785
|
}
|
|
781
786
|
catch (reason) {
|
|
782
|
-
setError({ code: 'checkout_mismatch', message: reason instanceof Error ? reason.message : String(reason) });
|
|
787
|
+
setError(() => (t) => ({ code: 'checkout_mismatch', message: reason instanceof Error ? reason.message : String(reason) }));
|
|
783
788
|
}
|
|
784
789
|
finally {
|
|
785
790
|
finish();
|
|
@@ -813,50 +818,50 @@ export function ReviewActions({ review, adapter, services, identity, target, dis
|
|
|
813
818
|
setDiscardOpen(false);
|
|
814
819
|
};
|
|
815
820
|
const primary = ready ? (_jsx("button", { type: "button", className: "dsh-wt-button dsh-wt-primary", disabled: allDisabled || !target.capabilities.preview || !safeReadyPreflight, onClick: () => { void previewLocal(); }, children: submitting === 'preview'
|
|
816
|
-
?
|
|
821
|
+
? t("syncing")
|
|
817
822
|
: autoPreflightEnabled && (preflightSnapshot.status === 'idle' || preflightSnapshot.status === 'loading')
|
|
818
|
-
?
|
|
819
|
-
:
|
|
820
|
-
return (_jsxs("section", { className: "dsh-wt-review-actions", "aria-label": "
|
|
821
|
-
?
|
|
822
|
-
:
|
|
823
|
+
? t("checking")
|
|
824
|
+
: t("preview.changes") })) : previewActive ? (_jsxs("button", { type: "button", className: "dsh-wt-button dsh-wt-primary", disabled: allDisabled || !target.capabilities.finalizePreview, onClick: () => setCommitMode('finalize_preview'), children: [t("confirm.and.save"), " "] })) : previewRecovery ? (rollbackRecoverySafe ? (_jsx("button", { type: "button", className: "dsh-wt-button", disabled: allDisabled || !target?.capabilities.rollbackPreview, onClick: () => { void rollbackPreview(true); }, children: submitting === 'rollback' ? t("processing") : t("recover.and.roll.back.preview") })) : (_jsx("button", { type: "button", className: "dsh-wt-button", disabled: allDisabled || target?.state !== 'preview_detached', onClick: () => { void refreshRecoveryPreflight(); }, children: recoveryPreflight.status === 'loading' ? t("checking") : t("check.again") }))) : cleanupPending ? (_jsx("button", { type: "button", className: "dsh-wt-button", disabled: allDisabled || !target?.capabilities.retryCleanup, onClick: () => { void retryCleanup(); }, children: submitting === 'retry_cleanup' ? t("cleaning.up") : t("retry.environment.cleanup") })) : null;
|
|
825
|
+
return (_jsxs("section", { className: "dsh-wt-review-actions", "aria-label": t("review.actions"), children: [!live ? _jsx("p", { className: "dsh-wt-status", children: unavailableMessage }) : null, terminal ? (_jsx("p", { className: "dsh-wt-status", children: target.state === 'retained'
|
|
826
|
+
? t("this.iteration.was.committed.the.environment.is.temporarily", { p0: target.commitOid ? ` · ${target.commitOid.slice(0, 8)}` : '' })
|
|
827
|
+
: t("this.iteration.was.delivered", { p0: target.commitOid ? ` · ${target.commitOid.slice(0, 8)}` : '' }) })) : (_jsxs("div", { className: "dsh-wt-actions", children: [primary, _jsxs("details", { ref: moreMenuRef, className: "dsh-wt-more-menu", children: [_jsx("summary", { className: "dsh-wt-more-trigger", "aria-label": t("more.delivery.actions"), children: t("symbol") }), _jsxs("div", { className: "dsh-wt-more-content", role: "menu", children: [focusReview ? (_jsx("button", { type: "button", role: "menuitem", className: "dsh-wt-more-item", onClick: () => {
|
|
823
828
|
focusReview();
|
|
824
829
|
closeMoreMenu();
|
|
825
|
-
}, children: "
|
|
830
|
+
}, children: t("view.review") })) : null, ready ? (_jsxs(_Fragment, { children: [_jsx("button", { type: "button", role: "menuitem", className: "dsh-wt-more-item", disabled: allDisabled || !target.capabilities.checkpoint || !target.checkpointGeneration, onClick: () => {
|
|
826
831
|
openCheckpoint();
|
|
827
832
|
closeMoreMenu();
|
|
828
|
-
}, children: "
|
|
833
|
+
}, children: t("save.stage.and.continue") }), _jsx("button", { type: "button", role: "menuitem", className: "dsh-wt-more-item", disabled: allDisabled || !target.capabilities.resumeRevision, onClick: () => {
|
|
829
834
|
void resumeRevision();
|
|
830
835
|
closeMoreMenu();
|
|
831
|
-
}, children: submitting === 'resume_revision' ?
|
|
836
|
+
}, children: submitting === 'resume_revision' ? t("recovering") : t("continue.editing") }), _jsx("button", { type: "button", role: "menuitem", className: "dsh-wt-more-item", disabled: allDisabled || !target.capabilities.finalize || !safeReadyPreflight, onClick: () => {
|
|
832
837
|
setCommitMode('finish');
|
|
833
838
|
closeMoreMenu();
|
|
834
|
-
}, children: "
|
|
839
|
+
}, children: t("skip.preview.and.save") })] })) : null, previewActive && target.capabilities.checkpoint && target.checkpointGeneration ? (_jsx("button", { type: "button", role: "menuitem", className: "dsh-wt-more-item", disabled: allDisabled, onClick: () => {
|
|
835
840
|
openCheckpoint();
|
|
836
841
|
closeMoreMenu();
|
|
837
|
-
}, children: "
|
|
842
|
+
}, children: t("save.stage.and.continue") })) : null, previewActive || rollbackRecoverySafe ? (_jsx("button", { type: "button", role: "menuitem", className: "dsh-wt-more-item", disabled: allDisabled || !target.capabilities.rollbackPreview, onClick: () => {
|
|
838
843
|
void rollbackPreview(true);
|
|
839
844
|
closeMoreMenu();
|
|
840
|
-
}, children: previewActive ?
|
|
845
|
+
}, children: previewActive ? t("roll.back.this.preview") : t("retry.rollback") })) : null, finalizeRecoverySafe ? (_jsx("button", { type: "button", role: "menuitem", className: "dsh-wt-more-item", disabled: allDisabled || !target.capabilities.finalizePreview, onClick: () => {
|
|
841
846
|
setCommitMode('finalize_preview');
|
|
842
847
|
closeMoreMenu();
|
|
843
|
-
}, children: "
|
|
848
|
+
}, children: t("save.changes") })) : null, canDiscard ? (_jsx("button", { type: "button", role: "menuitem", className: "dsh-wt-more-item dsh-wt-danger-text", disabled: allDisabled, onClick: () => {
|
|
844
849
|
setDiscardOpen(true);
|
|
845
850
|
closeMoreMenu();
|
|
846
|
-
}, children: "
|
|
847
|
-
?
|
|
848
|
-
:
|
|
849
|
-
?
|
|
850
|
-
: target?.state === 'preview_detached' ?
|
|
851
|
-
?
|
|
852
|
-
:
|
|
853
|
-
?
|
|
854
|
-
: retainEnvironment ?
|
|
855
|
-
?
|
|
856
|
-
:
|
|
851
|
+
}, children: t("discard.task") })) : null] })] })] })), _jsx(Modal, { open: checkpointOpen, onClose: closeCheckpoint, title: t("save.current.progress.and.continue"), closeLabel: t("close.save.progress.confirmation"), description: previewActive
|
|
852
|
+
? t("first.safely.roll.back.the.preview.then.save")
|
|
853
|
+
: t("save.task.progress.and.continue.to.the.next"), footer: (_jsxs("div", { className: "dsh-wt-modal-footer", children: [_jsx("button", { type: "button", className: "dsh-wt-button", disabled: submitting !== null, onClick: closeCheckpoint, children: t("cancel") }), _jsx("button", { type: "button", className: "dsh-wt-button dsh-wt-primary", disabled: submitting !== null || !checkpointMessage.trim() || checkpointMessage.trim().length > 500, onClick: () => { void checkpoint(); }, children: submitting === 'checkpoint' ? t("saving") : t("save.progress.and.continue") })] })), children: _jsxs("div", { className: "dsh-wt-commit-dialog", children: [_jsxs("div", { className: "dsh-wt-checkpoint-note", children: [_jsx("strong", { children: t("stages.are.not.published.to.local") }), _jsx("span", { children: t("checkpoint.summary", { count: target?.checkpoints?.length ?? 0 }) })] }), _jsx("label", { htmlFor: `${formId}-checkpoint-message`, children: t("checkpoint.commit.message") }), _jsx("textarea", { id: `${formId}-checkpoint-message`, "aria-label": t("checkpoint.commit.message"), rows: 6, maxLength: 500, value: checkpointMessage, onChange: event => setCheckpointMessage(event.target.value) }), _jsxs("div", { className: "dsh-wt-character-count", children: [checkpointMessage.length, t("500")] })] }) }), _jsx(Modal, { open: commitMode !== null, onClose: closeCommit, title: commitMode === 'finalize_preview'
|
|
854
|
+
? t("confirm.and.save.these.changes")
|
|
855
|
+
: target?.state === 'preview_detached' ? t("save.these.changes") : t("skip.preview.and.save.directly"), closeLabel: t("close.save.confirmation"), description: commitMode === 'finalize_preview'
|
|
856
|
+
? t("only.this.iteration.s.task.changes.in.the")
|
|
857
|
+
: t("skip.local.preview.and.save.this.iteration.s"), footer: (_jsxs("div", { className: "dsh-wt-modal-footer", children: [_jsx("button", { type: "button", className: "dsh-wt-button", disabled: submitting !== null, onClick: closeCommit, children: t("cancel") }), _jsx("button", { type: "button", className: "dsh-wt-button dsh-wt-primary", disabled: submitting !== null || !commitMessage.trim() || commitMessage.trim().length > 500, onClick: () => { void submitCommit(); }, children: submitting === 'finish' || submitting === 'finalize_preview'
|
|
858
|
+
? t("saving")
|
|
859
|
+
: retainEnvironment ? t("confirm.delivery.and.retain.environment") : t("confirm.delivery.and.clean.up") })] })), children: _jsxs("div", { className: "dsh-wt-commit-dialog", children: [_jsx("label", { htmlFor: `${formId}-message`, children: t("commit.message") }), _jsx("textarea", { id: `${formId}-message`, "aria-label": t("commit.message"), rows: 6, maxLength: 500, value: commitMessage, onChange: event => setCommitMessage(event.target.value) }), _jsxs("div", { className: "dsh-wt-character-count", children: [commitMessage.length, t("500")] }), _jsxs("label", { className: "dsh-wt-retention-check", children: [_jsx("input", { type: "checkbox", checked: retainEnvironment, onChange: event => setRetainEnvironment(event.target.checked) }), _jsx("span", { children: t("temporarily.retain.the.current.environment.after.committing") })] }), retainEnvironment ? (_jsxs("label", { className: "dsh-wt-retention-select", children: [_jsx("span", { children: t("retention.period") }), _jsxs("select", { "aria-label": t("retention.period"), value: retention, onChange: event => setRetention(event.target.value), children: [_jsx("option", { value: "retain_24h", children: t("retain.for.24.hours") }), _jsx("option", { value: "retain_3d", children: t("retain.for.3.days") }), _jsx("option", { value: "retain_manual", children: t("manual.cleanup") })] })] })) : null] }) }), _jsx(Modal, { open: discardOpen, onClose: closeDiscard, title: t("discard.this.iteration"), closeLabel: t("close.discard.confirmation"), description: previewActive
|
|
860
|
+
? t("first.safely.roll.back.this.local.preview.then")
|
|
861
|
+
: t("undelivered.worktree.changes.will.be.permanently.discarded.local"), footer: (_jsxs("div", { className: "dsh-wt-modal-footer", children: [_jsx("button", { type: "button", className: "dsh-wt-button", disabled: submitting !== null, onClick: closeDiscard, children: t("cancel") }), _jsx("button", { type: "button", className: "dsh-wt-button dsh-wt-danger", disabled: submitting !== null, onClick: () => { void discard(); }, children: submitting === 'discard' ? t("discarding") : t("confirm.discard.task") })] })) }), ready ? (_jsx(PreflightStatus, { snapshot: preflightSnapshot, target: target, onRefresh: () => { void refreshPreflight(); }, onRecovery: recoverPreflight, onOpenHolder: () => { void openHolder(); }, busy: submitting !== null || activeRecovery?.status === 'queued' || activeRecovery?.status === 'sending' || activeRecovery?.status === 'sent' })) : null, target?.state === 'preview_detached' ? (_jsxs("div", { className: "dsh-wt-preflight", "data-status": recoveryPreflight.status, children: [_jsxs("div", { className: "dsh-wt-preflight-head", children: [_jsx("strong", { children: t("detached.preview.recovery") }), _jsxs("button", { type: "button", className: "dsh-wt-inline-action", disabled: submitting !== null || recoveryPreflight.status === 'loading', onClick: () => { void refreshRecoveryPreflight(); }, children: [t("check.again"), " "] })] }), _jsx("p", { children: t("detached.is.a.delivery.recovery.state.not.git") }), recoveryPreflight.status === 'loading' ? _jsx("p", { children: t("checking.local.head.index.working.tree.retained.artifacts") }) : null, recoveryPreflight.status === 'error' ? _jsx("p", { className: "dsh-wt-error", children: recoveryPreflight.error.message }) : null, recoveryPreflight.status === 'success' && recoveryPreflight.preflight.status === 'blocked' ? (_jsx("p", { className: "dsh-wt-error", children: recoveryPreflight.preflight.message })) : null, recoveryProof ? (_jsxs(_Fragment, { children: [_jsxs("p", { className: "dsh-wt-code", children: [t("generation"), " ", recoveryProof.generation.slice(0, 12), " ", t("head"), " ", recoveryProof.localHeadOid.slice(0, 12), " \u00B7 ", recoveryProof.localHeadRef ?? 'detached HEAD'] }), _jsxs("ul", { className: "dsh-wt-test-list", "aria-label": t("preview.recovery.outcome"), children: [_jsxs("li", { children: [t("rollback"), recoveryProof.rollback.status === 'safe' ? t("verified.safe") : recoveryProof.rollback.message] }), _jsxs("li", { children: [t("commit.2"), recoveryProof.finalize.status === 'safe' ? t("verified.safe") : recoveryProof.finalize.message] })] }), recoveryProof.rollback.status === 'blocked' && recoveryProof.rollback.conflictingFiles?.length ? (_jsxs("p", { children: [t("rollback.conflicts"), recoveryProof.rollback.conflictingFiles.join('、')] })) : null, recoveryProof.finalize.status === 'blocked' && recoveryProof.finalize.conflictingFiles?.length ? (_jsxs("p", { children: [t("commit.conflicts"), recoveryProof.finalize.conflictingFiles.join('、')] })) : null, recoveryProof.blocker ? (_jsxs("button", { type: "button", className: "dsh-wt-inline-action", disabled: submitting !== null || !services, onClick: () => { void openHolder(); }, children: [t("open.the.worktree.holding.the.local.review.slot"), " "] })) : null, _jsxs("div", { className: "dsh-wt-recovery-actions", children: [_jsxs("button", { type: "button", className: "dsh-wt-inline-action", disabled: submitting !== null || !services, onClick: () => { void analyzeRecovery(); }, children: [t("ask.agent.for.read.only.analysis"), " "] }), _jsxs("button", { type: "button", className: "dsh-wt-inline-action", disabled: submitting !== null || !services, onClick: () => { void handoffRecovery(); }, children: [t("hand.off.to.a.new.worktree"), " "] })] })] })) : null] })) : null, runtimeConflict ? (_jsx("div", { className: "dsh-wt-recovery-actions", children: _jsxs("button", { type: "button", className: "dsh-wt-inline-action", disabled: submitting !== null || !services, onClick: recoverRuntimeConflict, children: [t("ask.agent.to.resolve.conflicts"), " "] }) })) : null, activeRecovery ? (_jsxs("div", { className: "dsh-wt-action-status", "data-recovery-status": activeRecovery.status, children: [activeRecovery.status === 'queued' ? t("recovery.request.queued.waiting.for.the.owner.session") : null, activeRecovery.status === 'sending' ? t("sending.the.recovery.request.through.the.official.harness") : null, activeRecovery.status === 'sent'
|
|
857
862
|
? activeRecovery.request.kind === 'worktree_apply_conflict'
|
|
858
|
-
?
|
|
859
|
-
:
|
|
860
|
-
: null, activeRecovery.status === 'cancelled' ?
|
|
863
|
+
? t("agent.will.resolve.the.conflicts.and.must.generate")
|
|
864
|
+
: t("agent.will.regenerate.the.review.in.read.only")
|
|
865
|
+
: null, activeRecovery.status === 'cancelled' ? t("session.checkout.changed.the.old.recovery.request.was") : null, activeRecovery.status === 'failed' ? (_jsxs(_Fragment, { children: [_jsxs("span", { children: [t("recovery.request.failed"), activeRecovery.error] }), _jsx("button", { type: "button", className: "dsh-wt-inline-action", disabled: submitting !== null, onClick: () => retryWorktreeRecovery(activeRecovery.request.sessionId), children: t("resend") })] })) : null] })) : null, target && (target.state === 'cleanup_pending' || terminal) ? _jsx(DeliveryProof, { target: target }) : null, _jsx("div", { className: "dsh-wt-action-status", "aria-live": "polite", children: submitting ? t("processing.worktree.please.wait") : message?.(t) }), error && !isStale(error) ? (_jsxs("div", { className: "dsh-wt-error", role: "alert", children: [t("error.detail", { message: error.message, category: t(`error.category.${worktreeConsoleErrorMeta(error.code).category}`), recovery: t(`error.recovery.${worktreeConsoleErrorMeta(error.code).recovery}`) }), " "] })) : null] }));
|
|
861
866
|
}
|
|
862
867
|
//# sourceMappingURL=ReviewActions.js.map
|