builder.io 1.6.95 → 1.6.97

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.
@@ -15,6 +15,7 @@ export interface SessionContext {
15
15
  beforeCommit: string | undefined;
16
16
  createdUnixTime: number;
17
17
  updatedUnixTime: number;
18
+ canLoadMore: boolean;
18
19
  }
19
20
  export interface CodeGenSessionOptionsBase {
20
21
  sys: DevToolsSys;
@@ -45,6 +46,19 @@ export declare class CodeGenSession {
45
46
  constructor(options: CodeGenSessionOptions);
46
47
  get workingDirectory(): string;
47
48
  initializeSession(): Promise<void>;
49
+ loadWholeSession(opts?: {
50
+ linear?: boolean;
51
+ getAll?: boolean;
52
+ }): Promise<{
53
+ sessionId: string;
54
+ title: string | undefined;
55
+ beforeCommit: string | undefined;
56
+ createdUnixTime: number;
57
+ updatedUnixTime: number;
58
+ addedTurns: number;
59
+ turns: CodegenTurn[];
60
+ }>;
61
+ loadMoreTurns(): Promise<CodegenTurn[]>;
48
62
  setRepoUrl(repoUrl: string): void;
49
63
  getRepoUrl(): string | undefined;
50
64
  setPrUrl(prUrl: string): void;
@@ -156,6 +170,7 @@ export declare class CodeGenSession {
156
170
  };
157
171
  sendFeedback(feedback: Partial<CodegenFeedback>): Promise<void>;
158
172
  lastTurnHasChanges(): Promise<boolean>;
173
+ clearSession(): void;
159
174
  sendMessage(message: GenerateUserMessage, immediate?: boolean): Promise<void>;
160
175
  getTurns(): CodegenTurn[];
161
176
  getSessionContext(): SessionContext;
@@ -171,10 +186,6 @@ export declare class CodeGenSession {
171
186
  waitForEventLoop(): Promise<void>;
172
187
  agentCompletion(userMessage: GenerateUserMessage, signal: AbortSignal | undefined, onStep: (step: GenerateCompletionStep) => void): Promise<void>;
173
188
  commitWorkInProgress(lastTurn: CodegenTurn): Promise<string | undefined>;
174
- /**
175
- * Returns true if the last turn's afterCommit (or beforeCommit) is different from the session's beforeCommit.
176
- */
177
- hasChanges(): boolean;
178
189
  isCleanWorkTree(): Promise<boolean>;
179
190
  /**
180
191
  * Resolves a workspace file path to its actual file system path
@@ -1,12 +1,10 @@
1
1
  import type { DevToolsSys } from "@builder.io/dev-tools/core";
2
2
  import { type RequestHandler as ProxyRequestHandler } from "http-proxy-middleware";
3
- import type { HttpServerState } from "$/ai-utils";
3
+ import type { DevCommandState, HttpServerState } from "$/ai-utils";
4
4
  import EventEmitter from "events";
5
5
  import { type ChildProcessByStdio } from "node:child_process";
6
6
  import type { Readable } from "node:stream";
7
- import type { FusionConfig } from "$/ai-utils";
8
- export type DevCommandState = "running" | "stopped" | "unset";
9
- export type SetupCommandState = "not-installed" | "installing" | "installed" | "install-failed";
7
+ import type { FusionConfig, SetupCommandState } from "$/ai-utils";
10
8
  export type DevServerState = Exclude<SetupCommandState | DevCommandState, "installed">;
11
9
  export interface SetupCommandResult {
12
10
  code: number | null;