@camunda/copilot-chat 0.8.1-alpha.2 → 0.8.1-alpha.4
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/LICENSES/Apache-2.0.txt +202 -0
- package/README.md +186 -3
- package/THIRD_PARTY_NOTICES.md +25 -0
- package/dist/{highlighted-body-OFNGDK62-Dyibgzkv.js → highlighted-body-OFNGDK62-MgzBXhjb.js} +1 -1
- package/dist/{index-WwYib96f.js → index-DAyxug2G.js} +8181 -6994
- package/dist/index.css +1 -1
- package/dist/index.d.ts +180 -68
- package/dist/index.js +14 -11
- package/dist/mermaid-GHXKKRXX-DiHcM5a9.js +4 -0
- package/fixtures/bpmn-element-references.json +58 -0
- package/package.json +4 -3
- package/dist/mermaid-GHXKKRXX-B9Qg8nrx.js +0 -4
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
import { JSX } from 'react';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
|
|
4
|
+
export declare interface AnswerQuestionInput {
|
|
5
|
+
readonly conversationId: string;
|
|
6
|
+
readonly questionId: string;
|
|
7
|
+
readonly questionVersion: number;
|
|
8
|
+
readonly submissionId: string;
|
|
9
|
+
readonly outcome: 'answered' | 'skipped';
|
|
10
|
+
readonly selectedOptionIds?: ReadonlyArray<string>;
|
|
11
|
+
readonly text?: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
4
14
|
export declare interface ArtifactChange {
|
|
5
15
|
readonly changeKind: 'create' | 'modify';
|
|
6
16
|
readonly artifact: ArtifactRef;
|
|
@@ -18,6 +28,11 @@ export declare interface ArtifactRef {
|
|
|
18
28
|
|
|
19
29
|
export declare type ArtifactType = 'bpmn' | 'dmn' | 'form';
|
|
20
30
|
|
|
31
|
+
export declare interface BpmnElementReference {
|
|
32
|
+
readonly artifactId: string;
|
|
33
|
+
readonly elementId: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
21
36
|
export declare interface Candidate {
|
|
22
37
|
readonly candidateId: string;
|
|
23
38
|
readonly messageId: string;
|
|
@@ -39,74 +54,17 @@ export declare const closeSidecar: () => void;
|
|
|
39
54
|
|
|
40
55
|
export declare interface Conversation extends ConversationSummary {
|
|
41
56
|
readonly messages: ReadonlyArray<ConversationMessage>;
|
|
57
|
+
readonly availability?: OrganizationAvailability;
|
|
42
58
|
readonly verificationHealth?: VerificationHealth | null;
|
|
43
59
|
readonly sourceChangedMessageId?: string | null;
|
|
44
60
|
}
|
|
45
61
|
|
|
46
|
-
export declare
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
readonly type: '
|
|
50
|
-
readonly
|
|
51
|
-
|
|
52
|
-
readonly userContent: string;
|
|
53
|
-
} | {
|
|
54
|
-
readonly type: 'turn_finished';
|
|
55
|
-
readonly messageId: string;
|
|
56
|
-
readonly outcome: 'complete' | 'cancelled';
|
|
57
|
-
} | {
|
|
58
|
-
readonly type: 'candidate_proposed';
|
|
59
|
-
readonly messageId: string;
|
|
60
|
-
readonly candidateId: string;
|
|
61
|
-
} | {
|
|
62
|
-
readonly type: 'candidate_resolved';
|
|
63
|
-
readonly messageId: string;
|
|
64
|
-
readonly candidateId: string;
|
|
65
|
-
readonly state: CandidateState;
|
|
66
|
-
readonly checkpointId?: string;
|
|
67
|
-
} | {
|
|
68
|
-
readonly type: 'checkpoint_restored';
|
|
69
|
-
readonly checkpointId: string;
|
|
70
|
-
readonly contents: ReadonlyArray<{
|
|
71
|
-
readonly name: string;
|
|
72
|
-
readonly content: string | null;
|
|
73
|
-
}>;
|
|
74
|
-
} | {
|
|
75
|
-
readonly type: 'failed';
|
|
76
|
-
readonly messageId: string;
|
|
77
|
-
readonly error: CopilotError;
|
|
78
|
-
} | {
|
|
79
|
-
readonly type: 'text';
|
|
80
|
-
readonly messageId: string;
|
|
81
|
-
readonly delta: string;
|
|
82
|
-
} | {
|
|
83
|
-
readonly type: 'activity';
|
|
84
|
-
readonly messageId: string;
|
|
85
|
-
readonly label: string;
|
|
86
|
-
} | {
|
|
87
|
-
readonly type: 'step_start';
|
|
88
|
-
readonly messageId: string;
|
|
89
|
-
readonly stepId: string;
|
|
90
|
-
readonly kind: StepKind;
|
|
91
|
-
readonly name?: string;
|
|
92
|
-
readonly label: string;
|
|
93
|
-
readonly description?: string;
|
|
94
|
-
readonly groupId?: string;
|
|
95
|
-
readonly startedAt?: string;
|
|
96
|
-
} | {
|
|
97
|
-
readonly type: 'step_end';
|
|
98
|
-
readonly messageId: string;
|
|
99
|
-
readonly stepId: string;
|
|
100
|
-
readonly status: 'complete' | 'error';
|
|
101
|
-
readonly description?: string;
|
|
102
|
-
} | {
|
|
103
|
-
readonly type: 'step_removed';
|
|
104
|
-
readonly messageId: string;
|
|
105
|
-
readonly stepId: string;
|
|
106
|
-
} | {
|
|
107
|
-
readonly type: 'source_changed';
|
|
108
|
-
readonly messageId: string;
|
|
109
|
-
});
|
|
62
|
+
export declare const CONVERSATION_NAME_MAX_LENGTH = 100;
|
|
63
|
+
|
|
64
|
+
export declare type ConversationEvent = RevisionedConversationEvent | {
|
|
65
|
+
readonly type: 'availability_changed';
|
|
66
|
+
readonly conversationId: string;
|
|
67
|
+
};
|
|
110
68
|
|
|
111
69
|
export declare interface ConversationMessage {
|
|
112
70
|
readonly messageId: string;
|
|
@@ -115,8 +73,34 @@ export declare interface ConversationMessage {
|
|
|
115
73
|
readonly steps: ReadonlyArray<MessageStep>;
|
|
116
74
|
readonly createdAt?: string;
|
|
117
75
|
readonly state?: MessageState;
|
|
76
|
+
readonly phase?: MessagePhase;
|
|
77
|
+
readonly remoteStop?: RemoteStopStatus;
|
|
78
|
+
readonly cancellationReason?: TurnCancellationReason;
|
|
118
79
|
readonly candidate?: Candidate;
|
|
119
80
|
readonly error?: CopilotError;
|
|
81
|
+
readonly questions?: ReadonlyArray<ConversationQuestion>;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export declare interface ConversationQuestion {
|
|
85
|
+
readonly questionId: string;
|
|
86
|
+
readonly messageId: string;
|
|
87
|
+
readonly questionVersion: number;
|
|
88
|
+
readonly question: string;
|
|
89
|
+
readonly mode: 'single' | 'multiple' | 'text';
|
|
90
|
+
readonly options: ReadonlyArray<{
|
|
91
|
+
readonly id: string;
|
|
92
|
+
readonly label: string;
|
|
93
|
+
}>;
|
|
94
|
+
readonly allowCustomAnswer: boolean;
|
|
95
|
+
readonly state: 'pending' | 'answered' | 'skipped' | 'cancelled';
|
|
96
|
+
readonly answer?: {
|
|
97
|
+
readonly submissionId: string;
|
|
98
|
+
readonly outcome: 'answered' | 'skipped';
|
|
99
|
+
readonly selectedOptionIds: ReadonlyArray<string>;
|
|
100
|
+
readonly text?: string;
|
|
101
|
+
};
|
|
102
|
+
readonly delivery: 'not_attempted' | 'unverified' | 'confirmed';
|
|
103
|
+
readonly createdAt: string;
|
|
120
104
|
}
|
|
121
105
|
|
|
122
106
|
export declare type ConversationStatus = 'idle' | 'running';
|
|
@@ -128,9 +112,12 @@ declare interface ConversationStoreState {
|
|
|
128
112
|
readonly status: ConversationStatus | null;
|
|
129
113
|
readonly verificationHealth: VerificationHealth | null;
|
|
130
114
|
readonly sourceChangedMessageId: string | null;
|
|
115
|
+
readonly name: string | null;
|
|
131
116
|
readonly originArtifact: ArtifactRef | null;
|
|
132
117
|
readonly preview: string;
|
|
133
118
|
readonly pendingCandidate: boolean;
|
|
119
|
+
readonly availability: OrganizationAvailability | null;
|
|
120
|
+
readonly pendingQuestionId?: string;
|
|
134
121
|
readonly messages: ReadonlyArray<MessageStoreState>;
|
|
135
122
|
readonly messagesLoaded: boolean;
|
|
136
123
|
}
|
|
@@ -139,9 +126,11 @@ export declare interface ConversationSummary {
|
|
|
139
126
|
readonly conversationId: string;
|
|
140
127
|
readonly revision?: number;
|
|
141
128
|
readonly status: ConversationStatus;
|
|
129
|
+
readonly name?: string;
|
|
142
130
|
readonly originArtifact?: ArtifactRef;
|
|
143
131
|
readonly preview: string;
|
|
144
132
|
readonly pendingCandidate: boolean;
|
|
133
|
+
readonly pendingQuestionId?: string;
|
|
145
134
|
}
|
|
146
135
|
|
|
147
136
|
/**
|
|
@@ -156,6 +145,8 @@ export declare interface CopilotBadgeProps {
|
|
|
156
145
|
}
|
|
157
146
|
|
|
158
147
|
export declare interface CopilotClient {
|
|
148
|
+
getAvailability?(): Promise<OrganizationAvailability>;
|
|
149
|
+
answerQuestion?(input: AnswerQuestionInput): Promise<void>;
|
|
159
150
|
postMessage(input: PostMessageInput): Promise<{
|
|
160
151
|
conversationId: string;
|
|
161
152
|
}>;
|
|
@@ -163,13 +154,14 @@ export declare interface CopilotClient {
|
|
|
163
154
|
getConversation(conversationId: string): Promise<Conversation>;
|
|
164
155
|
listConversations(): Promise<ReadonlyArray<ConversationSummary>>;
|
|
165
156
|
observeConversationList?(onSummary: (summary: ConversationSummary) => void, onConnected?: () => void, onError?: (error: Error) => void): () => void;
|
|
157
|
+
renameConversation?(conversationId: string, name: string): Promise<ConversationSummary>;
|
|
166
158
|
approve(candidateId: string): Promise<void>;
|
|
167
159
|
reject(candidateId: string): Promise<void>;
|
|
168
160
|
restoreCheckpoint(checkpointId: string): Promise<void>;
|
|
169
161
|
cancelTurn(conversationId: string): Promise<void>;
|
|
170
162
|
}
|
|
171
163
|
|
|
172
|
-
export declare const CopilotConversationPanel: ({ client, conversationId, onConversationStarted, onSelectConversation, projectName, projectNameUnavailable, readOnlyReason, onOpenProject, onClose, renderReview, artifacts, suggestions, selectionContext, }: CopilotConversationPanelProps) => JSX.Element;
|
|
164
|
+
export declare const CopilotConversationPanel: ({ client, conversationId, onConversationStarted, onSelectConversation, projectName, projectNameUnavailable, readOnlyReason, onOpenProject, onClose, renderReview, renderElementReference, artifacts, suggestions, selectionContext, }: CopilotConversationPanelProps) => JSX.Element;
|
|
173
165
|
|
|
174
166
|
export declare interface CopilotConversationPanelProps {
|
|
175
167
|
readonly client: CopilotClient;
|
|
@@ -191,6 +183,7 @@ export declare interface CopilotConversationPanelProps {
|
|
|
191
183
|
readonly projectId: string;
|
|
192
184
|
readonly count: number;
|
|
193
185
|
};
|
|
186
|
+
readonly renderElementReference?: ElementReferenceRenderer;
|
|
194
187
|
}
|
|
195
188
|
|
|
196
189
|
export declare interface CopilotError {
|
|
@@ -199,7 +192,7 @@ export declare interface CopilotError {
|
|
|
199
192
|
readonly traceRef?: string;
|
|
200
193
|
}
|
|
201
194
|
|
|
202
|
-
export declare type CopilotErrorCode = 'PROVIDER_ERROR' | 'CANCELLED' | 'VALIDATION_FAILED' | 'BUDGET_EXCEEDED' | 'STALE_SOURCE';
|
|
195
|
+
export declare type CopilotErrorCode = 'PROVIDER_ERROR' | 'CANCELLED' | 'VALIDATION_FAILED' | 'BUDGET_EXCEEDED' | 'STALE_SOURCE' | 'SUBMISSION_UNVERIFIED' | 'PERMISSION_POLICY_UNVERIFIED';
|
|
203
196
|
|
|
204
197
|
export declare const CopilotSidecar: ({ children }: CopilotSidecarProps) => JSX.Element;
|
|
205
198
|
|
|
@@ -211,6 +204,14 @@ export declare const createFixtureClient: (options?: FixtureClientOptions) => Co
|
|
|
211
204
|
|
|
212
205
|
export declare const createHttpClient: (options: HttpClientOptions) => CopilotClient;
|
|
213
206
|
|
|
207
|
+
export declare type ElementReferenceRenderer = (reference: BpmnElementReference, context: {
|
|
208
|
+
readonly label: string;
|
|
209
|
+
readonly messageId: string;
|
|
210
|
+
readonly blockId: string;
|
|
211
|
+
}) => ReactNode;
|
|
212
|
+
|
|
213
|
+
export declare const encodeBpmnElementReference: (reference: BpmnElementReference) => string;
|
|
214
|
+
|
|
214
215
|
export declare interface EventSourceLike {
|
|
215
216
|
onmessage: ((message: {
|
|
216
217
|
data: string;
|
|
@@ -232,6 +233,9 @@ export declare interface FixtureScript {
|
|
|
232
233
|
readonly changes?: ReadonlyArray<ArtifactChange>;
|
|
233
234
|
readonly error?: CopilotError;
|
|
234
235
|
readonly stepLabels?: ReadonlyArray<string>;
|
|
236
|
+
readonly continuationStepLabels?: ReadonlyArray<string>;
|
|
237
|
+
readonly reconcileHistory?: boolean;
|
|
238
|
+
readonly question?: Pick<ConversationQuestion, 'question' | 'mode' | 'options' | 'allowCustomAnswer'>;
|
|
235
239
|
}
|
|
236
240
|
|
|
237
241
|
declare interface FixtureTiming {
|
|
@@ -246,6 +250,8 @@ export declare interface HttpClientOptions {
|
|
|
246
250
|
readonly eventSource?: new (url: string) => EventSourceLike;
|
|
247
251
|
}
|
|
248
252
|
|
|
253
|
+
export declare type MessagePhase = 'reconciling_history';
|
|
254
|
+
|
|
249
255
|
export declare type MessageState = 'streaming' | 'complete' | 'cancelled' | 'failed';
|
|
250
256
|
|
|
251
257
|
export declare interface MessageStep {
|
|
@@ -254,6 +260,7 @@ export declare interface MessageStep {
|
|
|
254
260
|
readonly name?: string;
|
|
255
261
|
readonly label: string;
|
|
256
262
|
readonly description?: string;
|
|
263
|
+
readonly artifacts?: readonly ArtifactRef[];
|
|
257
264
|
readonly groupId?: string;
|
|
258
265
|
readonly status: StepStatus;
|
|
259
266
|
readonly startedAt?: string;
|
|
@@ -266,13 +273,31 @@ declare interface MessageStoreState {
|
|
|
266
273
|
readonly steps: ReadonlyArray<MessageStep>;
|
|
267
274
|
readonly createdAt: string | null;
|
|
268
275
|
readonly activity: string | null;
|
|
276
|
+
readonly phase: MessagePhase | null;
|
|
277
|
+
readonly remoteStop: RemoteStopStatus | null;
|
|
278
|
+
readonly cancellationReason?: ConversationMessage['cancellationReason'];
|
|
269
279
|
readonly state: MessageState | null;
|
|
270
280
|
readonly candidate: Candidate | null;
|
|
271
281
|
readonly error: CopilotError | null;
|
|
282
|
+
readonly questions?: ReadonlyArray<ConversationQuestion>;
|
|
272
283
|
}
|
|
273
284
|
|
|
274
285
|
export declare const openSidecar: () => void;
|
|
275
286
|
|
|
287
|
+
export declare interface OrganizationAvailability {
|
|
288
|
+
readonly state: 'enabled' | 'organization_disabled';
|
|
289
|
+
readonly policyVersion: string;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
export declare const parseBpmnElementReference: (destination: string) => {
|
|
293
|
+
readonly kind: "ordinary";
|
|
294
|
+
} | {
|
|
295
|
+
readonly kind: "invalid";
|
|
296
|
+
} | {
|
|
297
|
+
readonly kind: "reference";
|
|
298
|
+
readonly reference: BpmnElementReference;
|
|
299
|
+
};
|
|
300
|
+
|
|
276
301
|
export declare interface PostMessageInput {
|
|
277
302
|
readonly prompt: string;
|
|
278
303
|
readonly conversationId?: string;
|
|
@@ -280,6 +305,81 @@ export declare interface PostMessageInput {
|
|
|
280
305
|
readonly reapplyCandidateId?: string;
|
|
281
306
|
}
|
|
282
307
|
|
|
308
|
+
export declare type RemoteStopStatus = 'not_sent' | 'pending' | 'confirmed' | 'unconfirmed';
|
|
309
|
+
|
|
310
|
+
declare type RevisionedConversationEvent = {
|
|
311
|
+
readonly revision?: number;
|
|
312
|
+
} & ({
|
|
313
|
+
readonly type: 'question_requested' | 'question_answered' | 'question_delivery_changed';
|
|
314
|
+
readonly messageId: string;
|
|
315
|
+
readonly question: ConversationQuestion;
|
|
316
|
+
} | {
|
|
317
|
+
readonly type: 'turn_started';
|
|
318
|
+
readonly messageId: string;
|
|
319
|
+
readonly userMessageId: string;
|
|
320
|
+
readonly userContent: string;
|
|
321
|
+
} | {
|
|
322
|
+
readonly type: 'turn_finished';
|
|
323
|
+
readonly messageId: string;
|
|
324
|
+
readonly outcome: 'complete' | 'cancelled';
|
|
325
|
+
readonly cancellationReason?: TurnCancellationReason;
|
|
326
|
+
} | {
|
|
327
|
+
readonly type: 'candidate_proposed';
|
|
328
|
+
readonly messageId: string;
|
|
329
|
+
readonly candidateId: string;
|
|
330
|
+
} | {
|
|
331
|
+
readonly type: 'candidate_resolved';
|
|
332
|
+
readonly messageId: string;
|
|
333
|
+
readonly candidateId: string;
|
|
334
|
+
readonly state: CandidateState;
|
|
335
|
+
readonly checkpointId?: string;
|
|
336
|
+
} | {
|
|
337
|
+
readonly type: 'checkpoint_restored';
|
|
338
|
+
readonly checkpointId: string;
|
|
339
|
+
readonly contents: ReadonlyArray<{
|
|
340
|
+
readonly name: string;
|
|
341
|
+
readonly content: string | null;
|
|
342
|
+
}>;
|
|
343
|
+
} | {
|
|
344
|
+
readonly type: 'failed';
|
|
345
|
+
readonly messageId: string;
|
|
346
|
+
readonly error: CopilotError;
|
|
347
|
+
} | {
|
|
348
|
+
readonly type: 'text';
|
|
349
|
+
readonly messageId: string;
|
|
350
|
+
readonly delta: string;
|
|
351
|
+
} | {
|
|
352
|
+
readonly type: 'activity';
|
|
353
|
+
readonly messageId: string;
|
|
354
|
+
readonly label?: string;
|
|
355
|
+
readonly phase?: MessagePhase | null;
|
|
356
|
+
readonly remoteStop?: RemoteStopStatus;
|
|
357
|
+
} | {
|
|
358
|
+
readonly type: 'step_start';
|
|
359
|
+
readonly messageId: string;
|
|
360
|
+
readonly stepId: string;
|
|
361
|
+
readonly kind: StepKind;
|
|
362
|
+
readonly artifacts?: readonly ArtifactRef[];
|
|
363
|
+
readonly name?: string;
|
|
364
|
+
readonly label: string;
|
|
365
|
+
readonly description?: string;
|
|
366
|
+
readonly groupId?: string;
|
|
367
|
+
readonly startedAt?: string;
|
|
368
|
+
} | {
|
|
369
|
+
readonly type: 'step_end';
|
|
370
|
+
readonly messageId: string;
|
|
371
|
+
readonly stepId: string;
|
|
372
|
+
readonly status: 'complete' | 'error';
|
|
373
|
+
readonly description?: string;
|
|
374
|
+
} | {
|
|
375
|
+
readonly type: 'step_removed';
|
|
376
|
+
readonly messageId: string;
|
|
377
|
+
readonly stepId: string;
|
|
378
|
+
} | {
|
|
379
|
+
readonly type: 'source_changed';
|
|
380
|
+
readonly messageId: string;
|
|
381
|
+
});
|
|
382
|
+
|
|
283
383
|
export declare interface SidecarRenderProps {
|
|
284
384
|
readonly onMinimize: () => void;
|
|
285
385
|
readonly isOpen: boolean;
|
|
@@ -291,13 +391,17 @@ export declare type StepStatus = 'active' | 'complete' | 'error';
|
|
|
291
391
|
|
|
292
392
|
export declare const toggleSidecar: () => void;
|
|
293
393
|
|
|
394
|
+
export declare type TurnCancellationReason = 'organization_disabled';
|
|
395
|
+
|
|
294
396
|
export declare const useCopilotConversation: ({ client, conversationId, }: UseCopilotConversationOptions) => {
|
|
295
|
-
|
|
296
|
-
status: ConversationStatus | null;
|
|
397
|
+
refreshAvailability: () => Promise<OrganizationAvailability | null>;
|
|
297
398
|
originArtifact: ArtifactRef | null;
|
|
298
399
|
messages: readonly MessageStoreState[];
|
|
299
400
|
messagesLoaded: boolean;
|
|
300
401
|
pendingCandidate: boolean;
|
|
402
|
+
pendingQuestion: ConversationQuestion | undefined;
|
|
403
|
+
supportsQuestions: boolean;
|
|
404
|
+
answerQuestion: (input: AnswerQuestionInput) => Promise<void>;
|
|
301
405
|
isRunning: boolean;
|
|
302
406
|
sourceChangedMessageId: string | null;
|
|
303
407
|
synchronizationError: Error | null;
|
|
@@ -309,6 +413,12 @@ export declare const useCopilotConversation: ({ client, conversationId, }: UseCo
|
|
|
309
413
|
reject: (candidateId: string) => Promise<void>;
|
|
310
414
|
restoreCheckpoint: (checkpointId: string) => Promise<void>;
|
|
311
415
|
cancelTurn: () => Promise<void>;
|
|
416
|
+
availability: OrganizationAvailability | null;
|
|
417
|
+
availabilityLoading: boolean;
|
|
418
|
+
availabilityError: Error | null;
|
|
419
|
+
availabilityCheckSupported: boolean;
|
|
420
|
+
conversationId: string | null;
|
|
421
|
+
status: ConversationStatus | null;
|
|
312
422
|
};
|
|
313
423
|
|
|
314
424
|
export declare const useCopilotConversationList: ({ client }: UseCopilotConversationListOptions) => {
|
|
@@ -316,6 +426,8 @@ export declare const useCopilotConversationList: ({ client }: UseCopilotConversa
|
|
|
316
426
|
isLoading: boolean;
|
|
317
427
|
error: Error | null;
|
|
318
428
|
reload: () => Promise<void>;
|
|
429
|
+
rename: (conversationId: string, name: string) => Promise<void>;
|
|
430
|
+
canRename: boolean;
|
|
319
431
|
};
|
|
320
432
|
|
|
321
433
|
export declare interface UseCopilotConversationListOptions {
|
package/dist/index.js
CHANGED
|
@@ -1,15 +1,18 @@
|
|
|
1
|
-
import { C as
|
|
1
|
+
import { C as s, a as o, b as t, c as i, d as n, e as r, f as C, g as c, h as l, o as p, i as d, t as S, u as m, j as u, k as E } from "./index-DAyxug2G.js";
|
|
2
2
|
export {
|
|
3
|
+
s as CONVERSATION_NAME_MAX_LENGTH,
|
|
3
4
|
o as CandidateReview,
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
t as CopilotBadge,
|
|
6
|
+
i as CopilotConversationPanel,
|
|
7
|
+
n as CopilotSidecar,
|
|
7
8
|
r as closeSidecar,
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
l as
|
|
11
|
-
|
|
12
|
-
d as
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
C as createFixtureClient,
|
|
10
|
+
c as createHttpClient,
|
|
11
|
+
l as encodeBpmnElementReference,
|
|
12
|
+
p as openSidecar,
|
|
13
|
+
d as parseBpmnElementReference,
|
|
14
|
+
S as toggleSidecar,
|
|
15
|
+
m as useCopilotConversation,
|
|
16
|
+
u as useCopilotConversationList,
|
|
17
|
+
E as useSidecarOpen
|
|
15
18
|
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
{
|
|
2
|
+
"valid": [
|
|
3
|
+
{
|
|
4
|
+
"destination": "#camunda-element-v1?artifactId=file-1&elementId=Task_%252F",
|
|
5
|
+
"reference": { "artifactId": "file-1", "elementId": "Task_%2F" },
|
|
6
|
+
"canonical": "#camunda-element-v1?artifactId=file-1&elementId=Task_%252F"
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
"destination": "#camunda-element-v1?artifactId=file%28one%29&elementId=Task%29%28",
|
|
10
|
+
"reference": { "artifactId": "file(one)", "elementId": "Task)(" },
|
|
11
|
+
"canonical": "#camunda-element-v1?artifactId=file%28one%29&elementId=Task%29%28"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"destination": "#camunda-element-v1?artifactId=file-1&elementId=Task_Verify",
|
|
15
|
+
"reference": { "artifactId": "file-1", "elementId": "Task_Verify" },
|
|
16
|
+
"canonical": "#camunda-element-v1?artifactId=file-1&elementId=Task_Verify"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"destination": "#camunda-element-v1?elementId=Task%20%2B%2F%26%3D%23&artifactId=file%20%26%20other",
|
|
20
|
+
"reference": { "artifactId": "file & other", "elementId": "Task +/&=#" },
|
|
21
|
+
"canonical": "#camunda-element-v1?artifactId=file%20%26%20other&elementId=Task%20%2B%2F%26%3D%23"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"destination": "#camunda-element-v1?artifactId=%E6%96%87%E4%BB%B6&elementId=Task_%25encoded",
|
|
25
|
+
"reference": { "artifactId": "\u6587\u4ef6", "elementId": "Task_%encoded" },
|
|
26
|
+
"canonical": "#camunda-element-v1?artifactId=%E6%96%87%E4%BB%B6&elementId=Task_%25encoded"
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
"invalid": [
|
|
30
|
+
"#camunda-element-v2?artifactId=file-1&elementId=Task",
|
|
31
|
+
"#camunda-element-v1",
|
|
32
|
+
"#camunda-element-v1?artifactId=file-1",
|
|
33
|
+
"#camunda-element-v1?artifactId=file-1&elementId=",
|
|
34
|
+
"#camunda-element-v1?artifactId=%20&elementId=Task",
|
|
35
|
+
"#camunda-element-v1?artifactId=file-1&artifactId=file-2",
|
|
36
|
+
"#camunda-element-v1?artifactId=file-1&elementId=Task&elementId=Other",
|
|
37
|
+
"#camunda-element-v1?artifactId=file-1&elementId=Task&projectId=untrusted",
|
|
38
|
+
"#camunda-element-v1?artifactId=file-1&elementId=Task%",
|
|
39
|
+
"#camunda-element-v1?artifactId=file-1&elementId=%GG",
|
|
40
|
+
"#camunda-element-v1?artifactId=file-1&elementId=%C0%AF",
|
|
41
|
+
"#camunda-element-v1?artifactId=file-1&elementId=%00Task",
|
|
42
|
+
"#camunda-element-v1?artifactId=file-1&elementId=Task%0A",
|
|
43
|
+
"#camunda-element-v1?artifactId=file-1&elementId=%7F",
|
|
44
|
+
"#camunda-element-v1?artifactId=file-1&elementId=%ED%A0%80",
|
|
45
|
+
"#camunda-element-v1?artifactId=file-1&elementId=Task+Other",
|
|
46
|
+
"#camunda-element-v1?artifactId=file-1&elementId=Task#other",
|
|
47
|
+
"#camunda-element-v1?artifactId=file-1&elementId=Task=Other",
|
|
48
|
+
"#CAMUNDA-ELEMENT-v1?artifactId=file-1&elementId=Task",
|
|
49
|
+
"#camunda-element-v1?artifact%49d=file-1&elementId=Task"
|
|
50
|
+
],
|
|
51
|
+
"ordinary": [
|
|
52
|
+
"https://example.com/#camunda-element-v1?artifactId=file-1&elementId=Task",
|
|
53
|
+
"/diagram/file-1",
|
|
54
|
+
"#section",
|
|
55
|
+
"javascript:alert(1)",
|
|
56
|
+
""
|
|
57
|
+
]
|
|
58
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camunda/copilot-chat",
|
|
3
|
-
"version": "0.8.1-alpha.
|
|
3
|
+
"version": "0.8.1-alpha.4",
|
|
4
4
|
"description": "Camunda Copilot Client Library - React components and utilities for Camunda Platform 8",
|
|
5
5
|
"license": "Camunda License 1.0",
|
|
6
6
|
"type": "module",
|
|
@@ -24,9 +24,10 @@
|
|
|
24
24
|
"import": "./dist/index.css",
|
|
25
25
|
"default": "./dist/index.css"
|
|
26
26
|
},
|
|
27
|
-
"./package.json": "./package.json"
|
|
27
|
+
"./package.json": "./package.json",
|
|
28
|
+
"./fixtures/bpmn-element-references.json": "./fixtures/bpmn-element-references.json"
|
|
28
29
|
},
|
|
29
|
-
"files": ["dist", "README.md", "LICENSE"],
|
|
30
|
+
"files": ["dist", "fixtures", "README.md", "LICENSE", "THIRD_PARTY_NOTICES.md", "LICENSES"],
|
|
30
31
|
"publishConfig": {
|
|
31
32
|
"access": "public"
|
|
32
33
|
},
|