@builder.io/ai-utils 0.3.6 → 0.3.7

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/codegen.ts +13 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@builder.io/ai-utils",
3
- "version": "0.3.6",
3
+ "version": "0.3.7",
4
4
  "description": "Builder.io AI utils",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
package/src/codegen.ts CHANGED
@@ -32,7 +32,8 @@ export interface CustomInstruction {
32
32
  id: string;
33
33
  name: string;
34
34
  content: string;
35
- type?: "always" | "agent-mode" | string;
35
+ type?: "always" | "agent-mode";
36
+ filePath?: string;
36
37
  glob?: string;
37
38
  description?: string;
38
39
  }
@@ -67,6 +68,8 @@ export type CompletionStopReason =
67
68
  | "tool_use"
68
69
  | "end_turn"
69
70
  | "content_filter"
71
+ | "error"
72
+ | "aborted"
70
73
  | null;
71
74
 
72
75
  export interface ViewPathToolInput {
@@ -86,9 +89,6 @@ export interface GrepSearchToolInput {
86
89
 
87
90
  export interface GetRuleToolInput {
88
91
  name: string;
89
- type?: "always" | "agent-mode" | string;
90
- glob?: string;
91
- description?: string;
92
92
  }
93
93
 
94
94
  export interface GetBuildOutputToolInput {}
@@ -98,6 +98,10 @@ export interface BashToolInput {
98
98
  restart?: boolean;
99
99
  }
100
100
 
101
+ export interface WebSearchToolInput {
102
+ query: string;
103
+ }
104
+
101
105
  export interface CodeGenToolMap {
102
106
  view_path: ViewPathToolInput;
103
107
  glob_search: GlobSearchToolInput;
@@ -105,6 +109,7 @@ export interface CodeGenToolMap {
105
109
  get_rule: GetRuleToolInput;
106
110
  get_build_output: GetBuildOutputToolInput;
107
111
  bash: BashToolInput;
112
+ web_search: WebSearchToolInput;
108
113
  }
109
114
 
110
115
  export type CodeGenTools = keyof CodeGenToolMap;
@@ -135,6 +140,7 @@ export interface CodeGenInputOptions {
135
140
  toolResults?: ContentMessageItemToolResult[];
136
141
  attachments?: Attachment[];
137
142
  beforeCommit?: string;
143
+ workingDirectory?: string;
138
144
 
139
145
  // Code options
140
146
  builderContent?: BuilderContent;
@@ -186,6 +192,7 @@ export interface PromptSuggestion {
186
192
  type:
187
193
  | "missing-imports"
188
194
  | "lazy-code"
195
+ | "no-file-for-diff"
189
196
  | "syntax-error"
190
197
  | "llm-suggested"
191
198
  | "diff-apply";
@@ -261,6 +268,7 @@ export interface GenerateCompletionStepThinking {
261
268
  export interface FileInfo {
262
269
  filePath: string;
263
270
  size: number;
271
+ isCustomInstruction: boolean;
264
272
  }
265
273
 
266
274
  export interface GenerateCompletionStepUserInput {
@@ -346,6 +354,7 @@ export interface GenerateCompletionStepError {
346
354
  metadata?: any;
347
355
  message: string;
348
356
  usage?: CodegenUsage;
357
+ contextPrompt?: string;
349
358
  }
350
359
 
351
360
  export interface GenerateCompletionStepContinue {