@builder.io/ai-utils 0.8.4 → 0.8.5

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@builder.io/ai-utils",
3
- "version": "0.8.4",
3
+ "version": "0.8.5",
4
4
  "description": "Builder.io AI utils",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
package/src/codegen.d.ts CHANGED
@@ -105,7 +105,6 @@ export interface FindMediaToolInput {
105
105
  hex_color?: string | null;
106
106
  }
107
107
  export interface MemoryToolInput {
108
- scope: "global" | "user" | "project";
109
108
  memory: string;
110
109
  memory_id?: string | null;
111
110
  when?: string;
@@ -215,6 +214,7 @@ export type CodeGenPosition = BaseCodeGenPosition | `${BaseCodeGenPosition}-agen
215
214
  export interface RepoIndexingConfig {
216
215
  designSystems: string[];
217
216
  }
217
+ export type CodeGenCategory = `repair-${string}` | `user-normal` | `user-figma` | `user-pdf` | `user-image` | `background-${string}` | `indexing-${string}`;
218
218
  export interface CodeGenInputOptions {
219
219
  position: string;
220
220
  eventName?: string;
@@ -268,7 +268,7 @@ export interface CodeGenInputOptions {
268
268
  pingEvents?: boolean;
269
269
  forceCompact?: boolean;
270
270
  hadPagination?: boolean;
271
- repair?: boolean;
271
+ category?: CodeGenCategory;
272
272
  metadata?: Record<string, any>;
273
273
  searchResponse?: any | null;
274
274
  prettierConfig?: PrettierOptions;
@@ -280,6 +280,8 @@ export interface CodeGenInputOptions {
280
280
  prevId?: string;
281
281
  /** @deprecated */
282
282
  vcpId?: string;
283
+ /** @deprecated */
284
+ repair?: boolean;
283
285
  }
284
286
  export type CodeGenErrorCodes = "credits-limit-daily" | "credits-limit-monthly" | "credits-limit-other" | "cli-genetic-error" | "git-update-error" | "prompt-too-long" | "context-too-long" | "abrupt-end" | "unknown" | "failed-recover-state" | "ask-to-continue" | "bad-initial-url" | "invalid-last-message" | "corrupted-session" | "assertion" | "rate-limit" | "unknown-design-system";
285
287
  export type Feature = "component-mapping";
@@ -655,8 +657,10 @@ export interface GenerateUserMessage {
655
657
  modelOverride?: string;
656
658
  maxCompletions?: number;
657
659
  isManualContinue?: boolean;
658
- repair?: boolean;
660
+ category?: CodeGenCategory;
659
661
  metadata?: Record<string, any>;
662
+ /** @deprecated */
663
+ repair?: boolean;
660
664
  }
661
665
  export interface UserInput {
662
666
  userMessage: GenerateUserMessage | undefined;
@@ -670,6 +674,8 @@ export interface UserInput {
670
674
  user: UserSource;
671
675
  patchFusionConfig?: Partial<FusionConfig> | undefined;
672
676
  modelOverride?: string;
677
+ category?: CodeGenCategory;
678
+ /** @deprecated */
673
679
  repair?: boolean;
674
680
  }
675
681
  export interface CodegenTurn {
package/src/messages.d.ts CHANGED
@@ -64,6 +64,8 @@ export interface ContentMessageItemThinking {
64
64
  type: "thinking";
65
65
  thinking: string;
66
66
  signature: string;
67
+ source?: "openai" | "gemini";
68
+ id?: string;
67
69
  }
68
70
  export interface ContentMessageItemRedactedThinking {
69
71
  type: "redacted_thinking";
@@ -74,6 +76,7 @@ export interface ContentMessageItemRedactedThinking {
74
76
  export interface ContentMessageItemToolUse {
75
77
  type: "tool_use";
76
78
  id: string;
79
+ provider_id?: string;
77
80
  input: unknown;
78
81
  completion?: string;
79
82
  thoughtSignature?: string;