@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.
@@ -104,7 +104,9 @@ class AiSession {
104
104
  }
105
105
  } = {}) {
106
106
  if (!AiSession.#chat)
107
- throw new Error("Please initialize the AI session first");
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);
@@ -71,7 +71,9 @@ class AiSession {
71
71
  }
72
72
  } = {}) {
73
73
  if (!AiSession.#chat)
74
- throw new Error("Please initialize the AI session first");
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);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akanjs/devkit",
3
- "version": "0.0.123",
3
+ "version": "0.0.124",
4
4
  "sourceType": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"