builder.io 1.9.20 → 1.9.22
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/cli/index.cjs +145 -145
- package/cli/index.cjs.map +4 -4
- package/core/index.cjs +1 -1
- package/core/index.mjs +1 -1
- package/node/index.cjs +1 -1
- package/node/index.mjs +1 -1
- package/package.json +1 -1
- package/server/index.cjs +48 -48
- package/server/index.mjs +43 -43
- package/types/cli/code-tools.d.ts +5 -3
- package/types/cli/codegen.d.ts +27 -9
- package/types/cli/credentials.d.ts +0 -7
- package/types/tsconfig.tsbuildinfo +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CodeGenTools, CodegenTurn,
|
|
1
|
+
import type { CodeGenTools, CodegenTurn, ContentMessageItemToolResult, FusionConfig, GenerateCompletionStep, ProjectFile, UserSource, WorkspaceFolder } from "$/ai-utils";
|
|
2
2
|
import type { DevToolsSys } from "../core";
|
|
3
3
|
import { type DevServerOrchestrator } from "./launch/dev-server-orchestrator";
|
|
4
4
|
import type { CodeGenEventEmitter } from "./codegen";
|
|
@@ -16,7 +16,6 @@ export interface ToolResolution {
|
|
|
16
16
|
}
|
|
17
17
|
export interface FusionContext {
|
|
18
18
|
devServerOrchestrator?: DevServerOrchestrator;
|
|
19
|
-
commitMode: CommitMode;
|
|
20
19
|
git: boolean;
|
|
21
20
|
gitRemote?: string;
|
|
22
21
|
gitAutoInit?: boolean;
|
|
@@ -44,7 +43,10 @@ export interface ToolContext extends Partial<FusionContext> {
|
|
|
44
43
|
revert?: boolean;
|
|
45
44
|
forceReplay?: boolean;
|
|
46
45
|
debug?: string;
|
|
47
|
-
}) => Promise<
|
|
46
|
+
}) => Promise<{
|
|
47
|
+
undone: string[] | null;
|
|
48
|
+
message: string;
|
|
49
|
+
}>;
|
|
48
50
|
bashWorkingDirectory: string;
|
|
49
51
|
filterText: (text: string) => string;
|
|
50
52
|
resolveWorkspacePath: (path: string, forceWorkspace: boolean) => {
|
package/types/cli/codegen.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { DevToolsSys } from "../types";
|
|
2
2
|
import { type Credentials } from "./credentials";
|
|
3
|
-
import type { CodegenFeedback, CodeGenToolMap, CodegenTurn,
|
|
3
|
+
import type { CodegenFeedback, CodeGenToolMap, CodegenTurn, 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";
|
|
@@ -80,8 +80,7 @@ export declare class CodeGenSession {
|
|
|
80
80
|
success: boolean;
|
|
81
81
|
error: unknown;
|
|
82
82
|
}>;
|
|
83
|
-
getCommitMode(): CommitMode
|
|
84
|
-
setCommitMode(commitMode: CommitMode): void;
|
|
83
|
+
getCommitMode(): import("$/ai-utils").CommitMode;
|
|
85
84
|
pushChanges(pullFirst?: boolean): Promise<{
|
|
86
85
|
output: string;
|
|
87
86
|
upToDate: boolean;
|
|
@@ -129,6 +128,7 @@ export declare class CodeGenSession {
|
|
|
129
128
|
getSessionId(): string;
|
|
130
129
|
getSpaceId(): string | undefined;
|
|
131
130
|
revertToCommitHash(commitHash: string): Promise<void>;
|
|
131
|
+
resetToCommitHash(commitHash: string): Promise<void>;
|
|
132
132
|
/**
|
|
133
133
|
* Core function to restore the codebase to a state that matches a predicate.
|
|
134
134
|
* This is the main function that handles both git-based and file-based restoration.
|
|
@@ -144,19 +144,37 @@ export declare class CodeGenSession {
|
|
|
144
144
|
revert?: boolean;
|
|
145
145
|
forceReplay?: boolean;
|
|
146
146
|
debug?: string;
|
|
147
|
-
}): Promise<
|
|
148
|
-
|
|
149
|
-
|
|
147
|
+
}): Promise<{
|
|
148
|
+
undone: string[] | null;
|
|
149
|
+
message: string;
|
|
150
|
+
}>;
|
|
151
|
+
restoreHEAD(): Promise<{
|
|
152
|
+
undone: string[] | null;
|
|
153
|
+
message: string;
|
|
154
|
+
}>;
|
|
155
|
+
restoreAll(): Promise<{
|
|
156
|
+
undone: string[] | null;
|
|
157
|
+
message: string;
|
|
158
|
+
}>;
|
|
150
159
|
restoreFromCompletionId({ location, completionId, forceReplay, }: {
|
|
151
160
|
location: "before" | "after";
|
|
152
161
|
completionId: string;
|
|
153
162
|
forceReplay?: boolean;
|
|
154
|
-
}): Promise<
|
|
155
|
-
|
|
163
|
+
}): Promise<{
|
|
164
|
+
undone: string[] | null;
|
|
165
|
+
message: string;
|
|
166
|
+
}>;
|
|
167
|
+
restoreBeforeCompletionId(completionId: string): Promise<{
|
|
168
|
+
undone: string[] | null;
|
|
169
|
+
message: string;
|
|
170
|
+
}>;
|
|
156
171
|
/**
|
|
157
172
|
* Undo all changes back to the last user message
|
|
158
173
|
*/
|
|
159
|
-
undoLastUserMessage(dryRun?: boolean): Promise<
|
|
174
|
+
undoLastUserMessage(dryRun?: boolean): Promise<{
|
|
175
|
+
undone: string[] | null;
|
|
176
|
+
message: string;
|
|
177
|
+
}>;
|
|
160
178
|
getLastCompletionId(): string | undefined;
|
|
161
179
|
getCurrentState(): GenerateCompletionState;
|
|
162
180
|
getLastApplyResultsTurn(): CodegenTurn | undefined;
|
|
@@ -28,13 +28,6 @@ export interface BuilderAuth {
|
|
|
28
28
|
spaceName: string;
|
|
29
29
|
userId: string;
|
|
30
30
|
}
|
|
31
|
-
export interface Credentials {
|
|
32
|
-
figmaAuth?: FigmaAuth;
|
|
33
|
-
builderPublicKey?: string;
|
|
34
|
-
builderPrivateKey?: string;
|
|
35
|
-
spaceName?: string;
|
|
36
|
-
userId?: string;
|
|
37
|
-
}
|
|
38
31
|
export declare const isCI: (args: CLIArgs) => boolean;
|
|
39
32
|
export interface Credentials {
|
|
40
33
|
figmaAuth?: FigmaAuth;
|