@builder.io/ai-utils 0.0.15 → 0.0.16
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 -1
- package/dist/events.d.ts +3 -2
- package/dist/settings.d.ts +2 -1
- package/dist/settings.js +1 -0
- package/package.json +1 -1
package/dist/completion.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { BuilderContent, BuilderElement, Component } from "@builder.io/sdk";
|
|
2
|
-
import type { MessageParam } from "./messages";
|
|
2
|
+
import type { MessageParam, SnippetParams } from "./messages";
|
|
3
3
|
import type { BuilderModel } from "./events";
|
|
4
4
|
export type BuilderContentData = BuilderContent["data"];
|
|
5
5
|
export type { BuilderContent, BuilderElement, Component };
|
|
@@ -70,3 +70,8 @@ export interface CompletionOptions {
|
|
|
70
70
|
*/
|
|
71
71
|
debug?: boolean;
|
|
72
72
|
}
|
|
73
|
+
export type OnPromptSubmit = (opts: {
|
|
74
|
+
prompt?: string;
|
|
75
|
+
snippetId?: string;
|
|
76
|
+
snippetParams?: SnippetParams;
|
|
77
|
+
}) => void;
|
package/dist/events.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { BuilderContent, BuilderElement, Component } from "@builder.io/sdk";
|
|
2
2
|
import type { Thread } from "./thread";
|
|
3
3
|
import type { AssistantMessage } from "./messages";
|
|
4
|
+
import { AssistantSettings } from "./settings";
|
|
4
5
|
export type BuilderAssistantEventHandler = (ev: BuilderAssistantEvent) => void;
|
|
5
6
|
export type BuilderAssistantEvent = AppCloseEvent | AppMessagesClickEvent | AppMessagesGenerationEvent | AppPromptAbortEvent | AppPromptFocusEvent | AppPromptTextEvent | AppReadyEvent | AppSettingsResetEvent | AppSettingsSetEvent | AppThreadNewEvent | BuiderEditorStateEvent | ContentCreateEvent | ContentUpdateEvent | ContentApplySnapshotEvent | ContentCompleteEvent | ModelCreateEvent | ModelUpdateEvent | ResultEvent | ThreadCreatedEvent | ThreadMessageDeltaEvent | ThreadMessageCompletedEvent | ThreadMessageFeedbackEvent | ThreadRunRequiresActionEvent | ThreadRunStepCreatedEvent | ThreadRunStepDeltaEvent;
|
|
6
7
|
export interface AppCloseEvent {
|
|
@@ -39,9 +40,9 @@ export interface AppReadyEvent {
|
|
|
39
40
|
export interface AppSettingsResetEvent {
|
|
40
41
|
type: "assistant.app.settings.reset";
|
|
41
42
|
}
|
|
42
|
-
export interface AppSettingsSetEvent
|
|
43
|
+
export interface AppSettingsSetEvent {
|
|
43
44
|
type: "assistant.app.settings.set";
|
|
44
|
-
data:
|
|
45
|
+
data: Partial<AssistantSettings>;
|
|
45
46
|
}
|
|
46
47
|
export interface AppThreadNewEvent {
|
|
47
48
|
type: "assistant.app.thread.new";
|
package/dist/settings.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export interface AssistantSettings {
|
|
|
10
10
|
showAiCanMakeMistakes?: boolean;
|
|
11
11
|
showCloseButton?: boolean;
|
|
12
12
|
showHeaderButton?: boolean;
|
|
13
|
+
showPrompt?: boolean;
|
|
13
14
|
showSparklesInInputBar?: boolean;
|
|
14
15
|
suggestedItems: Snippet[];
|
|
15
16
|
theme?: "dark" | "light";
|
|
@@ -32,7 +33,7 @@ export interface Snippet {
|
|
|
32
33
|
* The prompt text that will be sent to the assistant when the user clicks the chat snippet button.
|
|
33
34
|
* This prompt is also what's added to the chat conversation from the user.
|
|
34
35
|
*/
|
|
35
|
-
prompt
|
|
36
|
+
prompt?: string;
|
|
36
37
|
/**
|
|
37
38
|
* The ID of the snippet that will be sent to the assistant when the user clicks the chat snippet button.
|
|
38
39
|
*/
|
package/dist/settings.js
CHANGED