+
+ {parsed.content}
+
+
+
+ );
+ } catch {
+ return null; // Skip invalid JSON
+ }
+ })
+ ) : (
+ "Chat history will appear here..."
+ )}
+
+
+
+ {
+ this.editor.updateShape({
+ id: shape.id,
+ type: "Prompt",
+ props: { prompt: text.target.value },
+ })
+ }}
+ onKeyDown={(e) => {
+ if (e.key === 'Enter' && !e.shiftKey) {
+ e.preventDefault()
+ handlePrompt()
+ }
+ }}
+ />
+
+
+
+