Repository navigation
feat(dsh): add one-click handoff from assistant replies - #2655
Conversation
6b2a054 to
ff111fc
Compare
61da783 to
1e29e40
Compare
| if (human) { | ||
| // Events are scanned newest first, so the oldest retained human input wins. | ||
| observe(event, label(`Human request or instruction: ${human}`, `用户请求或指令:${human}`)) | ||
| objective = human |
There was a problem hiding this comment.
[P2] Require manual input when the original objective is omitted
When the original human request exceeds the 8,000-byte reader limit and a later message says "Continue", the reader retains "Continue" as the objective and automatically prepares a handoff without the original goal. Track the earliest human message even when its text cannot be retained, and require manual input when that objective is unavailable.
| const pending = pendingManual ?? { requestId: id(), preflight, locale: selectedLocale, | ||
| input: workInput(objective, state, next, omissions, disposition as 'continuable' | 'blocked' | 'complete', selectedLocale) } | ||
| pendingPreparations.current.set(manualKey, pending) | ||
| acceptDelivery(await api.prepare(pending.preflight, pending.requestId, pending.input, delivery.delivery.deliveryId, signal, pending.locale)) |
There was a problem hiding this comment.
[P2] Unlock manual fields after a definite validation rejection
Submitting an objective longer than 8,192 characters receives a definite validation rejection, but the pending manual payload remains cached and disables every field, preventing correction and repeatedly submitting the same invalid input. Clear the pending payload after a definitive rejection while preserving request identity for uncertain outcomes.
hidb4ai
left a comment
There was a problem hiding this comment.
Re-reviewed 0637441 against d87c0e7. The previous recovery finding is fixed; no additional blocking regression introduced by this PR was confirmed.
Inherited validation issue: observeProject accepts only one exact Git “not a repository” stderr message. On Linux with Git 2.43.7, a non-Git workspace on a separate filesystem instead reports not a git repository (or any parent up to mount point /) followed by Stopping at filesystem boundary. The receiver then returns no environment for a valid non-Git workspace. The same two Claude receiver tests fail with both the head and the current base receiver/tests. Please handle normal non-repository variants while continuing to reject malformed Git metadata; this belongs to the base adapter change. Native macOS behavior was not revalidated in this run.
The recovery blocker is fixed at 0637441 and its reproduction passes. Superseded by review 5922502711; removing the outdated change request without approving the new interfaces.
Which issue or RFC does this PR close?
Refs #2514 and RFC #2528. This PR connects the DSH reply menu to the shared receipt and target adapters in #2651–#2654.
Rationale for this change
A user should be able to hand off a completed reply, review the prefilled instruction in the destination, and recover earlier deliveries if they change targets or restart DSH.
What changes are included in this PR?
26.1106.51428 (26605), embedded CLI0.167.0-alpha.4.1) and Claude Code CLI (2.1.323). Recheck the target, effective Server and Scope, and package access before launch. Use the local PowerContext installer only with consent; an already configured target does not need the installer. Claude Desktop Code remains available for installation checks.Are there any user-facing changes?
Supported local targets can be selected without enabling a feature flag. When preflight passes, the selected target opens a new session with an editable draft. The user sends it. Unsupported versions or unverified environments cannot launch. See the DSH guide for supported configurations.
How was this change tested?
pnpm test --maxWorkers=1(752),pnpm test:e2e(11 with a real local Server), andpnpm test:packagepassed.make checkandmake docs-testpassed.0.2.2-rc.3profile. The menu offered Codex and Claude CLI, and left Claude Desktop Code disabled. Selecting Codex passed live preflight, prepared delivery1497, and reached OS-accepted launch. The draft was not submitted in this check.5cd2) and Claude Code CLI (d093). The CLI native acceptance was reused. The isolated Claude Desktop receive result used a preflight fixture and does not qualify it for default launch. Clean first-install and authenticated receipt flows were not requalified in this check.AI usage statement
OpenAI Codex assisted with implementation, tests, local validation, and preparing this PR.