@copilotkitnext/angular 0.0.2 → 0.0.5

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.
Files changed (173) hide show
  1. package/README.md +3 -3
  2. package/dist/README.md +3 -3
  3. package/dist/components/chat/copilot-chat-assistant-message.component.d.ts +10 -10
  4. package/dist/components/chat/copilot-chat-message-view.component.d.ts +42 -42
  5. package/dist/components/chat/copilot-chat-view.component.d.ts +14 -14
  6. package/dist/core/copilotkit.providers.d.ts +1 -1
  7. package/dist/core/copilotkit.service.d.ts +5 -5
  8. package/dist/core/copilotkit.types.d.ts +8 -10
  9. package/dist/directives/copilotkit-frontend-tool.directive.d.ts +1 -1
  10. package/dist/esm2022/components/chat/copilot-chat-assistant-message-buttons.component.mjs +384 -0
  11. package/dist/esm2022/components/chat/copilot-chat-assistant-message-renderer.component.mjs +286 -0
  12. package/dist/esm2022/components/chat/copilot-chat-assistant-message-toolbar.component.mjs +27 -0
  13. package/dist/esm2022/components/chat/copilot-chat-assistant-message.component.mjs +433 -0
  14. package/dist/esm2022/components/chat/copilot-chat-assistant-message.types.mjs +2 -0
  15. package/dist/esm2022/components/chat/copilot-chat-audio-recorder.component.mjs +202 -0
  16. package/dist/esm2022/components/chat/copilot-chat-buttons.component.mjs +321 -0
  17. package/dist/esm2022/components/chat/copilot-chat-input-defaults.mjs +38 -0
  18. package/dist/esm2022/components/chat/copilot-chat-input.component.mjs +666 -0
  19. package/dist/esm2022/components/chat/copilot-chat-input.types.mjs +10 -0
  20. package/dist/esm2022/components/chat/copilot-chat-message-view-cursor.component.mjs +45 -0
  21. package/dist/esm2022/components/chat/copilot-chat-message-view.component.mjs +296 -0
  22. package/dist/esm2022/components/chat/copilot-chat-message-view.types.mjs +2 -0
  23. package/dist/esm2022/components/chat/copilot-chat-textarea.component.mjs +188 -0
  24. package/dist/esm2022/components/chat/copilot-chat-tool-calls-view.component.mjs +216 -0
  25. package/dist/esm2022/components/chat/copilot-chat-toolbar.component.mjs +25 -0
  26. package/dist/esm2022/components/chat/copilot-chat-tools-menu.component.mjs +199 -0
  27. package/dist/esm2022/components/chat/copilot-chat-user-message-branch-navigation.component.mjs +137 -0
  28. package/dist/esm2022/components/chat/copilot-chat-user-message-buttons.component.mjs +207 -0
  29. package/dist/esm2022/components/chat/copilot-chat-user-message-renderer.component.mjs +35 -0
  30. package/dist/esm2022/components/chat/copilot-chat-user-message-toolbar.component.mjs +34 -0
  31. package/dist/esm2022/components/chat/copilot-chat-user-message.component.mjs +341 -0
  32. package/dist/esm2022/components/chat/copilot-chat-user-message.types.mjs +2 -0
  33. package/dist/esm2022/components/chat/copilot-chat-view-disclaimer.component.mjs +52 -0
  34. package/dist/esm2022/components/chat/copilot-chat-view-feather.component.mjs +55 -0
  35. package/dist/esm2022/components/chat/copilot-chat-view-handlers.service.mjs +19 -0
  36. package/dist/esm2022/components/chat/copilot-chat-view-input-container.component.mjs +110 -0
  37. package/dist/esm2022/components/chat/copilot-chat-view-scroll-to-bottom-button.component.mjs +93 -0
  38. package/dist/esm2022/components/chat/copilot-chat-view-scroll-view.component.mjs +443 -0
  39. package/dist/esm2022/components/chat/copilot-chat-view.component.mjs +479 -0
  40. package/dist/esm2022/components/chat/copilot-chat-view.types.mjs +2 -0
  41. package/dist/esm2022/components/chat/copilot-chat.component.mjs +214 -0
  42. package/dist/esm2022/components/copilotkit-tool-render.component.mjs +153 -0
  43. package/dist/esm2022/copilotkitnext-angular.mjs +5 -0
  44. package/dist/esm2022/core/chat-configuration/chat-configuration.providers.mjs +65 -0
  45. package/dist/esm2022/core/chat-configuration/chat-configuration.service.mjs +145 -0
  46. package/dist/esm2022/core/chat-configuration/chat-configuration.types.mjs +26 -0
  47. package/dist/esm2022/core/copilotkit.providers.mjs +34 -0
  48. package/dist/esm2022/core/copilotkit.service.mjs +426 -0
  49. package/dist/esm2022/core/copilotkit.types.mjs +13 -0
  50. package/dist/esm2022/directives/copilotkit-agent-context.directive.mjs +130 -0
  51. package/dist/esm2022/directives/copilotkit-agent.directive.mjs +217 -0
  52. package/dist/esm2022/directives/copilotkit-chat-config.directive.mjs +218 -0
  53. package/dist/esm2022/directives/copilotkit-config.directive.mjs +94 -0
  54. package/dist/esm2022/directives/copilotkit-frontend-tool.directive.mjs +128 -0
  55. package/dist/esm2022/directives/copilotkit-human-in-the-loop.directive.mjs +265 -0
  56. package/dist/esm2022/directives/stick-to-bottom.directive.mjs +181 -0
  57. package/dist/esm2022/index.mjs +70 -0
  58. package/dist/esm2022/lib/directives/tooltip.directive.mjs +211 -0
  59. package/dist/esm2022/lib/slots/copilot-slot.component.mjs +144 -0
  60. package/dist/esm2022/lib/slots/slot.types.mjs +6 -0
  61. package/dist/esm2022/lib/slots/slot.utils.mjs +222 -0
  62. package/dist/esm2022/lib/utils.mjs +10 -0
  63. package/dist/esm2022/services/resize-observer.service.mjs +152 -0
  64. package/dist/esm2022/services/scroll-position.service.mjs +124 -0
  65. package/dist/esm2022/types/frontend-tool.mjs +2 -0
  66. package/dist/esm2022/types/human-in-the-loop.mjs +2 -0
  67. package/dist/esm2022/utils/agent-context.utils.mjs +114 -0
  68. package/dist/esm2022/utils/agent.utils.mjs +204 -0
  69. package/dist/esm2022/utils/chat-config.utils.mjs +186 -0
  70. package/dist/esm2022/utils/copilotkit.utils.mjs +20 -0
  71. package/dist/esm2022/utils/frontend-tool.utils.mjs +224 -0
  72. package/dist/esm2022/utils/human-in-the-loop.utils.mjs +293 -0
  73. package/dist/fesm2022/copilotkitnext-angular.mjs +174 -187
  74. package/dist/fesm2022/copilotkitnext-angular.mjs.map +1 -1
  75. package/dist/utils/frontend-tool.utils.d.ts +1 -1
  76. package/package.json +23 -20
  77. package/vitest.config.mts +32 -21
  78. package/.turbo/turbo-build.log +0 -38
  79. package/.turbo/turbo-check-types.log +0 -0
  80. package/.turbo/turbo-test.log +0 -71
  81. package/ng-package.json +0 -19
  82. package/src/components/chat/__tests__/copilot-chat-assistant-message.component.spec.ts +0 -282
  83. package/src/components/chat/__tests__/copilot-chat-input.component.spec.ts +0 -419
  84. package/src/components/chat/__tests__/copilot-chat-message-view.component.spec.ts +0 -372
  85. package/src/components/chat/__tests__/copilot-chat-user-message.component.spec.ts +0 -249
  86. package/src/components/chat/copilot-chat-assistant-message-buttons.component.ts +0 -292
  87. package/src/components/chat/copilot-chat-assistant-message-renderer.component.ts +0 -472
  88. package/src/components/chat/copilot-chat-assistant-message-toolbar.component.ts +0 -29
  89. package/src/components/chat/copilot-chat-assistant-message.component.ts +0 -463
  90. package/src/components/chat/copilot-chat-assistant-message.types.ts +0 -50
  91. package/src/components/chat/copilot-chat-audio-recorder.component.ts +0 -241
  92. package/src/components/chat/copilot-chat-buttons.component.ts +0 -308
  93. package/src/components/chat/copilot-chat-buttons.component.ts.bak +0 -471
  94. package/src/components/chat/copilot-chat-input-defaults.ts +0 -47
  95. package/src/components/chat/copilot-chat-input.component.ts +0 -512
  96. package/src/components/chat/copilot-chat-input.types.ts +0 -148
  97. package/src/components/chat/copilot-chat-message-view-cursor.component.ts +0 -51
  98. package/src/components/chat/copilot-chat-message-view.component.ts +0 -233
  99. package/src/components/chat/copilot-chat-message-view.types.ts +0 -39
  100. package/src/components/chat/copilot-chat-textarea.component.ts +0 -220
  101. package/src/components/chat/copilot-chat-tool-calls-view.component.ts +0 -261
  102. package/src/components/chat/copilot-chat-toolbar.component.ts +0 -35
  103. package/src/components/chat/copilot-chat-tools-menu.component.ts +0 -185
  104. package/src/components/chat/copilot-chat-user-message-branch-navigation.component.ts +0 -121
  105. package/src/components/chat/copilot-chat-user-message-buttons.component.ts +0 -170
  106. package/src/components/chat/copilot-chat-user-message-renderer.component.ts +0 -37
  107. package/src/components/chat/copilot-chat-user-message-toolbar.component.ts +0 -37
  108. package/src/components/chat/copilot-chat-user-message.component.ts +0 -247
  109. package/src/components/chat/copilot-chat-user-message.types.ts +0 -42
  110. package/src/components/chat/copilot-chat-view-disclaimer.component.ts +0 -51
  111. package/src/components/chat/copilot-chat-view-feather.component.ts +0 -47
  112. package/src/components/chat/copilot-chat-view-handlers.service.ts +0 -14
  113. package/src/components/chat/copilot-chat-view-input-container.component.ts +0 -87
  114. package/src/components/chat/copilot-chat-view-scroll-to-bottom-button.component.ts +0 -79
  115. package/src/components/chat/copilot-chat-view-scroll-view.component.ts +0 -322
  116. package/src/components/chat/copilot-chat-view.component.ts +0 -420
  117. package/src/components/chat/copilot-chat-view.types.ts +0 -52
  118. package/src/components/chat/copilot-chat.component.ts +0 -232
  119. package/src/components/copilotkit-tool-render.component.ts +0 -169
  120. package/src/core/__tests__/copilotkit.service.spec.ts +0 -1051
  121. package/src/core/__tests__/copilotkit.service.wildcard.spec.ts +0 -316
  122. package/src/core/chat-configuration/__tests__/chat-configuration.service.spec.ts +0 -287
  123. package/src/core/chat-configuration/chat-configuration.providers.ts +0 -71
  124. package/src/core/chat-configuration/chat-configuration.service.ts +0 -162
  125. package/src/core/chat-configuration/chat-configuration.types.ts +0 -57
  126. package/src/core/copilotkit.providers.ts +0 -59
  127. package/src/core/copilotkit.service.ts +0 -542
  128. package/src/core/copilotkit.types.ts +0 -132
  129. package/src/directives/__tests__/copilotkit-agent-context.directive.spec.ts +0 -384
  130. package/src/directives/__tests__/copilotkit-agent.directive.spec.ts +0 -253
  131. package/src/directives/__tests__/copilotkit-chat-config.directive.spec.ts +0 -385
  132. package/src/directives/__tests__/copilotkit-config.directive.spec.ts +0 -69
  133. package/src/directives/__tests__/copilotkit-frontend-tool-simple.directive.spec.ts +0 -60
  134. package/src/directives/__tests__/copilotkit-frontend-tool.directive.spec.ts +0 -108
  135. package/src/directives/__tests__/copilotkit-human-in-the-loop.directive.spec.ts +0 -452
  136. package/src/directives/copilotkit-agent-context.directive.ts +0 -138
  137. package/src/directives/copilotkit-agent.directive.ts +0 -225
  138. package/src/directives/copilotkit-chat-config.directive.ts +0 -241
  139. package/src/directives/copilotkit-config.directive.ts +0 -81
  140. package/src/directives/copilotkit-frontend-tool.directive.ts +0 -145
  141. package/src/directives/copilotkit-human-in-the-loop.directive.ts +0 -281
  142. package/src/directives/stick-to-bottom.directive.ts +0 -204
  143. package/src/index.ts +0 -105
  144. package/src/lib/directives/tooltip.directive.ts +0 -292
  145. package/src/lib/slots/__tests__/slot.utils.spec.ts +0 -377
  146. package/src/lib/slots/copilot-slot.component.ts +0 -135
  147. package/src/lib/slots/index.ts +0 -3
  148. package/src/lib/slots/slot.types.ts +0 -64
  149. package/src/lib/slots/slot.utils.ts +0 -289
  150. package/src/lib/utils.ts +0 -10
  151. package/src/public-api.ts +0 -1
  152. package/src/services/resize-observer.service.ts +0 -181
  153. package/src/services/scroll-position.service.ts +0 -169
  154. package/src/styles/globals.css +0 -266
  155. package/src/styles/index.css +0 -3
  156. package/src/test-setup.ts +0 -15
  157. package/src/testing/index.ts +0 -3
  158. package/src/testing/testing.utils.ts +0 -248
  159. package/src/types/frontend-tool.ts +0 -44
  160. package/src/types/human-in-the-loop.ts +0 -52
  161. package/src/utils/__tests__/agent.utils.spec.ts +0 -234
  162. package/src/utils/__tests__/chat-config.utils.spec.ts +0 -306
  163. package/src/utils/__tests__/frontend-tool-inject.spec.ts +0 -350
  164. package/src/utils/__tests__/frontend-tool-integration.spec.ts +0 -199
  165. package/src/utils/__tests__/frontend-tool.utils.spec.ts +0 -272
  166. package/src/utils/__tests__/human-in-the-loop.utils.spec.ts +0 -365
  167. package/src/utils/agent-context.utils.ts +0 -133
  168. package/src/utils/agent.utils.ts +0 -239
  169. package/src/utils/chat-config.utils.ts +0 -221
  170. package/src/utils/copilotkit.utils.ts +0 -20
  171. package/src/utils/frontend-tool.utils.ts +0 -266
  172. package/src/utils/human-in-the-loop.utils.ts +0 -359
  173. package/tsconfig.spec.json +0 -12
package/README.md CHANGED
@@ -13,7 +13,7 @@ This package provides native Angular components, directives, and providers to bu
13
13
 
14
14
  ### Package Installation
15
15
 
16
- Install `@copilotkitnext/angular` in your Angular app (requires Angular 19+):
16
+ Install `@copilotkitnext/angular` in your Angular app (supports Angular 18 and 19):
17
17
 
18
18
  ```bash
19
19
  # pnpm (recommended)
@@ -28,11 +28,11 @@ yarn add @copilotkitnext/angular
28
28
 
29
29
  ### Peer Dependencies
30
30
 
31
- Ensure these are present (Angular 19):
31
+ Ensure these are present (matching your Angular major):
32
32
 
33
33
  - `@angular/core`
34
34
  - `@angular/common`
35
- - `@angular/cdk`
35
+ - `@angular/cdk` (use `^18` with Angular 18, `^19` with Angular 19)
36
36
  - `rxjs`
37
37
  - `tslib`
38
38
 
package/dist/README.md CHANGED
@@ -13,7 +13,7 @@ This package provides native Angular components, directives, and providers to bu
13
13
 
14
14
  ### Package Installation
15
15
 
16
- Install `@copilotkitnext/angular` in your Angular app (requires Angular 19+):
16
+ Install `@copilotkitnext/angular` in your Angular app (supports Angular 18 and 19):
17
17
 
18
18
  ```bash
19
19
  # pnpm (recommended)
@@ -28,11 +28,11 @@ yarn add @copilotkitnext/angular
28
28
 
29
29
  ### Peer Dependencies
30
30
 
31
- Ensure these are present (Angular 19):
31
+ Ensure these are present (matching your Angular major):
32
32
 
33
33
  - `@angular/core`
34
34
  - `@angular/common`
35
- - `@angular/cdk`
35
+ - `@angular/cdk` (use `^18` with Angular 18, `^19` with Angular 19)
36
36
  - `rxjs`
37
37
  - `tslib`
38
38
 
@@ -73,8 +73,8 @@ export declare class CopilotChatAssistantMessageComponent {
73
73
  message: {
74
74
  id: string;
75
75
  role: "assistant";
76
- name?: string | undefined;
77
- content?: string | undefined;
76
+ name?: string;
77
+ content?: string;
78
78
  toolCalls?: {
79
79
  function: {
80
80
  name: string;
@@ -82,23 +82,23 @@ export declare class CopilotChatAssistantMessageComponent {
82
82
  };
83
83
  type: "function";
84
84
  id: string;
85
- }[] | undefined;
85
+ }[];
86
86
  };
87
87
  messages: ({
88
88
  id: string;
89
89
  role: "developer";
90
90
  content: string;
91
- name?: string | undefined;
91
+ name?: string;
92
92
  } | {
93
93
  id: string;
94
94
  role: "system";
95
95
  content: string;
96
- name?: string | undefined;
96
+ name?: string;
97
97
  } | {
98
98
  id: string;
99
99
  role: "assistant";
100
- name?: string | undefined;
101
- content?: string | undefined;
100
+ name?: string;
101
+ content?: string;
102
102
  toolCalls?: {
103
103
  function: {
104
104
  name: string;
@@ -106,18 +106,18 @@ export declare class CopilotChatAssistantMessageComponent {
106
106
  };
107
107
  type: "function";
108
108
  id: string;
109
- }[] | undefined;
109
+ }[];
110
110
  } | {
111
111
  id: string;
112
112
  role: "user";
113
113
  content: string;
114
- name?: string | undefined;
114
+ name?: string;
115
115
  } | {
116
116
  id: string;
117
117
  role: "tool";
118
118
  content: string;
119
119
  toolCallId: string;
120
- error?: string | undefined;
120
+ error?: string;
121
121
  })[];
122
122
  isLoading: boolean;
123
123
  }>;
@@ -49,17 +49,17 @@ export declare class CopilotChatMessageViewComponent implements OnInit, OnChange
49
49
  id: string;
50
50
  role: "developer";
51
51
  content: string;
52
- name?: string | undefined;
52
+ name?: string;
53
53
  } | {
54
54
  id: string;
55
55
  role: "system";
56
56
  content: string;
57
- name?: string | undefined;
57
+ name?: string;
58
58
  } | {
59
59
  id: string;
60
60
  role: "assistant";
61
- name?: string | undefined;
62
- content?: string | undefined;
61
+ name?: string;
62
+ content?: string;
63
63
  toolCalls?: {
64
64
  function: {
65
65
  name: string;
@@ -67,18 +67,18 @@ export declare class CopilotChatMessageViewComponent implements OnInit, OnChange
67
67
  };
68
68
  type: "function";
69
69
  id: string;
70
- }[] | undefined;
70
+ }[];
71
71
  } | {
72
72
  id: string;
73
73
  role: "user";
74
74
  content: string;
75
- name?: string | undefined;
75
+ name?: string;
76
76
  } | {
77
77
  id: string;
78
78
  role: "tool";
79
79
  content: string;
80
80
  toolCallId: string;
81
- error?: string | undefined;
81
+ error?: string;
82
82
  })[]>;
83
83
  protected showCursorSignal: import("@angular/core").WritableSignal<boolean>;
84
84
  protected isLoadingSignal: import("@angular/core").WritableSignal<boolean>;
@@ -90,17 +90,17 @@ export declare class CopilotChatMessageViewComponent implements OnInit, OnChange
90
90
  id: string;
91
91
  role: "developer";
92
92
  content: string;
93
- name?: string | undefined;
93
+ name?: string;
94
94
  } | {
95
95
  id: string;
96
96
  role: "system";
97
97
  content: string;
98
- name?: string | undefined;
98
+ name?: string;
99
99
  } | {
100
100
  id: string;
101
101
  role: "assistant";
102
- name?: string | undefined;
103
- content?: string | undefined;
102
+ name?: string;
103
+ content?: string;
104
104
  toolCalls?: {
105
105
  function: {
106
106
  name: string;
@@ -108,35 +108,35 @@ export declare class CopilotChatMessageViewComponent implements OnInit, OnChange
108
108
  };
109
109
  type: "function";
110
110
  id: string;
111
- }[] | undefined;
111
+ }[];
112
112
  } | {
113
113
  id: string;
114
114
  role: "user";
115
115
  content: string;
116
- name?: string | undefined;
116
+ name?: string;
117
117
  } | {
118
118
  id: string;
119
119
  role: "tool";
120
120
  content: string;
121
121
  toolCallId: string;
122
- error?: string | undefined;
122
+ error?: string;
123
123
  })[];
124
124
  showCursor: boolean;
125
125
  messageElements: ({
126
126
  id: string;
127
127
  role: "developer";
128
128
  content: string;
129
- name?: string | undefined;
129
+ name?: string;
130
130
  } | {
131
131
  id: string;
132
132
  role: "system";
133
133
  content: string;
134
- name?: string | undefined;
134
+ name?: string;
135
135
  } | {
136
136
  id: string;
137
137
  role: "assistant";
138
- name?: string | undefined;
139
- content?: string | undefined;
138
+ name?: string;
139
+ content?: string;
140
140
  toolCalls?: {
141
141
  function: {
142
142
  name: string;
@@ -144,18 +144,18 @@ export declare class CopilotChatMessageViewComponent implements OnInit, OnChange
144
144
  };
145
145
  type: "function";
146
146
  id: string;
147
- }[] | undefined;
147
+ }[];
148
148
  } | {
149
149
  id: string;
150
150
  role: "user";
151
151
  content: string;
152
- name?: string | undefined;
152
+ name?: string;
153
153
  } | {
154
154
  id: string;
155
155
  role: "tool";
156
156
  content: string;
157
157
  toolCallId: string;
158
- error?: string | undefined;
158
+ error?: string;
159
159
  })[];
160
160
  }>;
161
161
  assistantMessageSlot: import("@angular/core").Signal<string | Type<any>>;
@@ -166,17 +166,17 @@ export declare class CopilotChatMessageViewComponent implements OnInit, OnChange
166
166
  id: string;
167
167
  role: "developer";
168
168
  content: string;
169
- name?: string | undefined;
169
+ name?: string;
170
170
  } | {
171
171
  id: string;
172
172
  role: "system";
173
173
  content: string;
174
- name?: string | undefined;
174
+ name?: string;
175
175
  } | {
176
176
  id: string;
177
177
  role: "assistant";
178
- name?: string | undefined;
179
- content?: string | undefined;
178
+ name?: string;
179
+ content?: string;
180
180
  toolCalls?: {
181
181
  function: {
182
182
  name: string;
@@ -184,34 +184,34 @@ export declare class CopilotChatMessageViewComponent implements OnInit, OnChange
184
184
  };
185
185
  type: "function";
186
186
  id: string;
187
- }[] | undefined;
187
+ }[];
188
188
  } | {
189
189
  id: string;
190
190
  role: "user";
191
191
  content: string;
192
- name?: string | undefined;
192
+ name?: string;
193
193
  } | {
194
194
  id: string;
195
195
  role: "tool";
196
196
  content: string;
197
197
  toolCallId: string;
198
- error?: string | undefined;
198
+ error?: string;
199
199
  };
200
200
  messages: ({
201
201
  id: string;
202
202
  role: "developer";
203
203
  content: string;
204
- name?: string | undefined;
204
+ name?: string;
205
205
  } | {
206
206
  id: string;
207
207
  role: "system";
208
208
  content: string;
209
- name?: string | undefined;
209
+ name?: string;
210
210
  } | {
211
211
  id: string;
212
212
  role: "assistant";
213
- name?: string | undefined;
214
- content?: string | undefined;
213
+ name?: string;
214
+ content?: string;
215
215
  toolCalls?: {
216
216
  function: {
217
217
  name: string;
@@ -219,18 +219,18 @@ export declare class CopilotChatMessageViewComponent implements OnInit, OnChange
219
219
  };
220
220
  type: "function";
221
221
  id: string;
222
- }[] | undefined;
222
+ }[];
223
223
  } | {
224
224
  id: string;
225
225
  role: "user";
226
226
  content: string;
227
- name?: string | undefined;
227
+ name?: string;
228
228
  } | {
229
229
  id: string;
230
230
  role: "tool";
231
231
  content: string;
232
232
  toolCallId: string;
233
- error?: string | undefined;
233
+ error?: string;
234
234
  })[];
235
235
  isLoading: boolean;
236
236
  inputClass: string;
@@ -240,17 +240,17 @@ export declare class CopilotChatMessageViewComponent implements OnInit, OnChange
240
240
  id: string;
241
241
  role: "developer";
242
242
  content: string;
243
- name?: string | undefined;
243
+ name?: string;
244
244
  } | {
245
245
  id: string;
246
246
  role: "system";
247
247
  content: string;
248
- name?: string | undefined;
248
+ name?: string;
249
249
  } | {
250
250
  id: string;
251
251
  role: "assistant";
252
- name?: string | undefined;
253
- content?: string | undefined;
252
+ name?: string;
253
+ content?: string;
254
254
  toolCalls?: {
255
255
  function: {
256
256
  name: string;
@@ -258,18 +258,18 @@ export declare class CopilotChatMessageViewComponent implements OnInit, OnChange
258
258
  };
259
259
  type: "function";
260
260
  id: string;
261
- }[] | undefined;
261
+ }[];
262
262
  } | {
263
263
  id: string;
264
264
  role: "user";
265
265
  content: string;
266
- name?: string | undefined;
266
+ name?: string;
267
267
  } | {
268
268
  id: string;
269
269
  role: "tool";
270
270
  content: string;
271
271
  toolCallId: string;
272
- error?: string | undefined;
272
+ error?: string;
273
273
  };
274
274
  inputClass: string;
275
275
  };
@@ -87,17 +87,17 @@ export declare class CopilotChatViewComponent implements OnInit, OnChanges, Afte
87
87
  id: string;
88
88
  role: "developer";
89
89
  content: string;
90
- name?: string | undefined;
90
+ name?: string;
91
91
  } | {
92
92
  id: string;
93
93
  role: "system";
94
94
  content: string;
95
- name?: string | undefined;
95
+ name?: string;
96
96
  } | {
97
97
  id: string;
98
98
  role: "assistant";
99
- name?: string | undefined;
100
- content?: string | undefined;
99
+ name?: string;
100
+ content?: string;
101
101
  toolCalls?: {
102
102
  function: {
103
103
  name: string;
@@ -105,18 +105,18 @@ export declare class CopilotChatViewComponent implements OnInit, OnChanges, Afte
105
105
  };
106
106
  type: "function";
107
107
  id: string;
108
- }[] | undefined;
108
+ }[];
109
109
  } | {
110
110
  id: string;
111
111
  role: "user";
112
112
  content: string;
113
- name?: string | undefined;
113
+ name?: string;
114
114
  } | {
115
115
  id: string;
116
116
  role: "tool";
117
117
  content: string;
118
118
  toolCallId: string;
119
- error?: string | undefined;
119
+ error?: string;
120
120
  })[]>;
121
121
  protected autoScrollSignal: import("@angular/core").WritableSignal<boolean>;
122
122
  protected showCursorSignal: import("@angular/core").WritableSignal<boolean>;
@@ -143,17 +143,17 @@ export declare class CopilotChatViewComponent implements OnInit, OnChanges, Afte
143
143
  id: string;
144
144
  role: "developer";
145
145
  content: string;
146
- name?: string | undefined;
146
+ name?: string;
147
147
  } | {
148
148
  id: string;
149
149
  role: "system";
150
150
  content: string;
151
- name?: string | undefined;
151
+ name?: string;
152
152
  } | {
153
153
  id: string;
154
154
  role: "assistant";
155
- name?: string | undefined;
156
- content?: string | undefined;
155
+ name?: string;
156
+ content?: string;
157
157
  toolCalls?: {
158
158
  function: {
159
159
  name: string;
@@ -161,18 +161,18 @@ export declare class CopilotChatViewComponent implements OnInit, OnChanges, Afte
161
161
  };
162
162
  type: "function";
163
163
  id: string;
164
- }[] | undefined;
164
+ }[];
165
165
  } | {
166
166
  id: string;
167
167
  role: "user";
168
168
  content: string;
169
- name?: string | undefined;
169
+ name?: string;
170
170
  } | {
171
171
  id: string;
172
172
  role: "tool";
173
173
  content: string;
174
174
  toolCallId: string;
175
- error?: string | undefined;
175
+ error?: string;
176
176
  })[];
177
177
  messageView: Type<any> | TemplateRef<any>;
178
178
  messageViewClass: string;
@@ -6,7 +6,7 @@ export interface ProvideCopilotKitOptions {
6
6
  headers?: Record<string, string>;
7
7
  properties?: Record<string, unknown>;
8
8
  agents?: Record<string, AbstractAgent>;
9
- renderToolCalls?: ToolCallRender<unknown>[];
9
+ renderToolCalls?: ToolCallRender[];
10
10
  frontendTools?: AngularFrontendTool<any>[];
11
11
  humanInTheLoop?: AngularHumanInTheLoop<any>[];
12
12
  }
@@ -41,7 +41,7 @@ export declare class CopilotKitService {
41
41
  readonly humanInTheLoop$: any;
42
42
  readonly context: any;
43
43
  readonly context$: any;
44
- constructor(runtimeUrl: string | undefined, headers: Record<string, string>, properties: Record<string, unknown>, agents: Record<string, AbstractAgent>, renderToolCalls: ToolCallRender<unknown>[], frontendTools: AngularFrontendTool<any>[], humanInTheLoop: AngularHumanInTheLoop<any>[]);
44
+ constructor(runtimeUrl: string | undefined, headers: Record<string, string>, properties: Record<string, unknown>, agents: Record<string, AbstractAgent>, renderToolCalls: ToolCallRender[], frontendTools: AngularFrontendTool<any>[], humanInTheLoop: AngularHumanInTheLoop<any>[]);
45
45
  /**
46
46
  * Process frontend tools and human-in-the-loop tools
47
47
  */
@@ -89,7 +89,7 @@ export declare class CopilotKitService {
89
89
  /**
90
90
  * Update render tool calls (warns if object reference changes)
91
91
  */
92
- setRenderToolCalls(renderToolCalls: ToolCallRender<unknown>[]): void;
92
+ setRenderToolCalls(renderToolCalls: ToolCallRender[]): void;
93
93
  /**
94
94
  * Update frontend tools array
95
95
  */
@@ -101,11 +101,11 @@ export declare class CopilotKitService {
101
101
  /**
102
102
  * Update current render tool calls
103
103
  */
104
- setCurrentRenderToolCalls(renderToolCalls: ToolCallRender<unknown>[]): void;
104
+ setCurrentRenderToolCalls(renderToolCalls: ToolCallRender[]): void;
105
105
  /**
106
106
  * Register a tool render
107
107
  */
108
- registerToolRender(name: string, render: ToolCallRender<unknown>): void;
108
+ registerToolRender(name: string, render: ToolCallRender): void;
109
109
  /**
110
110
  * Unregister a tool render
111
111
  */
@@ -113,7 +113,7 @@ export declare class CopilotKitService {
113
113
  /**
114
114
  * Get a specific tool render
115
115
  */
116
- getToolRender(name: string): ToolCallRender<unknown> | undefined;
116
+ getToolRender(name: string): ToolCallRender | undefined;
117
117
  static ɵfac: i0.ɵɵFactoryDeclaration<CopilotKitService, never>;
118
118
  static ɵprov: i0.ɵɵInjectableDeclaration<CopilotKitService>;
119
119
  }
@@ -2,7 +2,6 @@ import { InjectionToken, TemplateRef, Type, Signal } from "@angular/core";
2
2
  import { Observable } from "rxjs";
3
3
  import { CopilotKitCore, ToolCallStatus } from "@copilotkitnext/core";
4
4
  import { AbstractAgent } from "@ag-ui/client";
5
- import type { z } from "zod";
6
5
  import type { AngularFrontendTool } from "../types/frontend-tool";
7
6
  import type { AngularHumanInTheLoop } from "../types/human-in-the-loop";
8
7
  export type { Context } from "@ag-ui/client";
@@ -28,35 +27,34 @@ export type ToolCallProps<T = unknown> = {
28
27
  status: ToolCallStatus.Complete;
29
28
  result: string;
30
29
  };
31
- export interface AngularToolCallRender<T = unknown> {
30
+ export interface AngularToolCallRender {
32
31
  name: string;
33
- args: z.ZodSchema<T>;
34
32
  /**
35
33
  * Optional agent ID to constrain this tool render to a specific agent.
36
34
  * If specified, this render will only be used for the specified agent.
37
35
  */
38
36
  agentId?: string;
39
- render: Type<any> | TemplateRef<ToolCallProps<T>>;
37
+ render: Type<any> | TemplateRef<ToolCallProps<any>>;
40
38
  }
41
- export type ToolCallRender<T = unknown> = AngularToolCallRender<T>;
39
+ export type ToolCallRender = AngularToolCallRender;
42
40
  export interface CopilotKitContextValue {
43
41
  copilotkit: CopilotKitCore;
44
- renderToolCalls: ToolCallRender<unknown>[];
45
- currentRenderToolCalls: ToolCallRender<unknown>[];
46
- setCurrentRenderToolCalls: (v: ToolCallRender<unknown>[]) => void;
42
+ renderToolCalls: ToolCallRender[];
43
+ currentRenderToolCalls: ToolCallRender[];
44
+ setCurrentRenderToolCalls: (v: ToolCallRender[]) => void;
47
45
  }
48
46
  export interface CopilotKitRuntimeInputs {
49
47
  runtimeUrl?: string;
50
48
  headers?: Record<string, string>;
51
49
  properties?: Record<string, unknown>;
52
50
  agents?: Record<string, AbstractAgent>;
53
- renderToolCalls?: ToolCallRender<unknown>[];
51
+ renderToolCalls?: ToolCallRender[];
54
52
  }
55
53
  export declare const COPILOTKIT_RUNTIME_URL: InjectionToken<string>;
56
54
  export declare const COPILOTKIT_HEADERS: InjectionToken<Record<string, string>>;
57
55
  export declare const COPILOTKIT_PROPERTIES: InjectionToken<Record<string, unknown>>;
58
56
  export declare const COPILOTKIT_AGENTS: InjectionToken<Record<string, AbstractAgent>>;
59
- export declare const COPILOTKIT_RENDER_TOOL_CALLS: InjectionToken<ToolCallRender<unknown>[]>;
57
+ export declare const COPILOTKIT_RENDER_TOOL_CALLS: InjectionToken<AngularToolCallRender[]>;
60
58
  export declare const COPILOTKIT_FRONTEND_TOOLS: InjectionToken<AngularFrontendTool<any>[]>;
61
59
  export declare const COPILOTKIT_HUMAN_IN_THE_LOOP: InjectionToken<AngularHumanInTheLoop<any>[]>;
62
60
  import type { Message } from "@ag-ui/client";
@@ -1,7 +1,7 @@
1
1
  import { OnInit, OnChanges, OnDestroy, SimpleChanges, TemplateRef, Type } from "@angular/core";
2
2
  import { CopilotKitService } from "../core/copilotkit.service";
3
3
  import type { AngularFrontendTool } from "../core/copilotkit.types";
4
- import { z } from "zod";
4
+ import type { z } from "zod";
5
5
  import * as i0 from "@angular/core";
6
6
  export declare class CopilotKitFrontendToolDirective<T extends Record<string, any> = Record<string, any>> implements OnInit, OnChanges, OnDestroy {
7
7
  private readonly copilotkit;