@copilotkitnext/angular 0.0.0-max-changeset-20260109174803
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +10 -0
- package/README.md +530 -0
- package/dist/LICENSE +10 -0
- package/dist/README.md +530 -0
- package/dist/esm2022/copilotkitnext-angular.mjs +5 -0
- package/dist/esm2022/index.mjs +2 -0
- package/dist/esm2022/lib/agent-context.mjs +25 -0
- package/dist/esm2022/lib/agent.mjs +73 -0
- package/dist/esm2022/lib/chat-config.mjs +35 -0
- package/dist/esm2022/lib/chat-state.mjs +18 -0
- package/dist/esm2022/lib/components/chat/copilot-chat-assistant-message-buttons.mjs +344 -0
- package/dist/esm2022/lib/components/chat/copilot-chat-assistant-message-renderer.mjs +260 -0
- package/dist/esm2022/lib/components/chat/copilot-chat-assistant-message-toolbar.mjs +22 -0
- package/dist/esm2022/lib/components/chat/copilot-chat-assistant-message.mjs +415 -0
- package/dist/esm2022/lib/components/chat/copilot-chat-assistant-message.types.mjs +2 -0
- package/dist/esm2022/lib/components/chat/copilot-chat-audio-recorder.mjs +196 -0
- package/dist/esm2022/lib/components/chat/copilot-chat-buttons.mjs +299 -0
- package/dist/esm2022/lib/components/chat/copilot-chat-input-defaults.mjs +39 -0
- package/dist/esm2022/lib/components/chat/copilot-chat-input.mjs +634 -0
- package/dist/esm2022/lib/components/chat/copilot-chat-input.types.mjs +10 -0
- package/dist/esm2022/lib/components/chat/copilot-chat-message-view-cursor.mjs +27 -0
- package/dist/esm2022/lib/components/chat/copilot-chat-message-view.mjs +268 -0
- package/dist/esm2022/lib/components/chat/copilot-chat-message-view.types.mjs +2 -0
- package/dist/esm2022/lib/components/chat/copilot-chat-textarea.mjs +139 -0
- package/dist/esm2022/lib/components/chat/copilot-chat-tool-calls-view.mjs +36 -0
- package/dist/esm2022/lib/components/chat/copilot-chat-toolbar.mjs +20 -0
- package/dist/esm2022/lib/components/chat/copilot-chat-tools-menu.mjs +203 -0
- package/dist/esm2022/lib/components/chat/copilot-chat-user-message-branch-navigation.mjs +98 -0
- package/dist/esm2022/lib/components/chat/copilot-chat-user-message-buttons.mjs +182 -0
- package/dist/esm2022/lib/components/chat/copilot-chat-user-message-renderer.mjs +28 -0
- package/dist/esm2022/lib/components/chat/copilot-chat-user-message-toolbar.mjs +25 -0
- package/dist/esm2022/lib/components/chat/copilot-chat-user-message.mjs +308 -0
- package/dist/esm2022/lib/components/chat/copilot-chat-user-message.types.mjs +2 -0
- package/dist/esm2022/lib/components/chat/copilot-chat-view-disclaimer.mjs +48 -0
- package/dist/esm2022/lib/components/chat/copilot-chat-view-feather.mjs +41 -0
- package/dist/esm2022/lib/components/chat/copilot-chat-view-handlers.mjs +19 -0
- package/dist/esm2022/lib/components/chat/copilot-chat-view-input-container.mjs +96 -0
- package/dist/esm2022/lib/components/chat/copilot-chat-view-scroll-to-bottom-button.mjs +89 -0
- package/dist/esm2022/lib/components/chat/copilot-chat-view-scroll-view.mjs +456 -0
- package/dist/esm2022/lib/components/chat/copilot-chat-view.mjs +404 -0
- package/dist/esm2022/lib/components/chat/copilot-chat-view.types.mjs +2 -0
- package/dist/esm2022/lib/components/chat/copilot-chat.mjs +167 -0
- package/dist/esm2022/lib/config.mjs +9 -0
- package/dist/esm2022/lib/copilotkit.mjs +115 -0
- package/dist/esm2022/lib/directives/copilotkit-agent-context.mjs +130 -0
- package/dist/esm2022/lib/directives/stick-to-bottom.mjs +170 -0
- package/dist/esm2022/lib/directives/tooltip.mjs +217 -0
- package/dist/esm2022/lib/human-in-the-loop.mjs +19 -0
- package/dist/esm2022/lib/render-tool-calls.mjs +138 -0
- package/dist/esm2022/lib/resize-observer.mjs +152 -0
- package/dist/esm2022/lib/scroll-position.mjs +124 -0
- package/dist/esm2022/lib/slots/copilot-slot.mjs +156 -0
- package/dist/esm2022/lib/slots/index.mjs +4 -0
- package/dist/esm2022/lib/slots/slot.types.mjs +6 -0
- package/dist/esm2022/lib/slots/slot.utils.mjs +235 -0
- package/dist/esm2022/lib/tools.mjs +31 -0
- package/dist/esm2022/lib/utils.mjs +10 -0
- package/dist/esm2022/public-api.mjs +48 -0
- package/dist/fesm2022/copilotkitnext-angular.mjs +6310 -0
- package/dist/fesm2022/copilotkitnext-angular.mjs.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/lib/agent-context.d.ts +12 -0
- package/dist/lib/agent.d.ts +68 -0
- package/dist/lib/chat-config.d.ts +23 -0
- package/dist/lib/chat-state.d.ts +10 -0
- package/dist/lib/components/chat/copilot-chat-assistant-message-buttons.d.ts +68 -0
- package/dist/lib/components/chat/copilot-chat-assistant-message-renderer.d.ts +26 -0
- package/dist/lib/components/chat/copilot-chat-assistant-message-toolbar.d.ts +7 -0
- package/dist/lib/components/chat/copilot-chat-assistant-message.d.ts +208 -0
- package/dist/lib/components/chat/copilot-chat-assistant-message.types.d.ts +31 -0
- package/dist/lib/components/chat/copilot-chat-audio-recorder.d.ts +40 -0
- package/dist/lib/components/chat/copilot-chat-buttons.d.ts +65 -0
- package/dist/lib/components/chat/copilot-chat-input-defaults.d.ts +38 -0
- package/dist/lib/components/chat/copilot-chat-input.d.ts +133 -0
- package/dist/lib/components/chat/copilot-chat-input.types.d.ts +129 -0
- package/dist/lib/components/chat/copilot-chat-message-view-cursor.d.ts +11 -0
- package/dist/lib/components/chat/copilot-chat-message-view.d.ts +430 -0
- package/dist/lib/components/chat/copilot-chat-message-view.types.d.ts +24 -0
- package/dist/lib/components/chat/copilot-chat-textarea.d.ts +41 -0
- package/dist/lib/components/chat/copilot-chat-tool-calls-view.d.ts +70 -0
- package/dist/lib/components/chat/copilot-chat-toolbar.d.ts +7 -0
- package/dist/lib/components/chat/copilot-chat-tools-menu.d.ts +20 -0
- package/dist/lib/components/chat/copilot-chat-user-message-branch-navigation.d.ts +35 -0
- package/dist/lib/components/chat/copilot-chat-user-message-buttons.d.ts +35 -0
- package/dist/lib/components/chat/copilot-chat-user-message-renderer.d.ts +8 -0
- package/dist/lib/components/chat/copilot-chat-user-message-toolbar.d.ts +7 -0
- package/dist/lib/components/chat/copilot-chat-user-message.d.ts +71 -0
- package/dist/lib/components/chat/copilot-chat-user-message.types.d.ts +27 -0
- package/dist/lib/components/chat/copilot-chat-view-disclaimer.d.ts +15 -0
- package/dist/lib/components/chat/copilot-chat-view-feather.d.ts +15 -0
- package/dist/lib/components/chat/copilot-chat-view-handlers.d.ts +11 -0
- package/dist/lib/components/chat/copilot-chat-view-input-container.d.ts +23 -0
- package/dist/lib/components/chat/copilot-chat-view-scroll-to-bottom-button.d.ts +16 -0
- package/dist/lib/components/chat/copilot-chat-view-scroll-view.d.ts +129 -0
- package/dist/lib/components/chat/copilot-chat-view.d.ts +284 -0
- package/dist/lib/components/chat/copilot-chat-view.types.d.ts +42 -0
- package/dist/lib/components/chat/copilot-chat.d.ts +82 -0
- package/dist/lib/config.d.ts +16 -0
- package/dist/lib/copilotkit.d.ts +29 -0
- package/dist/lib/directives/copilotkit-agent-context.d.ts +68 -0
- package/dist/lib/directives/stick-to-bottom.d.ts +62 -0
- package/dist/lib/directives/tooltip.d.ts +33 -0
- package/dist/lib/human-in-the-loop.d.ts +13 -0
- package/dist/lib/render-tool-calls.d.ts +90 -0
- package/dist/lib/resize-observer.d.ts +44 -0
- package/dist/lib/scroll-position.d.ts +50 -0
- package/dist/lib/slots/copilot-slot.d.ts +34 -0
- package/dist/lib/slots/index.d.ts +3 -0
- package/dist/lib/slots/slot.types.d.ts +55 -0
- package/dist/lib/slots/slot.utils.d.ts +110 -0
- package/dist/lib/tools.d.ts +65 -0
- package/dist/lib/utils.d.ts +6 -0
- package/dist/public-api.d.ts +47 -0
- package/dist/styles.css +1882 -0
- package/eslint.config.mjs +20 -0
- package/package.json +101 -0
- package/tsconfig.json +33 -0
- package/vitest.config.mts +45 -0
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { TemplateRef, AfterViewInit, OnDestroy, Type } from "@angular/core";
|
|
2
|
+
import { CopilotChatTextarea } from "./copilot-chat-textarea";
|
|
3
|
+
import { CopilotChatAudioRecorder } from "./copilot-chat-audio-recorder";
|
|
4
|
+
import { CopilotChatStartTranscribeButton, CopilotChatCancelTranscribeButton, CopilotChatFinishTranscribeButton, CopilotChatAddFileButton } from "./copilot-chat-buttons";
|
|
5
|
+
import { CopilotChatToolbar } from "./copilot-chat-toolbar";
|
|
6
|
+
import { CopilotChatToolsMenu } from "./copilot-chat-tools-menu";
|
|
7
|
+
import type { CopilotChatInputMode, ToolsMenuItem } from "./copilot-chat-input.types";
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
/**
|
|
10
|
+
* Context provided to slot templates
|
|
11
|
+
*/
|
|
12
|
+
export interface SendButtonContext {
|
|
13
|
+
send: () => void;
|
|
14
|
+
disabled: boolean;
|
|
15
|
+
value: string;
|
|
16
|
+
}
|
|
17
|
+
export interface ToolbarContext {
|
|
18
|
+
mode: CopilotChatInputMode;
|
|
19
|
+
value: string;
|
|
20
|
+
}
|
|
21
|
+
export declare class CopilotChatInput implements AfterViewInit, OnDestroy {
|
|
22
|
+
textAreaRef?: CopilotChatTextarea;
|
|
23
|
+
audioRecorderRef?: CopilotChatAudioRecorder;
|
|
24
|
+
sendButtonTemplate?: TemplateRef<SendButtonContext>;
|
|
25
|
+
toolbarTemplate?: TemplateRef<ToolbarContext>;
|
|
26
|
+
textAreaTemplate?: TemplateRef<any>;
|
|
27
|
+
audioRecorderTemplate?: TemplateRef<any>;
|
|
28
|
+
startTranscribeButtonTemplate?: TemplateRef<any>;
|
|
29
|
+
cancelTranscribeButtonTemplate?: TemplateRef<any>;
|
|
30
|
+
finishTranscribeButtonTemplate?: TemplateRef<any>;
|
|
31
|
+
addFileButtonTemplate?: TemplateRef<any>;
|
|
32
|
+
toolsButtonTemplate?: TemplateRef<any>;
|
|
33
|
+
sendButtonClass: import("@angular/core").InputSignal<string>;
|
|
34
|
+
toolbarClass: import("@angular/core").InputSignal<string>;
|
|
35
|
+
textAreaClass: import("@angular/core").InputSignal<string>;
|
|
36
|
+
textAreaMaxRows: import("@angular/core").InputSignal<number>;
|
|
37
|
+
textAreaPlaceholder: import("@angular/core").InputSignal<string>;
|
|
38
|
+
audioRecorderClass: import("@angular/core").InputSignal<string>;
|
|
39
|
+
startTranscribeButtonClass: import("@angular/core").InputSignal<string>;
|
|
40
|
+
cancelTranscribeButtonClass: import("@angular/core").InputSignal<string>;
|
|
41
|
+
finishTranscribeButtonClass: import("@angular/core").InputSignal<string>;
|
|
42
|
+
addFileButtonClass: import("@angular/core").InputSignal<string>;
|
|
43
|
+
toolsButtonClass: import("@angular/core").InputSignal<string>;
|
|
44
|
+
sendButtonComponent: import("@angular/core").InputSignal<Type<any>>;
|
|
45
|
+
toolbarComponent: import("@angular/core").InputSignal<Type<any>>;
|
|
46
|
+
textAreaComponent: import("@angular/core").InputSignal<Type<any>>;
|
|
47
|
+
audioRecorderComponent: import("@angular/core").InputSignal<Type<any>>;
|
|
48
|
+
startTranscribeButtonComponent: import("@angular/core").InputSignal<Type<any>>;
|
|
49
|
+
cancelTranscribeButtonComponent: import("@angular/core").InputSignal<Type<any>>;
|
|
50
|
+
finishTranscribeButtonComponent: import("@angular/core").InputSignal<Type<any>>;
|
|
51
|
+
addFileButtonComponent: import("@angular/core").InputSignal<Type<any>>;
|
|
52
|
+
toolsButtonComponent: import("@angular/core").InputSignal<Type<any>>;
|
|
53
|
+
mode: import("@angular/core").InputSignal<CopilotChatInputMode>;
|
|
54
|
+
toolsMenu: import("@angular/core").InputSignal<(ToolsMenuItem | "-")[]>;
|
|
55
|
+
autoFocus: import("@angular/core").InputSignal<boolean>;
|
|
56
|
+
value: import("@angular/core").InputSignal<string>;
|
|
57
|
+
inputClass: import("@angular/core").InputSignal<string>;
|
|
58
|
+
additionalToolbarItems: import("@angular/core").InputSignal<TemplateRef<any>>;
|
|
59
|
+
submitMessage: import("@angular/core").OutputEmitterRef<string>;
|
|
60
|
+
startTranscribe: import("@angular/core").OutputEmitterRef<void>;
|
|
61
|
+
cancelTranscribe: import("@angular/core").OutputEmitterRef<void>;
|
|
62
|
+
finishTranscribe: import("@angular/core").OutputEmitterRef<void>;
|
|
63
|
+
addFile: import("@angular/core").OutputEmitterRef<void>;
|
|
64
|
+
valueChange: import("@angular/core").OutputEmitterRef<string>;
|
|
65
|
+
readonly ArrowUpIcon: import("lucide-angular").LucideIconData;
|
|
66
|
+
readonly defaultButtonClass: string;
|
|
67
|
+
readonly labels: import("../../chat-config").CopilotChatLabels;
|
|
68
|
+
readonly chatState: import("../../chat-state").ChatState;
|
|
69
|
+
modeSignal: import("@angular/core").WritableSignal<CopilotChatInputMode>;
|
|
70
|
+
toolsMenuSignal: import("@angular/core").WritableSignal<(ToolsMenuItem | "-")[]>;
|
|
71
|
+
autoFocusSignal: import("@angular/core").WritableSignal<boolean>;
|
|
72
|
+
customClass: import("@angular/core").WritableSignal<string>;
|
|
73
|
+
defaultAudioRecorder: typeof CopilotChatAudioRecorder;
|
|
74
|
+
defaultSendButton: any;
|
|
75
|
+
CopilotChatToolbar: typeof CopilotChatToolbar;
|
|
76
|
+
CopilotChatAddFileButton: typeof CopilotChatAddFileButton;
|
|
77
|
+
CopilotChatToolsMenu: typeof CopilotChatToolsMenu;
|
|
78
|
+
CopilotChatCancelTranscribeButton: typeof CopilotChatCancelTranscribeButton;
|
|
79
|
+
CopilotChatFinishTranscribeButton: typeof CopilotChatFinishTranscribeButton;
|
|
80
|
+
CopilotChatStartTranscribeButton: typeof CopilotChatStartTranscribeButton;
|
|
81
|
+
computedMode: import("@angular/core").Signal<CopilotChatInputMode>;
|
|
82
|
+
computedToolsMenu: import("@angular/core").Signal<(ToolsMenuItem | "-")[]>;
|
|
83
|
+
computedAutoFocus: import("@angular/core").Signal<boolean>;
|
|
84
|
+
computedValue: import("@angular/core").Signal<string>;
|
|
85
|
+
computedClass: import("@angular/core").Signal<string>;
|
|
86
|
+
sendButtonContext: import("@angular/core").Signal<SendButtonContext>;
|
|
87
|
+
toolbarContext: import("@angular/core").Signal<ToolbarContext>;
|
|
88
|
+
textAreaContext: import("@angular/core").Signal<{
|
|
89
|
+
value: string;
|
|
90
|
+
autoFocus: boolean;
|
|
91
|
+
disabled: boolean;
|
|
92
|
+
maxRows: number;
|
|
93
|
+
placeholder: string;
|
|
94
|
+
inputClass: string;
|
|
95
|
+
onKeyDown: (event: KeyboardEvent) => void;
|
|
96
|
+
onChange: (value: string) => void;
|
|
97
|
+
}>;
|
|
98
|
+
audioRecorderContext: import("@angular/core").Signal<{
|
|
99
|
+
inputShowControls: boolean;
|
|
100
|
+
}>;
|
|
101
|
+
toolsContext: import("@angular/core").Signal<{
|
|
102
|
+
inputToolsMenu: (ToolsMenuItem | "-")[];
|
|
103
|
+
inputDisabled: boolean;
|
|
104
|
+
}>;
|
|
105
|
+
constructor();
|
|
106
|
+
addFileButtonOutputs: {
|
|
107
|
+
clicked: () => void;
|
|
108
|
+
};
|
|
109
|
+
cancelTranscribeButtonOutputs: {
|
|
110
|
+
clicked: () => void;
|
|
111
|
+
};
|
|
112
|
+
finishTranscribeButtonOutputs: {
|
|
113
|
+
clicked: () => void;
|
|
114
|
+
};
|
|
115
|
+
startTranscribeButtonOutputs: {
|
|
116
|
+
clicked: () => void;
|
|
117
|
+
};
|
|
118
|
+
sendButtonOutputs: {
|
|
119
|
+
clicked: () => void;
|
|
120
|
+
click: () => void;
|
|
121
|
+
};
|
|
122
|
+
ngAfterViewInit(): void;
|
|
123
|
+
ngOnDestroy(): void;
|
|
124
|
+
handleKeyDown(event: KeyboardEvent): void;
|
|
125
|
+
handleValueChange(value: string): void;
|
|
126
|
+
send(): void;
|
|
127
|
+
handleStartTranscribe(): void;
|
|
128
|
+
handleCancelTranscribe(): void;
|
|
129
|
+
handleFinishTranscribe(): void;
|
|
130
|
+
handleAddFile(): void;
|
|
131
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CopilotChatInput, never>;
|
|
132
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CopilotChatInput, "copilot-chat-input", never, { "sendButtonClass": { "alias": "sendButtonClass"; "required": false; "isSignal": true; }; "toolbarClass": { "alias": "toolbarClass"; "required": false; "isSignal": true; }; "textAreaClass": { "alias": "textAreaClass"; "required": false; "isSignal": true; }; "textAreaMaxRows": { "alias": "textAreaMaxRows"; "required": false; "isSignal": true; }; "textAreaPlaceholder": { "alias": "textAreaPlaceholder"; "required": false; "isSignal": true; }; "audioRecorderClass": { "alias": "audioRecorderClass"; "required": false; "isSignal": true; }; "startTranscribeButtonClass": { "alias": "startTranscribeButtonClass"; "required": false; "isSignal": true; }; "cancelTranscribeButtonClass": { "alias": "cancelTranscribeButtonClass"; "required": false; "isSignal": true; }; "finishTranscribeButtonClass": { "alias": "finishTranscribeButtonClass"; "required": false; "isSignal": true; }; "addFileButtonClass": { "alias": "addFileButtonClass"; "required": false; "isSignal": true; }; "toolsButtonClass": { "alias": "toolsButtonClass"; "required": false; "isSignal": true; }; "sendButtonComponent": { "alias": "sendButtonComponent"; "required": false; "isSignal": true; }; "toolbarComponent": { "alias": "toolbarComponent"; "required": false; "isSignal": true; }; "textAreaComponent": { "alias": "textAreaComponent"; "required": false; "isSignal": true; }; "audioRecorderComponent": { "alias": "audioRecorderComponent"; "required": false; "isSignal": true; }; "startTranscribeButtonComponent": { "alias": "startTranscribeButtonComponent"; "required": false; "isSignal": true; }; "cancelTranscribeButtonComponent": { "alias": "cancelTranscribeButtonComponent"; "required": false; "isSignal": true; }; "finishTranscribeButtonComponent": { "alias": "finishTranscribeButtonComponent"; "required": false; "isSignal": true; }; "addFileButtonComponent": { "alias": "addFileButtonComponent"; "required": false; "isSignal": true; }; "toolsButtonComponent": { "alias": "toolsButtonComponent"; "required": false; "isSignal": true; }; "mode": { "alias": "mode"; "required": false; "isSignal": true; }; "toolsMenu": { "alias": "toolsMenu"; "required": false; "isSignal": true; }; "autoFocus": { "alias": "autoFocus"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "inputClass": { "alias": "inputClass"; "required": false; "isSignal": true; }; "additionalToolbarItems": { "alias": "additionalToolbarItems"; "required": false; "isSignal": true; }; }, { "submitMessage": "submitMessage"; "startTranscribe": "startTranscribe"; "cancelTranscribe": "cancelTranscribe"; "finishTranscribe": "finishTranscribe"; "addFile": "addFile"; "valueChange": "valueChange"; }, ["sendButtonTemplate", "toolbarTemplate", "textAreaTemplate", "audioRecorderTemplate", "startTranscribeButtonTemplate", "cancelTranscribeButtonTemplate", "finishTranscribeButtonTemplate", "addFileButtonTemplate", "toolsButtonTemplate"], never, true, never>;
|
|
133
|
+
}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import type { Type, TemplateRef } from "@angular/core";
|
|
2
|
+
/**
|
|
3
|
+
* Mode of the chat input component
|
|
4
|
+
*/
|
|
5
|
+
export type CopilotChatInputMode = "input" | "transcribe" | "processing";
|
|
6
|
+
/**
|
|
7
|
+
* Represents a menu item in the tools menu
|
|
8
|
+
*/
|
|
9
|
+
export type ToolsMenuItem = {
|
|
10
|
+
label: string;
|
|
11
|
+
} & ({
|
|
12
|
+
action: () => void;
|
|
13
|
+
items?: never;
|
|
14
|
+
} | {
|
|
15
|
+
action?: never;
|
|
16
|
+
items: (ToolsMenuItem | "-")[];
|
|
17
|
+
});
|
|
18
|
+
/**
|
|
19
|
+
* Audio recorder state
|
|
20
|
+
*/
|
|
21
|
+
export type AudioRecorderState = "idle" | "recording" | "processing";
|
|
22
|
+
/**
|
|
23
|
+
* Error class for audio recorder failures
|
|
24
|
+
*/
|
|
25
|
+
export declare class AudioRecorderError extends Error {
|
|
26
|
+
constructor(message: string);
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Props for textarea component
|
|
30
|
+
*/
|
|
31
|
+
export interface CopilotChatTextareaProps {
|
|
32
|
+
value?: string;
|
|
33
|
+
placeholder?: string;
|
|
34
|
+
maxRows?: number;
|
|
35
|
+
autoFocus?: boolean;
|
|
36
|
+
disabled?: boolean;
|
|
37
|
+
onChange?: (value: string) => void;
|
|
38
|
+
onKeyDown?: (event: KeyboardEvent) => void;
|
|
39
|
+
inputClass?: string;
|
|
40
|
+
style?: any;
|
|
41
|
+
rows?: number;
|
|
42
|
+
cols?: number;
|
|
43
|
+
readonly?: boolean;
|
|
44
|
+
spellcheck?: boolean;
|
|
45
|
+
wrap?: "hard" | "soft" | "off";
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Props for button components
|
|
49
|
+
*/
|
|
50
|
+
export interface CopilotChatButtonProps {
|
|
51
|
+
disabled?: boolean;
|
|
52
|
+
onClick?: () => void;
|
|
53
|
+
inputClass?: string;
|
|
54
|
+
style?: any;
|
|
55
|
+
type?: "button" | "submit" | "reset";
|
|
56
|
+
ariaLabel?: string;
|
|
57
|
+
ariaPressed?: boolean;
|
|
58
|
+
ariaExpanded?: boolean;
|
|
59
|
+
title?: string;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Props for toolbar button with tooltip
|
|
63
|
+
*/
|
|
64
|
+
export interface CopilotChatToolbarButtonProps extends CopilotChatButtonProps {
|
|
65
|
+
icon?: TemplateRef<any>;
|
|
66
|
+
tooltip?: string;
|
|
67
|
+
variant?: "primary" | "secondary";
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Props for tools menu button
|
|
71
|
+
*/
|
|
72
|
+
export interface CopilotChatToolsButtonProps extends CopilotChatButtonProps {
|
|
73
|
+
toolsMenu?: (ToolsMenuItem | "-")[];
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Props for audio recorder
|
|
77
|
+
*/
|
|
78
|
+
export interface CopilotChatAudioRecorderProps {
|
|
79
|
+
inputClass?: string;
|
|
80
|
+
style?: any;
|
|
81
|
+
onStateChange?: (state: AudioRecorderState) => void;
|
|
82
|
+
showControls?: boolean;
|
|
83
|
+
maxDuration?: number;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Props for toolbar
|
|
87
|
+
*/
|
|
88
|
+
export interface CopilotChatToolbarProps {
|
|
89
|
+
inputClass?: string;
|
|
90
|
+
style?: any;
|
|
91
|
+
position?: "top" | "bottom";
|
|
92
|
+
alignment?: "left" | "center" | "right" | "space-between";
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Slot configuration for chat input
|
|
96
|
+
*/
|
|
97
|
+
export interface CopilotChatInputSlots {
|
|
98
|
+
textArea?: Type<any> | TemplateRef<any>;
|
|
99
|
+
sendButton?: Type<any> | TemplateRef<any>;
|
|
100
|
+
startTranscribeButton?: Type<any> | TemplateRef<any>;
|
|
101
|
+
cancelTranscribeButton?: Type<any> | TemplateRef<any>;
|
|
102
|
+
finishTranscribeButton?: Type<any> | TemplateRef<any>;
|
|
103
|
+
addFileButton?: Type<any> | TemplateRef<any>;
|
|
104
|
+
toolsButton?: Type<any> | TemplateRef<any>;
|
|
105
|
+
toolbar?: Type<any> | TemplateRef<any>;
|
|
106
|
+
audioRecorder?: Type<any> | TemplateRef<any>;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Input configuration for the chat input component
|
|
110
|
+
*/
|
|
111
|
+
export interface CopilotChatInputConfig {
|
|
112
|
+
mode?: CopilotChatInputMode;
|
|
113
|
+
toolsMenu?: (ToolsMenuItem | "-")[];
|
|
114
|
+
autoFocus?: boolean;
|
|
115
|
+
additionalToolbarItems?: TemplateRef<any>;
|
|
116
|
+
value?: string;
|
|
117
|
+
class?: string;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Output events for the chat input component
|
|
121
|
+
*/
|
|
122
|
+
export interface CopilotChatInputOutputs {
|
|
123
|
+
submitMessage: (value: string) => void;
|
|
124
|
+
startTranscribe: () => void;
|
|
125
|
+
cancelTranscribe: () => void;
|
|
126
|
+
finishTranscribe: () => void;
|
|
127
|
+
addFile: () => void;
|
|
128
|
+
changeValue: (value: string) => void;
|
|
129
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
/**
|
|
3
|
+
* Cursor component that matches the React implementation exactly.
|
|
4
|
+
* Shows a pulsing dot animation to indicate activity.
|
|
5
|
+
*/
|
|
6
|
+
export declare class CopilotChatMessageViewCursor {
|
|
7
|
+
inputClass: import("@angular/core").InputSignal<string>;
|
|
8
|
+
computedClass: import("@angular/core").Signal<string>;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CopilotChatMessageViewCursor, never>;
|
|
10
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CopilotChatMessageViewCursor, "copilot-chat-message-view-cursor", never, { "inputClass": { "alias": "inputClass"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
11
|
+
}
|