codebuff 1.0.275 → 1.0.276
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/__tests__/saxy.test.js +31 -0
- package/dist/common/util/__tests__/saxy.test.js.map +1 -1
- 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.d.ts +8 -2
- package/dist/common/util/saxy.js +34 -10
- package/dist/common/util/saxy.js.map +1 -1
- package/dist/common/websockets/websocket-schema.d.ts +48 -48
- package/dist/index.js +14 -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/dist/utils/xml-stream-parser.js +1 -1
- package/dist/utils/xml-stream-parser.js.map +1 -1
- 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
|
@@ -2307,11 +2307,11 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
2307
2307
|
path: z.ZodString;
|
|
2308
2308
|
content: z.ZodString;
|
|
2309
2309
|
}, "strip", z.ZodTypeAny, {
|
|
2310
|
-
type: "
|
|
2310
|
+
type: "patch" | "file";
|
|
2311
2311
|
path: string;
|
|
2312
2312
|
content: string;
|
|
2313
2313
|
}, {
|
|
2314
|
-
type: "
|
|
2314
|
+
type: "patch" | "file";
|
|
2315
2315
|
path: string;
|
|
2316
2316
|
content: string;
|
|
2317
2317
|
}>, "many">;
|
|
@@ -2320,11 +2320,11 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
2320
2320
|
path: z.ZodString;
|
|
2321
2321
|
content: z.ZodString;
|
|
2322
2322
|
}, "strip", z.ZodTypeAny, {
|
|
2323
|
-
type: "
|
|
2323
|
+
type: "patch" | "file";
|
|
2324
2324
|
path: string;
|
|
2325
2325
|
content: string;
|
|
2326
2326
|
}, {
|
|
2327
|
-
type: "
|
|
2327
|
+
type: "patch" | "file";
|
|
2328
2328
|
path: string;
|
|
2329
2329
|
content: string;
|
|
2330
2330
|
}>, "many">;
|
|
@@ -2350,12 +2350,12 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
2350
2350
|
userInputId: string;
|
|
2351
2351
|
response: string;
|
|
2352
2352
|
changes: {
|
|
2353
|
-
type: "
|
|
2353
|
+
type: "patch" | "file";
|
|
2354
2354
|
path: string;
|
|
2355
2355
|
content: string;
|
|
2356
2356
|
}[];
|
|
2357
2357
|
changesAlreadyApplied: {
|
|
2358
|
-
type: "
|
|
2358
|
+
type: "patch" | "file";
|
|
2359
2359
|
path: string;
|
|
2360
2360
|
content: string;
|
|
2361
2361
|
}[];
|
|
@@ -2374,12 +2374,12 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
2374
2374
|
userInputId: string;
|
|
2375
2375
|
response: string;
|
|
2376
2376
|
changes: {
|
|
2377
|
-
type: "
|
|
2377
|
+
type: "patch" | "file";
|
|
2378
2378
|
path: string;
|
|
2379
2379
|
content: string;
|
|
2380
2380
|
}[];
|
|
2381
2381
|
changesAlreadyApplied: {
|
|
2382
|
-
type: "
|
|
2382
|
+
type: "patch" | "file";
|
|
2383
2383
|
path: string;
|
|
2384
2384
|
content: string;
|
|
2385
2385
|
}[];
|
|
@@ -3053,11 +3053,11 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
3053
3053
|
path: z.ZodString;
|
|
3054
3054
|
content: z.ZodString;
|
|
3055
3055
|
}, "strip", z.ZodTypeAny, {
|
|
3056
|
-
type: "
|
|
3056
|
+
type: "patch" | "file";
|
|
3057
3057
|
path: string;
|
|
3058
3058
|
content: string;
|
|
3059
3059
|
}, {
|
|
3060
|
-
type: "
|
|
3060
|
+
type: "patch" | "file";
|
|
3061
3061
|
path: string;
|
|
3062
3062
|
content: string;
|
|
3063
3063
|
}>, "many">;
|
|
@@ -3066,11 +3066,11 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
3066
3066
|
path: z.ZodString;
|
|
3067
3067
|
content: z.ZodString;
|
|
3068
3068
|
}, "strip", z.ZodTypeAny, {
|
|
3069
|
-
type: "
|
|
3069
|
+
type: "patch" | "file";
|
|
3070
3070
|
path: string;
|
|
3071
3071
|
content: string;
|
|
3072
3072
|
}, {
|
|
3073
|
-
type: "
|
|
3073
|
+
type: "patch" | "file";
|
|
3074
3074
|
path: string;
|
|
3075
3075
|
content: string;
|
|
3076
3076
|
}>, "many">;
|
|
@@ -3095,12 +3095,12 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
3095
3095
|
userInputId: string;
|
|
3096
3096
|
response: string;
|
|
3097
3097
|
changes: {
|
|
3098
|
-
type: "
|
|
3098
|
+
type: "patch" | "file";
|
|
3099
3099
|
path: string;
|
|
3100
3100
|
content: string;
|
|
3101
3101
|
}[];
|
|
3102
3102
|
changesAlreadyApplied: {
|
|
3103
|
-
type: "
|
|
3103
|
+
type: "patch" | "file";
|
|
3104
3104
|
path: string;
|
|
3105
3105
|
content: string;
|
|
3106
3106
|
}[];
|
|
@@ -3119,12 +3119,12 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
3119
3119
|
userInputId: string;
|
|
3120
3120
|
response: string;
|
|
3121
3121
|
changes: {
|
|
3122
|
-
type: "
|
|
3122
|
+
type: "patch" | "file";
|
|
3123
3123
|
path: string;
|
|
3124
3124
|
content: string;
|
|
3125
3125
|
}[];
|
|
3126
3126
|
changesAlreadyApplied: {
|
|
3127
|
-
type: "
|
|
3127
|
+
type: "patch" | "file";
|
|
3128
3128
|
path: string;
|
|
3129
3129
|
content: string;
|
|
3130
3130
|
}[];
|
|
@@ -3265,12 +3265,12 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
3265
3265
|
userInputId: string;
|
|
3266
3266
|
response: string;
|
|
3267
3267
|
changes: {
|
|
3268
|
-
type: "
|
|
3268
|
+
type: "patch" | "file";
|
|
3269
3269
|
path: string;
|
|
3270
3270
|
content: string;
|
|
3271
3271
|
}[];
|
|
3272
3272
|
changesAlreadyApplied: {
|
|
3273
|
-
type: "
|
|
3273
|
+
type: "patch" | "file";
|
|
3274
3274
|
path: string;
|
|
3275
3275
|
content: string;
|
|
3276
3276
|
}[];
|
|
@@ -3386,12 +3386,12 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
3386
3386
|
userInputId: string;
|
|
3387
3387
|
response: string;
|
|
3388
3388
|
changes: {
|
|
3389
|
-
type: "
|
|
3389
|
+
type: "patch" | "file";
|
|
3390
3390
|
path: string;
|
|
3391
3391
|
content: string;
|
|
3392
3392
|
}[];
|
|
3393
3393
|
changesAlreadyApplied: {
|
|
3394
|
-
type: "
|
|
3394
|
+
type: "patch" | "file";
|
|
3395
3395
|
path: string;
|
|
3396
3396
|
content: string;
|
|
3397
3397
|
}[];
|
|
@@ -3440,12 +3440,12 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
3440
3440
|
userInputId: string;
|
|
3441
3441
|
response: string;
|
|
3442
3442
|
changes: {
|
|
3443
|
-
type: "
|
|
3443
|
+
type: "patch" | "file";
|
|
3444
3444
|
path: string;
|
|
3445
3445
|
content: string;
|
|
3446
3446
|
}[];
|
|
3447
3447
|
changesAlreadyApplied: {
|
|
3448
|
-
type: "
|
|
3448
|
+
type: "patch" | "file";
|
|
3449
3449
|
path: string;
|
|
3450
3450
|
content: string;
|
|
3451
3451
|
}[];
|
|
@@ -3561,12 +3561,12 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
3561
3561
|
userInputId: string;
|
|
3562
3562
|
response: string;
|
|
3563
3563
|
changes: {
|
|
3564
|
-
type: "
|
|
3564
|
+
type: "patch" | "file";
|
|
3565
3565
|
path: string;
|
|
3566
3566
|
content: string;
|
|
3567
3567
|
}[];
|
|
3568
3568
|
changesAlreadyApplied: {
|
|
3569
|
-
type: "
|
|
3569
|
+
type: "patch" | "file";
|
|
3570
3570
|
path: string;
|
|
3571
3571
|
content: string;
|
|
3572
3572
|
}[];
|
|
@@ -3634,11 +3634,11 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
3634
3634
|
path: z.ZodString;
|
|
3635
3635
|
content: z.ZodString;
|
|
3636
3636
|
}, "strip", z.ZodTypeAny, {
|
|
3637
|
-
type: "
|
|
3637
|
+
type: "patch" | "file";
|
|
3638
3638
|
path: string;
|
|
3639
3639
|
content: string;
|
|
3640
3640
|
}, {
|
|
3641
|
-
type: "
|
|
3641
|
+
type: "patch" | "file";
|
|
3642
3642
|
path: string;
|
|
3643
3643
|
content: string;
|
|
3644
3644
|
}>, "many">;
|
|
@@ -3647,11 +3647,11 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
3647
3647
|
path: z.ZodString;
|
|
3648
3648
|
content: z.ZodString;
|
|
3649
3649
|
}, "strip", z.ZodTypeAny, {
|
|
3650
|
-
type: "
|
|
3650
|
+
type: "patch" | "file";
|
|
3651
3651
|
path: string;
|
|
3652
3652
|
content: string;
|
|
3653
3653
|
}, {
|
|
3654
|
-
type: "
|
|
3654
|
+
type: "patch" | "file";
|
|
3655
3655
|
path: string;
|
|
3656
3656
|
content: string;
|
|
3657
3657
|
}>, "many">;
|
|
@@ -3677,12 +3677,12 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
3677
3677
|
userInputId: string;
|
|
3678
3678
|
response: string;
|
|
3679
3679
|
changes: {
|
|
3680
|
-
type: "
|
|
3680
|
+
type: "patch" | "file";
|
|
3681
3681
|
path: string;
|
|
3682
3682
|
content: string;
|
|
3683
3683
|
}[];
|
|
3684
3684
|
changesAlreadyApplied: {
|
|
3685
|
-
type: "
|
|
3685
|
+
type: "patch" | "file";
|
|
3686
3686
|
path: string;
|
|
3687
3687
|
content: string;
|
|
3688
3688
|
}[];
|
|
@@ -3701,12 +3701,12 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
3701
3701
|
userInputId: string;
|
|
3702
3702
|
response: string;
|
|
3703
3703
|
changes: {
|
|
3704
|
-
type: "
|
|
3704
|
+
type: "patch" | "file";
|
|
3705
3705
|
path: string;
|
|
3706
3706
|
content: string;
|
|
3707
3707
|
}[];
|
|
3708
3708
|
changesAlreadyApplied: {
|
|
3709
|
-
type: "
|
|
3709
|
+
type: "patch" | "file";
|
|
3710
3710
|
path: string;
|
|
3711
3711
|
content: string;
|
|
3712
3712
|
}[];
|
|
@@ -4380,11 +4380,11 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
4380
4380
|
path: z.ZodString;
|
|
4381
4381
|
content: z.ZodString;
|
|
4382
4382
|
}, "strip", z.ZodTypeAny, {
|
|
4383
|
-
type: "
|
|
4383
|
+
type: "patch" | "file";
|
|
4384
4384
|
path: string;
|
|
4385
4385
|
content: string;
|
|
4386
4386
|
}, {
|
|
4387
|
-
type: "
|
|
4387
|
+
type: "patch" | "file";
|
|
4388
4388
|
path: string;
|
|
4389
4389
|
content: string;
|
|
4390
4390
|
}>, "many">;
|
|
@@ -4393,11 +4393,11 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
4393
4393
|
path: z.ZodString;
|
|
4394
4394
|
content: z.ZodString;
|
|
4395
4395
|
}, "strip", z.ZodTypeAny, {
|
|
4396
|
-
type: "
|
|
4396
|
+
type: "patch" | "file";
|
|
4397
4397
|
path: string;
|
|
4398
4398
|
content: string;
|
|
4399
4399
|
}, {
|
|
4400
|
-
type: "
|
|
4400
|
+
type: "patch" | "file";
|
|
4401
4401
|
path: string;
|
|
4402
4402
|
content: string;
|
|
4403
4403
|
}>, "many">;
|
|
@@ -4422,12 +4422,12 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
4422
4422
|
userInputId: string;
|
|
4423
4423
|
response: string;
|
|
4424
4424
|
changes: {
|
|
4425
|
-
type: "
|
|
4425
|
+
type: "patch" | "file";
|
|
4426
4426
|
path: string;
|
|
4427
4427
|
content: string;
|
|
4428
4428
|
}[];
|
|
4429
4429
|
changesAlreadyApplied: {
|
|
4430
|
-
type: "
|
|
4430
|
+
type: "patch" | "file";
|
|
4431
4431
|
path: string;
|
|
4432
4432
|
content: string;
|
|
4433
4433
|
}[];
|
|
@@ -4446,12 +4446,12 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
4446
4446
|
userInputId: string;
|
|
4447
4447
|
response: string;
|
|
4448
4448
|
changes: {
|
|
4449
|
-
type: "
|
|
4449
|
+
type: "patch" | "file";
|
|
4450
4450
|
path: string;
|
|
4451
4451
|
content: string;
|
|
4452
4452
|
}[];
|
|
4453
4453
|
changesAlreadyApplied: {
|
|
4454
|
-
type: "
|
|
4454
|
+
type: "patch" | "file";
|
|
4455
4455
|
path: string;
|
|
4456
4456
|
content: string;
|
|
4457
4457
|
}[];
|
|
@@ -4592,12 +4592,12 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
4592
4592
|
userInputId: string;
|
|
4593
4593
|
response: string;
|
|
4594
4594
|
changes: {
|
|
4595
|
-
type: "
|
|
4595
|
+
type: "patch" | "file";
|
|
4596
4596
|
path: string;
|
|
4597
4597
|
content: string;
|
|
4598
4598
|
}[];
|
|
4599
4599
|
changesAlreadyApplied: {
|
|
4600
|
-
type: "
|
|
4600
|
+
type: "patch" | "file";
|
|
4601
4601
|
path: string;
|
|
4602
4602
|
content: string;
|
|
4603
4603
|
}[];
|
|
@@ -4713,12 +4713,12 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
4713
4713
|
userInputId: string;
|
|
4714
4714
|
response: string;
|
|
4715
4715
|
changes: {
|
|
4716
|
-
type: "
|
|
4716
|
+
type: "patch" | "file";
|
|
4717
4717
|
path: string;
|
|
4718
4718
|
content: string;
|
|
4719
4719
|
}[];
|
|
4720
4720
|
changesAlreadyApplied: {
|
|
4721
|
-
type: "
|
|
4721
|
+
type: "patch" | "file";
|
|
4722
4722
|
path: string;
|
|
4723
4723
|
content: string;
|
|
4724
4724
|
}[];
|
|
@@ -4767,12 +4767,12 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
4767
4767
|
userInputId: string;
|
|
4768
4768
|
response: string;
|
|
4769
4769
|
changes: {
|
|
4770
|
-
type: "
|
|
4770
|
+
type: "patch" | "file";
|
|
4771
4771
|
path: string;
|
|
4772
4772
|
content: string;
|
|
4773
4773
|
}[];
|
|
4774
4774
|
changesAlreadyApplied: {
|
|
4775
|
-
type: "
|
|
4775
|
+
type: "patch" | "file";
|
|
4776
4776
|
path: string;
|
|
4777
4777
|
content: string;
|
|
4778
4778
|
}[];
|
|
@@ -4888,12 +4888,12 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
4888
4888
|
userInputId: string;
|
|
4889
4889
|
response: string;
|
|
4890
4890
|
changes: {
|
|
4891
|
-
type: "
|
|
4891
|
+
type: "patch" | "file";
|
|
4892
4892
|
path: string;
|
|
4893
4893
|
content: string;
|
|
4894
4894
|
}[];
|
|
4895
4895
|
changesAlreadyApplied: {
|
|
4896
|
-
type: "
|
|
4896
|
+
type: "patch" | "file";
|
|
4897
4897
|
path: string;
|
|
4898
4898
|
content: string;
|
|
4899
4899
|
}[];
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,22 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
process.env.NEXT_PUBLIC_CB_ENVIRONMENT = 'production';
|
|
3
3
|
process.env.NEXT_PUBLIC_BACKEND_URL = 'manicode-backend.onrender.com';
|
|
4
|
-
process.env.NEXT_PUBLIC_APP_URL = 'https://codebuff.com';
|
|
4
|
+
process.env.NEXT_PUBLIC_APP_URL = 'https://www.codebuff.com';
|
|
5
5
|
process.env.NEXT_PUBLIC_SUPPORT_EMAIL = 'support@codebuff.com';
|
|
6
6
|
process.env.NEXT_PUBLIC_POSTHOG_API_KEY = 'phc_tug7g8yc10qNestK14QV8WyKwjfEl6vwzIbJkBdqeHS';
|
|
7
|
-
process.env.NEXT_PUBLIC_POSTHOG_HOST_URL = 'https://us.i.posthog.com
|
|
7
|
+
process.env.NEXT_PUBLIC_POSTHOG_HOST_URL = 'https://us.i.posthog.com';
|
|
8
|
+
process.env.NEXT_PUBLIC_CB_ENVIRONMENT = 'production';
|
|
9
|
+
process.env.NEXT_PUBLIC_BACKEND_URL = 'manicode-backend.onrender.com';
|
|
10
|
+
process.env.NEXT_PUBLIC_APP_URL = 'https://www.codebuff.com';
|
|
11
|
+
process.env.NEXT_PUBLIC_SUPPORT_EMAIL = 'support@codebuff.com';
|
|
12
|
+
process.env.NEXT_PUBLIC_POSTHOG_API_KEY = 'phc_tug7g8yc10qNestK14QV8WyKwjfEl6vwzIbJkBdqeHS';
|
|
13
|
+
process.env.NEXT_PUBLIC_POSTHOG_HOST_URL = 'https://us.i.posthog.com';
|
|
14
|
+
process.env.NEXT_PUBLIC_CB_ENVIRONMENT = 'production';
|
|
15
|
+
process.env.NEXT_PUBLIC_BACKEND_URL = 'manicode-backend.onrender.com';
|
|
16
|
+
process.env.NEXT_PUBLIC_APP_URL = 'https://www.codebuff.com';
|
|
17
|
+
process.env.NEXT_PUBLIC_SUPPORT_EMAIL = 'support@codebuff.com';
|
|
18
|
+
process.env.NEXT_PUBLIC_POSTHOG_API_KEY = 'phc_tug7g8yc10qNestK14QV8WyKwjfEl6vwzIbJkBdqeHS';
|
|
19
|
+
process.env.NEXT_PUBLIC_POSTHOG_HOST_URL = 'https://us.i.posthog.com';
|
|
8
20
|
"use strict";
|
|
9
21
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
10
22
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
// Bun Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`getBackgroundProcessInfoString formats a running process correctly 1`] = `
|
|
4
|
+
"<background_process>
|
|
5
|
+
<process_id>123</process_id>
|
|
6
|
+
<command>npm test</command>
|
|
7
|
+
<start_time_utc>1970-01-01T00:00:01.000Z</start_time_utc>
|
|
8
|
+
<duration_ms>2000</duration_ms>
|
|
9
|
+
<stdout>test output</stdout>
|
|
10
|
+
<stderr>test error</stderr>
|
|
11
|
+
<status>running</status>
|
|
12
|
+
</background_process>"
|
|
13
|
+
`;
|
|
14
|
+
|
|
15
|
+
exports[`getBackgroundProcessInfoString formats a completed process correctly 1`] = `
|
|
16
|
+
"<background_process>
|
|
17
|
+
<process_id>456</process_id>
|
|
18
|
+
<command>npm build</command>
|
|
19
|
+
<start_time_utc>1970-01-01T00:00:01.000Z</start_time_utc>
|
|
20
|
+
<duration_ms>1000</duration_ms>
|
|
21
|
+
<stdout>build successful</stdout>
|
|
22
|
+
<status>completed</status>
|
|
23
|
+
<exit_code>0</exit_code>
|
|
24
|
+
</background_process>"
|
|
25
|
+
`;
|
|
26
|
+
|
|
27
|
+
exports[`getBackgroundProcessInfoString formats an errored process correctly 1`] = `
|
|
28
|
+
"<background_process>
|
|
29
|
+
<process_id>789</process_id>
|
|
30
|
+
<command>invalid-command</command>
|
|
31
|
+
<start_time_utc>1970-01-01T00:00:01.000Z</start_time_utc>
|
|
32
|
+
<duration_ms>1500</duration_ms>
|
|
33
|
+
<stderr>command not found</stderr>
|
|
34
|
+
<status>error</status>
|
|
35
|
+
<exit_code>1</exit_code>
|
|
36
|
+
<signal_code>SIGTERM</signal_code>
|
|
37
|
+
</background_process>"
|
|
38
|
+
`;
|
|
39
|
+
|
|
40
|
+
exports[`getBackgroundProcessInfoString handles new output since last report 1`] = `
|
|
41
|
+
"<background_process>
|
|
42
|
+
<process_id>102</process_id>
|
|
43
|
+
<command>echo test</command>
|
|
44
|
+
<start_time_utc>1970-01-01T00:00:01.000Z</start_time_utc>
|
|
45
|
+
<duration_ms>1000</duration_ms>
|
|
46
|
+
<stdout>[PREVIOUS OUTPUT]
|
|
47
|
+
more output</stdout>
|
|
48
|
+
<status>completed</status>
|
|
49
|
+
</background_process>"
|
|
50
|
+
`;
|
|
51
|
+
|
|
52
|
+
exports[`getBackgroundProcessInfoString handles no new content 1`] = `
|
|
53
|
+
"<background_process>
|
|
54
|
+
<process_id>103</process_id>
|
|
55
|
+
<command>echo test</command>
|
|
56
|
+
<start_time_utc>1970-01-01T00:00:01.000Z</start_time_utc>
|
|
57
|
+
<duration_ms>1000</duration_ms>
|
|
58
|
+
<status>running</status>
|
|
59
|
+
</background_process>"
|
|
60
|
+
`;
|
|
61
|
+
|
|
62
|
+
exports[`getBackgroundProcessInfoString handles new stderr without when no previous stderr 1`] = `
|
|
63
|
+
"<background_process>
|
|
64
|
+
<process_id>104</process_id>
|
|
65
|
+
<command>echo test</command>
|
|
66
|
+
<start_time_utc>1970-01-01T00:00:01.000Z</start_time_utc>
|
|
67
|
+
<duration_ms>1000</duration_ms>
|
|
68
|
+
<stderr>new error</stderr>
|
|
69
|
+
<status>error</status>
|
|
70
|
+
</background_process>"
|
|
71
|
+
`;
|
|
72
|
+
|
|
73
|
+
exports[`getBackgroundProcessInfoString handles new stdout without when no previous stdout 1`] = `
|
|
74
|
+
"<background_process>
|
|
75
|
+
<process_id>105</process_id>
|
|
76
|
+
<command>echo test</command>
|
|
77
|
+
<start_time_utc>1970-01-01T00:00:01.000Z</start_time_utc>
|
|
78
|
+
<duration_ms>2000</duration_ms>
|
|
79
|
+
<stdout>first output</stdout>
|
|
80
|
+
<status>running</status>
|
|
81
|
+
</background_process>"
|
|
82
|
+
`;
|
|
83
|
+
|
|
84
|
+
exports[`getBackgroundProcessInfoString reports completed process with new stderr even if stdout unchanged 1`] = `
|
|
85
|
+
"<background_process>
|
|
86
|
+
<process_id>106</process_id>
|
|
87
|
+
<command>echo test</command>
|
|
88
|
+
<start_time_utc>1970-01-01T00:00:01.000Z</start_time_utc>
|
|
89
|
+
<duration_ms>1000</duration_ms>
|
|
90
|
+
<stderr>new error</stderr>
|
|
91
|
+
<status>completed</status>
|
|
92
|
+
</background_process>"
|
|
93
|
+
`;
|
|
94
|
+
|
|
95
|
+
exports[`getBackgroundProcessInfoString reports completed process with new stdout even if stderr unchanged 1`] = `
|
|
96
|
+
"<background_process>
|
|
97
|
+
<process_id>107</process_id>
|
|
98
|
+
<command>echo test</command>
|
|
99
|
+
<start_time_utc>1970-01-01T00:00:01.000Z</start_time_utc>
|
|
100
|
+
<duration_ms>1000</duration_ms>
|
|
101
|
+
<stdout>[PREVIOUS OUTPUT]
|
|
102
|
+
more</stdout>
|
|
103
|
+
<status>completed</status>
|
|
104
|
+
</background_process>"
|
|
105
|
+
`;
|
|
106
|
+
|
|
107
|
+
exports[`getBackgroundProcessInfoString reports process when status changes even without output changes 1`] = `
|
|
108
|
+
"<background_process>
|
|
109
|
+
<process_id>108</process_id>
|
|
110
|
+
<command>echo test</command>
|
|
111
|
+
<start_time_utc>1970-01-01T00:00:01.000Z</start_time_utc>
|
|
112
|
+
<duration_ms>1000</duration_ms>
|
|
113
|
+
<status>completed</status>
|
|
114
|
+
</background_process>"
|
|
115
|
+
`;
|
|
116
|
+
|
|
117
|
+
exports[`getBackgroundProcessInfoString calculates duration from endTime when available 1`] = `
|
|
118
|
+
"<background_process>
|
|
119
|
+
<process_id>109</process_id>
|
|
120
|
+
<command>echo test</command>
|
|
121
|
+
<start_time_utc>1970-01-01T00:00:01.000Z</start_time_utc>
|
|
122
|
+
<duration_ms>1500</duration_ms>
|
|
123
|
+
<stdout>test</stdout>
|
|
124
|
+
<status>completed</status>
|
|
125
|
+
</background_process>"
|
|
126
|
+
`;
|
|
127
|
+
|
|
128
|
+
exports[`getBackgroundProcessInfoString calculates duration from current time when no endTime 1`] = `
|
|
129
|
+
"<background_process>
|
|
130
|
+
<process_id>110</process_id>
|
|
131
|
+
<command>echo test</command>
|
|
132
|
+
<start_time_utc>1970-01-01T00:00:01.000Z</start_time_utc>
|
|
133
|
+
<duration_ms>2000</duration_ms>
|
|
134
|
+
<stdout>test</stdout>
|
|
135
|
+
<status>running</status>
|
|
136
|
+
</background_process>"
|
|
137
|
+
`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const file_paths_1 = require("../file-paths");
|
|
7
|
+
const path_1 = __importDefault(require("path"));
|
|
8
|
+
describe('toAbsolutePath', () => {
|
|
9
|
+
const projectRoot = '/home/user/project';
|
|
10
|
+
it('should handle relative paths', () => {
|
|
11
|
+
expect((0, file_paths_1.toAbsolutePath)('src/file.ts', projectRoot))
|
|
12
|
+
.toBe(path_1.default.normalize(path_1.default.join(projectRoot, 'src/file.ts')));
|
|
13
|
+
});
|
|
14
|
+
it('should handle parent directory references', () => {
|
|
15
|
+
expect((0, file_paths_1.toAbsolutePath)('../file.ts', projectRoot))
|
|
16
|
+
.toBe(path_1.default.normalize(path_1.default.join(path_1.default.dirname(projectRoot), 'file.ts')));
|
|
17
|
+
});
|
|
18
|
+
it('should handle current directory references', () => {
|
|
19
|
+
expect((0, file_paths_1.toAbsolutePath)('./file.ts', projectRoot))
|
|
20
|
+
.toBe(path_1.default.normalize(path_1.default.join(projectRoot, 'file.ts')));
|
|
21
|
+
});
|
|
22
|
+
it('should return absolute paths unchanged', () => {
|
|
23
|
+
const absolutePath = '/absolute/path/file.ts';
|
|
24
|
+
expect((0, file_paths_1.toAbsolutePath)(absolutePath, projectRoot))
|
|
25
|
+
.toBe(path_1.default.normalize(absolutePath));
|
|
26
|
+
});
|
|
27
|
+
it('should handle Windows-style paths', () => {
|
|
28
|
+
const winPath = 'src\\file.ts';
|
|
29
|
+
expect((0, file_paths_1.toAbsolutePath)(winPath, projectRoot))
|
|
30
|
+
.toBe(path_1.default.normalize(path_1.default.join(projectRoot, 'src/file.ts')));
|
|
31
|
+
});
|
|
32
|
+
it('should normalize paths with multiple slashes', () => {
|
|
33
|
+
expect((0, file_paths_1.toAbsolutePath)('src//file.ts', projectRoot))
|
|
34
|
+
.toBe(path_1.default.normalize(path_1.default.join(projectRoot, 'src/file.ts')));
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
//# sourceMappingURL=file-paths.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-paths.test.js","sourceRoot":"","sources":["../../../src/utils/__tests__/file-paths.test.ts"],"names":[],"mappings":";;;;;AAAA,8CAA8C;AAC9C,gDAAuB;AAEvB,QAAQ,CAAC,gBAAgB,EAAE,GAAG,EAAE;IAC9B,MAAM,WAAW,GAAG,oBAAoB,CAAA;IAExC,EAAE,CAAC,8BAA8B,EAAE,GAAG,EAAE;QACtC,MAAM,CAAC,IAAA,2BAAc,EAAC,aAAa,EAAE,WAAW,CAAC,CAAC;aAC/C,IAAI,CAAC,cAAI,CAAC,SAAS,CAAC,cAAI,CAAC,IAAI,CAAC,WAAW,EAAE,aAAa,CAAC,CAAC,CAAC,CAAA;IAChE,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,2CAA2C,EAAE,GAAG,EAAE;QACnD,MAAM,CAAC,IAAA,2BAAc,EAAC,YAAY,EAAE,WAAW,CAAC,CAAC;aAC9C,IAAI,CAAC,cAAI,CAAC,SAAS,CAAC,cA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|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const path_1 = require("../path");
|
|
7
|
+
const path_2 = __importDefault(require("path"));
|
|
8
|
+
describe('toAbsolutePath', () => {
|
|
9
|
+
const projectRoot = '/home/user/project';
|
|
10
|
+
it('should handle relative paths', () => {
|
|
11
|
+
expect((0, path_1.toAbsolutePath)('src/file.ts', projectRoot))
|
|
12
|
+
.toBe(path_2.default.normalize(path_2.default.join(projectRoot, 'src/file.ts')));
|
|
13
|
+
});
|
|
14
|
+
it('should handle parent directory references', () => {
|
|
15
|
+
expect((0, path_1.toAbsolutePath)('../file.ts', projectRoot))
|
|
16
|
+
.toBe(path_2.default.normalize(path_2.default.join(path_2.default.dirname(projectRoot), 'file.ts')));
|
|
17
|
+
});
|
|
18
|
+
it('should handle current directory references', () => {
|
|
19
|
+
expect((0, path_1.toAbsolutePath)('./file.ts', projectRoot))
|
|
20
|
+
.toBe(path_2.default.normalize(path_2.default.join(projectRoot, 'file.ts')));
|
|
21
|
+
});
|
|
22
|
+
it('should return absolute paths unchanged', () => {
|
|
23
|
+
const absolutePath = '/absolute/path/file.ts';
|
|
24
|
+
expect((0, path_1.toAbsolutePath)(absolutePath, projectRoot))
|
|
25
|
+
.toBe(path_2.default.normalize(absolutePath));
|
|
26
|
+
});
|
|
27
|
+
it('should handle Windows-style paths', () => {
|
|
28
|
+
const winPath = 'src\\file.ts';
|
|
29
|
+
expect((0, path_1.toAbsolutePath)(winPath, projectRoot))
|
|
30
|
+
.toBe(path_2.default.normalize(path_2.default.join(projectRoot, 'src/file.ts')));
|
|
31
|
+
});
|
|
32
|
+
it('should normalize paths with multiple slashes', () => {
|
|
33
|
+
expect((0, path_1.toAbsolutePath)('src//file.ts', projectRoot))
|
|
34
|
+
.toBe(path_2.default.normalize(path_2.default.join(projectRoot, 'src/file.ts')));
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
//# sourceMappingURL=path.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"path.test.js","sourceRoot":"","sources":["../../../src/utils/__tests__/path.test.ts"],"names":[],"mappings":";;;;;AAAA,kCAAwC;AACxC,gDAAuB;AAEvB,QAAQ,CAAC,gBAAgB,EAAE,GAAG,EAAE;IAC9B,MAAM,WAAW,GAAG,oBAAoB,CAAA;IAExC,EAAE,CAAC,8BAA8B,EAAE,GAAG,EAAE;QACtC,MAAM,CAAC,IAAA,qBAAc,EAAC,aAAa,EAAE,WAAW,CAAC,CAAC;aAC/C,IAAI,CAAC,cAAI,CAAC,SAAS,CAAC,cAAI,CAAC,IAAI,CAAC,WAAW,EAAE,aAAa,CAAC,CAAC,CAAC,CAAA;IAChE,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,2CAA2C,EAAE,GAAG,EAAE;QACnD,MAAM,CAAC,IAAA,qBAAc,EAAC,YAAY,EAAE,WAAW,CAAC,CAAC;aAC9C,IAAI,CAAC,cAAI,CAAC,SAAS,CAAC,cAAI,CAAC,IAAI,CAAC,cAAI,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC,CAAA;IAC1E,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,4CAA4C,EAAE,GAAG,EAAE;QACpD,MAAM,CAAC,IAAA,qBAAc,EAAC,WAAW,EAAE,WAAW,CAAC,CAAC;aAC7C,IAAI,CAAC,cAAI,CAAC,SAAS,CAAC,cAAI,CAAC,IAAI,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC,CAAC,CAAA;IAC5D,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,wCAAwC,EAAE,GAAG,EAAE;QAChD,MAAM,YAAY,GAAG,wBAAwB,CAAA;QAC7C,MAAM,CAAC,IAAA,qBAAc,EAAC,YAAY,EAAE,WAAW,CAAC,CAAC;aAC9C,IAAI,CAAC,cAAI,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC,CAAA;IACvC,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,mCAAmC,EAAE,GAAG,EAAE;QAC3C,MAAM,OAAO,GAAG,cAAc,CAAA;QAC9B,MAAM,CAAC,IAAA,qBAAc,EAAC,OAAO,EAAE,WAAW,CAAC,CAAC;aACzC,IAAI,CAAC,cAAI,CAAC,SAAS,CAAC,cAAI,CAAC,IAAI,CAAC,WAAW,EAAE,aAAa,CAAC,CAAC,CAAC,CAAA;IAChE,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,8CAA8C,EAAE,GAAG,EAAE;QACtD,MAAM,CAAC,IAAA,qBAAc,EAAC,cAAc,EAAE,WAAW,CAAC,CAAC;aAChD,IAAI,CAAC,cAAI,CAAC,SAAS,CAAC,cAAI,CAAC,IAAI,CAAC,WAAW,EAAE,aAAa,CAAC,CAAC,CAAC,CAAA;IAChE,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
|
@@ -29,14 +29,22 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
29
29
|
const stream_1 = require("stream");
|
|
30
30
|
// @ts-ignore
|
|
31
31
|
const bun_test_1 = require("bun:test");
|
|
32
|
+
// @ts-ignore
|
|
33
|
+
const bun_test_2 = require("bun:test");
|
|
32
34
|
const tools_1 = require("../../common/constants/tools");
|
|
33
35
|
const projectFileTree = __importStar(require("../../common/project-file-tree"));
|
|
34
36
|
const strip_ansi_1 = __importDefault(require("strip-ansi"));
|
|
37
|
+
const projectFiles = __importStar(require("../../project-files"));
|
|
35
38
|
const tool_renderers_1 = require("../tool-renderers");
|
|
36
39
|
const xml_stream_parser_1 = require("../xml-stream-parser");
|
|
37
40
|
(0, bun_test_1.describe)('Tool renderers with XML parser', () => {
|
|
38
|
-
|
|
39
|
-
|
|
41
|
+
(0, bun_test_1.beforeEach)(() => {
|
|
42
|
+
(0, bun_test_2.spyOn)(projectFileTree, 'isFileIgnored').mockImplementation(() => false);
|
|
43
|
+
(0, bun_test_2.spyOn)(projectFiles, 'getProjectRoot').mockImplementation(() => false);
|
|
44
|
+
});
|
|
45
|
+
(0, bun_test_1.afterEach)(() => {
|
|
46
|
+
bun_test_1.mock.restore();
|
|
47
|
+
});
|
|
40
48
|
// Helper function to process XML through parser and get output
|
|
41
49
|
async function processXML(xml) {
|
|
42
50
|
let result = '';
|
|
@@ -56,7 +64,7 @@ const xml_stream_parser_1 = require("../xml-stream-parser");
|
|
|
56
64
|
});
|
|
57
65
|
return result;
|
|
58
66
|
}
|
|
59
|
-
(0,
|
|
67
|
+
(0, bun_test_2.test)('formats write_file tool call', async () => {
|
|
60
68
|
const xml = (0, tools_1.getToolCallString)('write_file', {
|
|
61
69
|
path: 'test.ts',
|
|
62
70
|
content: 'console.log("test");\n',
|
|
@@ -65,7 +73,7 @@ const xml_stream_parser_1 = require("../xml-stream-parser");
|
|
|
65
73
|
const stripped = (0, strip_ansi_1.default)(output);
|
|
66
74
|
(0, bun_test_1.expect)(stripped).toBe('\n\n[Write File]\nEditing file at test.ts...\n\n');
|
|
67
75
|
});
|
|
68
|
-
(0,
|
|
76
|
+
(0, bun_test_2.test)('formats read_files tool call', async () => {
|
|
69
77
|
const xml = (0, tools_1.getToolCallString)('read_files', {
|
|
70
78
|
paths: 'file1.ts\nfile2.ts',
|
|
71
79
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-renderers.test.js","sourceRoot":"","sources":["../../../src/utils/__tests__/tool-renderers.test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mCAAiC;AAEjC,aAAa;AACb,
|
|
1
|
+
{"version":3,"file":"tool-renderers.test.js","sourceRoot":"","sources":["../../../src/utils/__tests__/tool-renderers.test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mCAAiC;AAEjC,aAAa;AACb,uCAAwE;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