@copilotkit/react-core 1.10.1-next.2 → 1.10.2-next.0
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 +18 -0
- package/dist/{chunk-WSXTUD36.mjs → chunk-A2ORBLCP.mjs} +3 -3
- package/dist/chunk-A2ORBLCP.mjs.map +1 -0
- package/dist/{chunk-BLMAVXM2.mjs → chunk-ACHZJNZF.mjs} +2 -2
- package/dist/{chunk-2GRWTU7W.mjs → chunk-AEAS6ZRO.mjs} +2 -2
- package/dist/{chunk-JY3STRON.mjs → chunk-HD2TFFAT.mjs} +5 -4
- package/dist/chunk-HD2TFFAT.mjs.map +1 -0
- package/dist/{chunk-KH27ZS4Y.mjs → chunk-HD3F6XVZ.mjs} +6 -5
- package/dist/chunk-HD3F6XVZ.mjs.map +1 -0
- package/dist/{chunk-NTH42BY5.mjs → chunk-KDE2GWEU.mjs} +2 -2
- package/dist/{chunk-BEFEBKKI.mjs → chunk-ME7RQK67.mjs} +2 -2
- package/dist/{chunk-3BASANUO.mjs → chunk-QE7Z6LQR.mjs} +3 -3
- package/dist/{chunk-3BASANUO.mjs.map → chunk-QE7Z6LQR.mjs.map} +1 -1
- package/dist/{chunk-5P46WS5M.mjs → chunk-WNMN2UNU.mjs} +2 -2
- package/dist/{chunk-YIBUNEBN.mjs → chunk-ZJYEXP6T.mjs} +2 -2
- package/dist/components/copilot-provider/copilotkit.js +3 -3
- package/dist/components/copilot-provider/copilotkit.js.map +1 -1
- package/dist/components/copilot-provider/copilotkit.mjs +3 -3
- package/dist/components/copilot-provider/index.js +3 -3
- package/dist/components/copilot-provider/index.js.map +1 -1
- package/dist/components/copilot-provider/index.mjs +3 -3
- package/dist/components/dev-console/console-trigger.js +3 -3
- package/dist/components/dev-console/console-trigger.js.map +1 -1
- package/dist/components/dev-console/console-trigger.mjs +2 -2
- package/dist/components/dev-console/developer-console-modal.js +2 -2
- package/dist/components/dev-console/developer-console-modal.js.map +1 -1
- package/dist/components/dev-console/developer-console-modal.mjs +1 -1
- package/dist/components/index.js +3 -3
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +3 -3
- package/dist/hooks/index.js +7 -5
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/index.mjs +9 -9
- package/dist/hooks/use-chat.d.ts +1 -0
- package/dist/hooks/use-chat.js +5 -4
- package/dist/hooks/use-chat.js.map +1 -1
- package/dist/hooks/use-chat.mjs +1 -1
- package/dist/hooks/use-coagent.js +7 -5
- package/dist/hooks/use-coagent.js.map +1 -1
- package/dist/hooks/use-coagent.mjs +6 -6
- package/dist/hooks/use-copilot-chat-headless_c.js +7 -5
- package/dist/hooks/use-copilot-chat-headless_c.js.map +1 -1
- package/dist/hooks/use-copilot-chat-headless_c.mjs +6 -6
- package/dist/hooks/use-copilot-chat.js +7 -5
- package/dist/hooks/use-copilot-chat.js.map +1 -1
- package/dist/hooks/use-copilot-chat.mjs +6 -6
- package/dist/hooks/use-copilot-chat_internal.d.ts +4 -0
- package/dist/hooks/use-copilot-chat_internal.js +7 -5
- package/dist/hooks/use-copilot-chat_internal.js.map +1 -1
- package/dist/hooks/use-copilot-chat_internal.mjs +5 -5
- package/dist/hooks/use-langgraph-interrupt.js +7 -5
- package/dist/hooks/use-langgraph-interrupt.js.map +1 -1
- package/dist/hooks/use-langgraph-interrupt.mjs +6 -6
- package/dist/index.js +10 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -10
- package/dist/lib/copilot-task.mjs +4 -4
- package/dist/lib/index.mjs +4 -4
- package/dist/utils/extract.mjs +3 -3
- package/dist/utils/index.mjs +3 -3
- package/dist/utils/suggestions.mjs +3 -3
- package/package.json +3 -3
- package/src/components/dev-console/console-trigger.tsx +2 -2
- package/src/components/dev-console/developer-console-modal.tsx +2 -2
- package/src/hooks/use-chat.ts +7 -3
- package/src/hooks/use-copilot-chat_internal.ts +6 -0
- package/dist/chunk-JY3STRON.mjs.map +0 -1
- package/dist/chunk-KH27ZS4Y.mjs.map +0 -1
- package/dist/chunk-WSXTUD36.mjs.map +0 -1
- /package/dist/{chunk-BLMAVXM2.mjs.map → chunk-ACHZJNZF.mjs.map} +0 -0
- /package/dist/{chunk-2GRWTU7W.mjs.map → chunk-AEAS6ZRO.mjs.map} +0 -0
- /package/dist/{chunk-NTH42BY5.mjs.map → chunk-KDE2GWEU.mjs.map} +0 -0
- /package/dist/{chunk-BEFEBKKI.mjs.map → chunk-ME7RQK67.mjs.map} +0 -0
- /package/dist/{chunk-5P46WS5M.mjs.map → chunk-WNMN2UNU.mjs.map} +0 -0
- /package/dist/{chunk-YIBUNEBN.mjs.map → chunk-ZJYEXP6T.mjs.map} +0 -0
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useCopilotChat
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-ZJYEXP6T.mjs";
|
|
4
|
+
import "../chunk-HD2TFFAT.mjs";
|
|
5
5
|
import "../chunk-IN7GE4NO.mjs";
|
|
6
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-HD3F6XVZ.mjs";
|
|
7
7
|
import "../chunk-4CEQJ2X6.mjs";
|
|
8
|
-
import "../chunk-
|
|
8
|
+
import "../chunk-WNMN2UNU.mjs";
|
|
9
9
|
import "../chunk-N4VN2B5S.mjs";
|
|
10
10
|
import "../chunk-MUDXTKXE.mjs";
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-
|
|
11
|
+
import "../chunk-QE7Z6LQR.mjs";
|
|
12
|
+
import "../chunk-A2ORBLCP.mjs";
|
|
13
13
|
import "../chunk-PIF5KJYI.mjs";
|
|
14
14
|
import "../chunk-2IDV5OHF.mjs";
|
|
15
15
|
import "../chunk-PMAFHQ7P.mjs";
|
|
@@ -31,6 +31,10 @@ interface UseCopilotChatOptions {
|
|
|
31
31
|
* A function to generate the system message. Defaults to `defaultSystemMessage`.
|
|
32
32
|
*/
|
|
33
33
|
makeSystemMessage?: SystemMessageFunction;
|
|
34
|
+
/**
|
|
35
|
+
* Disables inclusion of CopilotKit’s default system message. When true, no system message is sent (this also suppresses any custom message from <code>makeSystemMessage</code>).
|
|
36
|
+
*/
|
|
37
|
+
disableSystemMessage?: boolean;
|
|
34
38
|
}
|
|
35
39
|
interface MCPServerConfig {
|
|
36
40
|
endpoint: string;
|
|
@@ -521,7 +521,8 @@ function useChat(options) {
|
|
|
521
521
|
extensions,
|
|
522
522
|
setExtensions,
|
|
523
523
|
langGraphInterruptAction,
|
|
524
|
-
setLangGraphInterruptAction
|
|
524
|
+
setLangGraphInterruptAction,
|
|
525
|
+
disableSystemMessage = false
|
|
525
526
|
} = options;
|
|
526
527
|
const runChatCompletionRef = (0, import_react6.useRef)();
|
|
527
528
|
const addErrorToast = useErrorToast();
|
|
@@ -591,8 +592,7 @@ function useChat(options) {
|
|
|
591
592
|
];
|
|
592
593
|
chatAbortControllerRef.current = new AbortController();
|
|
593
594
|
setMessages([...previousMessages, ...newMessages]);
|
|
594
|
-
const
|
|
595
|
-
const messagesWithContext = [systemMessage, ...initialMessages || [], ...previousMessages];
|
|
595
|
+
const messagesWithContext = disableSystemMessage ? [...initialMessages || [], ...previousMessages] : [makeSystemMessageCallback(), ...initialMessages || [], ...previousMessages];
|
|
596
596
|
const finalProperties = __spreadValues({}, copilotConfig.properties || {});
|
|
597
597
|
let mcpServersToUse = null;
|
|
598
598
|
if (copilotConfig.mcpServers && Array.isArray(copilotConfig.mcpServers) && copilotConfig.mcpServers.length > 0) {
|
|
@@ -954,7 +954,8 @@ function useChat(options) {
|
|
|
954
954
|
setCoagentStatesWithRef,
|
|
955
955
|
coagentStatesRef,
|
|
956
956
|
agentSession,
|
|
957
|
-
setAgentSession
|
|
957
|
+
setAgentSession,
|
|
958
|
+
disableSystemMessage
|
|
958
959
|
]
|
|
959
960
|
);
|
|
960
961
|
runChatCompletionRef.current = runChatCompletion;
|
|
@@ -1631,7 +1632,8 @@ function useCopilotChat(options = {}) {
|
|
|
1631
1632
|
extensions,
|
|
1632
1633
|
setExtensions,
|
|
1633
1634
|
langGraphInterruptAction,
|
|
1634
|
-
setLangGraphInterruptAction
|
|
1635
|
+
setLangGraphInterruptAction,
|
|
1636
|
+
disableSystemMessage: options.disableSystemMessage
|
|
1635
1637
|
}));
|
|
1636
1638
|
const latestAppend = useUpdatedRef(append);
|
|
1637
1639
|
const latestAppendFunc = useAsyncCallback(
|