@copilotkitnext/angular 0.0.19-alpha.0 → 0.0.20
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/lib/agent-context.mjs +25 -0
- package/dist/esm2022/lib/components/chat/copilot-chat-user-message-branch-navigation.mjs +26 -6
- package/dist/esm2022/lib/components/chat/copilot-chat-user-message.mjs +34 -36
- package/dist/esm2022/lib/components/chat/copilot-chat-user-message.types.mjs +1 -1
- package/dist/esm2022/lib/copilotkit.mjs +7 -16
- package/dist/esm2022/lib/render-tool-calls.mjs +24 -6
- package/dist/esm2022/lib/tools.mjs +1 -1
- package/dist/esm2022/public-api.mjs +2 -1
- package/dist/fesm2022/copilotkitnext-angular.mjs +110 -60
- package/dist/fesm2022/copilotkitnext-angular.mjs.map +1 -1
- package/dist/lib/agent-context.d.ts +12 -0
- package/dist/lib/agent.d.ts +1 -16
- package/dist/lib/components/chat/copilot-chat-assistant-message.d.ts +2 -32
- package/dist/lib/components/chat/copilot-chat-message-view.d.ts +7 -112
- package/dist/lib/components/chat/copilot-chat-tool-calls-view.d.ts +1 -16
- package/dist/lib/components/chat/copilot-chat-user-message-branch-navigation.d.ts +2 -17
- package/dist/lib/components/chat/copilot-chat-user-message.d.ts +2 -18
- package/dist/lib/components/chat/copilot-chat-user-message.types.d.ts +7 -1
- package/dist/lib/components/chat/copilot-chat-view-scroll-view.d.ts +1 -16
- package/dist/lib/components/chat/copilot-chat-view.d.ts +3 -48
- package/dist/lib/components/chat/copilot-chat.d.ts +1 -16
- package/dist/lib/render-tool-calls.d.ts +1 -16
- package/dist/lib/tools.d.ts +5 -3
- package/dist/public-api.d.ts +1 -0
- package/package.json +5 -5
- package/vitest.config.mts.timestamp-1760727629337-603c9e5c1f334.mjs +49 -0
|
@@ -28,4 +28,4 @@ export function registerHumanInTheLoop(humanInTheLoop) {
|
|
|
28
28
|
copilotKit.removeTool(humanInTheLoop.name);
|
|
29
29
|
});
|
|
30
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lKTtcbiAgfSk7XG59XG4iXX0=
|
|
@@ -8,6 +8,7 @@ export * from "./lib/chat-state";
|
|
|
8
8
|
export * from "./lib/scroll-position";
|
|
9
9
|
export * from "./lib/resize-observer";
|
|
10
10
|
export * from "./lib/utils";
|
|
11
|
+
export * from "./lib/agent-context";
|
|
11
12
|
export * from "./lib/slots";
|
|
12
13
|
export * from "./lib/directives/copilotkit-agent-context";
|
|
13
14
|
export * from "./lib/directives/stick-to-bottom";
|
|
@@ -44,4 +45,4 @@ export * from "./lib/components/chat/copilot-chat-view-input-container";
|
|
|
44
45
|
export * from "./lib/components/chat/copilot-chat-view-scroll-to-bottom-button";
|
|
45
46
|
export * from "./lib/components/chat/copilot-chat-view-scroll-view";
|
|
46
47
|
export * from "./lib/components/chat/copilot-chat-view.types";
|
|
47
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
48
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9wdWJsaWMtYXBpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsY0FBYyxDQUFDO0FBQzdCLGNBQWMsa0JBQWtCLENBQUM7QUFDakMsY0FBYyxhQUFhLENBQUM7QUFDNUIsY0FBYyx5QkFBeUIsQ0FBQztBQUN4QyxjQUFjLGFBQWEsQ0FBQztBQUM1QixjQUFjLG1CQUFtQixDQUFDO0FBQ2xDLGNBQWMsa0JBQWtCLENBQUM7QUFDakMsY0FBYyx1QkFBdUIsQ0FBQztBQUN0QyxjQUFjLHVCQUF1QixDQUFDO0FBQ3RDLGNBQWMsYUFBYSxDQUFDO0FBQzVCLGNBQWMscUJBQXFCLENBQUM7QUFFcEMsY0FBYyxhQUFhLENBQUM7QUFFNUIsY0FBYywyQ0FBMkMsQ0FBQztBQUMxRCxjQUFjLGtDQUFrQyxDQUFDO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sYWltZXJcIjtcbmV4cG9ydCAqIGZyb20gXCIuL2xpYi9jb21wb25lbnRzL2NoYXQvY29waWxvdC1jaGF0LXZpZXctZmVhdGhlclwiO1xuZXhwb3J0ICogZnJvbSBcIi4vbGliL2NvbXBvbmVudHMvY2hhdC9jb3BpbG90LWNoYXQtdmlldy1oYW5kbGVyc1wiO1xuZXhwb3J0ICogZnJvbSBcIi4vbGliL2NvbXBvbmVudHMvY2hhdC9jb3BpbG90LWNoYXQtdmlldy1pbnB1dC1jb250YWluZXJcIjtcbmV4cG9ydCAqIGZyb20gXCIuL2xpYi9jb21wb25lbnRzL2NoYXQvY29waWxvdC1jaGF0LXZpZXctc2Nyb2xsLXRvLWJvdHRvbS1idXR0b25cIjtcbmV4cG9ydCAqIGZyb20gXCIuL2xpYi9jb21wb25lbnRzL2NoYXQvY29waWxvdC1jaGF0LXZpZXctc2Nyb2xsLXZpZXdcIjtcbmV4cG9ydCAqIGZyb20gXCIuL2xpYi9jb21wb25lbnRzL2NoYXQvY29waWxvdC1jaGF0LXZpZXcudHlwZXNcIjtcbiJdfQ==
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, inject, Injectable, Injector, signal, runInInjectionContext, DestroyRef, input, Component, computed, ElementRef, TemplateRef, ViewContainerRef, ViewChild, Inject, ChangeDetectionStrategy, Input, Directive, output, HostListener,
|
|
2
|
+
import { InjectionToken, inject, Injectable, Injector, signal, runInInjectionContext, DestroyRef, input, Component, computed, ElementRef, effect, TemplateRef, ViewContainerRef, ViewChild, Inject, ChangeDetectionStrategy, Input, Directive, output, HostListener, ViewEncapsulation, ContentChild, Optional, ChangeDetectorRef, PLATFORM_ID, forwardRef } from '@angular/core';
|
|
3
3
|
import { CopilotKitCore, completePartialMarkdown } from '@copilotkitnext/core';
|
|
4
4
|
import { Subject, lastValueFrom, filter, take, BehaviorSubject, merge, fromEvent, animationFrameScheduler } from 'rxjs';
|
|
5
5
|
import * as i1$1 from '@angular/common';
|
|
@@ -99,10 +99,7 @@ class CopilotKit {
|
|
|
99
99
|
addFrontendTool(clientToolWithInjector) {
|
|
100
100
|
const tool = this.#bindClientTool(clientToolWithInjector);
|
|
101
101
|
this.core.addTool(tool);
|
|
102
|
-
this.#clientToolCallRenderConfigs.update((current) => [
|
|
103
|
-
...current,
|
|
104
|
-
clientToolWithInjector,
|
|
105
|
-
]);
|
|
102
|
+
this.#clientToolCallRenderConfigs.update((current) => [...current, clientToolWithInjector]);
|
|
106
103
|
}
|
|
107
104
|
addRenderToolCall(renderConfig) {
|
|
108
105
|
this.#toolCallRenderConfigs.update((current) => [...current, renderConfig]);
|
|
@@ -116,10 +113,7 @@ class CopilotKit {
|
|
|
116
113
|
};
|
|
117
114
|
}
|
|
118
115
|
addHumanInTheLoop(humanInTheLoopTool) {
|
|
119
|
-
this.#humanInTheLoopToolRenderConfigs.update((current) => [
|
|
120
|
-
...current,
|
|
121
|
-
humanInTheLoopTool,
|
|
122
|
-
]);
|
|
116
|
+
this.#humanInTheLoopToolRenderConfigs.update((current) => [...current, humanInTheLoopTool]);
|
|
123
117
|
const tool = this.#bindHumanInTheLoopTool(humanInTheLoopTool);
|
|
124
118
|
this.core.addTool(tool);
|
|
125
119
|
}
|
|
@@ -131,12 +125,9 @@ class CopilotKit {
|
|
|
131
125
|
}
|
|
132
126
|
removeTool(toolName, agentId) {
|
|
133
127
|
this.core.removeTool(toolName);
|
|
134
|
-
this.#clientToolCallRenderConfigs.update((current) => current.filter((renderConfig) => renderConfig.name !== toolName &&
|
|
135
|
-
|
|
136
|
-
this.#
|
|
137
|
-
this.#isSameAgentId(renderConfig, agentId)));
|
|
138
|
-
this.#toolCallRenderConfigs.update((current) => current.filter((renderConfig) => renderConfig.name !== toolName &&
|
|
139
|
-
this.#isSameAgentId(renderConfig, agentId)));
|
|
128
|
+
this.#clientToolCallRenderConfigs.update((current) => current.filter((renderConfig) => renderConfig.name !== toolName && this.#isSameAgentId(renderConfig, agentId)));
|
|
129
|
+
this.#humanInTheLoopToolRenderConfigs.update((current) => current.filter((renderConfig) => renderConfig.name !== toolName && this.#isSameAgentId(renderConfig, agentId)));
|
|
130
|
+
this.#toolCallRenderConfigs.update((current) => current.filter((renderConfig) => renderConfig.name !== toolName && this.#isSameAgentId(renderConfig, agentId)));
|
|
140
131
|
}
|
|
141
132
|
getAgent(agentId) {
|
|
142
133
|
return this.core.getAgent(agentId);
|
|
@@ -245,11 +236,15 @@ class RenderToolCalls {
|
|
|
245
236
|
buildHumanInTheLoopToolCall(toolCall) {
|
|
246
237
|
const args = partialJSONParse(toolCall.function.arguments);
|
|
247
238
|
const message = this.#getToolMessage(toolCall.id);
|
|
239
|
+
const respond = (result) => {
|
|
240
|
+
this.#hitl.addResult(toolCall.id, toolCall.function.name, result);
|
|
241
|
+
};
|
|
248
242
|
if (message) {
|
|
249
243
|
return {
|
|
250
244
|
args,
|
|
251
245
|
status: "complete",
|
|
252
246
|
result: message.content,
|
|
247
|
+
respond,
|
|
253
248
|
};
|
|
254
249
|
}
|
|
255
250
|
else if (this.isLoading()) {
|
|
@@ -257,6 +252,7 @@ class RenderToolCalls {
|
|
|
257
252
|
args,
|
|
258
253
|
status: "in-progress",
|
|
259
254
|
result: undefined,
|
|
255
|
+
respond,
|
|
260
256
|
};
|
|
261
257
|
}
|
|
262
258
|
else {
|
|
@@ -264,15 +260,12 @@ class RenderToolCalls {
|
|
|
264
260
|
args,
|
|
265
261
|
status: "executing",
|
|
266
262
|
result: undefined,
|
|
267
|
-
respond
|
|
268
|
-
this.#hitl.addResult(toolCall.id, toolCall.function.name, result);
|
|
269
|
-
},
|
|
263
|
+
respond,
|
|
270
264
|
};
|
|
271
265
|
}
|
|
272
266
|
}
|
|
273
267
|
#getToolMessage(toolCallId) {
|
|
274
|
-
|
|
275
|
-
return message;
|
|
268
|
+
return this.messages().find((m) => m.role === "tool" && m.toolCallId === toolCallId);
|
|
276
269
|
}
|
|
277
270
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RenderToolCalls, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
278
271
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: RenderToolCalls, isStandalone: true, selector: "copilot-render-tool-calls", inputs: { message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: true, transformFunction: null }, messages: { classPropertyName: "messages", publicName: "messages", isSignal: true, isRequired: true, transformFunction: null }, isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
@@ -283,6 +276,14 @@ class RenderToolCalls {
|
|
|
283
276
|
*ngComponentOutlet="renderConfig.config.component; inputs: { toolCall: buildToolCall(toolCall) }"
|
|
284
277
|
/>
|
|
285
278
|
}
|
|
279
|
+
@if (renderConfig && renderConfig.type === "humanInTheLoopTool" && renderConfig.config.component) {
|
|
280
|
+
<ng-container
|
|
281
|
+
*ngComponentOutlet="
|
|
282
|
+
renderConfig.config.component;
|
|
283
|
+
inputs: { toolCall: buildHumanInTheLoopToolCall(toolCall) }
|
|
284
|
+
"
|
|
285
|
+
/>
|
|
286
|
+
}
|
|
286
287
|
}
|
|
287
288
|
`, isInline: true, dependencies: [{ kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"] }] });
|
|
288
289
|
}
|
|
@@ -300,6 +301,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
300
301
|
*ngComponentOutlet="renderConfig.config.component; inputs: { toolCall: buildToolCall(toolCall) }"
|
|
301
302
|
/>
|
|
302
303
|
}
|
|
304
|
+
@if (renderConfig && renderConfig.type === "humanInTheLoopTool" && renderConfig.config.component) {
|
|
305
|
+
<ng-container
|
|
306
|
+
*ngComponentOutlet="
|
|
307
|
+
renderConfig.config.component;
|
|
308
|
+
inputs: { toolCall: buildHumanInTheLoopToolCall(toolCall) }
|
|
309
|
+
"
|
|
310
|
+
/>
|
|
311
|
+
}
|
|
303
312
|
}
|
|
304
313
|
`,
|
|
305
314
|
}]
|
|
@@ -699,6 +708,29 @@ function cn(...inputs) {
|
|
|
699
708
|
return twMerge(clsx(inputs));
|
|
700
709
|
}
|
|
701
710
|
|
|
711
|
+
/**
|
|
712
|
+
* Connects context to the agent.
|
|
713
|
+
*
|
|
714
|
+
* @param context - The context (or a signal of context) to connect to the agent.
|
|
715
|
+
* @param config - Optional configuration for connecting the context.
|
|
716
|
+
*/
|
|
717
|
+
function connectAgentContext(context, config) {
|
|
718
|
+
const injector = inject(Injector, { optional: true }) ?? config?.injector;
|
|
719
|
+
if (!injector) {
|
|
720
|
+
throw new Error("Injector not found. You must call connectAgentContext in an injector context or pass an injector in the config");
|
|
721
|
+
}
|
|
722
|
+
runInInjectionContext(injector, () => {
|
|
723
|
+
const copilotkit = inject(CopilotKit);
|
|
724
|
+
effect((teardown) => {
|
|
725
|
+
const contextValue = typeof context === "function" ? context() : context;
|
|
726
|
+
const id = copilotkit.core.addContext(contextValue);
|
|
727
|
+
teardown(() => {
|
|
728
|
+
copilotkit.core.removeContext(id);
|
|
729
|
+
});
|
|
730
|
+
});
|
|
731
|
+
});
|
|
732
|
+
}
|
|
733
|
+
|
|
702
734
|
/**
|
|
703
735
|
* Injection token for slot configuration
|
|
704
736
|
*/
|
|
@@ -2918,13 +2950,23 @@ class CopilotChatUserMessageBranchNavigation {
|
|
|
2918
2950
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: CopilotChatUserMessageBranchNavigation, isStandalone: true, selector: "copilot-chat-user-message-branch-navigation", inputs: { currentBranch: { classPropertyName: "currentBranch", publicName: "currentBranch", isSignal: true, isRequired: false, transformFunction: null }, numberOfBranches: { classPropertyName: "numberOfBranches", publicName: "numberOfBranches", isSignal: true, isRequired: false, transformFunction: null }, message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: false, transformFunction: null }, inputClass: { classPropertyName: "inputClass", publicName: "inputClass", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { switchToBranch: "switchToBranch" }, ngImport: i0, template: `
|
|
2919
2951
|
@if (showNavigation()) {
|
|
2920
2952
|
<div [class]="computedClass()">
|
|
2921
|
-
<button
|
|
2953
|
+
<button
|
|
2954
|
+
type="button"
|
|
2955
|
+
[class]="buttonClass"
|
|
2956
|
+
[disabled]="!canGoPrev()"
|
|
2957
|
+
(click)="handlePrevious()"
|
|
2958
|
+
>
|
|
2922
2959
|
<lucide-angular [img]="ChevronLeftIcon" [size]="20"></lucide-angular>
|
|
2923
2960
|
</button>
|
|
2924
2961
|
<span class="text-sm text-muted-foreground px-0 font-medium">
|
|
2925
2962
|
{{ currentBranch() + 1 }}/{{ numberOfBranches() }}
|
|
2926
2963
|
</span>
|
|
2927
|
-
<button
|
|
2964
|
+
<button
|
|
2965
|
+
type="button"
|
|
2966
|
+
[class]="buttonClass"
|
|
2967
|
+
[disabled]="!canGoNext()"
|
|
2968
|
+
(click)="handleNext()"
|
|
2969
|
+
>
|
|
2928
2970
|
<lucide-angular [img]="ChevronRightIcon" [size]="20"></lucide-angular>
|
|
2929
2971
|
</button>
|
|
2930
2972
|
</div>
|
|
@@ -2942,13 +2984,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
2942
2984
|
template: `
|
|
2943
2985
|
@if (showNavigation()) {
|
|
2944
2986
|
<div [class]="computedClass()">
|
|
2945
|
-
<button
|
|
2987
|
+
<button
|
|
2988
|
+
type="button"
|
|
2989
|
+
[class]="buttonClass"
|
|
2990
|
+
[disabled]="!canGoPrev()"
|
|
2991
|
+
(click)="handlePrevious()"
|
|
2992
|
+
>
|
|
2946
2993
|
<lucide-angular [img]="ChevronLeftIcon" [size]="20"></lucide-angular>
|
|
2947
2994
|
</button>
|
|
2948
2995
|
<span class="text-sm text-muted-foreground px-0 font-medium">
|
|
2949
2996
|
{{ currentBranch() + 1 }}/{{ numberOfBranches() }}
|
|
2950
2997
|
</span>
|
|
2951
|
-
<button
|
|
2998
|
+
<button
|
|
2999
|
+
type="button"
|
|
3000
|
+
[class]="buttonClass"
|
|
3001
|
+
[disabled]="!canGoNext()"
|
|
3002
|
+
(click)="handleNext()"
|
|
3003
|
+
>
|
|
2952
3004
|
<lucide-angular [img]="ChevronRightIcon" [size]="20"></lucide-angular>
|
|
2953
3005
|
</button>
|
|
2954
3006
|
</div>
|
|
@@ -2957,27 +3009,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
2957
3009
|
}]
|
|
2958
3010
|
}] });
|
|
2959
3011
|
|
|
2960
|
-
function flattenUserMessageContent(content) {
|
|
2961
|
-
if (!content) {
|
|
2962
|
-
return "";
|
|
2963
|
-
}
|
|
2964
|
-
if (typeof content === "string") {
|
|
2965
|
-
return content;
|
|
2966
|
-
}
|
|
2967
|
-
return content
|
|
2968
|
-
.map((part) => {
|
|
2969
|
-
if (part &&
|
|
2970
|
-
typeof part === "object" &&
|
|
2971
|
-
"type" in part &&
|
|
2972
|
-
part.type === "text" &&
|
|
2973
|
-
typeof part.text === "string") {
|
|
2974
|
-
return part.text;
|
|
2975
|
-
}
|
|
2976
|
-
return "";
|
|
2977
|
-
})
|
|
2978
|
-
.filter((text) => text.length > 0)
|
|
2979
|
-
.join("\n");
|
|
2980
|
-
}
|
|
2981
3012
|
class CopilotChatUserMessage {
|
|
2982
3013
|
// Capture templates from content projection
|
|
2983
3014
|
messageRendererTemplate;
|
|
@@ -3019,9 +3050,8 @@ class CopilotChatUserMessage {
|
|
|
3019
3050
|
showBranchNavigation = computed(() => (this.numberOfBranches() ?? 1) > 1);
|
|
3020
3051
|
computedClass = computed(() => cn("flex flex-col items-end group pt-10", this.inputClass()));
|
|
3021
3052
|
// Context for slots (reactive via signals)
|
|
3022
|
-
flattenedContent = computed(() => flattenUserMessageContent(this.message()?.content));
|
|
3023
3053
|
messageRendererContext = computed(() => ({
|
|
3024
|
-
content: this.
|
|
3054
|
+
content: this.message()?.content || "",
|
|
3025
3055
|
}));
|
|
3026
3056
|
// Output maps for slots
|
|
3027
3057
|
copyButtonOutputs = { clicked: () => this.handleCopy() };
|
|
@@ -3058,7 +3088,10 @@ class CopilotChatUserMessage {
|
|
|
3058
3088
|
>
|
|
3059
3089
|
</copilot-slot>
|
|
3060
3090
|
} @else {
|
|
3061
|
-
<copilot-chat-user-message-renderer
|
|
3091
|
+
<copilot-chat-user-message-renderer
|
|
3092
|
+
[content]="message()?.content || ''"
|
|
3093
|
+
[inputClass]="messageRendererClass()"
|
|
3094
|
+
>
|
|
3062
3095
|
</copilot-chat-user-message-renderer>
|
|
3063
3096
|
}
|
|
3064
3097
|
|
|
@@ -3075,21 +3108,23 @@ class CopilotChatUserMessage {
|
|
|
3075
3108
|
<div class="flex items-center gap-1 justify-end">
|
|
3076
3109
|
<!-- Additional toolbar items -->
|
|
3077
3110
|
@if (additionalToolbarItems()) {
|
|
3078
|
-
<ng-container
|
|
3111
|
+
<ng-container
|
|
3112
|
+
[ngTemplateOutlet]="additionalToolbarItems() || null"
|
|
3113
|
+
></ng-container>
|
|
3079
3114
|
}
|
|
3080
3115
|
|
|
3081
3116
|
<!-- Copy button -->
|
|
3082
3117
|
@if (copyButtonTemplate || copyButtonComponent()) {
|
|
3083
3118
|
<copilot-slot
|
|
3084
3119
|
[slot]="copyButtonTemplate || copyButtonComponent()"
|
|
3085
|
-
[context]="{ content:
|
|
3120
|
+
[context]="{ content: message()?.content || '' }"
|
|
3086
3121
|
[outputs]="copyButtonOutputs"
|
|
3087
3122
|
[defaultComponent]="CopilotChatUserMessageCopyButton"
|
|
3088
3123
|
>
|
|
3089
3124
|
</copilot-slot>
|
|
3090
3125
|
} @else {
|
|
3091
3126
|
<copilot-chat-user-message-copy-button
|
|
3092
|
-
[content]="
|
|
3127
|
+
[content]="message()?.content"
|
|
3093
3128
|
[inputClass]="copyButtonClass()"
|
|
3094
3129
|
(clicked)="handleCopy()"
|
|
3095
3130
|
>
|
|
@@ -3107,7 +3142,10 @@ class CopilotChatUserMessage {
|
|
|
3107
3142
|
>
|
|
3108
3143
|
</copilot-slot>
|
|
3109
3144
|
} @else {
|
|
3110
|
-
<copilot-chat-user-message-edit-button
|
|
3145
|
+
<copilot-chat-user-message-edit-button
|
|
3146
|
+
[inputClass]="editButtonClass()"
|
|
3147
|
+
(clicked)="handleEdit()"
|
|
3148
|
+
>
|
|
3111
3149
|
</copilot-chat-user-message-edit-button>
|
|
3112
3150
|
}
|
|
3113
3151
|
}
|
|
@@ -3116,7 +3154,9 @@ class CopilotChatUserMessage {
|
|
|
3116
3154
|
@if (showBranchNavigation()) {
|
|
3117
3155
|
@if (branchNavigationTemplate || branchNavigationComponent()) {
|
|
3118
3156
|
<copilot-slot
|
|
3119
|
-
[slot]="
|
|
3157
|
+
[slot]="
|
|
3158
|
+
branchNavigationTemplate || branchNavigationComponent()
|
|
3159
|
+
"
|
|
3120
3160
|
[context]="branchNavigationContext()"
|
|
3121
3161
|
[defaultComponent]="CopilotChatUserMessageBranchNavigation"
|
|
3122
3162
|
>
|
|
@@ -3159,7 +3199,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
3159
3199
|
>
|
|
3160
3200
|
</copilot-slot>
|
|
3161
3201
|
} @else {
|
|
3162
|
-
<copilot-chat-user-message-renderer
|
|
3202
|
+
<copilot-chat-user-message-renderer
|
|
3203
|
+
[content]="message()?.content || ''"
|
|
3204
|
+
[inputClass]="messageRendererClass()"
|
|
3205
|
+
>
|
|
3163
3206
|
</copilot-chat-user-message-renderer>
|
|
3164
3207
|
}
|
|
3165
3208
|
|
|
@@ -3176,21 +3219,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
3176
3219
|
<div class="flex items-center gap-1 justify-end">
|
|
3177
3220
|
<!-- Additional toolbar items -->
|
|
3178
3221
|
@if (additionalToolbarItems()) {
|
|
3179
|
-
<ng-container
|
|
3222
|
+
<ng-container
|
|
3223
|
+
[ngTemplateOutlet]="additionalToolbarItems() || null"
|
|
3224
|
+
></ng-container>
|
|
3180
3225
|
}
|
|
3181
3226
|
|
|
3182
3227
|
<!-- Copy button -->
|
|
3183
3228
|
@if (copyButtonTemplate || copyButtonComponent()) {
|
|
3184
3229
|
<copilot-slot
|
|
3185
3230
|
[slot]="copyButtonTemplate || copyButtonComponent()"
|
|
3186
|
-
[context]="{ content:
|
|
3231
|
+
[context]="{ content: message()?.content || '' }"
|
|
3187
3232
|
[outputs]="copyButtonOutputs"
|
|
3188
3233
|
[defaultComponent]="CopilotChatUserMessageCopyButton"
|
|
3189
3234
|
>
|
|
3190
3235
|
</copilot-slot>
|
|
3191
3236
|
} @else {
|
|
3192
3237
|
<copilot-chat-user-message-copy-button
|
|
3193
|
-
[content]="
|
|
3238
|
+
[content]="message()?.content"
|
|
3194
3239
|
[inputClass]="copyButtonClass()"
|
|
3195
3240
|
(clicked)="handleCopy()"
|
|
3196
3241
|
>
|
|
@@ -3208,7 +3253,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
3208
3253
|
>
|
|
3209
3254
|
</copilot-slot>
|
|
3210
3255
|
} @else {
|
|
3211
|
-
<copilot-chat-user-message-edit-button
|
|
3256
|
+
<copilot-chat-user-message-edit-button
|
|
3257
|
+
[inputClass]="editButtonClass()"
|
|
3258
|
+
(clicked)="handleEdit()"
|
|
3259
|
+
>
|
|
3212
3260
|
</copilot-chat-user-message-edit-button>
|
|
3213
3261
|
}
|
|
3214
3262
|
}
|
|
@@ -3217,7 +3265,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
3217
3265
|
@if (showBranchNavigation()) {
|
|
3218
3266
|
@if (branchNavigationTemplate || branchNavigationComponent()) {
|
|
3219
3267
|
<copilot-slot
|
|
3220
|
-
[slot]="
|
|
3268
|
+
[slot]="
|
|
3269
|
+
branchNavigationTemplate || branchNavigationComponent()
|
|
3270
|
+
"
|
|
3221
3271
|
[context]="branchNavigationContext()"
|
|
3222
3272
|
[defaultComponent]="CopilotChatUserMessageBranchNavigation"
|
|
3223
3273
|
>
|
|
@@ -6273,5 +6323,5 @@ class CopilotChatInputDefaults {
|
|
|
6273
6323
|
* Generated bundle index. Do not edit.
|
|
6274
6324
|
*/
|
|
6275
6325
|
|
|
6276
|
-
export { AgentStore, AudioRecorderError, COPILOT_CHAT_DEFAULT_LABELS, COPILOT_CHAT_LABELS, COPILOT_KIT_CONFIG, ChatState, CopilotChat, CopilotChatAddFileButton, CopilotChatAssistantMessage, CopilotChatAssistantMessageCopyButton, CopilotChatAssistantMessageReadAloudButton, CopilotChatAssistantMessageRegenerateButton, CopilotChatAssistantMessageRenderer, CopilotChatAssistantMessageThumbsDownButton, CopilotChatAssistantMessageThumbsUpButton, CopilotChatAssistantMessageToolbar, CopilotChatAssistantMessageToolbarButton, CopilotChatAudioRecorder, CopilotChatCancelTranscribeButton, CopilotChatFinishTranscribeButton, CopilotChatInput, CopilotChatInputDefaults, CopilotChatMessageView, CopilotChatMessageViewCursor, CopilotChatSendButton, CopilotChatStartTranscribeButton, CopilotChatTextarea, CopilotChatToolCallsView, CopilotChatToolbar, CopilotChatToolbarButton, CopilotChatToolsMenu, CopilotChatUserMessage, CopilotChatUserMessageBranchNavigation, CopilotChatUserMessageCopyButton, CopilotChatUserMessageEditButton, CopilotChatUserMessageRenderer, CopilotChatUserMessageToolbar, CopilotChatUserMessageToolbarButton, CopilotChatView, CopilotChatViewDisclaimer, CopilotChatViewFeather, CopilotChatViewHandlers, CopilotChatViewInputContainer, CopilotChatViewScrollToBottomButton, CopilotChatViewScrollView, CopilotKit, CopilotKitAgentContext, CopilotSlot, CopilotTooltip, CopilotkitAgentFactory, RenderToolCalls, ResizeObserverService, SLOT_CONFIG, ScrollPosition, StickToBottom, TooltipContent, cn, createSlotConfig, createSlotRenderer, getSlotConfig, injectAgentStore, injectChatLabels, injectChatState, injectCopilotKitConfig, isComponentType, isSlotValue, normalizeSlotValue, provideCopilotChatLabels, provideCopilotKit, provideSlots, registerFrontendTool, registerHumanInTheLoop, registerRenderToolCall, renderSlot };
|
|
6326
|
+
export { AgentStore, AudioRecorderError, COPILOT_CHAT_DEFAULT_LABELS, COPILOT_CHAT_LABELS, COPILOT_KIT_CONFIG, ChatState, CopilotChat, CopilotChatAddFileButton, CopilotChatAssistantMessage, CopilotChatAssistantMessageCopyButton, CopilotChatAssistantMessageReadAloudButton, CopilotChatAssistantMessageRegenerateButton, CopilotChatAssistantMessageRenderer, CopilotChatAssistantMessageThumbsDownButton, CopilotChatAssistantMessageThumbsUpButton, CopilotChatAssistantMessageToolbar, CopilotChatAssistantMessageToolbarButton, CopilotChatAudioRecorder, CopilotChatCancelTranscribeButton, CopilotChatFinishTranscribeButton, CopilotChatInput, CopilotChatInputDefaults, CopilotChatMessageView, CopilotChatMessageViewCursor, CopilotChatSendButton, CopilotChatStartTranscribeButton, CopilotChatTextarea, CopilotChatToolCallsView, CopilotChatToolbar, CopilotChatToolbarButton, CopilotChatToolsMenu, CopilotChatUserMessage, CopilotChatUserMessageBranchNavigation, CopilotChatUserMessageCopyButton, CopilotChatUserMessageEditButton, CopilotChatUserMessageRenderer, CopilotChatUserMessageToolbar, CopilotChatUserMessageToolbarButton, CopilotChatView, CopilotChatViewDisclaimer, CopilotChatViewFeather, CopilotChatViewHandlers, CopilotChatViewInputContainer, CopilotChatViewScrollToBottomButton, CopilotChatViewScrollView, CopilotKit, CopilotKitAgentContext, CopilotSlot, CopilotTooltip, CopilotkitAgentFactory, RenderToolCalls, ResizeObserverService, SLOT_CONFIG, ScrollPosition, StickToBottom, TooltipContent, cn, connectAgentContext, createSlotConfig, createSlotRenderer, getSlotConfig, injectAgentStore, injectChatLabels, injectChatState, injectCopilotKitConfig, isComponentType, isSlotValue, normalizeSlotValue, provideCopilotChatLabels, provideCopilotKit, provideSlots, registerFrontendTool, registerHumanInTheLoop, registerRenderToolCall, renderSlot };
|
|
6277
6327
|
//# sourceMappingURL=copilotkitnext-angular.mjs.map
|