@yourgpt/copilot-sdk 2.1.6 → 2.1.8

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.
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunk6ZTITCKU_cjs = require('./chunk-6ZTITCKU.cjs');
3
+ var chunkIDAQU3FP_cjs = require('./chunk-IDAQU3FP.cjs');
4
4
  var chunk7GWEW2DU_cjs = require('./chunk-7GWEW2DU.cjs');
5
5
  var react = require('react');
6
6
  var z = require('zod');
@@ -26,7 +26,7 @@ function _interopNamespace(e) {
26
26
  var z__namespace = /*#__PURE__*/_interopNamespace(z);
27
27
 
28
28
  function useAIActions(actions) {
29
- const { registerAction, unregisterAction } = chunk6ZTITCKU_cjs.useCopilot();
29
+ const { registerAction, unregisterAction } = chunkIDAQU3FP_cjs.useCopilot();
30
30
  react.useEffect(() => {
31
31
  for (const action of actions) {
32
32
  registerAction(action);
@@ -305,7 +305,7 @@ function convertZodSchema(schema, _toolName) {
305
305
  return chunk7GWEW2DU_cjs.zodObjectToInputSchema(schema);
306
306
  }
307
307
  function useToolWithSchema(config, dependencies = []) {
308
- const { registerTool, unregisterTool } = chunk6ZTITCKU_cjs.useCopilot();
308
+ const { registerTool, unregisterTool } = chunkIDAQU3FP_cjs.useCopilot();
309
309
  const configRef = react.useRef(config);
310
310
  configRef.current = config;
311
311
  const inputSchema = react.useMemo(() => {
@@ -341,7 +341,7 @@ function useToolWithSchema(config, dependencies = []) {
341
341
  }, [config.name, inputSchema, ...dependencies]);
342
342
  }
343
343
  function useToolsWithSchema(tools, dependencies = []) {
344
- const { registerTool, unregisterTool } = chunk6ZTITCKU_cjs.useCopilot();
344
+ const { registerTool, unregisterTool } = chunkIDAQU3FP_cjs.useCopilot();
345
345
  const toolsRef = react.useRef(tools);
346
346
  toolsRef.current = tools;
347
347
  react.useEffect(() => {
@@ -734,7 +734,7 @@ function formatKnowledgeResultsForAI(results) {
734
734
 
735
735
  // src/react/hooks/useKnowledgeBase.ts
736
736
  function useKnowledgeBase(config) {
737
- const { registerTool, unregisterTool } = chunk6ZTITCKU_cjs.useCopilot();
737
+ const { registerTool, unregisterTool } = chunkIDAQU3FP_cjs.useCopilot();
738
738
  const configRef = react.useRef(config);
739
739
  configRef.current = config;
740
740
  const handleSearch = react.useCallback(
@@ -1382,7 +1382,7 @@ function useThreadManager(config) {
1382
1382
 
1383
1383
  // src/react/hooks/useThread.ts
1384
1384
  function useThread() {
1385
- const { threadId, setActiveThread, renewSession, sessionStatus } = chunk6ZTITCKU_cjs.useCopilot();
1385
+ const { threadId, setActiveThread, renewSession, sessionStatus } = chunkIDAQU3FP_cjs.useCopilot();
1386
1386
  return {
1387
1387
  threadId,
1388
1388
  sessionStatus,
@@ -1501,7 +1501,7 @@ function getLastResponseUsage(messages) {
1501
1501
  return null;
1502
1502
  }
1503
1503
  function useContextStats() {
1504
- const { contextChars, contextUsage, registeredTools, messages } = chunk6ZTITCKU_cjs.useCopilot();
1504
+ const { contextChars, contextUsage, registeredTools, messages } = chunkIDAQU3FP_cjs.useCopilot();
1505
1505
  const toolCount = react.useMemo(() => registeredTools.length, [registeredTools]);
1506
1506
  const messageCount = react.useMemo(
1507
1507
  () => messages.filter((m) => m.role !== "system").length,
@@ -1531,7 +1531,7 @@ function useContextStats() {
1531
1531
  }
1532
1532
  var DEV_CONTENT_WARN_THRESHOLD = 2e3;
1533
1533
  function useSkill(skill) {
1534
- const { register, unregister } = chunk6ZTITCKU_cjs.useSkillContext();
1534
+ const { register, unregister } = chunkIDAQU3FP_cjs.useSkillContext();
1535
1535
  if (process.env.NODE_ENV !== "production" && skill.source.type === "inline" && skill.source.content.length > DEV_CONTENT_WARN_THRESHOLD) {
1536
1536
  console.warn(
1537
1537
  `[copilot-sdk/skills] Inline skill "${skill.name}" has ${skill.source.content.length} characters. Inline skills are sent on every request \u2014 keep them under ${DEV_CONTENT_WARN_THRESHOLD} characters. Consider using a file or URL skill instead.`
@@ -1560,7 +1560,7 @@ function useSkill(skill) {
1560
1560
  ]);
1561
1561
  }
1562
1562
  function useSkillStatus() {
1563
- const { skills, registry } = chunk6ZTITCKU_cjs.useSkillContext();
1563
+ const { skills, registry } = chunkIDAQU3FP_cjs.useSkillContext();
1564
1564
  const has = react.useCallback(
1565
1565
  (name) => registry.has(name),
1566
1566
  // eslint-disable-next-line react-hooks/exhaustive-deps
@@ -1573,7 +1573,7 @@ function useSkillStatus() {
1573
1573
  };
1574
1574
  }
1575
1575
  function useMessageCheckpoints() {
1576
- const { messages, setMessages } = chunk6ZTITCKU_cjs.useCopilot();
1576
+ const { messages, setMessages } = chunkIDAQU3FP_cjs.useCopilot();
1577
1577
  const checkpointMapRef = react.useRef(/* @__PURE__ */ new Map());
1578
1578
  const prevUserMsgCountRef = react.useRef(0);
1579
1579
  const [revision, bump] = react.useReducer((n) => n + 1, 0);
@@ -1746,9 +1746,9 @@ function createSessionPermissionCache() {
1746
1746
  }
1747
1747
 
1748
1748
  // src/react/internal/ReactChat.ts
1749
- var ReactChat = class extends chunk6ZTITCKU_cjs.AbstractChat {
1749
+ var ReactChat = class extends chunkIDAQU3FP_cjs.AbstractChat {
1750
1750
  constructor(config) {
1751
- const reactState = new chunk6ZTITCKU_cjs.ReactChatState(config.initialMessages);
1751
+ const reactState = new chunkIDAQU3FP_cjs.ReactChatState(config.initialMessages);
1752
1752
  const init = {
1753
1753
  runtimeUrl: config.runtimeUrl,
1754
1754
  systemPrompt: config.systemPrompt,
@@ -1997,7 +1997,7 @@ function defineSkill(def) {
1997
1997
  return def;
1998
1998
  }
1999
1999
  function useCopilotEvent(eventType, handler) {
2000
- const { subscribeToStreamEvents } = chunk6ZTITCKU_cjs.useCopilot();
2000
+ const { subscribeToStreamEvents } = chunkIDAQU3FP_cjs.useCopilot();
2001
2001
  const handlerRef = react.useRef(handler);
2002
2002
  handlerRef.current = handler;
2003
2003
  react.useEffect(() => {
@@ -2011,7 +2011,7 @@ function useCopilotEvent(eventType, handler) {
2011
2011
  }
2012
2012
  var EMPTY_META = {};
2013
2013
  function useMessageMeta(messageId) {
2014
- const { messageMeta } = chunk6ZTITCKU_cjs.useCopilot();
2014
+ const { messageMeta } = chunkIDAQU3FP_cjs.useCopilot();
2015
2015
  const meta = react.useSyncExternalStore(
2016
2016
  messageMeta.subscribe,
2017
2017
  () => messageId ? messageMeta.getMeta(messageId) : EMPTY_META,
@@ -2073,5 +2073,5 @@ exports.useThreadManager = useThreadManager;
2073
2073
  exports.useToolExecutor = useToolExecutor;
2074
2074
  exports.useToolWithSchema = useToolWithSchema;
2075
2075
  exports.useToolsWithSchema = useToolsWithSchema;
2076
- //# sourceMappingURL=chunk-HIVSXIER.cjs.map
2077
- //# sourceMappingURL=chunk-HIVSXIER.cjs.map
2076
+ //# sourceMappingURL=chunk-JFVTY757.cjs.map
2077
+ //# sourceMappingURL=chunk-JFVTY757.cjs.map