@yourgpt/copilot-sdk 2.1.5-alpha.5 → 2.1.5-alpha.7
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-DK46fVl3.d.cts → ThreadManager-B12N-zpq.d.cts} +3 -3
- package/dist/{ThreadManager-D7KwT2FJ.d.ts → ThreadManager-BxGOeykx.d.ts} +3 -3
- package/dist/{chunk-KGYDGK3U.cjs → chunk-7GWEW2DU.cjs} +24 -8
- package/dist/chunk-7GWEW2DU.cjs.map +1 -0
- package/dist/{chunk-YLZCTR4O.js → chunk-J5D3AZF6.js} +24 -8
- package/dist/chunk-J5D3AZF6.js.map +1 -0
- package/dist/{chunk-5UGWLGFS.cjs → chunk-M66XAHSW.cjs} +84 -46
- package/dist/chunk-M66XAHSW.cjs.map +1 -0
- package/dist/{chunk-LHLVTGIP.cjs → chunk-NPBOKT63.cjs} +297 -96
- package/dist/chunk-NPBOKT63.cjs.map +1 -0
- package/dist/{chunk-DH6EO6NW.js → chunk-UZHGMDOK.js} +293 -92
- package/dist/chunk-UZHGMDOK.js.map +1 -0
- package/dist/{chunk-ZAOTYA5L.js → chunk-YHW6JZEF.js} +48 -11
- package/dist/chunk-YHW6JZEF.js.map +1 -0
- package/dist/core/index.cjs +72 -72
- 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/experimental/index.cjs +3 -3
- package/dist/experimental/index.js +2 -2
- package/dist/react/index.cjs +70 -66
- package/dist/react/index.d.cts +207 -5
- package/dist/react/index.d.ts +207 -5
- package/dist/react/index.js +3 -3
- package/dist/ui/index.cjs +1178 -228
- package/dist/ui/index.cjs.map +1 -1
- package/dist/ui/index.d.cts +119 -7
- package/dist/ui/index.d.ts +119 -7
- package/dist/ui/index.js +1173 -227
- package/dist/ui/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-5UGWLGFS.cjs.map +0 -1
- package/dist/chunk-DH6EO6NW.js.map +0 -1
- package/dist/chunk-KGYDGK3U.cjs.map +0 -1
- package/dist/chunk-LHLVTGIP.cjs.map +0 -1
- package/dist/chunk-YLZCTR4O.js.map +0 -1
- package/dist/chunk-ZAOTYA5L.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as Thread, b as ThreadData,
|
|
1
|
+
import { a as Thread, b as ThreadData, A as AsyncThreadStorageAdapter, c as ThreadStorageAdapter, d as Message } from './types-waEqyE4K.cjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Tool types for App Context Awareness
|
|
@@ -619,11 +619,11 @@ interface LocalStorageAdapterConfig {
|
|
|
619
619
|
* });
|
|
620
620
|
* ```
|
|
621
621
|
*/
|
|
622
|
-
declare function createLocalStorageAdapter(config?: LocalStorageAdapterConfig):
|
|
622
|
+
declare function createLocalStorageAdapter(config?: LocalStorageAdapterConfig): AsyncThreadStorageAdapter;
|
|
623
623
|
/**
|
|
624
624
|
* Default localStorage adapter instance
|
|
625
625
|
*/
|
|
626
|
-
declare const localStorageAdapter:
|
|
626
|
+
declare const localStorageAdapter: AsyncThreadStorageAdapter;
|
|
627
627
|
|
|
628
628
|
/**
|
|
629
629
|
* In-Memory Thread Storage Adapter
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as Thread, b as ThreadData,
|
|
1
|
+
import { a as Thread, b as ThreadData, A as AsyncThreadStorageAdapter, c as ThreadStorageAdapter, d as Message } from './types-waEqyE4K.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Tool types for App Context Awareness
|
|
@@ -619,11 +619,11 @@ interface LocalStorageAdapterConfig {
|
|
|
619
619
|
* });
|
|
620
620
|
* ```
|
|
621
621
|
*/
|
|
622
|
-
declare function createLocalStorageAdapter(config?: LocalStorageAdapterConfig):
|
|
622
|
+
declare function createLocalStorageAdapter(config?: LocalStorageAdapterConfig): AsyncThreadStorageAdapter;
|
|
623
623
|
/**
|
|
624
624
|
* Default localStorage adapter instance
|
|
625
625
|
*/
|
|
626
|
-
declare const localStorageAdapter:
|
|
626
|
+
declare const localStorageAdapter: AsyncThreadStorageAdapter;
|
|
627
627
|
|
|
628
628
|
/**
|
|
629
629
|
* In-Memory Thread Storage Adapter
|
|
@@ -317,7 +317,12 @@ function stopConsoleCapture() {
|
|
|
317
317
|
});
|
|
318
318
|
}
|
|
319
319
|
function getConsoleLogs(options = {}) {
|
|
320
|
-
const opts = {
|
|
320
|
+
const opts = {
|
|
321
|
+
...DEFAULT_OPTIONS2,
|
|
322
|
+
...options,
|
|
323
|
+
types: options.types ?? DEFAULT_OPTIONS2.types,
|
|
324
|
+
limit: options.limit ?? DEFAULT_OPTIONS2.limit
|
|
325
|
+
};
|
|
321
326
|
let logs = [...capturedLogs];
|
|
322
327
|
if (opts.types.length < Object.keys(originalMethods).length) {
|
|
323
328
|
logs = logs.filter((entry) => opts.types.includes(entry.type));
|
|
@@ -1214,6 +1219,10 @@ function createConsoleLogsTool(options) {
|
|
|
1214
1219
|
}
|
|
1215
1220
|
|
|
1216
1221
|
// src/core/tools/builtin/network.ts
|
|
1222
|
+
var isBrowser5 = typeof window !== "undefined" && typeof fetch !== "undefined";
|
|
1223
|
+
if (isBrowser5 && !isNetworkCaptureActive()) {
|
|
1224
|
+
startNetworkCapture();
|
|
1225
|
+
}
|
|
1217
1226
|
var networkRequestsTool = chunkTPDMBDQX_cjs.tool({
|
|
1218
1227
|
description: "Get recent network requests from the browser. Use this when debugging API calls, checking for failed requests, analyzing network activity, or troubleshooting connectivity issues.",
|
|
1219
1228
|
location: "client",
|
|
@@ -2118,15 +2127,17 @@ var SimpleThreadManagerState = class {
|
|
|
2118
2127
|
// src/thread/adapters/localStorageAdapter.ts
|
|
2119
2128
|
var DEFAULT_STORAGE_KEY = "copilot-sdk-store";
|
|
2120
2129
|
var STORE_VERSION = 1;
|
|
2130
|
+
var _localStorageAvailable = null;
|
|
2121
2131
|
function isLocalStorageAvailable() {
|
|
2122
|
-
if (
|
|
2132
|
+
if (_localStorageAvailable !== null) return _localStorageAvailable;
|
|
2133
|
+
if (typeof window === "undefined") return _localStorageAvailable = false;
|
|
2123
2134
|
try {
|
|
2124
|
-
const testKey = "
|
|
2125
|
-
window.localStorage.setItem(testKey,
|
|
2135
|
+
const testKey = "__copilot_ls_check__";
|
|
2136
|
+
window.localStorage.setItem(testKey, "1");
|
|
2126
2137
|
window.localStorage.removeItem(testKey);
|
|
2127
|
-
return true;
|
|
2138
|
+
return _localStorageAvailable = true;
|
|
2128
2139
|
} catch {
|
|
2129
|
-
return false;
|
|
2140
|
+
return _localStorageAvailable = false;
|
|
2130
2141
|
}
|
|
2131
2142
|
}
|
|
2132
2143
|
function createEmptyStore() {
|
|
@@ -2277,6 +2288,11 @@ function createLocalStorageAdapter(config) {
|
|
|
2277
2288
|
updateStore(storageKey, () => ({
|
|
2278
2289
|
lastActiveThreadId: threadId
|
|
2279
2290
|
}));
|
|
2291
|
+
},
|
|
2292
|
+
deleteThread: async (id) => {
|
|
2293
|
+
updateStore(storageKey, (store) => ({
|
|
2294
|
+
threads: store.threads.filter((t) => t.id !== id)
|
|
2295
|
+
}));
|
|
2280
2296
|
}
|
|
2281
2297
|
};
|
|
2282
2298
|
}
|
|
@@ -2993,5 +3009,5 @@ exports.stopNetworkCapture = stopNetworkCapture;
|
|
|
2993
3009
|
exports.streamSSE = streamSSE;
|
|
2994
3010
|
exports.zodObjectToInputSchema = zodObjectToInputSchema;
|
|
2995
3011
|
exports.zodToJsonSchema = zodToJsonSchema;
|
|
2996
|
-
//# sourceMappingURL=chunk-
|
|
2997
|
-
//# sourceMappingURL=chunk-
|
|
3012
|
+
//# sourceMappingURL=chunk-7GWEW2DU.cjs.map
|
|
3013
|
+
//# sourceMappingURL=chunk-7GWEW2DU.cjs.map
|