builder.io 1.9.20 → 1.9.21
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 +26 -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;
|
|
@@ -144,19 +143,37 @@ export declare class CodeGenSession {
|
|
|
144
143
|
revert?: boolean;
|
|
145
144
|
forceReplay?: boolean;
|
|
146
145
|
debug?: string;
|
|
147
|
-
}): Promise<
|
|
148
|
-
|
|
149
|
-
|
|
146
|
+
}): Promise<{
|
|
147
|
+
undone: string[] | null;
|
|
148
|
+
message: string;
|
|
149
|
+
}>;
|
|
150
|
+
restoreHEAD(): Promise<{
|
|
151
|
+
undone: string[] | null;
|
|
152
|
+
message: string;
|
|
153
|
+
}>;
|
|
154
|
+
restoreAll(): Promise<{
|
|
155
|
+
undone: string[] | null;
|
|
156
|
+
message: string;
|
|
157
|
+
}>;
|
|
150
158
|
restoreFromCompletionId({ location, completionId, forceReplay, }: {
|
|
151
159
|
location: "before" | "after";
|
|
152
160
|
completionId: string;
|
|
153
161
|
forceReplay?: boolean;
|
|
154
|
-
}): Promise<
|
|
155
|
-
|
|
162
|
+
}): Promise<{
|
|
163
|
+
undone: string[] | null;
|
|
164
|
+
message: string;
|
|
165
|
+
}>;
|
|
166
|
+
restoreBeforeCompletionId(completionId: string): Promise<{
|
|
167
|
+
undone: string[] | null;
|
|
168
|
+
message: string;
|
|
169
|
+
}>;
|
|
156
170
|
/**
|
|
157
171
|
* Undo all changes back to the last user message
|
|
158
172
|
*/
|
|
159
|
-
undoLastUserMessage(dryRun?: boolean): Promise<
|
|
173
|
+
undoLastUserMessage(dryRun?: boolean): Promise<{
|
|
174
|
+
undone: string[] | null;
|
|
175
|
+
message: string;
|
|
176
|
+
}>;
|
|
160
177
|
getLastCompletionId(): string | undefined;
|
|
161
178
|
getCurrentState(): GenerateCompletionState;
|
|
162
179
|
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;
|