builder.io 1.9.2 → 1.9.4

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.
@@ -1,6 +1,6 @@
1
1
  import type { DevToolsSys } from "../types";
2
2
  import { type Credentials } from "./credentials";
3
- import type { CodegenFeedback, CodeGenToolMap, CodegenTurn, CommitMode, CustomInstruction, FusionConfig, GenerateCompletionState, GenerateCompletionStep, GenerateCompletionStepGit, GenerateUserMessage, UserContext, WorkspaceConfiguration, WorkspaceFolder, LoadWholeSessionOptions, LoadWholeSessionResult, LoadHistoryResult, CodeGenMode } from "$/ai-utils";
3
+ import type { CodegenFeedback, CodeGenToolMap, CodegenTurn, CommitMode, CustomInstruction, FusionConfig, GenerateCompletionState, GenerateCompletionStep, GenerateCompletionStepGit, GenerateUserMessage, UserContext, WorkspaceConfiguration, WorkspaceFolder, LoadWholeSessionOptions, LoadWholeSessionResult, LoadHistoryResult, CodeGenMode, ApplyActionsResult } from "$/ai-utils";
4
4
  import prettier from "prettier";
5
5
  import { type FusionContext } from "./code-tools";
6
6
  import EventEmitter from "node:events";
@@ -329,6 +329,16 @@ export declare class CodeGenSession {
329
329
  */
330
330
  deleteFile(filePath: string): Promise<boolean>;
331
331
  getNetLinesChanged(): number;
332
+ /**
333
+ * Get git diff between current commit and remote branch
334
+ * If remote current branch doesn't exist, gets diff between default branch and current branch
335
+ */
336
+ getDiffFromRemote(): Promise<ApplyActionsResult[]>;
337
+ /**
338
+ * Get the default branch name from remote repository
339
+ * Falls back to checking common default branch names
340
+ */
341
+ private getDefaultBranch;
332
342
  }
333
343
  export declare function getUserContext(sys: DevToolsSys, gitWorkingDirectory?: string): Promise<UserContext>;
334
344
  export declare function makeAsyncIterator<T>(): readonly [AsyncGenerator<T, void, void>, (event: T) => void, () => void];
@@ -0,0 +1,7 @@
1
+ import type { ApplyActionsResult } from "../../../ai-utils/src/codegen";
2
+ /**
3
+ * Parse git diff output and convert it to ApplyActionsResult array
4
+ * @param diff - The git diff output string
5
+ * @returns Array of ApplyActionsResult objects
6
+ */
7
+ export declare function parseGitDiffToApplyActions(diff: string): ApplyActionsResult[];