@copilotkitnext/angular 0.0.0-max-changeset-20260109174803
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/LICENSE +10 -0
- package/README.md +530 -0
- package/dist/LICENSE +10 -0
- package/dist/README.md +530 -0
- package/dist/esm2022/copilotkitnext-angular.mjs +5 -0
- package/dist/esm2022/index.mjs +2 -0
- package/dist/esm2022/lib/agent-context.mjs +25 -0
- 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/lib/components/chat/copilot-chat-assistant-message.mjs +415 -0
- 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 +98 -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 +308 -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 +115 -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 +138 -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 +6 -0
- package/dist/esm2022/lib/slots/slot.utils.mjs +235 -0
- package/dist/esm2022/lib/tools.mjs +31 -0
- package/dist/esm2022/lib/utils.mjs +10 -0
- package/dist/esm2022/public-api.mjs +48 -0
- package/dist/fesm2022/copilotkitnext-angular.mjs +6310 -0
- package/dist/fesm2022/copilotkitnext-angular.mjs.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/lib/agent-context.d.ts +12 -0
- package/dist/lib/agent.d.ts +68 -0
- package/dist/lib/chat-config.d.ts +23 -0
- 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 +208 -0
- package/dist/lib/components/chat/copilot-chat-assistant-message.types.d.ts +31 -0
- package/dist/lib/components/chat/copilot-chat-audio-recorder.d.ts +40 -0
- 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/lib/components/chat/copilot-chat-input.types.d.ts +129 -0
- package/dist/lib/components/chat/copilot-chat-message-view-cursor.d.ts +11 -0
- package/dist/lib/components/chat/copilot-chat-message-view.d.ts +430 -0
- package/dist/lib/components/chat/copilot-chat-message-view.types.d.ts +24 -0
- package/dist/lib/components/chat/copilot-chat-textarea.d.ts +41 -0
- package/dist/lib/components/chat/copilot-chat-tool-calls-view.d.ts +70 -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 +35 -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 +71 -0
- package/dist/lib/components/chat/copilot-chat-user-message.types.d.ts +27 -0
- package/dist/lib/components/chat/copilot-chat-view-disclaimer.d.ts +15 -0
- package/dist/lib/components/chat/copilot-chat-view-feather.d.ts +15 -0
- package/dist/lib/components/chat/copilot-chat-view-handlers.d.ts +11 -0
- 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 +129 -0
- package/dist/lib/components/chat/copilot-chat-view.d.ts +284 -0
- package/dist/lib/components/chat/copilot-chat-view.types.d.ts +42 -0
- package/dist/lib/components/chat/copilot-chat.d.ts +82 -0
- package/dist/lib/config.d.ts +16 -0
- package/dist/lib/copilotkit.d.ts +29 -0
- package/dist/lib/directives/copilotkit-agent-context.d.ts +68 -0
- 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 +90 -0
- package/dist/lib/resize-observer.d.ts +44 -0
- package/dist/lib/scroll-position.d.ts +50 -0
- 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 +55 -0
- package/dist/lib/slots/slot.utils.d.ts +110 -0
- package/dist/lib/tools.d.ts +65 -0
- package/dist/lib/utils.d.ts +6 -0
- package/dist/public-api.d.ts +47 -0
- package/dist/styles.css +1882 -0
- package/eslint.config.mjs +20 -0
- package/package.json +101 -0
- package/tsconfig.json +33 -0
- package/vitest.config.mts +45 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class CopilotChatUserMessageRenderer {
|
|
3
|
+
readonly content: import("@angular/core").InputSignal<string>;
|
|
4
|
+
readonly inputClass: import("@angular/core").InputSignal<string>;
|
|
5
|
+
readonly computedClass: import("@angular/core").Signal<string>;
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CopilotChatUserMessageRenderer, never>;
|
|
7
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CopilotChatUserMessageRenderer, "copilot-chat-user-message-renderer", never, { "content": { "alias": "content"; "required": false; "isSignal": true; }; "inputClass": { "alias": "inputClass"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class CopilotChatUserMessageToolbar {
|
|
3
|
+
readonly inputClass: import("@angular/core").InputSignal<string>;
|
|
4
|
+
readonly computedClass: import("@angular/core").Signal<string>;
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CopilotChatUserMessageToolbar, never>;
|
|
6
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CopilotChatUserMessageToolbar, "div[copilotChatUserMessageToolbar]", never, { "inputClass": { "alias": "inputClass"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { TemplateRef, Type } from "@angular/core";
|
|
2
|
+
import { 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<{
|
|
25
|
+
id: string;
|
|
26
|
+
role: "user";
|
|
27
|
+
content: string | ({
|
|
28
|
+
type: "text";
|
|
29
|
+
text: string;
|
|
30
|
+
} | {
|
|
31
|
+
type: "binary";
|
|
32
|
+
mimeType: string;
|
|
33
|
+
id?: string;
|
|
34
|
+
url?: string;
|
|
35
|
+
data?: string;
|
|
36
|
+
filename?: string;
|
|
37
|
+
})[];
|
|
38
|
+
name?: string;
|
|
39
|
+
}>;
|
|
40
|
+
branchIndex: import("@angular/core").InputSignal<number>;
|
|
41
|
+
numberOfBranches: import("@angular/core").InputSignal<number>;
|
|
42
|
+
additionalToolbarItems: import("@angular/core").InputSignal<TemplateRef<any>>;
|
|
43
|
+
inputClass: import("@angular/core").InputSignal<string>;
|
|
44
|
+
editMessage: import("@angular/core").OutputEmitterRef<CopilotChatUserMessageOnEditMessageProps>;
|
|
45
|
+
switchToBranch: import("@angular/core").OutputEmitterRef<CopilotChatUserMessageOnSwitchToBranchProps>;
|
|
46
|
+
branchIndexValue: import("@angular/core").Signal<number>;
|
|
47
|
+
numberOfBranchesValue: import("@angular/core").Signal<number>;
|
|
48
|
+
CopilotChatUserMessageRenderer: typeof CopilotChatUserMessageRenderer;
|
|
49
|
+
CopilotChatUserMessageToolbar: typeof CopilotChatUserMessageToolbar;
|
|
50
|
+
CopilotChatUserMessageCopyButton: typeof CopilotChatUserMessageCopyButton;
|
|
51
|
+
CopilotChatUserMessageEditButton: typeof CopilotChatUserMessageEditButton;
|
|
52
|
+
CopilotChatUserMessageBranchNavigation: typeof CopilotChatUserMessageBranchNavigation;
|
|
53
|
+
showBranchNavigation: import("@angular/core").Signal<boolean>;
|
|
54
|
+
computedClass: import("@angular/core").Signal<string>;
|
|
55
|
+
flattenedContent: import("@angular/core").Signal<string>;
|
|
56
|
+
messageRendererContext: import("@angular/core").Signal<MessageRendererContext>;
|
|
57
|
+
copyButtonOutputs: {
|
|
58
|
+
clicked: () => void;
|
|
59
|
+
};
|
|
60
|
+
editButtonOutputs: {
|
|
61
|
+
clicked: () => void;
|
|
62
|
+
};
|
|
63
|
+
branchNavigationContext: import("@angular/core").Signal<BranchNavigationContext>;
|
|
64
|
+
toolbarContext: import("@angular/core").Signal<UserMessageToolbarContext>;
|
|
65
|
+
handleCopy(): void;
|
|
66
|
+
handleEdit(): void;
|
|
67
|
+
handleSwitchToBranch(props: CopilotChatUserMessageOnSwitchToBranchProps): void;
|
|
68
|
+
constructor();
|
|
69
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CopilotChatUserMessage, never>;
|
|
70
|
+
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>;
|
|
71
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { UserMessage } from "@ag-ui/core";
|
|
2
|
+
export interface CopilotChatUserMessageOnEditMessageProps {
|
|
3
|
+
message: UserMessage;
|
|
4
|
+
}
|
|
5
|
+
export interface CopilotChatUserMessageOnSwitchToBranchProps {
|
|
6
|
+
message: UserMessage;
|
|
7
|
+
branchIndex: number;
|
|
8
|
+
numberOfBranches: number;
|
|
9
|
+
}
|
|
10
|
+
export interface MessageRendererContext {
|
|
11
|
+
content: string;
|
|
12
|
+
}
|
|
13
|
+
export interface CopyButtonContext {
|
|
14
|
+
content?: string;
|
|
15
|
+
copied?: boolean;
|
|
16
|
+
}
|
|
17
|
+
export interface EditButtonContext {
|
|
18
|
+
}
|
|
19
|
+
export interface BranchNavigationContext {
|
|
20
|
+
currentBranch: number;
|
|
21
|
+
numberOfBranches: number;
|
|
22
|
+
onSwitchToBranch?: (props: CopilotChatUserMessageOnSwitchToBranchProps) => void;
|
|
23
|
+
message: UserMessage;
|
|
24
|
+
}
|
|
25
|
+
export interface UserMessageToolbarContext {
|
|
26
|
+
children?: any;
|
|
27
|
+
}
|
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
/**
|
|
3
|
+
* Feather component for CopilotChatView
|
|
4
|
+
* Creates a gradient overlay effect between messages and input
|
|
5
|
+
* Matches React implementation exactly with same Tailwind classes
|
|
6
|
+
*/
|
|
7
|
+
export declare class CopilotChatViewFeather {
|
|
8
|
+
inputClass: import("@angular/core").InputSignal<string>;
|
|
9
|
+
style: import("@angular/core").InputSignal<{
|
|
10
|
+
[key: string]: any;
|
|
11
|
+
}>;
|
|
12
|
+
get computedClass(): string;
|
|
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
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class CopilotChatViewHandlers {
|
|
3
|
+
hasAssistantThumbsUpHandler: import("@angular/core").WritableSignal<boolean>;
|
|
4
|
+
hasAssistantThumbsDownHandler: import("@angular/core").WritableSignal<boolean>;
|
|
5
|
+
hasAssistantReadAloudHandler: import("@angular/core").WritableSignal<boolean>;
|
|
6
|
+
hasAssistantRegenerateHandler: import("@angular/core").WritableSignal<boolean>;
|
|
7
|
+
hasUserCopyHandler: import("@angular/core").WritableSignal<boolean>;
|
|
8
|
+
hasUserEditHandler: import("@angular/core").WritableSignal<boolean>;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CopilotChatViewHandlers, never>;
|
|
10
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<CopilotChatViewHandlers>;
|
|
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,129 @@
|
|
|
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
|
+
type: "text";
|
|
45
|
+
text: string;
|
|
46
|
+
} | {
|
|
47
|
+
type: "binary";
|
|
48
|
+
mimeType: string;
|
|
49
|
+
id?: string;
|
|
50
|
+
url?: string;
|
|
51
|
+
data?: string;
|
|
52
|
+
filename?: string;
|
|
53
|
+
})[];
|
|
54
|
+
name?: string;
|
|
55
|
+
} | {
|
|
56
|
+
id: string;
|
|
57
|
+
role: "tool";
|
|
58
|
+
content: string;
|
|
59
|
+
toolCallId: string;
|
|
60
|
+
error?: string;
|
|
61
|
+
} | {
|
|
62
|
+
id: string;
|
|
63
|
+
role: "activity";
|
|
64
|
+
content: Record<string, any>;
|
|
65
|
+
activityType: string;
|
|
66
|
+
})[]>;
|
|
67
|
+
messageView: import("@angular/core").InputSignal<any>;
|
|
68
|
+
messageViewClass: import("@angular/core").InputSignal<string>;
|
|
69
|
+
showCursor: import("@angular/core").InputSignal<boolean>;
|
|
70
|
+
scrollToBottomButton: import("@angular/core").InputSignal<any>;
|
|
71
|
+
scrollToBottomButtonClass: import("@angular/core").InputSignal<string>;
|
|
72
|
+
assistantMessageThumbsUp: import("@angular/core").OutputEmitterRef<{
|
|
73
|
+
message: Message;
|
|
74
|
+
}>;
|
|
75
|
+
assistantMessageThumbsDown: import("@angular/core").OutputEmitterRef<{
|
|
76
|
+
message: Message;
|
|
77
|
+
}>;
|
|
78
|
+
assistantMessageReadAloud: import("@angular/core").OutputEmitterRef<{
|
|
79
|
+
message: Message;
|
|
80
|
+
}>;
|
|
81
|
+
assistantMessageRegenerate: import("@angular/core").OutputEmitterRef<{
|
|
82
|
+
message: Message;
|
|
83
|
+
}>;
|
|
84
|
+
userMessageCopy: import("@angular/core").OutputEmitterRef<{
|
|
85
|
+
message: Message;
|
|
86
|
+
}>;
|
|
87
|
+
userMessageEdit: import("@angular/core").OutputEmitterRef<{
|
|
88
|
+
message: Message;
|
|
89
|
+
}>;
|
|
90
|
+
scrollContainer?: ElementRef<HTMLElement>;
|
|
91
|
+
contentContainer?: ElementRef<HTMLElement>;
|
|
92
|
+
stickToBottomDirective?: StickToBottom;
|
|
93
|
+
protected readonly defaultMessageViewComponent: typeof CopilotChatMessageView;
|
|
94
|
+
protected readonly defaultScrollToBottomButtonComponent: typeof CopilotChatViewScrollToBottomButton;
|
|
95
|
+
protected hasMounted: import("@angular/core").WritableSignal<boolean>;
|
|
96
|
+
protected showScrollButton: import("@angular/core").WritableSignal<boolean>;
|
|
97
|
+
protected isAtBottom: import("@angular/core").WritableSignal<boolean>;
|
|
98
|
+
protected paddingBottom: import("@angular/core").Signal<number>;
|
|
99
|
+
protected computedClass: import("@angular/core").Signal<string>;
|
|
100
|
+
private destroy$;
|
|
101
|
+
private platformId;
|
|
102
|
+
private scrollPositionService;
|
|
103
|
+
ngOnInit(): void;
|
|
104
|
+
ngAfterViewInit(): void;
|
|
105
|
+
/**
|
|
106
|
+
* Handle isAtBottom change from StickToBottom directive
|
|
107
|
+
*/
|
|
108
|
+
onIsAtBottomChange(isAtBottom: boolean): void;
|
|
109
|
+
/**
|
|
110
|
+
* Scroll to bottom for manual mode
|
|
111
|
+
*/
|
|
112
|
+
scrollToBottom(): void;
|
|
113
|
+
/**
|
|
114
|
+
* Scroll to bottom for stick-to-bottom mode
|
|
115
|
+
*/
|
|
116
|
+
scrollToBottomFromStick(): void;
|
|
117
|
+
ngOnDestroy(): void;
|
|
118
|
+
scrollToBottomOutputs: {
|
|
119
|
+
clicked: () => void;
|
|
120
|
+
};
|
|
121
|
+
scrollToBottomFromStickOutputs: {
|
|
122
|
+
clicked: () => void;
|
|
123
|
+
};
|
|
124
|
+
messageViewContext(): any;
|
|
125
|
+
scrollToBottomContext(): any;
|
|
126
|
+
scrollToBottomFromStickContext(): any;
|
|
127
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CopilotChatViewScrollView, never>;
|
|
128
|
+
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>;
|
|
129
|
+
}
|
|
@@ -0,0 +1,284 @@
|
|
|
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
|
+
type: "text";
|
|
56
|
+
text: string;
|
|
57
|
+
} | {
|
|
58
|
+
type: "binary";
|
|
59
|
+
mimeType: string;
|
|
60
|
+
id?: string;
|
|
61
|
+
url?: string;
|
|
62
|
+
data?: string;
|
|
63
|
+
filename?: string;
|
|
64
|
+
})[];
|
|
65
|
+
name?: string;
|
|
66
|
+
} | {
|
|
67
|
+
id: string;
|
|
68
|
+
role: "tool";
|
|
69
|
+
content: string;
|
|
70
|
+
toolCallId: string;
|
|
71
|
+
error?: string;
|
|
72
|
+
} | {
|
|
73
|
+
id: string;
|
|
74
|
+
role: "activity";
|
|
75
|
+
content: Record<string, any>;
|
|
76
|
+
activityType: string;
|
|
77
|
+
})[]>;
|
|
78
|
+
autoScroll: import("@angular/core").InputSignal<boolean>;
|
|
79
|
+
showCursor: import("@angular/core").InputSignal<boolean>;
|
|
80
|
+
messageViewComponent: import("@angular/core").InputSignal<Type<any>>;
|
|
81
|
+
messageViewTemplate: import("@angular/core").InputSignal<TemplateRef<any>>;
|
|
82
|
+
messageViewClass: import("@angular/core").InputSignal<string>;
|
|
83
|
+
scrollViewComponent: import("@angular/core").InputSignal<Type<any>>;
|
|
84
|
+
scrollViewTemplate: import("@angular/core").InputSignal<TemplateRef<any>>;
|
|
85
|
+
scrollViewClass: import("@angular/core").InputSignal<string>;
|
|
86
|
+
scrollToBottomButtonComponent: import("@angular/core").InputSignal<Type<any>>;
|
|
87
|
+
scrollToBottomButtonTemplate: import("@angular/core").InputSignal<TemplateRef<any>>;
|
|
88
|
+
scrollToBottomButtonClass: import("@angular/core").InputSignal<string>;
|
|
89
|
+
inputComponent: import("@angular/core").InputSignal<Type<any>>;
|
|
90
|
+
inputTemplate: import("@angular/core").InputSignal<TemplateRef<any>>;
|
|
91
|
+
inputContainerComponent: import("@angular/core").InputSignal<Type<any>>;
|
|
92
|
+
inputContainerTemplate: import("@angular/core").InputSignal<TemplateRef<any>>;
|
|
93
|
+
inputContainerClass: import("@angular/core").InputSignal<string>;
|
|
94
|
+
featherComponent: import("@angular/core").InputSignal<Type<any>>;
|
|
95
|
+
featherTemplate: import("@angular/core").InputSignal<TemplateRef<any>>;
|
|
96
|
+
featherClass: import("@angular/core").InputSignal<string>;
|
|
97
|
+
disclaimerComponent: import("@angular/core").InputSignal<Type<any>>;
|
|
98
|
+
disclaimerTemplate: import("@angular/core").InputSignal<TemplateRef<any>>;
|
|
99
|
+
disclaimerClass: import("@angular/core").InputSignal<string>;
|
|
100
|
+
disclaimerText: import("@angular/core").InputSignal<string>;
|
|
101
|
+
customLayoutTemplate?: TemplateRef<any>;
|
|
102
|
+
sendButtonTemplate?: TemplateRef<any>;
|
|
103
|
+
toolbarTemplate?: TemplateRef<any>;
|
|
104
|
+
textAreaTemplate?: TemplateRef<any>;
|
|
105
|
+
audioRecorderTemplate?: TemplateRef<any>;
|
|
106
|
+
assistantMessageMarkdownRendererTemplate?: TemplateRef<any>;
|
|
107
|
+
thumbsUpButtonTemplate?: TemplateRef<any>;
|
|
108
|
+
thumbsDownButtonTemplate?: TemplateRef<any>;
|
|
109
|
+
readAloudButtonTemplate?: TemplateRef<any>;
|
|
110
|
+
regenerateButtonTemplate?: TemplateRef<any>;
|
|
111
|
+
assistantMessageThumbsUp: import("@angular/core").OutputEmitterRef<{
|
|
112
|
+
message: Message;
|
|
113
|
+
}>;
|
|
114
|
+
assistantMessageThumbsDown: import("@angular/core").OutputEmitterRef<{
|
|
115
|
+
message: Message;
|
|
116
|
+
}>;
|
|
117
|
+
assistantMessageReadAloud: import("@angular/core").OutputEmitterRef<{
|
|
118
|
+
message: Message;
|
|
119
|
+
}>;
|
|
120
|
+
assistantMessageRegenerate: import("@angular/core").OutputEmitterRef<{
|
|
121
|
+
message: Message;
|
|
122
|
+
}>;
|
|
123
|
+
userMessageCopy: import("@angular/core").OutputEmitterRef<{
|
|
124
|
+
message: Message;
|
|
125
|
+
}>;
|
|
126
|
+
userMessageEdit: import("@angular/core").OutputEmitterRef<{
|
|
127
|
+
message: Message;
|
|
128
|
+
}>;
|
|
129
|
+
inputContainerSlotRef?: ElementRef;
|
|
130
|
+
protected readonly defaultScrollViewComponent: typeof CopilotChatViewScrollView;
|
|
131
|
+
protected readonly defaultScrollToBottomButtonComponent: typeof CopilotChatViewScrollToBottomButton;
|
|
132
|
+
protected readonly defaultInputContainerComponent: typeof CopilotChatViewInputContainer;
|
|
133
|
+
protected readonly defaultFeatherComponent: typeof CopilotChatViewFeather;
|
|
134
|
+
protected readonly defaultDisclaimerComponent: typeof CopilotChatViewDisclaimer;
|
|
135
|
+
protected messagesValue: import("@angular/core").Signal<({
|
|
136
|
+
id: string;
|
|
137
|
+
role: "developer";
|
|
138
|
+
content: string;
|
|
139
|
+
name?: string;
|
|
140
|
+
} | {
|
|
141
|
+
id: string;
|
|
142
|
+
role: "system";
|
|
143
|
+
content: string;
|
|
144
|
+
name?: string;
|
|
145
|
+
} | {
|
|
146
|
+
id: string;
|
|
147
|
+
role: "assistant";
|
|
148
|
+
name?: string;
|
|
149
|
+
content?: string;
|
|
150
|
+
toolCalls?: {
|
|
151
|
+
function: {
|
|
152
|
+
name: string;
|
|
153
|
+
arguments: string;
|
|
154
|
+
};
|
|
155
|
+
type: "function";
|
|
156
|
+
id: string;
|
|
157
|
+
}[];
|
|
158
|
+
} | {
|
|
159
|
+
id: string;
|
|
160
|
+
role: "user";
|
|
161
|
+
content: string | ({
|
|
162
|
+
type: "text";
|
|
163
|
+
text: string;
|
|
164
|
+
} | {
|
|
165
|
+
type: "binary";
|
|
166
|
+
mimeType: string;
|
|
167
|
+
id?: string;
|
|
168
|
+
url?: string;
|
|
169
|
+
data?: string;
|
|
170
|
+
filename?: string;
|
|
171
|
+
})[];
|
|
172
|
+
name?: string;
|
|
173
|
+
} | {
|
|
174
|
+
id: string;
|
|
175
|
+
role: "tool";
|
|
176
|
+
content: string;
|
|
177
|
+
toolCallId: string;
|
|
178
|
+
error?: string;
|
|
179
|
+
} | {
|
|
180
|
+
id: string;
|
|
181
|
+
role: "activity";
|
|
182
|
+
content: Record<string, any>;
|
|
183
|
+
activityType: string;
|
|
184
|
+
})[]>;
|
|
185
|
+
protected autoScrollSignal: import("@angular/core").Signal<boolean>;
|
|
186
|
+
protected showCursorSignal: import("@angular/core").Signal<boolean>;
|
|
187
|
+
protected disclaimerTextSignal: import("@angular/core").Signal<string>;
|
|
188
|
+
protected disclaimerClassSignal: import("@angular/core").Signal<string>;
|
|
189
|
+
protected inputContainerHeight: import("@angular/core").WritableSignal<number>;
|
|
190
|
+
protected isResizing: import("@angular/core").WritableSignal<boolean>;
|
|
191
|
+
protected contentPaddingBottom: import("@angular/core").Signal<number>;
|
|
192
|
+
protected computedClass: import("@angular/core").Signal<string>;
|
|
193
|
+
protected messageViewSlot: import("@angular/core").Signal<Type<any> | TemplateRef<any>>;
|
|
194
|
+
protected scrollViewSlot: import("@angular/core").Signal<Type<any> | TemplateRef<any>>;
|
|
195
|
+
protected scrollToBottomButtonSlot: import("@angular/core").Signal<Type<any> | TemplateRef<any>>;
|
|
196
|
+
protected inputSlot: import("@angular/core").Signal<Type<any> | TemplateRef<any>>;
|
|
197
|
+
protected inputContainerSlot: import("@angular/core").Signal<Type<any> | TemplateRef<any>>;
|
|
198
|
+
protected featherSlot: import("@angular/core").Signal<Type<any> | TemplateRef<any>>;
|
|
199
|
+
protected disclaimerSlot: import("@angular/core").Signal<Type<any> | TemplateRef<any>>;
|
|
200
|
+
protected scrollViewContext: import("@angular/core").Signal<{
|
|
201
|
+
autoScroll: boolean;
|
|
202
|
+
scrollToBottomButton: Type<any> | TemplateRef<any>;
|
|
203
|
+
scrollToBottomButtonClass: string;
|
|
204
|
+
inputContainerHeight: number;
|
|
205
|
+
isResizing: boolean;
|
|
206
|
+
messages: ({
|
|
207
|
+
id: string;
|
|
208
|
+
role: "developer";
|
|
209
|
+
content: string;
|
|
210
|
+
name?: string;
|
|
211
|
+
} | {
|
|
212
|
+
id: string;
|
|
213
|
+
role: "system";
|
|
214
|
+
content: string;
|
|
215
|
+
name?: string;
|
|
216
|
+
} | {
|
|
217
|
+
id: string;
|
|
218
|
+
role: "assistant";
|
|
219
|
+
name?: string;
|
|
220
|
+
content?: string;
|
|
221
|
+
toolCalls?: {
|
|
222
|
+
function: {
|
|
223
|
+
name: string;
|
|
224
|
+
arguments: string;
|
|
225
|
+
};
|
|
226
|
+
type: "function";
|
|
227
|
+
id: string;
|
|
228
|
+
}[];
|
|
229
|
+
} | {
|
|
230
|
+
id: string;
|
|
231
|
+
role: "user";
|
|
232
|
+
content: string | ({
|
|
233
|
+
type: "text";
|
|
234
|
+
text: string;
|
|
235
|
+
} | {
|
|
236
|
+
type: "binary";
|
|
237
|
+
mimeType: string;
|
|
238
|
+
id?: string;
|
|
239
|
+
url?: string;
|
|
240
|
+
data?: string;
|
|
241
|
+
filename?: string;
|
|
242
|
+
})[];
|
|
243
|
+
name?: string;
|
|
244
|
+
} | {
|
|
245
|
+
id: string;
|
|
246
|
+
role: "tool";
|
|
247
|
+
content: string;
|
|
248
|
+
toolCallId: string;
|
|
249
|
+
error?: string;
|
|
250
|
+
} | {
|
|
251
|
+
id: string;
|
|
252
|
+
role: "activity";
|
|
253
|
+
content: Record<string, any>;
|
|
254
|
+
activityType: string;
|
|
255
|
+
})[];
|
|
256
|
+
messageView: Type<any> | TemplateRef<any>;
|
|
257
|
+
messageViewClass: string;
|
|
258
|
+
}>;
|
|
259
|
+
protected inputContainerContext: import("@angular/core").Signal<{
|
|
260
|
+
input: Type<any> | TemplateRef<any>;
|
|
261
|
+
disclaimer: Type<any> | TemplateRef<any>;
|
|
262
|
+
disclaimerText: string;
|
|
263
|
+
disclaimerClass: string;
|
|
264
|
+
inputContainerClass: string;
|
|
265
|
+
}>;
|
|
266
|
+
protected layoutContext: import("@angular/core").Signal<{
|
|
267
|
+
messageView: Type<any> | TemplateRef<any>;
|
|
268
|
+
input: Type<any> | TemplateRef<any>;
|
|
269
|
+
scrollView: Type<any> | TemplateRef<any>;
|
|
270
|
+
scrollToBottomButton: Type<any> | TemplateRef<any>;
|
|
271
|
+
feather: Type<any> | TemplateRef<any>;
|
|
272
|
+
inputContainer: Type<any> | TemplateRef<any>;
|
|
273
|
+
disclaimer: Type<any> | TemplateRef<any>;
|
|
274
|
+
}>;
|
|
275
|
+
private destroy$;
|
|
276
|
+
private resizeTimeoutRef?;
|
|
277
|
+
constructor(resizeObserverService: ResizeObserverService, cdr: ChangeDetectorRef, handlers: CopilotChatViewHandlers);
|
|
278
|
+
ngOnInit(): void;
|
|
279
|
+
ngOnChanges(): void;
|
|
280
|
+
ngAfterViewInit(): void;
|
|
281
|
+
ngOnDestroy(): void;
|
|
282
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CopilotChatView, never>;
|
|
283
|
+
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>;
|
|
284
|
+
}
|