@copilotkit/react-ui 1.3.15 → 1.3.16-mme-copilot-suggestions.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 +10 -0
- package/dist/{chunk-3EYL2DRG.mjs → chunk-DTI5DZSK.mjs} +5 -5
- package/dist/{chunk-Z2UZSN3K.mjs → chunk-HGQFDT5I.mjs} +1 -1
- package/dist/chunk-HGQFDT5I.mjs.map +1 -0
- package/dist/chunk-K5JLXNIN.mjs +108 -0
- package/dist/chunk-K5JLXNIN.mjs.map +1 -0
- package/dist/{chunk-AX7CAT7V.mjs → chunk-PIK3RYPJ.mjs} +2 -2
- package/dist/chunk-RJ54B6VE.mjs +1 -0
- package/dist/{chunk-3JNDMHS4.mjs → chunk-T7DQWLTN.mjs} +2 -2
- package/dist/{chunk-NLIDKNNS.mjs → chunk-UYT3USIS.mjs} +5 -5
- package/dist/{chunk-RS6UPR5N.mjs → chunk-W3TDOLUY.mjs} +8 -8
- package/dist/components/chat/Chat.mjs +5 -5
- package/dist/components/chat/Modal.mjs +6 -6
- package/dist/components/chat/Popup.mjs +7 -7
- package/dist/components/chat/Sidebar.mjs +7 -7
- package/dist/components/chat/index.mjs +8 -8
- package/dist/components/chat/messages/RenderTextMessage.mjs +1 -1
- package/dist/components/dev-console/console.mjs +2 -2
- package/dist/components/dev-console/index.mjs +2 -2
- package/dist/components/index.mjs +8 -8
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/index.js +135 -2
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/index.mjs +7 -3
- package/dist/hooks/use-copilot-chat-suggestions.d.ts +1 -3
- package/dist/hooks/use-copilot-chat-suggestions.js.map +1 -1
- package/dist/hooks/use-copilot-chat-suggestions.mjs +1 -1
- package/dist/hooks/use-copilot-suggestions.d.ts +79 -0
- package/dist/hooks/use-copilot-suggestions.js +159 -0
- package/dist/hooks/use-copilot-suggestions.js.map +1 -0
- package/dist/hooks/use-copilot-suggestions.mjs +8 -0
- package/dist/hooks/use-copilot-suggestions.mjs.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +98 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +15 -11
- package/package.json +7 -7
- package/src/hooks/index.ts +1 -0
- package/src/hooks/use-copilot-chat-suggestions.tsx +1 -3
- package/src/hooks/use-copilot-suggestions.ts +189 -0
- package/dist/chunk-T26KLXLH.mjs +0 -1
- package/dist/chunk-Z2UZSN3K.mjs.map +0 -1
- /package/dist/{chunk-3EYL2DRG.mjs.map → chunk-DTI5DZSK.mjs.map} +0 -0
- /package/dist/{chunk-AX7CAT7V.mjs.map → chunk-PIK3RYPJ.mjs.map} +0 -0
- /package/dist/{chunk-T26KLXLH.mjs.map → chunk-RJ54B6VE.mjs.map} +0 -0
- /package/dist/{chunk-3JNDMHS4.mjs.map → chunk-T7DQWLTN.mjs.map} +0 -0
- /package/dist/{chunk-NLIDKNNS.mjs.map → chunk-UYT3USIS.mjs.map} +0 -0
- /package/dist/{chunk-RS6UPR5N.mjs.map → chunk-W3TDOLUY.mjs.map} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# ui
|
|
2
2
|
|
|
3
|
+
## 1.3.16-mme-copilot-suggestions.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Headless suggestions
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- @copilotkit/react-core@1.3.16-mme-copilot-suggestions.0
|
|
10
|
+
- @copilotkit/runtime-client-gql@1.3.16-mme-copilot-suggestions.0
|
|
11
|
+
- @copilotkit/shared@1.3.16-mme-copilot-suggestions.0
|
|
12
|
+
|
|
3
13
|
## 1.3.15
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
|
@@ -9,16 +9,16 @@ import {
|
|
|
9
9
|
} from "./chunk-RQNJNK2W.mjs";
|
|
10
10
|
import {
|
|
11
11
|
CopilotChat
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-UYT3USIS.mjs";
|
|
13
|
+
import {
|
|
14
|
+
ResponseButton
|
|
15
|
+
} from "./chunk-3XAXY2Z3.mjs";
|
|
13
16
|
import {
|
|
14
17
|
Input
|
|
15
18
|
} from "./chunk-4LUMV4YO.mjs";
|
|
16
19
|
import {
|
|
17
20
|
Messages
|
|
18
21
|
} from "./chunk-CPMIEVKK.mjs";
|
|
19
|
-
import {
|
|
20
|
-
ResponseButton
|
|
21
|
-
} from "./chunk-3XAXY2Z3.mjs";
|
|
22
22
|
import {
|
|
23
23
|
ChatContextProvider
|
|
24
24
|
} from "./chunk-CBBFRI3Q.mjs";
|
|
@@ -88,4 +88,4 @@ var CopilotModal = ({
|
|
|
88
88
|
export {
|
|
89
89
|
CopilotModal
|
|
90
90
|
};
|
|
91
|
-
//# sourceMappingURL=chunk-
|
|
91
|
+
//# sourceMappingURL=chunk-DTI5DZSK.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/hooks/use-copilot-chat-suggestions.tsx"],"sourcesContent":["/**\n * <Callout type=\"warning\">\n * useCopilotChatSuggestions is experimental. The interface is not final and\n * can change without notice.\n * </Callout>\n *\n * `useCopilotChatSuggestions` is a React hook that provides auto-suggestions in the Copilot chat.\n *\n * <br/>\n * <img src=\"/images/use-copilot-chat-suggestions/use-copilot-chat-suggestions.gif\" width=\"500\" />\n *\n * ## Usage\n *\n * ### Install Dependencies\n *\n * This component is part of the [@copilotkit/react-ui](https://npmjs.com/package/@copilotkit/react-ui) package.\n *\n * ```shell npm2yarn \\\"@copilotkit/react-ui\"\\\n * npm install @copilotkit/react-core @copilotkit/react-ui\n * ```\n *\n * ### Simple Usage\n *\n * ```tsx\n * import { useCopilotChatSuggestions } from \"@copilotkit/react-ui\";\n *\n * export function MyComponent() {\n * const [employees, setEmployees] = useState([]);\n *\n * useCopilotChatSuggestions({\n * instructions: `The following employees are on duty: ${JSON.stringify(employees)}`,\n * });\n * }\n * ```\n *\n * ### Dependency Management\n *\n * ```tsx\n * import { useCopilotChatSuggestions } from \"@copilotkit/react-ui\";\n *\n * export function MyComponent() {\n * useCopilotChatSuggestions(\n * {\n * instructions: \"Suggest the most relevant next actions.\",\n * },\n * [appState],\n * );\n * }\n * ```\n *\n * In the example above, the suggestions are generated based on the given instructions.\n * The hook monitors `appState`, and updates suggestions accordingly whenever it changes.\n *\n * ### Behavior and Lifecycle\n *\n * The hook registers the configuration with the chat context upon component mount and\n * removes it on unmount, ensuring a clean and efficient lifecycle management.\n */\n\nimport { useEffect } from \"react\";\nimport { useCopilotContext } from \"@copilotkit/react-core\";\nimport { randomId } from \"@copilotkit/shared\";\n\ninterface UseCopilotChatSuggestionsConfiguration {\n /**\n * A prompt or instructions for the GPT to generate suggestions.\n */\n instructions: string;\n /**\n * The minimum number of suggestions to generate. Defaults to `1`.\n * @default 1\n */\n minSuggestions?: number;\n /**\n * The maximum number of suggestions to generate. Defaults to `3`.\n * @default 1\n */\n maxSuggestions?: number;\n /**\n * An optional class name to apply to the suggestions.\n */\n className?: string;\n}\n\nexport function useCopilotChatSuggestions(\n {\n instructions,\n className,\n minSuggestions = 1,\n maxSuggestions = 3,\n }: UseCopilotChatSuggestionsConfiguration,\n dependencies: any[] = [],\n) {\n const context = useCopilotContext();\n\n useEffect(() => {\n const id = randomId();\n\n context.addChatSuggestionConfiguration(id, {\n instructions,\n minSuggestions,\n maxSuggestions,\n className,\n });\n\n return () => {\n context.removeChatSuggestionConfiguration(id);\n };\n }, [...dependencies, instructions, minSuggestions, maxSuggestions, className]);\n}\n"],"mappings":";AA2DA,SAAS,iBAAiB;AAC1B,SAAS,yBAAyB;AAClC,SAAS,gBAAgB;AAuBlB,SAAS,0BACd;AAAA,EACE;AAAA,EACA;AAAA,EACA,iBAAiB;AAAA,EACjB,iBAAiB;AACnB,GACA,eAAsB,CAAC,GACvB;AACA,QAAM,UAAU,kBAAkB;AAElC,YAAU,MAAM;AACd,UAAM,KAAK,SAAS;AAEpB,YAAQ,+BAA+B,IAAI;AAAA,MACzC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF,CAAC;AAED,WAAO,MAAM;AACX,cAAQ,kCAAkC,EAAE;AAAA,IAC9C;AAAA,EACF,GAAG,CAAC,GAAG,cAAc,cAAc,gBAAgB,gBAAgB,SAAS,CAAC;AAC/E;","names":[]}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__async,
|
|
3
|
+
__spreadProps,
|
|
4
|
+
__spreadValues
|
|
5
|
+
} from "./chunk-MRXNTQOX.mjs";
|
|
6
|
+
|
|
7
|
+
// src/hooks/use-copilot-suggestions.ts
|
|
8
|
+
import { useEffect, useState, useRef, useCallback } from "react";
|
|
9
|
+
import {
|
|
10
|
+
extract,
|
|
11
|
+
useCopilotContext,
|
|
12
|
+
useCopilotMessagesContext
|
|
13
|
+
} from "@copilotkit/react-core";
|
|
14
|
+
import { CopilotRequestType } from "@copilotkit/runtime-client-gql";
|
|
15
|
+
function useCopilotSuggestions({
|
|
16
|
+
instructions,
|
|
17
|
+
parameters,
|
|
18
|
+
value,
|
|
19
|
+
enabled = true,
|
|
20
|
+
debounceTime = 1e3
|
|
21
|
+
}, dependencies = []) {
|
|
22
|
+
const suggestionsAbortControllerRef = useRef(null);
|
|
23
|
+
const debounceTimerRef = useRef();
|
|
24
|
+
const [suggestions, setSuggestions] = useState({
|
|
25
|
+
suggestions: void 0,
|
|
26
|
+
isAvailable: false,
|
|
27
|
+
isLoading: false
|
|
28
|
+
});
|
|
29
|
+
const isFirstRunRef = useRef(true);
|
|
30
|
+
const abortSuggestions = useCallback(() => {
|
|
31
|
+
var _a;
|
|
32
|
+
(_a = suggestionsAbortControllerRef.current) == null ? void 0 : _a.abort();
|
|
33
|
+
suggestionsAbortControllerRef.current = null;
|
|
34
|
+
}, []);
|
|
35
|
+
const generalContext = useCopilotContext();
|
|
36
|
+
const messagesContext = useCopilotMessagesContext();
|
|
37
|
+
const context = __spreadValues(__spreadValues({}, generalContext), messagesContext);
|
|
38
|
+
useEffect(() => {
|
|
39
|
+
abortSuggestions();
|
|
40
|
+
if (!enabled) {
|
|
41
|
+
setSuggestions({ suggestions: void 0, isAvailable: false, isLoading: false });
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
if (JSON.stringify(value) === JSON.stringify(suggestions.suggestions)) {
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
debounceTimerRef.current = setTimeout(
|
|
48
|
+
() => __async(this, null, function* () {
|
|
49
|
+
isFirstRunRef.current = false;
|
|
50
|
+
suggestionsAbortControllerRef.current = new AbortController();
|
|
51
|
+
setSuggestions(__spreadProps(__spreadValues({}, suggestions), { isLoading: true }));
|
|
52
|
+
yield reloadSuggestions(
|
|
53
|
+
context,
|
|
54
|
+
instructions,
|
|
55
|
+
parameters,
|
|
56
|
+
value,
|
|
57
|
+
suggestionsAbortControllerRef,
|
|
58
|
+
setSuggestions
|
|
59
|
+
);
|
|
60
|
+
}),
|
|
61
|
+
isFirstRunRef.current === true ? 0 : debounceTime
|
|
62
|
+
);
|
|
63
|
+
return () => {
|
|
64
|
+
clearTimeout(debounceTimerRef.current);
|
|
65
|
+
};
|
|
66
|
+
}, [
|
|
67
|
+
instructions,
|
|
68
|
+
JSON.stringify(parameters),
|
|
69
|
+
JSON.stringify(value),
|
|
70
|
+
enabled,
|
|
71
|
+
debounceTime,
|
|
72
|
+
...dependencies
|
|
73
|
+
]);
|
|
74
|
+
return suggestions;
|
|
75
|
+
}
|
|
76
|
+
function reloadSuggestions(context, instructions, parameters, value, abortControllerRef, setSuggestions) {
|
|
77
|
+
return __async(this, null, function* () {
|
|
78
|
+
const abortController = abortControllerRef.current;
|
|
79
|
+
let fullInstructions = `It's your task to generate suggestions based on the application context.`;
|
|
80
|
+
if (instructions) {
|
|
81
|
+
fullInstructions += `
|
|
82
|
+
|
|
83
|
+
In addition, follow these specific instructions: ${instructions}`;
|
|
84
|
+
}
|
|
85
|
+
if (value) {
|
|
86
|
+
fullInstructions += `
|
|
87
|
+
|
|
88
|
+
The current value of the parameter is: ${JSON.stringify(value)}.If it makes sense to complete the existing data, i.e. expand string values, add new elements to arrays, etc., do so. Otherwise, generate a new value.`;
|
|
89
|
+
}
|
|
90
|
+
yield extract({
|
|
91
|
+
context,
|
|
92
|
+
instructions: fullInstructions,
|
|
93
|
+
parameters,
|
|
94
|
+
abortSignal: abortController == null ? void 0 : abortController.signal,
|
|
95
|
+
requestType: CopilotRequestType.Task,
|
|
96
|
+
stream({ args, status }) {
|
|
97
|
+
if (status === "complete") {
|
|
98
|
+
setSuggestions({ suggestions: args, isAvailable: true, isLoading: false });
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export {
|
|
106
|
+
useCopilotSuggestions
|
|
107
|
+
};
|
|
108
|
+
//# sourceMappingURL=chunk-K5JLXNIN.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/hooks/use-copilot-suggestions.ts"],"sourcesContent":["/**\n * <Callout type=\"warning\">\n * useCopilotSuggestions is experimental. The interface is not final and\n * can change without notice.\n * </Callout>\n *\n * `useCopilotSuggestions` is a React hook that provides auto-suggestions that can be added to any\n * UI component.\n *\n * ## Usage\n *\n * ### Install Dependencies\n *\n * This component is part of the [@copilotkit/react-ui](https://npmjs.com/package/@copilotkit/react-ui) package.\n *\n * ```shell npm2yarn \\\"@copilotkit/react-ui\"\\\n * npm install @copilotkit/react-core @copilotkit/react-ui\n * ```\n *\n * ### Simple Usage\n *\n * ```tsx\n * TODO\n * ```\n *\n * ### Dependency Management\n *\n * ```tsx\n * TODO\n * }\n * ```\n *\n * In the example above, the suggestions are generated based on the given instructions.\n * The hook monitors `appState`, and updates suggestions accordingly whenever it changes.\n *\n * ### Behavior and Lifecycle\n *\n * The hook registers the configuration with the chat context upon component mount and\n * removes it on unmount, ensuring a clean and efficient lifecycle management.\n */\n\nimport { useEffect, useState, useRef, useCallback } from \"react\";\nimport {\n CopilotContextParams,\n CopilotMessagesContextParams,\n extract,\n useCopilotContext,\n useCopilotMessagesContext,\n} from \"@copilotkit/react-core\";\nimport { MappedParameterTypes, Parameter, randomId } from \"@copilotkit/shared\";\nimport { CopilotRequestType } from \"@copilotkit/runtime-client-gql\";\n\nexport interface UseCopilotSuggestionsConfiguration<T extends Parameter[] = []> {\n /**\n * A prompt or instructions for the GPT to generate suggestions.\n */\n instructions?: string;\n\n /**\n * The data to pass to the suggestions.\n */\n parameters: T;\n\n /**\n * The current value of the parameter.\n */\n value?: Partial<MappedParameterTypes<T>>;\n\n /**\n * Whether the suggestions are enabled.\n * @default true\n */\n enabled?: boolean;\n\n /**\n * The debounce time in milliseconds.\n * @default 1000\n */\n debounceTime?: number;\n}\nexport type SuggestionsResult<T extends Parameter[]> =\n | { suggestions: undefined; isAvailable: false; isLoading: boolean }\n | { suggestions: MappedParameterTypes<T>; isAvailable: true; isLoading: boolean };\n\nexport function useCopilotSuggestions<const T extends Parameter[]>(\n {\n instructions,\n parameters,\n value,\n enabled = true,\n debounceTime = 1000,\n }: UseCopilotSuggestionsConfiguration<T>,\n dependencies: any[] = [],\n): SuggestionsResult<T> {\n const suggestionsAbortControllerRef = useRef<AbortController | null>(null);\n const debounceTimerRef = useRef<any>();\n const [suggestions, setSuggestions] = useState<SuggestionsResult<T>>({\n suggestions: undefined,\n isAvailable: false,\n isLoading: false,\n });\n const isFirstRunRef = useRef(true);\n\n const abortSuggestions = useCallback(() => {\n suggestionsAbortControllerRef.current?.abort();\n suggestionsAbortControllerRef.current = null;\n }, []);\n\n const generalContext = useCopilotContext();\n const messagesContext = useCopilotMessagesContext();\n const context = { ...generalContext, ...messagesContext };\n\n useEffect(() => {\n abortSuggestions();\n if (!enabled) {\n setSuggestions({ suggestions: undefined, isAvailable: false, isLoading: false });\n return;\n }\n\n // if value is the same as the last suggestions, don't reload\n if (JSON.stringify(value) === JSON.stringify(suggestions.suggestions)) {\n return;\n }\n\n debounceTimerRef.current = setTimeout(\n async () => {\n isFirstRunRef.current = false;\n suggestionsAbortControllerRef.current = new AbortController();\n setSuggestions({ ...suggestions, isLoading: true });\n await reloadSuggestions(\n context,\n instructions,\n parameters,\n value,\n suggestionsAbortControllerRef,\n setSuggestions,\n );\n },\n isFirstRunRef.current === true ? 0 : debounceTime,\n );\n\n return () => {\n clearTimeout(debounceTimerRef.current);\n };\n }, [\n instructions,\n JSON.stringify(parameters),\n JSON.stringify(value),\n enabled,\n debounceTime,\n ...dependencies,\n ]);\n\n return suggestions;\n}\n\nasync function reloadSuggestions(\n context: CopilotContextParams & CopilotMessagesContextParams,\n instructions: string | undefined,\n parameters: Parameter[],\n value: any,\n abortControllerRef: React.MutableRefObject<AbortController | null>,\n setSuggestions: (suggestions: any) => void,\n) {\n const abortController = abortControllerRef.current;\n let fullInstructions = `It's your task to generate suggestions based on the application context.`;\n if (instructions) {\n fullInstructions += `\\n\\nIn addition, follow these specific instructions: ${instructions}`;\n }\n if (value) {\n fullInstructions +=\n `\\n\\nThe current value of the parameter is: ${JSON.stringify(value)}.` +\n `If it makes sense to complete the existing data, i.e. expand string values, add new elements to arrays, etc., do so. ` +\n `Otherwise, generate a new value.`;\n }\n\n await extract({\n context,\n instructions: fullInstructions,\n parameters,\n abortSignal: abortController?.signal,\n requestType: CopilotRequestType.Task,\n stream({ args, status }) {\n if (status === \"complete\") {\n setSuggestions({ suggestions: args, isAvailable: true, isLoading: false });\n }\n },\n });\n}\n"],"mappings":";;;;;;;AAyCA,SAAS,WAAW,UAAU,QAAQ,mBAAmB;AACzD;AAAA,EAGE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,0BAA0B;AAkC5B,SAAS,sBACd;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA,UAAU;AAAA,EACV,eAAe;AACjB,GACA,eAAsB,CAAC,GACD;AACtB,QAAM,gCAAgC,OAA+B,IAAI;AACzE,QAAM,mBAAmB,OAAY;AACrC,QAAM,CAAC,aAAa,cAAc,IAAI,SAA+B;AAAA,IACnE,aAAa;AAAA,IACb,aAAa;AAAA,IACb,WAAW;AAAA,EACb,CAAC;AACD,QAAM,gBAAgB,OAAO,IAAI;AAEjC,QAAM,mBAAmB,YAAY,MAAM;AAvG7C;AAwGI,wCAA8B,YAA9B,mBAAuC;AACvC,kCAA8B,UAAU;AAAA,EAC1C,GAAG,CAAC,CAAC;AAEL,QAAM,iBAAiB,kBAAkB;AACzC,QAAM,kBAAkB,0BAA0B;AAClD,QAAM,UAAU,kCAAK,iBAAmB;AAExC,YAAU,MAAM;AACd,qBAAiB;AACjB,QAAI,CAAC,SAAS;AACZ,qBAAe,EAAE,aAAa,QAAW,aAAa,OAAO,WAAW,MAAM,CAAC;AAC/E;AAAA,IACF;AAGA,QAAI,KAAK,UAAU,KAAK,MAAM,KAAK,UAAU,YAAY,WAAW,GAAG;AACrE;AAAA,IACF;AAEA,qBAAiB,UAAU;AAAA,MACzB,MAAY;AACV,sBAAc,UAAU;AACxB,sCAA8B,UAAU,IAAI,gBAAgB;AAC5D,uBAAe,iCAAK,cAAL,EAAkB,WAAW,KAAK,EAAC;AAClD,cAAM;AAAA,UACJ;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,QACF;AAAA,MACF;AAAA,MACA,cAAc,YAAY,OAAO,IAAI;AAAA,IACvC;AAEA,WAAO,MAAM;AACX,mBAAa,iBAAiB,OAAO;AAAA,IACvC;AAAA,EACF,GAAG;AAAA,IACD;AAAA,IACA,KAAK,UAAU,UAAU;AAAA,IACzB,KAAK,UAAU,KAAK;AAAA,IACpB;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,CAAC;AAED,SAAO;AACT;AAEA,SAAe,kBACb,SACA,cACA,YACA,OACA,oBACA,gBACA;AAAA;AACA,UAAM,kBAAkB,mBAAmB;AAC3C,QAAI,mBAAmB;AACvB,QAAI,cAAc;AAChB,0BAAoB;AAAA;AAAA,mDAAwD;AAAA,IAC9E;AACA,QAAI,OAAO;AACT,0BACE;AAAA;AAAA,yCAA8C,KAAK,UAAU,KAAK;AAAA,IAGtE;AAEA,UAAM,QAAQ;AAAA,MACZ;AAAA,MACA,cAAc;AAAA,MACd;AAAA,MACA,aAAa,mDAAiB;AAAA,MAC9B,aAAa,mBAAmB;AAAA,MAChC,OAAO,EAAE,MAAM,OAAO,GAAG;AACvB,YAAI,WAAW,YAAY;AACzB,yBAAe,EAAE,aAAa,MAAM,aAAa,MAAM,WAAW,MAAM,CAAC;AAAA,QAC3E;AAAA,MACF;AAAA,IACF,CAAC;AAAA,EACH;AAAA;","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CopilotModal
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-DTI5DZSK.mjs";
|
|
4
4
|
import {
|
|
5
5
|
__spreadProps,
|
|
6
6
|
__spreadValues
|
|
@@ -18,4 +18,4 @@ function CopilotPopup(props) {
|
|
|
18
18
|
export {
|
|
19
19
|
CopilotPopup
|
|
20
20
|
};
|
|
21
|
-
//# sourceMappingURL=chunk-
|
|
21
|
+
//# sourceMappingURL=chunk-PIK3RYPJ.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=chunk-RJ54B6VE.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CopilotModal
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-DTI5DZSK.mjs";
|
|
4
4
|
import {
|
|
5
5
|
__spreadProps,
|
|
6
6
|
__spreadValues
|
|
@@ -27,4 +27,4 @@ function CopilotSidebar(props) {
|
|
|
27
27
|
export {
|
|
28
28
|
CopilotSidebar
|
|
29
29
|
};
|
|
30
|
-
//# sourceMappingURL=chunk-
|
|
30
|
+
//# sourceMappingURL=chunk-T7DQWLTN.mjs.map
|
|
@@ -10,22 +10,22 @@ import {
|
|
|
10
10
|
import {
|
|
11
11
|
RenderTextMessage
|
|
12
12
|
} from "./chunk-RU73BEZM.mjs";
|
|
13
|
+
import {
|
|
14
|
+
ResponseButton
|
|
15
|
+
} from "./chunk-3XAXY2Z3.mjs";
|
|
13
16
|
import {
|
|
14
17
|
Suggestion,
|
|
15
18
|
reloadSuggestions
|
|
16
19
|
} from "./chunk-RJCZRKTV.mjs";
|
|
17
20
|
import {
|
|
18
21
|
CopilotDevConsole
|
|
19
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-W3TDOLUY.mjs";
|
|
20
23
|
import {
|
|
21
24
|
Input
|
|
22
25
|
} from "./chunk-4LUMV4YO.mjs";
|
|
23
26
|
import {
|
|
24
27
|
Messages
|
|
25
28
|
} from "./chunk-CPMIEVKK.mjs";
|
|
26
|
-
import {
|
|
27
|
-
ResponseButton
|
|
28
|
-
} from "./chunk-3XAXY2Z3.mjs";
|
|
29
29
|
import {
|
|
30
30
|
ChatContext,
|
|
31
31
|
ChatContextProvider
|
|
@@ -198,4 +198,4 @@ export {
|
|
|
198
198
|
WrappedCopilotChat,
|
|
199
199
|
useCopilotChatLogic
|
|
200
200
|
};
|
|
201
|
-
//# sourceMappingURL=chunk-
|
|
201
|
+
//# sourceMappingURL=chunk-UYT3USIS.mjs.map
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
getPublishedCopilotKitVersion,
|
|
3
|
-
logActions,
|
|
4
|
-
logMessages,
|
|
5
|
-
logReadables,
|
|
6
|
-
shouldShowDevConsole
|
|
7
|
-
} from "./chunk-4FIGRRFS.mjs";
|
|
8
1
|
import {
|
|
9
2
|
CheckIcon,
|
|
10
3
|
ChevronDownIcon,
|
|
@@ -12,6 +5,13 @@ import {
|
|
|
12
5
|
ExclamationMarkIcon,
|
|
13
6
|
ExclamationMarkTriangleIcon
|
|
14
7
|
} from "./chunk-OTPAZXVR.mjs";
|
|
8
|
+
import {
|
|
9
|
+
getPublishedCopilotKitVersion,
|
|
10
|
+
logActions,
|
|
11
|
+
logMessages,
|
|
12
|
+
logReadables,
|
|
13
|
+
shouldShowDevConsole
|
|
14
|
+
} from "./chunk-4FIGRRFS.mjs";
|
|
15
15
|
import {
|
|
16
16
|
SmallSpinnerIcon
|
|
17
17
|
} from "./chunk-FZC7X5PK.mjs";
|
|
@@ -225,4 +225,4 @@ export {
|
|
|
225
225
|
CopilotDevConsole,
|
|
226
226
|
DebugMenuButton
|
|
227
227
|
};
|
|
228
|
-
//# sourceMappingURL=chunk-
|
|
228
|
+
//# sourceMappingURL=chunk-W3TDOLUY.mjs.map
|
|
@@ -2,23 +2,23 @@ import {
|
|
|
2
2
|
CopilotChat,
|
|
3
3
|
WrappedCopilotChat,
|
|
4
4
|
useCopilotChatLogic
|
|
5
|
-
} from "../../chunk-
|
|
5
|
+
} from "../../chunk-UYT3USIS.mjs";
|
|
6
6
|
import "../../chunk-V7W6IM2V.mjs";
|
|
7
7
|
import "../../chunk-OMTPWC7T.mjs";
|
|
8
8
|
import "../../chunk-ZABXREBH.mjs";
|
|
9
9
|
import "../../chunk-6INMITFA.mjs";
|
|
10
10
|
import "../../chunk-RU73BEZM.mjs";
|
|
11
|
+
import "../../chunk-3XAXY2Z3.mjs";
|
|
11
12
|
import "../../chunk-RJCZRKTV.mjs";
|
|
12
|
-
import "../../chunk-
|
|
13
|
-
import "../../chunk-4FIGRRFS.mjs";
|
|
13
|
+
import "../../chunk-W3TDOLUY.mjs";
|
|
14
14
|
import "../../chunk-OTPAZXVR.mjs";
|
|
15
|
+
import "../../chunk-4FIGRRFS.mjs";
|
|
15
16
|
import "../../chunk-4LUMV4YO.mjs";
|
|
16
17
|
import "../../chunk-YQFVRDNC.mjs";
|
|
17
18
|
import "../../chunk-YQ3D5IQV.mjs";
|
|
19
|
+
import "../../chunk-UPTB2MVO.mjs";
|
|
18
20
|
import "../../chunk-CPMIEVKK.mjs";
|
|
19
|
-
import "../../chunk-3XAXY2Z3.mjs";
|
|
20
21
|
import "../../chunk-CBBFRI3Q.mjs";
|
|
21
|
-
import "../../chunk-UPTB2MVO.mjs";
|
|
22
22
|
import "../../chunk-FZC7X5PK.mjs";
|
|
23
23
|
import "../../chunk-54JAUBUJ.mjs";
|
|
24
24
|
import "../../chunk-S5MBUNGN.mjs";
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CopilotModal
|
|
3
|
-
} from "../../chunk-
|
|
3
|
+
} from "../../chunk-DTI5DZSK.mjs";
|
|
4
4
|
import "../../chunk-YAGE7RCE.mjs";
|
|
5
5
|
import "../../chunk-VEC45H6Q.mjs";
|
|
6
6
|
import "../../chunk-RQNJNK2W.mjs";
|
|
7
|
-
import "../../chunk-
|
|
7
|
+
import "../../chunk-UYT3USIS.mjs";
|
|
8
8
|
import "../../chunk-V7W6IM2V.mjs";
|
|
9
9
|
import "../../chunk-OMTPWC7T.mjs";
|
|
10
10
|
import "../../chunk-ZABXREBH.mjs";
|
|
11
11
|
import "../../chunk-6INMITFA.mjs";
|
|
12
12
|
import "../../chunk-RU73BEZM.mjs";
|
|
13
|
+
import "../../chunk-3XAXY2Z3.mjs";
|
|
13
14
|
import "../../chunk-RJCZRKTV.mjs";
|
|
14
|
-
import "../../chunk-
|
|
15
|
-
import "../../chunk-4FIGRRFS.mjs";
|
|
15
|
+
import "../../chunk-W3TDOLUY.mjs";
|
|
16
16
|
import "../../chunk-OTPAZXVR.mjs";
|
|
17
|
+
import "../../chunk-4FIGRRFS.mjs";
|
|
17
18
|
import "../../chunk-4LUMV4YO.mjs";
|
|
18
19
|
import "../../chunk-YQFVRDNC.mjs";
|
|
19
20
|
import "../../chunk-YQ3D5IQV.mjs";
|
|
21
|
+
import "../../chunk-UPTB2MVO.mjs";
|
|
20
22
|
import "../../chunk-CPMIEVKK.mjs";
|
|
21
|
-
import "../../chunk-3XAXY2Z3.mjs";
|
|
22
23
|
import "../../chunk-CBBFRI3Q.mjs";
|
|
23
|
-
import "../../chunk-UPTB2MVO.mjs";
|
|
24
24
|
import "../../chunk-FZC7X5PK.mjs";
|
|
25
25
|
import "../../chunk-54JAUBUJ.mjs";
|
|
26
26
|
import "../../chunk-S5MBUNGN.mjs";
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CopilotPopup
|
|
3
|
-
} from "../../chunk-
|
|
4
|
-
import "../../chunk-
|
|
3
|
+
} from "../../chunk-PIK3RYPJ.mjs";
|
|
4
|
+
import "../../chunk-DTI5DZSK.mjs";
|
|
5
5
|
import "../../chunk-YAGE7RCE.mjs";
|
|
6
6
|
import "../../chunk-VEC45H6Q.mjs";
|
|
7
7
|
import "../../chunk-RQNJNK2W.mjs";
|
|
8
|
-
import "../../chunk-
|
|
8
|
+
import "../../chunk-UYT3USIS.mjs";
|
|
9
9
|
import "../../chunk-V7W6IM2V.mjs";
|
|
10
10
|
import "../../chunk-OMTPWC7T.mjs";
|
|
11
11
|
import "../../chunk-ZABXREBH.mjs";
|
|
12
12
|
import "../../chunk-6INMITFA.mjs";
|
|
13
13
|
import "../../chunk-RU73BEZM.mjs";
|
|
14
|
+
import "../../chunk-3XAXY2Z3.mjs";
|
|
14
15
|
import "../../chunk-RJCZRKTV.mjs";
|
|
15
|
-
import "../../chunk-
|
|
16
|
-
import "../../chunk-4FIGRRFS.mjs";
|
|
16
|
+
import "../../chunk-W3TDOLUY.mjs";
|
|
17
17
|
import "../../chunk-OTPAZXVR.mjs";
|
|
18
|
+
import "../../chunk-4FIGRRFS.mjs";
|
|
18
19
|
import "../../chunk-4LUMV4YO.mjs";
|
|
19
20
|
import "../../chunk-YQFVRDNC.mjs";
|
|
20
21
|
import "../../chunk-YQ3D5IQV.mjs";
|
|
22
|
+
import "../../chunk-UPTB2MVO.mjs";
|
|
21
23
|
import "../../chunk-CPMIEVKK.mjs";
|
|
22
|
-
import "../../chunk-3XAXY2Z3.mjs";
|
|
23
24
|
import "../../chunk-CBBFRI3Q.mjs";
|
|
24
|
-
import "../../chunk-UPTB2MVO.mjs";
|
|
25
25
|
import "../../chunk-FZC7X5PK.mjs";
|
|
26
26
|
import "../../chunk-54JAUBUJ.mjs";
|
|
27
27
|
import "../../chunk-S5MBUNGN.mjs";
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CopilotSidebar
|
|
3
|
-
} from "../../chunk-
|
|
4
|
-
import "../../chunk-
|
|
3
|
+
} from "../../chunk-T7DQWLTN.mjs";
|
|
4
|
+
import "../../chunk-DTI5DZSK.mjs";
|
|
5
5
|
import "../../chunk-YAGE7RCE.mjs";
|
|
6
6
|
import "../../chunk-VEC45H6Q.mjs";
|
|
7
7
|
import "../../chunk-RQNJNK2W.mjs";
|
|
8
|
-
import "../../chunk-
|
|
8
|
+
import "../../chunk-UYT3USIS.mjs";
|
|
9
9
|
import "../../chunk-V7W6IM2V.mjs";
|
|
10
10
|
import "../../chunk-OMTPWC7T.mjs";
|
|
11
11
|
import "../../chunk-ZABXREBH.mjs";
|
|
12
12
|
import "../../chunk-6INMITFA.mjs";
|
|
13
13
|
import "../../chunk-RU73BEZM.mjs";
|
|
14
|
+
import "../../chunk-3XAXY2Z3.mjs";
|
|
14
15
|
import "../../chunk-RJCZRKTV.mjs";
|
|
15
|
-
import "../../chunk-
|
|
16
|
-
import "../../chunk-4FIGRRFS.mjs";
|
|
16
|
+
import "../../chunk-W3TDOLUY.mjs";
|
|
17
17
|
import "../../chunk-OTPAZXVR.mjs";
|
|
18
|
+
import "../../chunk-4FIGRRFS.mjs";
|
|
18
19
|
import "../../chunk-4LUMV4YO.mjs";
|
|
19
20
|
import "../../chunk-YQFVRDNC.mjs";
|
|
20
21
|
import "../../chunk-YQ3D5IQV.mjs";
|
|
22
|
+
import "../../chunk-UPTB2MVO.mjs";
|
|
21
23
|
import "../../chunk-CPMIEVKK.mjs";
|
|
22
|
-
import "../../chunk-3XAXY2Z3.mjs";
|
|
23
24
|
import "../../chunk-CBBFRI3Q.mjs";
|
|
24
|
-
import "../../chunk-UPTB2MVO.mjs";
|
|
25
25
|
import "../../chunk-FZC7X5PK.mjs";
|
|
26
26
|
import "../../chunk-54JAUBUJ.mjs";
|
|
27
27
|
import "../../chunk-S5MBUNGN.mjs";
|
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
import "../../chunk-MRFF7GSQ.mjs";
|
|
2
2
|
import {
|
|
3
3
|
CopilotSidebar
|
|
4
|
-
} from "../../chunk-
|
|
4
|
+
} from "../../chunk-T7DQWLTN.mjs";
|
|
5
5
|
import "../../chunk-WB3YULQ4.mjs";
|
|
6
6
|
import {
|
|
7
7
|
CopilotPopup
|
|
8
|
-
} from "../../chunk-
|
|
9
|
-
import "../../chunk-
|
|
8
|
+
} from "../../chunk-PIK3RYPJ.mjs";
|
|
9
|
+
import "../../chunk-DTI5DZSK.mjs";
|
|
10
10
|
import "../../chunk-YAGE7RCE.mjs";
|
|
11
11
|
import "../../chunk-VEC45H6Q.mjs";
|
|
12
12
|
import "../../chunk-RQNJNK2W.mjs";
|
|
13
13
|
import {
|
|
14
14
|
CopilotChat
|
|
15
|
-
} from "../../chunk-
|
|
15
|
+
} from "../../chunk-UYT3USIS.mjs";
|
|
16
16
|
import "../../chunk-V7W6IM2V.mjs";
|
|
17
17
|
import "../../chunk-OMTPWC7T.mjs";
|
|
18
18
|
import "../../chunk-ZABXREBH.mjs";
|
|
19
19
|
import "../../chunk-6INMITFA.mjs";
|
|
20
20
|
import "../../chunk-RU73BEZM.mjs";
|
|
21
|
+
import "../../chunk-3XAXY2Z3.mjs";
|
|
21
22
|
import "../../chunk-RJCZRKTV.mjs";
|
|
22
|
-
import "../../chunk-
|
|
23
|
-
import "../../chunk-4FIGRRFS.mjs";
|
|
23
|
+
import "../../chunk-W3TDOLUY.mjs";
|
|
24
24
|
import "../../chunk-OTPAZXVR.mjs";
|
|
25
|
+
import "../../chunk-4FIGRRFS.mjs";
|
|
25
26
|
import "../../chunk-4LUMV4YO.mjs";
|
|
26
27
|
import "../../chunk-YQFVRDNC.mjs";
|
|
27
28
|
import "../../chunk-YQ3D5IQV.mjs";
|
|
29
|
+
import "../../chunk-UPTB2MVO.mjs";
|
|
28
30
|
import "../../chunk-CPMIEVKK.mjs";
|
|
29
|
-
import "../../chunk-3XAXY2Z3.mjs";
|
|
30
31
|
import {
|
|
31
32
|
useChatContext
|
|
32
33
|
} from "../../chunk-CBBFRI3Q.mjs";
|
|
33
|
-
import "../../chunk-UPTB2MVO.mjs";
|
|
34
34
|
import "../../chunk-FZC7X5PK.mjs";
|
|
35
35
|
import "../../chunk-54JAUBUJ.mjs";
|
|
36
36
|
import "../../chunk-S5MBUNGN.mjs";
|
|
@@ -2,8 +2,8 @@ import {
|
|
|
2
2
|
RenderTextMessage
|
|
3
3
|
} from "../../../chunk-RU73BEZM.mjs";
|
|
4
4
|
import "../../../chunk-YQ3D5IQV.mjs";
|
|
5
|
-
import "../../../chunk-CBBFRI3Q.mjs";
|
|
6
5
|
import "../../../chunk-UPTB2MVO.mjs";
|
|
6
|
+
import "../../../chunk-CBBFRI3Q.mjs";
|
|
7
7
|
import "../../../chunk-FZC7X5PK.mjs";
|
|
8
8
|
import "../../../chunk-54JAUBUJ.mjs";
|
|
9
9
|
import "../../../chunk-MRXNTQOX.mjs";
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import {
|
|
3
3
|
CopilotDevConsole,
|
|
4
4
|
DebugMenuButton
|
|
5
|
-
} from "../../chunk-
|
|
6
|
-
import "../../chunk-4FIGRRFS.mjs";
|
|
5
|
+
} from "../../chunk-W3TDOLUY.mjs";
|
|
7
6
|
import "../../chunk-OTPAZXVR.mjs";
|
|
7
|
+
import "../../chunk-4FIGRRFS.mjs";
|
|
8
8
|
import "../../chunk-FZC7X5PK.mjs";
|
|
9
9
|
import "../../chunk-MRXNTQOX.mjs";
|
|
10
10
|
export {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import "../../chunk-V7W6IM2V.mjs";
|
|
2
2
|
import {
|
|
3
3
|
CopilotDevConsole
|
|
4
|
-
} from "../../chunk-
|
|
4
|
+
} from "../../chunk-W3TDOLUY.mjs";
|
|
5
|
+
import "../../chunk-OTPAZXVR.mjs";
|
|
5
6
|
import {
|
|
6
7
|
shouldShowDevConsole
|
|
7
8
|
} from "../../chunk-4FIGRRFS.mjs";
|
|
8
|
-
import "../../chunk-OTPAZXVR.mjs";
|
|
9
9
|
import "../../chunk-FZC7X5PK.mjs";
|
|
10
10
|
import "../../chunk-MRXNTQOX.mjs";
|
|
11
11
|
export {
|
|
@@ -2,36 +2,36 @@ import "../chunk-JD7BAH7U.mjs";
|
|
|
2
2
|
import "../chunk-MRFF7GSQ.mjs";
|
|
3
3
|
import {
|
|
4
4
|
CopilotSidebar
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-T7DQWLTN.mjs";
|
|
6
6
|
import "../chunk-WB3YULQ4.mjs";
|
|
7
7
|
import {
|
|
8
8
|
CopilotPopup
|
|
9
|
-
} from "../chunk-
|
|
10
|
-
import "../chunk-
|
|
9
|
+
} from "../chunk-PIK3RYPJ.mjs";
|
|
10
|
+
import "../chunk-DTI5DZSK.mjs";
|
|
11
11
|
import "../chunk-YAGE7RCE.mjs";
|
|
12
12
|
import "../chunk-VEC45H6Q.mjs";
|
|
13
13
|
import "../chunk-RQNJNK2W.mjs";
|
|
14
14
|
import {
|
|
15
15
|
CopilotChat
|
|
16
|
-
} from "../chunk-
|
|
16
|
+
} from "../chunk-UYT3USIS.mjs";
|
|
17
17
|
import "../chunk-V7W6IM2V.mjs";
|
|
18
18
|
import "../chunk-OMTPWC7T.mjs";
|
|
19
19
|
import "../chunk-ZABXREBH.mjs";
|
|
20
20
|
import "../chunk-6INMITFA.mjs";
|
|
21
21
|
import "../chunk-RU73BEZM.mjs";
|
|
22
|
+
import "../chunk-3XAXY2Z3.mjs";
|
|
22
23
|
import "../chunk-RJCZRKTV.mjs";
|
|
23
|
-
import "../chunk-
|
|
24
|
-
import "../chunk-4FIGRRFS.mjs";
|
|
24
|
+
import "../chunk-W3TDOLUY.mjs";
|
|
25
25
|
import "../chunk-OTPAZXVR.mjs";
|
|
26
|
+
import "../chunk-4FIGRRFS.mjs";
|
|
26
27
|
import "../chunk-4LUMV4YO.mjs";
|
|
27
28
|
import "../chunk-YQFVRDNC.mjs";
|
|
28
29
|
import "../chunk-YQ3D5IQV.mjs";
|
|
30
|
+
import "../chunk-UPTB2MVO.mjs";
|
|
29
31
|
import "../chunk-CPMIEVKK.mjs";
|
|
30
|
-
import "../chunk-3XAXY2Z3.mjs";
|
|
31
32
|
import {
|
|
32
33
|
useChatContext
|
|
33
34
|
} from "../chunk-CBBFRI3Q.mjs";
|
|
34
|
-
import "../chunk-UPTB2MVO.mjs";
|
|
35
35
|
import "../chunk-FZC7X5PK.mjs";
|
|
36
36
|
import "../chunk-54JAUBUJ.mjs";
|
|
37
37
|
import "../chunk-S5MBUNGN.mjs";
|
package/dist/hooks/index.d.ts
CHANGED