fix(app): clear original prompt after retarget (#34863)
This commit is contained in:
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()
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue