@alan-ai/alan-sdk-web 1.8.85 → 1.8.87
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/README.md +9 -28
- package/dist/alan_lib.js +28 -22
- package/dist/alan_lib.min.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,44 +1,25 @@
|
|
|
1
|
-
#
|
|
1
|
+
# The Self-Coding System for Your App — Alan AI SDK for Web
|
|
2
2
|
|
|
3
|
-
[Alan AI](https://alan.app/) • [Alan AI Studio](https://studio.alan.app/register) • [Docs](https://alan.app/docs) • [FAQ](https://alan.app/docs/usage/additional/faq) •
|
|
3
|
+
[Alan AI Platform](https://alan.app/) • [Alan AI Studio](https://studio.alan.app/register) • [Docs](https://alan.app/docs) • [FAQ](https://alan.app/docs/usage/additional/faq) •
|
|
4
4
|
[Blog](https://alan.app/blog/) • [Twitter](https://twitter.com/alanvoiceai)
|
|
5
5
|
|
|
6
6
|
[](https://www.npmjs.com/package/@alan-ai/alan-sdk-web)
|
|
7
7
|
[](https://github.com/alan-ai/alan-sdk-web/releases)
|
|
8
|
-
[](https://circleci.com/gh/alan-ai/alan-sdk-web)
|
|
9
8
|
|
|
10
9
|
|
|
11
|
-
|
|
10
|
+
## The Intelligent App Platform
|
|
12
11
|
|
|
13
|
-
|
|
12
|
+
Alan AI is transforming enterprise software with a new approach, **Application-Level AI**. Instead of relying on manual development or isolated AI tools, we embed an intelligent layer into your application that builds features on demand.
|
|
14
13
|
|
|
14
|
+
Powered by our proprietary **Three-Layer AI (3LAI)** architecture, our system generates both business logic and UI in real time—no developers needed. It works across your entire app stack: the user interface, business logic, and data management.
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
The **Intelligent App Platform** lets companies integrate AI-driven interfaces into their existing apps in days, not months.
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
It creates a safe and validated environment from your app’s APIs, GUIs, and documentation, enabling accurate, context-aware code generation. At runtime, the AI acts like a self-coding engine—instantly creating new features based on user needs.
|
|
19
19
|
|
|
20
|
-
Alan AI
|
|
21
|
-
|
|
22
|
-
#### Alan AI Studio
|
|
23
|
-
A powerful web-based IDE where you can write, test and debug dialog scenarios for your Generative AI Agent.
|
|
24
|
-
|
|
25
|
-
#### Alan AI SDKs
|
|
26
|
-
|
|
27
|
-
Alan AI's lightweight SDKs to quickly embed a Generative AI Agent to your app.
|
|
28
|
-
|
|
29
|
-
#### Alan AI Cloud
|
|
30
|
-
|
|
31
|
-
Alan AI's backend powered by the latest AI advancements - LLMs, generative AI and semantic search technologies. Alan AI provisions and handles the infrastructure required to maintain your Generative AI Agent and perform all the data processing tasks.
|
|
32
|
-
|
|
33
|
-
To get more details on how Alan AI works, see <a href="https://alan.app" target="_blank">Alan AI</a>.
|
|
34
|
-
|
|
35
|
-
## Why Alan AI?
|
|
36
|
-
|
|
37
|
-
* **No or minimum changes to your UI**: To create a conversational experience, you only need to get the Alan AI SDK and drop it to your app.
|
|
38
|
-
* **Serverless environment**: No need to plan for, deploy and maintain any infrastructure or speech components - Alan AI does the bulk of the work.
|
|
39
|
-
* **On-the-fly updates**: All changes to the dialogs become available immediately.
|
|
40
|
-
* **Dialog testing and analytics**: Alan AI Studio provides advanced tools for testing your dialog flows and getting the conversational analytics data on users' interactions, all in the same console.
|
|
20
|
+
With Alan AI, your software becomes truly adaptive—responding, evolving, and scaling automatically.
|
|
41
21
|
|
|
22
|
+
This repository contains the **Alan AI SDK for Web**, enabling you to embed Alan's intelligent layer into your Web applications.
|
|
42
23
|
|
|
43
24
|
## How to start
|
|
44
25
|
|
package/dist/alan_lib.js
CHANGED
|
@@ -90987,7 +90987,8 @@
|
|
|
90987
90987
|
return;
|
|
90988
90988
|
}
|
|
90989
90989
|
if (withSvg) {
|
|
90990
|
-
if (!responseWrapper.classList.contains(
|
|
90990
|
+
if (!responseWrapper.classList.contains(`with-svg-for-${iframeId}`)) {
|
|
90991
|
+
responseWrapper.classList.add(`with-svg-for-${iframeId}`);
|
|
90991
90992
|
responseWrapper.classList.add("with-svg");
|
|
90992
90993
|
iframeEl.style.width = "100%";
|
|
90993
90994
|
setTimeout(() => {
|
|
@@ -94594,10 +94595,13 @@ code.hljs {
|
|
|
94594
94595
|
return copyBtn;
|
|
94595
94596
|
return msg.type === "response" && isFinalMessage(msg) ? copyBtn : "";
|
|
94596
94597
|
}
|
|
94597
|
-
function changeMsgLikeStatus(msg) {
|
|
94598
|
+
function changeMsgLikeStatus(msg, options) {
|
|
94598
94599
|
const reqId = msg.ctx?.reqId || msg.reqId;
|
|
94599
94600
|
if (reqId) {
|
|
94600
94601
|
window.tutorProject.call("sendFeedback", { reqId, status: msg.liked });
|
|
94602
|
+
if (options.onEvent) {
|
|
94603
|
+
options.onEvent({ name: "feedbackSent", status: msg.liked, reqId });
|
|
94604
|
+
}
|
|
94601
94605
|
}
|
|
94602
94606
|
}
|
|
94603
94607
|
function resetStylesForLikeAndDislikeBtns(curMsgBubble, msg) {
|
|
@@ -95043,7 +95047,7 @@ code.hljs {
|
|
|
95043
95047
|
// alan_btn/alan_btn.ts
|
|
95044
95048
|
var import_sjcl = __toESM(require_sjcl());
|
|
95045
95049
|
(function(ns) {
|
|
95046
|
-
uiState.lib.version = "alan-version.1.8.
|
|
95050
|
+
uiState.lib.version = "alan-version.1.8.87".replace("alan-version.", "");
|
|
95047
95051
|
if (window.alanBtn) {
|
|
95048
95052
|
console.warn("Alan: the Alan Button source code has already added (v." + uiState.lib.version + ")");
|
|
95049
95053
|
}
|
|
@@ -96761,28 +96765,30 @@ code.hljs {
|
|
|
96761
96765
|
} else {
|
|
96762
96766
|
switchState(getDefaultBtnState());
|
|
96763
96767
|
}
|
|
96764
|
-
|
|
96765
|
-
|
|
96768
|
+
if (!isTutorMode()) {
|
|
96769
|
+
const { dialogId } = window.tutorProject.getSettings();
|
|
96770
|
+
console.info(`Alan: connected to ${dialogId !== getSavedDialogId() ? "new" : ""} dialog:
|
|
96766
96771
|
${dialogId}
|
|
96767
96772
|
${getSavedDialogId() || "-"} (prev. dialog)`);
|
|
96768
|
-
|
|
96769
|
-
|
|
96770
|
-
|
|
96771
|
-
|
|
96772
|
-
|
|
96773
|
-
|
|
96774
|
-
|
|
96775
|
-
|
|
96776
|
-
|
|
96777
|
-
|
|
96778
|
-
|
|
96779
|
-
|
|
96773
|
+
curDialogId = dialogId;
|
|
96774
|
+
sentMessages = restoreSentMessages();
|
|
96775
|
+
const prevUserId = getPrevUserId();
|
|
96776
|
+
if (getSavedDialogId() !== dialogId) {
|
|
96777
|
+
saveDialogId(dialogId);
|
|
96778
|
+
restoreMessagesInChat(true);
|
|
96779
|
+
onNewDialogAutoReconnect();
|
|
96780
|
+
} else {
|
|
96781
|
+
if (!(0, import_lodash2.isEmpty)(prevUserId) && (0, import_lodash2.isEmpty)(uiState.userInfo.userId)) {
|
|
96782
|
+
savePrevUserId(uiState.userInfo.userId);
|
|
96783
|
+
connectToNewDialog();
|
|
96784
|
+
return;
|
|
96785
|
+
}
|
|
96786
|
+
saveDialogId(dialogId);
|
|
96787
|
+
restoreMessagesInChat(true);
|
|
96780
96788
|
}
|
|
96781
|
-
|
|
96782
|
-
restoreMessagesInChat(true);
|
|
96783
|
-
}
|
|
96784
|
-
console.info(`Alan: curDialogId:
|
|
96789
|
+
console.info(`Alan: curDialogId:
|
|
96785
96790
|
${curDialogId}`);
|
|
96791
|
+
}
|
|
96786
96792
|
if (!isTutorMode()) {
|
|
96787
96793
|
sendSyncPageState();
|
|
96788
96794
|
}
|
|
@@ -97329,7 +97335,7 @@ ${curDialogId}`);
|
|
|
97329
97335
|
if (dislikeBtnEl) {
|
|
97330
97336
|
msg.liked = msg.liked !== -1 ? -1 : 0;
|
|
97331
97337
|
}
|
|
97332
|
-
changeMsgLikeStatus(msg);
|
|
97338
|
+
changeMsgLikeStatus(msg, options);
|
|
97333
97339
|
resetStylesForLikeAndDislikeBtns(curMsgBubble, msg);
|
|
97334
97340
|
saveMessageHistory();
|
|
97335
97341
|
}
|