Skip to content

Commit 2f5495d

Browse files
committed
feat: add response version pagination for regenerate. Persist regenerated outputs on each assistant message and add previous/next navigation so users can compare alternate regenerated responses in place.
1 parent 6fb52a4 commit 2f5495d

File tree

8 files changed

+294
-58
lines changed

8 files changed

+294
-58
lines changed

dist/components/Bot.d.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,23 @@ export type AgentFlowExecutedData = {
5959
previousNodeIds: string[];
6060
status?: ExecutionState;
6161
};
62+
export type MessageResponseVersion = {
63+
message?: string;
64+
messageId?: string;
65+
id?: string;
66+
sourceDocuments?: any;
67+
fileAnnotations?: any;
68+
agentReasoning?: IAgentReasoning[];
69+
agentFlowExecutedData?: any;
70+
usedTools?: any[];
71+
action?: IAction | null;
72+
artifacts?: Partial<FileUpload>[];
73+
thinking?: string;
74+
thinkingDuration?: number;
75+
isThinking?: boolean;
76+
rating?: FeedbackRatingType;
77+
dateTime?: string;
78+
};
6279
export type MessageType = {
6380
messageId?: string;
6481
message: string;
@@ -80,6 +97,8 @@ export type MessageType = {
8097
thinking?: string;
8198
thinkingDuration?: number;
8299
isThinking?: boolean;
100+
responseVersions?: MessageResponseVersion[];
101+
responseVersionIndex?: number;
83102
};
84103
type observerConfigType = (accessor: string | boolean | object | MessageType[]) => void;
85104
export type observersConfigType = Record<'observeUserInput' | 'observeLoading' | 'observeMessages', observerConfigType>;

dist/components/Bot.d.ts.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/components/bubbles/BotBubble.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ type Props = {
2222
handleActionClick: (elem: any, action: IAction | undefined | null) => void;
2323
handleSourceDocumentsClick: (src: any) => void;
2424
onRegenerateResponse?: () => void;
25+
showRegenerateResponseButton?: boolean;
2526
isTTSEnabled?: boolean;
2627
isTTSLoading?: Record<string, boolean>;
2728
isTTSPlaying?: Record<string, boolean>;

dist/components/bubbles/BotBubble.d.ts.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/web.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/web.umd.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)