@builder.io/ai-utils 0.0.26 → 0.0.27
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/completion.d.ts +6 -2
- package/dist/events.d.ts +8 -2
- package/dist/settings.d.ts +1 -0
- package/dist/settings.js +1 -0
- package/dist/thread.d.ts +10 -0
- package/package.json +1 -1
package/dist/completion.d.ts
CHANGED
|
@@ -42,7 +42,7 @@ export interface CompletionOptions {
|
|
|
42
42
|
/**
|
|
43
43
|
* The state of the builder editor.
|
|
44
44
|
*/
|
|
45
|
-
builderState?:
|
|
45
|
+
builderState?: BuilderEditorState;
|
|
46
46
|
/**
|
|
47
47
|
* Persist the thread conversation context.
|
|
48
48
|
* Defaults to `true`.
|
|
@@ -58,7 +58,7 @@ export interface CompletionOptions {
|
|
|
58
58
|
*/
|
|
59
59
|
startMs?: number;
|
|
60
60
|
}
|
|
61
|
-
export interface
|
|
61
|
+
export interface BuilderEditorState {
|
|
62
62
|
/**
|
|
63
63
|
* The active locale of the builder editor.
|
|
64
64
|
*/
|
|
@@ -108,6 +108,10 @@ export interface BuiderEditorState {
|
|
|
108
108
|
*/
|
|
109
109
|
sessionId?: string;
|
|
110
110
|
}
|
|
111
|
+
/**
|
|
112
|
+
* @deprecated Uggh, spelling is hard. Use `BuilderEditorState` instead.
|
|
113
|
+
*/
|
|
114
|
+
export type BuiderEditorState = BuilderEditorState;
|
|
111
115
|
export type OnPromptSubmit = (opts: {
|
|
112
116
|
prompt?: string;
|
|
113
117
|
snippetId?: string;
|
package/dist/events.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import type { Thread } from "./thread";
|
|
|
3
3
|
import type { AssistantMessage } from "./messages";
|
|
4
4
|
import { AssistantSettings } from "./settings";
|
|
5
5
|
export type BuilderAssistantEventHandler = (ev: BuilderAssistantEvent) => void;
|
|
6
|
-
export type BuilderAssistantEvent = AssistantErrorEvent | AppCloseEvent | AppMessagesClickEvent | AppMessagesGenerationEvent | AppPromptAbortEvent | AppPromptFocusEvent | AppPromptTextEvent | AppReadyEvent | AppSettingsResetEvent | AppSettingsSetEvent | AppThreadNewEvent |
|
|
6
|
+
export type BuilderAssistantEvent = AssistantErrorEvent | AppCloseEvent | AppMessagesClickEvent | AppMessagesGenerationEvent | AppPromptAbortEvent | AppPromptFocusEvent | AppPromptTextEvent | AppReadyEvent | AppSettingsResetEvent | AppSettingsSetEvent | AppThreadNewEvent | BuilderEditorStateEvent | ContentUpdateEvent | ContentApplySnapshotEvent | ContentCompleteEvent | ModelCreateEvent | ModelUpdateEvent | ModelUndoEvent | ResultEvent | ThreadCreatedEvent | ThreadMessageDeltaEvent | ThreadMessageCompletedEvent | ThreadMessageFeedbackEvent | ThreadRunRequiresActionEvent | ThreadRunStepCreatedEvent | ThreadRunStepDeltaEvent;
|
|
7
7
|
export interface AssistantError {
|
|
8
8
|
message: string;
|
|
9
9
|
status?: number;
|
|
@@ -56,9 +56,13 @@ export interface AppSettingsSetEvent {
|
|
|
56
56
|
export interface AppThreadNewEvent {
|
|
57
57
|
type: "assistant.app.thread.new";
|
|
58
58
|
}
|
|
59
|
-
export interface
|
|
59
|
+
export interface BuilderEditorStateEvent extends AwaitResultEvent {
|
|
60
60
|
type: "assistant.editor.state";
|
|
61
61
|
}
|
|
62
|
+
/**
|
|
63
|
+
* @deprecated Use BuilderEditorStateEvent
|
|
64
|
+
*/
|
|
65
|
+
export type BuiderEditorStateEvent = BuilderEditorStateEvent;
|
|
62
66
|
export interface AwaitResultEvent {
|
|
63
67
|
resolveId?: string;
|
|
64
68
|
}
|
|
@@ -171,6 +175,8 @@ export interface ThreadMessageFeedback {
|
|
|
171
175
|
thread: Thread;
|
|
172
176
|
platformId: string;
|
|
173
177
|
sentiment?: "positive" | "negative";
|
|
178
|
+
builderUserId?: string;
|
|
179
|
+
builderEmail?: string;
|
|
174
180
|
}
|
|
175
181
|
export interface ThreadCreatedEvent {
|
|
176
182
|
type: "assistant.thread.created";
|
package/dist/settings.d.ts
CHANGED
package/dist/settings.js
CHANGED
package/dist/thread.d.ts
CHANGED
|
@@ -11,7 +11,17 @@ export interface Thread {
|
|
|
11
11
|
threadId?: string;
|
|
12
12
|
platformId?: string;
|
|
13
13
|
title?: string;
|
|
14
|
+
/**
|
|
15
|
+
* The type of assistant that the thread is associated with.
|
|
16
|
+
* For example, "content-editor" or "docs".
|
|
17
|
+
*/
|
|
14
18
|
assistantType?: string;
|
|
19
|
+
/**
|
|
20
|
+
* The unique identifier of the view that the thread is associated with.
|
|
21
|
+
* For example, the "content-editor" assistant would use the
|
|
22
|
+
* builder content id as the viewId.
|
|
23
|
+
*/
|
|
24
|
+
viewId?: string;
|
|
15
25
|
created: number;
|
|
16
26
|
messages: Message[];
|
|
17
27
|
}
|