@sinequa/agent 4.0.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/README.md +63 -0
- package/css/utilities.css +4 -0
- package/fesm2022/sinequa-agent.mjs +10795 -0
- package/fesm2022/sinequa-agent.mjs.map +1 -0
- package/index.d.ts +2929 -0
- package/package.json +27 -0
package/index.d.ts
ADDED
|
@@ -0,0 +1,2929 @@
|
|
|
1
|
+
import * as rxjs from 'rxjs';
|
|
2
|
+
import { Subject, Observable, BehaviorSubject } from 'rxjs';
|
|
3
|
+
import * as _angular_core from '@angular/core';
|
|
4
|
+
import { Signal, DestroyRef, OnInit, ElementRef, InjectionToken, Type, AfterViewInit } from '@angular/core';
|
|
5
|
+
import * as _ngrx_signals from '@ngrx/signals';
|
|
6
|
+
import * as _sinequa_atomic from '@sinequa/atomic';
|
|
7
|
+
import { Query, Article, Result as Result$2, AuditEvent } from '@sinequa/atomic';
|
|
8
|
+
import * as xstate from 'xstate';
|
|
9
|
+
import * as _sinequa_agent from '@sinequa/agent';
|
|
10
|
+
import * as z from 'zod';
|
|
11
|
+
import * as _angular_common_http from '@angular/common/http';
|
|
12
|
+
import { MessageHeaders, HttpTransportType, ITransport, HubConnectionState, HubConnection, LogLevel } from '@microsoft/signalr';
|
|
13
|
+
import * as _angular_platform_browser from '@angular/platform-browser';
|
|
14
|
+
import { DomSanitizer } from '@angular/platform-browser';
|
|
15
|
+
import { cn } from '@sinequa/ui';
|
|
16
|
+
import * as _sinequa_atomic_angular from '@sinequa/atomic-angular';
|
|
17
|
+
import * as _tanstack_angular_query_experimental from '@tanstack/angular-query-experimental';
|
|
18
|
+
import * as _tanstack_query_core from '@tanstack/query-core';
|
|
19
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
20
|
+
import { VariantProps } from 'class-variance-authority';
|
|
21
|
+
import MarkdownIt from 'markdown-it';
|
|
22
|
+
|
|
23
|
+
/** {@link HttpTransportType} */
|
|
24
|
+
declare const SignalRTransportSchema: z.ZodEnum<{
|
|
25
|
+
WebSockets: "WebSockets";
|
|
26
|
+
ServerSentEvents: "ServerSentEvents";
|
|
27
|
+
LongPolling: "LongPolling";
|
|
28
|
+
None: "None";
|
|
29
|
+
}>;
|
|
30
|
+
type SignalRTransport = z.infer<typeof SignalRTransportSchema>;
|
|
31
|
+
/** {@link LogLevel} */
|
|
32
|
+
declare const SignalRLogLevelSchema: z.ZodEnum<{
|
|
33
|
+
None: "None";
|
|
34
|
+
Trace: "Trace";
|
|
35
|
+
Debug: "Debug";
|
|
36
|
+
Information: "Information";
|
|
37
|
+
Warning: "Warning";
|
|
38
|
+
Error: "Error";
|
|
39
|
+
Critical: "Critical";
|
|
40
|
+
}>;
|
|
41
|
+
type SignalRLogLevel = z.infer<typeof SignalRLogLevelSchema>;
|
|
42
|
+
/** @see https://doc-internal.sinequa.com/assistant/latest/app-json-customization#global-settings---globalsettings-object */
|
|
43
|
+
declare const GlobalSettingsSchema: z.ZodObject<{
|
|
44
|
+
disclaimer: z.ZodDefault<z.ZodString>;
|
|
45
|
+
}, z.core.$strip>;
|
|
46
|
+
type GlobalSettings = z.infer<typeof GlobalSettingsSchema>;
|
|
47
|
+
/** @see https://doc-internal.sinequa.com/assistant/latest/app-json-customization#saved-chat---savedchatsettings-object */
|
|
48
|
+
declare const SavedChatSettingsSchema: z.ZodObject<{
|
|
49
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
50
|
+
display: z.ZodDefault<z.ZodBoolean>;
|
|
51
|
+
}, z.core.$strip>;
|
|
52
|
+
type SavedChatSettings = z.infer<typeof SavedChatSettingsSchema>;
|
|
53
|
+
/** @see https://doc-internal.sinequa.com/assistant/latest/app-json-customization#connection-settings---connectionsettings-object */
|
|
54
|
+
declare const ConnectionSettingsSchema: z.ZodObject<{
|
|
55
|
+
connectionErrorMessage: z.ZodDefault<z.ZodString>;
|
|
56
|
+
signalRTransport: z.ZodDefault<z.ZodEnum<{
|
|
57
|
+
WebSockets: "WebSockets";
|
|
58
|
+
ServerSentEvents: "ServerSentEvents";
|
|
59
|
+
LongPolling: "LongPolling";
|
|
60
|
+
None: "None";
|
|
61
|
+
}>>;
|
|
62
|
+
signalRLogLevel: z.ZodDefault<z.ZodEnum<{
|
|
63
|
+
None: "None";
|
|
64
|
+
Trace: "Trace";
|
|
65
|
+
Debug: "Debug";
|
|
66
|
+
Information: "Information";
|
|
67
|
+
Warning: "Warning";
|
|
68
|
+
Error: "Error";
|
|
69
|
+
Critical: "Critical";
|
|
70
|
+
}>>;
|
|
71
|
+
signalRServerTimeoutInMilliseconds: z.ZodDefault<z.ZodNumber>;
|
|
72
|
+
signalRSkipNegotiation: z.ZodDefault<z.ZodBoolean>;
|
|
73
|
+
}, z.core.$strip>;
|
|
74
|
+
type ConnectionSettings = z.infer<typeof ConnectionSettingsSchema>;
|
|
75
|
+
/** @see https://doc-internal.sinequa.com/assistant/latest/app-json-customization#auditSettings */
|
|
76
|
+
declare const AuditSettingsSchema: z.ZodObject<{
|
|
77
|
+
issueTypes: z.ZodArray<z.ZodString>;
|
|
78
|
+
logContent: z.ZodDefault<z.ZodBoolean>;
|
|
79
|
+
}, z.core.$strip>;
|
|
80
|
+
type AuditSettings = z.infer<typeof AuditSettingsSchema>;
|
|
81
|
+
/** @see */
|
|
82
|
+
declare const AdditionalToolPropertiesSchema: z.ZodObject<{}, z.core.$strip>;
|
|
83
|
+
type AdditionalToolProperties = z.infer<typeof AdditionalToolPropertiesSchema>;
|
|
84
|
+
/** @see https://doc-internal.sinequa.com/assistant/latest/agent-configuration */
|
|
85
|
+
declare const AgentConfigSchema: z.ZodReadonly<z.ZodObject<{
|
|
86
|
+
defaultAgent: z.ZodString;
|
|
87
|
+
switchAgents: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
88
|
+
globalSettings: z.ZodObject<{
|
|
89
|
+
disclaimer: z.ZodDefault<z.ZodString>;
|
|
90
|
+
}, z.core.$strip>;
|
|
91
|
+
connectionSettings: z.ZodObject<{
|
|
92
|
+
connectionErrorMessage: z.ZodDefault<z.ZodString>;
|
|
93
|
+
signalRTransport: z.ZodDefault<z.ZodEnum<{
|
|
94
|
+
WebSockets: "WebSockets";
|
|
95
|
+
ServerSentEvents: "ServerSentEvents";
|
|
96
|
+
LongPolling: "LongPolling";
|
|
97
|
+
None: "None";
|
|
98
|
+
}>>;
|
|
99
|
+
signalRLogLevel: z.ZodDefault<z.ZodEnum<{
|
|
100
|
+
None: "None";
|
|
101
|
+
Trace: "Trace";
|
|
102
|
+
Debug: "Debug";
|
|
103
|
+
Information: "Information";
|
|
104
|
+
Warning: "Warning";
|
|
105
|
+
Error: "Error";
|
|
106
|
+
Critical: "Critical";
|
|
107
|
+
}>>;
|
|
108
|
+
signalRServerTimeoutInMilliseconds: z.ZodDefault<z.ZodNumber>;
|
|
109
|
+
signalRSkipNegotiation: z.ZodDefault<z.ZodBoolean>;
|
|
110
|
+
}, z.core.$strip>;
|
|
111
|
+
savedChatSettings: z.ZodOptional<z.ZodObject<{
|
|
112
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
113
|
+
display: z.ZodDefault<z.ZodBoolean>;
|
|
114
|
+
}, z.core.$strip>>;
|
|
115
|
+
auditSettings: z.ZodObject<{
|
|
116
|
+
issueTypes: z.ZodArray<z.ZodString>;
|
|
117
|
+
logContent: z.ZodDefault<z.ZodBoolean>;
|
|
118
|
+
}, z.core.$strip>;
|
|
119
|
+
additionalToolProperties: z.ZodObject<{}, z.core.$strip>;
|
|
120
|
+
}, z.core.$strip>>;
|
|
121
|
+
type AgentConfig = z.infer<typeof AgentConfigSchema>;
|
|
122
|
+
|
|
123
|
+
type MessageComponentType = 'user' | 'agent' | 'function' | 'debug';
|
|
124
|
+
type UserFeedback = {
|
|
125
|
+
type: 'positive' | 'negative';
|
|
126
|
+
comment?: string;
|
|
127
|
+
};
|
|
128
|
+
type UserFeedbackPositive = UserFeedback & {
|
|
129
|
+
type: 'positive';
|
|
130
|
+
};
|
|
131
|
+
type UserFeedbackNegative = UserFeedback & {
|
|
132
|
+
type: 'negative';
|
|
133
|
+
issueType: string;
|
|
134
|
+
};
|
|
135
|
+
type AdditionalProperties = {
|
|
136
|
+
display?: boolean;
|
|
137
|
+
isUserInput?: boolean;
|
|
138
|
+
$debug?: DebugMessageProperties[];
|
|
139
|
+
$userFeedback?: UserFeedback;
|
|
140
|
+
};
|
|
141
|
+
type ApplicationContext = {
|
|
142
|
+
appName: string | undefined;
|
|
143
|
+
query: Query | undefined;
|
|
144
|
+
};
|
|
145
|
+
type ContextProperties = {
|
|
146
|
+
language?: {
|
|
147
|
+
browser: string;
|
|
148
|
+
sinequaUI: string;
|
|
149
|
+
};
|
|
150
|
+
dateTime?: {
|
|
151
|
+
localISO: string;
|
|
152
|
+
timezone: string;
|
|
153
|
+
};
|
|
154
|
+
urlContext?: {
|
|
155
|
+
fullUrl: string;
|
|
156
|
+
pathname: string;
|
|
157
|
+
searchParams: string;
|
|
158
|
+
};
|
|
159
|
+
screenContext?: {
|
|
160
|
+
width: number;
|
|
161
|
+
height: number;
|
|
162
|
+
viewportWidth: number;
|
|
163
|
+
viewportHeight: number;
|
|
164
|
+
};
|
|
165
|
+
specs?: {
|
|
166
|
+
os: string;
|
|
167
|
+
browser: string;
|
|
168
|
+
};
|
|
169
|
+
applicationContext?: ApplicationContext;
|
|
170
|
+
};
|
|
171
|
+
type ToolChoice = {
|
|
172
|
+
internalTools?: string[];
|
|
173
|
+
mcpClients?: {
|
|
174
|
+
name: string;
|
|
175
|
+
tools: string[];
|
|
176
|
+
}[];
|
|
177
|
+
};
|
|
178
|
+
type DebugMessageProperties = {
|
|
179
|
+
chatId: string;
|
|
180
|
+
executionId: string;
|
|
181
|
+
debugMessageId?: string;
|
|
182
|
+
title?: string;
|
|
183
|
+
runId?: string;
|
|
184
|
+
isError?: boolean;
|
|
185
|
+
};
|
|
186
|
+
type DebugMessageGroup = {
|
|
187
|
+
runId: string;
|
|
188
|
+
messages: DebugMessageProperties[];
|
|
189
|
+
expanded: boolean;
|
|
190
|
+
};
|
|
191
|
+
type MessageRole = 'user' | 'assistant' | 'system' | 'tool';
|
|
192
|
+
type MessageType = 'text';
|
|
193
|
+
type MessageContentText = {
|
|
194
|
+
$type: 'text';
|
|
195
|
+
text: string;
|
|
196
|
+
};
|
|
197
|
+
type MessageContentImage = {
|
|
198
|
+
$type: 'image';
|
|
199
|
+
image: string;
|
|
200
|
+
};
|
|
201
|
+
type MessageContentVideo = {
|
|
202
|
+
$type: 'video';
|
|
203
|
+
video: string;
|
|
204
|
+
};
|
|
205
|
+
type MessageContent = MessageContentText | MessageContentImage | MessageContentVideo | MessageContentFunctionCall | MessageContentFunctionResult | MessageContentFunctionApprovalRequest | MessageContentFunctionApprovalResponse;
|
|
206
|
+
type Message = {
|
|
207
|
+
role: MessageRole;
|
|
208
|
+
messageId: string;
|
|
209
|
+
contents: MessageContent[];
|
|
210
|
+
additionalProperties?: AdditionalProperties;
|
|
211
|
+
authorName?: string;
|
|
212
|
+
createdAt?: string;
|
|
213
|
+
};
|
|
214
|
+
type FunctionCall = {
|
|
215
|
+
callId: string;
|
|
216
|
+
name: string;
|
|
217
|
+
toolCardTemplateName?: string;
|
|
218
|
+
arguments: Record<string, any>;
|
|
219
|
+
additionalProperties?: Record<string, any>;
|
|
220
|
+
};
|
|
221
|
+
type MessageContentFunctionCall = FunctionCall & {
|
|
222
|
+
$type: 'functionCall';
|
|
223
|
+
};
|
|
224
|
+
type MessageContentFunctionResult = {
|
|
225
|
+
$type: 'functionResult';
|
|
226
|
+
callId: string;
|
|
227
|
+
result: string | {
|
|
228
|
+
content: Record<string, any>[];
|
|
229
|
+
} | Record<string, any>[];
|
|
230
|
+
executionTime?: string;
|
|
231
|
+
isError?: boolean;
|
|
232
|
+
additionalProperties?: Record<string, any>;
|
|
233
|
+
};
|
|
234
|
+
type MessageContentFunctionApprovalRequest = {
|
|
235
|
+
$type: 'functionApprovalRequest';
|
|
236
|
+
functionCall: FunctionCall;
|
|
237
|
+
id: string;
|
|
238
|
+
};
|
|
239
|
+
type MessageContentFunctionApprovalResponse = {
|
|
240
|
+
$type: 'functionApprovalResponse';
|
|
241
|
+
approved: boolean;
|
|
242
|
+
functionCall: FunctionCall;
|
|
243
|
+
id: string;
|
|
244
|
+
};
|
|
245
|
+
type MessageIdentity = 'user' | 'assistant' | 'functionCall' | 'functionApprovalRequest' | 'functionResult' | 'functionApprovalResponse';
|
|
246
|
+
|
|
247
|
+
declare const AGENT_ACTION_EVENT_NAME = "agent-action";
|
|
248
|
+
type ActionEvent = {
|
|
249
|
+
origin: 'agent' | 'user' | 'input';
|
|
250
|
+
action: MessageAgentAction | MessageUserAction | InputAction;
|
|
251
|
+
};
|
|
252
|
+
/**
|
|
253
|
+
* copy: user clicked the copy button to copy the message contents
|
|
254
|
+
* regenerate: user clicked the regenerate button to regenerate from the message
|
|
255
|
+
* like: user clicked the like button to provide positive feedback
|
|
256
|
+
* dislike: user clicked the dislike button to provide negative feedback
|
|
257
|
+
* debug: user clicked the debug button to view debug information
|
|
258
|
+
* function_approval: user responded to a function approval request with either approval or rejection
|
|
259
|
+
*/
|
|
260
|
+
type MessageAgentAction = 'copy' | 'regenerate' | 'like' | 'dislike' | 'debug' | 'function_approval';
|
|
261
|
+
type MessageAgentActionEvent = ActionEvent & {
|
|
262
|
+
origin: 'agent';
|
|
263
|
+
action: MessageAgentAction;
|
|
264
|
+
message?: Message;
|
|
265
|
+
callback?: (payload?: object) => void;
|
|
266
|
+
approvalData?: MessageContentFunctionApprovalResponse;
|
|
267
|
+
};
|
|
268
|
+
declare function isAgentActionEvent(event: ActionEvent): event is MessageAgentActionEvent;
|
|
269
|
+
/**
|
|
270
|
+
* copy: user clicked the copy button to copy the message contents
|
|
271
|
+
* edit: user clicked the edit button to edit the message
|
|
272
|
+
*/
|
|
273
|
+
type MessageUserAction = 'copy' | 'edit';
|
|
274
|
+
type MessageUserActionEvent = ActionEvent & {
|
|
275
|
+
origin: 'user';
|
|
276
|
+
action: MessageUserAction;
|
|
277
|
+
message?: Message;
|
|
278
|
+
};
|
|
279
|
+
declare function isUserActionEvent(event: ActionEvent): event is MessageUserActionEvent;
|
|
280
|
+
/**
|
|
281
|
+
* clear: user clicked the clear button to clear the input
|
|
282
|
+
* cancel: user clicked the cancel button to cancel editing
|
|
283
|
+
* stop: user clicked the stop button to stop the agent generation
|
|
284
|
+
*/
|
|
285
|
+
type InputAction = 'clear' | 'cancel' | 'stop';
|
|
286
|
+
type InputActionEvent = ActionEvent & {
|
|
287
|
+
origin: 'input';
|
|
288
|
+
action: InputAction;
|
|
289
|
+
};
|
|
290
|
+
declare function isInputActionEvent(event: ActionEvent): event is InputActionEvent;
|
|
291
|
+
type UserActionType = MessageUserActionEvent;
|
|
292
|
+
type AgentActionType = MessageAgentActionEvent;
|
|
293
|
+
type InputActionType = InputActionEvent;
|
|
294
|
+
interface ActionTypeMap {
|
|
295
|
+
user: UserActionType;
|
|
296
|
+
agent: AgentActionType;
|
|
297
|
+
input: InputActionType;
|
|
298
|
+
}
|
|
299
|
+
type ActionTypeKey = keyof ActionTypeMap;
|
|
300
|
+
declare function createActionEvent<T extends ActionTypeKey>(origin: T, action: ActionTypeMap[T]['action'], payload?: Omit<ActionTypeMap[T], 'origin' | 'action'>): CustomEvent<ActionTypeMap[T]>;
|
|
301
|
+
|
|
302
|
+
declare const ADMIN_EVENT_NAME = "admin";
|
|
303
|
+
type AdminEventId = 'ADMIN_COPIED_AGENT_CONFIG';
|
|
304
|
+
type AdminEventPayload = {
|
|
305
|
+
status: 'success' | 'failure' | 'info';
|
|
306
|
+
details?: string;
|
|
307
|
+
};
|
|
308
|
+
type AdminEvent = Partial<AdminEventPayload> & {
|
|
309
|
+
id: AdminEventId;
|
|
310
|
+
};
|
|
311
|
+
declare function createAdminEvent(id: AdminEventId, payload?: AdminEventPayload): CustomEvent<AdminEvent>;
|
|
312
|
+
|
|
313
|
+
declare const AGENT_ERROR_EVENT_NAME = "agent-error";
|
|
314
|
+
type AgentErrorId = 'AGENT_FAILED_TO_INVOKE_AGENT' | 'AGENT_FAILED_TO_STOP_GENERATION';
|
|
315
|
+
type AgentErrorEvent = {
|
|
316
|
+
id: AgentErrorId;
|
|
317
|
+
error?: any;
|
|
318
|
+
errorMessage?: string;
|
|
319
|
+
};
|
|
320
|
+
declare function createAgentErrorEvent(id: AgentErrorId, error?: any, errorMessage?: string): CustomEvent<AgentErrorEvent>;
|
|
321
|
+
|
|
322
|
+
declare const AGENT_EVENT_NAME = "agent";
|
|
323
|
+
type AgentEventId = 'AGENT_STOPPED_GENERATION' | 'COPY_CODE_BLOCK' | 'COPY_TABLE_AS_CSV' | 'DOWNLOAD_TABLE_AS_CSV';
|
|
324
|
+
type AgentEvent = {
|
|
325
|
+
id: AgentEventId;
|
|
326
|
+
payload?: any;
|
|
327
|
+
};
|
|
328
|
+
declare function createAgentEvent(id: AgentEventId, payload?: any): CustomEvent<AgentEvent>;
|
|
329
|
+
|
|
330
|
+
declare global {
|
|
331
|
+
interface HTMLElementEventMap {
|
|
332
|
+
[AGENT_ACTION_EVENT_NAME]: CustomEvent<ActionEvent>;
|
|
333
|
+
[AGENT_ERROR_EVENT_NAME]: CustomEvent<AgentErrorEvent>;
|
|
334
|
+
[AGENT_EVENT_NAME]: CustomEvent<AgentEvent>;
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
declare const AGENT_NEW_CHAT_EVENT_NAME = "agent-new-chat";
|
|
339
|
+
type AgentNewChatEvent = {
|
|
340
|
+
instanceId: string;
|
|
341
|
+
};
|
|
342
|
+
declare function createAgentNewChatEvent(instanceId: string): CustomEvent<AgentNewChatEvent>;
|
|
343
|
+
|
|
344
|
+
type BasePayload = {
|
|
345
|
+
executionTime: string;
|
|
346
|
+
executionTimeMilliseconds: number;
|
|
347
|
+
methodresult: string;
|
|
348
|
+
};
|
|
349
|
+
|
|
350
|
+
type DebugDisplayItemData = {
|
|
351
|
+
key: string;
|
|
352
|
+
value: object | string;
|
|
353
|
+
};
|
|
354
|
+
type DebugDisplayItem = {
|
|
355
|
+
type: 'KV' | 'LIST';
|
|
356
|
+
isError: boolean;
|
|
357
|
+
};
|
|
358
|
+
type DebugDisplayItemKV = DebugDisplayItem & {
|
|
359
|
+
type: 'KV';
|
|
360
|
+
data: DebugDisplayItemData;
|
|
361
|
+
};
|
|
362
|
+
type DebugDisplayItemList = DebugDisplayItem & {
|
|
363
|
+
type: 'LIST';
|
|
364
|
+
name: string;
|
|
365
|
+
items: DebugDisplayItem[];
|
|
366
|
+
};
|
|
367
|
+
type DebugMessage = {
|
|
368
|
+
debugMessageId: string;
|
|
369
|
+
dateTimeUtc: string;
|
|
370
|
+
content: any;
|
|
371
|
+
};
|
|
372
|
+
type DebugMessageListPayload = BasePayload & {
|
|
373
|
+
debugMessages: DebugMessage[];
|
|
374
|
+
};
|
|
375
|
+
|
|
376
|
+
/**
|
|
377
|
+
* Frames are SignalR messages that contain partial or complete data about the agent's response.
|
|
378
|
+
* They are used to update the UI in real-time as the agent processes a request.
|
|
379
|
+
*/
|
|
380
|
+
/** Message updates */
|
|
381
|
+
type MessageFrame = {
|
|
382
|
+
delta: string;
|
|
383
|
+
messageId: string;
|
|
384
|
+
};
|
|
385
|
+
/**
|
|
386
|
+
* Debug information about current execution, should match {@link DebugMessageProperties}
|
|
387
|
+
*/
|
|
388
|
+
type DebugDisplayFrame = DebugMessageProperties;
|
|
389
|
+
/**
|
|
390
|
+
* Last frame, contains backend state of current conversation
|
|
391
|
+
* @see https://doc-internal.sinequa.com/assistant/latest/history-object
|
|
392
|
+
* @see https://doc-internal.sinequa.com/assistant/latest/signalr-and-rest-streaming-messages#history
|
|
393
|
+
*/
|
|
394
|
+
type HistoryFrame = {
|
|
395
|
+
executionTime: string;
|
|
396
|
+
executionTimeMilliseconds: number;
|
|
397
|
+
history: Message[];
|
|
398
|
+
title?: string;
|
|
399
|
+
};
|
|
400
|
+
type functionCallFrame = {
|
|
401
|
+
callId: string;
|
|
402
|
+
name: string;
|
|
403
|
+
arguments: Record<string, any>;
|
|
404
|
+
additionalProperties?: Record<string, any>;
|
|
405
|
+
};
|
|
406
|
+
type functionResultFrame = {
|
|
407
|
+
callId: string;
|
|
408
|
+
result: {
|
|
409
|
+
content: Record<string, any>[];
|
|
410
|
+
};
|
|
411
|
+
executionTime: string;
|
|
412
|
+
executionTimeMilliseconds: number;
|
|
413
|
+
isError?: boolean;
|
|
414
|
+
additionalProperties?: Record<string, any>;
|
|
415
|
+
};
|
|
416
|
+
/** Sent by the backend when OAuth authorization is required for an MCP server. */
|
|
417
|
+
type OAuthRequiredFrame = {
|
|
418
|
+
mcpServerName: string;
|
|
419
|
+
authorizationUrl: string;
|
|
420
|
+
state: string;
|
|
421
|
+
callbackUrl: string;
|
|
422
|
+
};
|
|
423
|
+
type FrameEventName = 'message' | 'history' | 'debugDisplay' | 'functionCall' | 'functionResult' | 'oauthRequired';
|
|
424
|
+
type FrameEventType = MessageFrame | HistoryFrame | DebugDisplayFrame | functionCallFrame | functionResultFrame | OAuthRequiredFrame;
|
|
425
|
+
type FrameEvent = {
|
|
426
|
+
name: FrameEventName;
|
|
427
|
+
payload: FrameEventType;
|
|
428
|
+
};
|
|
429
|
+
|
|
430
|
+
type HistoryContentBase = {
|
|
431
|
+
type: 'text' | 'image' | 'video';
|
|
432
|
+
};
|
|
433
|
+
type HistoryContent = HistoryContentText | HistoryContentImage | HistoryContentVideo;
|
|
434
|
+
type HistoryContentText = HistoryContentBase & {
|
|
435
|
+
type: 'text';
|
|
436
|
+
text: string;
|
|
437
|
+
};
|
|
438
|
+
type HistoryContentImage = HistoryContentBase & {
|
|
439
|
+
type: 'image';
|
|
440
|
+
image: string;
|
|
441
|
+
};
|
|
442
|
+
type HistoryContentVideo = HistoryContentBase & {
|
|
443
|
+
type: 'video';
|
|
444
|
+
video: string;
|
|
445
|
+
};
|
|
446
|
+
|
|
447
|
+
type InlineReference = {
|
|
448
|
+
id: string;
|
|
449
|
+
offset: number;
|
|
450
|
+
length: number;
|
|
451
|
+
};
|
|
452
|
+
|
|
453
|
+
type SavedChatGetPayload = BasePayload & {
|
|
454
|
+
instanceId: string;
|
|
455
|
+
savedChat: SavedChat;
|
|
456
|
+
};
|
|
457
|
+
type SavedChatListPayload = BasePayload & {
|
|
458
|
+
instanceId: string;
|
|
459
|
+
savedChats: SavedChat[];
|
|
460
|
+
};
|
|
461
|
+
type SavedChatExistsPayload = BasePayload & {
|
|
462
|
+
exists: boolean;
|
|
463
|
+
};
|
|
464
|
+
type SavedChatAddPayload = BasePayload & {
|
|
465
|
+
instanceId: string;
|
|
466
|
+
savedChat: SavedChat;
|
|
467
|
+
};
|
|
468
|
+
type SavedChatUpdatePayload = BasePayload & {
|
|
469
|
+
instanceId: string;
|
|
470
|
+
savedChat: SavedChat;
|
|
471
|
+
};
|
|
472
|
+
type SavedChatDeletePayload = BasePayload & {
|
|
473
|
+
deleteCount: number;
|
|
474
|
+
};
|
|
475
|
+
type SavedChat = {
|
|
476
|
+
id: string;
|
|
477
|
+
title: string;
|
|
478
|
+
modifiedUTC: string;
|
|
479
|
+
history?: Message[];
|
|
480
|
+
};
|
|
481
|
+
declare enum SavedChatEvent {
|
|
482
|
+
'add' = 0,
|
|
483
|
+
'update' = 1,
|
|
484
|
+
'rename' = 2,
|
|
485
|
+
'delete' = 3
|
|
486
|
+
}
|
|
487
|
+
declare const SavedChatActions: {
|
|
488
|
+
add: string;
|
|
489
|
+
delete: string;
|
|
490
|
+
exist: string;
|
|
491
|
+
get: string;
|
|
492
|
+
list: string;
|
|
493
|
+
update: string;
|
|
494
|
+
};
|
|
495
|
+
|
|
496
|
+
interface ConnectionOptions {
|
|
497
|
+
withCredentials?: boolean;
|
|
498
|
+
headers?: MessageHeaders;
|
|
499
|
+
transport?: HttpTransportType | ITransport;
|
|
500
|
+
skipNegotiation?: boolean;
|
|
501
|
+
accessTokenFactory?: () => string | Promise<string>;
|
|
502
|
+
}
|
|
503
|
+
/**
|
|
504
|
+
* Base SignalR events
|
|
505
|
+
* {@link HubConnectionState}
|
|
506
|
+
*/
|
|
507
|
+
type SignalREventBase = {
|
|
508
|
+
state: HubConnectionState;
|
|
509
|
+
};
|
|
510
|
+
type SignalREventConnected = SignalREventBase & {
|
|
511
|
+
state: HubConnectionState.Connected;
|
|
512
|
+
};
|
|
513
|
+
type SignalREventReconnecting = SignalREventBase & {
|
|
514
|
+
state: HubConnectionState.Reconnecting;
|
|
515
|
+
retryCount: number;
|
|
516
|
+
retryDelay: number;
|
|
517
|
+
};
|
|
518
|
+
type SignalREventDisconnected = SignalREventBase & {
|
|
519
|
+
state: HubConnectionState.Disconnected;
|
|
520
|
+
};
|
|
521
|
+
type SignalREvent = SignalREventConnected | SignalREventReconnecting | SignalREventDisconnected;
|
|
522
|
+
|
|
523
|
+
type InternalTool = {
|
|
524
|
+
name: string;
|
|
525
|
+
description?: string;
|
|
526
|
+
requiresUserApproval?: boolean;
|
|
527
|
+
};
|
|
528
|
+
type McpTool = {
|
|
529
|
+
name: string;
|
|
530
|
+
description?: string;
|
|
531
|
+
requiresUserApproval?: boolean;
|
|
532
|
+
};
|
|
533
|
+
type McpAuthorizationStatus = 'Granted' | 'NotGranted' | 'Expired';
|
|
534
|
+
type McpClient = {
|
|
535
|
+
name: string;
|
|
536
|
+
description?: string;
|
|
537
|
+
/** SVG markup string for the client's logo, rendered inline. */
|
|
538
|
+
displaySVGIcon?: string;
|
|
539
|
+
tools: McpTool[];
|
|
540
|
+
/** Authorization status returned by the GetAgent endpoint. Absent means no OAuth is required. */
|
|
541
|
+
authorizationStatus?: McpAuthorizationStatus;
|
|
542
|
+
/**
|
|
543
|
+
* Fully-formed OAuth2 authorization URL provided by the backend (already includes `redirect_uri`,
|
|
544
|
+
* `resource`, and other server-side parameters). The frontend only appends the PKCE parameters.
|
|
545
|
+
*/
|
|
546
|
+
authorizationUrl?: string;
|
|
547
|
+
};
|
|
548
|
+
type AgentDetails = {
|
|
549
|
+
name: string;
|
|
550
|
+
displayName?: string;
|
|
551
|
+
description?: string;
|
|
552
|
+
displaySVGIcon?: string;
|
|
553
|
+
type: string;
|
|
554
|
+
promptContent?: string;
|
|
555
|
+
promptTemplateName?: string;
|
|
556
|
+
historyReducer?: string;
|
|
557
|
+
runnableModel: {
|
|
558
|
+
name: string;
|
|
559
|
+
contextWindowSize?: number;
|
|
560
|
+
};
|
|
561
|
+
internalTools?: InternalTool[];
|
|
562
|
+
mcpClients?: McpClient[];
|
|
563
|
+
executionSettings?: Record<string, unknown>;
|
|
564
|
+
[key: string]: unknown;
|
|
565
|
+
};
|
|
566
|
+
|
|
567
|
+
type Reference = {
|
|
568
|
+
id: string;
|
|
569
|
+
metas: {
|
|
570
|
+
title: string;
|
|
571
|
+
modified: string;
|
|
572
|
+
url: string;
|
|
573
|
+
};
|
|
574
|
+
chunks: {
|
|
575
|
+
offset: number;
|
|
576
|
+
length: number;
|
|
577
|
+
scores: number[];
|
|
578
|
+
text: string;
|
|
579
|
+
chunkTypes: string[];
|
|
580
|
+
}[];
|
|
581
|
+
globalRelevanceScore: number;
|
|
582
|
+
};
|
|
583
|
+
|
|
584
|
+
declare class LoggerService {
|
|
585
|
+
private readonly instanceId;
|
|
586
|
+
getFormattedInstanceId: () => string;
|
|
587
|
+
debug(message: string, data?: any): void;
|
|
588
|
+
info(message: string, data?: any): void;
|
|
589
|
+
warn(message: string, data?: any): void;
|
|
590
|
+
error(message: string, error?: any): void;
|
|
591
|
+
errorAndThrow(message: string, error?: any): never;
|
|
592
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<LoggerService, never>;
|
|
593
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<LoggerService>;
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
declare class SavedChatComponent {
|
|
597
|
+
private readonly destroyRef;
|
|
598
|
+
private readonly route;
|
|
599
|
+
private readonly logger;
|
|
600
|
+
private readonly savedChatsService;
|
|
601
|
+
searchText: _angular_core.InputSignal<string | undefined>;
|
|
602
|
+
/** When true, hides the edit and delete actions. */
|
|
603
|
+
readonly readonly: _angular_core.InputSignal<boolean>;
|
|
604
|
+
/** Emitted when the user clicks on a chat link. */
|
|
605
|
+
readonly chatSelected: _angular_core.OutputEmitterRef<void>;
|
|
606
|
+
readonly savedChatsResource: _angular_common_http.HttpResourceRef<_sinequa_agent.SavedChat[]> | undefined;
|
|
607
|
+
readonly savedChats: _angular_core.Signal<_sinequa_agent.SavedChat[]>;
|
|
608
|
+
readonly isConnected: _angular_core.Signal<boolean | undefined>;
|
|
609
|
+
readonly chatId: _angular_core.WritableSignal<string | undefined>;
|
|
610
|
+
protected readonly hoveredChatId: _angular_core.WritableSignal<string | null>;
|
|
611
|
+
protected readonly openMenuChatId: _angular_core.WritableSignal<string | null>;
|
|
612
|
+
private readonly chatMenus;
|
|
613
|
+
private readonly renamePrompt;
|
|
614
|
+
private readonly deletePrompt;
|
|
615
|
+
constructor();
|
|
616
|
+
renameSavedChat(id: string, currentName: string): Promise<void>;
|
|
617
|
+
deleteSavedChat(id: string, chatTitle: string): Promise<void>;
|
|
618
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SavedChatComponent, never>;
|
|
619
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SavedChatComponent, "SavedChat,saved-chat,savedchat", never, { "searchText": { "alias": "searchText"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; }, { "chatSelected": "chatSelected"; }, never, never, true, never>;
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
/**
|
|
623
|
+
* Dialog component that lets the user browse and filter their saved chats.
|
|
624
|
+
*
|
|
625
|
+
* Open it programmatically by calling `open()` on a template reference:
|
|
626
|
+
*
|
|
627
|
+
* ```html
|
|
628
|
+
* <saved-chats-dialog #savedChatsDialog />
|
|
629
|
+
* <button (click)="savedChatsDialog.open()">Open saved chats</button>
|
|
630
|
+
* ```
|
|
631
|
+
*/
|
|
632
|
+
declare class SavedChatsDialogComponent {
|
|
633
|
+
private readonly dialogRef;
|
|
634
|
+
protected readonly searchText: _angular_core.WritableSignal<string | undefined>;
|
|
635
|
+
protected readonly debouncedSearchText: _angular_core.Signal<string | undefined>;
|
|
636
|
+
constructor();
|
|
637
|
+
/** Opens the dialog and resets the search input. */
|
|
638
|
+
open(): void;
|
|
639
|
+
/** Closes the dialog programmatically. */
|
|
640
|
+
close(): void;
|
|
641
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SavedChatsDialogComponent, never>;
|
|
642
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SavedChatsDialogComponent, "SavedChatsDialog,saved-chats-dialog", never, {}, {}, never, never, true, never>;
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
declare class SavedChatsService {
|
|
646
|
+
private readonly http;
|
|
647
|
+
private readonly instanceId;
|
|
648
|
+
private readonly agentsStore;
|
|
649
|
+
private readonly logger;
|
|
650
|
+
readonly savedChatsEvent: Subject<SavedChatEvent>;
|
|
651
|
+
/**
|
|
652
|
+
* Returns an {@link HttpResourceRef} that resolves to the list of saved chats.
|
|
653
|
+
*
|
|
654
|
+
* @returns An {@link HttpResourceRef} that resolves to an array of {@link SavedChat}.
|
|
655
|
+
*
|
|
656
|
+
* @see https://doc-internal.sinequa.com/assistant/latest/savedchatlist
|
|
657
|
+
*/
|
|
658
|
+
getSavedChats(searchText: Signal<string | undefined>): _angular_common_http.HttpResourceRef<SavedChat[]>;
|
|
659
|
+
/**
|
|
660
|
+
* Returns an {@link HttpResourceRef} that resolves to the {@link SavedChat} identified by `chatId` value.
|
|
661
|
+
*
|
|
662
|
+
* @param chatId - The {@link Signal} handling the id of the saved chat to retrieve.
|
|
663
|
+
* @param storeToDB - Whether to store the chat history in {@link SavedChatsDBService} for future reference (default: true).
|
|
664
|
+
*
|
|
665
|
+
* @returns A promise resolving to the {@link SavedChat} identified by `chatId` value.
|
|
666
|
+
*
|
|
667
|
+
* @see https://doc-internal.sinequa.com/assistant/latest/savedchatget
|
|
668
|
+
*/
|
|
669
|
+
getSavedChat(chatId: string | undefined): Promise<SavedChat | undefined>;
|
|
670
|
+
/**
|
|
671
|
+
* Checks if a chat with the given `chatId` exists.
|
|
672
|
+
*
|
|
673
|
+
* The returned {@link Observable} emits once and completes.
|
|
674
|
+
*
|
|
675
|
+
* @param chatId - The id of the chat to check for existence.
|
|
676
|
+
*
|
|
677
|
+
* @returns An {@link Observable} that emits a {@link SavedChatExistsPayload}.
|
|
678
|
+
*
|
|
679
|
+
* @see https://doc-internal.sinequa.com/assistant/latest/savedchatexist
|
|
680
|
+
*/
|
|
681
|
+
doesChatExists(chatId: string): Observable<SavedChatExistsPayload>;
|
|
682
|
+
/**
|
|
683
|
+
* Saves a new chat with the given `chatId` and `history`.
|
|
684
|
+
*
|
|
685
|
+
* The returned {@link Observable} emits once and completes.
|
|
686
|
+
*
|
|
687
|
+
* @param chatId - The id of the chat to save.
|
|
688
|
+
* @param history - The history of the chat to save.
|
|
689
|
+
* @param title - An optional title for the chat.
|
|
690
|
+
*
|
|
691
|
+
* @return An {@link Observable} that emits a {@link SavedChatAddPayload}.
|
|
692
|
+
*
|
|
693
|
+
* @see https://doc-internal.sinequa.com/assistant/latest/savedchatadd
|
|
694
|
+
*/
|
|
695
|
+
saveChat(chatId: string, history: Message[], title?: string): Observable<SavedChatAddPayload>;
|
|
696
|
+
/**
|
|
697
|
+
* Updates an existing chat identified by `chatId` with the given `update` object.
|
|
698
|
+
* The `update` object can contain either or both of `history` and `title` properties.
|
|
699
|
+
*
|
|
700
|
+
* The returned {@link Observable} emits once and completes.
|
|
701
|
+
*
|
|
702
|
+
* @param chatId - The id of the chat to update.
|
|
703
|
+
* @param update - An object containing the properties to update: `history` and/or `title`.
|
|
704
|
+
*
|
|
705
|
+
* @return An {@link Observable} that emits a {@link SavedChatUpdatePayload}.
|
|
706
|
+
*
|
|
707
|
+
* @see https://doc-internal.sinequa.com/assistant/latest/savedchatupdate
|
|
708
|
+
*/
|
|
709
|
+
updateSavedChat(chatId: string, update: {
|
|
710
|
+
history?: Message[];
|
|
711
|
+
title?: string;
|
|
712
|
+
}): Observable<SavedChatUpdatePayload>;
|
|
713
|
+
/**
|
|
714
|
+
* Combination of both save and update methods for chat history, by:
|
|
715
|
+
* - Calling {@link doesChatExists} to check if the chat already exists
|
|
716
|
+
* - Calling either {@link saveChat} or {@link updateSavedChat} based on the chat existence
|
|
717
|
+
*
|
|
718
|
+
* The returned {@link Observable} emits once and completes.
|
|
719
|
+
*
|
|
720
|
+
* @param chatId - The id of the chat to save or update.
|
|
721
|
+
* @param history - The history of the chat to save or update.
|
|
722
|
+
* @param title - An optional title for the chat (only used on first save).
|
|
723
|
+
*
|
|
724
|
+
* @return An {@link Observable} that emits either a {@link SavedChatAddPayload} or a {@link SavedChatUpdatePayload}.
|
|
725
|
+
*
|
|
726
|
+
* @see https://doc-internal.sinequa.com/assistant/latest/savedchatadd
|
|
727
|
+
* @see https://doc-internal.sinequa.com/assistant/latest/savedchatupdate
|
|
728
|
+
*/
|
|
729
|
+
upsaveChat(chatId: string, history: Message[], title?: string): Observable<SavedChatAddPayload | SavedChatUpdatePayload>;
|
|
730
|
+
/**
|
|
731
|
+
* Deletes the chats identified by the given `chatIds`.
|
|
732
|
+
*
|
|
733
|
+
* The returned {@link Observable} emits once and completes.
|
|
734
|
+
*
|
|
735
|
+
* @param chatIds - The ids of the chats to delete.
|
|
736
|
+
*
|
|
737
|
+
* @return An {@link Observable} that emits a {@link SavedChatDeletePayload}.
|
|
738
|
+
*
|
|
739
|
+
* @see https://doc-internal.sinequa.com/assistant/latest/savedchatdelete
|
|
740
|
+
*/
|
|
741
|
+
deleteSavedChat(chatIds: string[]): Observable<SavedChatDeletePayload>;
|
|
742
|
+
/**
|
|
743
|
+
* Chat history is considered valid to be saved if it contains at least one message with:
|
|
744
|
+
* - role equal to 'user'.
|
|
745
|
+
* - additionalProperties.isUserInput equal to true.
|
|
746
|
+
*
|
|
747
|
+
* @param history - The chat history to check.
|
|
748
|
+
*
|
|
749
|
+
* @returns Whether the chat history is considered valid to be saved.
|
|
750
|
+
*/
|
|
751
|
+
canHistoryBeSaved(history: Message[]): boolean;
|
|
752
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SavedChatsService, never>;
|
|
753
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<SavedChatsService>;
|
|
754
|
+
}
|
|
755
|
+
|
|
756
|
+
interface SignalRConnectionOperationConfig {
|
|
757
|
+
webSocketEndpoint: string;
|
|
758
|
+
agentConfig: AgentConfig;
|
|
759
|
+
}
|
|
760
|
+
declare abstract class ASignalRService {
|
|
761
|
+
private readonly signalRWebService;
|
|
762
|
+
private readonly localeId;
|
|
763
|
+
protected config: SignalRConnectionOperationConfig | undefined;
|
|
764
|
+
protected connection: HubConnection | undefined;
|
|
765
|
+
hasConnection: () => boolean;
|
|
766
|
+
hasOpenedConnection: () => boolean;
|
|
767
|
+
buildConnectionWithConfig(config: SignalRConnectionOperationConfig, options?: ConnectionOptions): Promise<void>;
|
|
768
|
+
startConnection(): Promise<void>;
|
|
769
|
+
stopConnection(): Promise<void>;
|
|
770
|
+
clearConnection(): void;
|
|
771
|
+
protected checkConfig(config: SignalRConnectionOperationConfig): void;
|
|
772
|
+
private getDefaultOptions;
|
|
773
|
+
private getLogLevel;
|
|
774
|
+
private getTransports;
|
|
775
|
+
}
|
|
776
|
+
declare class SignalRService extends ASignalRService {
|
|
777
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SignalRService, never>;
|
|
778
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<SignalRService>;
|
|
779
|
+
}
|
|
780
|
+
|
|
781
|
+
/**
|
|
782
|
+
* A service to connect the Sinequa server to the client via SignalR
|
|
783
|
+
*/
|
|
784
|
+
declare class SignalRWebService {
|
|
785
|
+
private readonly retryPolicy;
|
|
786
|
+
private readonly destroyRef;
|
|
787
|
+
readonly signalREvents$: Subject<SignalREvent>;
|
|
788
|
+
readonly isConnected$: rxjs.Observable<boolean>;
|
|
789
|
+
readonly isConnected: _angular_core.Signal<boolean | undefined>;
|
|
790
|
+
private connectionRetryCount;
|
|
791
|
+
constructor();
|
|
792
|
+
/**
|
|
793
|
+
* Builds a SignalR {@link HubConnection} object and returns it.
|
|
794
|
+
*
|
|
795
|
+
* @param endpointName - Name of the endpoint to connect to.
|
|
796
|
+
* @param options - Options for the connection. It must overrides the default options.
|
|
797
|
+
* @param logLevel - The log level for the connection.
|
|
798
|
+
* @param automaticReconnect - Whether the connection should automatically attempt to reconnect.
|
|
799
|
+
*
|
|
800
|
+
* @fires `SignalREventReconnecting` - Event attached to the connection that emits when the connection is reconnecting.
|
|
801
|
+
* @fires `SignalREventConnected` - Event attached to the connection that emits when the connection is connected.
|
|
802
|
+
* @fires `SignalREventDisconnected` - Event attached to the connection that emits when the connection is disconnected / closed.
|
|
803
|
+
*
|
|
804
|
+
* @returns A SignalR HubConnection object.
|
|
805
|
+
*/
|
|
806
|
+
buildHubConnection(endpointName: string, options: ConnectionOptions, logLevel?: LogLevel, automaticReconnect?: boolean): HubConnection;
|
|
807
|
+
getNextRetryDelay(): number | null;
|
|
808
|
+
/**
|
|
809
|
+
* Starts a SignalR connection.
|
|
810
|
+
*
|
|
811
|
+
* @param connection - A SignalR connection.
|
|
812
|
+
*
|
|
813
|
+
* @fires `SignalREventConnected` - Event attached to the connection that emits when the connection is connected.
|
|
814
|
+
*
|
|
815
|
+
* @throws An error if the connection is undefined.
|
|
816
|
+
* @throws An error if the connection could not be started.
|
|
817
|
+
*/
|
|
818
|
+
startConnection(connection: HubConnection | undefined): Promise<void>;
|
|
819
|
+
/**
|
|
820
|
+
* Stops a SignalR connection.
|
|
821
|
+
*
|
|
822
|
+
* @param connection - A SignalR connection.
|
|
823
|
+
*
|
|
824
|
+
* @fires `SignalREventConnected` - Event attached to the connection that emits when the connection is connected.
|
|
825
|
+
*
|
|
826
|
+
* @throws An error if the connection is undefined.
|
|
827
|
+
* @throws An error if the connection could not be stopped.
|
|
828
|
+
*/
|
|
829
|
+
stopConnection(connection: HubConnection | undefined): Promise<void>;
|
|
830
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SignalRWebService, never>;
|
|
831
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<SignalRWebService>;
|
|
832
|
+
}
|
|
833
|
+
|
|
834
|
+
declare class AgentService extends ASignalRService {
|
|
835
|
+
private readonly instanceId;
|
|
836
|
+
private readonly agentName;
|
|
837
|
+
private readonly appStore;
|
|
838
|
+
private readonly destroyRef;
|
|
839
|
+
private readonly agentsStore;
|
|
840
|
+
private readonly logger;
|
|
841
|
+
readonly afterFrame$: Subject<FrameEvent>;
|
|
842
|
+
readonly isAgentGenerating: _angular_core.Signal<boolean>;
|
|
843
|
+
private messageBuilder;
|
|
844
|
+
private _chatId;
|
|
845
|
+
private _generatedTitle;
|
|
846
|
+
get generatedTitle(): string | undefined;
|
|
847
|
+
get chatId(): string;
|
|
848
|
+
set chatId(value: string);
|
|
849
|
+
private _isAgentGenerating;
|
|
850
|
+
setIsAgentGenerating(value: boolean): void;
|
|
851
|
+
constructor();
|
|
852
|
+
buildAgentConnection(): Promise<void>;
|
|
853
|
+
/**
|
|
854
|
+
* Starts a new Agent invocation with the provided history.
|
|
855
|
+
*
|
|
856
|
+
* @param history - The history to send to the agent.
|
|
857
|
+
*
|
|
858
|
+
* @returns A promise that resolves when the history has been sent.
|
|
859
|
+
*/
|
|
860
|
+
sendHistoryToAgent(history: Message[]): Promise<any>;
|
|
861
|
+
stopGeneration(): Promise<undefined>;
|
|
862
|
+
/**
|
|
863
|
+
* Starts the OAuth2 authorization flow for the given MCP client.
|
|
864
|
+
*
|
|
865
|
+
* The backend sends an `OAuthAuthorizationRequired` frame (received via `afterFrame$` as
|
|
866
|
+
* `'oauthRequired'`) containing the full authorization URL, then waits for the platform
|
|
867
|
+
* OAuth callback to complete the token exchange. This method resolves once the full flow
|
|
868
|
+
* finishes — `true` on success, `false` on failure.
|
|
869
|
+
*
|
|
870
|
+
* @param mcpServerName - The name of the MCP server to authorize.
|
|
871
|
+
*
|
|
872
|
+
* @returns A promise that resolves with `true` on success or `false` on failure.
|
|
873
|
+
*/
|
|
874
|
+
authorizeRemoteMcp(mcpServerName: string): Promise<boolean>;
|
|
875
|
+
/**
|
|
876
|
+
* Revokes the OAuth2 authorization for the given MCP server.
|
|
877
|
+
* The backend clears the cached token; the `McpAuthorizationRevoked` frame triggers a
|
|
878
|
+
* details refresh so the UI reflects the updated authorization status.
|
|
879
|
+
*
|
|
880
|
+
* @param mcpServerName - The name of the MCP server whose token should be revoked.
|
|
881
|
+
*
|
|
882
|
+
* @returns A promise that resolves with `true` on success or `false` on failure.
|
|
883
|
+
*/
|
|
884
|
+
revokeRemoteMcp(mcpServerName: string): Promise<boolean>;
|
|
885
|
+
private addAgentFrames;
|
|
886
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AgentService, never>;
|
|
887
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<AgentService>;
|
|
888
|
+
}
|
|
889
|
+
|
|
890
|
+
/** Data hold by the agent state machine */
|
|
891
|
+
type AgentMachineContext = {
|
|
892
|
+
history: Message[];
|
|
893
|
+
message?: Message;
|
|
894
|
+
hasSavedChat: boolean;
|
|
895
|
+
connectionRetryCount: number;
|
|
896
|
+
};
|
|
897
|
+
/** Input to provide at state machine startup */
|
|
898
|
+
type AgentMachineInput = {
|
|
899
|
+
history: Message[];
|
|
900
|
+
hasSavedChat: boolean;
|
|
901
|
+
};
|
|
902
|
+
/** State machine events */
|
|
903
|
+
type AgentMachineEvents = {
|
|
904
|
+
type: 'RETRY_CONNECTION';
|
|
905
|
+
} | {
|
|
906
|
+
type: 'CONNECTION_LOST';
|
|
907
|
+
} | {
|
|
908
|
+
type: 'ON_FRAME_HISTORY';
|
|
909
|
+
history: Message[];
|
|
910
|
+
} | {
|
|
911
|
+
type: 'LOAD_CHAT';
|
|
912
|
+
} | {
|
|
913
|
+
type: 'NEW_MESSAGE';
|
|
914
|
+
message: Message;
|
|
915
|
+
} | {
|
|
916
|
+
type: 'REGENERATE_MESSAGE';
|
|
917
|
+
message: Message;
|
|
918
|
+
} | {
|
|
919
|
+
type: 'EDIT_MESSAGE';
|
|
920
|
+
message: Message;
|
|
921
|
+
} | {
|
|
922
|
+
type: 'EDITION_CANCELED';
|
|
923
|
+
} | {
|
|
924
|
+
type: 'EDITION_VALIDATED';
|
|
925
|
+
newMessage: Message;
|
|
926
|
+
oldMessage: Message;
|
|
927
|
+
} | {
|
|
928
|
+
type: 'PROMPT_USER';
|
|
929
|
+
} | {
|
|
930
|
+
type: 'PROMPT_FEEDBACK_POSITIVE';
|
|
931
|
+
message: Message;
|
|
932
|
+
comment: string;
|
|
933
|
+
} | {
|
|
934
|
+
type: 'PROMPT_FEEDBACK_NEGATIVE';
|
|
935
|
+
message: Message;
|
|
936
|
+
comment: string;
|
|
937
|
+
issueType: string;
|
|
938
|
+
} | {
|
|
939
|
+
type: 'PROMPT_REJECTED';
|
|
940
|
+
} | {
|
|
941
|
+
type: 'APPROVAL_PROVIDED';
|
|
942
|
+
message: Message;
|
|
943
|
+
} | {
|
|
944
|
+
type: 'STOP_GENERATION';
|
|
945
|
+
};
|
|
946
|
+
/**
|
|
947
|
+
* Base class for Agent components, providing state machine functionality.
|
|
948
|
+
*
|
|
949
|
+
* @remarks
|
|
950
|
+
* This class isn't marked as abstract to allow Angular DI to work properly.
|
|
951
|
+
* Extend this class to create specific Agent components.
|
|
952
|
+
* Do not instantiate this class directly.
|
|
953
|
+
*/
|
|
954
|
+
declare class Machine {
|
|
955
|
+
protected readonly inspectXState: boolean | null;
|
|
956
|
+
protected readonly instanceId: string;
|
|
957
|
+
protected readonly agentService: AgentService;
|
|
958
|
+
protected readonly agentsStore: {
|
|
959
|
+
ready: _angular_core.Signal<boolean>;
|
|
960
|
+
savedChatReady: _angular_core.Signal<boolean>;
|
|
961
|
+
debugMessages: _angular_core.Signal<boolean>;
|
|
962
|
+
referenceCache: _angular_core.Signal<Record<string, Reference>>;
|
|
963
|
+
agentDetails: _angular_core.Signal<_sinequa_agent.AgentDetails | undefined>;
|
|
964
|
+
agentDetailsLoading: _angular_core.Signal<boolean>;
|
|
965
|
+
toolChoice: _angular_core.Signal<_sinequa_agent.ToolChoice | undefined>;
|
|
966
|
+
setReady: (ready: boolean) => void;
|
|
967
|
+
setSavedChatReady: (ready: boolean) => void;
|
|
968
|
+
getAgentInstanceConfiguration: (instanceId: string) => z.core.output<typeof AgentConfigSchema> | undefined;
|
|
969
|
+
setDebugMessages: (debug: boolean) => void;
|
|
970
|
+
setReferences: (references: Record<string, Reference>) => void;
|
|
971
|
+
addReference: (reference: Reference) => void;
|
|
972
|
+
addReferences: (references: Record<string, Reference>) => void;
|
|
973
|
+
getReferenceMetas: (id: string) => Reference["metas"] | undefined;
|
|
974
|
+
getAgentDetails: (name: string) => void;
|
|
975
|
+
updateAgentDetails: (name: string) => void;
|
|
976
|
+
reloadAgentDetails: () => void;
|
|
977
|
+
updateToolChoice: (toolChoice: _sinequa_agent.ToolChoice) => void;
|
|
978
|
+
} & _ngrx_signals.WritableStateSource<{
|
|
979
|
+
ready: boolean;
|
|
980
|
+
savedChatReady: boolean;
|
|
981
|
+
debugMessages: boolean;
|
|
982
|
+
referenceCache: Record<string, Reference>;
|
|
983
|
+
agentDetails: _sinequa_agent.AgentDetails | undefined;
|
|
984
|
+
agentDetailsLoading: boolean;
|
|
985
|
+
toolChoice: _sinequa_agent.ToolChoice | undefined;
|
|
986
|
+
}>;
|
|
987
|
+
protected readonly logger: LoggerService;
|
|
988
|
+
protected readonly savedChatsService: SavedChatsService | null;
|
|
989
|
+
protected readonly destroyRef: DestroyRef;
|
|
990
|
+
readonly inputChatId: _angular_core.InputSignal<string | undefined>;
|
|
991
|
+
protected readonly chatId: _angular_core.WritableSignal<string | undefined>;
|
|
992
|
+
protected readonly isReady: _angular_core.Signal<boolean>;
|
|
993
|
+
protected readonly afterHistoryFrame$: rxjs.Observable<HistoryFrame>;
|
|
994
|
+
protected readonly config: _angular_core.WritableSignal<Readonly<{
|
|
995
|
+
defaultAgent: string;
|
|
996
|
+
switchAgents: string[];
|
|
997
|
+
globalSettings: {
|
|
998
|
+
disclaimer: string;
|
|
999
|
+
};
|
|
1000
|
+
connectionSettings: {
|
|
1001
|
+
connectionErrorMessage: string;
|
|
1002
|
+
signalRTransport: "WebSockets" | "ServerSentEvents" | "LongPolling" | "None";
|
|
1003
|
+
signalRLogLevel: "None" | "Trace" | "Debug" | "Information" | "Warning" | "Error" | "Critical";
|
|
1004
|
+
signalRServerTimeoutInMilliseconds: number;
|
|
1005
|
+
signalRSkipNegotiation: boolean;
|
|
1006
|
+
};
|
|
1007
|
+
auditSettings: {
|
|
1008
|
+
issueTypes: string[];
|
|
1009
|
+
logContent: boolean;
|
|
1010
|
+
};
|
|
1011
|
+
additionalToolProperties: Record<string, never>;
|
|
1012
|
+
savedChatSettings?: {
|
|
1013
|
+
enabled: boolean;
|
|
1014
|
+
display: boolean;
|
|
1015
|
+
} | undefined;
|
|
1016
|
+
}> | undefined>;
|
|
1017
|
+
protected readonly state: _angular_core.WritableSignal<string | undefined>;
|
|
1018
|
+
protected agentActor: xstate.Actor<xstate.StateMachine<AgentMachineContext, {
|
|
1019
|
+
type: "RETRY_CONNECTION";
|
|
1020
|
+
} | {
|
|
1021
|
+
type: "CONNECTION_LOST";
|
|
1022
|
+
} | {
|
|
1023
|
+
type: "ON_FRAME_HISTORY";
|
|
1024
|
+
history: Message[];
|
|
1025
|
+
} | {
|
|
1026
|
+
type: "LOAD_CHAT";
|
|
1027
|
+
} | {
|
|
1028
|
+
type: "NEW_MESSAGE";
|
|
1029
|
+
message: Message;
|
|
1030
|
+
} | {
|
|
1031
|
+
type: "REGENERATE_MESSAGE";
|
|
1032
|
+
message: Message;
|
|
1033
|
+
} | {
|
|
1034
|
+
type: "EDIT_MESSAGE";
|
|
1035
|
+
message: Message;
|
|
1036
|
+
} | {
|
|
1037
|
+
type: "EDITION_CANCELED";
|
|
1038
|
+
} | {
|
|
1039
|
+
type: "EDITION_VALIDATED";
|
|
1040
|
+
newMessage: Message;
|
|
1041
|
+
oldMessage: Message;
|
|
1042
|
+
} | {
|
|
1043
|
+
type: "PROMPT_USER";
|
|
1044
|
+
} | {
|
|
1045
|
+
type: "PROMPT_FEEDBACK_POSITIVE";
|
|
1046
|
+
message: Message;
|
|
1047
|
+
comment: string;
|
|
1048
|
+
} | {
|
|
1049
|
+
type: "PROMPT_FEEDBACK_NEGATIVE";
|
|
1050
|
+
message: Message;
|
|
1051
|
+
comment: string;
|
|
1052
|
+
issueType: string;
|
|
1053
|
+
} | {
|
|
1054
|
+
type: "PROMPT_REJECTED";
|
|
1055
|
+
} | {
|
|
1056
|
+
type: "APPROVAL_PROVIDED";
|
|
1057
|
+
message: Message;
|
|
1058
|
+
} | {
|
|
1059
|
+
type: "STOP_GENERATION";
|
|
1060
|
+
}, {
|
|
1061
|
+
[x: string]: xstate.ActorRefFromLogic<xstate.PromiseActorLogic<void, xstate.NonReducibleUnknown, xstate.EventObject>> | xstate.ActorRefFromLogic<xstate.PromiseActorLogic<Message[], xstate.NonReducibleUnknown, xstate.EventObject>> | xstate.ActorRefFromLogic<xstate.PromiseActorLogic<unknown, xstate.NonReducibleUnknown, xstate.EventObject>> | xstate.ActorRefFromLogic<xstate.PromiseActorLogic<undefined, xstate.NonReducibleUnknown, xstate.EventObject>> | undefined;
|
|
1062
|
+
}, {
|
|
1063
|
+
src: "validateAgentConfiguration";
|
|
1064
|
+
logic: xstate.PromiseActorLogic<void, xstate.NonReducibleUnknown, xstate.EventObject>;
|
|
1065
|
+
id: string | undefined;
|
|
1066
|
+
} | {
|
|
1067
|
+
src: "startConnection";
|
|
1068
|
+
logic: xstate.PromiseActorLogic<void, xstate.NonReducibleUnknown, xstate.EventObject>;
|
|
1069
|
+
id: string | undefined;
|
|
1070
|
+
} | {
|
|
1071
|
+
src: "loadSavedChat";
|
|
1072
|
+
logic: xstate.PromiseActorLogic<Message[], xstate.NonReducibleUnknown, xstate.EventObject>;
|
|
1073
|
+
id: string | undefined;
|
|
1074
|
+
} | {
|
|
1075
|
+
src: "upsaveChat";
|
|
1076
|
+
logic: xstate.PromiseActorLogic<unknown, xstate.NonReducibleUnknown, xstate.EventObject>;
|
|
1077
|
+
id: string | undefined;
|
|
1078
|
+
} | {
|
|
1079
|
+
src: "sendHistoryToAgent";
|
|
1080
|
+
logic: xstate.PromiseActorLogic<unknown, xstate.NonReducibleUnknown, xstate.EventObject>;
|
|
1081
|
+
id: string | undefined;
|
|
1082
|
+
} | {
|
|
1083
|
+
src: "stopGeneration";
|
|
1084
|
+
logic: xstate.PromiseActorLogic<undefined, xstate.NonReducibleUnknown, xstate.EventObject>;
|
|
1085
|
+
id: string | undefined;
|
|
1086
|
+
}, {
|
|
1087
|
+
type: "sliceHistoryFromMessageId";
|
|
1088
|
+
params: unknown;
|
|
1089
|
+
} | {
|
|
1090
|
+
type: "raiseEvent";
|
|
1091
|
+
params: {
|
|
1092
|
+
type: string;
|
|
1093
|
+
};
|
|
1094
|
+
} | {
|
|
1095
|
+
type: "incrementConnectionRetryCount";
|
|
1096
|
+
params: unknown;
|
|
1097
|
+
} | {
|
|
1098
|
+
type: "resetConnectionRetryCount";
|
|
1099
|
+
params: unknown;
|
|
1100
|
+
} | {
|
|
1101
|
+
type: "setupChatId";
|
|
1102
|
+
params: unknown;
|
|
1103
|
+
} | {
|
|
1104
|
+
type: "injectFeedbackIntoMessage";
|
|
1105
|
+
params: {
|
|
1106
|
+
action: "positive" | "negative";
|
|
1107
|
+
};
|
|
1108
|
+
} | {
|
|
1109
|
+
type: "updateAgentGeneratingStatus";
|
|
1110
|
+
params: {
|
|
1111
|
+
value: boolean;
|
|
1112
|
+
};
|
|
1113
|
+
}, {
|
|
1114
|
+
type: "canRetryToConnect";
|
|
1115
|
+
params: unknown;
|
|
1116
|
+
} | {
|
|
1117
|
+
type: "hasSavedChat";
|
|
1118
|
+
params: unknown;
|
|
1119
|
+
} | {
|
|
1120
|
+
type: "approvalRequired";
|
|
1121
|
+
params: unknown;
|
|
1122
|
+
}, never, "CheckingAgentConfiguration" | "Connecting" | "ConfigurationIsInvalid" | "RetryToConnect" | "Disconnected" | {
|
|
1123
|
+
Connected: "AgentProcessing" | "Initialize" | "SavedChatLoaded" | "Idle" | "WaitingForApproval" | "Editing" | "PromptingUser" | "EditionValidated" | "EditionCanceled" | "TryUpsaveChat" | "StoppingGeneration" | "UpsaveChat" | "EndOfInteraction" | "FailedToSaveChat";
|
|
1124
|
+
}, string, AgentMachineInput, xstate.NonReducibleUnknown, xstate.EventObject, xstate.MetaObject, {
|
|
1125
|
+
id: "AgentMachine";
|
|
1126
|
+
states: {
|
|
1127
|
+
readonly CheckingAgentConfiguration: {};
|
|
1128
|
+
readonly ConfigurationIsInvalid: {};
|
|
1129
|
+
readonly Connecting: {};
|
|
1130
|
+
readonly RetryToConnect: {};
|
|
1131
|
+
readonly Disconnected: {};
|
|
1132
|
+
readonly Connected: {
|
|
1133
|
+
states: {
|
|
1134
|
+
readonly Initialize: {};
|
|
1135
|
+
readonly SavedChatLoaded: {};
|
|
1136
|
+
readonly Idle: {};
|
|
1137
|
+
readonly Editing: {};
|
|
1138
|
+
readonly EditionValidated: {};
|
|
1139
|
+
readonly EditionCanceled: {};
|
|
1140
|
+
readonly PromptingUser: {};
|
|
1141
|
+
readonly WaitingForApproval: {};
|
|
1142
|
+
readonly AgentProcessing: {};
|
|
1143
|
+
readonly StoppingGeneration: {};
|
|
1144
|
+
readonly TryUpsaveChat: {};
|
|
1145
|
+
readonly UpsaveChat: {};
|
|
1146
|
+
readonly FailedToSaveChat: {};
|
|
1147
|
+
readonly EndOfInteraction: {};
|
|
1148
|
+
};
|
|
1149
|
+
};
|
|
1150
|
+
};
|
|
1151
|
+
}>>;
|
|
1152
|
+
private actorSubscription;
|
|
1153
|
+
protected readonly machine: xstate.StateMachine<AgentMachineContext, {
|
|
1154
|
+
type: "RETRY_CONNECTION";
|
|
1155
|
+
} | {
|
|
1156
|
+
type: "CONNECTION_LOST";
|
|
1157
|
+
} | {
|
|
1158
|
+
type: "ON_FRAME_HISTORY";
|
|
1159
|
+
history: Message[];
|
|
1160
|
+
} | {
|
|
1161
|
+
type: "LOAD_CHAT";
|
|
1162
|
+
} | {
|
|
1163
|
+
type: "NEW_MESSAGE";
|
|
1164
|
+
message: Message;
|
|
1165
|
+
} | {
|
|
1166
|
+
type: "REGENERATE_MESSAGE";
|
|
1167
|
+
message: Message;
|
|
1168
|
+
} | {
|
|
1169
|
+
type: "EDIT_MESSAGE";
|
|
1170
|
+
message: Message;
|
|
1171
|
+
} | {
|
|
1172
|
+
type: "EDITION_CANCELED";
|
|
1173
|
+
} | {
|
|
1174
|
+
type: "EDITION_VALIDATED";
|
|
1175
|
+
newMessage: Message;
|
|
1176
|
+
oldMessage: Message;
|
|
1177
|
+
} | {
|
|
1178
|
+
type: "PROMPT_USER";
|
|
1179
|
+
} | {
|
|
1180
|
+
type: "PROMPT_FEEDBACK_POSITIVE";
|
|
1181
|
+
message: Message;
|
|
1182
|
+
comment: string;
|
|
1183
|
+
} | {
|
|
1184
|
+
type: "PROMPT_FEEDBACK_NEGATIVE";
|
|
1185
|
+
message: Message;
|
|
1186
|
+
comment: string;
|
|
1187
|
+
issueType: string;
|
|
1188
|
+
} | {
|
|
1189
|
+
type: "PROMPT_REJECTED";
|
|
1190
|
+
} | {
|
|
1191
|
+
type: "APPROVAL_PROVIDED";
|
|
1192
|
+
message: Message;
|
|
1193
|
+
} | {
|
|
1194
|
+
type: "STOP_GENERATION";
|
|
1195
|
+
}, {
|
|
1196
|
+
[x: string]: xstate.ActorRefFromLogic<xstate.PromiseActorLogic<void, xstate.NonReducibleUnknown, xstate.EventObject>> | xstate.ActorRefFromLogic<xstate.PromiseActorLogic<Message[], xstate.NonReducibleUnknown, xstate.EventObject>> | xstate.ActorRefFromLogic<xstate.PromiseActorLogic<unknown, xstate.NonReducibleUnknown, xstate.EventObject>> | xstate.ActorRefFromLogic<xstate.PromiseActorLogic<undefined, xstate.NonReducibleUnknown, xstate.EventObject>> | undefined;
|
|
1197
|
+
}, {
|
|
1198
|
+
src: "validateAgentConfiguration";
|
|
1199
|
+
logic: xstate.PromiseActorLogic<void, xstate.NonReducibleUnknown, xstate.EventObject>;
|
|
1200
|
+
id: string | undefined;
|
|
1201
|
+
} | {
|
|
1202
|
+
src: "startConnection";
|
|
1203
|
+
logic: xstate.PromiseActorLogic<void, xstate.NonReducibleUnknown, xstate.EventObject>;
|
|
1204
|
+
id: string | undefined;
|
|
1205
|
+
} | {
|
|
1206
|
+
src: "loadSavedChat";
|
|
1207
|
+
logic: xstate.PromiseActorLogic<Message[], xstate.NonReducibleUnknown, xstate.EventObject>;
|
|
1208
|
+
id: string | undefined;
|
|
1209
|
+
} | {
|
|
1210
|
+
src: "upsaveChat";
|
|
1211
|
+
logic: xstate.PromiseActorLogic<unknown, xstate.NonReducibleUnknown, xstate.EventObject>;
|
|
1212
|
+
id: string | undefined;
|
|
1213
|
+
} | {
|
|
1214
|
+
src: "sendHistoryToAgent";
|
|
1215
|
+
logic: xstate.PromiseActorLogic<unknown, xstate.NonReducibleUnknown, xstate.EventObject>;
|
|
1216
|
+
id: string | undefined;
|
|
1217
|
+
} | {
|
|
1218
|
+
src: "stopGeneration";
|
|
1219
|
+
logic: xstate.PromiseActorLogic<undefined, xstate.NonReducibleUnknown, xstate.EventObject>;
|
|
1220
|
+
id: string | undefined;
|
|
1221
|
+
}, {
|
|
1222
|
+
type: "sliceHistoryFromMessageId";
|
|
1223
|
+
params: unknown;
|
|
1224
|
+
} | {
|
|
1225
|
+
type: "raiseEvent";
|
|
1226
|
+
params: {
|
|
1227
|
+
type: string;
|
|
1228
|
+
};
|
|
1229
|
+
} | {
|
|
1230
|
+
type: "incrementConnectionRetryCount";
|
|
1231
|
+
params: unknown;
|
|
1232
|
+
} | {
|
|
1233
|
+
type: "resetConnectionRetryCount";
|
|
1234
|
+
params: unknown;
|
|
1235
|
+
} | {
|
|
1236
|
+
type: "setupChatId";
|
|
1237
|
+
params: unknown;
|
|
1238
|
+
} | {
|
|
1239
|
+
type: "injectFeedbackIntoMessage";
|
|
1240
|
+
params: {
|
|
1241
|
+
action: "positive" | "negative";
|
|
1242
|
+
};
|
|
1243
|
+
} | {
|
|
1244
|
+
type: "updateAgentGeneratingStatus";
|
|
1245
|
+
params: {
|
|
1246
|
+
value: boolean;
|
|
1247
|
+
};
|
|
1248
|
+
}, {
|
|
1249
|
+
type: "canRetryToConnect";
|
|
1250
|
+
params: unknown;
|
|
1251
|
+
} | {
|
|
1252
|
+
type: "hasSavedChat";
|
|
1253
|
+
params: unknown;
|
|
1254
|
+
} | {
|
|
1255
|
+
type: "approvalRequired";
|
|
1256
|
+
params: unknown;
|
|
1257
|
+
}, never, "CheckingAgentConfiguration" | "Connecting" | "ConfigurationIsInvalid" | "RetryToConnect" | "Disconnected" | {
|
|
1258
|
+
Connected: "AgentProcessing" | "Initialize" | "SavedChatLoaded" | "Idle" | "WaitingForApproval" | "Editing" | "PromptingUser" | "EditionValidated" | "EditionCanceled" | "TryUpsaveChat" | "StoppingGeneration" | "UpsaveChat" | "EndOfInteraction" | "FailedToSaveChat";
|
|
1259
|
+
}, string, AgentMachineInput, xstate.NonReducibleUnknown, xstate.EventObject, xstate.MetaObject, {
|
|
1260
|
+
id: "AgentMachine";
|
|
1261
|
+
states: {
|
|
1262
|
+
readonly CheckingAgentConfiguration: {};
|
|
1263
|
+
readonly ConfigurationIsInvalid: {};
|
|
1264
|
+
readonly Connecting: {};
|
|
1265
|
+
readonly RetryToConnect: {};
|
|
1266
|
+
readonly Disconnected: {};
|
|
1267
|
+
readonly Connected: {
|
|
1268
|
+
states: {
|
|
1269
|
+
readonly Initialize: {};
|
|
1270
|
+
readonly SavedChatLoaded: {};
|
|
1271
|
+
readonly Idle: {};
|
|
1272
|
+
readonly Editing: {};
|
|
1273
|
+
readonly EditionValidated: {};
|
|
1274
|
+
readonly EditionCanceled: {};
|
|
1275
|
+
readonly PromptingUser: {};
|
|
1276
|
+
readonly WaitingForApproval: {};
|
|
1277
|
+
readonly AgentProcessing: {};
|
|
1278
|
+
readonly StoppingGeneration: {};
|
|
1279
|
+
readonly TryUpsaveChat: {};
|
|
1280
|
+
readonly UpsaveChat: {};
|
|
1281
|
+
readonly FailedToSaveChat: {};
|
|
1282
|
+
readonly EndOfInteraction: {};
|
|
1283
|
+
};
|
|
1284
|
+
};
|
|
1285
|
+
};
|
|
1286
|
+
}>;
|
|
1287
|
+
constructor();
|
|
1288
|
+
getChatId(): string | undefined;
|
|
1289
|
+
/**
|
|
1290
|
+
* Updates the Agent machine context with the received history frame.
|
|
1291
|
+
*
|
|
1292
|
+
* @param history - History frame received from SignalR.
|
|
1293
|
+
*/
|
|
1294
|
+
protected onHistory(history: HistoryFrame): void;
|
|
1295
|
+
/** Listen to state changes from the XState actor and propagate them to the state signal. */
|
|
1296
|
+
private listenToStateChanges;
|
|
1297
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<Machine, never>;
|
|
1298
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<Machine, "abstract-agent-machine", never, { "inputChatId": { "alias": "chatId"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1299
|
+
}
|
|
1300
|
+
|
|
1301
|
+
declare class Agent extends Machine {
|
|
1302
|
+
private readonly el;
|
|
1303
|
+
private readonly parentEl;
|
|
1304
|
+
private readonly mainEl;
|
|
1305
|
+
private readonly principalStore;
|
|
1306
|
+
readonly principal: _ngrx_signals.DeepSignal<_sinequa_atomic.Principal>;
|
|
1307
|
+
readonly firstName: _angular_core.Signal<any>;
|
|
1308
|
+
private readonly messageList;
|
|
1309
|
+
private readonly chatInput;
|
|
1310
|
+
private readonly like;
|
|
1311
|
+
private readonly dislike;
|
|
1312
|
+
protected readonly message: _angular_core.WritableSignal<Message | undefined>;
|
|
1313
|
+
protected readonly history: _angular_core.WritableSignal<Message[] | undefined>;
|
|
1314
|
+
protected readonly reportedMessage: _angular_core.WritableSignal<Message | undefined>;
|
|
1315
|
+
protected readonly isUiLocked: _angular_core.WritableSignal<boolean>;
|
|
1316
|
+
protected readonly afterMessageFrame$: rxjs.Observable<MessageFrame>;
|
|
1317
|
+
private pendingApprovalResponses;
|
|
1318
|
+
constructor();
|
|
1319
|
+
getHistory(): Message[] | undefined;
|
|
1320
|
+
/**
|
|
1321
|
+
* Handles the start of a new chat session.
|
|
1322
|
+
* @param event The event triggering the new chat.
|
|
1323
|
+
* @returns void
|
|
1324
|
+
*/
|
|
1325
|
+
private startNewChat;
|
|
1326
|
+
/**
|
|
1327
|
+
* Binds event handlers to the agent actor's state machine events.
|
|
1328
|
+
*
|
|
1329
|
+
* This method sets up listeners for various state machine events and maps them to appropriate
|
|
1330
|
+
* handler functions that manage UI state, message list operations, and error handling.
|
|
1331
|
+
*
|
|
1332
|
+
* The following events are handled:
|
|
1333
|
+
* - `PROMPT_USER_ENTER`: Locks the UI when prompting the user
|
|
1334
|
+
* - `PROMPT_USER_EXIT`: Unlocks the UI when prompt is dismissed
|
|
1335
|
+
* - `CLEAR_MESSAGE_LIST_FROM`: Regenerates messages from a specific message ID
|
|
1336
|
+
* - `AGENT_INVOCATION_FAILED`: Dispatches an error event when agent invocation fails
|
|
1337
|
+
* - `EDITION_STARTED`: Locks messages and populates chat input for editing
|
|
1338
|
+
* - `EDITION_COMPLETED`: Clears locked messages after successful edit
|
|
1339
|
+
* - `EDITION_ABORTED`: Unlocks messages and cancels chat input on edit cancellation
|
|
1340
|
+
* - `SAVED_CHAT_LOADED`: Updates the history state when a saved chat is loaded
|
|
1341
|
+
* - `APPROVAL_MODE_ENTER`: Enters approval mode, clears pending approvals if any, and locks the UI
|
|
1342
|
+
* - `APPROVAL_MODE_EXIT`: Exits approval mode, unlocks the UI, and clears pending approvals
|
|
1343
|
+
* - `AGENT_STOPPED_GENERATION`: Generation was successfully stopped.
|
|
1344
|
+
* - `AGENT_FAILED_TO_STOP_GENERATION`: Generation failed to stop.
|
|
1345
|
+
*
|
|
1346
|
+
* @private
|
|
1347
|
+
*/
|
|
1348
|
+
private bindMachineEvents;
|
|
1349
|
+
/**
|
|
1350
|
+
* Handles custom events emitted by child components.
|
|
1351
|
+
* @param event - The custom event containing action details.
|
|
1352
|
+
*/
|
|
1353
|
+
private customEventSwitch;
|
|
1354
|
+
private handleFeedbackPrompts;
|
|
1355
|
+
/**
|
|
1356
|
+
* Handles the function approval response by storing it and checking if all pending approvals have been responded to.
|
|
1357
|
+
* @param data - The approval response data received
|
|
1358
|
+
*/
|
|
1359
|
+
private handleApprovalResponse;
|
|
1360
|
+
/**
|
|
1361
|
+
* Handles user sent text.
|
|
1362
|
+
* @param text - The user input text.
|
|
1363
|
+
*/
|
|
1364
|
+
protected userValidatedInput(text: string): void;
|
|
1365
|
+
/**
|
|
1366
|
+
* Updates the UI with the received message frame.
|
|
1367
|
+
* @param message - Message frame received from SignalR.
|
|
1368
|
+
*/
|
|
1369
|
+
private onMessage;
|
|
1370
|
+
private initResizeObserver;
|
|
1371
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<Agent, never>;
|
|
1372
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<Agent, "Agent,agent", never, {}, {}, never, never, true, never>;
|
|
1373
|
+
}
|
|
1374
|
+
|
|
1375
|
+
declare class AgentInjector implements OnInit {
|
|
1376
|
+
private readonly injector;
|
|
1377
|
+
private readonly viewContainer;
|
|
1378
|
+
private readonly elementRef;
|
|
1379
|
+
private readonly renderer;
|
|
1380
|
+
private readonly store;
|
|
1381
|
+
readonly instanceId: _angular_core.InputSignal<string>;
|
|
1382
|
+
readonly chatId: _angular_core.InputSignal<string | undefined>;
|
|
1383
|
+
ngOnInit(): void;
|
|
1384
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AgentInjector, never>;
|
|
1385
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AgentInjector, "AgentInjector,agent-injector,agentinjector", never, { "instanceId": { "alias": "instanceId"; "required": true; "isSignal": true; }; "chatId": { "alias": "chatId"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1386
|
+
}
|
|
1387
|
+
|
|
1388
|
+
declare class MessageBuilder {
|
|
1389
|
+
private _message;
|
|
1390
|
+
constructor(message?: Message | undefined);
|
|
1391
|
+
getMessage(): Message | undefined;
|
|
1392
|
+
clear(): void;
|
|
1393
|
+
createUserMessage(text: string): void;
|
|
1394
|
+
createAgentMessage(): void;
|
|
1395
|
+
createFunctionApprovalResponseMessage(): void;
|
|
1396
|
+
setMessageId(messageId: string): void;
|
|
1397
|
+
setMessageContextFromHistoryFrame(historyFrame: HistoryFrame): void;
|
|
1398
|
+
setContent(content: MessageContent[]): void;
|
|
1399
|
+
appendContent(content: MessageContent): void;
|
|
1400
|
+
appendDebugMessageFrame(debugMessage: DebugMessageProperties): void;
|
|
1401
|
+
private setAdditionalProperties;
|
|
1402
|
+
}
|
|
1403
|
+
|
|
1404
|
+
declare class CopyableFieldComponent {
|
|
1405
|
+
readonly label: _angular_core.InputSignal<string>;
|
|
1406
|
+
readonly value: _angular_core.InputSignal<string>;
|
|
1407
|
+
readonly copyResult: _angular_core.OutputEmitterRef<{
|
|
1408
|
+
field: string;
|
|
1409
|
+
status: "success" | "failure";
|
|
1410
|
+
}>;
|
|
1411
|
+
private readonly copyState;
|
|
1412
|
+
protected readonly copied: _angular_core.Signal<boolean>;
|
|
1413
|
+
copy(): Promise<void>;
|
|
1414
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopyableFieldComponent, never>;
|
|
1415
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CopyableFieldComponent, "copyable-field", never, { "label": { "alias": "label"; "required": true; "isSignal": true; }; "value": { "alias": "value"; "required": true; "isSignal": true; }; }, { "copyResult": "copyResult"; }, never, never, true, never>;
|
|
1416
|
+
}
|
|
1417
|
+
|
|
1418
|
+
/**
|
|
1419
|
+
* Handles the OAuth2 redirect callback.
|
|
1420
|
+
*
|
|
1421
|
+
* This component should be registered at the `/oauth-callback` route in the consuming application:
|
|
1422
|
+
* ```ts
|
|
1423
|
+
* { path: 'oauth-callback', component: OAuthCallbackComponent }
|
|
1424
|
+
* ```
|
|
1425
|
+
*
|
|
1426
|
+
* On load it reads the `code` query parameter and posts it back to the opener window
|
|
1427
|
+
* via `postMessage`, then closes itself.
|
|
1428
|
+
*/
|
|
1429
|
+
declare class OAuthCallbackComponent implements OnInit {
|
|
1430
|
+
private readonly route;
|
|
1431
|
+
ngOnInit(): void;
|
|
1432
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<OAuthCallbackComponent, never>;
|
|
1433
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<OAuthCallbackComponent, "oauth-callback", never, {}, {}, never, never, true, never>;
|
|
1434
|
+
}
|
|
1435
|
+
|
|
1436
|
+
declare class AdminDirective {
|
|
1437
|
+
private readonly el;
|
|
1438
|
+
constructor();
|
|
1439
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AdminDirective, never>;
|
|
1440
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AdminDirective, "[admin]", never, {}, {}, never, never, true, never>;
|
|
1441
|
+
}
|
|
1442
|
+
|
|
1443
|
+
declare class AgentGenerationDirective {
|
|
1444
|
+
private readonly el;
|
|
1445
|
+
private t;
|
|
1446
|
+
constructor();
|
|
1447
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AgentGenerationDirective, never>;
|
|
1448
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AgentGenerationDirective, "[agentGeneration]", never, {}, {}, never, never, true, never>;
|
|
1449
|
+
}
|
|
1450
|
+
|
|
1451
|
+
declare class CopyToClipboardDirective {
|
|
1452
|
+
private readonly el;
|
|
1453
|
+
constructor();
|
|
1454
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopyToClipboardDirective, never>;
|
|
1455
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<CopyToClipboardDirective, "[copyToClipboard]", never, {}, {}, never, never, true, never>;
|
|
1456
|
+
}
|
|
1457
|
+
|
|
1458
|
+
declare class ErrorDirective {
|
|
1459
|
+
private readonly el;
|
|
1460
|
+
constructor();
|
|
1461
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ErrorDirective, never>;
|
|
1462
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ErrorDirective, "[error]", never, {}, {}, never, never, true, never>;
|
|
1463
|
+
}
|
|
1464
|
+
|
|
1465
|
+
declare class FeedbackDirective {
|
|
1466
|
+
private readonly el;
|
|
1467
|
+
constructor();
|
|
1468
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FeedbackDirective, never>;
|
|
1469
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<FeedbackDirective, "[feedback]", never, {}, {}, never, never, true, never>;
|
|
1470
|
+
}
|
|
1471
|
+
|
|
1472
|
+
declare class InfoPanelComponent {
|
|
1473
|
+
protected readonly instanceId: string;
|
|
1474
|
+
private readonly agentName;
|
|
1475
|
+
protected readonly agentsStore: {
|
|
1476
|
+
ready: _angular_core.Signal<boolean>;
|
|
1477
|
+
savedChatReady: _angular_core.Signal<boolean>;
|
|
1478
|
+
debugMessages: _angular_core.Signal<boolean>;
|
|
1479
|
+
referenceCache: _angular_core.Signal<Record<string, Reference>>;
|
|
1480
|
+
agentDetails: _angular_core.Signal<_sinequa_agent.AgentDetails | undefined>;
|
|
1481
|
+
agentDetailsLoading: _angular_core.Signal<boolean>;
|
|
1482
|
+
toolChoice: _angular_core.Signal<_sinequa_agent.ToolChoice | undefined>;
|
|
1483
|
+
setReady: (ready: boolean) => void;
|
|
1484
|
+
setSavedChatReady: (ready: boolean) => void;
|
|
1485
|
+
getAgentInstanceConfiguration: (instanceId: string) => z.infer<typeof _sinequa_agent.AgentConfigSchema> | undefined;
|
|
1486
|
+
setDebugMessages: (debug: boolean) => void;
|
|
1487
|
+
setReferences: (references: Record<string, Reference>) => void;
|
|
1488
|
+
addReference: (reference: Reference) => void;
|
|
1489
|
+
addReferences: (references: Record<string, Reference>) => void;
|
|
1490
|
+
getReferenceMetas: (id: string) => Reference["metas"] | undefined;
|
|
1491
|
+
getAgentDetails: (name: string) => void;
|
|
1492
|
+
updateAgentDetails: (name: string) => void;
|
|
1493
|
+
reloadAgentDetails: () => void;
|
|
1494
|
+
updateToolChoice: (toolChoice: _sinequa_agent.ToolChoice) => void;
|
|
1495
|
+
} & _ngrx_signals.WritableStateSource<{
|
|
1496
|
+
ready: boolean;
|
|
1497
|
+
savedChatReady: boolean;
|
|
1498
|
+
debugMessages: boolean;
|
|
1499
|
+
referenceCache: Record<string, Reference>;
|
|
1500
|
+
agentDetails: _sinequa_agent.AgentDetails | undefined;
|
|
1501
|
+
agentDetailsLoading: boolean;
|
|
1502
|
+
toolChoice: _sinequa_agent.ToolChoice | undefined;
|
|
1503
|
+
}>;
|
|
1504
|
+
private readonly principal;
|
|
1505
|
+
private readonly md;
|
|
1506
|
+
readonly chatId: _angular_core.InputSignal<string | undefined>;
|
|
1507
|
+
protected readonly isAdminOrDelegatedAdmin: _angular_core.Signal<boolean>;
|
|
1508
|
+
constructor();
|
|
1509
|
+
private readonly sanitizer;
|
|
1510
|
+
protected readonly renderedPrompt: _angular_core.Signal<string>;
|
|
1511
|
+
protected readonly icon: _angular_core.Signal<_angular_platform_browser.SafeHtml | null>;
|
|
1512
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<InfoPanelComponent, never>;
|
|
1513
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<InfoPanelComponent, "InfoPanel,info-panel,infopanel", never, { "chatId": { "alias": "chatId"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1514
|
+
}
|
|
1515
|
+
|
|
1516
|
+
declare enum ChatInputMode {
|
|
1517
|
+
Default = "default",
|
|
1518
|
+
Edit = "edit"
|
|
1519
|
+
}
|
|
1520
|
+
declare class ChatInput {
|
|
1521
|
+
cn: typeof cn;
|
|
1522
|
+
private readonly principal;
|
|
1523
|
+
private readonly agentsStore;
|
|
1524
|
+
protected readonly menuMinWidth: _angular_core.Signal<"clamp(300px, 80vw, 500px)" | "clamp(200px, 80vw, 300px)">;
|
|
1525
|
+
private readonly el;
|
|
1526
|
+
protected readonly isConnected: _angular_core.Signal<boolean | undefined>;
|
|
1527
|
+
protected readonly agentName: string;
|
|
1528
|
+
private readonly textInput;
|
|
1529
|
+
readonly chatId: _angular_core.InputSignal<string | undefined>;
|
|
1530
|
+
readonly class: _angular_core.InputSignal<string | undefined>;
|
|
1531
|
+
readonly variant: _angular_core.InputSignal<"default" | "primary" | "secondary" | "destructive" | "ai" | null | undefined>;
|
|
1532
|
+
readonly decoration: _angular_core.InputSignal<"none" | "outline" | null | undefined>;
|
|
1533
|
+
readonly loading: _angular_core.InputSignal<boolean>;
|
|
1534
|
+
readonly value: _angular_core.OutputEmitterRef<string>;
|
|
1535
|
+
protected readonly text: _angular_core.ModelSignal<string>;
|
|
1536
|
+
protected readonly showCancel: _angular_core.WritableSignal<boolean>;
|
|
1537
|
+
protected readonly canStopGeneration: _angular_core.WritableSignal<boolean>;
|
|
1538
|
+
readonly isAdminOrDelegatedAdmin: _angular_core.Signal<boolean>;
|
|
1539
|
+
protected readonly variants: _angular_core.Signal<string>;
|
|
1540
|
+
protected readonly canSend: _angular_core.Signal<boolean | undefined>;
|
|
1541
|
+
protected readonly displayName: _angular_core.Signal<string>;
|
|
1542
|
+
submit(event?: Event): void;
|
|
1543
|
+
edit(text: string): void;
|
|
1544
|
+
cancel(): void;
|
|
1545
|
+
protected dispatchEvent(action: InputAction, payload?: any): void;
|
|
1546
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ChatInput, never>;
|
|
1547
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ChatInput, "ChatInput,chat-input,chatinput", never, { "chatId": { "alias": "chatId"; "required": false; "isSignal": true; }; "class": { "alias": "class"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "decoration": { "alias": "decoration"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "text": { "alias": "text"; "required": false; "isSignal": true; }; }, { "value": "value"; "text": "textChange"; }, never, never, true, never>;
|
|
1548
|
+
}
|
|
1549
|
+
|
|
1550
|
+
type DialogState = 'info' | 'waiting';
|
|
1551
|
+
/**
|
|
1552
|
+
* Modal dialog for connecting an MCP client via OAuth2.
|
|
1553
|
+
*
|
|
1554
|
+
* Displays MCP client information and manages the two-phase OAuth flow:
|
|
1555
|
+
* 1. Info state — shows the client name/description and a Connect button.
|
|
1556
|
+
* 2. Waiting state — shows a spinner/message while the user authenticates in the external tab.
|
|
1557
|
+
*
|
|
1558
|
+
* Opens itself automatically when mounted. Emits `connected` on successful auth
|
|
1559
|
+
* and `cancelled` when the user dismisses or cancels.
|
|
1560
|
+
*/
|
|
1561
|
+
declare class McpConnectDialogComponent {
|
|
1562
|
+
private readonly agentService;
|
|
1563
|
+
private readonly destroyRef;
|
|
1564
|
+
/** The MCP client to authorize. */
|
|
1565
|
+
readonly client: _angular_core.InputSignal<McpClient>;
|
|
1566
|
+
/** Emitted after a successful OAuth authorization. */
|
|
1567
|
+
readonly connected: _angular_core.OutputEmitterRef<void>;
|
|
1568
|
+
/** Emitted when the user cancels or closes the dialog without completing auth. */
|
|
1569
|
+
readonly cancelled: _angular_core.OutputEmitterRef<void>;
|
|
1570
|
+
private readonly dialogRef;
|
|
1571
|
+
protected readonly state: _angular_core.WritableSignal<DialogState>;
|
|
1572
|
+
private closedByOutcome;
|
|
1573
|
+
constructor();
|
|
1574
|
+
protected connect(): Promise<void>;
|
|
1575
|
+
protected cancelAndClose(): void;
|
|
1576
|
+
protected onDialogClose(): void;
|
|
1577
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<McpConnectDialogComponent, never>;
|
|
1578
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<McpConnectDialogComponent, "mcp-connect-dialog", never, { "client": { "alias": "client"; "required": true; "isSignal": true; }; }, { "connected": "connected"; "cancelled": "cancelled"; }, never, never, true, never>;
|
|
1579
|
+
}
|
|
1580
|
+
|
|
1581
|
+
declare class McpServerItemComponent {
|
|
1582
|
+
readonly name: _angular_core.InputSignal<string>;
|
|
1583
|
+
readonly panelId: _angular_core.InputSignal<string>;
|
|
1584
|
+
readonly icon: _angular_core.InputSignal<string | undefined>;
|
|
1585
|
+
readonly description: _angular_core.InputSignal<string | undefined>;
|
|
1586
|
+
readonly functions: _angular_core.InputSignal<McpTool[] | undefined>;
|
|
1587
|
+
readonly isOpen: _angular_core.InputSignal<boolean>;
|
|
1588
|
+
readonly toggled: _angular_core.OutputEmitterRef<void>;
|
|
1589
|
+
readonly closed: _angular_core.OutputEmitterRef<void>;
|
|
1590
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<McpServerItemComponent, never>;
|
|
1591
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<McpServerItemComponent, "mcp-server-item", never, { "name": { "alias": "name"; "required": true; "isSignal": true; }; "panelId": { "alias": "panelId"; "required": true; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "description": { "alias": "description"; "required": false; "isSignal": true; }; "functions": { "alias": "functions"; "required": false; "isSignal": true; }; "isOpen": { "alias": "isOpen"; "required": false; "isSignal": true; }; }, { "toggled": "toggled"; "closed": "closed"; }, never, never, true, never>;
|
|
1592
|
+
}
|
|
1593
|
+
|
|
1594
|
+
declare class AvailableInternalToolsComponent {
|
|
1595
|
+
readonly agentDetails: _angular_core.InputSignal<AgentDetails>;
|
|
1596
|
+
readonly selectable: _angular_core.InputSignal<boolean>;
|
|
1597
|
+
readonly showHeading: _angular_core.InputSignal<boolean>;
|
|
1598
|
+
readonly selectedTools: _angular_core.ModelSignal<string[]>;
|
|
1599
|
+
protected readonly internalTools: _angular_core.Signal<_sinequa_agent.InternalTool[]>;
|
|
1600
|
+
private readonly selectedSet;
|
|
1601
|
+
protected toggleTool(name: string): void;
|
|
1602
|
+
protected isToolSelected(name: string): boolean;
|
|
1603
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AvailableInternalToolsComponent, never>;
|
|
1604
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AvailableInternalToolsComponent, "AvailableInternalTools,available-internal-tools,availableinternaltools", never, { "agentDetails": { "alias": "agentDetails"; "required": true; "isSignal": true; }; "selectable": { "alias": "selectable"; "required": false; "isSignal": true; }; "showHeading": { "alias": "showHeading"; "required": false; "isSignal": true; }; "selectedTools": { "alias": "selectedTools"; "required": false; "isSignal": true; }; }, { "selectedTools": "selectedToolsChange"; }, never, never, true, never>;
|
|
1605
|
+
}
|
|
1606
|
+
|
|
1607
|
+
declare class AvailableMcpServersComponent {
|
|
1608
|
+
private readonly agentService;
|
|
1609
|
+
readonly agentDetails: _angular_core.InputSignal<AgentDetails>;
|
|
1610
|
+
readonly selectable: _angular_core.InputSignal<boolean>;
|
|
1611
|
+
readonly showHeading: _angular_core.InputSignal<boolean>;
|
|
1612
|
+
readonly selectedMcpClients: _angular_core.ModelSignal<{
|
|
1613
|
+
name: string;
|
|
1614
|
+
tools: string[];
|
|
1615
|
+
}[]>;
|
|
1616
|
+
protected readonly openMcpCard: _angular_core.WritableSignal<string | null>;
|
|
1617
|
+
protected readonly connectingClient: _angular_core.WritableSignal<McpClient | null>;
|
|
1618
|
+
protected readonly confirmingRevokeClient: _angular_core.WritableSignal<McpClient | null>;
|
|
1619
|
+
protected readonly revokingClient: _angular_core.WritableSignal<string | null>;
|
|
1620
|
+
protected readonly mcpClients: _angular_core.Signal<McpClient[]>;
|
|
1621
|
+
private readonly selectedNames;
|
|
1622
|
+
protected isGranted(client: McpClient): boolean;
|
|
1623
|
+
protected toggleMcpCard(key: string): void;
|
|
1624
|
+
protected toggleClient(client: McpClient): void;
|
|
1625
|
+
protected isClientSelected(clientName: string): boolean;
|
|
1626
|
+
protected onConnected(client: McpClient): void;
|
|
1627
|
+
protected onRevokeConfirmed(client: McpClient): Promise<void>;
|
|
1628
|
+
protected revokeClient(client: McpClient): Promise<void>;
|
|
1629
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AvailableMcpServersComponent, never>;
|
|
1630
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AvailableMcpServersComponent, "AvailableMcpServers,available-mcp-servers,availablemcpservers", never, { "agentDetails": { "alias": "agentDetails"; "required": true; "isSignal": true; }; "selectable": { "alias": "selectable"; "required": false; "isSignal": true; }; "showHeading": { "alias": "showHeading"; "required": false; "isSignal": true; }; "selectedMcpClients": { "alias": "selectedMcpClients"; "required": false; "isSignal": true; }; }, { "selectedMcpClients": "selectedMcpClientsChange"; }, never, never, true, never>;
|
|
1631
|
+
}
|
|
1632
|
+
|
|
1633
|
+
declare class ToolsSelectionPanelComponent {
|
|
1634
|
+
private readonly agentName;
|
|
1635
|
+
protected readonly agentsStore: {
|
|
1636
|
+
ready: _angular_core.Signal<boolean>;
|
|
1637
|
+
savedChatReady: _angular_core.Signal<boolean>;
|
|
1638
|
+
debugMessages: _angular_core.Signal<boolean>;
|
|
1639
|
+
referenceCache: _angular_core.Signal<Record<string, Reference>>;
|
|
1640
|
+
agentDetails: _angular_core.Signal<AgentDetails | undefined>;
|
|
1641
|
+
agentDetailsLoading: _angular_core.Signal<boolean>;
|
|
1642
|
+
toolChoice: _angular_core.Signal<_sinequa_agent.ToolChoice | undefined>;
|
|
1643
|
+
setReady: (ready: boolean) => void;
|
|
1644
|
+
setSavedChatReady: (ready: boolean) => void;
|
|
1645
|
+
getAgentInstanceConfiguration: (instanceId: string) => z.infer<typeof _sinequa_agent.AgentConfigSchema> | undefined;
|
|
1646
|
+
setDebugMessages: (debug: boolean) => void;
|
|
1647
|
+
setReferences: (references: Record<string, Reference>) => void;
|
|
1648
|
+
addReference: (reference: Reference) => void;
|
|
1649
|
+
addReferences: (references: Record<string, Reference>) => void;
|
|
1650
|
+
getReferenceMetas: (id: string) => Reference["metas"] | undefined;
|
|
1651
|
+
getAgentDetails: (name: string) => void;
|
|
1652
|
+
updateAgentDetails: (name: string) => void;
|
|
1653
|
+
reloadAgentDetails: () => void;
|
|
1654
|
+
updateToolChoice: (toolChoice: _sinequa_agent.ToolChoice) => void;
|
|
1655
|
+
} & _ngrx_signals.WritableStateSource<{
|
|
1656
|
+
ready: boolean;
|
|
1657
|
+
savedChatReady: boolean;
|
|
1658
|
+
debugMessages: boolean;
|
|
1659
|
+
referenceCache: Record<string, Reference>;
|
|
1660
|
+
agentDetails: AgentDetails | undefined;
|
|
1661
|
+
agentDetailsLoading: boolean;
|
|
1662
|
+
toolChoice: _sinequa_agent.ToolChoice | undefined;
|
|
1663
|
+
}>;
|
|
1664
|
+
readonly chatId: _angular_core.InputSignal<string | undefined>;
|
|
1665
|
+
protected readonly selectedInternalTools: _angular_core.WritableSignal<string[]>;
|
|
1666
|
+
protected readonly selectedMcpClients: _angular_core.WritableSignal<{
|
|
1667
|
+
name: string;
|
|
1668
|
+
tools: string[];
|
|
1669
|
+
}[]>;
|
|
1670
|
+
constructor();
|
|
1671
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ToolsSelectionPanelComponent, never>;
|
|
1672
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ToolsSelectionPanelComponent, "ToolsSelectionPanel,tools-selection-panel,toolsselectionpanel", never, { "chatId": { "alias": "chatId"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1673
|
+
}
|
|
1674
|
+
|
|
1675
|
+
/**
|
|
1676
|
+
* This class allows {@link MessageList} to keep track of any instantiated message component,
|
|
1677
|
+
* and calls their {@link ComponentRef.destroy} lifecycle hooks when {@link MessageList} needs to be cleared.
|
|
1678
|
+
*/
|
|
1679
|
+
declare abstract class MessageBaseComponent {
|
|
1680
|
+
protected readonly el: ElementRef<any>;
|
|
1681
|
+
abstract getMessageId(): string | undefined;
|
|
1682
|
+
abstract getType(): MessageComponentType;
|
|
1683
|
+
protected dispatchEvent(event: CustomEvent): void;
|
|
1684
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MessageBaseComponent, never>;
|
|
1685
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MessageBaseComponent, "abstract-base-message", never, {}, {}, never, never, true, never>;
|
|
1686
|
+
}
|
|
1687
|
+
|
|
1688
|
+
declare class MessageService {
|
|
1689
|
+
readonly stream$: BehaviorSubject<Message | undefined>;
|
|
1690
|
+
readonly debugStream$: BehaviorSubject<DebugMessageProperties | undefined>;
|
|
1691
|
+
next(message: Message): void;
|
|
1692
|
+
nextDebug(debug: DebugMessageProperties): void;
|
|
1693
|
+
complete(): void;
|
|
1694
|
+
completeDebug(): void;
|
|
1695
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MessageService, never>;
|
|
1696
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<MessageService>;
|
|
1697
|
+
}
|
|
1698
|
+
|
|
1699
|
+
declare class MessageAgentComponent extends MessageBaseComponent {
|
|
1700
|
+
private readonly messageService;
|
|
1701
|
+
readonly message: _angular_core.WritableSignal<Message | undefined>;
|
|
1702
|
+
readonly done: _angular_core.WritableSignal<boolean>;
|
|
1703
|
+
readonly showToolbar: _angular_core.WritableSignal<boolean>;
|
|
1704
|
+
readonly showDebugPanel: _angular_core.WritableSignal<boolean>;
|
|
1705
|
+
readonly showDebugButton: _angular_core.WritableSignal<boolean>;
|
|
1706
|
+
/**
|
|
1707
|
+
* When true, the toolbar is not rendered. Used by MessageList to suppress the toolbar
|
|
1708
|
+
* on intermediate text segments, repositioning it below tool/approval cards instead.
|
|
1709
|
+
*/
|
|
1710
|
+
readonly hideToolbar: _angular_core.InputSignal<boolean>;
|
|
1711
|
+
/**
|
|
1712
|
+
* When true, the text content is not rendered. Used by MessageList to insert a
|
|
1713
|
+
* toolbar-only ghost component after tool/approval cards — the component carries
|
|
1714
|
+
* the message data for copy/regenerate actions without duplicating visible text.
|
|
1715
|
+
*/
|
|
1716
|
+
readonly hideContent: _angular_core.InputSignal<boolean>;
|
|
1717
|
+
/**
|
|
1718
|
+
* Character offset into the flattened text. The backend accumulates all streamed text
|
|
1719
|
+
* into a single growing string; when a tool call splits the stream mid-turn, the next
|
|
1720
|
+
* visual component skips the already-displayed prefix by slicing from this offset.
|
|
1721
|
+
* Set to 0 (default) when no split occurred.
|
|
1722
|
+
*/
|
|
1723
|
+
readonly textOffset: _angular_core.InputSignal<number>;
|
|
1724
|
+
readonly messageId: _angular_core.WritableSignal<string | undefined>;
|
|
1725
|
+
readonly flattenedContent: _angular_core.Signal<string>;
|
|
1726
|
+
readonly feedback: _angular_core.WritableSignal<"positive" | "negative" | undefined>;
|
|
1727
|
+
constructor();
|
|
1728
|
+
getService(): MessageService;
|
|
1729
|
+
getMessageId(): string | undefined;
|
|
1730
|
+
getType(): MessageComponentType;
|
|
1731
|
+
messageAction(event: MessageAgentActionEvent): void;
|
|
1732
|
+
debugMessage(): void;
|
|
1733
|
+
dispatchMessageAction(action: MessageAgentAction, includeMessage?: boolean): void;
|
|
1734
|
+
feedbackCallback(payload?: object): void;
|
|
1735
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MessageAgentComponent, never>;
|
|
1736
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MessageAgentComponent, "MessageAgent,message-agent,messageagent", never, { "hideToolbar": { "alias": "hideToolbar"; "required": false; "isSignal": true; }; "hideContent": { "alias": "hideContent"; "required": false; "isSignal": true; }; "textOffset": { "alias": "textOffset"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1737
|
+
}
|
|
1738
|
+
|
|
1739
|
+
declare class MessageAgentToolbar {
|
|
1740
|
+
protected readonly agentService: AgentService;
|
|
1741
|
+
readonly showDebugButton: _angular_core.InputSignal<boolean>;
|
|
1742
|
+
readonly feedback: _angular_core.InputSignal<"positive" | "negative" | undefined>;
|
|
1743
|
+
readonly action: _angular_core.OutputEmitterRef<MessageAgentActionEvent>;
|
|
1744
|
+
readonly hasPositiveFeedback: _angular_core.Signal<boolean>;
|
|
1745
|
+
readonly hasNegativeFeedback: _angular_core.Signal<boolean>;
|
|
1746
|
+
readonly hasFeedback: _angular_core.Signal<boolean>;
|
|
1747
|
+
copyMessageToClipboard(): void;
|
|
1748
|
+
regenerateMessage(): void;
|
|
1749
|
+
likeMessage(): void;
|
|
1750
|
+
dislikeMessage(): void;
|
|
1751
|
+
debugMessage(): void;
|
|
1752
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MessageAgentToolbar, never>;
|
|
1753
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MessageAgentToolbar, "MessageAgentToolbar,message-agent-toolbar,messageagenttoolbar", never, { "showDebugButton": { "alias": "showDebugButton"; "required": false; "isSignal": true; }; "feedback": { "alias": "feedback"; "required": false; "isSignal": true; }; }, { "action": "action"; }, never, never, true, never>;
|
|
1754
|
+
}
|
|
1755
|
+
|
|
1756
|
+
declare class DebugService {
|
|
1757
|
+
private readonly http;
|
|
1758
|
+
/**
|
|
1759
|
+
* Returns an {@link Observable} that emits the debug messages identified by `chatId`, `executionId` and `debugMessageId`.
|
|
1760
|
+
*
|
|
1761
|
+
* The returned {@link Observable} emits once and completes.
|
|
1762
|
+
*
|
|
1763
|
+
* @param chatId - The id of the chat.
|
|
1764
|
+
* @param executionId - The id of the execution.
|
|
1765
|
+
* @param debugMessageId - The id of the debug message.
|
|
1766
|
+
*
|
|
1767
|
+
* @returns An {@link Observable} that emits a {@link DebugMessageListPayload}.
|
|
1768
|
+
*
|
|
1769
|
+
* @see https://doc-internal.sinequa.com/assistant/latest/debugmessagelist
|
|
1770
|
+
*/
|
|
1771
|
+
getDebugMessages(chatId: string, executionId: string, debugMessageId: string): Observable<_sinequa_agent.BasePayload & {
|
|
1772
|
+
debugMessages: _sinequa_agent.DebugMessage[];
|
|
1773
|
+
}>;
|
|
1774
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DebugService, never>;
|
|
1775
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<DebugService>;
|
|
1776
|
+
}
|
|
1777
|
+
|
|
1778
|
+
declare class MessageDebugComponent extends MessageBaseComponent {
|
|
1779
|
+
private readonly messageService;
|
|
1780
|
+
private readonly agent;
|
|
1781
|
+
readonly messageId: _angular_core.InputSignal<string | undefined>;
|
|
1782
|
+
readonly debugMessages: _angular_core.WritableSignal<DebugMessageProperties[]>;
|
|
1783
|
+
readonly groups: _angular_core.Signal<{
|
|
1784
|
+
runId: string;
|
|
1785
|
+
messages: DebugMessageProperties[];
|
|
1786
|
+
expanded: boolean;
|
|
1787
|
+
}[]>;
|
|
1788
|
+
private readonly groupStateMap;
|
|
1789
|
+
getService(): MessageService;
|
|
1790
|
+
constructor();
|
|
1791
|
+
getMessageId(): string | undefined;
|
|
1792
|
+
getType(): MessageComponentType;
|
|
1793
|
+
toggleGroup(group: DebugMessageGroup): void;
|
|
1794
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MessageDebugComponent, never>;
|
|
1795
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MessageDebugComponent, "MessageDebug,message-debug,messagedebug", never, { "messageId": { "alias": "messageId"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1796
|
+
}
|
|
1797
|
+
|
|
1798
|
+
declare class MessageDebugDetailsComponent {
|
|
1799
|
+
private readonly debugMessageService;
|
|
1800
|
+
readonly message: _angular_core.InputSignal<DebugMessageProperties | undefined>;
|
|
1801
|
+
readonly details: _angular_core.WritableSignal<DebugMessage[]>;
|
|
1802
|
+
readonly loading: _angular_core.WritableSignal<boolean>;
|
|
1803
|
+
constructor();
|
|
1804
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MessageDebugDetailsComponent, never>;
|
|
1805
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MessageDebugDetailsComponent, "MessageDebugDetails,message-debug-details,messagedebugdetails", never, { "message": { "alias": "message"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1806
|
+
}
|
|
1807
|
+
|
|
1808
|
+
declare class MessageDebugEntryComponent {
|
|
1809
|
+
readonly message: _angular_core.InputSignal<DebugMessageProperties>;
|
|
1810
|
+
readonly opened: _angular_core.WritableSignal<boolean>;
|
|
1811
|
+
onToggle(event: Event): void;
|
|
1812
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MessageDebugEntryComponent, never>;
|
|
1813
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MessageDebugEntryComponent, "MessageDebugEntry,message-debug-entry,messagedebugentry", never, { "message": { "alias": "message"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1814
|
+
}
|
|
1815
|
+
|
|
1816
|
+
declare class MessageDebugKVComponent {
|
|
1817
|
+
readonly row: _angular_core.InputSignal<DebugDisplayItemKV>;
|
|
1818
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MessageDebugKVComponent, never>;
|
|
1819
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MessageDebugKVComponent, "MessageDebugKV,message-debug-kv,messagedebugkv", never, { "row": { "alias": "row"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1820
|
+
}
|
|
1821
|
+
|
|
1822
|
+
declare class MessageDebugListComponent {
|
|
1823
|
+
readonly content: _angular_core.InputSignal<DebugDisplayItemList>;
|
|
1824
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MessageDebugListComponent, never>;
|
|
1825
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MessageDebugListComponent, "MessageDebugList,message-debug-list,messagedebuglist", never, { "content": { "alias": "content"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1826
|
+
}
|
|
1827
|
+
|
|
1828
|
+
type FunctionData$2 = {
|
|
1829
|
+
call: MessageContentFunctionCall;
|
|
1830
|
+
result?: MessageContentFunctionResult;
|
|
1831
|
+
approved?: boolean;
|
|
1832
|
+
};
|
|
1833
|
+
declare class MessageFunctionComponent extends MessageBaseComponent {
|
|
1834
|
+
protected readonly showApprovalButtons: _angular_core.Signal<boolean>;
|
|
1835
|
+
protected readonly isError: _angular_core.Signal<boolean>;
|
|
1836
|
+
protected readonly argumentEntries: _angular_core.Signal<[string, any][]>;
|
|
1837
|
+
protected readonly cardClass: _angular_core.Signal<"bg-tool-card border-tool-card-border hover:bg-tool-card-hovered" | "bg-red-100/10 border-stroke-destructive-base" | "bg-destructive-lightest border-stroke-destructive-muted hover:bg-red-100">;
|
|
1838
|
+
protected readonly approvalState: _angular_core.Signal<"approved" | "rejected" | null>;
|
|
1839
|
+
protected readonly isOpen: _angular_core.Signal<boolean>;
|
|
1840
|
+
readonly functionData: _angular_core.WritableSignal<FunctionData$2 | undefined>;
|
|
1841
|
+
protected readonly pendingApproval: _angular_core.WritableSignal<boolean>;
|
|
1842
|
+
protected readonly isErrorOpen: _angular_core.WritableSignal<boolean>;
|
|
1843
|
+
/** Auto-opens when approval is pending; can also be toggled by the user. */
|
|
1844
|
+
protected readonly isNormalOpen: _angular_core.WritableSignal<boolean>;
|
|
1845
|
+
getMessageId(): string | undefined;
|
|
1846
|
+
getType(): MessageComponentType;
|
|
1847
|
+
/**
|
|
1848
|
+
* Handles function call content and updates the component state to display the function call information.
|
|
1849
|
+
* @param content - The function call content.
|
|
1850
|
+
*/
|
|
1851
|
+
call(content: MessageContentFunctionCall): void;
|
|
1852
|
+
/**
|
|
1853
|
+
* Handles function result content and updates the component state to display the function result information.
|
|
1854
|
+
* @param result - The function result content.
|
|
1855
|
+
*/
|
|
1856
|
+
result(result: MessageContentFunctionResult): void;
|
|
1857
|
+
/**
|
|
1858
|
+
* Handles function approval request content and updates the component state to display the approval request information.
|
|
1859
|
+
* @param content - The function approval request content.
|
|
1860
|
+
*/
|
|
1861
|
+
approvalRequest(content: MessageContentFunctionApprovalRequest): void;
|
|
1862
|
+
/**
|
|
1863
|
+
* Handles function approval response content, updates the component state to reflect the approval decision,
|
|
1864
|
+
* and hides the pending approval state (buttons).
|
|
1865
|
+
* @param content - The function approval response content.
|
|
1866
|
+
*/
|
|
1867
|
+
approvalResponse(content: MessageContentFunctionApprovalResponse): void;
|
|
1868
|
+
/**
|
|
1869
|
+
* Handles the user's response to a function approval request,
|
|
1870
|
+
* dispatches an event with the approval decision,
|
|
1871
|
+
* and updates the component state accordingly.
|
|
1872
|
+
* @param approved - The user's approval decision.
|
|
1873
|
+
*/
|
|
1874
|
+
protected answerApprovalRequest(approved: boolean): void;
|
|
1875
|
+
/** Toggles the open/closed state of the card based on its current type. */
|
|
1876
|
+
protected toggleOpen(): void;
|
|
1877
|
+
private dispatchApprovalAction;
|
|
1878
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MessageFunctionComponent, never>;
|
|
1879
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MessageFunctionComponent, "MessageFunction,message-function,messagefunction", never, {}, {}, never, never, true, never>;
|
|
1880
|
+
}
|
|
1881
|
+
|
|
1882
|
+
type Arguments$1 = {
|
|
1883
|
+
document_id: string;
|
|
1884
|
+
chunk_offset: number;
|
|
1885
|
+
chunk_length: number;
|
|
1886
|
+
strategy: string;
|
|
1887
|
+
};
|
|
1888
|
+
type Result$1 = {
|
|
1889
|
+
context: string;
|
|
1890
|
+
error: string;
|
|
1891
|
+
}[];
|
|
1892
|
+
type FunctionData$1 = {
|
|
1893
|
+
call: MessageContentFunctionCall & {
|
|
1894
|
+
arguments: Arguments$1;
|
|
1895
|
+
};
|
|
1896
|
+
result?: MessageContentFunctionResult & {
|
|
1897
|
+
result: Result$1;
|
|
1898
|
+
};
|
|
1899
|
+
approved: boolean;
|
|
1900
|
+
};
|
|
1901
|
+
declare class ReadDocumentFunctionComponent extends MessageFunctionComponent {
|
|
1902
|
+
functionData: _angular_core.WritableSignal<FunctionData$1 | undefined>;
|
|
1903
|
+
private readonly agentsStore;
|
|
1904
|
+
readonly documentReference: _angular_core.Signal<Reference | undefined>;
|
|
1905
|
+
readonly displayTitle: _angular_core.Signal<string>;
|
|
1906
|
+
result(result: MessageContentFunctionResult): void;
|
|
1907
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ReadDocumentFunctionComponent, never>;
|
|
1908
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ReadDocumentFunctionComponent, "ReadDocumentFunction, read-document-function", never, {}, {}, never, never, true, never>;
|
|
1909
|
+
}
|
|
1910
|
+
|
|
1911
|
+
type SearchContext = {
|
|
1912
|
+
id: string;
|
|
1913
|
+
contextDocuments: ContextDocument[];
|
|
1914
|
+
queries: null;
|
|
1915
|
+
resultPage: number;
|
|
1916
|
+
resultPageSize: number;
|
|
1917
|
+
totalMatchingDocumentCount: number;
|
|
1918
|
+
totalDocumentCount: number;
|
|
1919
|
+
hasRelevance: boolean;
|
|
1920
|
+
sort: string;
|
|
1921
|
+
totalTokenCount: number | null;
|
|
1922
|
+
textTokens: number | null;
|
|
1923
|
+
imagesTokens: number | null;
|
|
1924
|
+
metaTokens: number | null;
|
|
1925
|
+
};
|
|
1926
|
+
type ContextDocument = {
|
|
1927
|
+
id: string;
|
|
1928
|
+
metas: ContextDocumentMeta;
|
|
1929
|
+
chunks: ContextDocumentChunk[];
|
|
1930
|
+
totalTokenCount: number | null;
|
|
1931
|
+
textTokens: number | null;
|
|
1932
|
+
imagesTokens: number | null;
|
|
1933
|
+
metaTokens: number | null;
|
|
1934
|
+
globalRelevanceScore: number | null;
|
|
1935
|
+
documentTotalLength: number | null;
|
|
1936
|
+
};
|
|
1937
|
+
type ContextDocumentMeta = {
|
|
1938
|
+
id: string;
|
|
1939
|
+
title: string | null;
|
|
1940
|
+
url: string | null;
|
|
1941
|
+
summary: string | null;
|
|
1942
|
+
date: string | null;
|
|
1943
|
+
};
|
|
1944
|
+
type ContextDocumentChunk = {
|
|
1945
|
+
offset: number;
|
|
1946
|
+
length: number;
|
|
1947
|
+
score: number;
|
|
1948
|
+
scores?: number[];
|
|
1949
|
+
text: string;
|
|
1950
|
+
chunkType: number;
|
|
1951
|
+
chunkTypes?: string[];
|
|
1952
|
+
totalTokenCount: number | null;
|
|
1953
|
+
textTokens: number | null;
|
|
1954
|
+
imagesTokens: number | null;
|
|
1955
|
+
};
|
|
1956
|
+
|
|
1957
|
+
declare class DocumentCardComponent {
|
|
1958
|
+
private readonly domSanitizer;
|
|
1959
|
+
readonly selectionStore: {
|
|
1960
|
+
article?: _angular_core.Signal<Article | undefined> | undefined;
|
|
1961
|
+
id?: _angular_core.Signal<string | undefined> | undefined;
|
|
1962
|
+
queryText?: _angular_core.Signal<string | undefined> | undefined;
|
|
1963
|
+
queryName?: _angular_core.Signal<string | undefined> | undefined;
|
|
1964
|
+
previewHighlights?: _angular_core.Signal<_sinequa_atomic_angular.PreviewHighlights | undefined> | undefined;
|
|
1965
|
+
assistantIdsToAttach: _angular_core.Signal<string[]>;
|
|
1966
|
+
multiSelection: _angular_core.Signal<Article[]>;
|
|
1967
|
+
multiSelectCount: _angular_core.Signal<number>;
|
|
1968
|
+
update: (newState: Partial<_sinequa_atomic_angular.SelectionState>) => void;
|
|
1969
|
+
clear: () => void;
|
|
1970
|
+
addArticleToMultiSelection: (article: Article) => void;
|
|
1971
|
+
removeArticleFromMultiSelection: (article: Article) => void;
|
|
1972
|
+
clearMultiSelection: () => void;
|
|
1973
|
+
} & _ngrx_signals.StateSource<{
|
|
1974
|
+
article?: Article | undefined;
|
|
1975
|
+
id?: string | undefined;
|
|
1976
|
+
queryText?: string | undefined;
|
|
1977
|
+
queryName?: string | undefined;
|
|
1978
|
+
previewHighlights?: _sinequa_atomic_angular.PreviewHighlights | undefined;
|
|
1979
|
+
assistantIdsToAttach: string[];
|
|
1980
|
+
multiSelection: Article[];
|
|
1981
|
+
}>;
|
|
1982
|
+
/** Most complete: agent answer document with typed metas and chunks. */
|
|
1983
|
+
readonly document: _angular_core.InputSignal<ContextDocument | undefined>;
|
|
1984
|
+
/** Sinequa query result with matching passages and highlighted text. */
|
|
1985
|
+
readonly article: _angular_core.InputSignal<Article | undefined>;
|
|
1986
|
+
/** Lightweight reference from the agent cache, title and date only. */
|
|
1987
|
+
readonly reference: _angular_core.InputSignal<Reference | undefined>;
|
|
1988
|
+
readonly title: _angular_core.Signal<string | undefined>;
|
|
1989
|
+
readonly date: _angular_core.Signal<string | undefined>;
|
|
1990
|
+
readonly segments: _angular_core.Signal<string[]>;
|
|
1991
|
+
readonly summary: _angular_core.Signal<string | null | undefined>;
|
|
1992
|
+
readonly sanitizedSummary: _angular_core.Signal<_angular_platform_browser.SafeHtml>;
|
|
1993
|
+
readonly matchCount: _angular_core.Signal<number>;
|
|
1994
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DocumentCardComponent, never>;
|
|
1995
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DocumentCardComponent, "DocumentCard, document-card, documentcard", never, { "document": { "alias": "document"; "required": false; "isSignal": true; }; "article": { "alias": "article"; "required": false; "isSignal": true; }; "reference": { "alias": "reference"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1996
|
+
}
|
|
1997
|
+
|
|
1998
|
+
declare class SearchExpansionService {
|
|
1999
|
+
readonly context: _angular_core.WritableSignal<SearchContext | undefined>;
|
|
2000
|
+
readonly queryText: _angular_core.WritableSignal<string | undefined>;
|
|
2001
|
+
readonly expandedCallId: _angular_core.WritableSignal<string | undefined>;
|
|
2002
|
+
readonly isExpanded: _angular_core.Signal<boolean>;
|
|
2003
|
+
expand(context: SearchContext, queryText: string, callId: string): void;
|
|
2004
|
+
collapse(): void;
|
|
2005
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SearchExpansionService, never>;
|
|
2006
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<SearchExpansionService>;
|
|
2007
|
+
}
|
|
2008
|
+
|
|
2009
|
+
type Arguments = {
|
|
2010
|
+
searchQuery: string;
|
|
2011
|
+
};
|
|
2012
|
+
type Result = {
|
|
2013
|
+
searchContext: string;
|
|
2014
|
+
}[];
|
|
2015
|
+
type FunctionData = {
|
|
2016
|
+
call: MessageContentFunctionCall & {
|
|
2017
|
+
arguments: Arguments;
|
|
2018
|
+
};
|
|
2019
|
+
result?: MessageContentFunctionResult & {
|
|
2020
|
+
result: Result;
|
|
2021
|
+
};
|
|
2022
|
+
approved: boolean;
|
|
2023
|
+
};
|
|
2024
|
+
declare class SearchFunctionComponent extends MessageFunctionComponent {
|
|
2025
|
+
functionData: _angular_core.WritableSignal<FunctionData | undefined>;
|
|
2026
|
+
private readonly agentsStore;
|
|
2027
|
+
protected readonly searchExpansion: SearchExpansionService;
|
|
2028
|
+
/** True only when THIS specific search widget is the one currently expanded. */
|
|
2029
|
+
readonly isExpandedInPanel: _angular_core.Signal<boolean>;
|
|
2030
|
+
readonly searchContext: _angular_core.Signal<SearchContext | undefined>;
|
|
2031
|
+
result(result: MessageContentFunctionResult): void;
|
|
2032
|
+
/**
|
|
2033
|
+
* Normalizes the raw result value into an array of records.
|
|
2034
|
+
* Handles both the live-session format (already an array) and the saved-history
|
|
2035
|
+
* format where the backend may serialize the array as a JSON string.
|
|
2036
|
+
*/
|
|
2037
|
+
private toResultArray;
|
|
2038
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SearchFunctionComponent, never>;
|
|
2039
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SearchFunctionComponent, "SearchFunction, search-function, searchfunction", never, {}, {}, never, never, true, never>;
|
|
2040
|
+
}
|
|
2041
|
+
|
|
2042
|
+
type R = Result$2 & {
|
|
2043
|
+
nextPage?: number;
|
|
2044
|
+
previousPage?: number;
|
|
2045
|
+
};
|
|
2046
|
+
/**
|
|
2047
|
+
* Shared tabs component for displaying search results in both the inline search
|
|
2048
|
+
* widget (`SearchFunctionComponent`) and the expanded panel (`ExpandedSearchResultsComponent`).
|
|
2049
|
+
*
|
|
2050
|
+
* Inputs:
|
|
2051
|
+
* - `context` — the SearchContext holding the top documents to display
|
|
2052
|
+
* - `queryText` — used for the paginated "More" query
|
|
2053
|
+
* - `compact` — when true, constrains the list height (inline widget); when false,
|
|
2054
|
+
* fills available space (expanded panel)
|
|
2055
|
+
*/
|
|
2056
|
+
declare class SearchResultsTabsComponent {
|
|
2057
|
+
protected readonly cn: typeof cn;
|
|
2058
|
+
readonly context: _angular_core.InputSignal<SearchContext>;
|
|
2059
|
+
readonly queryText: _angular_core.InputSignal<string>;
|
|
2060
|
+
readonly compact: _angular_core.InputSignal<boolean>;
|
|
2061
|
+
private readonly queryService;
|
|
2062
|
+
readonly allowSearch: _angular_core.WritableSignal<boolean>;
|
|
2063
|
+
readonly query: _tanstack_angular_query_experimental.CreateInfiniteQueryResult<_tanstack_query_core.InfiniteData<R, unknown>, Error>;
|
|
2064
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SearchResultsTabsComponent, never>;
|
|
2065
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SearchResultsTabsComponent, "SearchResultsTabs,search-results-tabs", never, { "context": { "alias": "context"; "required": true; "isSignal": true; }; "queryText": { "alias": "queryText"; "required": true; "isSignal": true; }; "compact": { "alias": "compact"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
2066
|
+
}
|
|
2067
|
+
|
|
2068
|
+
/**
|
|
2069
|
+
* Displays expanded search results in a dedicated panel outside the chat flow.
|
|
2070
|
+
*
|
|
2071
|
+
* Intended for use in host applications (e.g. agent-app) that implement a multi-panel
|
|
2072
|
+
* layout. This component is placed in a dedicated resizable panel alongside the chat and
|
|
2073
|
+
* document preview panels. It is shown when the user clicks "expand" on a search result
|
|
2074
|
+
* inside the chat, which triggers `SearchExpansionService.expand()`.
|
|
2075
|
+
*
|
|
2076
|
+
* Usage:
|
|
2077
|
+
* <ExpandedSearchResults (close)="onClose()" />
|
|
2078
|
+
*
|
|
2079
|
+
* The component reads its context entirely from `SearchExpansionService` (injected globally),
|
|
2080
|
+
* so no inputs are required. It emits a `close` event when the user dismisses the panel;
|
|
2081
|
+
* the host is responsible for calling `SearchExpansionService.collapse()` in response.
|
|
2082
|
+
*
|
|
2083
|
+
* Tabs:
|
|
2084
|
+
* - "Top Results": the `contextDocuments` already retrieved by the search tool call.
|
|
2085
|
+
* - "More": lazy-loaded via `@defer`, triggers a paginated search using `QueryService`
|
|
2086
|
+
* with infinite scroll once the user navigates to that tab.
|
|
2087
|
+
*/
|
|
2088
|
+
declare class ExpandedSearchResultsComponent {
|
|
2089
|
+
/** Emitted when the user clicks the close button. The host must call SearchExpansionService.collapse(). */
|
|
2090
|
+
readonly close: _angular_core.OutputEmitterRef<void>;
|
|
2091
|
+
protected readonly store: SearchExpansionService;
|
|
2092
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ExpandedSearchResultsComponent, never>;
|
|
2093
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ExpandedSearchResultsComponent, "ExpandedSearchResults,expanded-search-results", never, {}, { "close": "close"; }, never, never, true, never>;
|
|
2094
|
+
}
|
|
2095
|
+
|
|
2096
|
+
declare class MessageList {
|
|
2097
|
+
private readonly el;
|
|
2098
|
+
private readonly viewContainer;
|
|
2099
|
+
private readonly logger;
|
|
2100
|
+
private readonly agentService;
|
|
2101
|
+
private readonly destroyRef;
|
|
2102
|
+
private readonly agentsStore;
|
|
2103
|
+
private readonly toolCardPlugins;
|
|
2104
|
+
readonly chatId: _angular_core.InputSignal<string | undefined>;
|
|
2105
|
+
readonly message: _angular_core.InputSignal<Message | undefined>;
|
|
2106
|
+
readonly history: _angular_core.InputSignal<Message[] | undefined>;
|
|
2107
|
+
protected readonly isReady: _angular_core.Signal<boolean>;
|
|
2108
|
+
protected readonly hasDebugFeature: _angular_core.Signal<boolean>;
|
|
2109
|
+
private lastMessage;
|
|
2110
|
+
private lastMessageComponent;
|
|
2111
|
+
private lastMessageDebug;
|
|
2112
|
+
private readonly messageComponents;
|
|
2113
|
+
private readonly functionComponents;
|
|
2114
|
+
private messageRenderers;
|
|
2115
|
+
/**
|
|
2116
|
+
* Text offset pending for the next MessageAgentComponent to be created.
|
|
2117
|
+
* Set when a functionCall frame interrupts a live stream: it snapshots the character
|
|
2118
|
+
* length of the already-displayed text so the continuation component can slice it off,
|
|
2119
|
+
* avoiding visual duplication. Consumed immediately on the next component creation.
|
|
2120
|
+
*/
|
|
2121
|
+
private nextTextOffset;
|
|
2122
|
+
constructor();
|
|
2123
|
+
/**
|
|
2124
|
+
* Returns the list of message ids
|
|
2125
|
+
* @returns - List of message ids
|
|
2126
|
+
*/
|
|
2127
|
+
getMessageIds(): (string | undefined)[];
|
|
2128
|
+
/**
|
|
2129
|
+
* Locks all messages from the message with the given messageId (inclusive).
|
|
2130
|
+
*
|
|
2131
|
+
* @param messageId - The messageId from which to lock messages.
|
|
2132
|
+
*
|
|
2133
|
+
* @remarks This method sets a 'locked' data attribute to 'true' on all message components.
|
|
2134
|
+
* @remarks This method is designed to be called from the parent component.
|
|
2135
|
+
*/
|
|
2136
|
+
lockFromMessageId(messageId: string | undefined): void;
|
|
2137
|
+
/**
|
|
2138
|
+
* Unlocks all messages.
|
|
2139
|
+
*
|
|
2140
|
+
* @remarks This method sets a 'locked' data attribute to 'false' on all message components.
|
|
2141
|
+
* @remarks This method is designed to be called from the parent component.
|
|
2142
|
+
*/
|
|
2143
|
+
unlockMessages(): void;
|
|
2144
|
+
/**
|
|
2145
|
+
* Removes all locked messages from the message list and UI.
|
|
2146
|
+
*/
|
|
2147
|
+
clearLockedMessages(): void;
|
|
2148
|
+
/**
|
|
2149
|
+
* Removes messages from the message list and UI starting from the given messageId (inclusive).
|
|
2150
|
+
*
|
|
2151
|
+
* @param messageId - The messageId from which to clear messages.
|
|
2152
|
+
*/
|
|
2153
|
+
regenerateFromMessageId(messageId: string | undefined): void;
|
|
2154
|
+
/**
|
|
2155
|
+
* Initializes the message renderers for different message identities. Each renderer is responsible for rendering a specific type of message based on its identity.
|
|
2156
|
+
* The renderers are stored in the `messageRenderers` object, which maps message identities to their respective rendering functions.
|
|
2157
|
+
* This method is called in the constructor to set up the renderers when the component is initialized.
|
|
2158
|
+
*/
|
|
2159
|
+
private initMessageRenderers;
|
|
2160
|
+
/**
|
|
2161
|
+
* Centralized frame handling to route different frame events to their respective handlers.
|
|
2162
|
+
* @param frame - The frame event to handle.
|
|
2163
|
+
*/
|
|
2164
|
+
private handleFrame;
|
|
2165
|
+
/**
|
|
2166
|
+
* Clears message from a given index by calling `component.destroy()`
|
|
2167
|
+
* @param index - Index to start deletion from
|
|
2168
|
+
*/
|
|
2169
|
+
private clearFromMessageIndex;
|
|
2170
|
+
/** Effect function to watch over history changes */
|
|
2171
|
+
private watchHistory;
|
|
2172
|
+
/** Effect function to watch over message changes */
|
|
2173
|
+
private watchMessage;
|
|
2174
|
+
/**
|
|
2175
|
+
* Clears all messages from the message list and UI.
|
|
2176
|
+
*/
|
|
2177
|
+
private clearMessages;
|
|
2178
|
+
/**
|
|
2179
|
+
* Injects the given messages from the history into the message list and the UI.
|
|
2180
|
+
*
|
|
2181
|
+
* @param history - The history to inject.
|
|
2182
|
+
*/
|
|
2183
|
+
private injectHistory;
|
|
2184
|
+
/**
|
|
2185
|
+
* Detaches the signal from the last message component, if any.
|
|
2186
|
+
*/
|
|
2187
|
+
private detachLastMessageSignal;
|
|
2188
|
+
/**
|
|
2189
|
+
* Injects a new message into the message list and the UI.
|
|
2190
|
+
* @param message - The new message to inject.
|
|
2191
|
+
*/
|
|
2192
|
+
private injectNewMessage;
|
|
2193
|
+
/**
|
|
2194
|
+
* Append user message at the end of the message component list, user message is considered
|
|
2195
|
+
* to be the first stable message and act as an "anchor" for the agent turn.
|
|
2196
|
+
* @param message - Message object
|
|
2197
|
+
*/
|
|
2198
|
+
private appendMessageUser;
|
|
2199
|
+
/**
|
|
2200
|
+
* Insert agent message above debug message component and allow the debug button to be shown.
|
|
2201
|
+
* @param message - Message object
|
|
2202
|
+
*/
|
|
2203
|
+
private insertMessageAgent;
|
|
2204
|
+
/**
|
|
2205
|
+
* Insert function call component(s) in message component list.
|
|
2206
|
+
* @param payload - Content with function call, which will be used to create function component(s) and insert into the message list.
|
|
2207
|
+
*/
|
|
2208
|
+
private insertFunctionCallComponent;
|
|
2209
|
+
/**
|
|
2210
|
+
* Select Angular component type to render the function call based on the tool's
|
|
2211
|
+
* toolCardTemplateName, falling back to the function name.
|
|
2212
|
+
* Defaults to MessageFunctionComponent if no matching plugin found.
|
|
2213
|
+
* The value `_default_tool_template` explicitly means "use the default template".
|
|
2214
|
+
*/
|
|
2215
|
+
private selectFunctionComponentType;
|
|
2216
|
+
/**
|
|
2217
|
+
* Inject function result into corresponding function call component.
|
|
2218
|
+
* @param payload - Content with function result, which will be used to find the matching function call component and inject the function result into it.
|
|
2219
|
+
*/
|
|
2220
|
+
private insertFunctionResult;
|
|
2221
|
+
/**
|
|
2222
|
+
* Insert function approval request message above debug message component
|
|
2223
|
+
* The function component(s) will be created from the content of the message and inserted into the message list.
|
|
2224
|
+
* @param message - Message object with function approval request content.
|
|
2225
|
+
*/
|
|
2226
|
+
private insertMessageFunctionApprovalRequest;
|
|
2227
|
+
/**
|
|
2228
|
+
* Update function approval component with response message
|
|
2229
|
+
* The function component(s) will be updated based on the content of the message.
|
|
2230
|
+
* @param message - Message object with function approval response content.
|
|
2231
|
+
*/
|
|
2232
|
+
private insertMessageFunctionApprovalResponse;
|
|
2233
|
+
/**
|
|
2234
|
+
* Append debug message component at the bottom of the DOM and the message component list.
|
|
2235
|
+
* @param message - Message object
|
|
2236
|
+
*/
|
|
2237
|
+
private appendMessageDebugComponent;
|
|
2238
|
+
/**
|
|
2239
|
+
* Insert component above debug message component in both the DOM and the message component list.
|
|
2240
|
+
* @param component - Message component to be inserted
|
|
2241
|
+
*/
|
|
2242
|
+
private insertMessageComponentAboveDebug;
|
|
2243
|
+
/**
|
|
2244
|
+
* Handle the raising debug button click and open the next debug message in the DOM if any.
|
|
2245
|
+
* @param event - CustomEvent object
|
|
2246
|
+
*/
|
|
2247
|
+
private onDebugPanelClick;
|
|
2248
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MessageList, never>;
|
|
2249
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MessageList, "MessageList,message-list,messagelist", never, { "chatId": { "alias": "chatId"; "required": false; "isSignal": true; }; "message": { "alias": "message"; "required": false; "isSignal": true; }; "history": { "alias": "history"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
2250
|
+
}
|
|
2251
|
+
|
|
2252
|
+
declare class MessageUserComponent extends MessageBaseComponent {
|
|
2253
|
+
readonly message: _angular_core.InputSignal<Message>;
|
|
2254
|
+
readonly showToolbar: _angular_core.WritableSignal<boolean>;
|
|
2255
|
+
readonly messageId: _angular_core.Signal<string>;
|
|
2256
|
+
readonly messageContent: _angular_core.Signal<_sinequa_agent.MessageContent[]>;
|
|
2257
|
+
readonly flattenedContent: _angular_core.Signal<string>;
|
|
2258
|
+
getMessageId(): string | undefined;
|
|
2259
|
+
getType(): MessageComponentType;
|
|
2260
|
+
messageAction(event: MessageUserActionEvent): void;
|
|
2261
|
+
dispatchMessageAction(action: MessageUserAction, includeMessage?: boolean): void;
|
|
2262
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MessageUserComponent, never>;
|
|
2263
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MessageUserComponent, "MessageUser,message-user,messageuser", never, { "message": { "alias": "message"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
2264
|
+
}
|
|
2265
|
+
|
|
2266
|
+
declare class MessageUserToolbar {
|
|
2267
|
+
protected readonly agentService: AgentService;
|
|
2268
|
+
readonly action: _angular_core.OutputEmitterRef<MessageUserActionEvent>;
|
|
2269
|
+
copyMessageToClipboard(): void;
|
|
2270
|
+
editMessage(): void;
|
|
2271
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MessageUserToolbar, never>;
|
|
2272
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MessageUserToolbar, "MessageUserToolbar,message-user-toolbar,messageusertoolbar", never, {}, { "action": "action"; }, never, never, true, never>;
|
|
2273
|
+
}
|
|
2274
|
+
|
|
2275
|
+
declare const buttonVariants: (props?: ({
|
|
2276
|
+
variant?: "default" | "link" | "none" | "primary" | "outline" | "secondary" | "accent" | "destructive" | "ghost" | "icon" | "ai" | null | undefined;
|
|
2277
|
+
decoration?: "none" | "outline" | "underline" | null | undefined;
|
|
2278
|
+
size?: "default" | "icon" | "xs" | "sm" | "lg" | "xl" | "icon-xs" | "icon-sm" | "icon-lg" | "icon-xl" | null | undefined;
|
|
2279
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
2280
|
+
type ButtonVariants = VariantProps<typeof buttonVariants>;
|
|
2281
|
+
declare class ButtonComponent {
|
|
2282
|
+
class: _angular_core.InputSignal<string | undefined>;
|
|
2283
|
+
variant: _angular_core.InputSignal<"default" | "link" | "none" | "primary" | "outline" | "secondary" | "accent" | "destructive" | "ghost" | "icon" | "ai" | null | undefined>;
|
|
2284
|
+
decoration: _angular_core.InputSignal<"none" | "outline" | "underline" | null | undefined>;
|
|
2285
|
+
size: _angular_core.InputSignal<"default" | "icon" | "xs" | "sm" | "lg" | "xl" | "icon-xs" | "icon-sm" | "icon-lg" | "icon-xl" | null | undefined>;
|
|
2286
|
+
variants: _angular_core.Signal<string | undefined>;
|
|
2287
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ButtonComponent, never>;
|
|
2288
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ButtonComponent, "button", never, { "class": { "alias": "class"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "decoration": { "alias": "decoration"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
2289
|
+
}
|
|
2290
|
+
|
|
2291
|
+
declare const hyperlinkVariants: (props?: ({
|
|
2292
|
+
variant?: "default" | "none" | "primary" | "ghost" | null | undefined;
|
|
2293
|
+
decoration?: "none" | "underline" | null | undefined;
|
|
2294
|
+
layer?: "none" | "disabled" | null | undefined;
|
|
2295
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
2296
|
+
type HyperlinkVariants = VariantProps<typeof hyperlinkVariants>;
|
|
2297
|
+
declare class HyperlinkComponent {
|
|
2298
|
+
class: _angular_core.InputSignal<string | undefined>;
|
|
2299
|
+
variant: _angular_core.InputSignal<"default" | "none" | "primary" | "ghost" | null | undefined>;
|
|
2300
|
+
decoration: _angular_core.InputSignal<"none" | "underline" | null | undefined>;
|
|
2301
|
+
layer: _angular_core.InputSignal<"none" | "disabled" | null | undefined>;
|
|
2302
|
+
variants: _angular_core.Signal<string | undefined>;
|
|
2303
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<HyperlinkComponent, never>;
|
|
2304
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<HyperlinkComponent, "a", never, { "class": { "alias": "class"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "decoration": { "alias": "decoration"; "required": false; "isSignal": true; }; "layer": { "alias": "layer"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
2305
|
+
}
|
|
2306
|
+
|
|
2307
|
+
declare class CastToDebugKVPipe {
|
|
2308
|
+
transform(item: any): DebugDisplayItemKV;
|
|
2309
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CastToDebugKVPipe, never>;
|
|
2310
|
+
static ɵpipe: _angular_core.ɵɵPipeDeclaration<CastToDebugKVPipe, "castToDebugKV", true>;
|
|
2311
|
+
}
|
|
2312
|
+
|
|
2313
|
+
declare class CastToDebugListPipe {
|
|
2314
|
+
transform(item: any): DebugDisplayItemList;
|
|
2315
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CastToDebugListPipe, never>;
|
|
2316
|
+
static ɵpipe: _angular_core.ɵɵPipeDeclaration<CastToDebugListPipe, "castToDebugList", true>;
|
|
2317
|
+
}
|
|
2318
|
+
|
|
2319
|
+
declare class SafeHtmlPipe {
|
|
2320
|
+
private sanitizer;
|
|
2321
|
+
constructor(sanitizer: DomSanitizer);
|
|
2322
|
+
transform(html: any): _angular_platform_browser.SafeHtml;
|
|
2323
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SafeHtmlPipe, never>;
|
|
2324
|
+
static ɵpipe: _angular_core.ɵɵPipeDeclaration<SafeHtmlPipe, "safeHtml", true>;
|
|
2325
|
+
}
|
|
2326
|
+
|
|
2327
|
+
/**
|
|
2328
|
+
* A token used to inject the instanceId to be used by all components and services of the Agent.
|
|
2329
|
+
* @see https://doc-internal.sinequa.com/assistant/latest/app-json-customization#sinequa-assistant-instance-settings
|
|
2330
|
+
*/
|
|
2331
|
+
declare const AGENT_INSTANCE_ID: InjectionToken<string>;
|
|
2332
|
+
/**
|
|
2333
|
+
* A token used to inject the default agent name.
|
|
2334
|
+
*/
|
|
2335
|
+
declare const AGENT_DEFAULT_NAME: InjectionToken<string>;
|
|
2336
|
+
/**
|
|
2337
|
+
* A token used to enable the XState inspector for debugging state machines.
|
|
2338
|
+
* @see https://stately.ai/docs/inspector
|
|
2339
|
+
*/
|
|
2340
|
+
declare const INSPECT_XSTATE: InjectionToken<boolean>;
|
|
2341
|
+
/**
|
|
2342
|
+
* Markdown-it plugins are functions that take the markdown-it instance and optional parameters.
|
|
2343
|
+
*/
|
|
2344
|
+
type MarkdownItPlugin = (md: MarkdownIt, ...params: any[]) => void;
|
|
2345
|
+
/**
|
|
2346
|
+
* Renderer plugin defines a markdown-it plugin along with an
|
|
2347
|
+
* optional the Angular component used to render the content.
|
|
2348
|
+
*/
|
|
2349
|
+
type RendererPlugins = {
|
|
2350
|
+
[key: string]: {
|
|
2351
|
+
markdownItPlugin: MarkdownItPlugin;
|
|
2352
|
+
component?: Type<any> | undefined;
|
|
2353
|
+
};
|
|
2354
|
+
};
|
|
2355
|
+
/**
|
|
2356
|
+
* A token used to provide markdown-it plugins
|
|
2357
|
+
* @defaultValue {}
|
|
2358
|
+
*/
|
|
2359
|
+
declare const AGENT_RENDERER_PLUGINS: InjectionToken<RendererPlugins>;
|
|
2360
|
+
/**
|
|
2361
|
+
* A token used to provide Angular components for rendering tool cards in Agent messages.
|
|
2362
|
+
* The key is the tool name, and the value is the Angular component used to render the tool card.
|
|
2363
|
+
*/
|
|
2364
|
+
type ToolCardPlugins = {
|
|
2365
|
+
[key: string]: Type<MessageFunctionComponent>;
|
|
2366
|
+
};
|
|
2367
|
+
/**
|
|
2368
|
+
* A token to provide Angular components for rendering tool cards in Agent messages.
|
|
2369
|
+
* @defaultValue {}
|
|
2370
|
+
*/
|
|
2371
|
+
declare const AGENT_TOOL_CARD_PLUGINS: InjectionToken<ToolCardPlugins>;
|
|
2372
|
+
|
|
2373
|
+
/**
|
|
2374
|
+
* Configuration for Shiki syntax highlighter
|
|
2375
|
+
*/
|
|
2376
|
+
type ShikiThemeMode = 'light' | 'dark';
|
|
2377
|
+
interface ShikiConfig {
|
|
2378
|
+
langs: string[];
|
|
2379
|
+
themes: Record<ShikiThemeMode, string>;
|
|
2380
|
+
}
|
|
2381
|
+
declare const SHIKI_HIGHLIGHTER_CONFIG: InjectionToken<ShikiConfig>;
|
|
2382
|
+
|
|
2383
|
+
/**
|
|
2384
|
+
* The default retry delays (in milliseconds) for SignalR automatic reconnect.
|
|
2385
|
+
*/
|
|
2386
|
+
declare const SIGNALR_RETRY_DELAYS: InjectionToken<number[]>;
|
|
2387
|
+
declare const SIGNALR_RETRY_DELAYS_DEFAULT: number[];
|
|
2388
|
+
|
|
2389
|
+
/**
|
|
2390
|
+
* Factory function to provide renderer plugins.
|
|
2391
|
+
*
|
|
2392
|
+
* @param plugins - renderer plugins to provide
|
|
2393
|
+
*
|
|
2394
|
+
* @returns environment providers
|
|
2395
|
+
*/
|
|
2396
|
+
declare const provideRendererPlugins: (plugins: RendererPlugins) => _angular_core.EnvironmentProviders;
|
|
2397
|
+
/**
|
|
2398
|
+
* Provides default Agent renderer plugins.
|
|
2399
|
+
*
|
|
2400
|
+
* Includes:
|
|
2401
|
+
* - code block with custom component
|
|
2402
|
+
* - link with target and rel attributes
|
|
2403
|
+
* - table tools with custom component
|
|
2404
|
+
*
|
|
2405
|
+
* @returns environment providers
|
|
2406
|
+
*/
|
|
2407
|
+
declare const provideDefaultRendererPlugins: () => _angular_core.EnvironmentProviders;
|
|
2408
|
+
|
|
2409
|
+
type InstanceState = {
|
|
2410
|
+
instanceId: string;
|
|
2411
|
+
configuration: AgentConfig;
|
|
2412
|
+
};
|
|
2413
|
+
type AgentsState = {
|
|
2414
|
+
ready: boolean;
|
|
2415
|
+
savedChatReady: boolean;
|
|
2416
|
+
};
|
|
2417
|
+
type DebugState = {
|
|
2418
|
+
debugMessages: boolean;
|
|
2419
|
+
};
|
|
2420
|
+
type AgentDetailsState = {
|
|
2421
|
+
agentDetails: AgentDetails | undefined;
|
|
2422
|
+
agentDetailsLoading: boolean;
|
|
2423
|
+
toolChoice: ToolChoice | undefined;
|
|
2424
|
+
};
|
|
2425
|
+
declare const AgentsStore: _angular_core.Type<{
|
|
2426
|
+
ready: _angular_core.Signal<boolean>;
|
|
2427
|
+
savedChatReady: _angular_core.Signal<boolean>;
|
|
2428
|
+
debugMessages: _angular_core.Signal<boolean>;
|
|
2429
|
+
referenceCache: _angular_core.Signal<Record<string, Reference>>;
|
|
2430
|
+
agentDetails: _angular_core.Signal<AgentDetails | undefined>;
|
|
2431
|
+
agentDetailsLoading: _angular_core.Signal<boolean>;
|
|
2432
|
+
toolChoice: _angular_core.Signal<ToolChoice | undefined>;
|
|
2433
|
+
setReady: (ready: boolean) => void;
|
|
2434
|
+
setSavedChatReady: (ready: boolean) => void;
|
|
2435
|
+
getAgentInstanceConfiguration: (instanceId: string) => z.infer<typeof AgentConfigSchema> | undefined;
|
|
2436
|
+
setDebugMessages: (debug: boolean) => void;
|
|
2437
|
+
setReferences: (references: Record<string, Reference>) => void;
|
|
2438
|
+
addReference: (reference: Reference) => void;
|
|
2439
|
+
addReferences: (references: Record<string, Reference>) => void;
|
|
2440
|
+
getReferenceMetas: (id: string) => Reference["metas"] | undefined;
|
|
2441
|
+
getAgentDetails: (name: string) => void;
|
|
2442
|
+
updateAgentDetails: (name: string) => void;
|
|
2443
|
+
reloadAgentDetails: () => void;
|
|
2444
|
+
updateToolChoice: (toolChoice: ToolChoice) => void;
|
|
2445
|
+
} & _ngrx_signals.WritableStateSource<{
|
|
2446
|
+
ready: boolean;
|
|
2447
|
+
savedChatReady: boolean;
|
|
2448
|
+
debugMessages: boolean;
|
|
2449
|
+
referenceCache: Record<string, Reference>;
|
|
2450
|
+
agentDetails: AgentDetails | undefined;
|
|
2451
|
+
agentDetailsLoading: boolean;
|
|
2452
|
+
toolChoice: ToolChoice | undefined;
|
|
2453
|
+
}>>;
|
|
2454
|
+
declare function withAgentsFeatures(): _ngrx_signals.SignalStoreFeature<_ngrx_signals.EmptyFeatureResult, {
|
|
2455
|
+
state: {
|
|
2456
|
+
ready: boolean;
|
|
2457
|
+
savedChatReady: boolean;
|
|
2458
|
+
};
|
|
2459
|
+
props: {};
|
|
2460
|
+
methods: {
|
|
2461
|
+
setReady: (ready: boolean) => void;
|
|
2462
|
+
setSavedChatReady: (ready: boolean) => void;
|
|
2463
|
+
getAgentInstanceConfiguration: (instanceId: string) => z.infer<typeof AgentConfigSchema> | undefined;
|
|
2464
|
+
};
|
|
2465
|
+
}>;
|
|
2466
|
+
declare function withDebugFeatures(): _ngrx_signals.SignalStoreFeature<_ngrx_signals.EmptyFeatureResult, {
|
|
2467
|
+
state: {
|
|
2468
|
+
debugMessages: boolean;
|
|
2469
|
+
};
|
|
2470
|
+
props: {};
|
|
2471
|
+
methods: {
|
|
2472
|
+
setDebugMessages: (debug: boolean) => void;
|
|
2473
|
+
};
|
|
2474
|
+
}>;
|
|
2475
|
+
declare function withAgentDetailsFeatures(): _ngrx_signals.SignalStoreFeature<_ngrx_signals.EmptyFeatureResult, {
|
|
2476
|
+
state: {
|
|
2477
|
+
agentDetails: AgentDetails | undefined;
|
|
2478
|
+
agentDetailsLoading: boolean;
|
|
2479
|
+
toolChoice: ToolChoice | undefined;
|
|
2480
|
+
};
|
|
2481
|
+
props: {};
|
|
2482
|
+
methods: {
|
|
2483
|
+
getAgentDetails: (name: string) => void;
|
|
2484
|
+
updateAgentDetails: (name: string) => void;
|
|
2485
|
+
reloadAgentDetails: () => void;
|
|
2486
|
+
updateToolChoice: (toolChoice: ToolChoice) => void;
|
|
2487
|
+
};
|
|
2488
|
+
}>;
|
|
2489
|
+
|
|
2490
|
+
/**
|
|
2491
|
+
* Factory function to provide the SavedChatsService only if enabled in the agent configuration.
|
|
2492
|
+
*
|
|
2493
|
+
* @param instanceId - The agent instance ID.
|
|
2494
|
+
* @param logger - Logger service for logging messages.
|
|
2495
|
+
* @param agentsStore - The agents store to access agent configurations.
|
|
2496
|
+
*
|
|
2497
|
+
* @returns An instance of {@link SavedChatsService} if enabled, otherwise `undefined`.
|
|
2498
|
+
*
|
|
2499
|
+
* @see https://doc-internal.sinequa.com/assistant/latest/app-json-customization#saved-chat---savedchatsettings-object
|
|
2500
|
+
*/
|
|
2501
|
+
declare function provideSavedChatsService(instanceId: string, logger: LoggerService, agentsStore: InstanceType<typeof AgentsStore>): SavedChatsService | undefined;
|
|
2502
|
+
|
|
2503
|
+
/**
|
|
2504
|
+
* Creates environment providers for Shiki syntax highlighter configuration.
|
|
2505
|
+
*
|
|
2506
|
+
* @param config - The Shiki configuration object containing highlighter settings
|
|
2507
|
+
* @returns An array of environment providers that can be used in the application configuration
|
|
2508
|
+
*/
|
|
2509
|
+
declare const provideShikiHighlighterConfig: (config: ShikiConfig) => _angular_core.EnvironmentProviders;
|
|
2510
|
+
/**
|
|
2511
|
+
* Provides the default Shiki syntax highlighter configuration with commonly used programming languages and themes.
|
|
2512
|
+
*
|
|
2513
|
+
* @remarks
|
|
2514
|
+
* This configuration includes support for web technologies (HTML, CSS, JavaScript/TypeScript),
|
|
2515
|
+
* data formats (JSON, CSV, XML), and other common languages (Python, Markdown, SQL).
|
|
2516
|
+
* It uses GitHub's light and dark themes with light as the default.
|
|
2517
|
+
*
|
|
2518
|
+
* @returns A configured Shiki highlighter provider with predefined languages and themes.
|
|
2519
|
+
*/
|
|
2520
|
+
declare const provideDefaultShikiHighlighterConfig: () => _angular_core.EnvironmentProviders;
|
|
2521
|
+
|
|
2522
|
+
/**
|
|
2523
|
+
* Factory function to provide tool card plugins.
|
|
2524
|
+
*
|
|
2525
|
+
* @param plugins - tool card plugins to provide
|
|
2526
|
+
*
|
|
2527
|
+
* @returns environment providers
|
|
2528
|
+
*/
|
|
2529
|
+
declare const provideToolCardPlugins: (plugins: ToolCardPlugins) => _angular_core.EnvironmentProviders;
|
|
2530
|
+
/**
|
|
2531
|
+
* Provides default Agent tool card plugins.
|
|
2532
|
+
*
|
|
2533
|
+
* @returns environment providers
|
|
2534
|
+
*/
|
|
2535
|
+
declare const provideDefaultToolCardPlugins: () => _angular_core.EnvironmentProviders;
|
|
2536
|
+
|
|
2537
|
+
declare class AgentConfigurationService {
|
|
2538
|
+
private readonly http;
|
|
2539
|
+
/**
|
|
2540
|
+
* Retrieve the agent configuration from the backend.
|
|
2541
|
+
*
|
|
2542
|
+
* @param name - The name of the agent to retrieve the configuration for.
|
|
2543
|
+
*
|
|
2544
|
+
* @returns An observable emitting the agent configuration.
|
|
2545
|
+
*/
|
|
2546
|
+
getAgent(name: string, contextProperties?: ContextProperties): rxjs.Observable<AgentDetails>;
|
|
2547
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AgentConfigurationService, never>;
|
|
2548
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<AgentConfigurationService>;
|
|
2549
|
+
}
|
|
2550
|
+
|
|
2551
|
+
type AgentAuditType = 'agent.report.positive.click' | 'agent.report.negative.click' | 'agent.report.positive.submit' | 'agent.report.negative.submit';
|
|
2552
|
+
declare class AuditService {
|
|
2553
|
+
private readonly instanceId;
|
|
2554
|
+
private readonly agentName;
|
|
2555
|
+
private readonly principal;
|
|
2556
|
+
createAuditObject(type: AgentAuditType, chatId: string, payload?: object): AuditEvent;
|
|
2557
|
+
notify(payload: AuditEvent): Promise<_sinequa_atomic.AuditEvents>;
|
|
2558
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AuditService, never>;
|
|
2559
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<AuditService>;
|
|
2560
|
+
}
|
|
2561
|
+
|
|
2562
|
+
type Notification = {
|
|
2563
|
+
type: 'success' | 'error' | 'info' | 'warning';
|
|
2564
|
+
title: string;
|
|
2565
|
+
description?: string;
|
|
2566
|
+
error?: any;
|
|
2567
|
+
};
|
|
2568
|
+
declare class NotificationsService {
|
|
2569
|
+
readonly notifications: Subject<Notification>;
|
|
2570
|
+
notify(notification: Notification): void;
|
|
2571
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NotificationsService, never>;
|
|
2572
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<NotificationsService>;
|
|
2573
|
+
}
|
|
2574
|
+
|
|
2575
|
+
/**
|
|
2576
|
+
* This service exposes the only reference to the markdown renderer used in the agent.
|
|
2577
|
+
* Built with injected plugins, it can be extended to support custom markdown syntax.
|
|
2578
|
+
*
|
|
2579
|
+
* @see {@link AGENT_RENDERER_PLUGINS} token
|
|
2580
|
+
*/
|
|
2581
|
+
declare class RendererService {
|
|
2582
|
+
private readonly plugins;
|
|
2583
|
+
private readonly shikiHighlighterService;
|
|
2584
|
+
readonly renderer: MarkdownIt;
|
|
2585
|
+
constructor();
|
|
2586
|
+
private createRenderer;
|
|
2587
|
+
private useShiki;
|
|
2588
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RendererService, never>;
|
|
2589
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<RendererService>;
|
|
2590
|
+
}
|
|
2591
|
+
|
|
2592
|
+
declare class ThemeService {
|
|
2593
|
+
readonly mode: _angular_core.WritableSignal<"light" | "dark">;
|
|
2594
|
+
constructor();
|
|
2595
|
+
set(mode: 'light' | 'dark'): void;
|
|
2596
|
+
toggle(): void;
|
|
2597
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ThemeService, never>;
|
|
2598
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<ThemeService>;
|
|
2599
|
+
}
|
|
2600
|
+
|
|
2601
|
+
declare function themeInitializerFn(): void;
|
|
2602
|
+
|
|
2603
|
+
declare class ShikiHighlighterService {
|
|
2604
|
+
private readonly config;
|
|
2605
|
+
private readonly themeService;
|
|
2606
|
+
private readonly isDark;
|
|
2607
|
+
private highlighterPromise;
|
|
2608
|
+
private init;
|
|
2609
|
+
applyToMarkdownIt(md: MarkdownIt): Promise<void>;
|
|
2610
|
+
highlight(code: string, lang: string): Promise<string>;
|
|
2611
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ShikiHighlighterService, never>;
|
|
2612
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<ShikiHighlighterService>;
|
|
2613
|
+
}
|
|
2614
|
+
|
|
2615
|
+
/**
|
|
2616
|
+
* Manages the PKCE OAuth2 authorization flow for MCP clients.
|
|
2617
|
+
*
|
|
2618
|
+
* Handles: code verifier/challenge generation, opening the auth tab,
|
|
2619
|
+
* listening for the postMessage callback from the OAuth callback route,
|
|
2620
|
+
* and resolving the authorization code back to the caller.
|
|
2621
|
+
*/
|
|
2622
|
+
declare class McpOAuthService {
|
|
2623
|
+
/** The MCP client currently awaiting OAuth authorization, or null when idle. */
|
|
2624
|
+
readonly pendingClient: _angular_core.WritableSignal<McpClient | null>;
|
|
2625
|
+
private currentCodeVerifier;
|
|
2626
|
+
private pendingResolve;
|
|
2627
|
+
private pendingReject;
|
|
2628
|
+
private readonly messageListener;
|
|
2629
|
+
/**
|
|
2630
|
+
* Starts the PKCE OAuth2 flow for the given MCP client.
|
|
2631
|
+
*
|
|
2632
|
+
* Navigates the provided popup (or opens a new one) to the authorization URL with PKCE
|
|
2633
|
+
* parameters appended, then waits for the callback page to post the authorization code
|
|
2634
|
+
* back via postMessage.
|
|
2635
|
+
*
|
|
2636
|
+
* The `popup` parameter should be opened **synchronously** by the caller (before any
|
|
2637
|
+
* `await`) to avoid browser popup blockers. Passing it here prevents a second `window.open`
|
|
2638
|
+
* call after an async boundary.
|
|
2639
|
+
*
|
|
2640
|
+
* @param client - The MCP client to authorize. Must have `authorizationUrl` set.
|
|
2641
|
+
* @param popup - A blank popup window already opened by the caller, or `undefined` to
|
|
2642
|
+
* let this method open one (only safe when called synchronously from a user gesture).
|
|
2643
|
+
*
|
|
2644
|
+
* @returns A promise that resolves with the authorization code and PKCE code verifier,
|
|
2645
|
+
* or rejects if the flow is cancelled or the popup could not be opened.
|
|
2646
|
+
*/
|
|
2647
|
+
startOAuthFlow(client: McpClient, popup?: Window): Promise<{
|
|
2648
|
+
code: string;
|
|
2649
|
+
codeVerifier: string;
|
|
2650
|
+
}>;
|
|
2651
|
+
/**
|
|
2652
|
+
* Cancels the in-progress OAuth flow, if any.
|
|
2653
|
+
* Clears pending state and removes the message listener.
|
|
2654
|
+
*/
|
|
2655
|
+
cancelOAuth(): void;
|
|
2656
|
+
private handleOAuthMessage;
|
|
2657
|
+
private cleanup;
|
|
2658
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<McpOAuthService, never>;
|
|
2659
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<McpOAuthService>;
|
|
2660
|
+
}
|
|
2661
|
+
|
|
2662
|
+
/**
|
|
2663
|
+
* Generic modal shell with a side navigation menu.
|
|
2664
|
+
*
|
|
2665
|
+
* Provides a responsive two-layout shell:
|
|
2666
|
+
* - Mobile (below md): close button + projected body content
|
|
2667
|
+
* - Desktop (md+): fixed-width sidebar for navigation + scrollable content inset
|
|
2668
|
+
*
|
|
2669
|
+
* The caller fills three named content slots:
|
|
2670
|
+
* - [mobile-body] Full mobile body, e.g. a <tabs> component with nav + section content
|
|
2671
|
+
* - [desktop-nav] Sidebar navigation items, e.g. <sidebar-menu-item> elements
|
|
2672
|
+
* - [desktop-content] Content shown in the inset next to the sidebar
|
|
2673
|
+
*
|
|
2674
|
+
* The caller is responsible for managing active-section state and conditional
|
|
2675
|
+
* rendering of section content. Sidebar CSS variable theming (--sidebar-*, etc.)
|
|
2676
|
+
* can be overridden by setting them on the caller's :host styles block — they
|
|
2677
|
+
* cascade through the DOM to the sidebar-provider inside this component.
|
|
2678
|
+
*
|
|
2679
|
+
* Usage:
|
|
2680
|
+
* <MenuModal (closed)="onClose()">
|
|
2681
|
+
* <tabs mobile-body>...</tabs>
|
|
2682
|
+
* <sidebar-menu-item desktop-nav>...</sidebar-menu-item>
|
|
2683
|
+
* <div desktop-content>...</div>
|
|
2684
|
+
* </MenuModal>
|
|
2685
|
+
*/
|
|
2686
|
+
declare class MenuModalComponent {
|
|
2687
|
+
/** Emitted when the user clicks the close button in either mobile or desktop view. */
|
|
2688
|
+
readonly closed: _angular_core.OutputEmitterRef<void>;
|
|
2689
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MenuModalComponent, never>;
|
|
2690
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MenuModalComponent, "MenuModal,menu-modal", never, {}, { "closed": "closed"; }, never, ["[mobile-body]", "[desktop-nav]", "[desktop-content]"], true, never>;
|
|
2691
|
+
}
|
|
2692
|
+
|
|
2693
|
+
declare class SettingsComponent {
|
|
2694
|
+
private readonly agentsStore;
|
|
2695
|
+
private readonly router;
|
|
2696
|
+
readonly toggled: _angular_core.WritableSignal<boolean>;
|
|
2697
|
+
readonly debug: _angular_core.ModelSignal<boolean>;
|
|
2698
|
+
private readonly appearanceDialog;
|
|
2699
|
+
logout(): void;
|
|
2700
|
+
openAppearance(): void;
|
|
2701
|
+
constructor();
|
|
2702
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SettingsComponent, never>;
|
|
2703
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SettingsComponent, "Settings,settings", never, { "debug": { "alias": "debug"; "required": false; "isSignal": true; }; }, { "debug": "debugChange"; }, never, never, true, never>;
|
|
2704
|
+
}
|
|
2705
|
+
|
|
2706
|
+
declare class SettingsModalComponent {
|
|
2707
|
+
readonly closed: _angular_core.OutputEmitterRef<void>;
|
|
2708
|
+
readonly activeSection: _angular_core.WritableSignal<"theme">;
|
|
2709
|
+
readonly theme: _angular_core.WritableSignal<"system" | "light" | "dark">;
|
|
2710
|
+
readonly widerView: _angular_core.WritableSignal<boolean>;
|
|
2711
|
+
constructor();
|
|
2712
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SettingsModalComponent, never>;
|
|
2713
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SettingsModalComponent, "SettingsModal,settings-modal", never, {}, { "closed": "closed"; }, never, never, true, never>;
|
|
2714
|
+
}
|
|
2715
|
+
|
|
2716
|
+
declare class ChartPlotComponent {
|
|
2717
|
+
readonly chartPlotRef: _angular_core.Signal<ElementRef<HTMLCanvasElement>>;
|
|
2718
|
+
private readonly destroyRef;
|
|
2719
|
+
private chart?;
|
|
2720
|
+
constructor();
|
|
2721
|
+
private parseChartJsConfig;
|
|
2722
|
+
private getChartJsConfig;
|
|
2723
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ChartPlotComponent, never>;
|
|
2724
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ChartPlotComponent, "chart-plot", never, {}, {}, never, ["*"], true, never>;
|
|
2725
|
+
}
|
|
2726
|
+
|
|
2727
|
+
declare class CodeBlockComponent {
|
|
2728
|
+
private readonly el;
|
|
2729
|
+
readonly language: _angular_core.InputSignal<string>;
|
|
2730
|
+
onCopySuccess(text: string): void;
|
|
2731
|
+
private dispatchEvent;
|
|
2732
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CodeBlockComponent, never>;
|
|
2733
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CodeBlockComponent, "code-block", never, { "language": { "alias": "language"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
2734
|
+
}
|
|
2735
|
+
|
|
2736
|
+
declare class InlineReferenceComponent {
|
|
2737
|
+
private readonly destroyRef;
|
|
2738
|
+
private readonly selectionStore;
|
|
2739
|
+
private readonly previewService;
|
|
2740
|
+
protected readonly agentsStore: {
|
|
2741
|
+
ready: _angular_core.Signal<boolean>;
|
|
2742
|
+
savedChatReady: _angular_core.Signal<boolean>;
|
|
2743
|
+
debugMessages: _angular_core.Signal<boolean>;
|
|
2744
|
+
referenceCache: _angular_core.Signal<Record<string, Reference>>;
|
|
2745
|
+
agentDetails: _angular_core.Signal<_sinequa_agent.AgentDetails | undefined>;
|
|
2746
|
+
agentDetailsLoading: _angular_core.Signal<boolean>;
|
|
2747
|
+
toolChoice: _angular_core.Signal<_sinequa_agent.ToolChoice | undefined>;
|
|
2748
|
+
setReady: (ready: boolean) => void;
|
|
2749
|
+
setSavedChatReady: (ready: boolean) => void;
|
|
2750
|
+
getAgentInstanceConfiguration: (instanceId: string) => z.infer<typeof _sinequa_agent.AgentConfigSchema> | undefined;
|
|
2751
|
+
setDebugMessages: (debug: boolean) => void;
|
|
2752
|
+
setReferences: (references: Record<string, Reference>) => void;
|
|
2753
|
+
addReference: (reference: Reference) => void;
|
|
2754
|
+
addReferences: (references: Record<string, Reference>) => void;
|
|
2755
|
+
getReferenceMetas: (id: string) => Reference["metas"] | undefined;
|
|
2756
|
+
getAgentDetails: (name: string) => void;
|
|
2757
|
+
updateAgentDetails: (name: string) => void;
|
|
2758
|
+
reloadAgentDetails: () => void;
|
|
2759
|
+
updateToolChoice: (toolChoice: _sinequa_agent.ToolChoice) => void;
|
|
2760
|
+
} & _ngrx_signals.WritableStateSource<{
|
|
2761
|
+
ready: boolean;
|
|
2762
|
+
savedChatReady: boolean;
|
|
2763
|
+
debugMessages: boolean;
|
|
2764
|
+
referenceCache: Record<string, Reference>;
|
|
2765
|
+
agentDetails: _sinequa_agent.AgentDetails | undefined;
|
|
2766
|
+
agentDetailsLoading: boolean;
|
|
2767
|
+
toolChoice: _sinequa_agent.ToolChoice | undefined;
|
|
2768
|
+
}>;
|
|
2769
|
+
readonly rawData: _angular_core.InputSignalWithTransform<string, string>;
|
|
2770
|
+
readonly references: _angular_core.Signal<InlineReference[]>;
|
|
2771
|
+
readonly highlights: _angular_core.Signal<{
|
|
2772
|
+
offset: number;
|
|
2773
|
+
length: number;
|
|
2774
|
+
}[]>;
|
|
2775
|
+
readonly controller: AbortController;
|
|
2776
|
+
private selectedIndex;
|
|
2777
|
+
listen: (event: MessageEvent) => void;
|
|
2778
|
+
constructor();
|
|
2779
|
+
select(index: number): void;
|
|
2780
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<InlineReferenceComponent, never>;
|
|
2781
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<InlineReferenceComponent, "inline-reference", never, { "rawData": { "alias": "data-references"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
2782
|
+
}
|
|
2783
|
+
|
|
2784
|
+
declare class TableWrapperComponent {
|
|
2785
|
+
private readonly el;
|
|
2786
|
+
private readonly copyState;
|
|
2787
|
+
protected readonly hasCopied: _angular_core.Signal<boolean>;
|
|
2788
|
+
copyAsCSV(event: Event): Promise<void>;
|
|
2789
|
+
downloadAsCSV(): void;
|
|
2790
|
+
private extractCSV;
|
|
2791
|
+
private dispatchEvent;
|
|
2792
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TableWrapperComponent, never>;
|
|
2793
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TableWrapperComponent, "table-wrapper", never, {}, {}, never, ["*"], true, never>;
|
|
2794
|
+
}
|
|
2795
|
+
|
|
2796
|
+
declare function markdownItCodeBlockPlugin(md: MarkdownIt): void;
|
|
2797
|
+
|
|
2798
|
+
declare function markdownItInlineReferencePlugin(md: MarkdownIt): void;
|
|
2799
|
+
|
|
2800
|
+
/**
|
|
2801
|
+
* This plugin wraps the default link renderer to add `target="_blank"` and
|
|
2802
|
+
* `rel="noopener noreferrer"` attributes to all links.
|
|
2803
|
+
*/
|
|
2804
|
+
declare function markdownItLinkPlugin(md: MarkdownIt): void;
|
|
2805
|
+
|
|
2806
|
+
/**
|
|
2807
|
+
* This plugin adds the `markdown-list` CSS class to root-level bullet and
|
|
2808
|
+
* ordered lists rendered by markdown-it, enabling scoped styling without
|
|
2809
|
+
* wrapping the list in an extra element.
|
|
2810
|
+
*/
|
|
2811
|
+
declare function markdownItListPlugin(md: MarkdownIt): void;
|
|
2812
|
+
|
|
2813
|
+
/**
|
|
2814
|
+
* This plugin wraps the default table renderer into a custom `<table-wrapper>`
|
|
2815
|
+
* tag.
|
|
2816
|
+
*/
|
|
2817
|
+
declare function markdownItTableWrapperPlugin(md: MarkdownIt): void;
|
|
2818
|
+
|
|
2819
|
+
/**
|
|
2820
|
+
* Markdown-it plugin to replace ```chartjs fenced blocks
|
|
2821
|
+
* with <chart-plot> custom elements.
|
|
2822
|
+
*/
|
|
2823
|
+
declare function markdownItChartJsPlugin(md: MarkdownIt): void;
|
|
2824
|
+
|
|
2825
|
+
declare class SmartRendererComponent {
|
|
2826
|
+
private readonly rendererService;
|
|
2827
|
+
readonly message: _angular_core.InputSignal<string | null | undefined>;
|
|
2828
|
+
readonly context: _angular_core.InputSignal<any>;
|
|
2829
|
+
readonly done: _angular_core.InputSignal<boolean>;
|
|
2830
|
+
readonly safe: _angular_core.WritableSignal<string>;
|
|
2831
|
+
readonly processing: _angular_core.WritableSignal<string>;
|
|
2832
|
+
private renderer;
|
|
2833
|
+
private lastSliceIndex;
|
|
2834
|
+
private localSliceIndex;
|
|
2835
|
+
constructor();
|
|
2836
|
+
messageUpdated(): void;
|
|
2837
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SmartRendererComponent, never>;
|
|
2838
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SmartRendererComponent, "SmartRenderer, smartrenderer, smart-renderer", never, { "message": { "alias": "message"; "required": false; "isSignal": true; }; "context": { "alias": "context"; "required": false; "isSignal": true; }; "done": { "alias": "done"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
2839
|
+
}
|
|
2840
|
+
|
|
2841
|
+
/**
|
|
2842
|
+
* Copies the given text to the clipboard to the navigator clipboard.
|
|
2843
|
+
*
|
|
2844
|
+
* @param text - The text to copy to clipboard.
|
|
2845
|
+
*
|
|
2846
|
+
* @returns A promise that resolves when the text has been copied.
|
|
2847
|
+
*/
|
|
2848
|
+
declare function copyToClipboard(text: string): Promise<void>;
|
|
2849
|
+
/**
|
|
2850
|
+
* Creates an isolated copy state with a `hasCopied` readonly signal and a `copy()` method.
|
|
2851
|
+
* The `hasCopied` signal is automatically reset to `false` after `resetDelay` ms.
|
|
2852
|
+
*
|
|
2853
|
+
* @param resetDelay - How long (in ms) to keep `hasCopied` as `true`. Defaults to 2000.
|
|
2854
|
+
*/
|
|
2855
|
+
declare function createCopyState(resetDelay?: number): {
|
|
2856
|
+
hasCopied: _angular_core.Signal<boolean>;
|
|
2857
|
+
copy: (text: string) => Promise<void>;
|
|
2858
|
+
};
|
|
2859
|
+
|
|
2860
|
+
declare function checkUUID(uuid: string): boolean;
|
|
2861
|
+
|
|
2862
|
+
/**
|
|
2863
|
+
* Slices the history from the given messageId (inclusive).
|
|
2864
|
+
*
|
|
2865
|
+
* @param history - The history to slice.
|
|
2866
|
+
* @param messageId - The messageId to slice from (inclusive).
|
|
2867
|
+
*
|
|
2868
|
+
* @returns The sliced history.
|
|
2869
|
+
*/
|
|
2870
|
+
declare function sliceHistoryFromMessageId(history: Message[], messageId: string | undefined): Message[];
|
|
2871
|
+
|
|
2872
|
+
/**
|
|
2873
|
+
* Transforms the message content into a string format suitable for rendering.
|
|
2874
|
+
* Special message contents, like images or videos, are currently ignored.
|
|
2875
|
+
* @param messageContent - The list of {@link MessageContent} to transform into a string
|
|
2876
|
+
* @returns The transformed message contents as a string
|
|
2877
|
+
*/
|
|
2878
|
+
declare function flattenMessageContent(messageContent: MessageContent[] | undefined): string;
|
|
2879
|
+
/**
|
|
2880
|
+
* Identifies the type of a message based on its role and content.
|
|
2881
|
+
* @param message - The message to identify.
|
|
2882
|
+
* @returns The identified message type as a string.
|
|
2883
|
+
*/
|
|
2884
|
+
declare function identifyMessage(message?: Message): MessageIdentity | undefined;
|
|
2885
|
+
/**
|
|
2886
|
+
* Determines if a message could be a streamed message.
|
|
2887
|
+
* @param message - The message to check.
|
|
2888
|
+
* @returns True if the message is a potential streamed message, false otherwise.
|
|
2889
|
+
*/
|
|
2890
|
+
declare function isAStreamMessage(message: Message | undefined): boolean;
|
|
2891
|
+
|
|
2892
|
+
declare function debouncedSignal<T>(sourceSignal: Signal<T>, debounceTimeInMs?: number): Signal<T>;
|
|
2893
|
+
|
|
2894
|
+
/**
|
|
2895
|
+
* Returns the URL without duplicate slashes (be cautious with the "http(s)://" part)
|
|
2896
|
+
* @param url - The URL to clean
|
|
2897
|
+
* @returns The cleaned URL
|
|
2898
|
+
*/
|
|
2899
|
+
declare function cleanURL(url: string): string;
|
|
2900
|
+
/**
|
|
2901
|
+
* Concatenates multiple parts of a URL and cleans it (be cautious with the "http(s)://" part)
|
|
2902
|
+
* @param url - The parts of the URL to concatenate
|
|
2903
|
+
* @returns The concatenated and cleaned URL
|
|
2904
|
+
*/
|
|
2905
|
+
declare function concatURL(...url: string[]): string;
|
|
2906
|
+
declare function toURLSearchParams(object: object): URLSearchParams;
|
|
2907
|
+
|
|
2908
|
+
declare class ShikiCodeComponent implements AfterViewInit {
|
|
2909
|
+
private shiki;
|
|
2910
|
+
private readonly el;
|
|
2911
|
+
lang: _angular_core.InputSignal<string>;
|
|
2912
|
+
enableCopy: _angular_core.InputSignal<boolean>;
|
|
2913
|
+
classes: _angular_core.InputSignal<string>;
|
|
2914
|
+
copySuccess: _angular_core.OutputEmitterRef<string>;
|
|
2915
|
+
copyError: _angular_core.OutputEmitterRef<unknown>;
|
|
2916
|
+
private readonly shikiContainer;
|
|
2917
|
+
private readonly copyState;
|
|
2918
|
+
protected readonly hasCopied: _angular_core.Signal<boolean>;
|
|
2919
|
+
private rawCode;
|
|
2920
|
+
ngAfterViewInit(): Promise<void>;
|
|
2921
|
+
copy(event: Event): Promise<void>;
|
|
2922
|
+
private hasPreRenderedShiki;
|
|
2923
|
+
private extractRawCode;
|
|
2924
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ShikiCodeComponent, never>;
|
|
2925
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ShikiCodeComponent, "shiki-code,ShikiCode,shikicode", never, { "lang": { "alias": "lang"; "required": true; "isSignal": true; }; "enableCopy": { "alias": "enableCopy"; "required": false; "isSignal": true; }; "classes": { "alias": "classes"; "required": false; "isSignal": true; }; }, { "copySuccess": "copySuccess"; "copyError": "copyError"; }, never, ["*"], true, never>;
|
|
2926
|
+
}
|
|
2927
|
+
|
|
2928
|
+
export { ADMIN_EVENT_NAME, AGENT_ACTION_EVENT_NAME, AGENT_DEFAULT_NAME, AGENT_ERROR_EVENT_NAME, AGENT_EVENT_NAME, AGENT_INSTANCE_ID, AGENT_NEW_CHAT_EVENT_NAME, AGENT_RENDERER_PLUGINS, AGENT_TOOL_CARD_PLUGINS, ASignalRService, AdditionalToolPropertiesSchema, AdminDirective, Agent, AgentConfigSchema, AgentConfigurationService, AgentGenerationDirective, AgentInjector, AgentService, AgentsStore, AuditService, AuditSettingsSchema, AvailableInternalToolsComponent, AvailableMcpServersComponent, ButtonComponent, CastToDebugKVPipe, CastToDebugListPipe, ChartPlotComponent, ChatInput, ChatInputMode, CodeBlockComponent, ConnectionSettingsSchema, CopyToClipboardDirective, CopyableFieldComponent, DebugService, DocumentCardComponent, ErrorDirective, ExpandedSearchResultsComponent, FeedbackDirective, GlobalSettingsSchema, HyperlinkComponent, INSPECT_XSTATE, InfoPanelComponent, InlineReferenceComponent, LoggerService, Machine, McpConnectDialogComponent, McpOAuthService, McpServerItemComponent, MenuModalComponent, MessageAgentComponent, MessageAgentToolbar, MessageBaseComponent, MessageBuilder, MessageDebugComponent, MessageDebugDetailsComponent, MessageDebugEntryComponent, MessageDebugKVComponent, MessageDebugListComponent, MessageFunctionComponent, MessageList, MessageService, MessageUserComponent, MessageUserToolbar, NotificationsService, OAuthCallbackComponent, ReadDocumentFunctionComponent, RendererService, SHIKI_HIGHLIGHTER_CONFIG, SIGNALR_RETRY_DELAYS, SIGNALR_RETRY_DELAYS_DEFAULT, SafeHtmlPipe, SavedChatActions, SavedChatComponent, SavedChatEvent, SavedChatSettingsSchema, SavedChatsDialogComponent, SavedChatsService, SearchExpansionService, SearchFunctionComponent, SearchResultsTabsComponent, SettingsComponent, SettingsModalComponent, ShikiCodeComponent, ShikiHighlighterService, SignalRLogLevelSchema, SignalRService, SignalRTransportSchema, SignalRWebService, SmartRendererComponent, TableWrapperComponent, ThemeService, ToolsSelectionPanelComponent, buttonVariants, checkUUID, cleanURL, concatURL, copyToClipboard, createActionEvent, createAdminEvent, createAgentErrorEvent, createAgentEvent, createAgentNewChatEvent, createCopyState, debouncedSignal, flattenMessageContent, hyperlinkVariants, identifyMessage, isAStreamMessage, isAgentActionEvent, isInputActionEvent, isUserActionEvent, markdownItChartJsPlugin, markdownItCodeBlockPlugin, markdownItInlineReferencePlugin, markdownItLinkPlugin, markdownItListPlugin, markdownItTableWrapperPlugin, provideDefaultRendererPlugins, provideDefaultShikiHighlighterConfig, provideDefaultToolCardPlugins, provideRendererPlugins, provideSavedChatsService, provideShikiHighlighterConfig, provideToolCardPlugins, sliceHistoryFromMessageId, themeInitializerFn, toURLSearchParams, withAgentDetailsFeatures, withAgentsFeatures, withDebugFeatures };
|
|
2929
|
+
export type { ActionEvent, AdditionalProperties, AdditionalToolProperties, AdminEvent, AdminEventId, AdminEventPayload, AgentAuditType, AgentConfig, AgentDetails, AgentDetailsState, AgentErrorEvent, AgentErrorId, AgentEvent, AgentEventId, AgentMachineContext, AgentMachineEvents, AgentMachineInput, AgentNewChatEvent, AgentsState, ApplicationContext, AuditSettings, BasePayload, ButtonVariants, ConnectionOptions, ConnectionSettings, ContextDocument, ContextDocumentChunk, ContextDocumentMeta, ContextProperties, DebugDisplayFrame, DebugDisplayItem, DebugDisplayItemData, DebugDisplayItemKV, DebugDisplayItemList, DebugMessage, DebugMessageGroup, DebugMessageListPayload, DebugMessageProperties, DebugState, FrameEvent, FrameEventName, FrameEventType, FunctionCall, GlobalSettings, HistoryContent, HistoryContentBase, HistoryContentImage, HistoryContentText, HistoryContentVideo, HistoryFrame, HyperlinkVariants, InlineReference, InputAction, InputActionEvent, InstanceState, InternalTool, MarkdownItPlugin, McpAuthorizationStatus, McpClient, McpTool, Message, MessageAgentAction, MessageAgentActionEvent, MessageComponentType, MessageContent, MessageContentFunctionApprovalRequest, MessageContentFunctionApprovalResponse, MessageContentFunctionCall, MessageContentFunctionResult, MessageContentImage, MessageContentText, MessageContentVideo, MessageFrame, MessageIdentity, MessageRole, MessageType, MessageUserAction, MessageUserActionEvent, Notification, OAuthRequiredFrame, RendererPlugins, SavedChat, SavedChatAddPayload, SavedChatDeletePayload, SavedChatExistsPayload, SavedChatGetPayload, SavedChatListPayload, SavedChatSettings, SavedChatUpdatePayload, SearchContext, ShikiConfig, ShikiThemeMode, SignalRConnectionOperationConfig, SignalREvent, SignalREventBase, SignalREventConnected, SignalREventDisconnected, SignalREventReconnecting, SignalRLogLevel, SignalRTransport, ToolCardPlugins, ToolChoice, UserFeedback, UserFeedbackNegative, UserFeedbackPositive, functionCallFrame, functionResultFrame };
|