@raisindb/client 0.5.8 → 0.5.10
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-BaeGM2lx.d.mts → conversation-list-store-CqgIk8Rn.d.mts} +915 -3
- package/dist/{conversation-list-store-BaeGM2lx.d.ts → conversation-list-store-CqgIk8Rn.d.ts} +915 -3
- package/dist/{index-C4pX6FVI.d.mts → index-BD3rutlF.d.mts} +1 -1
- package/dist/{index-DCtNAWZ0.d.ts → index-CDUAMIub.d.ts} +1 -1
- package/dist/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +934 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +902 -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-DN3NpM4c.d.ts → svelte-sql-D9YU1wYS.d.ts} +1 -1
- package/dist/{svelte-sql-BhMxrqn_.d.mts → svelte-sql-l1wmTWM4.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/react.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { F as FlowStatus, j as RaisinContextValue, i as RaisinProviderProps, g as RaisinReact, R as ReactLike, h as ReactLikeWithContext, k as UseAuthReturn, l as UseConnectionReturn, b as UseConversationListReturn, U as UseConversationReturn, d as UseFlowOptions, e as UseFlowReturn, m as UseSqlOptions, n as UseSqlReturn, o as UseSubscriptionOptions, f as createRaisinReact } from './index-
|
|
2
|
-
export { b as ChatMessage, d as ConversationListItem, h as ConversationListSnapshot, g as ConversationListStoreOptions, f as ConversationStoreOptions, a as ConversationStoreSnapshot, P as PlanProjection, k as PlanProjectionTask, T as ToolCallInfo } from './conversation-list-store-
|
|
1
|
+
export { F as FlowStatus, j as RaisinContextValue, i as RaisinProviderProps, g as RaisinReact, R as ReactLike, h as ReactLikeWithContext, k as UseAuthReturn, l as UseConnectionReturn, b as UseConversationListReturn, U as UseConversationReturn, d as UseFlowOptions, e as UseFlowReturn, m as UseSqlOptions, n as UseSqlReturn, o as UseSubscriptionOptions, f as createRaisinReact } from './index-BD3rutlF.mjs';
|
|
2
|
+
export { b as ChatMessage, d as ConversationListItem, h as ConversationListSnapshot, g as ConversationListStoreOptions, f as ConversationStoreOptions, a as ConversationStoreSnapshot, P as PlanProjection, k as PlanProjectionTask, T as ToolCallInfo } from './conversation-list-store-CqgIk8Rn.mjs';
|
|
3
3
|
import 'events';
|
|
4
4
|
import 'fs/promises';
|
package/dist/react.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { F as FlowStatus, j as RaisinContextValue, i as RaisinProviderProps, g as RaisinReact, R as ReactLike, h as ReactLikeWithContext, k as UseAuthReturn, l as UseConnectionReturn, b as UseConversationListReturn, U as UseConversationReturn, d as UseFlowOptions, e as UseFlowReturn, m as UseSqlOptions, n as UseSqlReturn, o as UseSubscriptionOptions, f as createRaisinReact } from './index-
|
|
2
|
-
export { b as ChatMessage, d as ConversationListItem, h as ConversationListSnapshot, g as ConversationListStoreOptions, f as ConversationStoreOptions, a as ConversationStoreSnapshot, P as PlanProjection, k as PlanProjectionTask, T as ToolCallInfo } from './conversation-list-store-
|
|
1
|
+
export { F as FlowStatus, j as RaisinContextValue, i as RaisinProviderProps, g as RaisinReact, R as ReactLike, h as ReactLikeWithContext, k as UseAuthReturn, l as UseConnectionReturn, b as UseConversationListReturn, U as UseConversationReturn, d as UseFlowOptions, e as UseFlowReturn, m as UseSqlOptions, n as UseSqlReturn, o as UseSubscriptionOptions, f as createRaisinReact } from './index-CDUAMIub.js';
|
|
2
|
+
export { b as ChatMessage, d as ConversationListItem, h as ConversationListSnapshot, g as ConversationListStoreOptions, f as ConversationStoreOptions, a as ConversationStoreSnapshot, P as PlanProjection, k as PlanProjectionTask, T as ToolCallInfo } from './conversation-list-store-CqgIk8Rn.js';
|
|
3
3
|
import 'events';
|
|
4
4
|
import 'fs/promises';
|
package/dist/react.js
CHANGED
|
@@ -628,6 +628,34 @@ var ConversationStore = class {
|
|
|
628
628
|
this._watchdogIntervalMs = options.watchdogIntervalMs ?? 3e4;
|
|
629
629
|
if (this._conversationPath) {
|
|
630
630
|
this.ensureSubscription();
|
|
631
|
+
} else if (this.createOptions?.anonymous) {
|
|
632
|
+
void this.resumeAnonymous();
|
|
633
|
+
}
|
|
634
|
+
}
|
|
635
|
+
anonymousOptions() {
|
|
636
|
+
const a = this.createOptions?.anonymous;
|
|
637
|
+
if (!a) return null;
|
|
638
|
+
return a === true ? {} : a;
|
|
639
|
+
}
|
|
640
|
+
/**
|
|
641
|
+
* Resume the visitor conversation this tab already has (the session secret
|
|
642
|
+
* and conversation id live in sessionStorage), and load its history. A tab
|
|
643
|
+
* without one starts nothing until the first message.
|
|
644
|
+
*/
|
|
645
|
+
async resumeAnonymous() {
|
|
646
|
+
const opts = this.anonymousOptions();
|
|
647
|
+
if (!opts || !this.createOptions || this._conversationPath) return;
|
|
648
|
+
const agent = this.createOptions.participant;
|
|
649
|
+
try {
|
|
650
|
+
if (!this.manager.hasStoredAnonymous(agent, opts)) return;
|
|
651
|
+
const convo = await this.manager.startAnonymous(agent, opts);
|
|
652
|
+
if (this._conversationPath) return;
|
|
653
|
+
this._conversationPath = convo.conversationPath;
|
|
654
|
+
this._conversationType = convo.type;
|
|
655
|
+
this.ensureSubscription();
|
|
656
|
+
await this.loadMessages();
|
|
657
|
+
} catch (err) {
|
|
658
|
+
logger.debug("[ConversationStore] No visitor conversation to resume", err);
|
|
631
659
|
}
|
|
632
660
|
}
|
|
633
661
|
// ==========================================================================
|
|
@@ -682,7 +710,8 @@ var ConversationStore = class {
|
|
|
682
710
|
throw new Error("No conversationPath and no createOptions provided");
|
|
683
711
|
}
|
|
684
712
|
try {
|
|
685
|
-
const
|
|
713
|
+
const anonymous = this.anonymousOptions();
|
|
714
|
+
const convo = anonymous ? await this.manager.startAnonymous(this.createOptions.participant, anonymous) : await this.manager.create({
|
|
686
715
|
participant: this.createOptions.participant,
|
|
687
716
|
input: this.createOptions.input
|
|
688
717
|
});
|