raise-common-lib 0.0.263 → 0.0.265

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.
Files changed (81) hide show
  1. package/bundles/raise-common-lib.umd.js +16496 -82
  2. package/bundles/raise-common-lib.umd.js.map +1 -1
  3. package/bundles/raise-common-lib.umd.min.js +1 -1
  4. package/bundles/raise-common-lib.umd.min.js.map +1 -1
  5. package/esm2015/lib/dashboard/api.js +11 -1
  6. package/esm2015/lib/dashboard/chat-bot-drawer/ask-rai-quick-prompts.js +152 -0
  7. package/esm2015/lib/dashboard/chat-bot-drawer/chat-bot-best-practice-widget.service.js +1395 -0
  8. package/esm2015/lib/dashboard/chat-bot-drawer/chat-bot-data-privacy-dialog.component.js +129 -0
  9. package/esm2015/lib/dashboard/chat-bot-drawer/chat-bot-drawer.component.js +8732 -0
  10. package/esm2015/lib/dashboard/chat-bot-drawer/chat-bot-report-pack.constants.js +29 -0
  11. package/esm2015/lib/dashboard/chat-bot-drawer/chat-bot-session-rename-dialog.component.js +138 -0
  12. package/esm2015/lib/dashboard/chat-bot-drawer/chat-bot-sessions.service.js +438 -0
  13. package/esm2015/lib/dashboard/chat-bot-drawer/chat-bot-shell.service.js +491 -0
  14. package/esm2015/lib/dashboard/chat-bot-drawer/chat-bot-usage.service.js +439 -0
  15. package/esm2015/lib/dashboard/chat-bot-drawer/chat-bot-widget-embed.component.js +129 -0
  16. package/esm2015/lib/dashboard/chat-bot-drawer/constants.js +184 -0
  17. package/esm2015/lib/dashboard/chat-bot-drawer/generate-report-pack-headless.service.js +501 -0
  18. package/esm2015/lib/dashboard/chat-bot-drawer/list-unique.util.js +43 -0
  19. package/esm2015/lib/dashboard/chat-bot-drawer/read-result-cards.util.js +1404 -0
  20. package/esm2015/lib/dashboard/dashboard.service.js +132 -5
  21. package/esm2015/lib/raise-common-lib.module.js +17 -3
  22. package/esm2015/lib/service/InjectionToken.js +2 -1
  23. package/esm2015/public-api.js +6 -1
  24. package/esm2015/raise-common-lib.js +24 -18
  25. package/esm5/lib/dashboard/api.js +11 -1
  26. package/esm5/lib/dashboard/chat-bot-drawer/ask-rai-quick-prompts.js +152 -0
  27. package/esm5/lib/dashboard/chat-bot-drawer/chat-bot-best-practice-widget.service.js +1603 -0
  28. package/esm5/lib/dashboard/chat-bot-drawer/chat-bot-data-privacy-dialog.component.js +145 -0
  29. package/esm5/lib/dashboard/chat-bot-drawer/chat-bot-drawer.component.js +10277 -0
  30. package/esm5/lib/dashboard/chat-bot-drawer/chat-bot-report-pack.constants.js +29 -0
  31. package/esm5/lib/dashboard/chat-bot-drawer/chat-bot-session-rename-dialog.component.js +156 -0
  32. package/esm5/lib/dashboard/chat-bot-drawer/chat-bot-sessions.service.js +505 -0
  33. package/esm5/lib/dashboard/chat-bot-drawer/chat-bot-shell.service.js +574 -0
  34. package/esm5/lib/dashboard/chat-bot-drawer/chat-bot-usage.service.js +507 -0
  35. package/esm5/lib/dashboard/chat-bot-drawer/chat-bot-widget-embed.component.js +165 -0
  36. package/esm5/lib/dashboard/chat-bot-drawer/constants.js +184 -0
  37. package/esm5/lib/dashboard/chat-bot-drawer/generate-report-pack-headless.service.js +572 -0
  38. package/esm5/lib/dashboard/chat-bot-drawer/list-unique.util.js +43 -0
  39. package/esm5/lib/dashboard/chat-bot-drawer/read-result-cards.util.js +1404 -0
  40. package/esm5/lib/dashboard/dashboard.service.js +149 -5
  41. package/esm5/lib/raise-common-lib.module.js +17 -3
  42. package/esm5/lib/service/InjectionToken.js +2 -1
  43. package/esm5/public-api.js +6 -1
  44. package/esm5/raise-common-lib.js +24 -18
  45. package/fesm2015/raise-common-lib.js +14348 -65
  46. package/fesm2015/raise-common-lib.js.map +1 -1
  47. package/fesm5/raise-common-lib.js +16468 -67
  48. package/fesm5/raise-common-lib.js.map +1 -1
  49. package/lib/dashboard/api.d.ts +10 -0
  50. package/lib/dashboard/chat-bot-drawer/ask-rai-quick-prompts.d.ts +14 -0
  51. package/lib/dashboard/chat-bot-drawer/chat-bot-best-practice-widget.service.d.ts +64 -0
  52. package/lib/dashboard/chat-bot-drawer/chat-bot-data-privacy-dialog.component.d.ts +28 -0
  53. package/lib/dashboard/chat-bot-drawer/chat-bot-drawer.component.d.ts +564 -0
  54. package/lib/dashboard/chat-bot-drawer/chat-bot-report-pack.constants.d.ts +13 -0
  55. package/lib/dashboard/chat-bot-drawer/chat-bot-session-rename-dialog.component.d.ts +25 -0
  56. package/lib/dashboard/chat-bot-drawer/chat-bot-sessions.service.d.ts +21 -0
  57. package/lib/dashboard/chat-bot-drawer/chat-bot-shell.service.d.ts +55 -0
  58. package/lib/dashboard/chat-bot-drawer/chat-bot-usage.service.d.ts +57 -0
  59. package/lib/dashboard/chat-bot-drawer/chat-bot-widget-embed.component.d.ts +12 -0
  60. package/lib/dashboard/chat-bot-drawer/constants.d.ts +86 -0
  61. package/lib/dashboard/chat-bot-drawer/generate-report-pack-headless.service.d.ts +39 -0
  62. package/lib/dashboard/chat-bot-drawer/list-unique.util.d.ts +1 -0
  63. package/lib/dashboard/chat-bot-drawer/read-result-cards.util.d.ts +51 -0
  64. package/lib/dashboard/dashboard.service.d.ts +31 -1
  65. package/lib/service/InjectionToken.d.ts +1 -0
  66. package/package.json +1 -1
  67. package/public-api.d.ts +5 -0
  68. package/raise-common-lib.d.ts +22 -16
  69. package/raise-common-lib.metadata.json +1 -1
  70. package/src/assets/images/chat-bot/icon-answer-mode-chevron.svg +5 -0
  71. package/src/assets/images/chat-bot/icon-chat-plus.svg +9 -0
  72. package/src/assets/images/chat-bot/icon-check.svg +8 -0
  73. package/src/assets/images/chat-bot/icon-chevron-down.svg +8 -0
  74. package/src/assets/images/chat-bot/icon-close-line1.svg +5 -0
  75. package/src/assets/images/chat-bot/icon-close.svg +4 -0
  76. package/src/assets/images/chat-bot/icon-deep-thinking-default.svg +10 -0
  77. package/src/assets/images/chat-bot/icon-deep-thinking.svg +10 -0
  78. package/src/assets/images/chat-bot/icon-fast-answer.svg +6 -0
  79. package/src/assets/images/chat-bot/icon-floating-rai.png +0 -0
  80. package/src/assets/images/chat-bot/icon-plus-bg.svg +3 -0
  81. package/src/assets/images/chat-bot/star-chat-bot.svg +27 -0
@@ -17,5 +17,15 @@ export declare class ApiList {
17
17
  GetFinancialItems: string;
18
18
  GetFundListByInvestorId: string;
19
19
  GetAllInvestee: string;
20
+ GetAccountAdvancedSettings: string;
21
+ GetCustomReportByGroupId: string;
22
+ GetLatestReportPack: string;
23
+ GetReportPackTemplate: string;
24
+ ExportReportPack: string;
25
+ GetReportPackStatus: string;
26
+ GetAllReportsByGlId: string;
27
+ GLApis: {
28
+ GetGeneralLedgerById: string;
29
+ };
20
30
  };
21
31
  }
@@ -0,0 +1,14 @@
1
+ export interface RaiQuickPrompt {
2
+ label: string;
3
+ message: string;
4
+ }
5
+ export interface RaiSuggestedAction {
6
+ id: string;
7
+ text: string;
8
+ prompt: string;
9
+ }
10
+ export declare const RAI_DEFAULT_QUICK_PROMPTS: RaiQuickPrompt[];
11
+ export declare const RAI_EMBEDDED_WELCOME_TITLE = "Hi there! How can I assist you?";
12
+ export declare function getRaiDefaultQuickPrompts(): RaiQuickPrompt[];
13
+ export declare function mapAskRaiPropertyListToPrompts(res: any): RaiQuickPrompt[];
14
+ export declare function mapRaiQuickPromptsToSuggestedActions(prompts: RaiQuickPrompt[]): RaiSuggestedAction[];
@@ -0,0 +1,64 @@
1
+ import { ApiList } from "../api";
2
+ import { DashboardPorletsService } from "../dashboardPorlets.service";
3
+ export interface ChatBotWidgetRenderContext {
4
+ dashboard: any;
5
+ portlet: any;
6
+ portlets: any[];
7
+ }
8
+ export interface ChatBotRankListRow {
9
+ index: number;
10
+ value: string;
11
+ }
12
+ export interface ChatBotRankListResult {
13
+ title: string;
14
+ rows: ChatBotRankListRow[];
15
+ }
16
+ export declare class ChatBotBestPracticeWidgetService {
17
+ private api;
18
+ private http;
19
+ private pbf;
20
+ private libDashboardPorletsService;
21
+ private dashboardPorletsService;
22
+ constructor(api: ApiList, http: any, pbf: any, libDashboardPorletsService: DashboardPorletsService, hostPortletsService: any);
23
+ isInlineWidgetPreviewCard(card: any): boolean;
24
+ shouldStripGadgetNarrativeForCard(card: any): boolean;
25
+ private getCardActionName;
26
+ isRankDashboardWidgetCard(card: any): boolean;
27
+ isBestPracticeWidgetCard(card: any): boolean;
28
+ /** Server status line before inline widget [CARD] actions — hide from assistant bubble. */
29
+ isResolvedGadgetClientFetchChunk(text: string): boolean;
30
+ stripResolvedGadgetClientFetchNarrative(text: string): string;
31
+ loadFromActionCard(card: any): Promise<ChatBotWidgetRenderContext>;
32
+ loadRankListFromActionCard(card: any): Promise<ChatBotRankListResult>;
33
+ private fetchPortletRowsForCard;
34
+ private buildRankListRows;
35
+ private isPivotRankWidget;
36
+ private getPivotRowDimensionCols;
37
+ private getPivotColumnDimensionCols;
38
+ private resolvePivotMeasureCalMethod;
39
+ private pivotDimensionKey;
40
+ private isPivotLeafSourceRow;
41
+ private aggregatePivotMeasure;
42
+ /**
43
+ * Pivot rank: aggregate at the deepest row/column axis (leaf cells only).
44
+ * Subtotal and grand total rows are not in source data; grouping mirrors Syncfusion leaf values.
45
+ */
46
+ private buildPivotRankListRows;
47
+ private formatRankDisplayValue;
48
+ private extractRankParams;
49
+ private normalizeRankHint;
50
+ private resolveRankColumnName;
51
+ private compareRankRowValues;
52
+ private parseRankNumber;
53
+ private parseRankDate;
54
+ private buildPortletModel;
55
+ private buildDashboardModel;
56
+ private fetchSchema;
57
+ private fetchPortletData;
58
+ private normalizePortletRows;
59
+ /** Mirror pane-group `initCharData` for newcolumn / newline / newcolumnline embeds. */
60
+ private applyNewChartSeriesToPortlet;
61
+ private formatChartPeriod;
62
+ private compareChartPeriods;
63
+ private resolveChartThemeColor;
64
+ }
@@ -0,0 +1,28 @@
1
+ import { OnInit } from "@angular/core";
2
+ import { MatDialogRef } from "@angular/material/dialog";
3
+ export interface ChatBotDataPrivacyDialogData {
4
+ translation?: Record<string, string>;
5
+ dialogStyle?: {
6
+ width?: string;
7
+ height?: string;
8
+ };
9
+ }
10
+ export declare class ChatBotDataPrivacyDialogComponent implements OnInit {
11
+ data: ChatBotDataPrivacyDialogData;
12
+ dialogRef: MatDialogRef<ChatBotDataPrivacyDialogComponent>;
13
+ translation: Record<string, string>;
14
+ dialogStyle: {
15
+ width?: string;
16
+ height?: string;
17
+ };
18
+ constructor(data: ChatBotDataPrivacyDialogData, dialogRef: MatDialogRef<ChatBotDataPrivacyDialogComponent>);
19
+ ngOnInit(): void;
20
+ getDialogTitle(): string;
21
+ getIntroText(): string;
22
+ getOkLabel(): string;
23
+ getPrivacyPoints(): {
24
+ label: string;
25
+ body: string;
26
+ }[];
27
+ close(): void;
28
+ }
@@ -0,0 +1,564 @@
1
+ import { ChangeDetectorRef, ElementRef, EventEmitter, NgZone, Type, OnChanges, OnDestroy, OnInit, SimpleChanges } from "@angular/core";
2
+ import { DomSanitizer, SafeHtml } from "@angular/platform-browser";
3
+ import { Router } from "@angular/router";
4
+ import { MatDialog } from "@angular/material/dialog";
5
+ import { ApiList } from "../api";
6
+ import { ChatBotAccountingHost, ChatBotLayoutUtilsHost, ChatBotSession } from "./constants";
7
+ import { GenerateReportPackHeadlessService } from "./generate-report-pack-headless.service";
8
+ import { ChatBotSessionsService } from "./chat-bot-sessions.service";
9
+ import { ChatBotShellService } from "./chat-bot-shell.service";
10
+ import { DashboardService } from "../dashboard.service";
11
+ import { DashboardPorletsService } from "../dashboardPorlets.service";
12
+ import { ChatBotUsageService } from "./chat-bot-usage.service";
13
+ import { ReadResultGroup, ReadResultMetricItem } from "./read-result-cards.util";
14
+ import { ChatBotBestPracticeWidgetService } from "./chat-bot-best-practice-widget.service";
15
+ interface ChatSuggestionChip {
16
+ id?: string;
17
+ label: string;
18
+ message?: string;
19
+ category?: string;
20
+ }
21
+ interface ChatSuggestionMenu {
22
+ heading: string;
23
+ messageCode: string;
24
+ suggestions: ChatSuggestionChip[];
25
+ }
26
+ export declare class ChatBotDrawerComponent implements OnInit, OnChanges, OnDestroy {
27
+ private zone;
28
+ private cdr;
29
+ private sanitizer;
30
+ private router;
31
+ private pbf;
32
+ private api;
33
+ private http;
34
+ private accountingHost;
35
+ private libDashboardService;
36
+ private libDashboardPorletsService;
37
+ private dialog;
38
+ private layoutUtilsHost;
39
+ private generateReportPackDialog;
40
+ private generateReportPackHeadlessService;
41
+ private chatBotSessionsService;
42
+ private chatBotUsageService;
43
+ private chatBotBestPracticeWidgetService;
44
+ private chatBotShell;
45
+ visible: boolean;
46
+ translation: any;
47
+ initialSessions: ChatBotSession[];
48
+ sessionsReady: boolean;
49
+ agentVersion: string;
50
+ embeddedDesktop: boolean;
51
+ visibleChange: EventEmitter<boolean>;
52
+ readonly desktopRaiEmbeddedClass: boolean;
53
+ chatContentRef: ElementRef;
54
+ chatScrollAnchor: ElementRef;
55
+ sessionDropdownWrap: ElementRef;
56
+ answerModeWrap: ElementRef;
57
+ message: string;
58
+ raiSidebarCollapsed: boolean;
59
+ raiSidebarWidth: number;
60
+ private readonly raiSidebarWidthMin;
61
+ private readonly raiSidebarWidthMax;
62
+ private readonly raiSidebarWidthStorageKey;
63
+ raiSidebarResizeActive: boolean;
64
+ private raiSidebarResizeStartX;
65
+ private raiSidebarResizeStartWidth;
66
+ answerMode: "deep" | "fast";
67
+ showAnswerModePanel: boolean;
68
+ answerModeOptions: Array<{
69
+ id: "deep" | "fast";
70
+ label: string;
71
+ }>;
72
+ isExpanded: boolean;
73
+ isSending: boolean;
74
+ activeAnswer: any;
75
+ conversation: Array<{
76
+ type: number;
77
+ content: string;
78
+ htmlContent?: SafeHtml;
79
+ kind?: "user" | "assistant" | "status" | "tool" | "error" | "action-card" | "process-log" | "dashboard-nav-prompt" | "dashboard-refresh-prompt" | "metrics-result" | "read-result" | "widget-preview" | "rank-widget-list";
80
+ widgetPreview?: {
81
+ status: "loading" | "ready" | "error";
82
+ title: string;
83
+ error?: string;
84
+ context?: any;
85
+ };
86
+ rankWidgetList?: {
87
+ status: "loading" | "ready" | "error";
88
+ title: string;
89
+ error?: string;
90
+ rows?: Array<{
91
+ index: number;
92
+ value: string;
93
+ }>;
94
+ };
95
+ processHeader?: string;
96
+ processSteps?: string[];
97
+ suggestions?: ChatSuggestionChip[];
98
+ suggestionHeading?: string;
99
+ suggestionMessageCode?: string;
100
+ suggestionBackLabel?: string;
101
+ suggestionGlobalMenu?: ChatSuggestionMenu | null;
102
+ isDashboardListPlain?: boolean;
103
+ usage?: {
104
+ input: number;
105
+ output: number;
106
+ total: number;
107
+ };
108
+ actionCard?: any;
109
+ actionCardParams?: Array<{
110
+ label: string;
111
+ value: string;
112
+ }>;
113
+ actionStatus?: "pending" | "running" | "success" | "error";
114
+ actionMessage?: string;
115
+ dashboardNavPrompt?: {
116
+ dashboardId?: string;
117
+ dashboardName: string;
118
+ dashboardGroupId?: string;
119
+ dashboardGroupName?: string;
120
+ RegionDataSetId?: string;
121
+ status?: "pending" | "dismissed" | "accepted";
122
+ };
123
+ dashboardRefreshPrompt?: {
124
+ dashboardId?: string;
125
+ dashboardName: string;
126
+ refreshUrl: string;
127
+ refreshScope?: "dashboard" | "dashboardList";
128
+ status?: "pending" | "dismissed" | "accepted";
129
+ };
130
+ metricsResult?: {
131
+ entityLabel: string;
132
+ metricLabel: string;
133
+ metricCode: string;
134
+ dataPointLabel?: string;
135
+ asOfDate: string;
136
+ currency: string;
137
+ matchedTables: number;
138
+ totalTables: number;
139
+ primaryValue: string;
140
+ primaryValueSuffix: string;
141
+ rows: Array<{
142
+ tableName: string;
143
+ value: string;
144
+ }>;
145
+ valuesDiffer?: boolean;
146
+ };
147
+ readResultGroups?: ReadResultGroup[];
148
+ readResultSourcesExpanded?: {
149
+ [groupIndex: number]: boolean;
150
+ };
151
+ }>;
152
+ history: Array<{
153
+ role: string;
154
+ content: string;
155
+ }>;
156
+ pendingCard: any;
157
+ sessionTokens: {
158
+ input: number;
159
+ output: number;
160
+ total: number;
161
+ };
162
+ sessionTokensDisplayText: string;
163
+ sessionId: string;
164
+ isNewChatPending: boolean;
165
+ showSessionPanel: boolean;
166
+ openSessionMenuId: string;
167
+ sessionMenuPlacement: "above" | "below";
168
+ private sessionMenuAnchorEl;
169
+ private sessionListScrollUnlisten;
170
+ private readonly sessionRowMenuEstimatedHeight;
171
+ private _sessionSearchQuery;
172
+ sessionHistoryGroups: Array<{
173
+ type: "section" | "group" | "item";
174
+ label?: string;
175
+ session?: ChatBotSession;
176
+ }>;
177
+ hasVisibleSessionItems: boolean;
178
+ welcomeMessage: string;
179
+ suggestedActions: Array<{
180
+ id?: string;
181
+ text: string;
182
+ prompt?: string;
183
+ }>;
184
+ isLoadingSuggestedActions: boolean;
185
+ private _sessionList;
186
+ private shellSyncSub;
187
+ private readonly chatInstanceId;
188
+ private lastAppliedConversationRevision;
189
+ private suppressConversationPublish;
190
+ private historyLoaded;
191
+ private chatBootstrapped;
192
+ private readonly apiBase;
193
+ private readonly webSocketBase;
194
+ private readonly webSocketBaseUat;
195
+ private readonly webSocketBaseStg;
196
+ private readonly apiKey;
197
+ private readonly pendingActionReg;
198
+ private streamSocket;
199
+ private streamTimersCancelled;
200
+ private markedConfigured;
201
+ private processLogEntry;
202
+ private directGenerateReportPackContext;
203
+ private reportPackStatusTimer;
204
+ private reportPackLoadingRef;
205
+ private directReportPackJob;
206
+ private directReportPackProgressDialogRef;
207
+ constructor(zone: NgZone, cdr: ChangeDetectorRef, sanitizer: DomSanitizer, router: Router, pbf: any, api: ApiList, http: any, accountingHost: ChatBotAccountingHost, libDashboardService: DashboardService, libDashboardPorletsService: DashboardPorletsService, hostDashboardService: any, hostPortletsService: any, dialog: MatDialog, layoutUtilsHost: ChatBotLayoutUtilsHost, generateReportPackDialog: Type<any>, generateReportPackHeadlessService: GenerateReportPackHeadlessService, chatBotSessionsService: ChatBotSessionsService, chatBotUsageService: ChatBotUsageService, chatBotBestPracticeWidgetService: ChatBotBestPracticeWidgetService, chatBotShell: ChatBotShellService);
208
+ private dashboardService;
209
+ private dashboardPorletsService;
210
+ sessionSearchQuery: string;
211
+ sessionList: ChatBotSession[];
212
+ ngOnInit(): void;
213
+ ngOnDestroy(): void;
214
+ ngOnChanges(changes: SimpleChanges): void;
215
+ private applyPendingChatComposer;
216
+ private applyInitialSessions;
217
+ closeDrawer(): void;
218
+ toggleExpand(): void;
219
+ showNewChatWelcome(): boolean;
220
+ parseSuggestionCard(text: string): {
221
+ title: string;
222
+ description: string;
223
+ };
224
+ getEmbeddedWelcomeTitle(): string;
225
+ getComposerPlaceholder(): string;
226
+ onSuggestionClick(action: {
227
+ text: string;
228
+ prompt?: string;
229
+ }): void;
230
+ onInlineSuggestionClick(suggestion: {
231
+ label: string;
232
+ message?: string;
233
+ }): void;
234
+ onSuggestionBackClick(content: any): void;
235
+ shouldShowInlineSuggestions(content: any): boolean;
236
+ isProcessHeaderShimmer(content: any): boolean;
237
+ private getDefaultSuggestedActions;
238
+ private resetWelcomeSuggestionsToDefault;
239
+ private fetchAskRaiQuickPromptsFromApi;
240
+ private loadSuggestedActions;
241
+ /**
242
+ * Backend integration point for new-chat welcome content.
243
+ * Expected: GET /ai/api/fas-dashboard/suggested-actions?accountId=...
244
+ * Response: { welcomeMessage?: string, actions?: Array<{ id?, text, prompt? }> }
245
+ */
246
+ private fetchSuggestedActionsFromApi;
247
+ onKeydown(event: KeyboardEvent): void;
248
+ sendMessage(): Promise<void>;
249
+ createNewChat(): void;
250
+ selectSession(sessionId: string, fromRemoteSync?: boolean): Promise<void>;
251
+ toggleSessionMenu(sessionId: string, event?: Event): void;
252
+ closeSessionMenu(): void;
253
+ private bindSessionListScrollListener;
254
+ private unbindSessionListScrollListener;
255
+ private updateSessionMenuPlacement;
256
+ onWindowResize(): void;
257
+ isSessionPinned(session: ChatBotSession): boolean;
258
+ onSessionMenuPin(session: ChatBotSession, event?: Event): Promise<void>;
259
+ private beginChatSessionActionLoading;
260
+ private endChatSessionActionLoading;
261
+ onSessionMenuRename(session: ChatBotSession, event?: Event): void;
262
+ openSessionRenameDialog(session: ChatBotSession): void;
263
+ onSessionMenuDelete(session: ChatBotSession, event?: Event): void;
264
+ confirmDeleteChatSession(session: ChatBotSession): void;
265
+ deleteSession(sessionId: string, event?: Event): Promise<boolean>;
266
+ toggleRaiSidebar(): void;
267
+ private restoreRaiSidebarWidth;
268
+ private clampRaiSidebarWidth;
269
+ private persistRaiSidebarWidth;
270
+ onRaiSidebarResizeStart(event: PointerEvent): void;
271
+ onRaiSidebarResizeMove(event: PointerEvent): void;
272
+ onRaiSidebarResizeEnd(event?: PointerEvent): void;
273
+ toggleSessionPanel(): void;
274
+ toggleAnswerModePanel(): void;
275
+ selectAnswerMode(mode: "deep" | "fast"): void;
276
+ onDocumentClick(event: MouseEvent): void;
277
+ onSessionSearchInput(): void;
278
+ private refreshSessionHistoryGroups;
279
+ private syncSessionListFromShell;
280
+ private areSessionListsEqual;
281
+ private mergeSessionLists;
282
+ isSessionActive(session: {
283
+ id: string;
284
+ }): boolean;
285
+ private getSessionDateGroupLabel;
286
+ private parseSessionDate;
287
+ private formatSessionGroupDate;
288
+ private isPinnedSession;
289
+ getSessionTitle(session: any): string;
290
+ getCurrentSessionTitle(): string;
291
+ private resolveSessionMetaForTitle;
292
+ private getSessionTitleFromConversation;
293
+ private ensureSessionMetaInList;
294
+ getChatBotDisclaimerText(): string;
295
+ getChatBotDataPrivacyLabel(): string;
296
+ openChatBotDataPrivacy(): void;
297
+ private setVisible;
298
+ private buildHeaders;
299
+ /**
300
+ * Headers for chat-initiation calls that write the usage ledger
301
+ * (POST /generate). Do not use for sessions/history/usage/command/execute.
302
+ */
303
+ private buildChatInitHeaders;
304
+ private applyChatLedgerFields;
305
+ private getChatUserName;
306
+ private getPageContext;
307
+ private buildGeneratePayload;
308
+ /** Prior user/assistant turns for multi-turn WS (excludes current message). */
309
+ private buildConversationHistoryForPayload;
310
+ private parseWebSocketResponse;
311
+ private buildWebSocketUrl;
312
+ private buildApiQueryString;
313
+ private isLocalDevHost;
314
+ private updateTokenDisplay;
315
+ private applyTokenUsageToFooter;
316
+ private refreshUsageActivityFromApi;
317
+ private normalizeUsage;
318
+ private getAccessToken;
319
+ private getAccountId;
320
+ private getTargetEnv;
321
+ private getLanguage;
322
+ private abortPendingRequest;
323
+ private initializeChat;
324
+ private loadSessions;
325
+ private loadChatHistory;
326
+ private loadSessionMessages;
327
+ private refreshSessionsAfterMessage;
328
+ private syncSessionFromHistoryResult;
329
+ private pickActiveSessionFromHistoryResult;
330
+ private sessionSortTime;
331
+ private findLatestSessionAmong;
332
+ private findLatestSession;
333
+ private applyServerSessionId;
334
+ private applySessionFromStreamText;
335
+ private applySessionFromStreamPayload;
336
+ private buildHistoryUrl;
337
+ private applyHistoryResult;
338
+ private resetConversation;
339
+ private applySessionTokenFields;
340
+ private appendHistoryMessages;
341
+ private pushUserHistoryItem;
342
+ private pushAssistantHistoryItem;
343
+ private pushAssistantHistoryFromApiMessage;
344
+ private normalizeHistoryActionCards;
345
+ private extractActionCardsFromAssistantContent;
346
+ private tryParseActionCardJson;
347
+ private replayHistoryActionCard;
348
+ private findLatestAssistantForRank;
349
+ private flushView;
350
+ private scheduleScrollChatAfterUpdate;
351
+ private publishConversationSync;
352
+ private serializeConversationForSync;
353
+ private alignFloatingDrawerWithInlineSession;
354
+ private publishActiveSessionToShell;
355
+ private syncNavigationFromShell;
356
+ private applyRemoteNewChatFromShell;
357
+ private applyConversationSyncFromShell;
358
+ private isSameSessionContext;
359
+ private cloneSyncConversation;
360
+ private rehydrateSyncedConversationHtml;
361
+ private isUnusedActionCard;
362
+ private pinUnusedActionCardsToBottom;
363
+ private pendingSuggestionsToReveal;
364
+ private suggestionsRevealTimer;
365
+ private removeActionCard;
366
+ private hasUnresolvedActionCard;
367
+ /** Wait for post-action status/prompt rows, then pin suggestions at the bottom. */
368
+ private scheduleRevealSuggestionsAtBottom;
369
+ private revealPendingSuggestionsAtBottom;
370
+ resolvePendingAction(content: string): {
371
+ before: string;
372
+ action: string;
373
+ after: string;
374
+ } | null;
375
+ onPendingActionClick(contentItem: any, actionLabel: string): Promise<void>;
376
+ onCancelActionCard(contentItem: any): void;
377
+ onDashboardRefreshPromptResponse(contentItem: any, shouldRefresh: boolean): void;
378
+ onDashboardNavPromptResponse(contentItem: any, openDashboard: boolean): void;
379
+ private ensureFloatingDrawerForNavigation;
380
+ private openDashboardDetail;
381
+ getDashboardRefreshPromptIntro(): string;
382
+ isDashboardListRefreshPrompt(contentItem: any): boolean;
383
+ getDashboardRefreshPromptIntroFor(contentItem: any): string;
384
+ getDashboardRefreshPromptMessage(contentItem: any): string;
385
+ getDashboardRefreshPromptConfirmLabel(contentItem: any): string;
386
+ getDashboardNavPromptIntro(): string;
387
+ getDashboardNavPromptMessage(contentItem: any): string;
388
+ isDashboardRefreshPromptPending(contentItem: any): boolean;
389
+ isDashboardNavPromptPending(contentItem: any): boolean;
390
+ getActionCardIntro(actionCard: any): string;
391
+ getActionCardTitle(actionCard: any): string;
392
+ formatActionCardFieldValue(value: string): string;
393
+ getActionCardParams(actionCard: any): Array<{
394
+ label: string;
395
+ value: string;
396
+ }>;
397
+ trackActionCardParam(index: number, param: {
398
+ label: string;
399
+ value: string;
400
+ }): string;
401
+ getActionConfirmLabel(contentItem: any): string;
402
+ private scrollChatAfterUpdate;
403
+ private findLastUserMessageIndex;
404
+ private scrollChatToLatestTurn;
405
+ private scrollChatToBottom;
406
+ private isDashboardCreationAction;
407
+ private extractDashboardNavInfo;
408
+ private collectDashboardNavSources;
409
+ private mergeDashboardNavInfo;
410
+ private isClientTriggerDownloadDashboard;
411
+ private isClientTriggerDownloadWidget;
412
+ private isClientTriggerGenerateReportPack;
413
+ private isClientTriggerOpenReportPack;
414
+ private resolveGenerateReportPackParams;
415
+ private fetchGeneralLedgerById;
416
+ private triggerOpenGenerateReportPack;
417
+ private triggerGenerateReportPackDirect;
418
+ private startDirectGenerateReportPackPolling;
419
+ private showDirectGenerateReportPackLoadingNotification;
420
+ private openDirectGenerateReportPackProgressDialog;
421
+ private openDirectGenerateReportPackResultDialog;
422
+ private pollDirectGenerateReportPackStatus;
423
+ private isClientTriggerOpenAccountingReport;
424
+ private resolveOpenAccountingReportParams;
425
+ private normalizeTaxReportVendorDisplayCode;
426
+ private isTaxReportType;
427
+ private parseOpenAccountingReportDate;
428
+ private applyOpenAccountingReportCardParamsToRowData;
429
+ private fetchAllReportsByGlId;
430
+ private triggerOpenAccountingReport;
431
+ private isOnMatchingGlDetail;
432
+ private adaptDownloadDashboardCard;
433
+ private adaptDownloadWidgetCard;
434
+ private resolveDownloadWidgetParamsFromActionCard;
435
+ private triggerOpenDashboardAndDownloadWidget;
436
+ private triggerOpenDashboardAndDownload;
437
+ private resolveDashboardIdFromActionCard;
438
+ private maybeTriggerClientDownload;
439
+ private maybePushPostActionUiPrompt;
440
+ private maybeJumpToDashboardAfterAction;
441
+ private shouldPushDashboardListRefreshPrompt;
442
+ private isDeleteDashboardAction;
443
+ /**
444
+ * Close dashboard detail tabs that are still open for the deleted dashboard.
445
+ * TabCache index matches MultiTabComponent.tabList, which closeTab uses.
446
+ */
447
+ private closeDeletedDashboardTabs;
448
+ private normalizeTabUrl;
449
+ private isOnDashboardListNewPage;
450
+ private pushDashboardListRefreshPrompt;
451
+ private getDeletedDashboardNameFromCard;
452
+ private getDashboardNameFromDeleteFields;
453
+ private cardHasUiFlag;
454
+ private getCurrentRouterUrl;
455
+ /** Same dashboard id resolution as pane-group-new getRouterUrl(). */
456
+ private getCurrentOpenDashboardId;
457
+ private isOnMatchingDashboardDetail;
458
+ private maybePushDashboardRefreshOrNavPrompt;
459
+ private getDashboardNameFromCard;
460
+ private pushDashboardNavPromptCard;
461
+ private maybePushDashboardNavPrompt;
462
+ private copyTextToClipboard;
463
+ private extractGuidFromText;
464
+ private stripWrappingQuotes;
465
+ private extractActionErrorMessage;
466
+ private buildCommandExecutePayload;
467
+ private withAccountIdBody;
468
+ private safeReadJson;
469
+ private pushSystemMessage;
470
+ private enqueueRankWidgetList;
471
+ private enqueueBestPracticeWidgetPreview;
472
+ private displayCard;
473
+ /** Suggestions follow the latest confirmation card of this turn. */
474
+ private takeSuggestionsForNewActionCard;
475
+ private findActionCardForAnswer;
476
+ private setAssistantContent;
477
+ /**
478
+ * Detect FormatDashboardNamesGroupedList output.
479
+ * Tolerant of collapsed text (missing newlines) from line-framed WS chunks.
480
+ */
481
+ private isDashboardGroupedList;
482
+ /**
483
+ * If WS framing dropped newlines, rebuild list structure before render.
484
+ */
485
+ private restoreDashboardListNewlines;
486
+ /** 纯文本渲染:不经过 marked,保留换行与缩进 */
487
+ private renderPlainAssistantText;
488
+ /**
489
+ * 统一 assistant 气泡 HTML:
490
+ * - dashboard 分组列表 → 纯文本
491
+ * - 其余 → marked
492
+ */
493
+ private renderAssistantBubbleHtml;
494
+ private renderMarkdown;
495
+ /** WS line framing can collapse adjacent table rows onto one line. */
496
+ private restoreMarkdownTableStructure;
497
+ private isMarkdownTableLine;
498
+ private isMarkdownTableSeparatorLine;
499
+ private isMarkdownTableBlock;
500
+ private splitMarkdownTableBlocks;
501
+ private parseMarkdownTableRow;
502
+ private renderMarkdownTableCellInline;
503
+ /** `**bold**` / `*italic*` after HTML escape (TS 3.5-safe). */
504
+ private applyInlineMarkdownEmphasis;
505
+ private renderPlainMarkdownText;
506
+ private renderMarkdownTableBlock;
507
+ private renderMarkdownSegment;
508
+ private escapeHtml;
509
+ /** Remove only fenced/inline JSON that carries a confirmable "action" payload. */
510
+ private stripActionJsonFences;
511
+ private sanitizeAssistantText;
512
+ private tryApplySuggestionsJson;
513
+ private findBalancedJsonObject;
514
+ private getPayloadStarters;
515
+ private pickSuggestionsPayload;
516
+ private extractEmbeddedSuggestions;
517
+ private isSuggestionsPayload;
518
+ private stripSuggestionMarkersFromText;
519
+ private applyStreamSuggestions;
520
+ /**
521
+ * Post-capability menus use message (fallback title) as the prompt.
522
+ * nextWithBack keeps follow-up chips plus Back, which opens that menu.
523
+ */
524
+ private buildSuggestionState;
525
+ private buildSuggestionMenu;
526
+ private readSuggestionHeading;
527
+ private readSuggestionField;
528
+ private normalizeSuggestionChips;
529
+ private detachSuggestionState;
530
+ private applySuggestionState;
531
+ private clearSuggestionState;
532
+ private clearInlineSuggestionsExcept;
533
+ private retainLatestSuggestionsOnly;
534
+ private isGetMetricsAction;
535
+ private tryPushGetMetricsResultMessage;
536
+ private resolveGetMetricsEntityDisplayName;
537
+ private resolveGetMetricsDataPointLabel;
538
+ private pickGetMetricsDataPointFromCard;
539
+ private isGetMetricsEntityFieldLabel;
540
+ private humanizeGetMetricsCode;
541
+ private tryConsumeGetMetricsStreamLine;
542
+ private applyReadResultGroupsToAnswer;
543
+ readResultSourceCollapseAfter: number;
544
+ formatReadResultPrimary(value: string, unit: string): string;
545
+ formatReadResultAsOf(asOf: string): string;
546
+ getReadResultSubtitle(group: ReadResultGroup): string;
547
+ getReadResultChips(group: ReadResultGroup): {
548
+ label: string;
549
+ message: string;
550
+ }[];
551
+ getReadResultSourceKind(item: ReadResultMetricItem): string;
552
+ isReadResultSourceRowHidden(content: any, groupIndex: number, sourceIndex: number): boolean;
553
+ isReadResultSourcesExpanded(content: any, groupIndex: number): boolean;
554
+ toggleReadResultSources(content: any, groupIndex: number): void;
555
+ getReadResultSourceToggleLabel(content: any, group: ReadResultGroup, groupIndex: number): string;
556
+ shouldShowReadResultSourceToggle(group: ReadResultGroup): boolean;
557
+ onReadResultChipClick(chip: {
558
+ message?: string;
559
+ }): void;
560
+ trackReadResultGroup(index: number): number;
561
+ trackReadResultSource(index: number): number;
562
+ trackReadResultChip(index: number): number;
563
+ }
564
+ export {};