fix(app): clear original prompt after retarget (#34863)

This commit is contained in:
Brendan Allan
2026-07-02 06:24:53 +00:00
committed by GitHub
parent 403164a6ac
commit 40233595b0
2 changed files with 19 additions and 0 deletions
@@ -7,6 +7,7 @@ export function createPromptSubmissionState(input: {
prompt: Prompt
context: (ContextItem & { key: string })[]
}) {
const initial = input.target
let target = input.target
let cleared: Prompt | undefined
@@ -15,6 +16,7 @@ export function createPromptSubmissionState(input: {
context: input.context,
target: () => target,
clear() {
if (initial !== target) initial.reset()
target.reset()
cleared = target.current()
},