mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-05 07:52:03 +00:00
fix(app): fork should copy prompt into new session (#17375)
This commit is contained in:
parent
5aaf1ddfb7
commit
c4ccb50c37
3 changed files with 14 additions and 10 deletions
|
|
@ -1477,6 +1477,7 @@ export default function Page() {
|
|||
|
||||
const fork = (input: { sessionID: string; messageID: string }) => {
|
||||
const value = draft(input.messageID)
|
||||
const dir = base64Encode(sdk.directory)
|
||||
return sdk.client.session
|
||||
.fork(input)
|
||||
.then((result) => {
|
||||
|
|
@ -1488,10 +1489,8 @@ export default function Page() {
|
|||
})
|
||||
return
|
||||
}
|
||||
navigate(`/${base64Encode(sdk.directory)}/session/${next.id}`)
|
||||
requestAnimationFrame(() => {
|
||||
prompt.set(value)
|
||||
})
|
||||
prompt.set(value, undefined, { dir, id: next.id })
|
||||
navigate(`/${dir}/session/${next.id}`)
|
||||
})
|
||||
.catch(fail)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue