fix enter-to-submit

This commit is contained in:
Nemo Godebski-Pedersen 2025-02-26 18:01:07 +00:00
parent 951aa989f9
commit b8894bb371
2 changed files with 4 additions and 4 deletions

View File

@ -96,7 +96,7 @@ export class OpeyController {
}
// wrangle our text stream into a langchain stream
// Transform our stream if needed, right now this is just a passthrough
const frontendStream: ReadableStream = stream.pipeThrough(frontendTransformer)
// If we need to split the stream into two, we can use the tee method as below

View File

@ -83,7 +83,7 @@ export default {
}
const decodedValue = decoder.decode(value);
console.log('Received:', decodedValue);
console.debug('Received:', decodedValue); //DEBUG
// Parse the SSE data format
const lines = decodedValue.split('\n');
@ -147,9 +147,9 @@ export default {
</div>
</el-main>
<el-footer>
<el-form :inline="true">
<el-form :inline="true" @submit.prevent>
<el-form-item label="Message">
<el-input v-model="input" placeholder="Type your message..." :disabled="status !== 'ready'" clearable />
<el-input v-model="input" placeholder="Type your message..." :disabled="status !== 'ready'" @keypress.enter="this.onSubmit" clearable />
</el-form-item>
<el-form-item>
<el-button type="primary" @click="this.onSubmit">Send</el-button>