@copilotkitnext/angular 0.0.9-alpha.2 → 0.0.10
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 +3 -3
- 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
package/dist/index.d.ts
CHANGED
|
@@ -1,55 +1 @@
|
|
|
1
|
-
export * from "./
|
|
2
|
-
export * from "./core/copilotkit.types";
|
|
3
|
-
export * from "./core/copilotkit.providers";
|
|
4
|
-
export type { Message, ToolCall, ToolMessage } from "@ag-ui/core";
|
|
5
|
-
export * from "./core/chat-configuration/chat-configuration.types";
|
|
6
|
-
export * from "./core/chat-configuration/chat-configuration.service";
|
|
7
|
-
export * from "./core/chat-configuration/chat-configuration.providers";
|
|
8
|
-
export * from "./utils/copilotkit.utils";
|
|
9
|
-
export * from "./utils/agent-context.utils";
|
|
10
|
-
export * from "./utils/frontend-tool.utils";
|
|
11
|
-
export { watchAgent, watchAgentWith, getAgent, subscribeToAgent, } from "./utils/agent.utils";
|
|
12
|
-
export * from "./utils/human-in-the-loop.utils";
|
|
13
|
-
export * from "./utils/chat-config.utils";
|
|
14
|
-
export { CopilotTooltipDirective } from "./lib/directives/tooltip.directive";
|
|
15
|
-
export { CopilotKitConfigDirective } from "./directives/copilotkit-config.directive";
|
|
16
|
-
export { CopilotKitAgentContextDirective } from "./directives/copilotkit-agent-context.directive";
|
|
17
|
-
export { CopilotKitFrontendToolDirective } from "./directives/copilotkit-frontend-tool.directive";
|
|
18
|
-
export { CopilotKitAgentDirective } from "./directives/copilotkit-agent.directive";
|
|
19
|
-
export { CopilotKitHumanInTheLoopDirective, CopilotKitHumanInTheLoopRespondDirective, } from "./directives/copilotkit-human-in-the-loop.directive";
|
|
20
|
-
export { CopilotKitChatConfigDirective } from "./directives/copilotkit-chat-config.directive";
|
|
21
|
-
export { CopilotKitToolRenderComponent } from "./components/copilotkit-tool-render.component";
|
|
22
|
-
export * from "./components/chat/copilot-chat-input.types";
|
|
23
|
-
export { CopilotChatInputComponent } from "./components/chat/copilot-chat-input.component";
|
|
24
|
-
export { CopilotChatInputDefaults } from "./components/chat/copilot-chat-input-defaults";
|
|
25
|
-
export { CopilotChatTextareaComponent } from "./components/chat/copilot-chat-textarea.component";
|
|
26
|
-
export { CopilotChatAudioRecorderComponent } from "./components/chat/copilot-chat-audio-recorder.component";
|
|
27
|
-
export { CopilotChatSendButtonComponent, CopilotChatToolbarButtonComponent, CopilotChatStartTranscribeButtonComponent, CopilotChatCancelTranscribeButtonComponent, CopilotChatFinishTranscribeButtonComponent, CopilotChatAddFileButtonComponent, } from "./components/chat/copilot-chat-buttons.component";
|
|
28
|
-
export { CopilotChatToolbarComponent } from "./components/chat/copilot-chat-toolbar.component";
|
|
29
|
-
export { CopilotChatToolsMenuComponent } from "./components/chat/copilot-chat-tools-menu.component";
|
|
30
|
-
export * from "./components/chat/copilot-chat-user-message.types";
|
|
31
|
-
export { CopilotChatUserMessageComponent } from "./components/chat/copilot-chat-user-message.component";
|
|
32
|
-
export { CopilotChatUserMessageRendererComponent } from "./components/chat/copilot-chat-user-message-renderer.component";
|
|
33
|
-
export { CopilotChatUserMessageToolbarButtonComponent, CopilotChatUserMessageCopyButtonComponent, CopilotChatUserMessageEditButtonComponent, } from "./components/chat/copilot-chat-user-message-buttons.component";
|
|
34
|
-
export { CopilotChatUserMessageToolbarComponent } from "./components/chat/copilot-chat-user-message-toolbar.component";
|
|
35
|
-
export { CopilotChatUserMessageBranchNavigationComponent } from "./components/chat/copilot-chat-user-message-branch-navigation.component";
|
|
36
|
-
export * from "./components/chat/copilot-chat-assistant-message.types";
|
|
37
|
-
export { CopilotChatAssistantMessageComponent } from "./components/chat/copilot-chat-assistant-message.component";
|
|
38
|
-
export { CopilotChatAssistantMessageRendererComponent } from "./components/chat/copilot-chat-assistant-message-renderer.component";
|
|
39
|
-
export { CopilotChatAssistantMessageToolbarButtonComponent, CopilotChatAssistantMessageCopyButtonComponent, CopilotChatAssistantMessageThumbsUpButtonComponent, CopilotChatAssistantMessageThumbsDownButtonComponent, CopilotChatAssistantMessageReadAloudButtonComponent, CopilotChatAssistantMessageRegenerateButtonComponent, } from "./components/chat/copilot-chat-assistant-message-buttons.component";
|
|
40
|
-
export { CopilotChatAssistantMessageToolbarComponent } from "./components/chat/copilot-chat-assistant-message-toolbar.component";
|
|
41
|
-
export * from "./components/chat/copilot-chat-message-view.types";
|
|
42
|
-
export { CopilotChatMessageViewComponent } from "./components/chat/copilot-chat-message-view.component";
|
|
43
|
-
export { CopilotChatMessageViewCursorComponent } from "./components/chat/copilot-chat-message-view-cursor.component";
|
|
44
|
-
export { CopilotChatToolCallsViewComponent } from "./components/chat/copilot-chat-tool-calls-view.component";
|
|
45
|
-
export * from "./components/chat/copilot-chat-view.types";
|
|
46
|
-
export { CopilotChatViewComponent } from "./components/chat/copilot-chat-view.component";
|
|
47
|
-
export { CopilotChatViewScrollViewComponent } from "./components/chat/copilot-chat-view-scroll-view.component";
|
|
48
|
-
export { CopilotChatViewScrollToBottomButtonComponent } from "./components/chat/copilot-chat-view-scroll-to-bottom-button.component";
|
|
49
|
-
export { CopilotChatViewFeatherComponent } from "./components/chat/copilot-chat-view-feather.component";
|
|
50
|
-
export { CopilotChatViewInputContainerComponent } from "./components/chat/copilot-chat-view-input-container.component";
|
|
51
|
-
export { CopilotChatViewDisclaimerComponent } from "./components/chat/copilot-chat-view-disclaimer.component";
|
|
52
|
-
export { CopilotChatComponent } from "./components/chat/copilot-chat.component";
|
|
53
|
-
export { ScrollPositionService } from "./services/scroll-position.service";
|
|
54
|
-
export { ResizeObserverService } from "./services/resize-observer.service";
|
|
55
|
-
export { StickToBottomDirective } from "./directives/stick-to-bottom.directive";
|
|
1
|
+
export * from "./public-api";
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { DestroyRef, Signal } from "@angular/core";
|
|
2
|
+
import type { AbstractAgent } from "@ag-ui/client";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class AgentStore {
|
|
5
|
+
#private;
|
|
6
|
+
readonly agent: AbstractAgent;
|
|
7
|
+
readonly isRunning: Signal<boolean>;
|
|
8
|
+
readonly messages: Signal<({
|
|
9
|
+
id: string;
|
|
10
|
+
role: "developer";
|
|
11
|
+
content: string;
|
|
12
|
+
name?: string;
|
|
13
|
+
} | {
|
|
14
|
+
id: string;
|
|
15
|
+
role: "system";
|
|
16
|
+
content: string;
|
|
17
|
+
name?: string;
|
|
18
|
+
} | {
|
|
19
|
+
id: string;
|
|
20
|
+
role: "assistant";
|
|
21
|
+
name?: string;
|
|
22
|
+
content?: string;
|
|
23
|
+
toolCalls?: {
|
|
24
|
+
function: {
|
|
25
|
+
name: string;
|
|
26
|
+
arguments: string;
|
|
27
|
+
};
|
|
28
|
+
type: "function";
|
|
29
|
+
id: string;
|
|
30
|
+
}[];
|
|
31
|
+
} | {
|
|
32
|
+
id: string;
|
|
33
|
+
role: "user";
|
|
34
|
+
content: string;
|
|
35
|
+
name?: string;
|
|
36
|
+
} | {
|
|
37
|
+
id: string;
|
|
38
|
+
role: "tool";
|
|
39
|
+
content: string;
|
|
40
|
+
toolCallId: string;
|
|
41
|
+
error?: string;
|
|
42
|
+
})[]>;
|
|
43
|
+
readonly state: Signal<any>;
|
|
44
|
+
constructor(abstractAgent: AbstractAgent, destroyRef: DestroyRef);
|
|
45
|
+
teardown(): void;
|
|
46
|
+
}
|
|
47
|
+
export declare class CopilotkitAgentFactory {
|
|
48
|
+
#private;
|
|
49
|
+
createAgentStoreSignal(agentId: Signal<string | undefined>, destroyRef: DestroyRef): Signal<AgentStore | undefined>;
|
|
50
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CopilotkitAgentFactory, never>;
|
|
51
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<CopilotkitAgentFactory>;
|
|
52
|
+
}
|
|
53
|
+
export declare function injectAgentStore(agentId: string | Signal<string | undefined>): Signal<AgentStore | undefined>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { InjectionToken } from "@angular/core";
|
|
1
|
+
import { InjectionToken, Provider } from "@angular/core";
|
|
2
2
|
export interface CopilotChatLabels {
|
|
3
3
|
chatInputPlaceholder: string;
|
|
4
4
|
chatInputToolbarStartTranscribeButtonLabel: string;
|
|
@@ -18,10 +18,6 @@ export interface CopilotChatLabels {
|
|
|
18
18
|
chatDisclaimerText: string;
|
|
19
19
|
}
|
|
20
20
|
export declare const COPILOT_CHAT_DEFAULT_LABELS: CopilotChatLabels;
|
|
21
|
-
export
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
onSubmitInput?: (value: string) => void;
|
|
25
|
-
onChangeInput?: (value: string) => void;
|
|
26
|
-
}
|
|
27
|
-
export declare const COPILOT_CHAT_INITIAL_CONFIG: InjectionToken<CopilotChatConfiguration>;
|
|
21
|
+
export declare const COPILOT_CHAT_LABELS: InjectionToken<CopilotChatLabels>;
|
|
22
|
+
export declare function injectChatLabels(): CopilotChatLabels;
|
|
23
|
+
export declare function provideCopilotChatLabels(config: Partial<CopilotChatLabels>): Provider;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { WritableSignal } from "@angular/core";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare abstract class ChatState {
|
|
4
|
+
abstract readonly inputValue: WritableSignal<string>;
|
|
5
|
+
abstract submitInput(value: string): void;
|
|
6
|
+
abstract changeInput(value: string): void;
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ChatState, never>;
|
|
8
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ChatState>;
|
|
9
|
+
}
|
|
10
|
+
export declare function injectChatState(): ChatState;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "../../directives/tooltip";
|
|
3
|
+
export declare class CopilotChatAssistantMessageToolbarButton {
|
|
4
|
+
title: import("@angular/core").InputSignal<string>;
|
|
5
|
+
disabled: import("@angular/core").InputSignal<boolean>;
|
|
6
|
+
inputClass: import("@angular/core").InputSignal<string>;
|
|
7
|
+
computedClass: import("@angular/core").Signal<string>;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CopilotChatAssistantMessageToolbarButton, never>;
|
|
9
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CopilotChatAssistantMessageToolbarButton, "button[copilotChatAssistantMessageToolbarButton]", never, { "title": { "alias": "title"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "inputClass": { "alias": "inputClass"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, [{ directive: typeof i1.CopilotTooltip; inputs: { "copilotTooltip": "title"; "tooltipPosition": "tooltipPosition"; "tooltipDelay": "tooltipDelay"; }; outputs: {}; }]>;
|
|
10
|
+
}
|
|
11
|
+
export declare class CopilotChatAssistantMessageCopyButton {
|
|
12
|
+
readonly title: import("@angular/core").InputSignal<string>;
|
|
13
|
+
readonly disabled: import("@angular/core").InputSignal<boolean>;
|
|
14
|
+
readonly inputClass: import("@angular/core").InputSignal<string>;
|
|
15
|
+
readonly content: import("@angular/core").InputSignal<string>;
|
|
16
|
+
readonly clicked: import("@angular/core").OutputEmitterRef<void>;
|
|
17
|
+
readonly CopyIcon: import("lucide-angular").LucideIconData;
|
|
18
|
+
readonly CheckIcon: import("lucide-angular").LucideIconData;
|
|
19
|
+
readonly copied: import("@angular/core").WritableSignal<boolean>;
|
|
20
|
+
readonly labels: import("../../chat-config").CopilotChatLabels;
|
|
21
|
+
handleCopy(event?: Event): void;
|
|
22
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CopilotChatAssistantMessageCopyButton, never>;
|
|
23
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CopilotChatAssistantMessageCopyButton, "copilot-chat-assistant-message-copy-button", never, { "title": { "alias": "title"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "inputClass": { "alias": "inputClass"; "required": false; "isSignal": true; }; "content": { "alias": "content"; "required": false; "isSignal": true; }; }, { "clicked": "clicked"; }, never, never, true, never>;
|
|
24
|
+
}
|
|
25
|
+
export declare class CopilotChatAssistantMessageThumbsUpButton {
|
|
26
|
+
readonly title: import("@angular/core").InputSignal<string>;
|
|
27
|
+
readonly disabled: import("@angular/core").InputSignal<boolean>;
|
|
28
|
+
readonly inputClass: import("@angular/core").InputSignal<string>;
|
|
29
|
+
readonly clicked: import("@angular/core").OutputEmitterRef<void>;
|
|
30
|
+
readonly ThumbsUpIcon: import("lucide-angular").LucideIconData;
|
|
31
|
+
readonly labels: import("../../chat-config").CopilotChatLabels;
|
|
32
|
+
handleClick(event?: Event): void;
|
|
33
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CopilotChatAssistantMessageThumbsUpButton, never>;
|
|
34
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CopilotChatAssistantMessageThumbsUpButton, "copilot-chat-assistant-message-thumbs-up-button", never, { "title": { "alias": "title"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "inputClass": { "alias": "inputClass"; "required": false; "isSignal": true; }; }, { "clicked": "clicked"; }, never, never, true, never>;
|
|
35
|
+
}
|
|
36
|
+
export declare class CopilotChatAssistantMessageThumbsDownButton {
|
|
37
|
+
readonly title: import("@angular/core").InputSignal<string>;
|
|
38
|
+
readonly disabled: import("@angular/core").InputSignal<boolean>;
|
|
39
|
+
readonly inputClass: import("@angular/core").InputSignal<string>;
|
|
40
|
+
readonly clicked: import("@angular/core").OutputEmitterRef<void>;
|
|
41
|
+
readonly ThumbsDownIcon: import("lucide-angular").LucideIconData;
|
|
42
|
+
readonly labels: import("../../chat-config").CopilotChatLabels;
|
|
43
|
+
handleClick(event?: Event): void;
|
|
44
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CopilotChatAssistantMessageThumbsDownButton, never>;
|
|
45
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CopilotChatAssistantMessageThumbsDownButton, "copilot-chat-assistant-message-thumbs-down-button", never, { "title": { "alias": "title"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "inputClass": { "alias": "inputClass"; "required": false; "isSignal": true; }; }, { "clicked": "clicked"; }, never, never, true, never>;
|
|
46
|
+
}
|
|
47
|
+
export declare class CopilotChatAssistantMessageReadAloudButton {
|
|
48
|
+
readonly title: import("@angular/core").InputSignal<string>;
|
|
49
|
+
readonly disabled: import("@angular/core").InputSignal<boolean>;
|
|
50
|
+
readonly inputClass: import("@angular/core").InputSignal<string>;
|
|
51
|
+
readonly clicked: import("@angular/core").OutputEmitterRef<void>;
|
|
52
|
+
readonly Volume2Icon: import("lucide-angular").LucideIconData;
|
|
53
|
+
readonly labels: import("../../chat-config").CopilotChatLabels;
|
|
54
|
+
handleClick(event?: Event): void;
|
|
55
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CopilotChatAssistantMessageReadAloudButton, never>;
|
|
56
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CopilotChatAssistantMessageReadAloudButton, "copilot-chat-assistant-message-read-aloud-button", never, { "title": { "alias": "title"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "inputClass": { "alias": "inputClass"; "required": false; "isSignal": true; }; }, { "clicked": "clicked"; }, never, never, true, never>;
|
|
57
|
+
}
|
|
58
|
+
export declare class CopilotChatAssistantMessageRegenerateButton {
|
|
59
|
+
readonly title: import("@angular/core").InputSignal<string>;
|
|
60
|
+
readonly disabled: import("@angular/core").InputSignal<boolean>;
|
|
61
|
+
readonly inputClass: import("@angular/core").InputSignal<string>;
|
|
62
|
+
readonly clicked: import("@angular/core").OutputEmitterRef<void>;
|
|
63
|
+
readonly RefreshCwIcon: import("lucide-angular").LucideIconData;
|
|
64
|
+
readonly labels: import("../../chat-config").CopilotChatLabels;
|
|
65
|
+
handleClick(event?: Event): void;
|
|
66
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CopilotChatAssistantMessageRegenerateButton, never>;
|
|
67
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CopilotChatAssistantMessageRegenerateButton, "copilot-chat-assistant-message-regenerate-button", never, { "title": { "alias": "title"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "inputClass": { "alias": "inputClass"; "required": false; "isSignal": true; }; }, { "clicked": "clicked"; }, never, never, true, never>;
|
|
68
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ElementRef, AfterViewInit } from "@angular/core";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class CopilotChatAssistantMessageRenderer implements AfterViewInit {
|
|
4
|
+
readonly content: import("@angular/core").InputSignal<string>;
|
|
5
|
+
readonly inputClass: import("@angular/core").InputSignal<string>;
|
|
6
|
+
readonly labels: import("../../chat-config").CopilotChatLabels;
|
|
7
|
+
markdownContainer?: ElementRef<HTMLDivElement>;
|
|
8
|
+
private elementRef;
|
|
9
|
+
private copyStates;
|
|
10
|
+
readonly renderedHtml: import("@angular/core").Signal<string>;
|
|
11
|
+
constructor();
|
|
12
|
+
ngAfterViewInit(): void;
|
|
13
|
+
private updateContent;
|
|
14
|
+
private codeBlocksMap;
|
|
15
|
+
private markedInstance;
|
|
16
|
+
private initializeMarked;
|
|
17
|
+
private renderMarkdown;
|
|
18
|
+
private processMathEquations;
|
|
19
|
+
private renderMathEquations;
|
|
20
|
+
handleClick(event: MouseEvent): void;
|
|
21
|
+
private copyCodeBlock;
|
|
22
|
+
private generateBlockId;
|
|
23
|
+
private escapeHtml;
|
|
24
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CopilotChatAssistantMessageRenderer, never>;
|
|
25
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CopilotChatAssistantMessageRenderer, "copilot-chat-assistant-message-renderer", never, { "content": { "alias": "content"; "required": false; "isSignal": true; }; "inputClass": { "alias": "inputClass"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
26
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class CopilotChatAssistantMessageToolbar {
|
|
3
|
+
readonly inputClass: import("@angular/core").InputSignal<string>;
|
|
4
|
+
readonly computedClass: import("@angular/core").Signal<string>;
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CopilotChatAssistantMessageToolbar, never>;
|
|
6
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CopilotChatAssistantMessageToolbar, "[copilotChatAssistantMessageToolbar]", never, { "inputClass": { "alias": "inputClass"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import { TemplateRef, Type } from "@angular/core";
|
|
2
|
+
import { CopilotChatToolCallsView } from "./copilot-chat-tool-calls-view";
|
|
3
|
+
import { type CopilotChatAssistantMessageOnThumbsUpProps, type CopilotChatAssistantMessageOnThumbsDownProps, type CopilotChatAssistantMessageOnReadAloudProps, type CopilotChatAssistantMessageOnRegenerateProps, type AssistantMessageMarkdownRendererContext, type AssistantMessageCopyButtonContext, type ThumbsUpButtonContext, type ThumbsDownButtonContext, type ReadAloudButtonContext, type RegenerateButtonContext, type AssistantMessageToolbarContext } from "./copilot-chat-assistant-message.types";
|
|
4
|
+
import { CopilotChatAssistantMessageRenderer } from "./copilot-chat-assistant-message-renderer";
|
|
5
|
+
import { CopilotChatAssistantMessageCopyButton, CopilotChatAssistantMessageThumbsUpButton, CopilotChatAssistantMessageThumbsDownButton } from "./copilot-chat-assistant-message-buttons";
|
|
6
|
+
import { CopilotChatAssistantMessageToolbar } from "./copilot-chat-assistant-message-toolbar";
|
|
7
|
+
import { CopilotChatViewHandlers } from "./copilot-chat-view-handlers";
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
export declare class CopilotChatAssistantMessage {
|
|
10
|
+
markdownRendererTemplate?: TemplateRef<AssistantMessageMarkdownRendererContext>;
|
|
11
|
+
toolbarTemplate?: TemplateRef<AssistantMessageToolbarContext>;
|
|
12
|
+
copyButtonTemplate?: TemplateRef<AssistantMessageCopyButtonContext>;
|
|
13
|
+
thumbsUpButtonTemplate?: TemplateRef<ThumbsUpButtonContext>;
|
|
14
|
+
thumbsDownButtonTemplate?: TemplateRef<ThumbsDownButtonContext>;
|
|
15
|
+
readAloudButtonTemplate?: TemplateRef<ReadAloudButtonContext>;
|
|
16
|
+
regenerateButtonTemplate?: TemplateRef<RegenerateButtonContext>;
|
|
17
|
+
toolCallsViewTemplate?: TemplateRef<any>;
|
|
18
|
+
readonly markdownRendererClass: import("@angular/core").InputSignal<string>;
|
|
19
|
+
readonly toolbarClass: import("@angular/core").InputSignal<string>;
|
|
20
|
+
readonly copyButtonClass: import("@angular/core").InputSignal<string>;
|
|
21
|
+
readonly thumbsUpButtonClass: import("@angular/core").InputSignal<string>;
|
|
22
|
+
readonly thumbsDownButtonClass: import("@angular/core").InputSignal<string>;
|
|
23
|
+
readonly readAloudButtonClass: import("@angular/core").InputSignal<string>;
|
|
24
|
+
readonly regenerateButtonClass: import("@angular/core").InputSignal<string>;
|
|
25
|
+
readonly toolCallsViewClass: import("@angular/core").InputSignal<string>;
|
|
26
|
+
readonly markdownRendererComponent: import("@angular/core").InputSignal<Type<any>>;
|
|
27
|
+
readonly toolbarComponent: import("@angular/core").InputSignal<Type<any>>;
|
|
28
|
+
readonly copyButtonComponent: import("@angular/core").InputSignal<Type<any>>;
|
|
29
|
+
readonly thumbsUpButtonComponent: import("@angular/core").InputSignal<Type<any>>;
|
|
30
|
+
readonly thumbsDownButtonComponent: import("@angular/core").InputSignal<Type<any>>;
|
|
31
|
+
readonly readAloudButtonComponent: import("@angular/core").InputSignal<Type<any>>;
|
|
32
|
+
readonly regenerateButtonComponent: import("@angular/core").InputSignal<Type<any>>;
|
|
33
|
+
readonly toolCallsViewComponent: import("@angular/core").InputSignal<Type<any>>;
|
|
34
|
+
readonly message: import("@angular/core").InputSignal<{
|
|
35
|
+
id: string;
|
|
36
|
+
role: "assistant";
|
|
37
|
+
name?: string;
|
|
38
|
+
content?: string;
|
|
39
|
+
toolCalls?: {
|
|
40
|
+
function: {
|
|
41
|
+
name: string;
|
|
42
|
+
arguments: string;
|
|
43
|
+
};
|
|
44
|
+
type: "function";
|
|
45
|
+
id: string;
|
|
46
|
+
}[];
|
|
47
|
+
}>;
|
|
48
|
+
readonly messages: import("@angular/core").InputSignal<({
|
|
49
|
+
id: string;
|
|
50
|
+
role: "developer";
|
|
51
|
+
content: string;
|
|
52
|
+
name?: string;
|
|
53
|
+
} | {
|
|
54
|
+
id: string;
|
|
55
|
+
role: "system";
|
|
56
|
+
content: string;
|
|
57
|
+
name?: string;
|
|
58
|
+
} | {
|
|
59
|
+
id: string;
|
|
60
|
+
role: "assistant";
|
|
61
|
+
name?: string;
|
|
62
|
+
content?: string;
|
|
63
|
+
toolCalls?: {
|
|
64
|
+
function: {
|
|
65
|
+
name: string;
|
|
66
|
+
arguments: string;
|
|
67
|
+
};
|
|
68
|
+
type: "function";
|
|
69
|
+
id: string;
|
|
70
|
+
}[];
|
|
71
|
+
} | {
|
|
72
|
+
id: string;
|
|
73
|
+
role: "user";
|
|
74
|
+
content: string;
|
|
75
|
+
name?: string;
|
|
76
|
+
} | {
|
|
77
|
+
id: string;
|
|
78
|
+
role: "tool";
|
|
79
|
+
content: string;
|
|
80
|
+
toolCallId: string;
|
|
81
|
+
error?: string;
|
|
82
|
+
})[]>;
|
|
83
|
+
readonly isLoading: import("@angular/core").InputSignal<boolean>;
|
|
84
|
+
readonly additionalToolbarItems: import("@angular/core").InputSignal<TemplateRef<any>>;
|
|
85
|
+
readonly toolbarVisible: import("@angular/core").InputSignal<boolean>;
|
|
86
|
+
readonly inputClass: import("@angular/core").InputSignal<string>;
|
|
87
|
+
handlers: CopilotChatViewHandlers;
|
|
88
|
+
constructor(handlers?: CopilotChatViewHandlers | null);
|
|
89
|
+
thumbsUp: import("@angular/core").OutputEmitterRef<CopilotChatAssistantMessageOnThumbsUpProps>;
|
|
90
|
+
thumbsDown: import("@angular/core").OutputEmitterRef<CopilotChatAssistantMessageOnThumbsDownProps>;
|
|
91
|
+
readAloud: import("@angular/core").OutputEmitterRef<CopilotChatAssistantMessageOnReadAloudProps>;
|
|
92
|
+
regenerate: import("@angular/core").OutputEmitterRef<CopilotChatAssistantMessageOnRegenerateProps>;
|
|
93
|
+
customClass: import("@angular/core").WritableSignal<string>;
|
|
94
|
+
computedClass: import("@angular/core").Signal<string>;
|
|
95
|
+
protected readonly defaultThumbsUpButtonComponent: typeof CopilotChatAssistantMessageThumbsUpButton;
|
|
96
|
+
protected readonly defaultThumbsDownButtonComponent: typeof CopilotChatAssistantMessageThumbsDownButton;
|
|
97
|
+
protected readonly CopilotChatAssistantMessageRenderer: typeof CopilotChatAssistantMessageRenderer;
|
|
98
|
+
protected readonly CopilotChatAssistantMessageToolbar: typeof CopilotChatAssistantMessageToolbar;
|
|
99
|
+
protected readonly CopilotChatAssistantMessageCopyButton: typeof CopilotChatAssistantMessageCopyButton;
|
|
100
|
+
protected readonly CopilotChatToolCallsView: typeof CopilotChatToolCallsView;
|
|
101
|
+
markdownRendererContext: import("@angular/core").Signal<AssistantMessageMarkdownRendererContext>;
|
|
102
|
+
copyButtonOutputs: {
|
|
103
|
+
clicked: () => void;
|
|
104
|
+
};
|
|
105
|
+
thumbsUpButtonOutputs: {
|
|
106
|
+
clicked: () => void;
|
|
107
|
+
};
|
|
108
|
+
thumbsDownButtonOutputs: {
|
|
109
|
+
clicked: () => void;
|
|
110
|
+
};
|
|
111
|
+
readAloudButtonOutputs: {
|
|
112
|
+
clicked: () => void;
|
|
113
|
+
};
|
|
114
|
+
regenerateButtonOutputs: {
|
|
115
|
+
clicked: () => void;
|
|
116
|
+
};
|
|
117
|
+
toolbarContext: import("@angular/core").Signal<AssistantMessageToolbarContext>;
|
|
118
|
+
hasMessageContent(): boolean;
|
|
119
|
+
toolCallsViewContext: import("@angular/core").Signal<{
|
|
120
|
+
message: {
|
|
121
|
+
id: string;
|
|
122
|
+
role: "assistant";
|
|
123
|
+
name?: string;
|
|
124
|
+
content?: string;
|
|
125
|
+
toolCalls?: {
|
|
126
|
+
function: {
|
|
127
|
+
name: string;
|
|
128
|
+
arguments: string;
|
|
129
|
+
};
|
|
130
|
+
type: "function";
|
|
131
|
+
id: string;
|
|
132
|
+
}[];
|
|
133
|
+
};
|
|
134
|
+
messages: ({
|
|
135
|
+
id: string;
|
|
136
|
+
role: "developer";
|
|
137
|
+
content: string;
|
|
138
|
+
name?: string;
|
|
139
|
+
} | {
|
|
140
|
+
id: string;
|
|
141
|
+
role: "system";
|
|
142
|
+
content: string;
|
|
143
|
+
name?: string;
|
|
144
|
+
} | {
|
|
145
|
+
id: string;
|
|
146
|
+
role: "assistant";
|
|
147
|
+
name?: string;
|
|
148
|
+
content?: string;
|
|
149
|
+
toolCalls?: {
|
|
150
|
+
function: {
|
|
151
|
+
name: string;
|
|
152
|
+
arguments: string;
|
|
153
|
+
};
|
|
154
|
+
type: "function";
|
|
155
|
+
id: string;
|
|
156
|
+
}[];
|
|
157
|
+
} | {
|
|
158
|
+
id: string;
|
|
159
|
+
role: "user";
|
|
160
|
+
content: string;
|
|
161
|
+
name?: string;
|
|
162
|
+
} | {
|
|
163
|
+
id: string;
|
|
164
|
+
role: "tool";
|
|
165
|
+
content: string;
|
|
166
|
+
toolCallId: string;
|
|
167
|
+
error?: string;
|
|
168
|
+
})[];
|
|
169
|
+
isLoading: boolean;
|
|
170
|
+
}>;
|
|
171
|
+
handleCopy(): void;
|
|
172
|
+
handleThumbsUp(): void;
|
|
173
|
+
handleThumbsDown(): void;
|
|
174
|
+
handleReadAloud(): void;
|
|
175
|
+
handleRegenerate(): void;
|
|
176
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CopilotChatAssistantMessage, [{ optional: true; }]>;
|
|
177
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CopilotChatAssistantMessage, "copilot-chat-assistant-message", never, { "markdownRendererClass": { "alias": "markdownRendererClass"; "required": false; "isSignal": true; }; "toolbarClass": { "alias": "toolbarClass"; "required": false; "isSignal": true; }; "copyButtonClass": { "alias": "copyButtonClass"; "required": false; "isSignal": true; }; "thumbsUpButtonClass": { "alias": "thumbsUpButtonClass"; "required": false; "isSignal": true; }; "thumbsDownButtonClass": { "alias": "thumbsDownButtonClass"; "required": false; "isSignal": true; }; "readAloudButtonClass": { "alias": "readAloudButtonClass"; "required": false; "isSignal": true; }; "regenerateButtonClass": { "alias": "regenerateButtonClass"; "required": false; "isSignal": true; }; "toolCallsViewClass": { "alias": "toolCallsViewClass"; "required": false; "isSignal": true; }; "markdownRendererComponent": { "alias": "markdownRendererComponent"; "required": false; "isSignal": true; }; "toolbarComponent": { "alias": "toolbarComponent"; "required": false; "isSignal": true; }; "copyButtonComponent": { "alias": "copyButtonComponent"; "required": false; "isSignal": true; }; "thumbsUpButtonComponent": { "alias": "thumbsUpButtonComponent"; "required": false; "isSignal": true; }; "thumbsDownButtonComponent": { "alias": "thumbsDownButtonComponent"; "required": false; "isSignal": true; }; "readAloudButtonComponent": { "alias": "readAloudButtonComponent"; "required": false; "isSignal": true; }; "regenerateButtonComponent": { "alias": "regenerateButtonComponent"; "required": false; "isSignal": true; }; "toolCallsViewComponent": { "alias": "toolCallsViewComponent"; "required": false; "isSignal": true; }; "message": { "alias": "message"; "required": true; "isSignal": true; }; "messages": { "alias": "messages"; "required": false; "isSignal": true; }; "isLoading": { "alias": "isLoading"; "required": false; "isSignal": true; }; "additionalToolbarItems": { "alias": "additionalToolbarItems"; "required": false; "isSignal": true; }; "toolbarVisible": { "alias": "toolbarVisible"; "required": false; "isSignal": true; }; "inputClass": { "alias": "inputClass"; "required": false; "isSignal": true; }; }, { "thumbsUp": "thumbsUp"; "thumbsDown": "thumbsDown"; "readAloud": "readAloud"; "regenerate": "regenerate"; }, ["markdownRendererTemplate", "toolbarTemplate", "copyButtonTemplate", "thumbsUpButtonTemplate", "thumbsDownButtonTemplate", "readAloudButtonTemplate", "regenerateButtonTemplate", "toolCallsViewTemplate"], never, true, never>;
|
|
178
|
+
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { AudioRecorderState, AudioRecorderError } from
|
|
1
|
+
import { ElementRef, AfterViewInit, OnDestroy } from "@angular/core";
|
|
2
|
+
import { AudioRecorderState, AudioRecorderError } from "./copilot-chat-input.types";
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class
|
|
4
|
+
export declare class CopilotChatAudioRecorder implements AfterViewInit, OnDestroy {
|
|
5
5
|
canvasRef: ElementRef<HTMLCanvasElement>;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
stateChange:
|
|
9
|
-
error:
|
|
6
|
+
inputClass: import("@angular/core").InputSignal<string>;
|
|
7
|
+
inputShowControls: import("@angular/core").InputSignal<boolean>;
|
|
8
|
+
stateChange: import("@angular/core").OutputEmitterRef<AudioRecorderState>;
|
|
9
|
+
error: import("@angular/core").OutputEmitterRef<AudioRecorderError>;
|
|
10
10
|
state: import("@angular/core").WritableSignal<AudioRecorderState>;
|
|
11
|
-
customClass: import("@angular/core").WritableSignal<string>;
|
|
12
11
|
showControls: import("@angular/core").WritableSignal<boolean>;
|
|
13
12
|
computedClass: import("@angular/core").Signal<string>;
|
|
14
13
|
statusText: import("@angular/core").Signal<"Recording..." | "Processing..." | "Ready">;
|
|
15
14
|
private animationFrameId?;
|
|
15
|
+
constructor();
|
|
16
16
|
ngAfterViewInit(): void;
|
|
17
17
|
ngOnDestroy(): void;
|
|
18
18
|
/**
|
|
@@ -35,6 +35,6 @@ export declare class CopilotChatAudioRecorderComponent implements AfterViewInit,
|
|
|
35
35
|
private startAnimation;
|
|
36
36
|
private stopAnimation;
|
|
37
37
|
private getLoudness;
|
|
38
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
39
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<
|
|
38
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CopilotChatAudioRecorder, never>;
|
|
39
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CopilotChatAudioRecorder, "copilot-chat-audio-recorder", never, { "inputClass": { "alias": "inputClass"; "required": false; "isSignal": true; }; "inputShowControls": { "alias": "inputShowControls"; "required": false; "isSignal": true; }; }, { "stateChange": "stateChange"; "error": "error"; }, never, never, true, never>;
|
|
40
40
|
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class CopilotChatSendButton {
|
|
3
|
+
disabled: import("@angular/core").InputSignal<boolean>;
|
|
4
|
+
clicked: import("@angular/core").OutputEmitterRef<void>;
|
|
5
|
+
readonly ArrowUpIcon: import("lucide-angular").LucideIconData;
|
|
6
|
+
buttonClass: string;
|
|
7
|
+
onClick(): void;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CopilotChatSendButton, never>;
|
|
9
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CopilotChatSendButton, "copilot-chat-send-button", never, { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "clicked": "clicked"; }, never, never, true, never>;
|
|
10
|
+
}
|
|
11
|
+
export declare class CopilotChatStartTranscribeButton {
|
|
12
|
+
disabled: import("@angular/core").InputSignal<boolean>;
|
|
13
|
+
clicked: import("@angular/core").OutputEmitterRef<void>;
|
|
14
|
+
readonly labels: import("../../chat-config").CopilotChatLabels;
|
|
15
|
+
readonly MicIcon: import("lucide-angular").LucideIconData;
|
|
16
|
+
buttonClass: string;
|
|
17
|
+
get label(): string;
|
|
18
|
+
onClick(): void;
|
|
19
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CopilotChatStartTranscribeButton, never>;
|
|
20
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CopilotChatStartTranscribeButton, "copilot-chat-start-transcribe-button", never, { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "clicked": "clicked"; }, never, never, true, never>;
|
|
21
|
+
}
|
|
22
|
+
export declare class CopilotChatCancelTranscribeButton {
|
|
23
|
+
disabled: import("@angular/core").InputSignal<boolean>;
|
|
24
|
+
clicked: import("@angular/core").OutputEmitterRef<void>;
|
|
25
|
+
readonly labels: import("../../chat-config").CopilotChatLabels;
|
|
26
|
+
readonly XIcon: import("lucide-angular").LucideIconData;
|
|
27
|
+
buttonClass: string;
|
|
28
|
+
get label(): string;
|
|
29
|
+
onClick(): void;
|
|
30
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CopilotChatCancelTranscribeButton, never>;
|
|
31
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CopilotChatCancelTranscribeButton, "copilot-chat-cancel-transcribe-button", never, { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "clicked": "clicked"; }, never, never, true, never>;
|
|
32
|
+
}
|
|
33
|
+
export declare class CopilotChatFinishTranscribeButton {
|
|
34
|
+
disabled: import("@angular/core").InputSignal<boolean>;
|
|
35
|
+
clicked: import("@angular/core").OutputEmitterRef<void>;
|
|
36
|
+
readonly labels: import("../../chat-config").CopilotChatLabels;
|
|
37
|
+
readonly CheckIcon: import("lucide-angular").LucideIconData;
|
|
38
|
+
buttonClass: string;
|
|
39
|
+
get label(): string;
|
|
40
|
+
onClick(): void;
|
|
41
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CopilotChatFinishTranscribeButton, never>;
|
|
42
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CopilotChatFinishTranscribeButton, "copilot-chat-finish-transcribe-button", never, { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "clicked": "clicked"; }, never, never, true, never>;
|
|
43
|
+
}
|
|
44
|
+
export declare class CopilotChatAddFileButton {
|
|
45
|
+
disabled: import("@angular/core").InputSignal<boolean>;
|
|
46
|
+
clicked: import("@angular/core").OutputEmitterRef<void>;
|
|
47
|
+
readonly labels: import("../../chat-config").CopilotChatLabels;
|
|
48
|
+
readonly PlusIcon: import("lucide-angular").LucideIconData;
|
|
49
|
+
buttonClass: string;
|
|
50
|
+
get label(): string;
|
|
51
|
+
onClick(): void;
|
|
52
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CopilotChatAddFileButton, never>;
|
|
53
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CopilotChatAddFileButton, "copilot-chat-add-file-button", never, { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "clicked": "clicked"; }, never, never, true, never>;
|
|
54
|
+
}
|
|
55
|
+
export declare class CopilotChatToolbarButton {
|
|
56
|
+
disabled: import("@angular/core").WritableSignal<boolean>;
|
|
57
|
+
variant: import("@angular/core").WritableSignal<"primary" | "secondary">;
|
|
58
|
+
customClass: import("@angular/core").WritableSignal<string>;
|
|
59
|
+
title: import("@angular/core").WritableSignal<string>;
|
|
60
|
+
clicked: import("@angular/core").OutputEmitterRef<void>;
|
|
61
|
+
computedClass: import("@angular/core").Signal<string>;
|
|
62
|
+
onClick(): void;
|
|
63
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CopilotChatToolbarButton, never>;
|
|
64
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CopilotChatToolbarButton, "copilot-chat-toolbar-button", never, {}, { "clicked": "clicked"; }, never, ["*"], true, never>;
|
|
65
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { CopilotChatTextarea } from "./copilot-chat-textarea";
|
|
2
|
+
import { CopilotChatAudioRecorder } from "./copilot-chat-audio-recorder";
|
|
3
|
+
import { CopilotChatSendButton, CopilotChatStartTranscribeButton, CopilotChatCancelTranscribeButton, CopilotChatFinishTranscribeButton, CopilotChatAddFileButton } from "./copilot-chat-buttons";
|
|
4
|
+
import { CopilotChatToolbar } from "./copilot-chat-toolbar";
|
|
5
|
+
import { CopilotChatToolsMenu } from "./copilot-chat-tools-menu";
|
|
6
|
+
/**
|
|
7
|
+
* Default components used by CopilotChatInput.
|
|
8
|
+
* These can be imported and reused when creating custom slot implementations.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```typescript
|
|
12
|
+
* import { CopilotChatInputDefaults } from '@copilotkitnext/angular';
|
|
13
|
+
*
|
|
14
|
+
* @Component({
|
|
15
|
+
standalone: true,
|
|
16
|
+
* template: `
|
|
17
|
+
* <copilot-chat-input [sendButtonSlot]="CustomSendButton">
|
|
18
|
+
* </copilot-chat-input>
|
|
19
|
+
* `
|
|
20
|
+
* })
|
|
21
|
+
* export class MyComponent {
|
|
22
|
+
* CustomSendButton = class extends CopilotChatInputDefaults.SendButton {
|
|
23
|
+
* // Custom implementation
|
|
24
|
+
* };
|
|
25
|
+
* }
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
export declare class CopilotChatInputDefaults {
|
|
29
|
+
static readonly TextArea: typeof CopilotChatTextarea;
|
|
30
|
+
static readonly AudioRecorder: typeof CopilotChatAudioRecorder;
|
|
31
|
+
static readonly SendButton: typeof CopilotChatSendButton;
|
|
32
|
+
static readonly StartTranscribeButton: typeof CopilotChatStartTranscribeButton;
|
|
33
|
+
static readonly CancelTranscribeButton: typeof CopilotChatCancelTranscribeButton;
|
|
34
|
+
static readonly FinishTranscribeButton: typeof CopilotChatFinishTranscribeButton;
|
|
35
|
+
static readonly AddFileButton: typeof CopilotChatAddFileButton;
|
|
36
|
+
static readonly Toolbar: typeof CopilotChatToolbar;
|
|
37
|
+
static readonly ToolsMenu: typeof CopilotChatToolsMenu;
|
|
38
|
+
}
|