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

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,4CA8BxD,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 eventType?: string;
3
+ readonly toolName?: string;
4
+ readonly content?: string;
5
+ readonly isComplete: boolean;
6
+ }
7
+ export declare const ThinkingIndicator: ({ eventType, toolName, 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":"AAcA,UAAU,sBAAsB;IAC9B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;CAC9B;AAoCD,eAAO,MAAM,iBAAiB,GAAI,+CAK/B,sBAAsB,mDAyCxB,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,4 @@
1
+ export { useCopilotSidecar } from './useCopilotSidecar';
2
+ export { useCopilotAgent } from './useCopilotAgent';
3
+ export type { UseCopilotAgentOptions, UseCopilotAgentReturn } from './useCopilotAgent';
4
+ //# 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;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,YAAY,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { CopilotAgentConfig } from '../types';
2
+ export interface UseCopilotAgentOptions {
3
+ readonly config: CopilotAgentConfig;
4
+ }
5
+ export interface UseCopilotAgentReturn {
6
+ readonly sendMessage: (message: string) => Promise<void>;
7
+ readonly isStreaming: boolean;
8
+ readonly stopGeneration: () => void;
9
+ }
10
+ export declare function useCopilotAgent({ config, }: UseCopilotAgentOptions): UseCopilotAgentReturn;
11
+ //# sourceMappingURL=useCopilotAgent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useCopilotAgent.d.ts","sourceRoot":"","sources":["../../src/hooks/useCopilotAgent.ts"],"names":[],"mappings":"AAcA,OAAO,EAIL,kBAAkB,EAEnB,MAAM,UAAU,CAAC;AA+BlB,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,MAAM,EAAE,kBAAkB,CAAC;CACrC;AAED,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,WAAW,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACzD,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAC9B,QAAQ,CAAC,cAAc,EAAE,MAAM,IAAI,CAAC;CACrC;AAED,wBAAgB,eAAe,CAAC,EAC9B,MAAM,GACP,EAAE,sBAAsB,GAAG,qBAAqB,CAoLhD"}
package/dist/index.css CHANGED
@@ -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,32 @@ 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 {
29271
29277
  display: flex;
29272
29278
  align-items: center;
29273
29279
  justify-content: center;
@@ -29281,11 +29287,35 @@ body[data-copilot-chat-layout='bottom-sheet'] .copilot-chat-wrapper {
29281
29287
  border-radius: 0;
29282
29288
  }
29283
29289
 
29284
- ._minimizeButton_9mgd7_36:hover {
29290
+ ._headerButton_1hmug_42:hover {
29285
29291
  background-color: var(--cds-layer-hover, rgba(0, 0, 0, 0.06));
29286
29292
  }
29287
29293
 
29288
- ._minimizeButton_9mgd7_36:focus {
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 {
29301
+ display: flex;
29302
+ align-items: center;
29303
+ justify-content: center;
29304
+ inline-size: var(--size-button-large, 32px);
29305
+ block-size: var(--size-button-large, 32px);
29306
+ padding: 0;
29307
+ border: none;
29308
+ background: transparent;
29309
+ color: var(--cds-icon-primary, var(--color-text-primary, #161616));
29310
+ cursor: pointer;
29311
+ border-radius: 0;
29312
+ }
29313
+
29314
+ ._minimizeButton_1hmug_66:hover {
29315
+ background-color: var(--cds-layer-hover, rgba(0, 0, 0, 0.06));
29316
+ }
29317
+
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,77 @@ 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_sxito_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
+ ._collapsibleContainer_sxito_10 {
29540
+ display: flex;
29541
+ flex-direction: column;
29542
+ gap: 4px;
29543
+ padding-block: 4px;
29544
+ }
29545
+
29546
+ ._collapseToggle_sxito_17 {
29547
+ display: flex;
29548
+ align-items: center;
29549
+ gap: 4px;
29550
+ padding: 4px 8px;
29551
+ border: none;
29552
+ background: transparent;
29553
+ color: #525252;
29554
+ font-size: 12px;
29555
+ cursor: pointer;
29556
+ border-radius: 4px;
29557
+ }
29558
+
29559
+ ._collapseToggle_sxito_17:hover {
29560
+ background-color: rgba(0, 0, 0, 0.06);
29561
+ }
29562
+
29563
+ ._collapseToggle_sxito_17:focus {
29564
+ outline: 2px solid #0f62fe;
29565
+ outline-offset: -2px;
29566
+ }
29567
+
29568
+ ._completedLabel_sxito_39 {
29569
+ font-weight: 500;
29570
+ }
29571
+
29572
+ ._collapsedContent_sxito_43 {
29573
+ padding: 8px 12px;
29574
+ margin-inline-start: 20px;
29575
+ background-color: #f4f4f4;
29576
+ border-radius: 4px;
29577
+ font-size: 12px;
29578
+ line-height: 1.5;
29579
+ color: #525252;
29580
+ white-space: pre-wrap;
29581
+ word-break: break-word;
29582
+ max-block-size: 200px;
29583
+ overflow-y: auto;
29584
+ }
29585
+ ._message_1rpzb_1 {
29501
29586
  display: flex;
29502
29587
  flex-direction: column;
29503
29588
  gap: 8px;
29504
29589
  padding: 16px 20px;
29505
29590
  }
29506
29591
 
29507
- ._userMessage_lkhj3_8 {
29592
+ ._userMessage_1rpzb_8 {
29508
29593
  align-items: flex-end;
29509
29594
  }
29510
29595
 
29511
- ._assistantMessage_lkhj3_12 {
29596
+ ._assistantMessage_1rpzb_12 {
29512
29597
  align-items: flex-start;
29513
29598
  }
29514
29599
 
29515
- ._userBubble_lkhj3_16 {
29600
+ ._userBubble_1rpzb_16 {
29516
29601
  max-inline-size: 90%;
29517
29602
  padding: 12px 16px;
29518
29603
  background-color: #f4f4f4;
@@ -29524,7 +29609,7 @@ body[data-copilot-chat-layout='bottom-sheet'] .copilot-chat-wrapper {
29524
29609
  word-wrap: break-word;
29525
29610
  }
29526
29611
 
29527
- ._assistantBubble_lkhj3_28 {
29612
+ ._assistantBubble_1rpzb_28 {
29528
29613
  max-inline-size: 90%;
29529
29614
  font-size: 14px;
29530
29615
  line-height: 1.5;
@@ -29532,7 +29617,19 @@ body[data-copilot-chat-layout='bottom-sheet'] .copilot-chat-wrapper {
29532
29617
  word-wrap: break-word;
29533
29618
  }
29534
29619
 
29535
- ._streamingIndicator_lkhj3_36 {
29620
+ ._errorMessage_1rpzb_36 {
29621
+ display: flex;
29622
+ align-items: flex-start;
29623
+ gap: 8px;
29624
+ padding: 12px;
29625
+ background-color: #fff1f1;
29626
+ border-inline-start: 3px solid #da1e28;
29627
+ font-size: 14px;
29628
+ line-height: 1.5;
29629
+ color: #161616;
29630
+ }
29631
+
29632
+ ._streamingIndicator_1rpzb_48 {
29536
29633
  display: flex;
29537
29634
  align-items: center;
29538
29635
  gap: 8px;
@@ -29541,7 +29638,7 @@ body[data-copilot-chat-layout='bottom-sheet'] .copilot-chat-wrapper {
29541
29638
  font-size: 12px;
29542
29639
  }
29543
29640
 
29544
- ._content_lkhj3_45 pre {
29641
+ ._content_1rpzb_57 pre {
29545
29642
  margin: 12px 0;
29546
29643
  padding: 12px;
29547
29644
  background-color: rgba(0, 0, 0, 0.06);
@@ -29549,7 +29646,7 @@ body[data-copilot-chat-layout='bottom-sheet'] .copilot-chat-wrapper {
29549
29646
  overflow-x: auto;
29550
29647
  }
29551
29648
 
29552
- ._content_lkhj3_45 pre code {
29649
+ ._content_1rpzb_57 pre code {
29553
29650
  padding: 0;
29554
29651
  background: none;
29555
29652
  }
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 { AgentEventType, AgentEventStatus } 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;;;;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,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC"}