@copilotkit/react-core 1.10.0-next.1 → 1.10.0-next.11
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/CHANGELOG.md +94 -0
- package/dist/{chunk-KV25ZRMH.mjs → chunk-2TSNHEIS.mjs} +6 -6
- package/dist/chunk-2TSNHEIS.mjs.map +1 -0
- package/dist/{chunk-DF4YG4PF.mjs → chunk-3RHHNUVV.mjs} +2 -2
- package/dist/{chunk-LNAQ7JG3.mjs → chunk-6EKLRL7B.mjs} +2 -2
- package/dist/{chunk-JZQOCH4A.mjs → chunk-ADZDXHVC.mjs} +4 -4
- package/dist/{chunk-4CFY3CON.mjs → chunk-CLMDRYEN.mjs} +2 -2
- package/dist/{chunk-VM7CVIET.mjs → chunk-COEUPDRL.mjs} +20 -21
- package/dist/chunk-COEUPDRL.mjs.map +1 -0
- package/dist/{chunk-RGKZCCPA.mjs → chunk-DLEXVOQE.mjs} +5 -5
- package/dist/{chunk-YAF2LATQ.mjs → chunk-EFL5OBKN.mjs} +1 -1
- package/dist/chunk-EFL5OBKN.mjs.map +1 -0
- package/dist/{chunk-JWAXDYOW.mjs → chunk-FAUNHSQU.mjs} +3 -3
- package/dist/chunk-ICIK2BSB.mjs +17 -0
- package/dist/chunk-ICIK2BSB.mjs.map +1 -0
- package/dist/chunk-IHAZJF3V.mjs +34 -0
- package/dist/chunk-IHAZJF3V.mjs.map +1 -0
- package/dist/{chunk-Q6FZZJ5A.mjs → chunk-IN7GE4NO.mjs} +2 -2
- package/dist/{chunk-4XVBXDCX.mjs → chunk-JBLMXZ3O.mjs} +8 -8
- package/dist/{chunk-NXCJELW7.mjs → chunk-JJDXTTEN.mjs} +3 -3
- package/dist/chunk-KDAZGZ24.mjs +1 -0
- package/dist/{chunk-VOMGRGWT.mjs → chunk-L6HQIJ74.mjs} +33 -17
- package/dist/chunk-L6HQIJ74.mjs.map +1 -0
- package/dist/{chunk-OMVNJ7S3.mjs → chunk-LVWV62JZ.mjs} +37 -24
- package/dist/chunk-LVWV62JZ.mjs.map +1 -0
- package/dist/{chunk-3OQM3NEK.mjs → chunk-N4WEHORG.mjs} +2 -2
- package/dist/chunk-OKRZF3DD.mjs +225 -0
- package/dist/chunk-OKRZF3DD.mjs.map +1 -0
- package/dist/{chunk-SGF6C7I6.mjs → chunk-Q42NJFXR.mjs} +11 -16
- package/dist/chunk-Q42NJFXR.mjs.map +1 -0
- package/dist/chunk-QGE7U4NV.mjs +85 -0
- package/dist/chunk-QGE7U4NV.mjs.map +1 -0
- package/dist/{chunk-XGRBCWK6.mjs → chunk-TEMLWRRT.mjs} +3 -3
- package/dist/chunk-TEMLWRRT.mjs.map +1 -0
- package/dist/{chunk-PYULBXCD.mjs → chunk-TWYUYC4F.mjs} +44 -10
- package/dist/chunk-TWYUYC4F.mjs.map +1 -0
- package/dist/{chunk-WUORFPJ7.mjs → chunk-X2DNXTME.mjs} +6 -6
- package/dist/{chunk-DCTJZ742.mjs → chunk-ZLQVRPDS.mjs} +5 -2
- package/dist/chunk-ZLQVRPDS.mjs.map +1 -0
- package/dist/components/copilot-provider/copilot-messages.d.ts +17 -1
- package/dist/components/copilot-provider/copilot-messages.js +46 -7
- package/dist/components/copilot-provider/copilot-messages.js.map +1 -1
- package/dist/components/copilot-provider/copilot-messages.mjs +11 -7
- package/dist/components/copilot-provider/copilotkit-props.d.ts +5 -3
- package/dist/components/copilot-provider/copilotkit-props.js.map +1 -1
- package/dist/components/copilot-provider/copilotkit.d.ts +1 -2
- package/dist/components/copilot-provider/copilotkit.js +337 -555
- package/dist/components/copilot-provider/copilotkit.js.map +1 -1
- package/dist/components/copilot-provider/copilotkit.mjs +10 -10
- package/dist/components/copilot-provider/index.d.ts +1 -2
- package/dist/components/copilot-provider/index.js +337 -555
- package/dist/components/copilot-provider/index.js.map +1 -1
- package/dist/components/copilot-provider/index.mjs +10 -10
- package/dist/components/error-boundary/error-boundary.js +176 -323
- package/dist/components/error-boundary/error-boundary.js.map +1 -1
- package/dist/components/error-boundary/error-boundary.mjs +4 -4
- package/dist/components/error-boundary/error-utils.js.map +1 -1
- package/dist/components/error-boundary/error-utils.mjs +2 -2
- package/dist/components/index.d.ts +1 -2
- package/dist/components/index.js +337 -555
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +10 -10
- package/dist/components/toast/toast-provider.js.map +1 -1
- package/dist/components/toast/toast-provider.mjs +1 -1
- package/dist/components/usage-banner.d.ts +10 -4
- package/dist/components/usage-banner.js +176 -302
- package/dist/components/usage-banner.js.map +1 -1
- package/dist/components/usage-banner.mjs +3 -1
- package/dist/context/copilot-context.d.ts +1 -2
- package/dist/context/copilot-context.js +2 -2
- package/dist/context/copilot-context.js.map +1 -1
- package/dist/context/copilot-context.mjs +1 -1
- package/dist/context/copilot-messages-context.d.ts +11 -15
- package/dist/context/copilot-messages-context.js +4 -1
- package/dist/context/copilot-messages-context.js.map +1 -1
- package/dist/context/copilot-messages-context.mjs +1 -1
- package/dist/context/index.d.ts +2 -2
- package/dist/context/index.js +6 -3
- package/dist/context/index.js.map +1 -1
- package/dist/context/index.mjs +5 -5
- package/dist/{copilot-context-bd88d30d.d.ts → copilot-context-256f9020.d.ts} +4 -22
- package/dist/hooks/index.d.ts +7 -5
- package/dist/hooks/index.js +250 -122
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/index.mjs +42 -34
- package/dist/hooks/use-chat.d.ts +1 -2
- package/dist/hooks/use-chat.js +11 -3
- package/dist/hooks/use-chat.js.map +1 -1
- package/dist/hooks/use-chat.mjs +6 -6
- package/dist/hooks/use-coagent-state-render.js +2 -2
- package/dist/hooks/use-coagent-state-render.js.map +1 -1
- package/dist/hooks/use-coagent-state-render.mjs +3 -3
- package/dist/hooks/use-coagent.d.ts +3 -4
- package/dist/hooks/use-coagent.js +114 -81
- package/dist/hooks/use-coagent.js.map +1 -1
- package/dist/hooks/use-coagent.mjs +16 -16
- package/dist/hooks/use-copilot-action.js +2 -2
- package/dist/hooks/use-copilot-action.js.map +1 -1
- package/dist/hooks/use-copilot-action.mjs +4 -4
- package/dist/hooks/use-copilot-additional-instructions.js +2 -2
- package/dist/hooks/use-copilot-additional-instructions.js.map +1 -1
- package/dist/hooks/use-copilot-additional-instructions.mjs +2 -2
- package/dist/hooks/use-copilot-authenticated-action.js +2 -2
- package/dist/hooks/use-copilot-authenticated-action.js.map +1 -1
- package/dist/hooks/use-copilot-authenticated-action.mjs +5 -5
- package/dist/hooks/use-copilot-chat-headless_c.d.ts +33 -0
- package/dist/hooks/use-copilot-chat-headless_c.js +1837 -0
- package/dist/hooks/use-copilot-chat-headless_c.js.map +1 -0
- package/dist/hooks/use-copilot-chat-headless_c.mjs +31 -0
- package/dist/hooks/use-copilot-chat-headless_c.mjs.map +1 -0
- package/dist/hooks/use-copilot-chat.d.ts +52 -82
- package/dist/hooks/use-copilot-chat.js +60 -13
- package/dist/hooks/use-copilot-chat.js.map +1 -1
- package/dist/hooks/use-copilot-chat.mjs +16 -17
- package/dist/hooks/use-copilot-chat_internal.d.ts +177 -0
- package/dist/hooks/use-copilot-chat_internal.js +1770 -0
- package/dist/hooks/use-copilot-chat_internal.js.map +1 -0
- package/dist/hooks/use-copilot-chat_internal.mjs +29 -0
- package/dist/hooks/use-copilot-chat_internal.mjs.map +1 -0
- package/dist/hooks/use-copilot-readable.js +2 -2
- package/dist/hooks/use-copilot-readable.js.map +1 -1
- package/dist/hooks/use-copilot-readable.mjs +2 -2
- package/dist/hooks/use-copilot-runtime-client.js +9 -1
- package/dist/hooks/use-copilot-runtime-client.js.map +1 -1
- package/dist/hooks/use-copilot-runtime-client.mjs +3 -3
- package/dist/hooks/use-langgraph-interrupt-render.js +2 -2
- package/dist/hooks/use-langgraph-interrupt-render.js.map +1 -1
- package/dist/hooks/use-langgraph-interrupt-render.mjs +3 -3
- package/dist/hooks/use-langgraph-interrupt.d.ts +3 -4
- package/dist/hooks/use-langgraph-interrupt.js +32 -11
- package/dist/hooks/use-langgraph-interrupt.js.map +1 -1
- package/dist/hooks/use-langgraph-interrupt.mjs +16 -16
- package/dist/hooks/use-make-copilot-document-readable.js +2 -2
- package/dist/hooks/use-make-copilot-document-readable.js.map +1 -1
- package/dist/hooks/use-make-copilot-document-readable.mjs +2 -2
- package/dist/index-08c43df1.d.ts +36 -0
- package/dist/index.d.ts +5 -3
- package/dist/index.js +460 -471
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +47 -39
- package/dist/lib/copilot-task.d.ts +1 -2
- package/dist/lib/copilot-task.js.map +1 -1
- package/dist/lib/copilot-task.mjs +12 -12
- package/dist/lib/index.d.ts +1 -2
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/index.mjs +12 -12
- package/dist/types/interrupt-action.d.ts +2 -3
- package/dist/utils/dev-console.d.ts +1 -1
- package/dist/utils/dev-console.js +9 -1
- package/dist/utils/dev-console.js.map +1 -1
- package/dist/utils/dev-console.mjs +1 -1
- package/dist/utils/extract.d.ts +2 -2
- package/dist/utils/extract.js.map +1 -1
- package/dist/utils/extract.mjs +10 -10
- package/dist/utils/index.d.ts +3 -3
- package/dist/utils/index.js +9 -1
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/index.mjs +11 -11
- package/dist/utils/suggestions.d.ts +2 -2
- package/dist/utils/suggestions.js.map +1 -1
- package/dist/utils/suggestions.mjs +10 -10
- package/package.json +3 -3
- package/src/components/copilot-provider/copilot-messages.tsx +57 -1
- package/src/components/copilot-provider/copilotkit-props.tsx +4 -1
- package/src/components/copilot-provider/copilotkit.tsx +20 -10
- package/src/components/error-boundary/error-boundary.tsx +5 -15
- package/src/components/toast/toast-provider.tsx +1 -3
- package/src/components/usage-banner.tsx +193 -316
- package/src/context/copilot-context.tsx +12 -6
- package/src/context/copilot-messages-context.tsx +7 -1
- package/src/hooks/__tests__/use-coagent-config.test.ts +8 -1
- package/src/hooks/index.ts +7 -2
- package/src/hooks/use-coagent.ts +17 -19
- package/src/hooks/use-copilot-chat-headless_c.ts +187 -0
- package/src/hooks/use-copilot-chat.ts +64 -495
- package/src/hooks/use-copilot-chat_internal.ts +543 -0
- package/src/hooks/use-langgraph-interrupt.ts +1 -1
- package/src/utils/dev-console.ts +18 -2
- package/dist/chunk-57K2ZJ5F.mjs +0 -348
- package/dist/chunk-57K2ZJ5F.mjs.map +0 -1
- package/dist/chunk-CQPYJIBH.mjs +0 -1
- package/dist/chunk-DCTJZ742.mjs.map +0 -1
- package/dist/chunk-GFJW4RIM.mjs +0 -9
- package/dist/chunk-GFJW4RIM.mjs.map +0 -1
- package/dist/chunk-KV25ZRMH.mjs.map +0 -1
- package/dist/chunk-OMVNJ7S3.mjs.map +0 -1
- package/dist/chunk-PYULBXCD.mjs.map +0 -1
- package/dist/chunk-SGF6C7I6.mjs.map +0 -1
- package/dist/chunk-VM7CVIET.mjs.map +0 -1
- package/dist/chunk-VOMGRGWT.mjs.map +0 -1
- package/dist/chunk-XGRBCWK6.mjs.map +0 -1
- package/dist/chunk-YAF2LATQ.mjs.map +0 -1
- /package/dist/{chunk-DF4YG4PF.mjs.map → chunk-3RHHNUVV.mjs.map} +0 -0
- /package/dist/{chunk-LNAQ7JG3.mjs.map → chunk-6EKLRL7B.mjs.map} +0 -0
- /package/dist/{chunk-JZQOCH4A.mjs.map → chunk-ADZDXHVC.mjs.map} +0 -0
- /package/dist/{chunk-4CFY3CON.mjs.map → chunk-CLMDRYEN.mjs.map} +0 -0
- /package/dist/{chunk-RGKZCCPA.mjs.map → chunk-DLEXVOQE.mjs.map} +0 -0
- /package/dist/{chunk-JWAXDYOW.mjs.map → chunk-FAUNHSQU.mjs.map} +0 -0
- /package/dist/{chunk-Q6FZZJ5A.mjs.map → chunk-IN7GE4NO.mjs.map} +0 -0
- /package/dist/{chunk-4XVBXDCX.mjs.map → chunk-JBLMXZ3O.mjs.map} +0 -0
- /package/dist/{chunk-NXCJELW7.mjs.map → chunk-JJDXTTEN.mjs.map} +0 -0
- /package/dist/{chunk-CQPYJIBH.mjs.map → chunk-KDAZGZ24.mjs.map} +0 -0
- /package/dist/{chunk-3OQM3NEK.mjs.map → chunk-N4WEHORG.mjs.map} +0 -0
- /package/dist/{chunk-WUORFPJ7.mjs.map → chunk-X2DNXTME.mjs.map} +0 -0
|
@@ -1,29 +1,28 @@
|
|
|
1
1
|
import {
|
|
2
|
-
defaultSystemMessage,
|
|
3
2
|
useCopilotChat
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-IHAZJF3V.mjs";
|
|
4
|
+
import "../chunk-L6HQIJ74.mjs";
|
|
5
|
+
import "../chunk-IN7GE4NO.mjs";
|
|
6
|
+
import "../chunk-YPSGKPDA.mjs";
|
|
7
|
+
import "../chunk-LVWV62JZ.mjs";
|
|
8
|
+
import "../chunk-TWYUYC4F.mjs";
|
|
9
|
+
import "../chunk-Q42NJFXR.mjs";
|
|
11
10
|
import "../chunk-2IDV5OHF.mjs";
|
|
12
11
|
import "../chunk-PMAFHQ7P.mjs";
|
|
13
12
|
import "../chunk-5FHSUKQL.mjs";
|
|
14
13
|
import "../chunk-RKTVJRK7.mjs";
|
|
15
|
-
import "../chunk-
|
|
16
|
-
import "../chunk-
|
|
17
|
-
import "../chunk-
|
|
14
|
+
import "../chunk-ZLQVRPDS.mjs";
|
|
15
|
+
import "../chunk-OKRZF3DD.mjs";
|
|
16
|
+
import "../chunk-JBLMXZ3O.mjs";
|
|
17
|
+
import "../chunk-4CEQJ2X6.mjs";
|
|
18
|
+
import "../chunk-N4WEHORG.mjs";
|
|
18
19
|
import "../chunk-O7ARI5CV.mjs";
|
|
19
|
-
import "../chunk-
|
|
20
|
-
import "../chunk-
|
|
21
|
-
import "../chunk-
|
|
22
|
-
import "../chunk-
|
|
23
|
-
import "../chunk-DCTJZ742.mjs";
|
|
20
|
+
import "../chunk-FAUNHSQU.mjs";
|
|
21
|
+
import "../chunk-ICIK2BSB.mjs";
|
|
22
|
+
import "../chunk-TEMLWRRT.mjs";
|
|
23
|
+
import "../chunk-EFL5OBKN.mjs";
|
|
24
24
|
import "../chunk-SKC7AJIV.mjs";
|
|
25
25
|
export {
|
|
26
|
-
defaultSystemMessage,
|
|
27
26
|
useCopilotChat
|
|
28
27
|
};
|
|
29
28
|
//# sourceMappingURL=use-copilot-chat.mjs.map
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import { SystemMessageFunction } from '../types/system-message.js';
|
|
2
|
+
import { Message as Message$1 } from '@copilotkit/runtime-client-gql';
|
|
3
|
+
import { Message } from '@copilotkit/shared';
|
|
4
|
+
import { AppendMessageOptions } from './use-chat.js';
|
|
5
|
+
import { S as SuggestionItem } from '../index-08c43df1.js';
|
|
6
|
+
import 'react';
|
|
7
|
+
import '../copilot-context-256f9020.js';
|
|
8
|
+
import '../types/frontend-action.js';
|
|
9
|
+
import './use-tree.js';
|
|
10
|
+
import '../types/document-pointer.js';
|
|
11
|
+
import '../types/chat-suggestion-configuration.js';
|
|
12
|
+
import '../types/coagent-action.js';
|
|
13
|
+
import '../types/coagent-state.js';
|
|
14
|
+
|
|
15
|
+
interface UseCopilotChatOptions {
|
|
16
|
+
/**
|
|
17
|
+
* A unique identifier for the chat. If not provided, a random one will be
|
|
18
|
+
* generated. When provided, the `useChat` hook with the same `id` will
|
|
19
|
+
* have shared states across components.
|
|
20
|
+
*/
|
|
21
|
+
id?: string;
|
|
22
|
+
/**
|
|
23
|
+
* HTTP headers to be sent with the API request.
|
|
24
|
+
*/
|
|
25
|
+
headers?: Record<string, string> | Headers;
|
|
26
|
+
/**
|
|
27
|
+
* Initial messages to populate the chat with.
|
|
28
|
+
*/
|
|
29
|
+
initialMessages?: Message[];
|
|
30
|
+
/**
|
|
31
|
+
* A function to generate the system message. Defaults to `defaultSystemMessage`.
|
|
32
|
+
*/
|
|
33
|
+
makeSystemMessage?: SystemMessageFunction;
|
|
34
|
+
}
|
|
35
|
+
interface MCPServerConfig {
|
|
36
|
+
endpoint: string;
|
|
37
|
+
apiKey?: string;
|
|
38
|
+
}
|
|
39
|
+
interface UseCopilotChatReturn {
|
|
40
|
+
/**
|
|
41
|
+
* @deprecated use `messages` instead, this is an old non ag-ui version of the messages
|
|
42
|
+
* Array of messages currently visible in the chat interface
|
|
43
|
+
*
|
|
44
|
+
* This is the visible messages, not the raw messages from the runtime client.
|
|
45
|
+
*/
|
|
46
|
+
visibleMessages: Message$1[];
|
|
47
|
+
/**
|
|
48
|
+
* The messages that are currently in the chat in AG-UI format.
|
|
49
|
+
*/
|
|
50
|
+
messages: Message[];
|
|
51
|
+
/** @deprecated use `sendMessage` instead */
|
|
52
|
+
appendMessage: (message: Message$1, options?: AppendMessageOptions) => Promise<void>;
|
|
53
|
+
/**
|
|
54
|
+
* Send a new message to the chat
|
|
55
|
+
*
|
|
56
|
+
* ```tsx
|
|
57
|
+
* await sendMessage({
|
|
58
|
+
* id: "123",
|
|
59
|
+
* role: "user",
|
|
60
|
+
* content: "Hello, process this request",
|
|
61
|
+
* });
|
|
62
|
+
* ```
|
|
63
|
+
*/
|
|
64
|
+
sendMessage: (message: Message, options?: AppendMessageOptions) => Promise<void>;
|
|
65
|
+
/**
|
|
66
|
+
* Replace all messages in the chat
|
|
67
|
+
*
|
|
68
|
+
* ```tsx
|
|
69
|
+
* setMessages([
|
|
70
|
+
* { id: "123", role: "user", content: "Hello, process this request" },
|
|
71
|
+
* { id: "456", role: "assistant", content: "Hello, I'm the assistant" },
|
|
72
|
+
* ]);
|
|
73
|
+
* ```
|
|
74
|
+
*
|
|
75
|
+
* **Deprecated** non-ag-ui version:
|
|
76
|
+
*
|
|
77
|
+
* ```tsx
|
|
78
|
+
* setMessages([
|
|
79
|
+
* new TextMessage({
|
|
80
|
+
* content: "Hello, process this request",
|
|
81
|
+
* role: gqlRole.User,
|
|
82
|
+
* }),
|
|
83
|
+
* new TextMessage({
|
|
84
|
+
* content: "Hello, I'm the assistant",
|
|
85
|
+
* role: gqlRole.Assistant,
|
|
86
|
+
* ]);
|
|
87
|
+
* ```
|
|
88
|
+
*
|
|
89
|
+
*/
|
|
90
|
+
setMessages: (messages: Message[] | Message$1[]) => void;
|
|
91
|
+
/**
|
|
92
|
+
* Remove a specific message by ID
|
|
93
|
+
*
|
|
94
|
+
* ```tsx
|
|
95
|
+
* deleteMessage("123");
|
|
96
|
+
* ```
|
|
97
|
+
*/
|
|
98
|
+
deleteMessage: (messageId: string) => void;
|
|
99
|
+
/**
|
|
100
|
+
* Regenerate the response for a specific message
|
|
101
|
+
*
|
|
102
|
+
* ```tsx
|
|
103
|
+
* reloadMessages("123");
|
|
104
|
+
* ```
|
|
105
|
+
*/
|
|
106
|
+
reloadMessages: (messageId: string) => Promise<void>;
|
|
107
|
+
/**
|
|
108
|
+
* Stop the current message generation
|
|
109
|
+
*
|
|
110
|
+
* ```tsx
|
|
111
|
+
* if (isLoading) {
|
|
112
|
+
* stopGeneration();
|
|
113
|
+
* }
|
|
114
|
+
* ```
|
|
115
|
+
*/
|
|
116
|
+
stopGeneration: () => void;
|
|
117
|
+
/**
|
|
118
|
+
* Clear all messages and reset chat state
|
|
119
|
+
*
|
|
120
|
+
* ```tsx
|
|
121
|
+
* reset();
|
|
122
|
+
* console.log(messages); // []
|
|
123
|
+
* ```
|
|
124
|
+
*/
|
|
125
|
+
reset: () => void;
|
|
126
|
+
/**
|
|
127
|
+
* Whether the chat is currently generating a response
|
|
128
|
+
*
|
|
129
|
+
* ```tsx
|
|
130
|
+
* if (isLoading) {
|
|
131
|
+
* console.log("Loading...");
|
|
132
|
+
* } else {
|
|
133
|
+
* console.log("Not loading");
|
|
134
|
+
* }
|
|
135
|
+
*/
|
|
136
|
+
isLoading: boolean;
|
|
137
|
+
/** Manually trigger chat completion (advanced usage) */
|
|
138
|
+
runChatCompletion: () => Promise<Message[]>;
|
|
139
|
+
/** MCP (Model Context Protocol) server configurations */
|
|
140
|
+
mcpServers: MCPServerConfig[];
|
|
141
|
+
/** Update MCP server configurations */
|
|
142
|
+
setMcpServers: (mcpServers: MCPServerConfig[]) => void;
|
|
143
|
+
/**
|
|
144
|
+
* Current suggestions array
|
|
145
|
+
* Use this to read the current suggestions or in conjunction with setSuggestions for manual control
|
|
146
|
+
*/
|
|
147
|
+
suggestions: SuggestionItem[];
|
|
148
|
+
/**
|
|
149
|
+
* Manually set suggestions
|
|
150
|
+
* Useful for manual mode or custom suggestion workflows
|
|
151
|
+
*/
|
|
152
|
+
setSuggestions: (suggestions: SuggestionItem[]) => void;
|
|
153
|
+
/**
|
|
154
|
+
* Trigger AI-powered suggestion generation
|
|
155
|
+
* Uses configurations from useCopilotChatSuggestions hooks
|
|
156
|
+
* Respects global debouncing - only one generation can run at a time
|
|
157
|
+
*
|
|
158
|
+
* ```tsx
|
|
159
|
+
* generateSuggestions();
|
|
160
|
+
* console.log(suggestions); // [suggestion1, suggestion2, suggestion3]
|
|
161
|
+
* ```
|
|
162
|
+
*/
|
|
163
|
+
generateSuggestions: () => Promise<void>;
|
|
164
|
+
/**
|
|
165
|
+
* Clear all current suggestions
|
|
166
|
+
* Also resets suggestion generation state
|
|
167
|
+
*/
|
|
168
|
+
resetSuggestions: () => void;
|
|
169
|
+
/** Whether suggestions are currently being generated */
|
|
170
|
+
isLoadingSuggestions: boolean;
|
|
171
|
+
/** Interrupt content for human-in-the-loop workflows */
|
|
172
|
+
interrupt: string | React.ReactElement | null;
|
|
173
|
+
}
|
|
174
|
+
declare function useCopilotChat(options?: UseCopilotChatOptions): UseCopilotChatReturn;
|
|
175
|
+
declare function defaultSystemMessage(contextString: string, additionalInstructions?: string): string;
|
|
176
|
+
|
|
177
|
+
export { MCPServerConfig, UseCopilotChatOptions, UseCopilotChatReturn, defaultSystemMessage, useCopilotChat };
|