@yourgpt/copilot-sdk 1.1.0 → 1.2.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.
@@ -1,7 +1,7 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import React__default from 'react';
3
- import { q as LLMConfig, s as CopilotConfig, l as ToolsConfig, t as ActionDefinition, o as CapturedContext, m as ToolConsentRequest, T as ToolType, n as ToolConsentResponse, S as ScreenshotOptions, C as ConsoleLogOptions, N as NetworkRequestOptions, I as IntentDetectionResult, z as InternalKnowledgeBaseConfig, D as InternalKnowledgeBaseSearchResponse, B as InternalKnowledgeBaseResult, $ as ThreadManagerState, a0 as LoadStatus, X as ThreadManagerConfig, M as ThreadManager, Y as ThreadManagerCallbacks, Z as CreateThreadOptions, _ as UpdateThreadOptions } from '../ThreadManager-BCVt-_k_.cjs';
4
- export { A as ActionParameter, r as CloudConfig, a1 as LocalStorageAdapterConfig, Q as createLocalStorageAdapter, U as createMemoryAdapter, i as generateSuggestionReason } from '../ThreadManager-BCVt-_k_.cjs';
3
+ import { L as LLMConfig, r as CopilotConfig, l as ToolsConfig, s as ActionDefinition, o as CapturedContext, m as ToolConsentRequest, T as ToolType, n as ToolConsentResponse, S as ScreenshotOptions, C as ConsoleLogOptions, N as NetworkRequestOptions, I as IntentDetectionResult, y as InternalKnowledgeBaseConfig, B as InternalKnowledgeBaseSearchResponse, z as InternalKnowledgeBaseResult, Y as ThreadManagerState, Z as LoadStatus, U as ThreadManagerConfig, F as ThreadManager, V as ThreadManagerCallbacks, W as CreateThreadOptions, X as UpdateThreadOptions } from '../ThreadManager-CUq5Ocu2.cjs';
4
+ export { A as ActionParameter, q as CloudConfig, _ as LocalStorageAdapterConfig, J as createLocalStorageAdapter, O as createMemoryAdapter, i as generateSuggestionReason } from '../ThreadManager-CUq5Ocu2.cjs';
5
5
  import { X as AsyncThreadStorageAdapter, M as MessageAttachment, i as ToolCall, S as Source, T as ToolDefinition, x as PermissionLevel, c as ToolInputSchema, g as Message, s as ToolExecution$1, e as ToolContext, b as ToolResponse$1, n as ToolRenderProps, p as ToolSet, U as UnifiedToolCall, k as Thread, l as ThreadData, _ as ThreadStorageAdapter, z as PermissionStorageConfig, B as PermissionStorageAdapter } from '../types-BtAaOV07.cjs';
6
6
  export { t as AgentLoopConfig, P as PersistenceConfig, m as ThreadStorageAdapter, a as ToolExecutionStatus, y as ToolPermission } from '../types-BtAaOV07.cjs';
7
7
 
@@ -1642,8 +1642,6 @@ interface DevLoggerState {
1642
1642
  loaded: boolean;
1643
1643
  };
1644
1644
  config: {
1645
- provider: string;
1646
- model: string;
1647
1645
  runtimeUrl: string;
1648
1646
  };
1649
1647
  }
@@ -1,7 +1,7 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import React__default from 'react';
3
- import { q as LLMConfig, s as CopilotConfig, l as ToolsConfig, t as ActionDefinition, o as CapturedContext, m as ToolConsentRequest, T as ToolType, n as ToolConsentResponse, S as ScreenshotOptions, C as ConsoleLogOptions, N as NetworkRequestOptions, I as IntentDetectionResult, z as InternalKnowledgeBaseConfig, D as InternalKnowledgeBaseSearchResponse, B as InternalKnowledgeBaseResult, $ as ThreadManagerState, a0 as LoadStatus, X as ThreadManagerConfig, M as ThreadManager, Y as ThreadManagerCallbacks, Z as CreateThreadOptions, _ as UpdateThreadOptions } from '../ThreadManager-BjC15mh8.js';
4
- export { A as ActionParameter, r as CloudConfig, a1 as LocalStorageAdapterConfig, Q as createLocalStorageAdapter, U as createMemoryAdapter, i as generateSuggestionReason } from '../ThreadManager-BjC15mh8.js';
3
+ import { L as LLMConfig, r as CopilotConfig, l as ToolsConfig, s as ActionDefinition, o as CapturedContext, m as ToolConsentRequest, T as ToolType, n as ToolConsentResponse, S as ScreenshotOptions, C as ConsoleLogOptions, N as NetworkRequestOptions, I as IntentDetectionResult, y as InternalKnowledgeBaseConfig, B as InternalKnowledgeBaseSearchResponse, z as InternalKnowledgeBaseResult, Y as ThreadManagerState, Z as LoadStatus, U as ThreadManagerConfig, F as ThreadManager, V as ThreadManagerCallbacks, W as CreateThreadOptions, X as UpdateThreadOptions } from '../ThreadManager-JT0sqSSD.js';
4
+ export { A as ActionParameter, q as CloudConfig, _ as LocalStorageAdapterConfig, J as createLocalStorageAdapter, O as createMemoryAdapter, i as generateSuggestionReason } from '../ThreadManager-JT0sqSSD.js';
5
5
  import { X as AsyncThreadStorageAdapter, M as MessageAttachment, i as ToolCall, S as Source, T as ToolDefinition, x as PermissionLevel, c as ToolInputSchema, g as Message, s as ToolExecution$1, e as ToolContext, b as ToolResponse$1, n as ToolRenderProps, p as ToolSet, U as UnifiedToolCall, k as Thread, l as ThreadData, _ as ThreadStorageAdapter, z as PermissionStorageConfig, B as PermissionStorageAdapter } from '../types-BtAaOV07.js';
6
6
  export { t as AgentLoopConfig, P as PersistenceConfig, m as ThreadStorageAdapter, a as ToolExecutionStatus, y as ToolPermission } from '../types-BtAaOV07.js';
7
7
 
@@ -1642,8 +1642,6 @@ interface DevLoggerState {
1642
1642
  loaded: boolean;
1643
1643
  };
1644
1644
  config: {
1645
- provider: string;
1646
- model: string;
1647
1645
  runtimeUrl: string;
1648
1646
  };
1649
1647
  }
@@ -1,4 +1,4 @@
1
- export { AbstractAgentLoop, AbstractChat, CopilotProvider, ReactChat, ReactChatState, ReactThreadManager, ReactThreadManagerState, createPermissionStorage, createReactChat, createReactChatState, createReactThreadManager, createReactThreadManagerState, createSessionPermissionCache, formatKnowledgeResultsForAI, initialAgentLoopState, searchKnowledgeBase, useAIAction, useAIActions, useAIContext, useAIContexts, useAITools, useAgent, useCapabilities, useChat, useCopilot, useDevLogger, useFeatureSupport, useKnowledgeBase, useSuggestions, useSupportedMediaTypes, useThreadManager, useTool, useToolExecutor, useToolWithSchema, useTools, useToolsWithSchema } from '../chunk-XAVZZVUL.js';
2
- export { createLocalStorageAdapter, createMemoryAdapter, createServerAdapter, generateSuggestionReason } from '../chunk-QSEGNATZ.js';
1
+ export { AbstractAgentLoop, AbstractChat, CopilotProvider, ReactChat, ReactChatState, ReactThreadManager, ReactThreadManagerState, createPermissionStorage, createReactChat, createReactChatState, createReactThreadManager, createReactThreadManagerState, createSessionPermissionCache, formatKnowledgeResultsForAI, initialAgentLoopState, searchKnowledgeBase, useAIAction, useAIActions, useAIContext, useAIContexts, useAITools, useAgent, useCapabilities, useChat, useCopilot, useDevLogger, useFeatureSupport, useKnowledgeBase, useSuggestions, useSupportedMediaTypes, useThreadManager, useTool, useToolExecutor, useToolWithSchema, useTools, useToolsWithSchema } from '../chunk-HPNLS3PQ.js';
2
+ export { createLocalStorageAdapter, createMemoryAdapter, createServerAdapter, generateSuggestionReason } from '../chunk-CVD3X4MN.js';
3
3
  //# sourceMappingURL=index.js.map
4
4
  //# sourceMappingURL=index.js.map
package/dist/ui/index.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunkBN75ZW24_cjs = require('../chunk-BN75ZW24.cjs');
4
- var chunk42YQ4ATO_cjs = require('../chunk-42YQ4ATO.cjs');
3
+ var chunkQAXDWNK3_cjs = require('../chunk-QAXDWNK3.cjs');
4
+ var chunkMTFU6EHR_cjs = require('../chunk-MTFU6EHR.cjs');
5
5
  var clsx = require('clsx');
6
6
  var tailwindMerge = require('tailwind-merge');
7
7
  var jsxRuntime = require('react/jsx-runtime');
@@ -2598,18 +2598,14 @@ function AgentTab({ state }) {
2598
2598
  ] });
2599
2599
  }
2600
2600
  function ConfigTab({ state }) {
2601
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-4", children: /* @__PURE__ */ jsxRuntime.jsxs(Section, { title: "Provider", children: [
2602
- /* @__PURE__ */ jsxRuntime.jsx(Row, { label: "Provider", value: state.config.provider || "Not set" }),
2603
- /* @__PURE__ */ jsxRuntime.jsx(Row, { label: "Model", value: state.config.model || "Default" }),
2604
- /* @__PURE__ */ jsxRuntime.jsx(
2605
- Row,
2606
- {
2607
- label: "Runtime URL",
2608
- value: state.config.runtimeUrl || "Not set",
2609
- mono: true
2610
- }
2611
- )
2612
- ] }) });
2601
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-4", children: /* @__PURE__ */ jsxRuntime.jsx(Section, { title: "Runtime", children: /* @__PURE__ */ jsxRuntime.jsx(
2602
+ Row,
2603
+ {
2604
+ label: "Runtime URL",
2605
+ value: state.config.runtimeUrl || "Not set",
2606
+ mono: true
2607
+ }
2608
+ ) }) });
2613
2609
  }
2614
2610
  function Section({
2615
2611
  title,
@@ -4919,7 +4915,7 @@ function useInternalThreadManager(config = {}) {
4919
4915
  saveDebounce,
4920
4916
  autoRestoreLastThread
4921
4917
  };
4922
- const threadManager = chunkBN75ZW24_cjs.useThreadManager(threadManagerConfig);
4918
+ const threadManager = chunkQAXDWNK3_cjs.useThreadManager(threadManagerConfig);
4923
4919
  const {
4924
4920
  currentThread,
4925
4921
  currentThreadId,
@@ -4929,7 +4925,7 @@ function useInternalThreadManager(config = {}) {
4929
4925
  clearCurrentThread,
4930
4926
  refreshThreads
4931
4927
  } = threadManager;
4932
- const { messages, setMessages, status, isLoading } = chunkBN75ZW24_cjs.useCopilot();
4928
+ const { messages, setMessages, status, isLoading } = chunkQAXDWNK3_cjs.useCopilot();
4933
4929
  const isLoadingMessagesRef = React8.useRef(false);
4934
4930
  const savingToThreadRef = React8.useRef(null);
4935
4931
  const lastSavedSnapshotRef = React8.useRef("");
@@ -5090,7 +5086,7 @@ function parsePersistenceConfig(persistence, onThreadChange) {
5090
5086
  };
5091
5087
  case "server":
5092
5088
  return {
5093
- adapter: chunk42YQ4ATO_cjs.createServerAdapter({
5089
+ adapter: chunkMTFU6EHR_cjs.createServerAdapter({
5094
5090
  endpoint: persistence.endpoint,
5095
5091
  headers: persistence.headers
5096
5092
  }),
@@ -5139,7 +5135,7 @@ function CopilotChat(props) {
5139
5135
  approveToolExecution,
5140
5136
  rejectToolExecution,
5141
5137
  registeredTools
5142
- } = chunkBN75ZW24_cjs.useCopilot();
5138
+ } = chunkQAXDWNK3_cjs.useCopilot();
5143
5139
  const toolExecutions = rawToolExecutions.map(
5144
5140
  (exec) => ({
5145
5141
  id: exec.id,