@caido/sdk-frontend 0.53.2-beta.2 → 0.53.2-beta.4
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/package.json
CHANGED
package/src/types/index.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ export type { Scope } from "./types/scopes";
|
|
|
14
14
|
export type { EnvironmentVariable } from "./types/environment";
|
|
15
15
|
export type { Workflow, WorkflowKind, OnCreatedWorkflowCallback, OnUpdatedWorkflowCallback, OnDeletedWorkflowCallback, } from "./types/workflows";
|
|
16
16
|
export type { ListenerHandle } from "./types/utils";
|
|
17
|
-
export type { AIProvider } from "./types/ai";
|
|
17
|
+
export type { AIProvider, AILanguageModelSettings, AIReasoningSettings, } from "./types/ai";
|
|
18
18
|
export type { SelectedProjectChangeEvent } from "./types/projects";
|
|
19
19
|
export type { CommandPaletteView } from "./sdks/commandPalette";
|
|
20
20
|
export type { LogSDK } from "./sdks/log";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Extension } from "@codemirror/state";
|
|
2
|
-
import { type CurrentReplaySessionChangeEvent, type OpenTabOptions, type ReplayCollection, type ReplayEntry, type ReplaySession, type ReplaySlotContent, type ReplayTab, type RequestSource, type SendRequestOptions } from "../types/replay";
|
|
2
|
+
import { type CurrentReplaySessionChangeEvent, type OpenTabOptions, type ReplayCollection, type ReplayCollectionCreatedEvent, type ReplayEntry, type ReplaySession, type ReplaySessionCreatedEvent, type ReplaySlotContent, type ReplayTab, type RequestSource, type SendRequestOptions } from "../types/replay";
|
|
3
3
|
import type { RequestViewModeOptions } from "../types/request";
|
|
4
4
|
import { type DefineAddToSlotFn } from "../types/slots";
|
|
5
5
|
import type { ID, ListenerHandle } from "../types/utils";
|
|
@@ -192,4 +192,36 @@ export type ReplaySDK = {
|
|
|
192
192
|
* ```
|
|
193
193
|
*/
|
|
194
194
|
onCurrentSessionChange: (callback: (event: CurrentReplaySessionChangeEvent) => void) => ListenerHandle;
|
|
195
|
+
/**
|
|
196
|
+
* Subscribe to replay session creation events.
|
|
197
|
+
* @param callback The callback to call when a session is created.
|
|
198
|
+
* @returns An object with a `stop` method that can be called to stop listening to session creation events.
|
|
199
|
+
*
|
|
200
|
+
* @example
|
|
201
|
+
* ```ts
|
|
202
|
+
* const handler = sdk.replay.onSessionCreate((event) => {
|
|
203
|
+
* console.log(`Session ${event.session.id} was created!`);
|
|
204
|
+
* });
|
|
205
|
+
*
|
|
206
|
+
* // Later, stop listening
|
|
207
|
+
* handler.stop();
|
|
208
|
+
* ```
|
|
209
|
+
*/
|
|
210
|
+
onSessionCreate: (callback: (event: ReplaySessionCreatedEvent) => void) => ListenerHandle;
|
|
211
|
+
/**
|
|
212
|
+
* Subscribe to replay collection creation events.
|
|
213
|
+
* @param callback The callback to call when a collection is created.
|
|
214
|
+
* @returns An object with a `stop` method that can be called to stop listening to collection creation events.
|
|
215
|
+
*
|
|
216
|
+
* @example
|
|
217
|
+
* ```ts
|
|
218
|
+
* const handler = sdk.replay.onCollectionCreate((event) => {
|
|
219
|
+
* console.log(`Collection ${event.collection.id} was created!`);
|
|
220
|
+
* });
|
|
221
|
+
*
|
|
222
|
+
* // Later, stop listening
|
|
223
|
+
* handler.stop();
|
|
224
|
+
* ```
|
|
225
|
+
*/
|
|
226
|
+
onCollectionCreate: (callback: (event: ReplayCollectionCreatedEvent) => void) => ListenerHandle;
|
|
195
227
|
};
|
package/src/types/types/ai.d.ts
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { type LanguageModelV2, type ProviderV2 } from "@ai-sdk/provider";
|
|
2
|
+
export type AIReasoningSettings = {
|
|
3
|
+
effort: "low" | "medium" | "high";
|
|
4
|
+
};
|
|
5
|
+
export type AILanguageModelSettings = {
|
|
6
|
+
reasoning?: AIReasoningSettings;
|
|
7
|
+
};
|
|
2
8
|
/**
|
|
3
9
|
* Official AI Provider to be used by the [ai](https://ai-sdk.dev/) library.
|
|
4
10
|
* @category AI
|
|
5
11
|
*/
|
|
6
|
-
export type AIProvider = ProviderV2 & ((modelId: string) => LanguageModelV2);
|
|
12
|
+
export type AIProvider = ProviderV2 & ((modelId: string, settings?: AILanguageModelSettings) => LanguageModelV2);
|
|
@@ -198,3 +198,23 @@ export type CurrentReplaySessionChangeEvent = {
|
|
|
198
198
|
*/
|
|
199
199
|
sessionId: ID | undefined;
|
|
200
200
|
};
|
|
201
|
+
/**
|
|
202
|
+
* Event fired when a replay session is created.
|
|
203
|
+
* @category Replay
|
|
204
|
+
*/
|
|
205
|
+
export type ReplaySessionCreatedEvent = {
|
|
206
|
+
/**
|
|
207
|
+
* The newly created replay session.
|
|
208
|
+
*/
|
|
209
|
+
session: ReplaySession;
|
|
210
|
+
};
|
|
211
|
+
/**
|
|
212
|
+
* Event fired when a replay collection is created.
|
|
213
|
+
* @category Replay
|
|
214
|
+
*/
|
|
215
|
+
export type ReplayCollectionCreatedEvent = {
|
|
216
|
+
/**
|
|
217
|
+
* The newly created replay collection.
|
|
218
|
+
*/
|
|
219
|
+
collection: ReplayCollection;
|
|
220
|
+
};
|