codebuff 1.0.275 → 1.0.277
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/dist/code-map/tsconfig.tsbuildinfo +1 -1
- package/dist/common/__tests__/project-file-tree.test.d.ts +1 -0
- package/dist/common/__tests__/project-file-tree.test.js +251 -0
- package/dist/common/__tests__/project-file-tree.test.js.map +1 -0
- package/dist/common/actions.d.ts +28 -28
- package/dist/common/constants.d.ts +5 -5
- package/dist/common/constants.js +7 -7
- package/dist/common/constants.js.map +1 -1
- package/dist/common/json-config/__tests__/__snapshots__/stringify-schema.test.js.snap +119 -0
- package/dist/common/util/file.js +3 -6
- package/dist/common/util/file.js.map +1 -1
- package/dist/common/util/process-stream.d.ts +7 -0
- package/dist/common/util/process-stream.js +162 -0
- package/dist/common/util/process-stream.js.map +1 -0
- package/dist/common/util/saxy.js +2 -2
- package/dist/common/util/saxy.js.map +1 -1
- package/dist/common/websockets/websocket-schema.d.ts +48 -48
- package/dist/index.js +20 -2
- package/dist/utils/__tests__/__snapshots__/background-process-manager.test.js.snap +137 -0
- package/dist/utils/__tests__/file-paths.test.d.ts +1 -0
- package/dist/utils/__tests__/file-paths.test.js +37 -0
- package/dist/utils/__tests__/file-paths.test.js.map +1 -0
- package/dist/utils/__tests__/path.test.d.ts +1 -0
- package/dist/utils/__tests__/path.test.js +37 -0
- package/dist/utils/__tests__/path.test.js.map +1 -0
- package/dist/utils/__tests__/tool-renderers.test.js +12 -4
- package/dist/utils/__tests__/tool-renderers.test.js.map +1 -1
- package/dist/utils/file-paths.d.ts +9 -0
- package/dist/utils/file-paths.js +24 -0
- package/dist/utils/file-paths.js.map +1 -0
- package/dist/utils/path.d.ts +9 -0
- package/dist/utils/path.js +27 -0
- package/dist/utils/path.js.map +1 -0
- package/package.json +1 -1
- package/dist/cli-handlers/initialization-flow.d.ts +0 -1
- package/dist/cli-handlers/initialization-flow.js +0 -24
- package/dist/cli-handlers/initialization-flow.js.map +0 -1
- package/dist/cli-modules/command-processor.d.ts +0 -12
- package/dist/cli-modules/command-processor.js +0 -129
- package/dist/cli-modules/command-processor.js.map +0 -1
- package/dist/cli-modules/input-handler.d.ts +0 -20
- package/dist/cli-modules/input-handler.js +0 -98
- package/dist/cli-modules/input-handler.js.map +0 -1
- package/dist/cli-modules/readline-handler.d.ts +0 -17
- package/dist/cli-modules/readline-handler.js +0 -134
- package/dist/cli-modules/readline-handler.js.map +0 -1
- package/dist/cli-modules/signal-handler.d.ts +0 -13
- package/dist/cli-modules/signal-handler.js +0 -69
- package/dist/cli-modules/signal-handler.js.map +0 -1
- package/dist/cli-modules/types.d.ts +0 -51
- package/dist/cli-modules/types.js +0 -3
- package/dist/cli-modules/types.js.map +0 -1
- package/dist/cli-modules/websocket-handler.d.ts +0 -16
- package/dist/cli-modules/websocket-handler.js +0 -53
- package/dist/cli-modules/websocket-handler.js.map +0 -1
- package/dist/code-map/__mocks__/tree-sitter-typescript.d.ts +0 -12
- package/dist/code-map/__mocks__/tree-sitter-typescript.d.ts.map +0 -1
- package/dist/code-map/__mocks__/tree-sitter-typescript.js +0 -14
- package/dist/code-map/__mocks__/tree-sitter-typescript.js.map +0 -1
- package/dist/code-map/__mocks__/wasm-mock.d.ts +0 -2
- package/dist/code-map/__mocks__/wasm-mock.d.ts.map +0 -1
- package/dist/code-map/__mocks__/wasm-mock.js +0 -3
- package/dist/code-map/__mocks__/wasm-mock.js.map +0 -1
- package/dist/code-map/__tests__/parse.test.d.ts +0 -2
- package/dist/code-map/__tests__/parse.test.d.ts.map +0 -1
- package/dist/code-map/__tests__/parse.test.js +0 -231
- package/dist/code-map/__tests__/parse.test.js.map +0 -1
- package/dist/code-map/__tests__/test-langs/consumer.d.ts +0 -2
- package/dist/code-map/__tests__/test-langs/consumer.d.ts.map +0 -1
- package/dist/code-map/__tests__/test-langs/consumer.js +0 -6
- package/dist/code-map/__tests__/test-langs/consumer.js.map +0 -1
- package/dist/code-map/__tests__/test-langs/empty.d.ts +0 -1
- package/dist/code-map/__tests__/test-langs/empty.d.ts.map +0 -1
- package/dist/code-map/__tests__/test-langs/empty.js +0 -2
- package/dist/code-map/__tests__/test-langs/empty.js.map +0 -1
- package/dist/code-map/__tests__/test-langs/test.d.ts +0 -12
- package/dist/code-map/__tests__/test-langs/test.d.ts.map +0 -1
- package/dist/code-map/__tests__/test-langs/test.js +0 -23
- package/dist/code-map/__tests__/test-langs/test.js.map +0 -1
- package/dist/code-map/__tests__/test-langs/unused.d.ts +0 -2
- package/dist/code-map/__tests__/test-langs/unused.d.ts.map +0 -1
- package/dist/code-map/__tests__/test-langs/unused.js +0 -7
- package/dist/code-map/__tests__/test-langs/unused.js.map +0 -1
- package/dist/code-map/__tests__/test-langs/utils1.d.ts +0 -2
- package/dist/code-map/__tests__/test-langs/utils1.d.ts.map +0 -1
- package/dist/code-map/__tests__/test-langs/utils1.js +0 -7
- package/dist/code-map/__tests__/test-langs/utils1.js.map +0 -1
- package/dist/code-map/__tests__/test-langs/utils2.d.ts +0 -2
- package/dist/code-map/__tests__/test-langs/utils2.d.ts.map +0 -1
- package/dist/code-map/__tests__/test-langs/utils2.js +0 -8
- package/dist/code-map/__tests__/test-langs/utils2.js.map +0 -1
- package/dist/code-map/__tests__/tree-sitter-minimal.test.d.ts +0 -2
- package/dist/code-map/__tests__/tree-sitter-minimal.test.d.ts.map +0 -1
- package/dist/code-map/__tests__/tree-sitter-minimal.test.js +0 -79
- package/dist/code-map/__tests__/tree-sitter-minimal.test.js.map +0 -1
- package/dist/code-map/jest.config.d.ts +0 -4
- package/dist/code-map/jest.config.d.ts.map +0 -1
- package/dist/code-map/jest.config.js +0 -18
- package/dist/code-map/jest.config.js.map +0 -1
- package/dist/code-map/parse.test.d.ts +0 -2
- package/dist/code-map/parse.test.d.ts.map +0 -1
- package/dist/code-map/parse.test.js +0 -218
- package/dist/code-map/parse.test.js.map +0 -1
- package/dist/code-map/scripts/tree-sitter-test.cjs +0 -27
- package/dist/code-map/scripts/tree-sitter-test.cjs.map +0 -1
- package/dist/code-map/scripts/tree-sitter-test.d.cts +0 -2
- package/dist/code-map/scripts/tree-sitter-test.d.cts.map +0 -1
- package/dist/code-map/scripts/tree-sitter-test.d.ts +0 -2
- package/dist/code-map/scripts/tree-sitter-test.d.ts.map +0 -1
- package/dist/code-map/scripts/tree-sitter-test.js +0 -54
- package/dist/code-map/scripts/tree-sitter-test.js.map +0 -1
- package/dist/code-map/test-parser.d.ts +0 -2
- package/dist/code-map/test-parser.d.ts.map +0 -1
- package/dist/code-map/test-parser.js +0 -42
- package/dist/code-map/test-parser.js.map +0 -1
- package/dist/common/bigquery/client.d.ts +0 -15
- package/dist/common/bigquery/client.js +0 -265
- package/dist/common/bigquery/client.js.map +0 -1
- package/dist/common/bigquery/schema.d.ts +0 -55
- package/dist/common/bigquery/schema.js +0 -24
- package/dist/common/bigquery/schema.js.map +0 -1
- package/dist/common/util/file-metadata.d.ts +0 -9
- package/dist/common/util/file-metadata.js +0 -24
- package/dist/common/util/file-metadata.js.map +0 -1
package/dist/common/actions.d.ts
CHANGED
|
@@ -4,11 +4,11 @@ export declare const FileChangeSchema: z.ZodObject<{
|
|
|
4
4
|
path: z.ZodString;
|
|
5
5
|
content: z.ZodString;
|
|
6
6
|
}, "strip", z.ZodTypeAny, {
|
|
7
|
-
type: "
|
|
7
|
+
type: "patch" | "file";
|
|
8
8
|
path: string;
|
|
9
9
|
content: string;
|
|
10
10
|
}, {
|
|
11
|
-
type: "
|
|
11
|
+
type: "patch" | "file";
|
|
12
12
|
path: string;
|
|
13
13
|
content: string;
|
|
14
14
|
}>;
|
|
@@ -18,11 +18,11 @@ export declare const CHANGES: z.ZodArray<z.ZodObject<{
|
|
|
18
18
|
path: z.ZodString;
|
|
19
19
|
content: z.ZodString;
|
|
20
20
|
}, "strip", z.ZodTypeAny, {
|
|
21
|
-
type: "
|
|
21
|
+
type: "patch" | "file";
|
|
22
22
|
path: string;
|
|
23
23
|
content: string;
|
|
24
24
|
}, {
|
|
25
|
-
type: "
|
|
25
|
+
type: "patch" | "file";
|
|
26
26
|
path: string;
|
|
27
27
|
content: string;
|
|
28
28
|
}>, "many">;
|
|
@@ -928,11 +928,11 @@ export declare const ResponseCompleteSchema: z.ZodObject<z.objectUtil.extendShap
|
|
|
928
928
|
path: z.ZodString;
|
|
929
929
|
content: z.ZodString;
|
|
930
930
|
}, "strip", z.ZodTypeAny, {
|
|
931
|
-
type: "
|
|
931
|
+
type: "patch" | "file";
|
|
932
932
|
path: string;
|
|
933
933
|
content: string;
|
|
934
934
|
}, {
|
|
935
|
-
type: "
|
|
935
|
+
type: "patch" | "file";
|
|
936
936
|
path: string;
|
|
937
937
|
content: string;
|
|
938
938
|
}>, "many">;
|
|
@@ -941,11 +941,11 @@ export declare const ResponseCompleteSchema: z.ZodObject<z.objectUtil.extendShap
|
|
|
941
941
|
path: z.ZodString;
|
|
942
942
|
content: z.ZodString;
|
|
943
943
|
}, "strip", z.ZodTypeAny, {
|
|
944
|
-
type: "
|
|
944
|
+
type: "patch" | "file";
|
|
945
945
|
path: string;
|
|
946
946
|
content: string;
|
|
947
947
|
}, {
|
|
948
|
-
type: "
|
|
948
|
+
type: "patch" | "file";
|
|
949
949
|
path: string;
|
|
950
950
|
content: string;
|
|
951
951
|
}>, "many">;
|
|
@@ -971,12 +971,12 @@ export declare const ResponseCompleteSchema: z.ZodObject<z.objectUtil.extendShap
|
|
|
971
971
|
userInputId: string;
|
|
972
972
|
response: string;
|
|
973
973
|
changes: {
|
|
974
|
-
type: "
|
|
974
|
+
type: "patch" | "file";
|
|
975
975
|
path: string;
|
|
976
976
|
content: string;
|
|
977
977
|
}[];
|
|
978
978
|
changesAlreadyApplied: {
|
|
979
|
-
type: "
|
|
979
|
+
type: "patch" | "file";
|
|
980
980
|
path: string;
|
|
981
981
|
content: string;
|
|
982
982
|
}[];
|
|
@@ -995,12 +995,12 @@ export declare const ResponseCompleteSchema: z.ZodObject<z.objectUtil.extendShap
|
|
|
995
995
|
userInputId: string;
|
|
996
996
|
response: string;
|
|
997
997
|
changes: {
|
|
998
|
-
type: "
|
|
998
|
+
type: "patch" | "file";
|
|
999
999
|
path: string;
|
|
1000
1000
|
content: string;
|
|
1001
1001
|
}[];
|
|
1002
1002
|
changesAlreadyApplied: {
|
|
1003
|
-
type: "
|
|
1003
|
+
type: "patch" | "file";
|
|
1004
1004
|
path: string;
|
|
1005
1005
|
content: string;
|
|
1006
1006
|
}[];
|
|
@@ -1678,11 +1678,11 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
1678
1678
|
path: z.ZodString;
|
|
1679
1679
|
content: z.ZodString;
|
|
1680
1680
|
}, "strip", z.ZodTypeAny, {
|
|
1681
|
-
type: "
|
|
1681
|
+
type: "patch" | "file";
|
|
1682
1682
|
path: string;
|
|
1683
1683
|
content: string;
|
|
1684
1684
|
}, {
|
|
1685
|
-
type: "
|
|
1685
|
+
type: "patch" | "file";
|
|
1686
1686
|
path: string;
|
|
1687
1687
|
content: string;
|
|
1688
1688
|
}>, "many">;
|
|
@@ -1691,11 +1691,11 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
1691
1691
|
path: z.ZodString;
|
|
1692
1692
|
content: z.ZodString;
|
|
1693
1693
|
}, "strip", z.ZodTypeAny, {
|
|
1694
|
-
type: "
|
|
1694
|
+
type: "patch" | "file";
|
|
1695
1695
|
path: string;
|
|
1696
1696
|
content: string;
|
|
1697
1697
|
}, {
|
|
1698
|
-
type: "
|
|
1698
|
+
type: "patch" | "file";
|
|
1699
1699
|
path: string;
|
|
1700
1700
|
content: string;
|
|
1701
1701
|
}>, "many">;
|
|
@@ -1721,12 +1721,12 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
1721
1721
|
userInputId: string;
|
|
1722
1722
|
response: string;
|
|
1723
1723
|
changes: {
|
|
1724
|
-
type: "
|
|
1724
|
+
type: "patch" | "file";
|
|
1725
1725
|
path: string;
|
|
1726
1726
|
content: string;
|
|
1727
1727
|
}[];
|
|
1728
1728
|
changesAlreadyApplied: {
|
|
1729
|
-
type: "
|
|
1729
|
+
type: "patch" | "file";
|
|
1730
1730
|
path: string;
|
|
1731
1731
|
content: string;
|
|
1732
1732
|
}[];
|
|
@@ -1745,12 +1745,12 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
1745
1745
|
userInputId: string;
|
|
1746
1746
|
response: string;
|
|
1747
1747
|
changes: {
|
|
1748
|
-
type: "
|
|
1748
|
+
type: "patch" | "file";
|
|
1749
1749
|
path: string;
|
|
1750
1750
|
content: string;
|
|
1751
1751
|
}[];
|
|
1752
1752
|
changesAlreadyApplied: {
|
|
1753
|
-
type: "
|
|
1753
|
+
type: "patch" | "file";
|
|
1754
1754
|
path: string;
|
|
1755
1755
|
content: string;
|
|
1756
1756
|
}[];
|
|
@@ -2424,11 +2424,11 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2424
2424
|
path: z.ZodString;
|
|
2425
2425
|
content: z.ZodString;
|
|
2426
2426
|
}, "strip", z.ZodTypeAny, {
|
|
2427
|
-
type: "
|
|
2427
|
+
type: "patch" | "file";
|
|
2428
2428
|
path: string;
|
|
2429
2429
|
content: string;
|
|
2430
2430
|
}, {
|
|
2431
|
-
type: "
|
|
2431
|
+
type: "patch" | "file";
|
|
2432
2432
|
path: string;
|
|
2433
2433
|
content: string;
|
|
2434
2434
|
}>, "many">;
|
|
@@ -2437,11 +2437,11 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2437
2437
|
path: z.ZodString;
|
|
2438
2438
|
content: z.ZodString;
|
|
2439
2439
|
}, "strip", z.ZodTypeAny, {
|
|
2440
|
-
type: "
|
|
2440
|
+
type: "patch" | "file";
|
|
2441
2441
|
path: string;
|
|
2442
2442
|
content: string;
|
|
2443
2443
|
}, {
|
|
2444
|
-
type: "
|
|
2444
|
+
type: "patch" | "file";
|
|
2445
2445
|
path: string;
|
|
2446
2446
|
content: string;
|
|
2447
2447
|
}>, "many">;
|
|
@@ -2466,12 +2466,12 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2466
2466
|
userInputId: string;
|
|
2467
2467
|
response: string;
|
|
2468
2468
|
changes: {
|
|
2469
|
-
type: "
|
|
2469
|
+
type: "patch" | "file";
|
|
2470
2470
|
path: string;
|
|
2471
2471
|
content: string;
|
|
2472
2472
|
}[];
|
|
2473
2473
|
changesAlreadyApplied: {
|
|
2474
|
-
type: "
|
|
2474
|
+
type: "patch" | "file";
|
|
2475
2475
|
path: string;
|
|
2476
2476
|
content: string;
|
|
2477
2477
|
}[];
|
|
@@ -2490,12 +2490,12 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2490
2490
|
userInputId: string;
|
|
2491
2491
|
response: string;
|
|
2492
2492
|
changes: {
|
|
2493
|
-
type: "
|
|
2493
|
+
type: "patch" | "file";
|
|
2494
2494
|
path: string;
|
|
2495
2495
|
content: string;
|
|
2496
2496
|
}[];
|
|
2497
2497
|
changesAlreadyApplied: {
|
|
2498
|
-
type: "
|
|
2498
|
+
type: "patch" | "file";
|
|
2499
2499
|
path: string;
|
|
2500
2500
|
content: string;
|
|
2501
2501
|
}[];
|
|
@@ -37,7 +37,7 @@ export type UserState = (typeof UserState)[keyof typeof UserState];
|
|
|
37
37
|
export declare function getUserState(isLoggedIn: boolean, credits: number): UserState;
|
|
38
38
|
export declare const costModes: readonly ["lite", "normal", "max", "experimental"];
|
|
39
39
|
export type CostMode = (typeof costModes)[number];
|
|
40
|
-
export declare const getModelForMode: (costMode: CostMode, operation: "agent" | "file-requests" | "check-new-files") => "claude-3-5-sonnet-20241022" | "claude-3-5-haiku-20241022" | "gemini-2.5-
|
|
40
|
+
export declare const getModelForMode: (costMode: CostMode, operation: "agent" | "file-requests" | "check-new-files") => "claude-3-5-sonnet-20241022" | "claude-3-5-haiku-20241022" | "gpt-4o-2024-11-20" | "gpt-4o-mini-2024-07-18" | "gemini-2.5-flash-preview-04-17:thinking" | "gemini-2.5-pro-preview-05-06";
|
|
41
41
|
export declare const claudeModels: {
|
|
42
42
|
readonly sonnet: "claude-3-5-sonnet-20241022";
|
|
43
43
|
readonly sonnet3_7: "claude-3-7-sonnet-20250219";
|
|
@@ -59,7 +59,7 @@ export declare const geminiModels: {
|
|
|
59
59
|
readonly gemini2_5_flash_thinking: "gemini-2.5-flash-preview-04-17:thinking";
|
|
60
60
|
readonly gemini2flash: "gemini-2.0-flash-001";
|
|
61
61
|
readonly gemini2_5_pro_exp: "gemini-2.5-pro-exp-03-25";
|
|
62
|
-
readonly gemini2_5_pro_preview: "gemini-2.5-pro-preview-
|
|
62
|
+
readonly gemini2_5_pro_preview: "gemini-2.5-pro-preview-05-06";
|
|
63
63
|
};
|
|
64
64
|
export type GeminiModel = (typeof geminiModels)[keyof typeof geminiModels];
|
|
65
65
|
export declare const openrouterModels: {
|
|
@@ -92,7 +92,7 @@ export declare const models: {
|
|
|
92
92
|
readonly gemini2_5_flash_thinking: "gemini-2.5-flash-preview-04-17:thinking";
|
|
93
93
|
readonly gemini2flash: "gemini-2.0-flash-001";
|
|
94
94
|
readonly gemini2_5_pro_exp: "gemini-2.5-pro-exp-03-25";
|
|
95
|
-
readonly gemini2_5_pro_preview: "gemini-2.5-pro-preview-
|
|
95
|
+
readonly gemini2_5_pro_preview: "gemini-2.5-pro-preview-05-06";
|
|
96
96
|
readonly gpt4_1: "gpt-4.1-2025-04-14";
|
|
97
97
|
readonly gpt4o: "gpt-4o-2024-11-20";
|
|
98
98
|
readonly gpt4omini: "gpt-4o-mini-2024-07-18";
|
|
@@ -105,7 +105,7 @@ export declare const models: {
|
|
|
105
105
|
readonly haiku: "claude-3-5-haiku-20241022";
|
|
106
106
|
};
|
|
107
107
|
export declare const shortModelNames: {
|
|
108
|
-
'gemini-2.5-pro': "gemini-2.5-pro-preview-
|
|
108
|
+
'gemini-2.5-pro': "gemini-2.5-pro-preview-05-06";
|
|
109
109
|
'sonnet-3.7': "claude-3-7-sonnet-20250219";
|
|
110
110
|
'sonnet-3.5': "claude-3-5-sonnet-20241022";
|
|
111
111
|
'sonnet-3.6': "claude-3-5-sonnet-20241022";
|
|
@@ -115,7 +115,7 @@ export declare const shortModelNames: {
|
|
|
115
115
|
'o4-mini': "o4-mini-2025-04-16";
|
|
116
116
|
};
|
|
117
117
|
export declare const providerModelNames: {
|
|
118
|
-
"gemini-2.5-pro-preview-
|
|
118
|
+
"gemini-2.5-pro-preview-05-06": string;
|
|
119
119
|
"gemini-2.5-pro-exp-03-25": string;
|
|
120
120
|
"gemini-2.0-flash-001": string;
|
|
121
121
|
"gemini-2.5-flash-preview-04-17": string;
|
package/dist/common/constants.js
CHANGED
|
@@ -92,23 +92,23 @@ exports.costModes = ['lite', 'normal', 'max', 'experimental'];
|
|
|
92
92
|
const getModelForMode = (costMode, operation) => {
|
|
93
93
|
if (operation === 'agent') {
|
|
94
94
|
return {
|
|
95
|
-
lite: exports.
|
|
96
|
-
normal: exports.
|
|
97
|
-
max: exports.
|
|
98
|
-
experimental: exports.
|
|
95
|
+
lite: exports.models.gemini2_5_flash_thinking,
|
|
96
|
+
normal: exports.models.sonnet,
|
|
97
|
+
max: exports.models.sonnet,
|
|
98
|
+
experimental: exports.models.gemini2_5_pro_preview,
|
|
99
99
|
}[costMode];
|
|
100
100
|
}
|
|
101
101
|
if (operation === 'file-requests') {
|
|
102
102
|
return {
|
|
103
103
|
lite: exports.claudeModels.haiku,
|
|
104
|
-
normal: exports.claudeModels.
|
|
104
|
+
normal: exports.claudeModels.haiku,
|
|
105
105
|
max: exports.claudeModels.sonnet,
|
|
106
106
|
experimental: exports.claudeModels.sonnet,
|
|
107
107
|
}[costMode];
|
|
108
108
|
}
|
|
109
109
|
if (operation === 'check-new-files') {
|
|
110
110
|
return {
|
|
111
|
-
lite: exports.models.
|
|
111
|
+
lite: exports.models.gpt4omini,
|
|
112
112
|
normal: exports.models.gpt4o,
|
|
113
113
|
max: exports.models.gpt4o,
|
|
114
114
|
experimental: exports.models.gpt4o,
|
|
@@ -136,7 +136,7 @@ exports.geminiModels = {
|
|
|
136
136
|
gemini2_5_flash_thinking: 'gemini-2.5-flash-preview-04-17:thinking',
|
|
137
137
|
gemini2flash: 'gemini-2.0-flash-001',
|
|
138
138
|
gemini2_5_pro_exp: 'gemini-2.5-pro-exp-03-25',
|
|
139
|
-
gemini2_5_pro_preview: 'gemini-2.5-pro-preview-
|
|
139
|
+
gemini2_5_pro_preview: 'gemini-2.5-pro-preview-05-06',
|
|
140
140
|
};
|
|
141
141
|
exports.openrouterModels = {
|
|
142
142
|
openrouter_gemini2_5_pro_exp: 'google/gemini-2.5-pro-exp-03-25:free',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":";;;AAsDA,wCAKC;AA4BD,oCAOC;AA9FY,QAAA,WAAW,GAAG,GAAG,GAAG,MAAM,CAAA;AAC1B,QAAA,iBAAiB,GAAG,GAAG,GAAG,oBAAoB,CAAA;AAC9C,QAAA,oBAAoB,GAAG,oCAAoC,CAAA;AAE3D,QAAA,qBAAqB,GAAG;IACnC,MAAM;IACN,MAAM;IACN,QAAQ;IACR,KAAK;IACL,KAAK;IACL,SAAS;IACT,cAAc;IACd,MAAM;IACN,YAAY;IACZ,OAAO;IACP,aAAa;IACb,aAAa;IACb,aAAa;IACb,OAAO;IACP,WAAW;IACX,eAAe;IACf,aAAa;IACb,aAAa;IACb,OAAO;IACP,mBAAmB;IACnB,WAAW;CACZ,CAAA;AAED,iEAAiE;AACpD,QAAA,YAAY,GAAG,cAAc,CAAA;AAC7B,QAAA,iBAAiB,GAAG,mBAAmB,CAAA;AACvC,QAAA,a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[`stringifySchema should correctly stringify StartupProcessSchema 1`] = `
|
|
4
|
+
"// Defines a single startup process.
|
|
5
|
+
{
|
|
6
|
+
// A user-friendly name for the process. Should be one word and unique.
|
|
7
|
+
"name": string,
|
|
8
|
+
|
|
9
|
+
// The actual shell command to execute.
|
|
10
|
+
"command": string,
|
|
11
|
+
|
|
12
|
+
// (optional): The working directory from which to run the command.
|
|
13
|
+
"cwd": string | undefined,
|
|
14
|
+
|
|
15
|
+
// (optional): Whether this process should be run, default: true
|
|
16
|
+
"enabled": boolean | undefined,
|
|
17
|
+
|
|
18
|
+
// (optional): Path to write the process's stdout. If not specified, stderr is not stored.
|
|
19
|
+
"stdoutFile": string | undefined,
|
|
20
|
+
|
|
21
|
+
// (optional): Path to write the process's stderr. If not specified, stderr will be put into the stdoutFile.
|
|
22
|
+
"stderrFile": string | undefined
|
|
23
|
+
}"
|
|
24
|
+
`;
|
|
25
|
+
|
|
26
|
+
exports[`stringifySchema should correctly stringify CodebuffConfigSchema 1`] = `
|
|
27
|
+
"// Defines the overall Codebuff configuration file (e.g., codebuff.json). This schema defines the top-level structure of the configuration.
|
|
28
|
+
{
|
|
29
|
+
// (optional): Does nothing. Put any thing you want here!
|
|
30
|
+
"description": any | undefined,
|
|
31
|
+
|
|
32
|
+
// (optional): An array of startup processes.
|
|
33
|
+
"startupProcesses": [
|
|
34
|
+
|
|
35
|
+
// Defines a single startup process.
|
|
36
|
+
{
|
|
37
|
+
// A user-friendly name for the process. Should be one word and unique.
|
|
38
|
+
"name": string,
|
|
39
|
+
|
|
40
|
+
// The actual shell command to execute.
|
|
41
|
+
"command": string,
|
|
42
|
+
|
|
43
|
+
// (optional): The working directory from which to run the command.
|
|
44
|
+
"cwd": string | undefined,
|
|
45
|
+
|
|
46
|
+
// (optional): Whether this process should be run, default: true
|
|
47
|
+
"enabled": boolean | undefined,
|
|
48
|
+
|
|
49
|
+
// (optional): Path to write the process's stdout. If not specified, stderr is not stored.
|
|
50
|
+
"stdoutFile": string | undefined,
|
|
51
|
+
|
|
52
|
+
// (optional): Path to write the process's stderr. If not specified, stderr will be put into the stdoutFile.
|
|
53
|
+
"stderrFile": string | undefined
|
|
54
|
+
}
|
|
55
|
+
] | undefined
|
|
56
|
+
}"
|
|
57
|
+
`;
|
|
58
|
+
|
|
59
|
+
exports[`stringifySchema should handle a more complex schema 1`] = `
|
|
60
|
+
"// A complex test schema
|
|
61
|
+
{
|
|
62
|
+
// Unique identifier
|
|
63
|
+
"id": string,
|
|
64
|
+
|
|
65
|
+
// A positive integer count
|
|
66
|
+
"count": number,
|
|
67
|
+
|
|
68
|
+
// Activity status
|
|
69
|
+
"isActive": boolean,
|
|
70
|
+
|
|
71
|
+
// (optional): Optional list of tags
|
|
72
|
+
"tags": [
|
|
73
|
+
|
|
74
|
+
string
|
|
75
|
+
] | undefined,
|
|
76
|
+
|
|
77
|
+
// A nested object structure
|
|
78
|
+
"nested": {
|
|
79
|
+
"value": string,
|
|
80
|
+
|
|
81
|
+
// Nested configuration
|
|
82
|
+
"config": {
|
|
83
|
+
// (optional): Number of retries, default: 3
|
|
84
|
+
"retries": number
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}"
|
|
88
|
+
`;
|
|
89
|
+
|
|
90
|
+
exports[`stringifySchema should handle an empty object schema 1`] = `
|
|
91
|
+
"// An empty schema
|
|
92
|
+
{
|
|
93
|
+
}"
|
|
94
|
+
`;
|
|
95
|
+
|
|
96
|
+
exports[`stringifySchema should handle schema with only optional fields 1`] = `
|
|
97
|
+
"// Schema with only optional fields
|
|
98
|
+
{
|
|
99
|
+
// (optional): Optional field 1
|
|
100
|
+
"field1": string | undefined,
|
|
101
|
+
|
|
102
|
+
// (optional): Optional field 2
|
|
103
|
+
"field2": number | undefined
|
|
104
|
+
}"
|
|
105
|
+
`;
|
|
106
|
+
|
|
107
|
+
exports[`stringifySchema should handle schema with default values 1`] = `
|
|
108
|
+
"// Schema demonstrating default values
|
|
109
|
+
{
|
|
110
|
+
// (optional): Name with default, default: "anonymous"
|
|
111
|
+
"name": string,
|
|
112
|
+
|
|
113
|
+
// (optional): Level with default, default: 1
|
|
114
|
+
"level": number,
|
|
115
|
+
|
|
116
|
+
// (optional): Enabled with default, default: false
|
|
117
|
+
"enabled": boolean
|
|
118
|
+
}"
|
|
119
|
+
`;
|
package/dist/common/util/file.js
CHANGED
|
@@ -68,13 +68,10 @@ exports.ProjectFileContextSchema = zod_1.z.object({
|
|
|
68
68
|
});
|
|
69
69
|
const createWriteFileBlock = (filePath, content) => {
|
|
70
70
|
const tagName = 'write_file';
|
|
71
|
-
return
|
|
72
|
-
`${tagName}>
|
|
71
|
+
return `<${tagName}>
|
|
73
72
|
<path>${filePath}</path>
|
|
74
|
-
<content>
|
|
75
|
-
|
|
76
|
-
</content>
|
|
77
|
-
</${tagName}>`);
|
|
73
|
+
<content>${content}</content>
|
|
74
|
+
</${tagName}>`;
|
|
78
75
|
};
|
|
79
76
|
exports.createWriteFileBlock = createWriteFileBlock;
|
|
80
77
|
exports.fileRegex = /<write_file>\s*<path>([^<]+)<\/path>\s*<content>([\s\S]*?)<\/content>\s*<\/write_file>/g;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file.js","sourceRoot":"","sources":["../../src/util/file.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"file.js","sourceRoot":"","sources":["../../src/util/file.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAyGA,sCAaC;AAED,0DAmCC;AAoCD,0CAWC;AA1MD,uCAAwB;AACxB,6BAAuB;AAEV,QAAA,kBAAkB,GAA4B,OAAC,CAAC,MAAM,CAAC;IAClE,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;IAChB,IAAI,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IACnC,QAAQ,EAAE,OAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC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AqC,CAAC;QACxE,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,sBAAsB,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC;QACnE,CAAC,CAAC,OAAO,CAAA;IACX,OAAO,aAAa,CAAA;AACtB,CAAC,CAAA;AALY,QAAA,sBAAsB,0BAKlC;AAED,SAAgB,eAAe,CAAC,IAAY;IAC1C,IAAI,CAAC,IAAI;QAAE,OAAO,KAAK,CAAA;IAEvB,uBAAuB;IACvB,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;QAAE,OAAO,KAAK,CAAA;IAEjC,+BAA+B;IAC/B,MAAM,YAAY,GAAG,qBAAqB,CAAA;IAC1C,IAAI,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC;QAAE,OAAO,KAAK,CAAA;IAEzC,OAAO,IAAI,CAAA;AACb,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare function processStreamWithTags<T extends string>(stream: AsyncGenerator<T>, tags: {
|
|
2
|
+
[tagName: string]: {
|
|
3
|
+
attributeNames: string[];
|
|
4
|
+
onTagStart: (attributes: Record<string, string>) => void;
|
|
5
|
+
onTagEnd: (content: string, attributes: Record<string, string>) => boolean;
|
|
6
|
+
};
|
|
7
|
+
}): AsyncGenerator<string, void, unknown>;
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.processStreamWithTags = processStreamWithTags;
|
|
4
|
+
const saxy_1 = require("./saxy");
|
|
5
|
+
async function* processStreamWithTags(stream, tags) {
|
|
6
|
+
const saxyParser = new saxy_1.Saxy();
|
|
7
|
+
let currentTagName = null;
|
|
8
|
+
let currentTagAttributes = {};
|
|
9
|
+
let currentTagContentBuffer = '';
|
|
10
|
+
let shouldStopProcessing = false;
|
|
11
|
+
const outputQueue = [];
|
|
12
|
+
const enqueueOutput = (str) => {
|
|
13
|
+
if (str) {
|
|
14
|
+
// Only enqueue non-empty strings
|
|
15
|
+
outputQueue.push(str);
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
saxyParser.on('tagopen', (node) => {
|
|
19
|
+
if (shouldStopProcessing)
|
|
20
|
+
return;
|
|
21
|
+
if (currentTagName === null) {
|
|
22
|
+
// Not currently inside a tracked tag
|
|
23
|
+
if (tags[node.name]) {
|
|
24
|
+
// This is a tag we want to track
|
|
25
|
+
currentTagName = node.name;
|
|
26
|
+
try {
|
|
27
|
+
currentTagAttributes = saxy_1.Saxy.parseAttrs(node.attrs);
|
|
28
|
+
}
|
|
29
|
+
catch (e) {
|
|
30
|
+
// If attributes are malformed, default to empty or handle as error
|
|
31
|
+
// console.error(`Error parsing attributes for tag ${node.name}: "${node.attrs}"`, e);
|
|
32
|
+
currentTagAttributes = {}; // Default to empty attributes on parsing error
|
|
33
|
+
}
|
|
34
|
+
tags[currentTagName].onTagStart(currentTagAttributes);
|
|
35
|
+
currentTagContentBuffer = '';
|
|
36
|
+
if (node.isSelfClosing) {
|
|
37
|
+
const stop = tags[currentTagName].onTagEnd(currentTagContentBuffer, currentTagAttributes);
|
|
38
|
+
currentTagName = null;
|
|
39
|
+
currentTagAttributes = {};
|
|
40
|
+
if (stop) {
|
|
41
|
+
shouldStopProcessing = true;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
// A non-tracked tag, pass it through
|
|
47
|
+
enqueueOutput(`<${node.name}${node.attrs ? ' ' + node.attrs : ''}${node.isSelfClosing ? ' /' : ''}>`);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
// Inside a tracked tag, so this is nested content
|
|
52
|
+
currentTagContentBuffer += `<${node.name}${node.attrs ? ' ' + node.attrs : ''}${node.isSelfClosing ? ' /' : ''}>`;
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
saxyParser.on('text', (node) => {
|
|
56
|
+
if (shouldStopProcessing)
|
|
57
|
+
return;
|
|
58
|
+
if (currentTagName !== null) {
|
|
59
|
+
currentTagContentBuffer += node.contents;
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
enqueueOutput(node.contents);
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
saxyParser.on('tagclose', (node) => {
|
|
66
|
+
if (shouldStopProcessing)
|
|
67
|
+
return;
|
|
68
|
+
if (currentTagName === node.name) {
|
|
69
|
+
const stop = tags[currentTagName].onTagEnd(currentTagContentBuffer, currentTagAttributes);
|
|
70
|
+
currentTagName = null;
|
|
71
|
+
currentTagAttributes = {};
|
|
72
|
+
currentTagContentBuffer = '';
|
|
73
|
+
if (stop) {
|
|
74
|
+
shouldStopProcessing = true;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
else if (currentTagName !== null) {
|
|
78
|
+
// Closing a nested tag inside a tracked tag
|
|
79
|
+
currentTagContentBuffer += `</${node.name}>`;
|
|
80
|
+
}
|
|
81
|
+
else {
|
|
82
|
+
// Closing a non-tracked tag, pass it through
|
|
83
|
+
enqueueOutput(`</${node.name}>`);
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
saxyParser.on('cdata', (node) => {
|
|
87
|
+
if (shouldStopProcessing)
|
|
88
|
+
return;
|
|
89
|
+
const cdataStr = `<![CDATA[${node.contents}]]>`;
|
|
90
|
+
if (currentTagName !== null) {
|
|
91
|
+
currentTagContentBuffer += cdataStr;
|
|
92
|
+
}
|
|
93
|
+
else {
|
|
94
|
+
enqueueOutput(cdataStr);
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
saxyParser.on('comment', (node) => {
|
|
98
|
+
if (shouldStopProcessing)
|
|
99
|
+
return;
|
|
100
|
+
const commentStr = `<!--${node.contents}-->`;
|
|
101
|
+
if (currentTagName !== null) {
|
|
102
|
+
currentTagContentBuffer += commentStr;
|
|
103
|
+
}
|
|
104
|
+
else {
|
|
105
|
+
enqueueOutput(commentStr);
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
saxyParser.on('processinginstruction', (node) => {
|
|
109
|
+
if (shouldStopProcessing)
|
|
110
|
+
return;
|
|
111
|
+
const piStr = `<?${node.contents}?>`;
|
|
112
|
+
if (currentTagName !== null) {
|
|
113
|
+
currentTagContentBuffer += piStr;
|
|
114
|
+
}
|
|
115
|
+
else {
|
|
116
|
+
enqueueOutput(piStr);
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
saxyParser.on('error', (err) => {
|
|
120
|
+
// Saxy might emit 'error' for issues not causing write/end to throw.
|
|
121
|
+
// This flag helps stop processing in such cases.
|
|
122
|
+
// console.error("Saxy parser emitted an error:", err);
|
|
123
|
+
shouldStopProcessing = true;
|
|
124
|
+
// The error might need to be explicitly thrown here if it's critical
|
|
125
|
+
// and not otherwise surfaced to the generator's caller.
|
|
126
|
+
// For now, this ensures processing stops.
|
|
127
|
+
});
|
|
128
|
+
try {
|
|
129
|
+
for await (const chunk of stream) {
|
|
130
|
+
if (shouldStopProcessing)
|
|
131
|
+
break;
|
|
132
|
+
saxyParser.write(chunk); // Saxy events fill outputQueue
|
|
133
|
+
while (outputQueue.length > 0) {
|
|
134
|
+
// If stopping and not inside a tracked tag, clear queue to prevent further passthrough.
|
|
135
|
+
if (shouldStopProcessing && currentTagName === null) {
|
|
136
|
+
outputQueue.length = 0;
|
|
137
|
+
break;
|
|
138
|
+
}
|
|
139
|
+
yield outputQueue.shift();
|
|
140
|
+
}
|
|
141
|
+
// Re-check stop condition after yielding, as an event during write might have set it.
|
|
142
|
+
if (shouldStopProcessing)
|
|
143
|
+
break;
|
|
144
|
+
}
|
|
145
|
+
if (!shouldStopProcessing) {
|
|
146
|
+
saxyParser.end(); // Finalize parsing
|
|
147
|
+
while (outputQueue.length > 0) {
|
|
148
|
+
if (shouldStopProcessing && currentTagName === null) {
|
|
149
|
+
outputQueue.length = 0;
|
|
150
|
+
break;
|
|
151
|
+
}
|
|
152
|
+
yield outputQueue.shift();
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
catch (error) {
|
|
157
|
+
// Catches errors from saxyParser.write() or saxyParser.end()
|
|
158
|
+
// console.error("Error during Saxy stream processing in generator:", error);
|
|
159
|
+
throw error; // Propagate error to the caller
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
//# sourceMappingURL=process-stream.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"process-stream.js","sourceRoot":"","sources":["../../src/util/process-stream.ts"],"names":[],"mappings":";;AAUA,sDAkLC;AA5LD,iCAQe;AAER,KAAK,SAAS,CAAC,CAAC,qBAAqB,CAC1C,MAAyB,EACzB,IAOC;IAED,MAAM,UAAU,GAAG,IAAI,WAAI,EAAE,CAAA;IAC7B,IAAI,cAAc,GAAkB,IAAI,CAAA;IACxC,IAAI,oBAAoB,GAA2B,EAAE,CAAA;IACrD,IAAI,uBAAuB,GAAW,EAAE,CAAA;IACxC,IAAI,oBAAoB,GAAG,KAAK,CAAA;IAEhC,MAAM,WAAW,GAAa,EAAE,CAAA;IAEhC,MAAM,aAAa,GAAG,CAAC,GAAW,EAAE,EAAE;QACpC,IAAI,GAAG,EAAE,CAAC;YACR,iCAAiC;YACjC,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;QACvB,CAAC;IACH,CAAC,CAAA;IAED,UAAU,CAAC,EAAE,CAAC,SAAS,EAAE,CAAC,IAAiB,EAAE,EAAE;QAC7C,IAAI,oBAAoB;YAAE,OAAM;QAEhC,IAAI,cAAc,KAAK,IAAI,EAAE,CAAC;YAC5B,qCAAqC;YACrC,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;gBACpB,iCAAiC;gBACjC,cAAc,GAAG,IAAI,CAAC,IAAI,CAAA;gBAC1B,IAAI,CAAC;oBACH,oBAAoB,GAAG,WAAI,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,CAGhD,CAAA;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