@akanjs/devkit 0.0.123 → 0.0.124
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/src/aiEditor.js +3 -1
- package/esm/src/aiEditor.js +3 -1
- package/package.json +1 -1
package/cjs/src/aiEditor.js
CHANGED
|
@@ -104,7 +104,9 @@ class AiSession {
|
|
|
104
104
|
}
|
|
105
105
|
} = {}) {
|
|
106
106
|
if (!AiSession.#chat)
|
|
107
|
-
|
|
107
|
+
await AiSession.init();
|
|
108
|
+
if (!AiSession.#chat)
|
|
109
|
+
throw new Error("Failed to initialize the AI session");
|
|
108
110
|
try {
|
|
109
111
|
const humanMessage = new import_messages.HumanMessage(question);
|
|
110
112
|
this.messageHistory.push(humanMessage);
|
package/esm/src/aiEditor.js
CHANGED
|
@@ -71,7 +71,9 @@ class AiSession {
|
|
|
71
71
|
}
|
|
72
72
|
} = {}) {
|
|
73
73
|
if (!AiSession.#chat)
|
|
74
|
-
|
|
74
|
+
await AiSession.init();
|
|
75
|
+
if (!AiSession.#chat)
|
|
76
|
+
throw new Error("Failed to initialize the AI session");
|
|
75
77
|
try {
|
|
76
78
|
const humanMessage = new HumanMessage(question);
|
|
77
79
|
this.messageHistory.push(humanMessage);
|