ui: Allow rephrasing last prompt
This commit is contained in:
parent
622975b742
commit
aa1967f48a
1 changed files with 11 additions and 0 deletions
|
@ -666,6 +666,16 @@
|
|||
}
|
||||
}
|
||||
|
||||
const rephraseChat = (e) => {
|
||||
e.preventDefault();
|
||||
const _transcript = session.value.transcript;
|
||||
_transcript.pop();
|
||||
const _chatMsg = _transcript.pop();
|
||||
transcriptUpdate(_transcript);
|
||||
if (typeof (_chatMsg[1]) === 'string')
|
||||
message.value = _chatMsg[1];
|
||||
}
|
||||
|
||||
return html`
|
||||
<form onsubmit=${submit}>
|
||||
<div>
|
||||
|
@ -688,6 +698,7 @@
|
|||
<button onclick=${uploadImage}>Upload Image</button>
|
||||
<button onclick=${stop} disabled=${!generating.value}>Stop</button>
|
||||
<button onclick=${reset}>Reset</button>
|
||||
<button onclick=${rephraseChat}>Rephrase last message</button>
|
||||
</div>
|
||||
</form>
|
||||
`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue