@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.
- package/dist/{ThreadManager-BCVt-_k_.d.cts → ThreadManager-CUq5Ocu2.d.cts} +5 -30
- package/dist/{ThreadManager-BjC15mh8.d.ts → ThreadManager-JT0sqSSD.d.ts} +5 -30
- package/dist/{chunk-QSEGNATZ.js → chunk-CVD3X4MN.js} +3 -16
- package/dist/chunk-CVD3X4MN.js.map +1 -0
- package/dist/{chunk-XAVZZVUL.js → chunk-HPNLS3PQ.js} +3 -5
- package/dist/chunk-HPNLS3PQ.js.map +1 -0
- package/dist/{chunk-42YQ4ATO.cjs → chunk-MTFU6EHR.cjs} +2 -17
- package/dist/chunk-MTFU6EHR.cjs.map +1 -0
- package/dist/{chunk-BN75ZW24.cjs → chunk-QAXDWNK3.cjs} +27 -29
- package/dist/chunk-QAXDWNK3.cjs.map +1 -0
- package/dist/core/index.cjs +76 -84
- package/dist/core/index.d.cts +2 -2
- package/dist/core/index.d.ts +2 -2
- package/dist/core/index.js +1 -1
- package/dist/react/index.cjs +42 -42
- package/dist/react/index.d.cts +2 -4
- package/dist/react/index.d.ts +2 -4
- package/dist/react/index.js +2 -2
- package/dist/ui/index.cjs +14 -18
- package/dist/ui/index.cjs.map +1 -1
- package/dist/ui/index.d.cts +0 -2
- package/dist/ui/index.d.ts +0 -2
- package/dist/ui/index.js +10 -14
- package/dist/ui/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-42YQ4ATO.cjs.map +0 -1
- package/dist/chunk-BN75ZW24.cjs.map +0 -1
- package/dist/chunk-QSEGNATZ.js.map +0 -1
- package/dist/chunk-XAVZZVUL.js.map +0 -1
package/dist/react/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import React__default from 'react';
|
|
3
|
-
import {
|
|
4
|
-
export { A as ActionParameter,
|
|
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
|
}
|
package/dist/react/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import React__default from 'react';
|
|
3
|
-
import {
|
|
4
|
-
export { A as ActionParameter,
|
|
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
|
}
|
package/dist/react/index.js
CHANGED
|
@@ -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-
|
|
2
|
-
export { createLocalStorageAdapter, createMemoryAdapter, createServerAdapter, generateSuggestionReason } from '../chunk-
|
|
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
|
|
4
|
-
var
|
|
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.
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
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 =
|
|
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 } =
|
|
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:
|
|
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
|
-
} =
|
|
5138
|
+
} = chunkQAXDWNK3_cjs.useCopilot();
|
|
5143
5139
|
const toolExecutions = rawToolExecutions.map(
|
|
5144
5140
|
(exec) => ({
|
|
5145
5141
|
id: exec.id,
|