@camunda/copilot-chat 0.0.0-alpha3 → 0.0.0-alpha5

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.
@@ -1,12 +1,11 @@
1
- import { StreamEvent } from './types';
2
1
  export interface CopilotChatProps {
3
2
  readonly onSendMessage: (message: string) => void;
4
- readonly onStreamEvent?: (event: StreamEvent) => void;
5
3
  readonly workareaSelector?: string;
6
4
  readonly onStopGeneration?: () => void;
5
+ readonly onResetConversation?: () => void;
7
6
  readonly emptyStateTitle?: string;
8
7
  readonly emptyStateDescription?: string;
9
8
  }
10
- export declare const CopilotChat: ({ onSendMessage, workareaSelector, onStopGeneration, emptyStateTitle, emptyStateDescription, }: CopilotChatProps) => import("react/jsx-runtime").JSX.Element;
9
+ export declare const CopilotChat: ({ onSendMessage, workareaSelector, onStopGeneration, onResetConversation, emptyStateTitle, emptyStateDescription, }: CopilotChatProps) => import("react/jsx-runtime").JSX.Element;
11
10
  export default CopilotChat;
12
11
  //# sourceMappingURL=CopilotChat.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CopilotChat.d.ts","sourceRoot":"","sources":["../src/CopilotChat.tsx"],"names":[],"mappings":"AAQA,OAAO,0BAA0B,CAAC;AASlC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,aAAa,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAClD,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAC;IACtD,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IACnC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IACvC,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,qBAAqB,CAAC,EAAE,MAAM,CAAC;CACzC;AAED,eAAO,MAAM,WAAW,GAAI,gGAMzB,gBAAgB,4CA2ElB,CAAC;AAEF,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"CopilotChat.d.ts","sourceRoot":"","sources":["../src/CopilotChat.tsx"],"names":[],"mappings":"AAQA,OAAO,0BAA0B,CAAC;AAUlC,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,aAAa,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAClD,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IACnC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IACvC,QAAQ,CAAC,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1C,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,qBAAqB,CAAC,EAAE,MAAM,CAAC;CACzC;AAED,eAAO,MAAM,WAAW,GAAI,qHAOzB,gBAAgB,4CAiFlB,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ChatMessage.d.ts","sourceRoot":"","sources":["../../../src/components/ChatMessage/ChatMessage.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,WAAW,IAAI,eAAe,EAAE,MAAM,aAAa,CAAC;AAIlE,UAAU,gBAAgB;IACxB,QAAQ,CAAC,OAAO,EAAE,eAAe,CAAC;CACnC;AAED,eAAO,MAAM,WAAW,GAAI,aAAa,gBAAgB,4CAyBxD,CAAC"}
1
+ {"version":3,"file":"ChatMessage.d.ts","sourceRoot":"","sources":["../../../src/components/ChatMessage/ChatMessage.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,WAAW,IAAI,eAAe,EAAE,MAAM,aAAa,CAAC;AAKlE,UAAU,gBAAgB;IACxB,QAAQ,CAAC,OAAO,EAAE,eAAe,CAAC;CACnC;AAED,eAAO,MAAM,WAAW,GAAI,aAAa,gBAAgB,4CAyBxD,CAAC"}
@@ -1,6 +1,7 @@
1
1
  interface CopilotHeaderProps {
2
2
  onMinimize: () => void;
3
+ onReset?: () => void;
3
4
  }
4
- export declare const CopilotHeader: ({ onMinimize }: CopilotHeaderProps) => import("react/jsx-runtime").JSX.Element;
5
+ export declare const CopilotHeader: ({ onMinimize, onReset }: CopilotHeaderProps) => import("react/jsx-runtime").JSX.Element;
5
6
  export {};
6
7
  //# sourceMappingURL=CopilotHeader.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CopilotHeader.d.ts","sourceRoot":"","sources":["../../src/components/CopilotHeader.tsx"],"names":[],"mappings":"AAYA,UAAU,kBAAkB;IAC1B,UAAU,EAAE,MAAM,IAAI,CAAC;CACxB;AAED,eAAO,MAAM,aAAa,GAAI,gBAAgB,kBAAkB,4CAiB/D,CAAC"}
1
+ {"version":3,"file":"CopilotHeader.d.ts","sourceRoot":"","sources":["../../src/components/CopilotHeader.tsx"],"names":[],"mappings":"AAYA,UAAU,kBAAkB;IAC1B,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,eAAO,MAAM,aAAa,GAAI,yBAAyB,kBAAkB,4CA8BxE,CAAC"}
@@ -0,0 +1,9 @@
1
+ interface ThinkingIndicatorProps {
2
+ readonly label?: string;
3
+ readonly completedLabel?: string;
4
+ readonly content?: string;
5
+ readonly isComplete: boolean;
6
+ }
7
+ export declare const ThinkingIndicator: ({ label, completedLabel, content, isComplete, }: ThinkingIndicatorProps) => import("react/jsx-runtime").JSX.Element | null;
8
+ export {};
9
+ //# sourceMappingURL=ThinkingIndicator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ThinkingIndicator.d.ts","sourceRoot":"","sources":["../../../src/components/ThinkingIndicator/ThinkingIndicator.tsx"],"names":[],"mappings":"AAaA,UAAU,sBAAsB;IAC9B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;CAC9B;AAED,eAAO,MAAM,iBAAiB,GAAI,iDAK/B,sBAAsB,mDAiCxB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { ThinkingIndicator } from './ThinkingIndicator';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ThinkingIndicator/index.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { useCopilotSidecar } from './useCopilotSidecar';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC"}
package/dist/index.css CHANGED
@@ -20818,6 +20818,7 @@ optgroup.cds--select-optgroup:disabled,
20818
20818
  .cds--inline-loading {
20819
20819
  display: flex;
20820
20820
  align-items: center;
20821
+ color: var(--cds-text-secondary, #525252);
20821
20822
  inline-size: 100%;
20822
20823
  min-block-size: 2rem;
20823
20824
  }
@@ -20827,7 +20828,6 @@ optgroup.cds--select-optgroup:disabled,
20827
20828
  font-weight: var(--cds-label-02-font-weight, 400);
20828
20829
  line-height: var(--cds-label-02-line-height, 1.28572);
20829
20830
  letter-spacing: var(--cds-label-02-letter-spacing, 0.16px);
20830
- color: var(--cds-text-secondary, #525252);
20831
20831
  }
20832
20832
 
20833
20833
  .cds--inline-loading__animation {
@@ -29232,7 +29232,7 @@ body[data-copilot-chat-layout='bottom-sheet'] .copilot-chat-wrapper {
29232
29232
  border-inline-start: none;
29233
29233
  border-block-start: 1px solid var(--cds-border-subtle, rgba(0, 0, 0, 0.12));
29234
29234
  }
29235
- ._header_9mgd7_1 {
29235
+ ._header_1hmug_1 {
29236
29236
  position: relative;
29237
29237
  z-index: 1;
29238
29238
  display: flex;
@@ -29248,26 +29248,56 @@ body[data-copilot-chat-layout='bottom-sheet'] .copilot-chat-wrapper {
29248
29248
  flex-shrink: 0;
29249
29249
  }
29250
29250
 
29251
- ._titleContainer_9mgd7_17 {
29251
+ ._titleContainer_1hmug_17 {
29252
29252
  display: flex;
29253
29253
  align-items: center;
29254
29254
  gap: var(--spacing-small, 8px);
29255
29255
  }
29256
29256
 
29257
- ._icon_9mgd7_23 {
29257
+ ._icon_1hmug_23 {
29258
29258
  width: var(--size-icon-small, 20px);
29259
29259
  height: var(--size-icon-small, 20px);
29260
29260
  filter: brightness(0) saturate(100%) invert(26%) sepia(96%) saturate(3427%)
29261
29261
  hue-rotate(260deg) brightness(95%) contrast(102%);
29262
29262
  }
29263
29263
 
29264
- ._title_9mgd7_17 {
29264
+ ._title_1hmug_17 {
29265
29265
  font-size: var(--font-size-base, 14px);
29266
29266
  font-weight: var(--font-weight-semibold, 600);
29267
29267
  color: var(--cds-text-primary, var(--color-text-primary, #161616));
29268
29268
  }
29269
29269
 
29270
- ._minimizeButton_9mgd7_36 {
29270
+ ._headerActions_1hmug_36 {
29271
+ display: flex;
29272
+ align-items: center;
29273
+ gap: 4px;
29274
+ }
29275
+
29276
+ ._headerButton_1hmug_42 {
29277
+ display: flex;
29278
+ align-items: center;
29279
+ justify-content: center;
29280
+ inline-size: var(--size-button-large, 32px);
29281
+ block-size: var(--size-button-large, 32px);
29282
+ padding: 0;
29283
+ border: none;
29284
+ background: transparent;
29285
+ color: var(--cds-icon-primary, var(--color-text-primary, #161616));
29286
+ cursor: pointer;
29287
+ border-radius: 0;
29288
+ }
29289
+
29290
+ ._headerButton_1hmug_42:hover {
29291
+ background-color: var(--cds-layer-hover, rgba(0, 0, 0, 0.06));
29292
+ }
29293
+
29294
+ ._headerButton_1hmug_42:focus {
29295
+ outline: var(--outline-width, 2px) solid
29296
+ var(--cds-focus, var(--color-border-focus, #0f62fe));
29297
+ outline-offset: var(--outline-offset-inner, -2px);
29298
+ }
29299
+
29300
+ ._minimizeButton_1hmug_66 {
29271
29301
  display: flex;
29272
29302
  align-items: center;
29273
29303
  justify-content: center;
@@ -29281,11 +29311,11 @@ body[data-copilot-chat-layout='bottom-sheet'] .copilot-chat-wrapper {
29281
29311
  border-radius: 0;
29282
29312
  }
29283
29313
 
29284
- ._minimizeButton_9mgd7_36:hover {
29314
+ ._minimizeButton_1hmug_66:hover {
29285
29315
  background-color: var(--cds-layer-hover, rgba(0, 0, 0, 0.06));
29286
29316
  }
29287
29317
 
29288
- ._minimizeButton_9mgd7_36:focus {
29318
+ ._minimizeButton_1hmug_66:focus {
29289
29319
  outline: var(--outline-width, 2px) solid
29290
29320
  var(--cds-focus, var(--color-border-focus, #0f62fe));
29291
29321
  outline-offset: var(--outline-offset-inner, -2px);
@@ -29497,22 +29527,82 @@ body[data-copilot-chat-layout='bottom-sheet'] .copilot-chat-wrapper {
29497
29527
  ._renderer_qbz39_1 > *:last-child {
29498
29528
  margin-block-end: 0;
29499
29529
  }
29500
- ._message_lkhj3_1 {
29530
+ ._streamingIndicator_oudc8_1 {
29531
+ display: flex;
29532
+ align-items: center;
29533
+ gap: 8px;
29534
+ padding-block-start: 4px;
29535
+ color: #525252;
29536
+ font-size: 12px;
29537
+ }
29538
+
29539
+ ._processingLabel_oudc8_10 {
29540
+ color: #525252;
29541
+ font-size: 12px;
29542
+ }
29543
+
29544
+ ._collapsibleContainer_oudc8_15 {
29545
+ display: flex;
29546
+ flex-direction: column;
29547
+ gap: 4px;
29548
+ padding-block: 4px;
29549
+ }
29550
+
29551
+ ._collapseToggle_oudc8_22 {
29552
+ display: flex;
29553
+ align-items: center;
29554
+ gap: 4px;
29555
+ padding: 4px 8px;
29556
+ border: none;
29557
+ background: transparent;
29558
+ color: #525252;
29559
+ font-size: 12px;
29560
+ cursor: pointer;
29561
+ border-radius: 4px;
29562
+ }
29563
+
29564
+ ._collapseToggle_oudc8_22:hover {
29565
+ background-color: rgba(0, 0, 0, 0.06);
29566
+ }
29567
+
29568
+ ._collapseToggle_oudc8_22:focus {
29569
+ outline: 2px solid #0f62fe;
29570
+ outline-offset: -2px;
29571
+ }
29572
+
29573
+ ._completedLabel_oudc8_44 {
29574
+ font-weight: 500;
29575
+ }
29576
+
29577
+ ._collapsedContent_oudc8_48 {
29578
+ padding: 8px 12px;
29579
+ margin-inline-start: 20px;
29580
+ background-color: #f4f4f4;
29581
+ border-radius: 4px;
29582
+ font-size: 12px;
29583
+ line-height: 1.5;
29584
+ color: #525252;
29585
+ white-space: pre-wrap;
29586
+ word-break: break-word;
29587
+ max-block-size: 200px;
29588
+ overflow-y: auto;
29589
+ }
29590
+ ._message_1rpzb_1 {
29501
29591
  display: flex;
29502
29592
  flex-direction: column;
29503
29593
  gap: 8px;
29504
29594
  padding: 16px 20px;
29505
29595
  }
29506
29596
 
29507
- ._userMessage_lkhj3_8 {
29597
+ ._userMessage_1rpzb_8 {
29508
29598
  align-items: flex-end;
29509
29599
  }
29510
29600
 
29511
- ._assistantMessage_lkhj3_12 {
29601
+ ._assistantMessage_1rpzb_12 {
29512
29602
  align-items: flex-start;
29513
29603
  }
29514
29604
 
29515
- ._userBubble_lkhj3_16 {
29605
+ ._userBubble_1rpzb_16 {
29516
29606
  max-inline-size: 90%;
29517
29607
  padding: 12px 16px;
29518
29608
  background-color: #f4f4f4;
@@ -29524,7 +29614,7 @@ body[data-copilot-chat-layout='bottom-sheet'] .copilot-chat-wrapper {
29524
29614
  word-wrap: break-word;
29525
29615
  }
29526
29616
 
29527
- ._assistantBubble_lkhj3_28 {
29617
+ ._assistantBubble_1rpzb_28 {
29528
29618
  max-inline-size: 90%;
29529
29619
  font-size: 14px;
29530
29620
  line-height: 1.5;
@@ -29532,7 +29622,19 @@ body[data-copilot-chat-layout='bottom-sheet'] .copilot-chat-wrapper {
29532
29622
  word-wrap: break-word;
29533
29623
  }
29534
29624
 
29535
- ._streamingIndicator_lkhj3_36 {
29625
+ ._errorMessage_1rpzb_36 {
29626
+ display: flex;
29627
+ align-items: flex-start;
29628
+ gap: 8px;
29629
+ padding: 12px;
29630
+ background-color: #fff1f1;
29631
+ border-inline-start: 3px solid #da1e28;
29632
+ font-size: 14px;
29633
+ line-height: 1.5;
29634
+ color: #161616;
29635
+ }
29636
+
29637
+ ._streamingIndicator_1rpzb_48 {
29536
29638
  display: flex;
29537
29639
  align-items: center;
29538
29640
  gap: 8px;
@@ -29541,7 +29643,7 @@ body[data-copilot-chat-layout='bottom-sheet'] .copilot-chat-wrapper {
29541
29643
  font-size: 12px;
29542
29644
  }
29543
29645
 
29544
- ._content_lkhj3_45 pre {
29646
+ ._content_1rpzb_57 pre {
29545
29647
  margin: 12px 0;
29546
29648
  padding: 12px;
29547
29649
  background-color: rgba(0, 0, 0, 0.06);
@@ -29549,7 +29651,7 @@ body[data-copilot-chat-layout='bottom-sheet'] .copilot-chat-wrapper {
29549
29651
  overflow-x: auto;
29550
29652
  }
29551
29653
 
29552
- ._content_lkhj3_45 pre code {
29654
+ ._content_1rpzb_57 pre code {
29553
29655
  padding: 0;
29554
29656
  background: none;
29555
29657
  }
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export { default as CopilotChat } from './CopilotChat';
2
2
  export type { CopilotChatProps } from './CopilotChat';
3
3
  export { useChatStore } from './store';
4
- export type { ChatMessage, MessageRole, MessageStatus, StreamChunk, StreamFinal, StreamEvent, } from './types';
4
+ export type { ChatMessage, MessageStatus } from './types';
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,+BAA+B,CAAC;AACvC,OAAO,0BAA0B,CAAC;AAElC,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AACvD,YAAY,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEtD,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,YAAY,EACV,WAAW,EACX,WAAW,EACX,aAAa,EACb,WAAW,EACX,WAAW,EACX,WAAW,GACZ,MAAM,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,+BAA+B,CAAC;AACvC,OAAO,0BAA0B,CAAC;AAElC,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AACvD,YAAY,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEtD,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC"}