@copilotkit/react-core 1.0.0-beta.0 → 1.0.0-beta.2

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.
Files changed (108) hide show
  1. package/.turbo/turbo-build.log +125 -139
  2. package/CHANGELOG.md +18 -0
  3. package/dist/{chunk-K6EV2CNB.mjs → chunk-2F7V4NDT.mjs} +1 -4
  4. package/dist/chunk-2F7V4NDT.mjs.map +1 -0
  5. package/dist/{chunk-YM2JV2YQ.mjs → chunk-2RZ2UMWO.mjs} +2 -2
  6. package/dist/chunk-5JB4B2SV.mjs +1 -0
  7. package/dist/{chunk-DDHJCFFV.mjs → chunk-LYC2GBBA.mjs} +7 -6
  8. package/dist/chunk-LYC2GBBA.mjs.map +1 -0
  9. package/dist/{chunk-PHMHNAYC.mjs → chunk-S357AOAD.mjs} +19 -13
  10. package/dist/chunk-S357AOAD.mjs.map +1 -0
  11. package/dist/{chunk-NY6QSOU7.mjs → chunk-SSQGTCDU.mjs} +13 -9
  12. package/dist/chunk-SSQGTCDU.mjs.map +1 -0
  13. package/dist/{chunk-7GPIOOXB.mjs → chunk-TWFVVCRS.mjs} +2 -2
  14. package/dist/{chunk-5CKW6KE7.mjs → chunk-UJNVZO2U.mjs} +4 -4
  15. package/dist/{chunk-LZVHW3T3.mjs → chunk-UMJ5P6TZ.mjs} +2 -2
  16. package/dist/{chunk-WU3I3G3G.mjs → chunk-UTRWUF3Y.mjs} +15 -10
  17. package/dist/chunk-UTRWUF3Y.mjs.map +1 -0
  18. package/dist/components/copilot-provider/copilotkit-props.d.ts +0 -4
  19. package/dist/components/copilot-provider/copilotkit-props.js.map +1 -1
  20. package/dist/components/copilot-provider/copilotkit.js +5 -7
  21. package/dist/components/copilot-provider/copilotkit.js.map +1 -1
  22. package/dist/components/copilot-provider/copilotkit.mjs +2 -2
  23. package/dist/components/copilot-provider/index.js +5 -7
  24. package/dist/components/copilot-provider/index.js.map +1 -1
  25. package/dist/components/copilot-provider/index.mjs +2 -2
  26. package/dist/components/index.js +5 -7
  27. package/dist/components/index.js.map +1 -1
  28. package/dist/components/index.mjs +2 -2
  29. package/dist/context/copilot-context.d.ts +0 -4
  30. package/dist/context/copilot-context.js +0 -3
  31. package/dist/context/copilot-context.js.map +1 -1
  32. package/dist/context/copilot-context.mjs +1 -1
  33. package/dist/context/index.js +0 -3
  34. package/dist/context/index.js.map +1 -1
  35. package/dist/context/index.mjs +1 -1
  36. package/dist/hooks/index.d.ts +1 -3
  37. package/dist/hooks/index.js +29 -72
  38. package/dist/hooks/index.js.map +1 -1
  39. package/dist/hooks/index.mjs +9 -17
  40. package/dist/hooks/use-chat.js +18 -11
  41. package/dist/hooks/use-chat.js.map +1 -1
  42. package/dist/hooks/use-chat.mjs +1 -1
  43. package/dist/hooks/use-copilot-action.js +0 -3
  44. package/dist/hooks/use-copilot-action.js.map +1 -1
  45. package/dist/hooks/use-copilot-action.mjs +2 -2
  46. package/dist/hooks/use-copilot-chat.js +15 -14
  47. package/dist/hooks/use-copilot-chat.js.map +1 -1
  48. package/dist/hooks/use-copilot-chat.mjs +4 -4
  49. package/dist/hooks/use-copilot-readable.js +0 -3
  50. package/dist/hooks/use-copilot-readable.js.map +1 -1
  51. package/dist/hooks/use-copilot-readable.mjs +2 -2
  52. package/dist/hooks/use-make-copilot-document-readable.js +0 -3
  53. package/dist/hooks/use-make-copilot-document-readable.js.map +1 -1
  54. package/dist/hooks/use-make-copilot-document-readable.mjs +2 -2
  55. package/dist/index.d.ts +0 -2
  56. package/dist/index.js +59 -94
  57. package/dist/index.js.map +1 -1
  58. package/dist/index.mjs +11 -19
  59. package/dist/lib/copilot-task.d.ts +0 -5
  60. package/dist/lib/copilot-task.js +9 -6
  61. package/dist/lib/copilot-task.js.map +1 -1
  62. package/dist/lib/copilot-task.mjs +3 -3
  63. package/dist/lib/index.js +9 -6
  64. package/dist/lib/index.js.map +1 -1
  65. package/dist/lib/index.mjs +3 -3
  66. package/dist/utils/extract.d.ts +3 -2
  67. package/dist/utils/extract.js +11 -7
  68. package/dist/utils/extract.js.map +1 -1
  69. package/dist/utils/extract.mjs +3 -3
  70. package/dist/utils/index.d.ts +1 -1
  71. package/dist/utils/index.js +11 -7
  72. package/dist/utils/index.js.map +1 -1
  73. package/dist/utils/index.mjs +3 -3
  74. package/package.json +3 -3
  75. package/src/components/copilot-provider/copilotkit-props.tsx +0 -5
  76. package/src/components/copilot-provider/copilotkit.tsx +6 -5
  77. package/src/context/copilot-context.tsx +1 -8
  78. package/src/hooks/index.ts +0 -2
  79. package/src/hooks/use-chat.ts +21 -11
  80. package/src/lib/copilot-task.ts +9 -12
  81. package/src/utils/extract.ts +11 -5
  82. package/dist/chunk-DDHJCFFV.mjs.map +0 -1
  83. package/dist/chunk-EYKDJBDE.mjs +0 -1
  84. package/dist/chunk-IQCLNCGL.mjs +0 -33
  85. package/dist/chunk-IQCLNCGL.mjs.map +0 -1
  86. package/dist/chunk-K6EV2CNB.mjs.map +0 -1
  87. package/dist/chunk-NY6QSOU7.mjs.map +0 -1
  88. package/dist/chunk-PHMHNAYC.mjs.map +0 -1
  89. package/dist/chunk-QNJQKKD4.mjs +0 -23
  90. package/dist/chunk-QNJQKKD4.mjs.map +0 -1
  91. package/dist/chunk-WU3I3G3G.mjs.map +0 -1
  92. package/dist/hooks/use-make-copilot-actionable.d.ts +0 -8
  93. package/dist/hooks/use-make-copilot-actionable.js +0 -136
  94. package/dist/hooks/use-make-copilot-actionable.js.map +0 -1
  95. package/dist/hooks/use-make-copilot-actionable.mjs +0 -9
  96. package/dist/hooks/use-make-copilot-actionable.mjs.map +0 -1
  97. package/dist/hooks/use-make-copilot-readable.d.ts +0 -6
  98. package/dist/hooks/use-make-copilot-readable.js +0 -126
  99. package/dist/hooks/use-make-copilot-readable.js.map +0 -1
  100. package/dist/hooks/use-make-copilot-readable.mjs +0 -9
  101. package/dist/hooks/use-make-copilot-readable.mjs.map +0 -1
  102. package/src/hooks/use-make-copilot-actionable.ts +0 -35
  103. package/src/hooks/use-make-copilot-readable.ts +0 -25
  104. /package/dist/{chunk-YM2JV2YQ.mjs.map → chunk-2RZ2UMWO.mjs.map} +0 -0
  105. /package/dist/{chunk-EYKDJBDE.mjs.map → chunk-5JB4B2SV.mjs.map} +0 -0
  106. /package/dist/{chunk-7GPIOOXB.mjs.map → chunk-TWFVVCRS.mjs.map} +0 -0
  107. /package/dist/{chunk-5CKW6KE7.mjs.map → chunk-UJNVZO2U.mjs.map} +0 -0
  108. /package/dist/{chunk-LZVHW3T3.mjs.map → chunk-UMJ5P6TZ.mjs.map} +0 -0
package/dist/index.js CHANGED
@@ -90,9 +90,7 @@ __export(src_exports, {
90
90
  useCopilotChat: () => useCopilotChat,
91
91
  useCopilotContext: () => useCopilotContext,
92
92
  useCopilotReadable: () => useCopilotReadable,
93
- useMakeCopilotActionable: () => useMakeCopilotActionable,
94
- useMakeCopilotDocumentReadable: () => useMakeCopilotDocumentReadable,
95
- useMakeCopilotReadable: () => useMakeCopilotReadable
93
+ useMakeCopilotDocumentReadable: () => useMakeCopilotDocumentReadable
96
94
  });
97
95
  module.exports = __toCommonJS(src_exports);
98
96
 
@@ -128,9 +126,6 @@ var emptyCopilotContext = {
128
126
  get chatApiEndpoint() {
129
127
  throw new Error("Remember to wrap your app in a `<CopilotKit> {...} </CopilotKit>` !!!");
130
128
  }
131
- get chatApiEndpointV2() {
132
- throw new Error("Remember to wrap your app in a `<CopilotKit> {...} </CopilotKit>` !!!");
133
- }
134
129
  get headers() {
135
130
  return {};
136
131
  }
@@ -358,10 +353,12 @@ var import_jsx_runtime = require("react/jsx-runtime");
358
353
  function CopilotKit(_a) {
359
354
  var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
360
355
  var _a2, _b2;
361
- if (!props.runtimeUrl && !props.url && !props.publicApiKey) {
362
- throw new Error("Please provide either a url or a publicApiKey to the CopilotKit component.");
356
+ if (!props.runtimeUrl && !props.publicApiKey) {
357
+ throw new Error(
358
+ "Please provide either a runtimeUrl or a publicApiKey to the CopilotKit component."
359
+ );
363
360
  }
364
- const chatApiEndpoint = props.runtimeUrl || props.url || import_shared.COPILOT_CLOUD_CHAT_URL;
361
+ const chatApiEndpoint = props.runtimeUrl || import_shared.COPILOT_CLOUD_CHAT_URL;
365
362
  const [actions, setActions] = (0, import_react4.useState)({});
366
363
  const chatComponentsCache = (0, import_react4.useRef)({});
367
364
  const { addElement, removeElement, printTree } = use_tree_default();
@@ -461,7 +458,6 @@ ${nonDocumentStrings}`;
461
458
  publicApiKey: props.publicApiKey
462
459
  }, cloud ? { cloud } : {}), {
463
460
  chatApiEndpoint,
464
- chatApiEndpointV2: `${props.url}/v2`,
465
461
  headers: props.headers || {},
466
462
  properties: props.properties || {},
467
463
  transcribeAudioUrl: props.transcribeAudioUrl,
@@ -553,7 +549,7 @@ function useChat(options) {
553
549
  headers
554
550
  });
555
551
  const runChatCompletion = (previousMessages) => __async(this, null, function* () {
556
- var _a, _b, _c, _d, _e, _f;
552
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i;
557
553
  setIsLoading(true);
558
554
  let newMessages = [
559
555
  new import_runtime_client_gql.TextMessage({
@@ -567,8 +563,8 @@ function useChat(options) {
567
563
  const systemMessage = makeSystemMessageCallback();
568
564
  const messagesWithContext = [systemMessage, ...initialMessages || [], ...previousMessages];
569
565
  const stream = import_runtime_client_gql.CopilotRuntimeClient.asStream(
570
- runtimeClient.generateCopilotResponse(
571
- __spreadValues({
566
+ runtimeClient.generateCopilotResponse({
567
+ data: __spreadProps(__spreadValues({
572
568
  frontend: {
573
569
  actions: actions.map((action) => ({
574
570
  name: action.name,
@@ -580,20 +576,24 @@ function useChat(options) {
580
576
  runId: runIdRef.current,
581
577
  messages: (0, import_runtime_client_gql.convertMessagesToGqlInput)(messagesWithContext)
582
578
  }, copilotConfig.cloud ? {
583
- cloud: {
579
+ cloud: __spreadValues({}, ((_c = (_b = (_a = copilotConfig.cloud.guardrails) == null ? void 0 : _a.input) == null ? void 0 : _b.restrictToTopic) == null ? void 0 : _c.enabled) ? {
584
580
  guardrails: {
585
581
  inputValidationRules: {
586
582
  allowList: copilotConfig.cloud.guardrails.input.restrictToTopic.validTopics,
587
583
  denyList: copilotConfig.cloud.guardrails.input.restrictToTopic.invalidTopics
588
584
  }
589
585
  }
586
+ } : {})
587
+ } : {}), {
588
+ metadata: {
589
+ requestType: import_runtime_client_gql.CopilotRequestType.Chat
590
590
  }
591
- } : {}),
592
- copilotConfig.properties,
593
- (_a = abortControllerRef.current) == null ? void 0 : _a.signal
594
- )
591
+ }),
592
+ properties: copilotConfig.properties,
593
+ signal: (_d = abortControllerRef.current) == null ? void 0 : _d.signal
594
+ })
595
595
  );
596
- const guardrailsEnabled = ((_d = (_c = (_b = copilotConfig.cloud) == null ? void 0 : _b.guardrails) == null ? void 0 : _c.input) == null ? void 0 : _d.restrictToTopic.enabled) || false;
596
+ const guardrailsEnabled = ((_g = (_f = (_e = copilotConfig.cloud) == null ? void 0 : _e.guardrails) == null ? void 0 : _f.input) == null ? void 0 : _g.restrictToTopic.enabled) || false;
597
597
  const reader = stream.getReader();
598
598
  let results = {};
599
599
  try {
@@ -612,11 +612,11 @@ function useChat(options) {
612
612
  continue;
613
613
  }
614
614
  newMessages = [];
615
- if (((_e = value.generateCopilotResponse.status) == null ? void 0 : _e.__typename) === "FailedResponseStatus" && value.generateCopilotResponse.status.reason === "GUARDRAILS_VALIDATION_FAILED") {
615
+ if (((_h = value.generateCopilotResponse.status) == null ? void 0 : _h.__typename) === "FailedResponseStatus" && value.generateCopilotResponse.status.reason === "GUARDRAILS_VALIDATION_FAILED") {
616
616
  newMessages = [
617
617
  new import_runtime_client_gql.TextMessage({
618
618
  role: import_runtime_client_gql.MessageRole.Assistant,
619
- content: ((_f = value.generateCopilotResponse.status.details) == null ? void 0 : _f.guardrailsReason) || ""
619
+ content: ((_i = value.generateCopilotResponse.status.details) == null ? void 0 : _i.guardrailsReason) || ""
620
620
  })
621
621
  ];
622
622
  } else {
@@ -781,37 +781,12 @@ If you would like to call a function, call it without saying anything else.
781
781
  ${additionalInstructions}` : "");
782
782
  }
783
783
 
784
- // src/hooks/use-make-copilot-actionable.ts
784
+ // src/hooks/use-copilot-action.ts
785
785
  var import_react7 = require("react");
786
786
  var import_nanoid3 = require("nanoid");
787
- var import_shared3 = require("@copilotkit/shared");
788
- function useMakeCopilotActionable(annotatedFunction, dependencies) {
789
- const idRef = (0, import_react7.useRef)((0, import_nanoid3.nanoid)());
790
- const { setAction, removeAction } = (0, import_react7.useContext)(CopilotContext);
791
- const memoizedAnnotatedFunction = (0, import_react7.useMemo)(
792
- () => ({
793
- name: annotatedFunction.name,
794
- description: annotatedFunction.description,
795
- argumentAnnotations: annotatedFunction.argumentAnnotations,
796
- implementation: annotatedFunction.implementation
797
- }),
798
- dependencies
799
- );
800
- (0, import_react7.useEffect)(() => {
801
- const action = (0, import_shared3.annotatedFunctionToAction)(memoizedAnnotatedFunction);
802
- setAction(idRef.current, action);
803
- return () => {
804
- removeAction(idRef.current);
805
- };
806
- }, [memoizedAnnotatedFunction, setAction, removeAction]);
807
- }
808
-
809
- // src/hooks/use-copilot-action.ts
810
- var import_react8 = require("react");
811
- var import_nanoid4 = require("nanoid");
812
787
  function useCopilotAction(action, dependencies) {
813
- const { setAction, removeAction, actions, chatComponentsCache } = (0, import_react8.useContext)(CopilotContext);
814
- const idRef = (0, import_react8.useRef)((0, import_nanoid4.nanoid)());
788
+ const { setAction, removeAction, actions, chatComponentsCache } = (0, import_react7.useContext)(CopilotContext);
789
+ const idRef = (0, import_react7.useRef)((0, import_nanoid3.nanoid)());
815
790
  if (dependencies === void 0) {
816
791
  if (actions[idRef.current]) {
817
792
  actions[idRef.current].handler = action.handler;
@@ -822,7 +797,7 @@ function useCopilotAction(action, dependencies) {
822
797
  }
823
798
  }
824
799
  }
825
- (0, import_react8.useEffect)(() => {
800
+ (0, import_react7.useEffect)(() => {
826
801
  setAction(idRef.current, action);
827
802
  if (chatComponentsCache.current !== null && action.render !== void 0) {
828
803
  chatComponentsCache.current[action.name] = action.render;
@@ -845,27 +820,12 @@ function useCopilotAction(action, dependencies) {
845
820
  ]);
846
821
  }
847
822
 
848
- // src/hooks/use-make-copilot-readable.ts
849
- var import_react9 = require("react");
850
- function useMakeCopilotReadable(information, parentId, categories) {
851
- const { addContext, removeContext } = (0, import_react9.useContext)(CopilotContext);
852
- const idRef = (0, import_react9.useRef)();
853
- (0, import_react9.useEffect)(() => {
854
- const id = addContext(information, parentId, categories);
855
- idRef.current = id;
856
- return () => {
857
- removeContext(id);
858
- };
859
- }, [information, parentId, addContext, removeContext]);
860
- return idRef.current;
861
- }
862
-
863
823
  // src/hooks/use-make-copilot-document-readable.ts
864
- var import_react10 = require("react");
824
+ var import_react8 = require("react");
865
825
  function useMakeCopilotDocumentReadable(document, categories, dependencies = []) {
866
- const { addDocumentContext, removeDocumentContext } = (0, import_react10.useContext)(CopilotContext);
867
- const idRef = (0, import_react10.useRef)();
868
- (0, import_react10.useEffect)(() => {
826
+ const { addDocumentContext, removeDocumentContext } = (0, import_react8.useContext)(CopilotContext);
827
+ const idRef = (0, import_react8.useRef)();
828
+ (0, import_react8.useEffect)(() => {
869
829
  const id = addDocumentContext(document, categories);
870
830
  idRef.current = id;
871
831
  return () => {
@@ -876,16 +836,16 @@ function useMakeCopilotDocumentReadable(document, categories, dependencies = [])
876
836
  }
877
837
 
878
838
  // src/hooks/use-copilot-readable.ts
879
- var import_react11 = require("react");
839
+ var import_react9 = require("react");
880
840
  function convertToJSON(description, value) {
881
841
  return `${description}: ${typeof value === "string" ? value : JSON.stringify(value)}`;
882
842
  }
883
843
  function useCopilotReadable({ description, value, parentId, categories, convert }, dependencies) {
884
- const { addContext, removeContext } = (0, import_react11.useContext)(CopilotContext);
885
- const idRef = (0, import_react11.useRef)();
844
+ const { addContext, removeContext } = (0, import_react9.useContext)(CopilotContext);
845
+ const idRef = (0, import_react9.useRef)();
886
846
  convert = convert || convertToJSON;
887
847
  const information = convert(description, value);
888
- (0, import_react11.useEffect)(() => {
848
+ (0, import_react9.useEffect)(() => {
889
849
  const id = addContext(information, parentId, categories);
890
850
  idRef.current = id;
891
851
  return () => {
@@ -897,13 +857,13 @@ function useCopilotReadable({ description, value, parentId, categories, convert
897
857
 
898
858
  // src/lib/copilot-task.ts
899
859
  var import_runtime_client_gql3 = require("@copilotkit/runtime-client-gql");
900
- var import_shared4 = require("@copilotkit/shared");
860
+ var import_shared3 = require("@copilotkit/shared");
901
861
  var CopilotTask = class {
902
862
  constructor(config) {
903
863
  this.instructions = config.instructions;
904
864
  this.actions = config.actions || [];
905
865
  this.includeCopilotReadable = config.includeCopilotReadable !== false;
906
- this.includeCopilotActions = config.includeCopilotActions !== false && config.includeCopilotActionable !== false;
866
+ this.includeCopilotActions = config.includeCopilotActions !== false;
907
867
  }
908
868
  /**
909
869
  * Run the task.
@@ -934,19 +894,22 @@ var CopilotTask = class {
934
894
  publicApiKey: context.copilotApiConfig.publicApiKey,
935
895
  headers: context.copilotApiConfig.headers
936
896
  });
937
- const response = yield runtimeClient.generateCopilotResponse(
938
- {
897
+ const response = yield runtimeClient.generateCopilotResponse({
898
+ data: {
939
899
  frontend: {
940
900
  actions: Object.values(actions).map((action) => ({
941
901
  name: action.name,
942
902
  description: action.description || "",
943
- jsonSchema: JSON.stringify((0, import_shared4.actionParametersToJsonSchema)(action.parameters || []))
903
+ jsonSchema: JSON.stringify((0, import_shared3.actionParametersToJsonSchema)(action.parameters || []))
944
904
  }))
945
905
  },
946
- messages: (0, import_runtime_client_gql3.convertMessagesToGqlInput)(messages)
906
+ messages: (0, import_runtime_client_gql3.convertMessagesToGqlInput)(messages),
907
+ metadata: {
908
+ requestType: import_runtime_client_gql3.CopilotRequestType.Task
909
+ }
947
910
  },
948
- context.copilotApiConfig.properties
949
- ).toPromise();
911
+ properties: context.copilotApiConfig.properties
912
+ }).toPromise();
950
913
  const functionCallHandler = context.getFunctionCallHandler(actions);
951
914
  const functionCalls = (0, import_runtime_client_gql3.convertGqlOutputToMessages)(
952
915
  ((_b = (_a = response.data) == null ? void 0 : _a.generateCopilotResponse) == null ? void 0 : _b.messages) || []
@@ -988,7 +951,7 @@ ${instructions}
988
951
  }
989
952
 
990
953
  // src/utils/extract.ts
991
- var import_shared5 = require("@copilotkit/shared");
954
+ var import_shared4 = require("@copilotkit/shared");
992
955
  var import_runtime_client_gql4 = require("@copilotkit/runtime-client-gql");
993
956
  var import_runtime_client_gql5 = require("@copilotkit/runtime-client-gql");
994
957
  var import_runtime_client_gql6 = require("@copilotkit/runtime-client-gql");
@@ -1000,7 +963,8 @@ function extract(_0) {
1000
963
  include,
1001
964
  data,
1002
965
  abortSignal,
1003
- stream
966
+ stream,
967
+ requestType = import_runtime_client_gql4.CopilotRequestType.Task
1004
968
  }) {
1005
969
  var _a, _b;
1006
970
  const { messages } = context;
@@ -1023,31 +987,34 @@ function extract(_0) {
1023
987
  content: makeSystemMessage(contextString, instructions),
1024
988
  role: import_runtime_client_gql4.Role.System
1025
989
  });
1026
- const headers = __spreadValues(__spreadValues({}, context.copilotApiConfig.headers || {}), context.copilotApiConfig.publicApiKey ? { [import_shared5.COPILOT_CLOUD_PUBLIC_API_KEY_HEADER]: context.copilotApiConfig.publicApiKey } : {});
990
+ const headers = __spreadValues(__spreadValues({}, context.copilotApiConfig.headers || {}), context.copilotApiConfig.publicApiKey ? { [import_shared4.COPILOT_CLOUD_PUBLIC_API_KEY_HEADER]: context.copilotApiConfig.publicApiKey } : {});
1027
991
  const runtimeClient = new import_runtime_client_gql5.CopilotRuntimeClient({
1028
992
  url: context.copilotApiConfig.chatApiEndpoint,
1029
993
  publicApiKey: context.copilotApiConfig.publicApiKey,
1030
994
  headers
1031
995
  });
1032
996
  const response = import_runtime_client_gql5.CopilotRuntimeClient.asStream(
1033
- runtimeClient.generateCopilotResponse(
1034
- {
997
+ runtimeClient.generateCopilotResponse({
998
+ data: {
1035
999
  frontend: {
1036
1000
  actions: [
1037
1001
  {
1038
1002
  name: action.name,
1039
1003
  description: action.description || "",
1040
- jsonSchema: JSON.stringify((0, import_shared5.actionParametersToJsonSchema)(action.parameters || []))
1004
+ jsonSchema: JSON.stringify((0, import_shared4.actionParametersToJsonSchema)(action.parameters || []))
1041
1005
  }
1042
1006
  ]
1043
1007
  },
1044
1008
  messages: (0, import_runtime_client_gql6.convertMessagesToGqlInput)(
1045
1009
  includeMessages ? [systemMessage, ...messages] : [systemMessage]
1046
- )
1010
+ ),
1011
+ metadata: {
1012
+ requestType
1013
+ }
1047
1014
  },
1048
- context.copilotApiConfig.properties,
1049
- abortSignal
1050
- )
1015
+ properties: context.copilotApiConfig.properties,
1016
+ signal: abortSignal
1017
+ })
1051
1018
  );
1052
1019
  const reader = response.getReader();
1053
1020
  let isInitial = true;
@@ -1117,8 +1084,6 @@ Any additional messages provided are for providing context only and should not b
1117
1084
  useCopilotChat,
1118
1085
  useCopilotContext,
1119
1086
  useCopilotReadable,
1120
- useMakeCopilotActionable,
1121
- useMakeCopilotDocumentReadable,
1122
- useMakeCopilotReadable
1087
+ useMakeCopilotDocumentReadable
1123
1088
  });
1124
1089
  //# sourceMappingURL=index.js.map