@copilotkitnext/angular 0.0.1
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/.turbo/turbo-build.log +39 -0
- package/.turbo/turbo-check-types.log +0 -0
- package/.turbo/turbo-test.log +71 -0
- package/LICENSE +10 -0
- package/README-agent-context.md +310 -0
- package/dist/LICENSE +10 -0
- package/dist/components/chat/copilot-chat-assistant-message-buttons.component.d.ts +75 -0
- package/dist/components/chat/copilot-chat-assistant-message-renderer.component.d.ts +31 -0
- package/dist/components/chat/copilot-chat-assistant-message-toolbar.component.d.ts +8 -0
- package/dist/components/chat/copilot-chat-assistant-message.component.d.ts +131 -0
- package/dist/components/chat/copilot-chat-assistant-message.types.d.ts +31 -0
- package/dist/components/chat/copilot-chat-audio-recorder.component.d.ts +40 -0
- package/dist/components/chat/copilot-chat-buttons.component.d.ts +66 -0
- package/dist/components/chat/copilot-chat-input-defaults.d.ts +37 -0
- package/dist/components/chat/copilot-chat-input.component.d.ts +133 -0
- package/dist/components/chat/copilot-chat-input.types.d.ts +129 -0
- package/dist/components/chat/copilot-chat-message-view-cursor.component.d.ts +15 -0
- package/dist/components/chat/copilot-chat-message-view.component.d.ts +293 -0
- package/dist/components/chat/copilot-chat-message-view.types.d.ts +24 -0
- package/dist/components/chat/copilot-chat-textarea.component.d.ts +45 -0
- package/dist/components/chat/copilot-chat-tool-calls-view.component.d.ts +35 -0
- package/dist/components/chat/copilot-chat-toolbar.component.d.ts +8 -0
- package/dist/components/chat/copilot-chat-tools-menu.component.d.ts +20 -0
- package/dist/components/chat/copilot-chat-user-message-branch-navigation.component.d.ts +23 -0
- package/dist/components/chat/copilot-chat-user-message-buttons.component.d.ts +39 -0
- package/dist/components/chat/copilot-chat-user-message-renderer.component.d.ts +9 -0
- package/dist/components/chat/copilot-chat-user-message-toolbar.component.d.ts +8 -0
- package/dist/components/chat/copilot-chat-user-message.component.d.ts +55 -0
- package/dist/components/chat/copilot-chat-user-message.types.d.ts +33 -0
- package/dist/components/chat/copilot-chat-view-disclaimer.component.d.ts +15 -0
- package/dist/components/chat/copilot-chat-view-feather.component.d.ts +15 -0
- package/dist/components/chat/copilot-chat-view-handlers.service.d.ts +11 -0
- package/dist/components/chat/copilot-chat-view-input-container.component.d.ts +23 -0
- package/dist/components/chat/copilot-chat-view-scroll-to-bottom-button.component.d.ts +17 -0
- package/dist/components/chat/copilot-chat-view-scroll-view.component.d.ts +84 -0
- package/dist/components/chat/copilot-chat-view.component.d.ts +205 -0
- package/dist/components/chat/copilot-chat-view.types.d.ts +42 -0
- package/dist/components/chat/copilot-chat.component.d.ts +37 -0
- package/dist/components/copilotkit-tool-render.component.d.ts +25 -0
- package/dist/core/chat-configuration/chat-configuration.providers.d.ts +54 -0
- package/dist/core/chat-configuration/chat-configuration.service.d.ts +75 -0
- package/dist/core/chat-configuration/chat-configuration.types.d.ts +27 -0
- package/dist/core/copilotkit.providers.d.ts +13 -0
- package/dist/core/copilotkit.service.d.ts +119 -0
- package/dist/core/copilotkit.types.d.ts +83 -0
- package/dist/directives/copilotkit-agent-context.directive.d.ts +68 -0
- package/dist/directives/copilotkit-agent.directive.d.ts +106 -0
- package/dist/directives/copilotkit-chat-config.directive.d.ts +84 -0
- package/dist/directives/copilotkit-config.directive.d.ts +44 -0
- package/dist/directives/copilotkit-frontend-tool.directive.d.ts +25 -0
- package/dist/directives/copilotkit-human-in-the-loop.directive.d.ts +124 -0
- package/dist/directives/stick-to-bottom.directive.d.ts +62 -0
- package/dist/fesm2022/copilotkitnext-angular.mjs +9314 -0
- package/dist/fesm2022/copilotkitnext-angular.mjs.map +1 -0
- package/dist/index.d.ts +55 -0
- package/dist/lib/directives/tooltip.directive.d.ts +33 -0
- package/dist/lib/slots/copilot-slot.component.d.ts +34 -0
- package/dist/lib/slots/slot.types.d.ts +55 -0
- package/dist/lib/slots/slot.utils.d.ts +108 -0
- package/dist/lib/utils.d.ts +6 -0
- package/dist/services/resize-observer.service.d.ts +44 -0
- package/dist/services/scroll-position.service.d.ts +50 -0
- package/dist/styles.css +1963 -0
- package/dist/types/frontend-tool.d.ts +37 -0
- package/dist/types/human-in-the-loop.d.ts +44 -0
- package/dist/utils/agent-context.utils.d.ts +75 -0
- package/dist/utils/agent.utils.d.ts +99 -0
- package/dist/utils/chat-config.utils.d.ts +166 -0
- package/dist/utils/copilotkit.utils.d.ts +16 -0
- package/dist/utils/frontend-tool.utils.d.ts +119 -0
- package/dist/utils/human-in-the-loop.utils.d.ts +92 -0
- package/eslint.config.mjs +20 -0
- package/ng-package.json +19 -0
- package/package.json +96 -0
- package/slots.md +331 -0
- package/src/components/chat/__tests__/copilot-chat-assistant-message.component.spec.ts +282 -0
- package/src/components/chat/__tests__/copilot-chat-input.component.spec.ts +419 -0
- package/src/components/chat/__tests__/copilot-chat-message-view.component.spec.ts +372 -0
- package/src/components/chat/__tests__/copilot-chat-user-message.component.spec.ts +249 -0
- package/src/components/chat/copilot-chat-assistant-message-buttons.component.ts +292 -0
- package/src/components/chat/copilot-chat-assistant-message-renderer.component.ts +472 -0
- package/src/components/chat/copilot-chat-assistant-message-toolbar.component.ts +29 -0
- package/src/components/chat/copilot-chat-assistant-message.component.ts +463 -0
- package/src/components/chat/copilot-chat-assistant-message.types.ts +50 -0
- package/src/components/chat/copilot-chat-audio-recorder.component.ts +241 -0
- package/src/components/chat/copilot-chat-buttons.component.ts +308 -0
- package/src/components/chat/copilot-chat-buttons.component.ts.bak +471 -0
- package/src/components/chat/copilot-chat-input-defaults.ts +47 -0
- package/src/components/chat/copilot-chat-input.component.ts +512 -0
- package/src/components/chat/copilot-chat-input.types.ts +148 -0
- package/src/components/chat/copilot-chat-message-view-cursor.component.ts +51 -0
- package/src/components/chat/copilot-chat-message-view.component.ts +233 -0
- package/src/components/chat/copilot-chat-message-view.types.ts +39 -0
- package/src/components/chat/copilot-chat-textarea.component.ts +220 -0
- package/src/components/chat/copilot-chat-tool-calls-view.component.ts +261 -0
- package/src/components/chat/copilot-chat-toolbar.component.ts +35 -0
- package/src/components/chat/copilot-chat-tools-menu.component.ts +185 -0
- package/src/components/chat/copilot-chat-user-message-branch-navigation.component.ts +121 -0
- package/src/components/chat/copilot-chat-user-message-buttons.component.ts +170 -0
- package/src/components/chat/copilot-chat-user-message-renderer.component.ts +37 -0
- package/src/components/chat/copilot-chat-user-message-toolbar.component.ts +37 -0
- package/src/components/chat/copilot-chat-user-message.component.ts +247 -0
- package/src/components/chat/copilot-chat-user-message.types.ts +42 -0
- package/src/components/chat/copilot-chat-view-disclaimer.component.ts +51 -0
- package/src/components/chat/copilot-chat-view-feather.component.ts +47 -0
- package/src/components/chat/copilot-chat-view-handlers.service.ts +14 -0
- package/src/components/chat/copilot-chat-view-input-container.component.ts +87 -0
- package/src/components/chat/copilot-chat-view-scroll-to-bottom-button.component.ts +79 -0
- package/src/components/chat/copilot-chat-view-scroll-view.component.ts +322 -0
- package/src/components/chat/copilot-chat-view.component.ts +420 -0
- package/src/components/chat/copilot-chat-view.types.ts +52 -0
- package/src/components/chat/copilot-chat.component.ts +232 -0
- package/src/components/copilotkit-tool-render.component.ts +169 -0
- package/src/core/__tests__/copilotkit.service.spec.ts +1051 -0
- package/src/core/__tests__/copilotkit.service.wildcard.spec.ts +316 -0
- package/src/core/chat-configuration/__tests__/chat-configuration.service.spec.ts +287 -0
- package/src/core/chat-configuration/chat-configuration.providers.ts +71 -0
- package/src/core/chat-configuration/chat-configuration.service.ts +162 -0
- package/src/core/chat-configuration/chat-configuration.types.ts +57 -0
- package/src/core/copilotkit.providers.ts +59 -0
- package/src/core/copilotkit.service.ts +542 -0
- package/src/core/copilotkit.types.ts +132 -0
- package/src/directives/__tests__/copilotkit-agent-context.directive.spec.ts +384 -0
- package/src/directives/__tests__/copilotkit-agent.directive.spec.ts +253 -0
- package/src/directives/__tests__/copilotkit-chat-config.directive.spec.ts +385 -0
- package/src/directives/__tests__/copilotkit-config.directive.spec.ts +69 -0
- package/src/directives/__tests__/copilotkit-frontend-tool-simple.directive.spec.ts +60 -0
- package/src/directives/__tests__/copilotkit-frontend-tool.directive.spec.ts +108 -0
- package/src/directives/__tests__/copilotkit-human-in-the-loop.directive.spec.ts +452 -0
- package/src/directives/copilotkit-agent-context.directive.ts +138 -0
- package/src/directives/copilotkit-agent.directive.ts +225 -0
- package/src/directives/copilotkit-chat-config.directive.ts +241 -0
- package/src/directives/copilotkit-config.directive.ts +81 -0
- package/src/directives/copilotkit-frontend-tool.directive.ts +145 -0
- package/src/directives/copilotkit-human-in-the-loop.directive.ts +281 -0
- package/src/directives/stick-to-bottom.directive.ts +204 -0
- package/src/index.ts +105 -0
- package/src/lib/directives/tooltip.directive.ts +292 -0
- package/src/lib/slots/__tests__/slot.utils.spec.ts +377 -0
- package/src/lib/slots/copilot-slot.component.ts +135 -0
- package/src/lib/slots/index.ts +3 -0
- package/src/lib/slots/slot.types.ts +64 -0
- package/src/lib/slots/slot.utils.ts +289 -0
- package/src/lib/utils.ts +10 -0
- package/src/public-api.ts +1 -0
- package/src/services/resize-observer.service.ts +181 -0
- package/src/services/scroll-position.service.ts +169 -0
- package/src/styles/globals.css +266 -0
- package/src/styles/index.css +3 -0
- package/src/test-setup.ts +15 -0
- package/src/testing/index.ts +3 -0
- package/src/testing/testing.utils.ts +248 -0
- package/src/types/frontend-tool.ts +44 -0
- package/src/types/human-in-the-loop.ts +52 -0
- package/src/utils/__tests__/agent.utils.spec.ts +234 -0
- package/src/utils/__tests__/chat-config.utils.spec.ts +306 -0
- package/src/utils/__tests__/frontend-tool-inject.spec.ts +350 -0
- package/src/utils/__tests__/frontend-tool-integration.spec.ts +199 -0
- package/src/utils/__tests__/frontend-tool.utils.spec.ts +272 -0
- package/src/utils/__tests__/human-in-the-loop.utils.spec.ts +365 -0
- package/src/utils/agent-context.utils.ts +133 -0
- package/src/utils/agent.utils.ts +239 -0
- package/src/utils/chat-config.utils.ts +221 -0
- package/src/utils/copilotkit.utils.ts +20 -0
- package/src/utils/frontend-tool.utils.ts +266 -0
- package/src/utils/human-in-the-loop.utils.ts +359 -0
- package/tsconfig.json +33 -0
- package/tsconfig.spec.json +12 -0
- package/vitest.config.mts +34 -0
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
import { EventEmitter, TemplateRef, Type, OnInit, OnChanges } from '@angular/core';
|
|
2
|
+
import type { Message } from '@ag-ui/core';
|
|
3
|
+
import { CopilotChatAssistantMessageComponent } from './copilot-chat-assistant-message.component';
|
|
4
|
+
import { CopilotChatUserMessageComponent } from './copilot-chat-user-message.component';
|
|
5
|
+
import { CopilotChatMessageViewCursorComponent } from './copilot-chat-message-view-cursor.component';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
/**
|
|
8
|
+
* CopilotChatMessageView component - Angular port of the React component.
|
|
9
|
+
* Renders a list of chat messages with support for custom slots and layouts.
|
|
10
|
+
* DOM structure and Tailwind classes match the React implementation exactly.
|
|
11
|
+
*/
|
|
12
|
+
export declare class CopilotChatMessageViewComponent implements OnInit, OnChanges {
|
|
13
|
+
messages: Message[];
|
|
14
|
+
showCursor: boolean;
|
|
15
|
+
isLoading: boolean;
|
|
16
|
+
inputClass?: string;
|
|
17
|
+
assistantMessageComponent?: Type<any>;
|
|
18
|
+
assistantMessageTemplate?: TemplateRef<any>;
|
|
19
|
+
assistantMessageClass?: string;
|
|
20
|
+
userMessageComponent?: Type<any>;
|
|
21
|
+
userMessageTemplate?: TemplateRef<any>;
|
|
22
|
+
userMessageClass?: string;
|
|
23
|
+
cursorComponent?: Type<any>;
|
|
24
|
+
cursorTemplate?: TemplateRef<any>;
|
|
25
|
+
cursorClass?: string;
|
|
26
|
+
customLayoutTemplate?: TemplateRef<any>;
|
|
27
|
+
assistantMessageThumbsUp: EventEmitter<{
|
|
28
|
+
message: Message;
|
|
29
|
+
}>;
|
|
30
|
+
assistantMessageThumbsDown: EventEmitter<{
|
|
31
|
+
message: Message;
|
|
32
|
+
}>;
|
|
33
|
+
assistantMessageReadAloud: EventEmitter<{
|
|
34
|
+
message: Message;
|
|
35
|
+
}>;
|
|
36
|
+
assistantMessageRegenerate: EventEmitter<{
|
|
37
|
+
message: Message;
|
|
38
|
+
}>;
|
|
39
|
+
userMessageCopy: EventEmitter<{
|
|
40
|
+
message: Message;
|
|
41
|
+
}>;
|
|
42
|
+
userMessageEdit: EventEmitter<{
|
|
43
|
+
message: Message;
|
|
44
|
+
}>;
|
|
45
|
+
protected readonly defaultAssistantComponent: typeof CopilotChatAssistantMessageComponent;
|
|
46
|
+
protected readonly defaultUserComponent: typeof CopilotChatUserMessageComponent;
|
|
47
|
+
protected readonly defaultCursorComponent: typeof CopilotChatMessageViewCursorComponent;
|
|
48
|
+
protected messagesSignal: import("@angular/core").WritableSignal<({
|
|
49
|
+
id: string;
|
|
50
|
+
role: "developer";
|
|
51
|
+
content: string;
|
|
52
|
+
name?: string | undefined;
|
|
53
|
+
} | {
|
|
54
|
+
id: string;
|
|
55
|
+
role: "system";
|
|
56
|
+
content: string;
|
|
57
|
+
name?: string | undefined;
|
|
58
|
+
} | {
|
|
59
|
+
id: string;
|
|
60
|
+
role: "assistant";
|
|
61
|
+
name?: string | undefined;
|
|
62
|
+
content?: string | undefined;
|
|
63
|
+
toolCalls?: {
|
|
64
|
+
function: {
|
|
65
|
+
name: string;
|
|
66
|
+
arguments: string;
|
|
67
|
+
};
|
|
68
|
+
type: "function";
|
|
69
|
+
id: string;
|
|
70
|
+
}[] | undefined;
|
|
71
|
+
} | {
|
|
72
|
+
id: string;
|
|
73
|
+
role: "user";
|
|
74
|
+
content: string;
|
|
75
|
+
name?: string | undefined;
|
|
76
|
+
} | {
|
|
77
|
+
id: string;
|
|
78
|
+
role: "tool";
|
|
79
|
+
content: string;
|
|
80
|
+
toolCallId: string;
|
|
81
|
+
error?: string | undefined;
|
|
82
|
+
})[]>;
|
|
83
|
+
protected showCursorSignal: import("@angular/core").WritableSignal<boolean>;
|
|
84
|
+
protected isLoadingSignal: import("@angular/core").WritableSignal<boolean>;
|
|
85
|
+
protected inputClassSignal: import("@angular/core").WritableSignal<string>;
|
|
86
|
+
computedClass: import("@angular/core").Signal<string>;
|
|
87
|
+
layoutContext: import("@angular/core").Signal<{
|
|
88
|
+
isLoading: boolean;
|
|
89
|
+
messages: ({
|
|
90
|
+
id: string;
|
|
91
|
+
role: "developer";
|
|
92
|
+
content: string;
|
|
93
|
+
name?: string | undefined;
|
|
94
|
+
} | {
|
|
95
|
+
id: string;
|
|
96
|
+
role: "system";
|
|
97
|
+
content: string;
|
|
98
|
+
name?: string | undefined;
|
|
99
|
+
} | {
|
|
100
|
+
id: string;
|
|
101
|
+
role: "assistant";
|
|
102
|
+
name?: string | undefined;
|
|
103
|
+
content?: string | undefined;
|
|
104
|
+
toolCalls?: {
|
|
105
|
+
function: {
|
|
106
|
+
name: string;
|
|
107
|
+
arguments: string;
|
|
108
|
+
};
|
|
109
|
+
type: "function";
|
|
110
|
+
id: string;
|
|
111
|
+
}[] | undefined;
|
|
112
|
+
} | {
|
|
113
|
+
id: string;
|
|
114
|
+
role: "user";
|
|
115
|
+
content: string;
|
|
116
|
+
name?: string | undefined;
|
|
117
|
+
} | {
|
|
118
|
+
id: string;
|
|
119
|
+
role: "tool";
|
|
120
|
+
content: string;
|
|
121
|
+
toolCallId: string;
|
|
122
|
+
error?: string | undefined;
|
|
123
|
+
})[];
|
|
124
|
+
showCursor: boolean;
|
|
125
|
+
messageElements: ({
|
|
126
|
+
id: string;
|
|
127
|
+
role: "developer";
|
|
128
|
+
content: string;
|
|
129
|
+
name?: string | undefined;
|
|
130
|
+
} | {
|
|
131
|
+
id: string;
|
|
132
|
+
role: "system";
|
|
133
|
+
content: string;
|
|
134
|
+
name?: string | undefined;
|
|
135
|
+
} | {
|
|
136
|
+
id: string;
|
|
137
|
+
role: "assistant";
|
|
138
|
+
name?: string | undefined;
|
|
139
|
+
content?: string | undefined;
|
|
140
|
+
toolCalls?: {
|
|
141
|
+
function: {
|
|
142
|
+
name: string;
|
|
143
|
+
arguments: string;
|
|
144
|
+
};
|
|
145
|
+
type: "function";
|
|
146
|
+
id: string;
|
|
147
|
+
}[] | undefined;
|
|
148
|
+
} | {
|
|
149
|
+
id: string;
|
|
150
|
+
role: "user";
|
|
151
|
+
content: string;
|
|
152
|
+
name?: string | undefined;
|
|
153
|
+
} | {
|
|
154
|
+
id: string;
|
|
155
|
+
role: "tool";
|
|
156
|
+
content: string;
|
|
157
|
+
toolCallId: string;
|
|
158
|
+
error?: string | undefined;
|
|
159
|
+
})[];
|
|
160
|
+
}>;
|
|
161
|
+
assistantMessageSlot: import("@angular/core").Signal<string | Type<any>>;
|
|
162
|
+
userMessageSlot: import("@angular/core").Signal<string | Type<any>>;
|
|
163
|
+
cursorSlot: import("@angular/core").Signal<string | Type<any>>;
|
|
164
|
+
mergeAssistantProps(message: Message): {
|
|
165
|
+
message: {
|
|
166
|
+
id: string;
|
|
167
|
+
role: "developer";
|
|
168
|
+
content: string;
|
|
169
|
+
name?: string | undefined;
|
|
170
|
+
} | {
|
|
171
|
+
id: string;
|
|
172
|
+
role: "system";
|
|
173
|
+
content: string;
|
|
174
|
+
name?: string | undefined;
|
|
175
|
+
} | {
|
|
176
|
+
id: string;
|
|
177
|
+
role: "assistant";
|
|
178
|
+
name?: string | undefined;
|
|
179
|
+
content?: string | undefined;
|
|
180
|
+
toolCalls?: {
|
|
181
|
+
function: {
|
|
182
|
+
name: string;
|
|
183
|
+
arguments: string;
|
|
184
|
+
};
|
|
185
|
+
type: "function";
|
|
186
|
+
id: string;
|
|
187
|
+
}[] | undefined;
|
|
188
|
+
} | {
|
|
189
|
+
id: string;
|
|
190
|
+
role: "user";
|
|
191
|
+
content: string;
|
|
192
|
+
name?: string | undefined;
|
|
193
|
+
} | {
|
|
194
|
+
id: string;
|
|
195
|
+
role: "tool";
|
|
196
|
+
content: string;
|
|
197
|
+
toolCallId: string;
|
|
198
|
+
error?: string | undefined;
|
|
199
|
+
};
|
|
200
|
+
messages: ({
|
|
201
|
+
id: string;
|
|
202
|
+
role: "developer";
|
|
203
|
+
content: string;
|
|
204
|
+
name?: string | undefined;
|
|
205
|
+
} | {
|
|
206
|
+
id: string;
|
|
207
|
+
role: "system";
|
|
208
|
+
content: string;
|
|
209
|
+
name?: string | undefined;
|
|
210
|
+
} | {
|
|
211
|
+
id: string;
|
|
212
|
+
role: "assistant";
|
|
213
|
+
name?: string | undefined;
|
|
214
|
+
content?: string | undefined;
|
|
215
|
+
toolCalls?: {
|
|
216
|
+
function: {
|
|
217
|
+
name: string;
|
|
218
|
+
arguments: string;
|
|
219
|
+
};
|
|
220
|
+
type: "function";
|
|
221
|
+
id: string;
|
|
222
|
+
}[] | undefined;
|
|
223
|
+
} | {
|
|
224
|
+
id: string;
|
|
225
|
+
role: "user";
|
|
226
|
+
content: string;
|
|
227
|
+
name?: string | undefined;
|
|
228
|
+
} | {
|
|
229
|
+
id: string;
|
|
230
|
+
role: "tool";
|
|
231
|
+
content: string;
|
|
232
|
+
toolCallId: string;
|
|
233
|
+
error?: string | undefined;
|
|
234
|
+
})[];
|
|
235
|
+
isLoading: boolean;
|
|
236
|
+
inputClass: string;
|
|
237
|
+
};
|
|
238
|
+
mergeUserProps(message: Message): {
|
|
239
|
+
message: {
|
|
240
|
+
id: string;
|
|
241
|
+
role: "developer";
|
|
242
|
+
content: string;
|
|
243
|
+
name?: string | undefined;
|
|
244
|
+
} | {
|
|
245
|
+
id: string;
|
|
246
|
+
role: "system";
|
|
247
|
+
content: string;
|
|
248
|
+
name?: string | undefined;
|
|
249
|
+
} | {
|
|
250
|
+
id: string;
|
|
251
|
+
role: "assistant";
|
|
252
|
+
name?: string | undefined;
|
|
253
|
+
content?: string | undefined;
|
|
254
|
+
toolCalls?: {
|
|
255
|
+
function: {
|
|
256
|
+
name: string;
|
|
257
|
+
arguments: string;
|
|
258
|
+
};
|
|
259
|
+
type: "function";
|
|
260
|
+
id: string;
|
|
261
|
+
}[] | undefined;
|
|
262
|
+
} | {
|
|
263
|
+
id: string;
|
|
264
|
+
role: "user";
|
|
265
|
+
content: string;
|
|
266
|
+
name?: string | undefined;
|
|
267
|
+
} | {
|
|
268
|
+
id: string;
|
|
269
|
+
role: "tool";
|
|
270
|
+
content: string;
|
|
271
|
+
toolCallId: string;
|
|
272
|
+
error?: string | undefined;
|
|
273
|
+
};
|
|
274
|
+
inputClass: string;
|
|
275
|
+
};
|
|
276
|
+
trackByMessageId(index: number, message: Message): string;
|
|
277
|
+
ngOnInit(): void;
|
|
278
|
+
ngOnChanges(): void;
|
|
279
|
+
handleAssistantThumbsUp(event: {
|
|
280
|
+
message: Message;
|
|
281
|
+
}): void;
|
|
282
|
+
handleAssistantThumbsDown(event: {
|
|
283
|
+
message: Message;
|
|
284
|
+
}): void;
|
|
285
|
+
handleAssistantReadAloud(event: {
|
|
286
|
+
message: Message;
|
|
287
|
+
}): void;
|
|
288
|
+
handleAssistantRegenerate(event: {
|
|
289
|
+
message: Message;
|
|
290
|
+
}): void;
|
|
291
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CopilotChatMessageViewComponent, never>;
|
|
292
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CopilotChatMessageViewComponent, "copilot-chat-message-view", never, { "messages": { "alias": "messages"; "required": false; }; "showCursor": { "alias": "showCursor"; "required": false; }; "isLoading": { "alias": "isLoading"; "required": false; }; "inputClass": { "alias": "inputClass"; "required": false; }; "assistantMessageComponent": { "alias": "assistantMessageComponent"; "required": false; }; "assistantMessageTemplate": { "alias": "assistantMessageTemplate"; "required": false; }; "assistantMessageClass": { "alias": "assistantMessageClass"; "required": false; }; "userMessageComponent": { "alias": "userMessageComponent"; "required": false; }; "userMessageTemplate": { "alias": "userMessageTemplate"; "required": false; }; "userMessageClass": { "alias": "userMessageClass"; "required": false; }; "cursorComponent": { "alias": "cursorComponent"; "required": false; }; "cursorTemplate": { "alias": "cursorTemplate"; "required": false; }; "cursorClass": { "alias": "cursorClass"; "required": false; }; }, { "assistantMessageThumbsUp": "assistantMessageThumbsUp"; "assistantMessageThumbsDown": "assistantMessageThumbsDown"; "assistantMessageReadAloud": "assistantMessageReadAloud"; "assistantMessageRegenerate": "assistantMessageRegenerate"; "userMessageCopy": "userMessageCopy"; "userMessageEdit": "userMessageEdit"; }, ["customLayoutTemplate"], never, true, never>;
|
|
293
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Message } from '@ag-ui/client';
|
|
2
|
+
import { Type, TemplateRef } from '@angular/core';
|
|
3
|
+
export interface MessageViewContext {
|
|
4
|
+
showCursor: boolean;
|
|
5
|
+
messages: Message[];
|
|
6
|
+
messageElements: any[];
|
|
7
|
+
}
|
|
8
|
+
export interface CursorContext {
|
|
9
|
+
}
|
|
10
|
+
export interface CopilotChatMessageViewProps {
|
|
11
|
+
messages?: Message[];
|
|
12
|
+
showCursor?: boolean;
|
|
13
|
+
inputClass?: string;
|
|
14
|
+
assistantMessageComponent?: Type<any>;
|
|
15
|
+
assistantMessageTemplate?: TemplateRef<any>;
|
|
16
|
+
assistantMessageClass?: string;
|
|
17
|
+
userMessageComponent?: Type<any>;
|
|
18
|
+
userMessageTemplate?: TemplateRef<any>;
|
|
19
|
+
userMessageClass?: string;
|
|
20
|
+
cursorComponent?: Type<any>;
|
|
21
|
+
cursorTemplate?: TemplateRef<any>;
|
|
22
|
+
cursorClass?: string;
|
|
23
|
+
}
|
|
24
|
+
export type { Message };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { EventEmitter, ElementRef, AfterViewInit, OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class CopilotChatTextareaComponent implements AfterViewInit, OnChanges {
|
|
4
|
+
private elementRef;
|
|
5
|
+
get textareaRef(): ElementRef<any>;
|
|
6
|
+
set inputValue(val: string | undefined);
|
|
7
|
+
set inputPlaceholder(val: string | undefined);
|
|
8
|
+
set inputMaxRows(val: number | undefined);
|
|
9
|
+
set inputAutoFocus(val: boolean | undefined);
|
|
10
|
+
set inputDisabled(val: boolean | undefined);
|
|
11
|
+
set inputClass(val: string | undefined);
|
|
12
|
+
valueChange: EventEmitter<string>;
|
|
13
|
+
keyDown: EventEmitter<KeyboardEvent>;
|
|
14
|
+
private chatConfig;
|
|
15
|
+
value: import("@angular/core").WritableSignal<string>;
|
|
16
|
+
customPlaceholder: import("@angular/core").WritableSignal<string>;
|
|
17
|
+
maxRows: import("@angular/core").WritableSignal<number>;
|
|
18
|
+
autoFocus: import("@angular/core").WritableSignal<boolean>;
|
|
19
|
+
disabled: import("@angular/core").WritableSignal<boolean>;
|
|
20
|
+
customClass: import("@angular/core").WritableSignal<string>;
|
|
21
|
+
maxHeight: import("@angular/core").WritableSignal<number>;
|
|
22
|
+
placeholder: import("@angular/core").Signal<string>;
|
|
23
|
+
computedClass: import("@angular/core").Signal<string>;
|
|
24
|
+
constructor();
|
|
25
|
+
ngAfterViewInit(): void;
|
|
26
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
27
|
+
onInput(event: Event): void;
|
|
28
|
+
onKeyDown(event: KeyboardEvent): void;
|
|
29
|
+
private calculateMaxHeight;
|
|
30
|
+
private adjustHeight;
|
|
31
|
+
/**
|
|
32
|
+
* Public method to focus the textarea
|
|
33
|
+
*/
|
|
34
|
+
focus(): void;
|
|
35
|
+
/**
|
|
36
|
+
* Public method to get current value
|
|
37
|
+
*/
|
|
38
|
+
getValue(): string;
|
|
39
|
+
/**
|
|
40
|
+
* Public method to set value programmatically
|
|
41
|
+
*/
|
|
42
|
+
setValue(value: string): void;
|
|
43
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CopilotChatTextareaComponent, never>;
|
|
44
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CopilotChatTextareaComponent, "textarea[copilotChatTextarea]", never, { "inputValue": { "alias": "inputValue"; "required": false; }; "inputPlaceholder": { "alias": "inputPlaceholder"; "required": false; }; "inputMaxRows": { "alias": "inputMaxRows"; "required": false; }; "inputAutoFocus": { "alias": "inputAutoFocus"; "required": false; }; "inputDisabled": { "alias": "inputDisabled"; "required": false; }; "inputClass": { "alias": "inputClass"; "required": false; }; }, { "valueChange": "valueChange"; "keyDown": "keyDown"; }, never, never, true, never>;
|
|
45
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { AfterViewInit, OnChanges, SimpleChanges, TemplateRef, OnDestroy } from "@angular/core";
|
|
2
|
+
import type { AssistantMessage, Message, ToolCall } from "@ag-ui/core";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* Component for rendering all tool calls for an assistant message.
|
|
6
|
+
* This component iterates through the message's tool calls and renders each one
|
|
7
|
+
* using the registered render functions in CopilotKitService.
|
|
8
|
+
*/
|
|
9
|
+
export declare class CopilotChatToolCallsViewComponent implements AfterViewInit, OnChanges, OnDestroy {
|
|
10
|
+
message: AssistantMessage;
|
|
11
|
+
messages: Message[];
|
|
12
|
+
isLoading: boolean;
|
|
13
|
+
private container?;
|
|
14
|
+
private copilotkit;
|
|
15
|
+
private componentRefs;
|
|
16
|
+
private templateCache;
|
|
17
|
+
private messageSignal;
|
|
18
|
+
private messagesSignal;
|
|
19
|
+
private isLoadingSignal;
|
|
20
|
+
ngAfterViewInit(): void;
|
|
21
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
22
|
+
ngOnDestroy(): void;
|
|
23
|
+
getTemplateForToolCall(toolCall: ToolCall): {
|
|
24
|
+
template: TemplateRef<any>;
|
|
25
|
+
context: any;
|
|
26
|
+
} | null;
|
|
27
|
+
private renderAllToolCalls;
|
|
28
|
+
private renderSingleToolCall;
|
|
29
|
+
private renderComponent;
|
|
30
|
+
private renderTemplate;
|
|
31
|
+
private isComponentClass;
|
|
32
|
+
private isTemplateRef;
|
|
33
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CopilotChatToolCallsViewComponent, never>;
|
|
34
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CopilotChatToolCallsViewComponent, "copilot-chat-tool-calls-view", never, { "message": { "alias": "message"; "required": true; }; "messages": { "alias": "messages"; "required": false; }; "isLoading": { "alias": "isLoading"; "required": false; }; }, {}, never, never, true, never>;
|
|
35
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class CopilotChatToolbarComponent {
|
|
3
|
+
set inputClass(val: string | undefined);
|
|
4
|
+
customClass: import("@angular/core").WritableSignal<string>;
|
|
5
|
+
computedClass: import("@angular/core").Signal<string>;
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CopilotChatToolbarComponent, never>;
|
|
7
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CopilotChatToolbarComponent, "div[copilotChatToolbar]", never, { "inputClass": { "alias": "inputClass"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ToolsMenuItem } from './copilot-chat-input.types';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class CopilotChatToolsMenuComponent {
|
|
4
|
+
readonly Settings2Icon: import("lucide-angular").LucideIconData;
|
|
5
|
+
readonly ChevronRightIcon: import("lucide-angular").LucideIconData;
|
|
6
|
+
set inputToolsMenu(val: (ToolsMenuItem | '-')[] | undefined);
|
|
7
|
+
set inputDisabled(val: boolean | undefined);
|
|
8
|
+
set inputClass(val: string | undefined);
|
|
9
|
+
private chatConfig;
|
|
10
|
+
toolsMenu: import("@angular/core").WritableSignal<(ToolsMenuItem | "-")[]>;
|
|
11
|
+
disabled: import("@angular/core").WritableSignal<boolean>;
|
|
12
|
+
customClass: import("@angular/core").WritableSignal<string>;
|
|
13
|
+
hasItems: import("@angular/core").Signal<boolean>;
|
|
14
|
+
label: import("@angular/core").Signal<string>;
|
|
15
|
+
buttonClass: import("@angular/core").Signal<string>;
|
|
16
|
+
isMenuItem(item: any): item is ToolsMenuItem;
|
|
17
|
+
handleItemClick(item: ToolsMenuItem): void;
|
|
18
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CopilotChatToolsMenuComponent, never>;
|
|
19
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CopilotChatToolsMenuComponent, "copilot-chat-tools-menu", never, { "inputToolsMenu": { "alias": "inputToolsMenu"; "required": false; }; "inputDisabled": { "alias": "inputDisabled"; "required": false; }; "inputClass": { "alias": "inputClass"; "required": false; }; }, {}, never, never, true, never>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import { type UserMessage, type CopilotChatUserMessageOnSwitchToBranchProps } from './copilot-chat-user-message.types';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class CopilotChatUserMessageBranchNavigationComponent {
|
|
5
|
+
set currentBranch(val: number);
|
|
6
|
+
set numberOfBranches(val: number);
|
|
7
|
+
message: UserMessage;
|
|
8
|
+
inputClass?: string;
|
|
9
|
+
switchToBranch: EventEmitter<CopilotChatUserMessageOnSwitchToBranchProps>;
|
|
10
|
+
readonly ChevronLeftIcon: import("lucide-angular").LucideIconData;
|
|
11
|
+
readonly ChevronRightIcon: import("lucide-angular").LucideIconData;
|
|
12
|
+
currentBranchSignal: import("@angular/core").WritableSignal<number>;
|
|
13
|
+
numberOfBranchesSignal: import("@angular/core").WritableSignal<number>;
|
|
14
|
+
readonly buttonClass: string;
|
|
15
|
+
showNavigation: import("@angular/core").Signal<boolean>;
|
|
16
|
+
canGoPrev: import("@angular/core").Signal<boolean>;
|
|
17
|
+
canGoNext: import("@angular/core").Signal<boolean>;
|
|
18
|
+
computedClass: import("@angular/core").Signal<string>;
|
|
19
|
+
handlePrevious(): void;
|
|
20
|
+
handleNext(): void;
|
|
21
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CopilotChatUserMessageBranchNavigationComponent, never>;
|
|
22
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CopilotChatUserMessageBranchNavigationComponent, "copilot-chat-user-message-branch-navigation", never, { "currentBranch": { "alias": "currentBranch"; "required": false; }; "numberOfBranches": { "alias": "numberOfBranches"; "required": false; }; "message": { "alias": "message"; "required": false; }; "inputClass": { "alias": "inputClass"; "required": false; }; }, { "switchToBranch": "switchToBranch"; }, never, never, true, never>;
|
|
23
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import * as i1 from "../../lib/directives/tooltip.directive";
|
|
4
|
+
export declare class CopilotChatUserMessageToolbarButtonComponent {
|
|
5
|
+
title: string;
|
|
6
|
+
disabled: boolean;
|
|
7
|
+
set inputClass(value: string | undefined);
|
|
8
|
+
private customClass;
|
|
9
|
+
computedClass: import("@angular/core").Signal<string>;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CopilotChatUserMessageToolbarButtonComponent, never>;
|
|
11
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CopilotChatUserMessageToolbarButtonComponent, "button[copilotChatUserMessageToolbarButton]", never, { "title": { "alias": "title"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "inputClass": { "alias": "inputClass"; "required": false; }; }, {}, never, ["*"], true, [{ directive: typeof i1.CopilotTooltipDirective; inputs: { "copilotTooltip": "title"; "tooltipPosition": "tooltipPosition"; "tooltipDelay": "tooltipDelay"; }; outputs: {}; }]>;
|
|
12
|
+
}
|
|
13
|
+
export declare class CopilotChatUserMessageCopyButtonComponent {
|
|
14
|
+
title?: string;
|
|
15
|
+
disabled: boolean;
|
|
16
|
+
inputClass?: string;
|
|
17
|
+
content?: string;
|
|
18
|
+
clicked: EventEmitter<void>;
|
|
19
|
+
readonly CopyIcon: import("lucide-angular").LucideIconData;
|
|
20
|
+
readonly CheckIcon: import("lucide-angular").LucideIconData;
|
|
21
|
+
copied: import("@angular/core").WritableSignal<boolean>;
|
|
22
|
+
private chatConfig;
|
|
23
|
+
get labels(): import("@copilotkitnext/angular").CopilotChatLabels;
|
|
24
|
+
handleCopy(): void;
|
|
25
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CopilotChatUserMessageCopyButtonComponent, never>;
|
|
26
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CopilotChatUserMessageCopyButtonComponent, "copilot-chat-user-message-copy-button", never, { "title": { "alias": "title"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "inputClass": { "alias": "inputClass"; "required": false; }; "content": { "alias": "content"; "required": false; }; }, { "clicked": "clicked"; }, never, never, true, never>;
|
|
27
|
+
}
|
|
28
|
+
export declare class CopilotChatUserMessageEditButtonComponent {
|
|
29
|
+
title?: string;
|
|
30
|
+
disabled: boolean;
|
|
31
|
+
inputClass?: string;
|
|
32
|
+
clicked: EventEmitter<void>;
|
|
33
|
+
readonly EditIcon: import("lucide-angular").LucideIconData;
|
|
34
|
+
private chatConfig;
|
|
35
|
+
get labels(): import("@copilotkitnext/angular").CopilotChatLabels;
|
|
36
|
+
handleEdit(): void;
|
|
37
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CopilotChatUserMessageEditButtonComponent, never>;
|
|
38
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CopilotChatUserMessageEditButtonComponent, "copilot-chat-user-message-edit-button", never, { "title": { "alias": "title"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "inputClass": { "alias": "inputClass"; "required": false; }; }, { "clicked": "clicked"; }, never, never, true, never>;
|
|
39
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class CopilotChatUserMessageRendererComponent {
|
|
3
|
+
content: string;
|
|
4
|
+
set inputClass(value: string | undefined);
|
|
5
|
+
private customClass;
|
|
6
|
+
computedClass: import("@angular/core").Signal<string>;
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CopilotChatUserMessageRendererComponent, never>;
|
|
8
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CopilotChatUserMessageRendererComponent, "copilot-chat-user-message-renderer", never, { "content": { "alias": "content"; "required": false; }; "inputClass": { "alias": "inputClass"; "required": false; }; }, {}, never, never, true, never>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class CopilotChatUserMessageToolbarComponent {
|
|
3
|
+
inputClass?: string;
|
|
4
|
+
computedClass: import("@angular/core").WritableSignal<string>;
|
|
5
|
+
ngOnInit(): void;
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CopilotChatUserMessageToolbarComponent, never>;
|
|
7
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CopilotChatUserMessageToolbarComponent, "div[copilotChatUserMessageToolbar]", never, { "inputClass": { "alias": "inputClass"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { EventEmitter, TemplateRef, Type } from '@angular/core';
|
|
2
|
+
import { type UserMessage, type CopilotChatUserMessageOnEditMessageProps, type CopilotChatUserMessageOnSwitchToBranchProps, type MessageRendererContext, type CopyButtonContext, type EditButtonContext, type BranchNavigationContext, type ToolbarContext } from './copilot-chat-user-message.types';
|
|
3
|
+
import { CopilotChatUserMessageRendererComponent } from './copilot-chat-user-message-renderer.component';
|
|
4
|
+
import { CopilotChatUserMessageCopyButtonComponent, CopilotChatUserMessageEditButtonComponent } from './copilot-chat-user-message-buttons.component';
|
|
5
|
+
import { CopilotChatUserMessageToolbarComponent } from './copilot-chat-user-message-toolbar.component';
|
|
6
|
+
import { CopilotChatUserMessageBranchNavigationComponent } from './copilot-chat-user-message-branch-navigation.component';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
export declare class CopilotChatUserMessageComponent {
|
|
9
|
+
messageRendererTemplate?: TemplateRef<MessageRendererContext>;
|
|
10
|
+
toolbarTemplate?: TemplateRef<ToolbarContext>;
|
|
11
|
+
copyButtonTemplate?: TemplateRef<CopyButtonContext>;
|
|
12
|
+
editButtonTemplate?: TemplateRef<EditButtonContext>;
|
|
13
|
+
branchNavigationTemplate?: TemplateRef<BranchNavigationContext>;
|
|
14
|
+
messageRendererClass?: string;
|
|
15
|
+
toolbarClass?: string;
|
|
16
|
+
copyButtonClass?: string;
|
|
17
|
+
editButtonClass?: string;
|
|
18
|
+
branchNavigationClass?: string;
|
|
19
|
+
messageRendererComponent?: Type<any>;
|
|
20
|
+
toolbarComponent?: Type<any>;
|
|
21
|
+
copyButtonComponent?: Type<any>;
|
|
22
|
+
editButtonComponent?: Type<any>;
|
|
23
|
+
branchNavigationComponent?: Type<any>;
|
|
24
|
+
message: UserMessage;
|
|
25
|
+
set branchIndex(val: number | undefined);
|
|
26
|
+
set numberOfBranches(val: number | undefined);
|
|
27
|
+
additionalToolbarItems?: TemplateRef<any>;
|
|
28
|
+
set inputClass(val: string | undefined);
|
|
29
|
+
editMessage: EventEmitter<CopilotChatUserMessageOnEditMessageProps>;
|
|
30
|
+
switchToBranch: EventEmitter<CopilotChatUserMessageOnSwitchToBranchProps>;
|
|
31
|
+
branchIndexSignal: import("@angular/core").WritableSignal<number>;
|
|
32
|
+
numberOfBranchesSignal: import("@angular/core").WritableSignal<number>;
|
|
33
|
+
customClass: import("@angular/core").WritableSignal<string>;
|
|
34
|
+
CopilotChatUserMessageRendererComponent: typeof CopilotChatUserMessageRendererComponent;
|
|
35
|
+
CopilotChatUserMessageToolbarComponent: typeof CopilotChatUserMessageToolbarComponent;
|
|
36
|
+
CopilotChatUserMessageCopyButtonComponent: typeof CopilotChatUserMessageCopyButtonComponent;
|
|
37
|
+
CopilotChatUserMessageEditButtonComponent: typeof CopilotChatUserMessageEditButtonComponent;
|
|
38
|
+
CopilotChatUserMessageBranchNavigationComponent: typeof CopilotChatUserMessageBranchNavigationComponent;
|
|
39
|
+
showBranchNavigation: import("@angular/core").Signal<boolean>;
|
|
40
|
+
computedClass: import("@angular/core").Signal<string>;
|
|
41
|
+
messageRendererContext: import("@angular/core").Signal<MessageRendererContext>;
|
|
42
|
+
copyButtonOutputs: {
|
|
43
|
+
clicked: () => void;
|
|
44
|
+
};
|
|
45
|
+
editButtonOutputs: {
|
|
46
|
+
clicked: () => void;
|
|
47
|
+
};
|
|
48
|
+
branchNavigationContext: import("@angular/core").Signal<BranchNavigationContext>;
|
|
49
|
+
toolbarContext: import("@angular/core").Signal<ToolbarContext>;
|
|
50
|
+
handleCopy(): void;
|
|
51
|
+
handleEdit(): void;
|
|
52
|
+
handleSwitchToBranch(props: CopilotChatUserMessageOnSwitchToBranchProps): void;
|
|
53
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CopilotChatUserMessageComponent, never>;
|
|
54
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CopilotChatUserMessageComponent, "copilot-chat-user-message", never, { "messageRendererClass": { "alias": "messageRendererClass"; "required": false; }; "toolbarClass": { "alias": "toolbarClass"; "required": false; }; "copyButtonClass": { "alias": "copyButtonClass"; "required": false; }; "editButtonClass": { "alias": "editButtonClass"; "required": false; }; "branchNavigationClass": { "alias": "branchNavigationClass"; "required": false; }; "messageRendererComponent": { "alias": "messageRendererComponent"; "required": false; }; "toolbarComponent": { "alias": "toolbarComponent"; "required": false; }; "copyButtonComponent": { "alias": "copyButtonComponent"; "required": false; }; "editButtonComponent": { "alias": "editButtonComponent"; "required": false; }; "branchNavigationComponent": { "alias": "branchNavigationComponent"; "required": false; }; "message": { "alias": "message"; "required": false; }; "branchIndex": { "alias": "branchIndex"; "required": false; }; "numberOfBranches": { "alias": "numberOfBranches"; "required": false; }; "additionalToolbarItems": { "alias": "additionalToolbarItems"; "required": false; }; "inputClass": { "alias": "inputClass"; "required": false; }; }, { "editMessage": "editMessage"; "switchToBranch": "switchToBranch"; }, ["messageRendererTemplate", "toolbarTemplate", "copyButtonTemplate", "editButtonTemplate", "branchNavigationTemplate"], never, true, never>;
|
|
55
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export interface UserMessage {
|
|
2
|
+
id: string;
|
|
3
|
+
content?: string;
|
|
4
|
+
role: 'user';
|
|
5
|
+
timestamp?: Date;
|
|
6
|
+
[key: string]: any;
|
|
7
|
+
}
|
|
8
|
+
export interface CopilotChatUserMessageOnEditMessageProps {
|
|
9
|
+
message: UserMessage;
|
|
10
|
+
}
|
|
11
|
+
export interface CopilotChatUserMessageOnSwitchToBranchProps {
|
|
12
|
+
message: UserMessage;
|
|
13
|
+
branchIndex: number;
|
|
14
|
+
numberOfBranches: number;
|
|
15
|
+
}
|
|
16
|
+
export interface MessageRendererContext {
|
|
17
|
+
content: string;
|
|
18
|
+
}
|
|
19
|
+
export interface CopyButtonContext {
|
|
20
|
+
content?: string;
|
|
21
|
+
copied?: boolean;
|
|
22
|
+
}
|
|
23
|
+
export interface EditButtonContext {
|
|
24
|
+
}
|
|
25
|
+
export interface BranchNavigationContext {
|
|
26
|
+
currentBranch: number;
|
|
27
|
+
numberOfBranches: number;
|
|
28
|
+
onSwitchToBranch?: (props: CopilotChatUserMessageOnSwitchToBranchProps) => void;
|
|
29
|
+
message: UserMessage;
|
|
30
|
+
}
|
|
31
|
+
export interface ToolbarContext {
|
|
32
|
+
children?: any;
|
|
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 CopilotChatViewDisclaimerComponent {
|
|
8
|
+
inputClass?: string;
|
|
9
|
+
text?: string;
|
|
10
|
+
private configService;
|
|
11
|
+
get disclaimerText(): string;
|
|
12
|
+
get computedClass(): string;
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CopilotChatViewDisclaimerComponent, never>;
|
|
14
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CopilotChatViewDisclaimerComponent, "copilot-chat-view-disclaimer", never, { "inputClass": { "alias": "inputClass"; "required": false; }; "text": { "alias": "text"; "required": false; }; }, {}, 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 CopilotChatViewFeatherComponent {
|
|
8
|
+
inputClass?: string;
|
|
9
|
+
style?: {
|
|
10
|
+
[key: string]: any;
|
|
11
|
+
};
|
|
12
|
+
get computedClass(): string;
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CopilotChatViewFeatherComponent, never>;
|
|
14
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CopilotChatViewFeatherComponent, "copilot-chat-view-feather", never, { "inputClass": { "alias": "inputClass"; "required": false; }; "style": { "alias": "style"; "required": false; }; }, {}, never, never, true, never>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class CopilotChatViewHandlersService {
|
|
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<CopilotChatViewHandlersService, never>;
|
|
10
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<CopilotChatViewHandlersService>;
|
|
11
|
+
}
|