@xinghunm/ai-chat 1.4.3 → 1.5.0
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/dist/index.d.mts +9 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.js +507 -243
- package/dist/index.mjs +439 -175
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -144,7 +144,7 @@ interface PlanBooleanQuestion extends PlanQuestionBase {
|
|
|
144
144
|
* Supported question variants in a plan questionnaire.
|
|
145
145
|
*/
|
|
146
146
|
type PlanQuestion = PlanSingleSelectQuestion | PlanMultiSelectQuestion | PlanTextQuestion | PlanNumberQuestion | PlanBooleanQuestion;
|
|
147
|
-
type PlanQuestionnaireStatus = 'expired' | 'failed';
|
|
147
|
+
type PlanQuestionnaireStatus = 'expired' | 'failed' | 'submitted';
|
|
148
148
|
/**
|
|
149
149
|
* Merge behavior applied when a keyed structured block is patched repeatedly.
|
|
150
150
|
*/
|
|
@@ -177,6 +177,10 @@ interface PlanQuestionnaire {
|
|
|
177
177
|
answers?: Partial<Record<string, PlanQuestionnaireAnswerValue>>;
|
|
178
178
|
status?: PlanQuestionnaireStatus;
|
|
179
179
|
statusMessage?: string;
|
|
180
|
+
/**
|
|
181
|
+
* Timeout in seconds for the questionnaire interaction.
|
|
182
|
+
*/
|
|
183
|
+
timeoutSec?: number;
|
|
180
184
|
}
|
|
181
185
|
interface PlanQuestionSubmissionDetail {
|
|
182
186
|
questionId: string;
|
|
@@ -478,6 +482,7 @@ interface AiChatLabels {
|
|
|
478
482
|
questionnaireMultiSelectHint?: string;
|
|
479
483
|
questionnaireOtherOptionLabel?: string;
|
|
480
484
|
questionnaireOtherPlaceholder?: string;
|
|
485
|
+
questionnaireExpired?: string;
|
|
481
486
|
modelLoading?: string;
|
|
482
487
|
modelLoadFailed?: string;
|
|
483
488
|
modelUnavailable?: string;
|
|
@@ -487,6 +492,8 @@ interface AiChatLabels {
|
|
|
487
492
|
sessionHistoryLoading?: string;
|
|
488
493
|
sessionHistoryLoadFailed?: string;
|
|
489
494
|
sessionHistoryEmpty?: string;
|
|
495
|
+
questionnaireTitle?: string;
|
|
496
|
+
questionnaireConfirmInTime?: string;
|
|
490
497
|
}
|
|
491
498
|
/**
|
|
492
499
|
* State and actions exposed to custom new-chat trigger renderers.
|
|
@@ -739,6 +746,7 @@ interface ChatState {
|
|
|
739
746
|
sessionMessageLoadErrorBySession: Record<string, string | null>;
|
|
740
747
|
historyMessagePaginationBySession: Record<string, ChatHistoryMessagePaginationState>;
|
|
741
748
|
timelineAnchorStateBySession: Record<string, Record<string, ChatTimelineAnchorStateSnapshot>>;
|
|
749
|
+
newlyCreatedSessionIds: string[];
|
|
742
750
|
}
|
|
743
751
|
interface ChatHistoryMessagePaginationState {
|
|
744
752
|
previousCursor: string | null;
|
package/dist/index.d.ts
CHANGED
|
@@ -144,7 +144,7 @@ interface PlanBooleanQuestion extends PlanQuestionBase {
|
|
|
144
144
|
* Supported question variants in a plan questionnaire.
|
|
145
145
|
*/
|
|
146
146
|
type PlanQuestion = PlanSingleSelectQuestion | PlanMultiSelectQuestion | PlanTextQuestion | PlanNumberQuestion | PlanBooleanQuestion;
|
|
147
|
-
type PlanQuestionnaireStatus = 'expired' | 'failed';
|
|
147
|
+
type PlanQuestionnaireStatus = 'expired' | 'failed' | 'submitted';
|
|
148
148
|
/**
|
|
149
149
|
* Merge behavior applied when a keyed structured block is patched repeatedly.
|
|
150
150
|
*/
|
|
@@ -177,6 +177,10 @@ interface PlanQuestionnaire {
|
|
|
177
177
|
answers?: Partial<Record<string, PlanQuestionnaireAnswerValue>>;
|
|
178
178
|
status?: PlanQuestionnaireStatus;
|
|
179
179
|
statusMessage?: string;
|
|
180
|
+
/**
|
|
181
|
+
* Timeout in seconds for the questionnaire interaction.
|
|
182
|
+
*/
|
|
183
|
+
timeoutSec?: number;
|
|
180
184
|
}
|
|
181
185
|
interface PlanQuestionSubmissionDetail {
|
|
182
186
|
questionId: string;
|
|
@@ -478,6 +482,7 @@ interface AiChatLabels {
|
|
|
478
482
|
questionnaireMultiSelectHint?: string;
|
|
479
483
|
questionnaireOtherOptionLabel?: string;
|
|
480
484
|
questionnaireOtherPlaceholder?: string;
|
|
485
|
+
questionnaireExpired?: string;
|
|
481
486
|
modelLoading?: string;
|
|
482
487
|
modelLoadFailed?: string;
|
|
483
488
|
modelUnavailable?: string;
|
|
@@ -487,6 +492,8 @@ interface AiChatLabels {
|
|
|
487
492
|
sessionHistoryLoading?: string;
|
|
488
493
|
sessionHistoryLoadFailed?: string;
|
|
489
494
|
sessionHistoryEmpty?: string;
|
|
495
|
+
questionnaireTitle?: string;
|
|
496
|
+
questionnaireConfirmInTime?: string;
|
|
490
497
|
}
|
|
491
498
|
/**
|
|
492
499
|
* State and actions exposed to custom new-chat trigger renderers.
|
|
@@ -739,6 +746,7 @@ interface ChatState {
|
|
|
739
746
|
sessionMessageLoadErrorBySession: Record<string, string | null>;
|
|
740
747
|
historyMessagePaginationBySession: Record<string, ChatHistoryMessagePaginationState>;
|
|
741
748
|
timelineAnchorStateBySession: Record<string, Record<string, ChatTimelineAnchorStateSnapshot>>;
|
|
749
|
+
newlyCreatedSessionIds: string[];
|
|
742
750
|
}
|
|
743
751
|
interface ChatHistoryMessagePaginationState {
|
|
744
752
|
previousCursor: string | null;
|