@raisindb/client 0.5.9 → 0.5.11
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 +32 -0
- package/dist/{chunk-IFV4ECHC.mjs → chunk-ASOWGNQZ.mjs} +3 -3
- package/dist/{chunk-ZUUSBLVP.mjs → chunk-FYWYSNQG.mjs} +3 -3
- package/dist/{chunk-765DLJMZ.mjs → chunk-NOPZAMIV.mjs} +31 -2
- package/dist/chunk-NOPZAMIV.mjs.map +1 -0
- package/dist/{chunk-AULHRX5C.mjs → chunk-TPZNJNZR.mjs} +2 -2
- package/dist/{chunk-VMUT6PIO.mjs → chunk-ZCRYQCXS.mjs} +2 -2
- package/dist/{conversation-list-store-CHaqGtSi.d.mts → conversation-list-store-BNYosL8k.d.mts} +221 -3
- package/dist/{conversation-list-store-CHaqGtSi.d.ts → conversation-list-store-BNYosL8k.d.ts} +221 -3
- package/dist/{index-DiL2gplR.d.ts → index-GaJToZKx.d.ts} +1 -1
- package/dist/{index-AobOnS4A.d.mts → index-UlXuwMoL.d.mts} +1 -1
- package/dist/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +405 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +378 -10
- package/dist/index.mjs.map +1 -1
- package/dist/react.d.mts +2 -2
- package/dist/react.d.ts +2 -2
- package/dist/react.js +30 -1
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +3 -3
- package/dist/{svelte-sql-FQqis53r.d.ts → svelte-sql-bROcapdk.d.ts} +1 -1
- package/dist/{svelte-sql-BUrNcoHR.d.mts → svelte-sql-yLeGoj89.d.mts} +1 -1
- package/dist/svelte.d.mts +2 -2
- package/dist/svelte.d.ts +2 -2
- package/dist/svelte.js +30 -1
- package/dist/svelte.js.map +1 -1
- package/dist/svelte.mjs +3 -3
- package/dist/vue.d.mts +2 -2
- package/dist/vue.d.ts +2 -2
- package/dist/vue.js +30 -1
- package/dist/vue.js.map +1 -1
- package/dist/vue.mjs +2 -2
- package/package.json +1 -1
- package/dist/chunk-765DLJMZ.mjs.map +0 -1
- /package/dist/{chunk-IFV4ECHC.mjs.map → chunk-ASOWGNQZ.mjs.map} +0 -0
- /package/dist/{chunk-ZUUSBLVP.mjs.map → chunk-FYWYSNQG.mjs.map} +0 -0
- /package/dist/{chunk-AULHRX5C.mjs.map → chunk-TPZNJNZR.mjs.map} +0 -0
- /package/dist/{chunk-VMUT6PIO.mjs.map → chunk-ZCRYQCXS.mjs.map} +0 -0
package/dist/svelte.mjs
CHANGED
|
@@ -3,15 +3,15 @@ import {
|
|
|
3
3
|
createConversationAdapter,
|
|
4
4
|
createConversationListAdapter,
|
|
5
5
|
createFlowAdapter
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-FYWYSNQG.mjs";
|
|
7
|
+
import "./chunk-TPZNJNZR.mjs";
|
|
8
8
|
import {
|
|
9
9
|
createAuthAdapter,
|
|
10
10
|
createConnectionAdapter,
|
|
11
11
|
createSqlAdapter,
|
|
12
12
|
createSubscriptionAdapter
|
|
13
13
|
} from "./chunk-T2ZSNYFG.mjs";
|
|
14
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-NOPZAMIV.mjs";
|
|
15
15
|
export {
|
|
16
16
|
RAISIN_CONTEXT_KEY,
|
|
17
17
|
createAuthAdapter,
|
package/dist/vue.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { I as IdentityUser, C as ConnectionState, a as ConversationStoreSnapshot, b as ChatMessage, T as ToolCallInfo, P as PlanProjection, c as ConversationStore, d as ConversationListItem, e as ConversationListStore, R as RaisinClient, D as Database, S as SubscriptionFilters, E as EventMessage, f as ConversationStoreOptions, g as ConversationListStoreOptions } from './conversation-list-store-
|
|
2
|
-
import { S as SqlAdapterOptions } from './svelte-sql-
|
|
1
|
+
import { I as IdentityUser, C as ConnectionState, a as ConversationStoreSnapshot, b as ChatMessage, T as ToolCallInfo, P as PlanProjection, c as ConversationStore, d as ConversationListItem, e as ConversationListStore, R as RaisinClient, D as Database, S as SubscriptionFilters, E as EventMessage, f as ConversationStoreOptions, g as ConversationListStoreOptions } from './conversation-list-store-BNYosL8k.mjs';
|
|
2
|
+
import { S as SqlAdapterOptions } from './svelte-sql-yLeGoj89.mjs';
|
|
3
3
|
import 'events';
|
|
4
4
|
import 'fs/promises';
|
|
5
5
|
|
package/dist/vue.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { I as IdentityUser, C as ConnectionState, a as ConversationStoreSnapshot, b as ChatMessage, T as ToolCallInfo, P as PlanProjection, c as ConversationStore, d as ConversationListItem, e as ConversationListStore, R as RaisinClient, D as Database, S as SubscriptionFilters, E as EventMessage, f as ConversationStoreOptions, g as ConversationListStoreOptions } from './conversation-list-store-
|
|
2
|
-
import { S as SqlAdapterOptions } from './svelte-sql-
|
|
1
|
+
import { I as IdentityUser, C as ConnectionState, a as ConversationStoreSnapshot, b as ChatMessage, T as ToolCallInfo, P as PlanProjection, c as ConversationStore, d as ConversationListItem, e as ConversationListStore, R as RaisinClient, D as Database, S as SubscriptionFilters, E as EventMessage, f as ConversationStoreOptions, g as ConversationListStoreOptions } from './conversation-list-store-BNYosL8k.js';
|
|
2
|
+
import { S as SqlAdapterOptions } from './svelte-sql-bROcapdk.js';
|
|
3
3
|
import 'events';
|
|
4
4
|
import 'fs/promises';
|
|
5
5
|
|
package/dist/vue.js
CHANGED
|
@@ -601,6 +601,34 @@ var ConversationStore = class {
|
|
|
601
601
|
this._watchdogIntervalMs = options.watchdogIntervalMs ?? 3e4;
|
|
602
602
|
if (this._conversationPath) {
|
|
603
603
|
this.ensureSubscription();
|
|
604
|
+
} else if (this.createOptions?.anonymous) {
|
|
605
|
+
void this.resumeAnonymous();
|
|
606
|
+
}
|
|
607
|
+
}
|
|
608
|
+
anonymousOptions() {
|
|
609
|
+
const a = this.createOptions?.anonymous;
|
|
610
|
+
if (!a) return null;
|
|
611
|
+
return a === true ? {} : a;
|
|
612
|
+
}
|
|
613
|
+
/**
|
|
614
|
+
* Resume the visitor conversation this tab already has (the session secret
|
|
615
|
+
* and conversation id live in sessionStorage), and load its history. A tab
|
|
616
|
+
* without one starts nothing until the first message.
|
|
617
|
+
*/
|
|
618
|
+
async resumeAnonymous() {
|
|
619
|
+
const opts = this.anonymousOptions();
|
|
620
|
+
if (!opts || !this.createOptions || this._conversationPath) return;
|
|
621
|
+
const agent = this.createOptions.participant;
|
|
622
|
+
try {
|
|
623
|
+
if (!this.manager.hasStoredAnonymous(agent, opts)) return;
|
|
624
|
+
const convo = await this.manager.startAnonymous(agent, opts);
|
|
625
|
+
if (this._conversationPath) return;
|
|
626
|
+
this._conversationPath = convo.conversationPath;
|
|
627
|
+
this._conversationType = convo.type;
|
|
628
|
+
this.ensureSubscription();
|
|
629
|
+
await this.loadMessages();
|
|
630
|
+
} catch (err) {
|
|
631
|
+
logger.debug("[ConversationStore] No visitor conversation to resume", err);
|
|
604
632
|
}
|
|
605
633
|
}
|
|
606
634
|
// ==========================================================================
|
|
@@ -655,7 +683,8 @@ var ConversationStore = class {
|
|
|
655
683
|
throw new Error("No conversationPath and no createOptions provided");
|
|
656
684
|
}
|
|
657
685
|
try {
|
|
658
|
-
const
|
|
686
|
+
const anonymous = this.anonymousOptions();
|
|
687
|
+
const convo = anonymous ? await this.manager.startAnonymous(this.createOptions.participant, anonymous) : await this.manager.create({
|
|
659
688
|
participant: this.createOptions.participant,
|
|
660
689
|
input: this.createOptions.input
|
|
661
690
|
});
|