wrap code in progress, revert old message handling

This commit is contained in:
Daniel Avila 2023-02-25 09:06:26 -05:00
parent 0f6fcd5928
commit ed699d2c06
6 changed files with 121 additions and 1438 deletions

View file

@ -44,10 +44,13 @@ export default function handleSubmit({
let text = data.text || data.response;
if (data.message) {
messageHandler(text);
} else if (data.final) {
}
if (data.final) {
convoHandler(data);
console.log('final', data);
} else {
console.log('initial', data);
console.log('dataStream', data);
}
};

View file

@ -38,7 +38,7 @@ export const languages = [
export const wrapperRegex = {
codeRegex: /(```[\s\S]*?```)/g,
inLineRegex: /(`[^`]+?`)/g,
matchRegex: /(`[^`]+?`)/g,
markupRegex: /(`[^`]+?`)/g,
languageMatch: /^```(\w+)/,
newLineMatch: /^```(\n+)/
};