@builder.io/ai-utils 0.4.31 → 0.4.33
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 +1 -1
- package/src/codegen.d.ts +25 -5
- package/src/messages.d.ts +8 -2
package/package.json
CHANGED
package/src/codegen.d.ts
CHANGED
|
@@ -239,6 +239,7 @@ export interface GenerateCompletionStepUser {
|
|
|
239
239
|
id: string;
|
|
240
240
|
user: UserSource;
|
|
241
241
|
role: "user" | "agent";
|
|
242
|
+
compacting: boolean;
|
|
242
243
|
}
|
|
243
244
|
export interface GenerateCompletionStepFile {
|
|
244
245
|
type: "file";
|
|
@@ -309,8 +310,8 @@ export interface GenerateCompletionStepContinue {
|
|
|
309
310
|
id: string;
|
|
310
311
|
url: string;
|
|
311
312
|
}
|
|
312
|
-
export type DevCommandState = "running" | "stopped" | "failed" | "unset";
|
|
313
|
-
export type SetupCommandState = "not-installed" | "installing" | "installed" | "install-failed";
|
|
313
|
+
export type DevCommandState = "running" | "stopped" | "starting" | "failed" | "unset";
|
|
314
|
+
export type SetupCommandState = "not-installed" | "installing" | "installed" | "install-failed" | "install-aborted";
|
|
314
315
|
export type HttpServerState = "ok-2xx" | "error-4xx" | "error-5xx" | "error-fetch" | "stopped" | "connecting";
|
|
315
316
|
export interface CodeGenHealthStatus {
|
|
316
317
|
devServerState: DevCommandState;
|
|
@@ -340,10 +341,25 @@ export interface GenerateCompletionStepWaitForInput {
|
|
|
340
341
|
state: GenerateCompletionState;
|
|
341
342
|
suggestion?: SuggestedAction;
|
|
342
343
|
}
|
|
343
|
-
export
|
|
344
|
+
export type GenerateCompletionStepBuilderAction = GenerateCompletionStepBuilderActionRefresh | GenerateCompletionStepBuilderActionOpenPath | GenerateCompletionStepBuilderActionMCPConnect;
|
|
345
|
+
export interface GenerateCompletionStepBuilderActionRefresh {
|
|
346
|
+
type: "builder-action";
|
|
347
|
+
action: "refresh";
|
|
348
|
+
metadata: {};
|
|
349
|
+
}
|
|
350
|
+
export interface GenerateCompletionStepBuilderActionOpenPath {
|
|
351
|
+
type: "builder-action";
|
|
352
|
+
action: "open-path";
|
|
353
|
+
metadata: {
|
|
354
|
+
path: string;
|
|
355
|
+
};
|
|
356
|
+
}
|
|
357
|
+
export interface GenerateCompletionStepBuilderActionMCPConnect {
|
|
344
358
|
type: "builder-action";
|
|
345
|
-
action: "
|
|
346
|
-
metadata:
|
|
359
|
+
action: "mcp-connect";
|
|
360
|
+
metadata: {
|
|
361
|
+
mcpServer: string;
|
|
362
|
+
};
|
|
347
363
|
}
|
|
348
364
|
export interface GenerateCompletionStepAbort {
|
|
349
365
|
type: "user-abort";
|
|
@@ -366,10 +382,14 @@ export interface GenerateCompletionStepDevServerState {
|
|
|
366
382
|
devServerState: DevCommandState;
|
|
367
383
|
setupState: SetupCommandState;
|
|
368
384
|
httpServerState: HttpServerState;
|
|
385
|
+
devCommand: string | undefined;
|
|
386
|
+
setupCommand: string | undefined;
|
|
387
|
+
proxyServer: string | undefined;
|
|
369
388
|
}
|
|
370
389
|
export interface GenerateCompletionStepGit {
|
|
371
390
|
type: "git";
|
|
372
391
|
isSessionDirty: boolean;
|
|
392
|
+
hasGeneratingPlaceholder: boolean;
|
|
373
393
|
remoteBranchExists: boolean;
|
|
374
394
|
canPush: boolean;
|
|
375
395
|
canPull: boolean;
|
package/src/messages.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ export interface ContentMessageItemImage {
|
|
|
19
19
|
}
|
|
20
20
|
export interface ContentMessageItemDocument {
|
|
21
21
|
type: "document";
|
|
22
|
-
source: DocumentBase64Source | DocumentUrlSource;
|
|
22
|
+
source: DocumentBase64Source | DocumentUrlSource | DocumentTextSource;
|
|
23
23
|
cache?: boolean;
|
|
24
24
|
ephemeral?: boolean;
|
|
25
25
|
}
|
|
@@ -32,6 +32,11 @@ export interface DocumentUrlSource {
|
|
|
32
32
|
type: "url";
|
|
33
33
|
url: string;
|
|
34
34
|
}
|
|
35
|
+
export interface DocumentTextSource {
|
|
36
|
+
type: "text";
|
|
37
|
+
media_type: "text/plain";
|
|
38
|
+
data: string;
|
|
39
|
+
}
|
|
35
40
|
export interface ContentMessageItemToolResult {
|
|
36
41
|
type: "tool_result";
|
|
37
42
|
tool_use_id: string;
|
|
@@ -248,9 +253,10 @@ export interface URL {
|
|
|
248
253
|
}
|
|
249
254
|
export interface FileUpload {
|
|
250
255
|
type: "upload";
|
|
251
|
-
contentType: "image/webp" | "image/png" | "image/jpeg" | "image/gif" | "application/pdf";
|
|
256
|
+
contentType: "image/webp" | "image/png" | "image/jpeg" | "image/gif" | "application/pdf" | "application/json" | "text/plain";
|
|
252
257
|
name: string;
|
|
253
258
|
dataUrl: string;
|
|
259
|
+
text?: string;
|
|
254
260
|
size: number;
|
|
255
261
|
id: string;
|
|
256
262
|
originalUrl?: string;
|