@builder.io/ai-utils 0.3.8 → 0.3.10
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.ts +35 -0
package/package.json
CHANGED
package/src/codegen.ts
CHANGED
|
@@ -91,6 +91,11 @@ export interface GetRuleToolInput {
|
|
|
91
91
|
name: string;
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
+
export interface GetStyleInspirationToolInput {
|
|
95
|
+
prompt: string;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export interface GetBuildOutputToolInput {}
|
|
94
99
|
export interface DevServerControlInput {
|
|
95
100
|
restart?: boolean;
|
|
96
101
|
getLogs?: boolean;
|
|
@@ -110,6 +115,8 @@ export interface CodeGenToolMap {
|
|
|
110
115
|
glob_search: GlobSearchToolInput;
|
|
111
116
|
grep_search: GrepSearchToolInput;
|
|
112
117
|
get_rule: GetRuleToolInput;
|
|
118
|
+
get_style_inspiration: GetStyleInspirationToolInput;
|
|
119
|
+
get_build_output: GetBuildOutputToolInput;
|
|
113
120
|
dev_server_control: DevServerControlInput;
|
|
114
121
|
bash: BashToolInput;
|
|
115
122
|
web_search: WebSearchToolInput;
|
|
@@ -366,9 +373,36 @@ export interface GenerateCompletionStepContinue {
|
|
|
366
373
|
url: string;
|
|
367
374
|
}
|
|
368
375
|
|
|
376
|
+
export interface CodeGenHealthStatus {
|
|
377
|
+
devServerRunning: boolean;
|
|
378
|
+
devServerResponding: boolean;
|
|
379
|
+
logs: string | undefined;
|
|
380
|
+
lastInstallFailed: boolean;
|
|
381
|
+
checkLogs: string;
|
|
382
|
+
checkPassed: boolean;
|
|
383
|
+
prompt: string;
|
|
384
|
+
message: string;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
export interface SuggestedActionBase {
|
|
388
|
+
level: "info" | "warning" | "error";
|
|
389
|
+
canAutoApply: boolean;
|
|
390
|
+
actionButtonText: string;
|
|
391
|
+
message: string;
|
|
392
|
+
userMessage: GenerateUserMessage;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
export interface SuggestedActionBuildError extends SuggestedActionBase {
|
|
396
|
+
type: "build-error";
|
|
397
|
+
healthStatus: CodeGenHealthStatus;
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
export type SuggestedAction = SuggestedActionBuildError;
|
|
401
|
+
|
|
369
402
|
export interface GenerateCompletionStepWaitForInput {
|
|
370
403
|
type: "wait-for-input";
|
|
371
404
|
state: GenerateCompletionState;
|
|
405
|
+
suggestion?: SuggestedAction;
|
|
372
406
|
}
|
|
373
407
|
|
|
374
408
|
export interface GenerateCompletionStepAbort {
|
|
@@ -461,6 +495,7 @@ export interface GenerateUserMessage {
|
|
|
461
495
|
skipSearch?: boolean;
|
|
462
496
|
attachments?: Attachment[];
|
|
463
497
|
debugMode?: boolean;
|
|
498
|
+
logsCheckpoint?: boolean;
|
|
464
499
|
}
|
|
465
500
|
|
|
466
501
|
export interface UserInput {
|