@builder.io/ai-utils 0.5.39 → 0.5.41

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.5.39",
3
+ "version": "0.5.41",
4
4
  "description": "Builder.io AI utils",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
package/src/codegen.d.ts CHANGED
@@ -191,6 +191,8 @@ export interface CodeGenToolMap {
191
191
  export type CodeGenTools = keyof CodeGenToolMap;
192
192
  export type AllCodeGenTools = CodeGenTools | "web_search";
193
193
  export type CodeGenMode = "quality" | "quality-v3" | "quality-v4" | "quality-v4-agent";
194
+ export type BaseCodeGenPosition = "fusion" | "editor-ai" | "repo-indexing" | "cli" | "create-app-firebase" | "create-app-lovable" | "builder-code-panel";
195
+ export type CodeGenPosition = BaseCodeGenPosition | `${BaseCodeGenPosition}-agent`;
194
196
  export interface RepoIndexingConfig {
195
197
  designSystems: string[];
196
198
  }
@@ -228,6 +230,7 @@ export interface CodeGenInputOptions {
228
230
  maxTokens?: number;
229
231
  maxPages?: number;
230
232
  autoContinue?: number;
233
+ isManualContinue?: boolean;
231
234
  promptCaching?: boolean;
232
235
  llmSuggestions?: boolean;
233
236
  conclusionText?: boolean;
@@ -616,6 +619,7 @@ export interface GenerateUserMessage {
616
619
  dropAbortedPrompt?: boolean;
617
620
  modelOverride?: string;
618
621
  maxCompletions?: number;
622
+ isManualContinue?: boolean;
619
623
  repair?: boolean;
620
624
  }
621
625
  export interface UserInput {
@@ -671,6 +675,7 @@ export interface CodegenFeedback {
671
675
  afterCommit?: string;
672
676
  linesOfCodeAdded?: number;
673
677
  linesOfCodeRemoved?: number;
678
+ position?: CodeGenPosition;
674
679
  }
675
680
  export interface CodegenSetLastCompletion {
676
681
  sessionId: string;
@@ -967,3 +972,11 @@ export interface FusionMetrics {
967
972
  attributes: Record<string, string>;
968
973
  }[];
969
974
  }
975
+ export interface AnalyzeChatSentimentResults {
976
+ sentiment: "positive" | "neutral" | "negative";
977
+ frustration_level: "none" | "low" | "medium" | "high";
978
+ repeated_attempts: boolean;
979
+ confusion_level: "none" | "low" | "medium" | "high";
980
+ urgency: "none" | "low" | "medium" | "high";
981
+ satisfaction: "none" | "low" | "medium" | "high";
982
+ }
package/src/messages.d.ts CHANGED
@@ -28,6 +28,7 @@ export interface DocumentBase64Source {
28
28
  type: "base64";
29
29
  media_type: "application/pdf";
30
30
  data: string;
31
+ original_url?: string;
31
32
  }
32
33
  export interface DocumentUrlSource {
33
34
  type: "url";
@@ -53,6 +54,7 @@ export interface ImageBase64Source {
53
54
  type: "base64";
54
55
  media_type: "image/webp" | "image/png" | "image/jpeg" | "image/gif";
55
56
  data: string;
57
+ original_url?: string;
56
58
  }
57
59
  export interface ImageUrlSource {
58
60
  type: "url";