@markprompt/web
Advanced tools
Comparing version 0.3.2-beta1 to 0.3.2-beta2
@@ -25,2 +25,3 @@ import { OpenAIModelId } from '@markprompt/core'; | ||
loading: boolean; | ||
shouldStopStreaming: boolean; | ||
answer: string; | ||
@@ -27,0 +28,0 @@ references: string[]; |
@@ -33,2 +33,3 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
this.loading = false; | ||
this.shouldStopStreaming = false; | ||
this.answer = ''; | ||
@@ -67,2 +68,3 @@ this.references = []; | ||
this.loading = false; | ||
this.shouldStopStreaming = true; | ||
} | ||
@@ -79,3 +81,7 @@ focus() { | ||
this.loading = true; | ||
this.shouldStopStreaming = false; | ||
await submitPrompt(this.prompt, this.projectKey, (chunk) => { | ||
if (this.shouldStopStreaming) { | ||
return; | ||
} | ||
this.answer += chunk; | ||
@@ -409,2 +415,5 @@ setTimeout(() => this.scrollToBottom(), 50); | ||
__decorate([ | ||
property({ type: Boolean, state: true }) | ||
], Markprompt.prototype, "shouldStopStreaming", void 0); | ||
__decorate([ | ||
property({ type: String, state: true }) | ||
@@ -411,0 +420,0 @@ ], Markprompt.prototype, "answer", void 0); |
{ | ||
"name": "@markprompt/web", | ||
"version": "0.3.2-beta1", | ||
"version": "0.3.2-beta2", | ||
"description": "A web component for adding GPT-4 powered search using the Markprompt API.", | ||
@@ -5,0 +5,0 @@ "author": "Motif", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
45119
1070
0