@copilotkitnext/angular 0.0.9-alpha.3 → 0.0.11
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/dist/esm2022/index.mjs +2 -70
- package/dist/esm2022/lib/agent.mjs +73 -0
- package/dist/esm2022/lib/chat-config.mjs +35 -0
- package/dist/esm2022/lib/chat-state.mjs +18 -0
- package/dist/esm2022/lib/components/chat/copilot-chat-assistant-message-buttons.mjs +344 -0
- package/dist/esm2022/lib/components/chat/copilot-chat-assistant-message-renderer.mjs +260 -0
- package/dist/esm2022/lib/components/chat/copilot-chat-assistant-message-toolbar.mjs +22 -0
- package/dist/esm2022/{components/chat/copilot-chat-assistant-message.component.mjs → lib/components/chat/copilot-chat-assistant-message.mjs} +216 -240
- package/dist/esm2022/lib/components/chat/copilot-chat-assistant-message.types.mjs +2 -0
- package/dist/esm2022/lib/components/chat/copilot-chat-audio-recorder.mjs +196 -0
- package/dist/esm2022/lib/components/chat/copilot-chat-buttons.mjs +299 -0
- package/dist/esm2022/lib/components/chat/copilot-chat-input-defaults.mjs +39 -0
- package/dist/esm2022/lib/components/chat/copilot-chat-input.mjs +634 -0
- package/dist/esm2022/lib/components/chat/copilot-chat-input.types.mjs +10 -0
- package/dist/esm2022/lib/components/chat/copilot-chat-message-view-cursor.mjs +27 -0
- package/dist/esm2022/lib/components/chat/copilot-chat-message-view.mjs +268 -0
- package/dist/esm2022/lib/components/chat/copilot-chat-message-view.types.mjs +2 -0
- package/dist/esm2022/lib/components/chat/copilot-chat-textarea.mjs +139 -0
- package/dist/esm2022/lib/components/chat/copilot-chat-tool-calls-view.mjs +36 -0
- package/dist/esm2022/lib/components/chat/copilot-chat-toolbar.mjs +20 -0
- package/dist/esm2022/lib/components/chat/copilot-chat-tools-menu.mjs +203 -0
- package/dist/esm2022/lib/components/chat/copilot-chat-user-message-branch-navigation.mjs +118 -0
- package/dist/esm2022/lib/components/chat/copilot-chat-user-message-buttons.mjs +182 -0
- package/dist/esm2022/lib/components/chat/copilot-chat-user-message-renderer.mjs +28 -0
- package/dist/esm2022/lib/components/chat/copilot-chat-user-message-toolbar.mjs +25 -0
- package/dist/esm2022/lib/components/chat/copilot-chat-user-message.mjs +306 -0
- package/dist/esm2022/lib/components/chat/copilot-chat-user-message.types.mjs +2 -0
- package/dist/esm2022/lib/components/chat/copilot-chat-view-disclaimer.mjs +48 -0
- package/dist/esm2022/lib/components/chat/copilot-chat-view-feather.mjs +41 -0
- package/dist/esm2022/lib/components/chat/copilot-chat-view-handlers.mjs +19 -0
- package/dist/esm2022/lib/components/chat/copilot-chat-view-input-container.mjs +96 -0
- package/dist/esm2022/lib/components/chat/copilot-chat-view-scroll-to-bottom-button.mjs +89 -0
- package/dist/esm2022/lib/components/chat/copilot-chat-view-scroll-view.mjs +456 -0
- package/dist/esm2022/lib/components/chat/copilot-chat-view.mjs +404 -0
- package/dist/esm2022/lib/components/chat/copilot-chat-view.types.mjs +2 -0
- package/dist/esm2022/lib/components/chat/copilot-chat.mjs +167 -0
- package/dist/esm2022/lib/config.mjs +9 -0
- package/dist/esm2022/lib/copilotkit.mjs +124 -0
- package/dist/esm2022/lib/directives/copilotkit-agent-context.mjs +130 -0
- package/dist/esm2022/lib/directives/stick-to-bottom.mjs +170 -0
- package/dist/esm2022/lib/directives/tooltip.mjs +217 -0
- package/dist/esm2022/lib/human-in-the-loop.mjs +19 -0
- package/dist/esm2022/lib/render-tool-calls.mjs +131 -0
- package/dist/esm2022/lib/resize-observer.mjs +152 -0
- package/dist/esm2022/lib/scroll-position.mjs +124 -0
- package/dist/esm2022/lib/slots/copilot-slot.mjs +156 -0
- package/dist/esm2022/lib/slots/index.mjs +4 -0
- package/dist/esm2022/lib/slots/slot.types.mjs +3 -3
- package/dist/esm2022/lib/slots/slot.utils.mjs +19 -15
- package/dist/esm2022/lib/tools.mjs +31 -0
- package/dist/esm2022/lib/utils.mjs +3 -3
- package/dist/esm2022/public-api.mjs +47 -0
- package/dist/fesm2022/copilotkitnext-angular.mjs +5249 -8271
- package/dist/fesm2022/copilotkitnext-angular.mjs.map +1 -1
- package/dist/index.d.ts +1 -55
- package/dist/lib/agent.d.ts +53 -0
- package/dist/{core/chat-configuration/chat-configuration.types.d.ts → lib/chat-config.d.ts} +4 -8
- package/dist/lib/chat-state.d.ts +10 -0
- package/dist/lib/components/chat/copilot-chat-assistant-message-buttons.d.ts +68 -0
- package/dist/lib/components/chat/copilot-chat-assistant-message-renderer.d.ts +26 -0
- package/dist/lib/components/chat/copilot-chat-assistant-message-toolbar.d.ts +7 -0
- package/dist/lib/components/chat/copilot-chat-assistant-message.d.ts +178 -0
- package/dist/{components → lib/components}/chat/copilot-chat-assistant-message.types.d.ts +1 -1
- package/dist/{components/chat/copilot-chat-audio-recorder.component.d.ts → lib/components/chat/copilot-chat-audio-recorder.d.ts} +10 -10
- package/dist/lib/components/chat/copilot-chat-buttons.d.ts +65 -0
- package/dist/lib/components/chat/copilot-chat-input-defaults.d.ts +38 -0
- package/dist/lib/components/chat/copilot-chat-input.d.ts +133 -0
- package/dist/{components → lib/components}/chat/copilot-chat-input.types.d.ts +11 -11
- package/dist/lib/components/chat/copilot-chat-message-view-cursor.d.ts +11 -0
- package/dist/{components/chat/copilot-chat-message-view.component.d.ts → lib/components/chat/copilot-chat-message-view.d.ts} +68 -36
- package/dist/{components → lib/components}/chat/copilot-chat-message-view.types.d.ts +2 -2
- package/dist/lib/components/chat/copilot-chat-textarea.d.ts +41 -0
- package/dist/lib/components/chat/copilot-chat-tool-calls-view.d.ts +55 -0
- package/dist/lib/components/chat/copilot-chat-toolbar.d.ts +7 -0
- package/dist/lib/components/chat/copilot-chat-tools-menu.d.ts +20 -0
- package/dist/lib/components/chat/copilot-chat-user-message-branch-navigation.d.ts +20 -0
- package/dist/lib/components/chat/copilot-chat-user-message-buttons.d.ts +35 -0
- package/dist/lib/components/chat/copilot-chat-user-message-renderer.d.ts +8 -0
- package/dist/lib/components/chat/copilot-chat-user-message-toolbar.d.ts +7 -0
- package/dist/lib/components/chat/copilot-chat-user-message.d.ts +55 -0
- package/dist/{components → lib/components}/chat/copilot-chat-user-message.types.d.ts +2 -2
- package/dist/lib/components/chat/copilot-chat-view-disclaimer.d.ts +15 -0
- package/dist/{components/chat/copilot-chat-view-feather.component.d.ts → lib/components/chat/copilot-chat-view-feather.d.ts} +6 -6
- package/dist/{components/chat/copilot-chat-view-handlers.service.d.ts → lib/components/chat/copilot-chat-view-handlers.d.ts} +3 -3
- package/dist/lib/components/chat/copilot-chat-view-input-container.d.ts +23 -0
- package/dist/lib/components/chat/copilot-chat-view-scroll-to-bottom-button.d.ts +16 -0
- package/dist/lib/components/chat/copilot-chat-view-scroll-view.d.ts +114 -0
- package/dist/lib/components/chat/copilot-chat-view.d.ts +239 -0
- package/dist/{components → lib/components}/chat/copilot-chat-view.types.d.ts +2 -2
- package/dist/lib/components/chat/copilot-chat.d.ts +67 -0
- package/dist/lib/config.d.ts +16 -0
- package/dist/lib/copilotkit.d.ts +29 -0
- package/dist/{directives/copilotkit-agent-context.directive.d.ts → lib/directives/copilotkit-agent-context.d.ts} +5 -5
- package/dist/lib/directives/stick-to-bottom.d.ts +62 -0
- package/dist/lib/directives/tooltip.d.ts +33 -0
- package/dist/lib/human-in-the-loop.d.ts +13 -0
- package/dist/lib/render-tool-calls.d.ts +75 -0
- package/dist/{services/resize-observer.service.d.ts → lib/resize-observer.d.ts} +2 -2
- package/dist/{services/scroll-position.service.d.ts → lib/scroll-position.d.ts} +6 -6
- package/dist/lib/slots/copilot-slot.d.ts +34 -0
- package/dist/lib/slots/index.d.ts +3 -0
- package/dist/lib/slots/slot.types.d.ts +1 -1
- package/dist/lib/slots/slot.utils.d.ts +6 -4
- package/dist/lib/tools.d.ts +63 -0
- package/dist/lib/utils.d.ts +1 -1
- package/dist/public-api.d.ts +46 -0
- package/dist/styles.css +0 -69
- package/package.json +5 -5
- package/dist/components/chat/copilot-chat-assistant-message-buttons.component.d.ts +0 -75
- package/dist/components/chat/copilot-chat-assistant-message-renderer.component.d.ts +0 -31
- package/dist/components/chat/copilot-chat-assistant-message-toolbar.component.d.ts +0 -8
- package/dist/components/chat/copilot-chat-assistant-message.component.d.ts +0 -132
- package/dist/components/chat/copilot-chat-buttons.component.d.ts +0 -66
- package/dist/components/chat/copilot-chat-input-defaults.d.ts +0 -37
- package/dist/components/chat/copilot-chat-input.component.d.ts +0 -133
- package/dist/components/chat/copilot-chat-message-view-cursor.component.d.ts +0 -15
- package/dist/components/chat/copilot-chat-textarea.component.d.ts +0 -45
- package/dist/components/chat/copilot-chat-tool-calls-view.component.d.ts +0 -35
- package/dist/components/chat/copilot-chat-toolbar.component.d.ts +0 -8
- package/dist/components/chat/copilot-chat-tools-menu.component.d.ts +0 -20
- package/dist/components/chat/copilot-chat-user-message-branch-navigation.component.d.ts +0 -23
- package/dist/components/chat/copilot-chat-user-message-buttons.component.d.ts +0 -39
- package/dist/components/chat/copilot-chat-user-message-renderer.component.d.ts +0 -9
- package/dist/components/chat/copilot-chat-user-message-toolbar.component.d.ts +0 -8
- package/dist/components/chat/copilot-chat-user-message.component.d.ts +0 -55
- package/dist/components/chat/copilot-chat-view-disclaimer.component.d.ts +0 -15
- package/dist/components/chat/copilot-chat-view-input-container.component.d.ts +0 -23
- package/dist/components/chat/copilot-chat-view-scroll-to-bottom-button.component.d.ts +0 -17
- package/dist/components/chat/copilot-chat-view-scroll-view.component.d.ts +0 -84
- package/dist/components/chat/copilot-chat-view.component.d.ts +0 -205
- package/dist/components/chat/copilot-chat.component.d.ts +0 -36
- package/dist/components/copilotkit-tool-render.component.d.ts +0 -25
- package/dist/core/chat-configuration/chat-configuration.providers.d.ts +0 -54
- package/dist/core/chat-configuration/chat-configuration.service.d.ts +0 -75
- package/dist/core/copilotkit.providers.d.ts +0 -13
- package/dist/core/copilotkit.service.d.ts +0 -119
- package/dist/core/copilotkit.types.d.ts +0 -81
- package/dist/directives/copilotkit-agent.directive.d.ts +0 -106
- package/dist/directives/copilotkit-chat-config.directive.d.ts +0 -84
- package/dist/directives/copilotkit-config.directive.d.ts +0 -44
- package/dist/directives/copilotkit-frontend-tool.directive.d.ts +0 -25
- package/dist/directives/copilotkit-human-in-the-loop.directive.d.ts +0 -124
- package/dist/directives/stick-to-bottom.directive.d.ts +0 -62
- package/dist/esm2022/components/chat/copilot-chat-assistant-message-buttons.component.mjs +0 -384
- package/dist/esm2022/components/chat/copilot-chat-assistant-message-renderer.component.mjs +0 -286
- package/dist/esm2022/components/chat/copilot-chat-assistant-message-toolbar.component.mjs +0 -27
- package/dist/esm2022/components/chat/copilot-chat-assistant-message.types.mjs +0 -2
- package/dist/esm2022/components/chat/copilot-chat-audio-recorder.component.mjs +0 -202
- package/dist/esm2022/components/chat/copilot-chat-buttons.component.mjs +0 -321
- package/dist/esm2022/components/chat/copilot-chat-input-defaults.mjs +0 -38
- package/dist/esm2022/components/chat/copilot-chat-input.component.mjs +0 -666
- package/dist/esm2022/components/chat/copilot-chat-input.types.mjs +0 -10
- package/dist/esm2022/components/chat/copilot-chat-message-view-cursor.component.mjs +0 -45
- package/dist/esm2022/components/chat/copilot-chat-message-view.component.mjs +0 -296
- package/dist/esm2022/components/chat/copilot-chat-message-view.types.mjs +0 -2
- package/dist/esm2022/components/chat/copilot-chat-textarea.component.mjs +0 -188
- package/dist/esm2022/components/chat/copilot-chat-tool-calls-view.component.mjs +0 -222
- package/dist/esm2022/components/chat/copilot-chat-toolbar.component.mjs +0 -25
- package/dist/esm2022/components/chat/copilot-chat-tools-menu.component.mjs +0 -199
- package/dist/esm2022/components/chat/copilot-chat-user-message-branch-navigation.component.mjs +0 -137
- package/dist/esm2022/components/chat/copilot-chat-user-message-buttons.component.mjs +0 -207
- package/dist/esm2022/components/chat/copilot-chat-user-message-renderer.component.mjs +0 -35
- package/dist/esm2022/components/chat/copilot-chat-user-message-toolbar.component.mjs +0 -34
- package/dist/esm2022/components/chat/copilot-chat-user-message.component.mjs +0 -341
- package/dist/esm2022/components/chat/copilot-chat-user-message.types.mjs +0 -2
- package/dist/esm2022/components/chat/copilot-chat-view-disclaimer.component.mjs +0 -52
- package/dist/esm2022/components/chat/copilot-chat-view-feather.component.mjs +0 -55
- package/dist/esm2022/components/chat/copilot-chat-view-handlers.service.mjs +0 -19
- package/dist/esm2022/components/chat/copilot-chat-view-input-container.component.mjs +0 -110
- package/dist/esm2022/components/chat/copilot-chat-view-scroll-to-bottom-button.component.mjs +0 -93
- package/dist/esm2022/components/chat/copilot-chat-view-scroll-view.component.mjs +0 -443
- package/dist/esm2022/components/chat/copilot-chat-view.component.mjs +0 -479
- package/dist/esm2022/components/chat/copilot-chat-view.types.mjs +0 -2
- package/dist/esm2022/components/chat/copilot-chat.component.mjs +0 -220
- package/dist/esm2022/components/copilotkit-tool-render.component.mjs +0 -150
- package/dist/esm2022/core/chat-configuration/chat-configuration.providers.mjs +0 -65
- package/dist/esm2022/core/chat-configuration/chat-configuration.service.mjs +0 -145
- package/dist/esm2022/core/chat-configuration/chat-configuration.types.mjs +0 -26
- package/dist/esm2022/core/copilotkit.providers.mjs +0 -34
- package/dist/esm2022/core/copilotkit.service.mjs +0 -411
- package/dist/esm2022/core/copilotkit.types.mjs +0 -13
- package/dist/esm2022/directives/copilotkit-agent-context.directive.mjs +0 -130
- package/dist/esm2022/directives/copilotkit-agent.directive.mjs +0 -221
- package/dist/esm2022/directives/copilotkit-chat-config.directive.mjs +0 -218
- package/dist/esm2022/directives/copilotkit-config.directive.mjs +0 -94
- package/dist/esm2022/directives/copilotkit-frontend-tool.directive.mjs +0 -128
- package/dist/esm2022/directives/copilotkit-human-in-the-loop.directive.mjs +0 -265
- package/dist/esm2022/directives/stick-to-bottom.directive.mjs +0 -181
- package/dist/esm2022/lib/directives/tooltip.directive.mjs +0 -211
- package/dist/esm2022/lib/slots/copilot-slot.component.mjs +0 -154
- package/dist/esm2022/services/resize-observer.service.mjs +0 -152
- package/dist/esm2022/services/scroll-position.service.mjs +0 -124
- package/dist/esm2022/types/frontend-tool.mjs +0 -2
- package/dist/esm2022/types/human-in-the-loop.mjs +0 -2
- package/dist/esm2022/utils/agent-context.utils.mjs +0 -114
- package/dist/esm2022/utils/agent.utils.mjs +0 -212
- package/dist/esm2022/utils/chat-config.utils.mjs +0 -186
- package/dist/esm2022/utils/copilotkit.utils.mjs +0 -20
- package/dist/esm2022/utils/frontend-tool.utils.mjs +0 -224
- package/dist/esm2022/utils/human-in-the-loop.utils.mjs +0 -293
- package/dist/lib/directives/tooltip.directive.d.ts +0 -33
- package/dist/lib/slots/copilot-slot.component.d.ts +0 -34
- package/dist/types/frontend-tool.d.ts +0 -37
- package/dist/types/human-in-the-loop.d.ts +0 -44
- package/dist/utils/agent-context.utils.d.ts +0 -75
- package/dist/utils/agent.utils.d.ts +0 -108
- package/dist/utils/chat-config.utils.d.ts +0 -166
- package/dist/utils/copilotkit.utils.d.ts +0 -16
- package/dist/utils/frontend-tool.utils.d.ts +0 -119
- package/dist/utils/human-in-the-loop.utils.d.ts +0 -92
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { TemplateRef, Type } from "@angular/core";
|
|
2
|
+
import { type UserMessage, type CopilotChatUserMessageOnEditMessageProps, type CopilotChatUserMessageOnSwitchToBranchProps, type MessageRendererContext, type CopyButtonContext, type EditButtonContext, type BranchNavigationContext, type UserMessageToolbarContext } from "./copilot-chat-user-message.types";
|
|
3
|
+
import { CopilotChatUserMessageRenderer } from "./copilot-chat-user-message-renderer";
|
|
4
|
+
import { CopilotChatUserMessageCopyButton, CopilotChatUserMessageEditButton } from "./copilot-chat-user-message-buttons";
|
|
5
|
+
import { CopilotChatUserMessageToolbar } from "./copilot-chat-user-message-toolbar";
|
|
6
|
+
import { CopilotChatUserMessageBranchNavigation } from "./copilot-chat-user-message-branch-navigation";
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
export declare class CopilotChatUserMessage {
|
|
9
|
+
messageRendererTemplate?: TemplateRef<MessageRendererContext>;
|
|
10
|
+
toolbarTemplate?: TemplateRef<UserMessageToolbarContext>;
|
|
11
|
+
copyButtonTemplate?: TemplateRef<CopyButtonContext>;
|
|
12
|
+
editButtonTemplate?: TemplateRef<EditButtonContext>;
|
|
13
|
+
branchNavigationTemplate?: TemplateRef<BranchNavigationContext>;
|
|
14
|
+
messageRendererClass: import("@angular/core").InputSignal<string>;
|
|
15
|
+
toolbarClass: import("@angular/core").InputSignal<string>;
|
|
16
|
+
copyButtonClass: import("@angular/core").InputSignal<string>;
|
|
17
|
+
editButtonClass: import("@angular/core").InputSignal<string>;
|
|
18
|
+
branchNavigationClass: import("@angular/core").InputSignal<string>;
|
|
19
|
+
messageRendererComponent: import("@angular/core").InputSignal<Type<any>>;
|
|
20
|
+
toolbarComponent: import("@angular/core").InputSignal<Type<any>>;
|
|
21
|
+
copyButtonComponent: import("@angular/core").InputSignal<Type<any>>;
|
|
22
|
+
editButtonComponent: import("@angular/core").InputSignal<Type<any>>;
|
|
23
|
+
branchNavigationComponent: import("@angular/core").InputSignal<Type<any>>;
|
|
24
|
+
message: import("@angular/core").InputSignal<UserMessage>;
|
|
25
|
+
branchIndex: import("@angular/core").InputSignal<number>;
|
|
26
|
+
numberOfBranches: import("@angular/core").InputSignal<number>;
|
|
27
|
+
additionalToolbarItems: import("@angular/core").InputSignal<TemplateRef<any>>;
|
|
28
|
+
inputClass: import("@angular/core").InputSignal<string>;
|
|
29
|
+
editMessage: import("@angular/core").OutputEmitterRef<CopilotChatUserMessageOnEditMessageProps>;
|
|
30
|
+
switchToBranch: import("@angular/core").OutputEmitterRef<CopilotChatUserMessageOnSwitchToBranchProps>;
|
|
31
|
+
branchIndexValue: import("@angular/core").Signal<number>;
|
|
32
|
+
numberOfBranchesValue: import("@angular/core").Signal<number>;
|
|
33
|
+
CopilotChatUserMessageRenderer: typeof CopilotChatUserMessageRenderer;
|
|
34
|
+
CopilotChatUserMessageToolbar: typeof CopilotChatUserMessageToolbar;
|
|
35
|
+
CopilotChatUserMessageCopyButton: typeof CopilotChatUserMessageCopyButton;
|
|
36
|
+
CopilotChatUserMessageEditButton: typeof CopilotChatUserMessageEditButton;
|
|
37
|
+
CopilotChatUserMessageBranchNavigation: typeof CopilotChatUserMessageBranchNavigation;
|
|
38
|
+
showBranchNavigation: import("@angular/core").Signal<boolean>;
|
|
39
|
+
computedClass: import("@angular/core").Signal<string>;
|
|
40
|
+
messageRendererContext: import("@angular/core").Signal<MessageRendererContext>;
|
|
41
|
+
copyButtonOutputs: {
|
|
42
|
+
clicked: () => void;
|
|
43
|
+
};
|
|
44
|
+
editButtonOutputs: {
|
|
45
|
+
clicked: () => void;
|
|
46
|
+
};
|
|
47
|
+
branchNavigationContext: import("@angular/core").Signal<BranchNavigationContext>;
|
|
48
|
+
toolbarContext: import("@angular/core").Signal<UserMessageToolbarContext>;
|
|
49
|
+
handleCopy(): void;
|
|
50
|
+
handleEdit(): void;
|
|
51
|
+
handleSwitchToBranch(props: CopilotChatUserMessageOnSwitchToBranchProps): void;
|
|
52
|
+
constructor();
|
|
53
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CopilotChatUserMessage, never>;
|
|
54
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CopilotChatUserMessage, "copilot-chat-user-message", never, { "messageRendererClass": { "alias": "messageRendererClass"; "required": false; "isSignal": true; }; "toolbarClass": { "alias": "toolbarClass"; "required": false; "isSignal": true; }; "copyButtonClass": { "alias": "copyButtonClass"; "required": false; "isSignal": true; }; "editButtonClass": { "alias": "editButtonClass"; "required": false; "isSignal": true; }; "branchNavigationClass": { "alias": "branchNavigationClass"; "required": false; "isSignal": true; }; "messageRendererComponent": { "alias": "messageRendererComponent"; "required": false; "isSignal": true; }; "toolbarComponent": { "alias": "toolbarComponent"; "required": false; "isSignal": true; }; "copyButtonComponent": { "alias": "copyButtonComponent"; "required": false; "isSignal": true; }; "editButtonComponent": { "alias": "editButtonComponent"; "required": false; "isSignal": true; }; "branchNavigationComponent": { "alias": "branchNavigationComponent"; "required": false; "isSignal": true; }; "message": { "alias": "message"; "required": false; "isSignal": true; }; "branchIndex": { "alias": "branchIndex"; "required": false; "isSignal": true; }; "numberOfBranches": { "alias": "numberOfBranches"; "required": false; "isSignal": true; }; "additionalToolbarItems": { "alias": "additionalToolbarItems"; "required": false; "isSignal": true; }; "inputClass": { "alias": "inputClass"; "required": false; "isSignal": true; }; }, { "editMessage": "editMessage"; "switchToBranch": "switchToBranch"; }, ["messageRendererTemplate", "toolbarTemplate", "copyButtonTemplate", "editButtonTemplate", "branchNavigationTemplate"], never, true, never>;
|
|
55
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export interface UserMessage {
|
|
2
2
|
id: string;
|
|
3
3
|
content?: string;
|
|
4
|
-
role:
|
|
4
|
+
role: "user";
|
|
5
5
|
timestamp?: Date;
|
|
6
6
|
[key: string]: any;
|
|
7
7
|
}
|
|
@@ -28,6 +28,6 @@ export interface BranchNavigationContext {
|
|
|
28
28
|
onSwitchToBranch?: (props: CopilotChatUserMessageOnSwitchToBranchProps) => void;
|
|
29
29
|
message: UserMessage;
|
|
30
30
|
}
|
|
31
|
-
export interface
|
|
31
|
+
export interface UserMessageToolbarContext {
|
|
32
32
|
children?: any;
|
|
33
33
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
/**
|
|
3
|
+
* Disclaimer component for CopilotChatView
|
|
4
|
+
* Shows configurable disclaimer text below the input
|
|
5
|
+
* Integrates with CopilotChatConfigurationService for labels
|
|
6
|
+
*/
|
|
7
|
+
export declare class CopilotChatViewDisclaimer {
|
|
8
|
+
inputClass: import("@angular/core").InputSignal<string>;
|
|
9
|
+
text: import("@angular/core").InputSignal<string>;
|
|
10
|
+
readonly labels: import("../../chat-config").CopilotChatLabels;
|
|
11
|
+
get disclaimerText(): string;
|
|
12
|
+
get computedClass(): string;
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CopilotChatViewDisclaimer, never>;
|
|
14
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CopilotChatViewDisclaimer, "copilot-chat-view-disclaimer", never, { "inputClass": { "alias": "inputClass"; "required": false; "isSignal": true; }; "text": { "alias": "text"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
15
|
+
}
|
|
@@ -4,12 +4,12 @@ import * as i0 from "@angular/core";
|
|
|
4
4
|
* Creates a gradient overlay effect between messages and input
|
|
5
5
|
* Matches React implementation exactly with same Tailwind classes
|
|
6
6
|
*/
|
|
7
|
-
export declare class
|
|
8
|
-
inputClass
|
|
9
|
-
style
|
|
7
|
+
export declare class CopilotChatViewFeather {
|
|
8
|
+
inputClass: import("@angular/core").InputSignal<string>;
|
|
9
|
+
style: import("@angular/core").InputSignal<{
|
|
10
10
|
[key: string]: any;
|
|
11
|
-
}
|
|
11
|
+
}>;
|
|
12
12
|
get computedClass(): string;
|
|
13
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
14
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CopilotChatViewFeather, never>;
|
|
14
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CopilotChatViewFeather, "copilot-chat-view-feather", never, { "inputClass": { "alias": "inputClass"; "required": false; "isSignal": true; }; "style": { "alias": "style"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
15
15
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
|
-
export declare class
|
|
2
|
+
export declare class CopilotChatViewHandlers {
|
|
3
3
|
hasAssistantThumbsUpHandler: import("@angular/core").WritableSignal<boolean>;
|
|
4
4
|
hasAssistantThumbsDownHandler: import("@angular/core").WritableSignal<boolean>;
|
|
5
5
|
hasAssistantReadAloudHandler: import("@angular/core").WritableSignal<boolean>;
|
|
6
6
|
hasAssistantRegenerateHandler: import("@angular/core").WritableSignal<boolean>;
|
|
7
7
|
hasUserCopyHandler: import("@angular/core").WritableSignal<boolean>;
|
|
8
8
|
hasUserEditHandler: import("@angular/core").WritableSignal<boolean>;
|
|
9
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
10
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CopilotChatViewHandlers, never>;
|
|
10
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<CopilotChatViewHandlers>;
|
|
11
11
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ElementRef } from "@angular/core";
|
|
2
|
+
import { CopilotChatInput } from "./copilot-chat-input";
|
|
3
|
+
import { CopilotChatViewDisclaimer } from "./copilot-chat-view-disclaimer";
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
/**
|
|
6
|
+
* InputContainer component for CopilotChatView
|
|
7
|
+
* Container for input and disclaimer components
|
|
8
|
+
* Uses ForwardRef for DOM access
|
|
9
|
+
*/
|
|
10
|
+
export declare class CopilotChatViewInputContainer extends ElementRef {
|
|
11
|
+
inputContainerClass: import("@angular/core").InputSignal<string>;
|
|
12
|
+
input: import("@angular/core").InputSignal<any>;
|
|
13
|
+
inputClass: import("@angular/core").InputSignal<string>;
|
|
14
|
+
disclaimer: import("@angular/core").InputSignal<any>;
|
|
15
|
+
disclaimerText: import("@angular/core").InputSignal<string>;
|
|
16
|
+
disclaimerClass: import("@angular/core").InputSignal<string>;
|
|
17
|
+
protected readonly defaultInputComponent: typeof CopilotChatInput;
|
|
18
|
+
protected readonly defaultDisclaimerComponent: typeof CopilotChatViewDisclaimer;
|
|
19
|
+
constructor(elementRef: ElementRef);
|
|
20
|
+
get computedClass(): string;
|
|
21
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CopilotChatViewInputContainer, never>;
|
|
22
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CopilotChatViewInputContainer, "copilot-chat-view-input-container", never, { "inputContainerClass": { "alias": "inputContainerClass"; "required": false; "isSignal": true; }; "input": { "alias": "input"; "required": false; "isSignal": true; }; "inputClass": { "alias": "inputClass"; "required": false; "isSignal": true; }; "disclaimer": { "alias": "disclaimer"; "required": false; "isSignal": true; }; "disclaimerText": { "alias": "disclaimerText"; "required": false; "isSignal": true; }; "disclaimerClass": { "alias": "disclaimerClass"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
23
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
/**
|
|
3
|
+
* ScrollToBottomButton component for CopilotChatView
|
|
4
|
+
* Matches React implementation exactly with same Tailwind classes
|
|
5
|
+
*/
|
|
6
|
+
export declare class CopilotChatViewScrollToBottomButton {
|
|
7
|
+
inputClass: import("@angular/core").InputSignal<string>;
|
|
8
|
+
disabled: import("@angular/core").InputSignal<boolean>;
|
|
9
|
+
onClick: import("@angular/core").InputSignal<() => void>;
|
|
10
|
+
clicked: import("@angular/core").OutputEmitterRef<void>;
|
|
11
|
+
protected readonly ChevronDown: import("lucide-angular").LucideIconData;
|
|
12
|
+
get computedClass(): string;
|
|
13
|
+
handleClick(): void;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CopilotChatViewScrollToBottomButton, never>;
|
|
15
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CopilotChatViewScrollToBottomButton, "copilot-chat-view-scroll-to-bottom-button", never, { "inputClass": { "alias": "inputClass"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "onClick": { "alias": "onClick"; "required": false; "isSignal": true; }; }, { "clicked": "clicked"; }, never, never, true, never>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { ElementRef, OnInit, AfterViewInit, OnDestroy } from "@angular/core";
|
|
2
|
+
import { CopilotChatMessageView } from "./copilot-chat-message-view";
|
|
3
|
+
import { CopilotChatViewScrollToBottomButton } from "./copilot-chat-view-scroll-to-bottom-button";
|
|
4
|
+
import { StickToBottom } from "../../directives/stick-to-bottom";
|
|
5
|
+
import { Message } from "@ag-ui/client";
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
/**
|
|
8
|
+
* ScrollView component for CopilotChatView
|
|
9
|
+
* Handles auto-scrolling and scroll position management
|
|
10
|
+
*/
|
|
11
|
+
export declare class CopilotChatViewScrollView implements OnInit, AfterViewInit, OnDestroy {
|
|
12
|
+
private cdr;
|
|
13
|
+
autoScroll: import("@angular/core").InputSignal<boolean>;
|
|
14
|
+
inputContainerHeight: import("@angular/core").InputSignal<number>;
|
|
15
|
+
isResizing: import("@angular/core").InputSignal<boolean>;
|
|
16
|
+
inputClass: import("@angular/core").InputSignal<string>;
|
|
17
|
+
messages: import("@angular/core").InputSignal<({
|
|
18
|
+
id: string;
|
|
19
|
+
role: "developer";
|
|
20
|
+
content: string;
|
|
21
|
+
name?: string;
|
|
22
|
+
} | {
|
|
23
|
+
id: string;
|
|
24
|
+
role: "system";
|
|
25
|
+
content: string;
|
|
26
|
+
name?: string;
|
|
27
|
+
} | {
|
|
28
|
+
id: string;
|
|
29
|
+
role: "assistant";
|
|
30
|
+
name?: string;
|
|
31
|
+
content?: string;
|
|
32
|
+
toolCalls?: {
|
|
33
|
+
function: {
|
|
34
|
+
name: string;
|
|
35
|
+
arguments: string;
|
|
36
|
+
};
|
|
37
|
+
type: "function";
|
|
38
|
+
id: string;
|
|
39
|
+
}[];
|
|
40
|
+
} | {
|
|
41
|
+
id: string;
|
|
42
|
+
role: "user";
|
|
43
|
+
content: string;
|
|
44
|
+
name?: string;
|
|
45
|
+
} | {
|
|
46
|
+
id: string;
|
|
47
|
+
role: "tool";
|
|
48
|
+
content: string;
|
|
49
|
+
toolCallId: string;
|
|
50
|
+
error?: string;
|
|
51
|
+
})[]>;
|
|
52
|
+
messageView: import("@angular/core").InputSignal<any>;
|
|
53
|
+
messageViewClass: import("@angular/core").InputSignal<string>;
|
|
54
|
+
showCursor: import("@angular/core").InputSignal<boolean>;
|
|
55
|
+
scrollToBottomButton: import("@angular/core").InputSignal<any>;
|
|
56
|
+
scrollToBottomButtonClass: import("@angular/core").InputSignal<string>;
|
|
57
|
+
assistantMessageThumbsUp: import("@angular/core").OutputEmitterRef<{
|
|
58
|
+
message: Message;
|
|
59
|
+
}>;
|
|
60
|
+
assistantMessageThumbsDown: import("@angular/core").OutputEmitterRef<{
|
|
61
|
+
message: Message;
|
|
62
|
+
}>;
|
|
63
|
+
assistantMessageReadAloud: import("@angular/core").OutputEmitterRef<{
|
|
64
|
+
message: Message;
|
|
65
|
+
}>;
|
|
66
|
+
assistantMessageRegenerate: import("@angular/core").OutputEmitterRef<{
|
|
67
|
+
message: Message;
|
|
68
|
+
}>;
|
|
69
|
+
userMessageCopy: import("@angular/core").OutputEmitterRef<{
|
|
70
|
+
message: Message;
|
|
71
|
+
}>;
|
|
72
|
+
userMessageEdit: import("@angular/core").OutputEmitterRef<{
|
|
73
|
+
message: Message;
|
|
74
|
+
}>;
|
|
75
|
+
scrollContainer?: ElementRef<HTMLElement>;
|
|
76
|
+
contentContainer?: ElementRef<HTMLElement>;
|
|
77
|
+
stickToBottomDirective?: StickToBottom;
|
|
78
|
+
protected readonly defaultMessageViewComponent: typeof CopilotChatMessageView;
|
|
79
|
+
protected readonly defaultScrollToBottomButtonComponent: typeof CopilotChatViewScrollToBottomButton;
|
|
80
|
+
protected hasMounted: import("@angular/core").WritableSignal<boolean>;
|
|
81
|
+
protected showScrollButton: import("@angular/core").WritableSignal<boolean>;
|
|
82
|
+
protected isAtBottom: import("@angular/core").WritableSignal<boolean>;
|
|
83
|
+
protected paddingBottom: import("@angular/core").Signal<number>;
|
|
84
|
+
protected computedClass: import("@angular/core").Signal<string>;
|
|
85
|
+
private destroy$;
|
|
86
|
+
private platformId;
|
|
87
|
+
private scrollPositionService;
|
|
88
|
+
ngOnInit(): void;
|
|
89
|
+
ngAfterViewInit(): void;
|
|
90
|
+
/**
|
|
91
|
+
* Handle isAtBottom change from StickToBottom directive
|
|
92
|
+
*/
|
|
93
|
+
onIsAtBottomChange(isAtBottom: boolean): void;
|
|
94
|
+
/**
|
|
95
|
+
* Scroll to bottom for manual mode
|
|
96
|
+
*/
|
|
97
|
+
scrollToBottom(): void;
|
|
98
|
+
/**
|
|
99
|
+
* Scroll to bottom for stick-to-bottom mode
|
|
100
|
+
*/
|
|
101
|
+
scrollToBottomFromStick(): void;
|
|
102
|
+
ngOnDestroy(): void;
|
|
103
|
+
scrollToBottomOutputs: {
|
|
104
|
+
clicked: () => void;
|
|
105
|
+
};
|
|
106
|
+
scrollToBottomFromStickOutputs: {
|
|
107
|
+
clicked: () => void;
|
|
108
|
+
};
|
|
109
|
+
messageViewContext(): any;
|
|
110
|
+
scrollToBottomContext(): any;
|
|
111
|
+
scrollToBottomFromStickContext(): any;
|
|
112
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CopilotChatViewScrollView, never>;
|
|
113
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CopilotChatViewScrollView, "copilot-chat-view-scroll-view", never, { "autoScroll": { "alias": "autoScroll"; "required": false; "isSignal": true; }; "inputContainerHeight": { "alias": "inputContainerHeight"; "required": false; "isSignal": true; }; "isResizing": { "alias": "isResizing"; "required": false; "isSignal": true; }; "inputClass": { "alias": "inputClass"; "required": false; "isSignal": true; }; "messages": { "alias": "messages"; "required": false; "isSignal": true; }; "messageView": { "alias": "messageView"; "required": false; "isSignal": true; }; "messageViewClass": { "alias": "messageViewClass"; "required": false; "isSignal": true; }; "showCursor": { "alias": "showCursor"; "required": false; "isSignal": true; }; "scrollToBottomButton": { "alias": "scrollToBottomButton"; "required": false; "isSignal": true; }; "scrollToBottomButtonClass": { "alias": "scrollToBottomButtonClass"; "required": false; "isSignal": true; }; }, { "assistantMessageThumbsUp": "assistantMessageThumbsUp"; "assistantMessageThumbsDown": "assistantMessageThumbsDown"; "assistantMessageReadAloud": "assistantMessageReadAloud"; "assistantMessageRegenerate": "assistantMessageRegenerate"; "userMessageCopy": "userMessageCopy"; "userMessageEdit": "userMessageEdit"; }, never, ["*"], true, never>;
|
|
114
|
+
}
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
import { TemplateRef, Type, ElementRef, ChangeDetectorRef, OnInit, OnChanges, OnDestroy, AfterViewInit } from "@angular/core";
|
|
2
|
+
import { CopilotChatViewScrollView } from "./copilot-chat-view-scroll-view";
|
|
3
|
+
import { CopilotChatViewScrollToBottomButton } from "./copilot-chat-view-scroll-to-bottom-button";
|
|
4
|
+
import { CopilotChatViewFeather } from "./copilot-chat-view-feather";
|
|
5
|
+
import { CopilotChatViewInputContainer } from "./copilot-chat-view-input-container";
|
|
6
|
+
import { CopilotChatViewDisclaimer } from "./copilot-chat-view-disclaimer";
|
|
7
|
+
import { Message } from "@ag-ui/client";
|
|
8
|
+
import { ResizeObserverService } from "../../resize-observer";
|
|
9
|
+
import { CopilotChatViewHandlers } from "./copilot-chat-view-handlers";
|
|
10
|
+
import * as i0 from "@angular/core";
|
|
11
|
+
/**
|
|
12
|
+
* CopilotChatView component - Angular port of the React component.
|
|
13
|
+
* A complete chat interface with message feed and input components.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```html
|
|
17
|
+
* <copilot-chat-view
|
|
18
|
+
* [messages]="messages"
|
|
19
|
+
* [autoScroll]="true"
|
|
20
|
+
* [messageViewProps]="{ assistantMessage: { onThumbsUp: handleThumbsUp } }">
|
|
21
|
+
* </copilot-chat-view>
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
export declare class CopilotChatView implements OnInit, OnChanges, AfterViewInit, OnDestroy {
|
|
25
|
+
private resizeObserverService;
|
|
26
|
+
private cdr;
|
|
27
|
+
private handlers;
|
|
28
|
+
messages: import("@angular/core").InputSignal<({
|
|
29
|
+
id: string;
|
|
30
|
+
role: "developer";
|
|
31
|
+
content: string;
|
|
32
|
+
name?: string;
|
|
33
|
+
} | {
|
|
34
|
+
id: string;
|
|
35
|
+
role: "system";
|
|
36
|
+
content: string;
|
|
37
|
+
name?: string;
|
|
38
|
+
} | {
|
|
39
|
+
id: string;
|
|
40
|
+
role: "assistant";
|
|
41
|
+
name?: string;
|
|
42
|
+
content?: string;
|
|
43
|
+
toolCalls?: {
|
|
44
|
+
function: {
|
|
45
|
+
name: string;
|
|
46
|
+
arguments: string;
|
|
47
|
+
};
|
|
48
|
+
type: "function";
|
|
49
|
+
id: string;
|
|
50
|
+
}[];
|
|
51
|
+
} | {
|
|
52
|
+
id: string;
|
|
53
|
+
role: "user";
|
|
54
|
+
content: string;
|
|
55
|
+
name?: string;
|
|
56
|
+
} | {
|
|
57
|
+
id: string;
|
|
58
|
+
role: "tool";
|
|
59
|
+
content: string;
|
|
60
|
+
toolCallId: string;
|
|
61
|
+
error?: string;
|
|
62
|
+
})[]>;
|
|
63
|
+
autoScroll: import("@angular/core").InputSignal<boolean>;
|
|
64
|
+
showCursor: import("@angular/core").InputSignal<boolean>;
|
|
65
|
+
messageViewComponent: import("@angular/core").InputSignal<Type<any>>;
|
|
66
|
+
messageViewTemplate: import("@angular/core").InputSignal<TemplateRef<any>>;
|
|
67
|
+
messageViewClass: import("@angular/core").InputSignal<string>;
|
|
68
|
+
scrollViewComponent: import("@angular/core").InputSignal<Type<any>>;
|
|
69
|
+
scrollViewTemplate: import("@angular/core").InputSignal<TemplateRef<any>>;
|
|
70
|
+
scrollViewClass: import("@angular/core").InputSignal<string>;
|
|
71
|
+
scrollToBottomButtonComponent: import("@angular/core").InputSignal<Type<any>>;
|
|
72
|
+
scrollToBottomButtonTemplate: import("@angular/core").InputSignal<TemplateRef<any>>;
|
|
73
|
+
scrollToBottomButtonClass: import("@angular/core").InputSignal<string>;
|
|
74
|
+
inputComponent: import("@angular/core").InputSignal<Type<any>>;
|
|
75
|
+
inputTemplate: import("@angular/core").InputSignal<TemplateRef<any>>;
|
|
76
|
+
inputContainerComponent: import("@angular/core").InputSignal<Type<any>>;
|
|
77
|
+
inputContainerTemplate: import("@angular/core").InputSignal<TemplateRef<any>>;
|
|
78
|
+
inputContainerClass: import("@angular/core").InputSignal<string>;
|
|
79
|
+
featherComponent: import("@angular/core").InputSignal<Type<any>>;
|
|
80
|
+
featherTemplate: import("@angular/core").InputSignal<TemplateRef<any>>;
|
|
81
|
+
featherClass: import("@angular/core").InputSignal<string>;
|
|
82
|
+
disclaimerComponent: import("@angular/core").InputSignal<Type<any>>;
|
|
83
|
+
disclaimerTemplate: import("@angular/core").InputSignal<TemplateRef<any>>;
|
|
84
|
+
disclaimerClass: import("@angular/core").InputSignal<string>;
|
|
85
|
+
disclaimerText: import("@angular/core").InputSignal<string>;
|
|
86
|
+
customLayoutTemplate?: TemplateRef<any>;
|
|
87
|
+
sendButtonTemplate?: TemplateRef<any>;
|
|
88
|
+
toolbarTemplate?: TemplateRef<any>;
|
|
89
|
+
textAreaTemplate?: TemplateRef<any>;
|
|
90
|
+
audioRecorderTemplate?: TemplateRef<any>;
|
|
91
|
+
assistantMessageMarkdownRendererTemplate?: TemplateRef<any>;
|
|
92
|
+
thumbsUpButtonTemplate?: TemplateRef<any>;
|
|
93
|
+
thumbsDownButtonTemplate?: TemplateRef<any>;
|
|
94
|
+
readAloudButtonTemplate?: TemplateRef<any>;
|
|
95
|
+
regenerateButtonTemplate?: TemplateRef<any>;
|
|
96
|
+
assistantMessageThumbsUp: import("@angular/core").OutputEmitterRef<{
|
|
97
|
+
message: Message;
|
|
98
|
+
}>;
|
|
99
|
+
assistantMessageThumbsDown: import("@angular/core").OutputEmitterRef<{
|
|
100
|
+
message: Message;
|
|
101
|
+
}>;
|
|
102
|
+
assistantMessageReadAloud: import("@angular/core").OutputEmitterRef<{
|
|
103
|
+
message: Message;
|
|
104
|
+
}>;
|
|
105
|
+
assistantMessageRegenerate: import("@angular/core").OutputEmitterRef<{
|
|
106
|
+
message: Message;
|
|
107
|
+
}>;
|
|
108
|
+
userMessageCopy: import("@angular/core").OutputEmitterRef<{
|
|
109
|
+
message: Message;
|
|
110
|
+
}>;
|
|
111
|
+
userMessageEdit: import("@angular/core").OutputEmitterRef<{
|
|
112
|
+
message: Message;
|
|
113
|
+
}>;
|
|
114
|
+
inputContainerSlotRef?: ElementRef;
|
|
115
|
+
protected readonly defaultScrollViewComponent: typeof CopilotChatViewScrollView;
|
|
116
|
+
protected readonly defaultScrollToBottomButtonComponent: typeof CopilotChatViewScrollToBottomButton;
|
|
117
|
+
protected readonly defaultInputContainerComponent: typeof CopilotChatViewInputContainer;
|
|
118
|
+
protected readonly defaultFeatherComponent: typeof CopilotChatViewFeather;
|
|
119
|
+
protected readonly defaultDisclaimerComponent: typeof CopilotChatViewDisclaimer;
|
|
120
|
+
protected messagesValue: import("@angular/core").Signal<({
|
|
121
|
+
id: string;
|
|
122
|
+
role: "developer";
|
|
123
|
+
content: string;
|
|
124
|
+
name?: string;
|
|
125
|
+
} | {
|
|
126
|
+
id: string;
|
|
127
|
+
role: "system";
|
|
128
|
+
content: string;
|
|
129
|
+
name?: string;
|
|
130
|
+
} | {
|
|
131
|
+
id: string;
|
|
132
|
+
role: "assistant";
|
|
133
|
+
name?: string;
|
|
134
|
+
content?: string;
|
|
135
|
+
toolCalls?: {
|
|
136
|
+
function: {
|
|
137
|
+
name: string;
|
|
138
|
+
arguments: string;
|
|
139
|
+
};
|
|
140
|
+
type: "function";
|
|
141
|
+
id: string;
|
|
142
|
+
}[];
|
|
143
|
+
} | {
|
|
144
|
+
id: string;
|
|
145
|
+
role: "user";
|
|
146
|
+
content: string;
|
|
147
|
+
name?: string;
|
|
148
|
+
} | {
|
|
149
|
+
id: string;
|
|
150
|
+
role: "tool";
|
|
151
|
+
content: string;
|
|
152
|
+
toolCallId: string;
|
|
153
|
+
error?: string;
|
|
154
|
+
})[]>;
|
|
155
|
+
protected autoScrollSignal: import("@angular/core").Signal<boolean>;
|
|
156
|
+
protected showCursorSignal: import("@angular/core").Signal<boolean>;
|
|
157
|
+
protected disclaimerTextSignal: import("@angular/core").Signal<string>;
|
|
158
|
+
protected disclaimerClassSignal: import("@angular/core").Signal<string>;
|
|
159
|
+
protected inputContainerHeight: import("@angular/core").WritableSignal<number>;
|
|
160
|
+
protected isResizing: import("@angular/core").WritableSignal<boolean>;
|
|
161
|
+
protected contentPaddingBottom: import("@angular/core").Signal<number>;
|
|
162
|
+
protected computedClass: import("@angular/core").Signal<string>;
|
|
163
|
+
protected messageViewSlot: import("@angular/core").Signal<Type<any> | TemplateRef<any>>;
|
|
164
|
+
protected scrollViewSlot: import("@angular/core").Signal<Type<any> | TemplateRef<any>>;
|
|
165
|
+
protected scrollToBottomButtonSlot: import("@angular/core").Signal<Type<any> | TemplateRef<any>>;
|
|
166
|
+
protected inputSlot: import("@angular/core").Signal<Type<any> | TemplateRef<any>>;
|
|
167
|
+
protected inputContainerSlot: import("@angular/core").Signal<Type<any> | TemplateRef<any>>;
|
|
168
|
+
protected featherSlot: import("@angular/core").Signal<Type<any> | TemplateRef<any>>;
|
|
169
|
+
protected disclaimerSlot: import("@angular/core").Signal<Type<any> | TemplateRef<any>>;
|
|
170
|
+
protected scrollViewContext: import("@angular/core").Signal<{
|
|
171
|
+
autoScroll: boolean;
|
|
172
|
+
scrollToBottomButton: Type<any> | TemplateRef<any>;
|
|
173
|
+
scrollToBottomButtonClass: string;
|
|
174
|
+
inputContainerHeight: number;
|
|
175
|
+
isResizing: boolean;
|
|
176
|
+
messages: ({
|
|
177
|
+
id: string;
|
|
178
|
+
role: "developer";
|
|
179
|
+
content: string;
|
|
180
|
+
name?: string;
|
|
181
|
+
} | {
|
|
182
|
+
id: string;
|
|
183
|
+
role: "system";
|
|
184
|
+
content: string;
|
|
185
|
+
name?: string;
|
|
186
|
+
} | {
|
|
187
|
+
id: string;
|
|
188
|
+
role: "assistant";
|
|
189
|
+
name?: string;
|
|
190
|
+
content?: string;
|
|
191
|
+
toolCalls?: {
|
|
192
|
+
function: {
|
|
193
|
+
name: string;
|
|
194
|
+
arguments: string;
|
|
195
|
+
};
|
|
196
|
+
type: "function";
|
|
197
|
+
id: string;
|
|
198
|
+
}[];
|
|
199
|
+
} | {
|
|
200
|
+
id: string;
|
|
201
|
+
role: "user";
|
|
202
|
+
content: string;
|
|
203
|
+
name?: string;
|
|
204
|
+
} | {
|
|
205
|
+
id: string;
|
|
206
|
+
role: "tool";
|
|
207
|
+
content: string;
|
|
208
|
+
toolCallId: string;
|
|
209
|
+
error?: string;
|
|
210
|
+
})[];
|
|
211
|
+
messageView: Type<any> | TemplateRef<any>;
|
|
212
|
+
messageViewClass: string;
|
|
213
|
+
}>;
|
|
214
|
+
protected inputContainerContext: import("@angular/core").Signal<{
|
|
215
|
+
input: Type<any> | TemplateRef<any>;
|
|
216
|
+
disclaimer: Type<any> | TemplateRef<any>;
|
|
217
|
+
disclaimerText: string;
|
|
218
|
+
disclaimerClass: string;
|
|
219
|
+
inputContainerClass: string;
|
|
220
|
+
}>;
|
|
221
|
+
protected layoutContext: import("@angular/core").Signal<{
|
|
222
|
+
messageView: Type<any> | TemplateRef<any>;
|
|
223
|
+
input: Type<any> | TemplateRef<any>;
|
|
224
|
+
scrollView: Type<any> | TemplateRef<any>;
|
|
225
|
+
scrollToBottomButton: Type<any> | TemplateRef<any>;
|
|
226
|
+
feather: Type<any> | TemplateRef<any>;
|
|
227
|
+
inputContainer: Type<any> | TemplateRef<any>;
|
|
228
|
+
disclaimer: Type<any> | TemplateRef<any>;
|
|
229
|
+
}>;
|
|
230
|
+
private destroy$;
|
|
231
|
+
private resizeTimeoutRef?;
|
|
232
|
+
constructor(resizeObserverService: ResizeObserverService, cdr: ChangeDetectorRef, handlers: CopilotChatViewHandlers);
|
|
233
|
+
ngOnInit(): void;
|
|
234
|
+
ngOnChanges(): void;
|
|
235
|
+
ngAfterViewInit(): void;
|
|
236
|
+
ngOnDestroy(): void;
|
|
237
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CopilotChatView, never>;
|
|
238
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CopilotChatView, "copilot-chat-view", never, { "messages": { "alias": "messages"; "required": false; "isSignal": true; }; "autoScroll": { "alias": "autoScroll"; "required": false; "isSignal": true; }; "showCursor": { "alias": "showCursor"; "required": false; "isSignal": true; }; "messageViewComponent": { "alias": "messageViewComponent"; "required": false; "isSignal": true; }; "messageViewTemplate": { "alias": "messageViewTemplate"; "required": false; "isSignal": true; }; "messageViewClass": { "alias": "messageViewClass"; "required": false; "isSignal": true; }; "scrollViewComponent": { "alias": "scrollViewComponent"; "required": false; "isSignal": true; }; "scrollViewTemplate": { "alias": "scrollViewTemplate"; "required": false; "isSignal": true; }; "scrollViewClass": { "alias": "scrollViewClass"; "required": false; "isSignal": true; }; "scrollToBottomButtonComponent": { "alias": "scrollToBottomButtonComponent"; "required": false; "isSignal": true; }; "scrollToBottomButtonTemplate": { "alias": "scrollToBottomButtonTemplate"; "required": false; "isSignal": true; }; "scrollToBottomButtonClass": { "alias": "scrollToBottomButtonClass"; "required": false; "isSignal": true; }; "inputComponent": { "alias": "inputComponent"; "required": false; "isSignal": true; }; "inputTemplate": { "alias": "inputTemplate"; "required": false; "isSignal": true; }; "inputContainerComponent": { "alias": "inputContainerComponent"; "required": false; "isSignal": true; }; "inputContainerTemplate": { "alias": "inputContainerTemplate"; "required": false; "isSignal": true; }; "inputContainerClass": { "alias": "inputContainerClass"; "required": false; "isSignal": true; }; "featherComponent": { "alias": "featherComponent"; "required": false; "isSignal": true; }; "featherTemplate": { "alias": "featherTemplate"; "required": false; "isSignal": true; }; "featherClass": { "alias": "featherClass"; "required": false; "isSignal": true; }; "disclaimerComponent": { "alias": "disclaimerComponent"; "required": false; "isSignal": true; }; "disclaimerTemplate": { "alias": "disclaimerTemplate"; "required": false; "isSignal": true; }; "disclaimerClass": { "alias": "disclaimerClass"; "required": false; "isSignal": true; }; "disclaimerText": { "alias": "disclaimerText"; "required": false; "isSignal": true; }; }, { "assistantMessageThumbsUp": "assistantMessageThumbsUp"; "assistantMessageThumbsDown": "assistantMessageThumbsDown"; "assistantMessageReadAloud": "assistantMessageReadAloud"; "assistantMessageRegenerate": "assistantMessageRegenerate"; "userMessageCopy": "userMessageCopy"; "userMessageEdit": "userMessageEdit"; }, ["customLayoutTemplate", "sendButtonTemplate", "toolbarTemplate", "textAreaTemplate", "audioRecorderTemplate", "assistantMessageMarkdownRendererTemplate", "thumbsUpButtonTemplate", "thumbsDownButtonTemplate", "readAloudButtonTemplate", "regenerateButtonTemplate"], never, true, never>;
|
|
239
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { ChangeDetectorRef, Injector, Type } from "@angular/core";
|
|
2
|
+
import { ChatState } from "../../chat-state";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* CopilotChat component - Angular equivalent of React's <CopilotChat>
|
|
6
|
+
* Provides a complete chat interface that wires an agent to the chat view
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```html
|
|
10
|
+
* <copilot-chat [agentId]="'default'" [threadId]="'abc123'"></copilot-chat>
|
|
11
|
+
* ```
|
|
12
|
+
*/
|
|
13
|
+
export declare class CopilotChat implements ChatState {
|
|
14
|
+
readonly inputValue: import("@angular/core").WritableSignal<string>;
|
|
15
|
+
readonly agentId: import("@angular/core").InputSignal<string>;
|
|
16
|
+
readonly threadId: import("@angular/core").InputSignal<string>;
|
|
17
|
+
readonly inputComponent: import("@angular/core").InputSignal<Type<any>>;
|
|
18
|
+
private readonly resolvedAgentId;
|
|
19
|
+
readonly agentStore: import("@angular/core").Signal<import("../../agent").AgentStore>;
|
|
20
|
+
readonly cdr: ChangeDetectorRef;
|
|
21
|
+
readonly injector: Injector;
|
|
22
|
+
protected messages: import("@angular/core").Signal<({
|
|
23
|
+
id: string;
|
|
24
|
+
role: "developer";
|
|
25
|
+
content: string;
|
|
26
|
+
name?: string;
|
|
27
|
+
} | {
|
|
28
|
+
id: string;
|
|
29
|
+
role: "system";
|
|
30
|
+
content: string;
|
|
31
|
+
name?: string;
|
|
32
|
+
} | {
|
|
33
|
+
id: string;
|
|
34
|
+
role: "assistant";
|
|
35
|
+
name?: string;
|
|
36
|
+
content?: string;
|
|
37
|
+
toolCalls?: {
|
|
38
|
+
function: {
|
|
39
|
+
name: string;
|
|
40
|
+
arguments: string;
|
|
41
|
+
};
|
|
42
|
+
type: "function";
|
|
43
|
+
id: string;
|
|
44
|
+
}[];
|
|
45
|
+
} | {
|
|
46
|
+
id: string;
|
|
47
|
+
role: "user";
|
|
48
|
+
content: string;
|
|
49
|
+
name?: string;
|
|
50
|
+
} | {
|
|
51
|
+
id: string;
|
|
52
|
+
role: "tool";
|
|
53
|
+
content: string;
|
|
54
|
+
toolCallId: string;
|
|
55
|
+
error?: string;
|
|
56
|
+
})[]>;
|
|
57
|
+
protected isRunning: import("@angular/core").Signal<boolean>;
|
|
58
|
+
protected showCursor: import("@angular/core").WritableSignal<boolean>;
|
|
59
|
+
private generatedThreadId;
|
|
60
|
+
private hasConnectedOnce;
|
|
61
|
+
constructor();
|
|
62
|
+
private connectToAgent;
|
|
63
|
+
submitInput(value: string): Promise<void>;
|
|
64
|
+
changeInput(value: string): void;
|
|
65
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CopilotChat, never>;
|
|
66
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CopilotChat, "copilot-chat", never, { "agentId": { "alias": "agentId"; "required": false; "isSignal": true; }; "threadId": { "alias": "threadId"; "required": false; "isSignal": true; }; "inputComponent": { "alias": "inputComponent"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
67
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { InjectionToken, Provider } from "@angular/core";
|
|
2
|
+
import { AbstractAgent } from "@ag-ui/client";
|
|
3
|
+
import { ClientTool, FrontendToolConfig, HumanInTheLoopConfig, RenderToolCallConfig } from "./tools";
|
|
4
|
+
export interface CopilotKitConfig {
|
|
5
|
+
runtimeUrl?: string;
|
|
6
|
+
headers?: Record<string, string>;
|
|
7
|
+
properties?: Record<string, unknown>;
|
|
8
|
+
agents?: Record<string, AbstractAgent>;
|
|
9
|
+
tools?: ClientTool[];
|
|
10
|
+
renderToolCalls?: RenderToolCallConfig[];
|
|
11
|
+
frontendTools?: FrontendToolConfig[];
|
|
12
|
+
humanInTheLoop?: HumanInTheLoopConfig[];
|
|
13
|
+
}
|
|
14
|
+
export declare const COPILOT_KIT_CONFIG: InjectionToken<CopilotKitConfig>;
|
|
15
|
+
export declare function injectCopilotKitConfig(): CopilotKitConfig;
|
|
16
|
+
export declare function provideCopilotKit(config: CopilotKitConfig): Provider;
|