codebuff 1.0.134 → 1.0.137
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/cli.js +13 -5
- package/dist/cli.js.map +1 -1
- package/dist/client.d.ts +5 -5
- package/dist/code-map/tsconfig.tsbuildinfo +1 -1
- package/dist/common/actions.d.ts +69 -69
- package/dist/common/constants.d.ts +9 -8
- package/dist/common/constants.js +12 -13
- package/dist/common/constants.js.map +1 -1
- package/dist/common/util/promise.d.ts +1 -0
- package/dist/common/util/promise.js +3 -1
- package/dist/common/util/promise.js.map +1 -1
- package/dist/common/util/string.js +15 -11
- package/dist/common/util/string.js.map +1 -1
- package/dist/common/websockets/websocket-schema.d.ts +166 -166
- package/dist/project-files.js +37 -12
- package/dist/project-files.js.map +1 -1
- package/dist/tool-handlers.js +14 -6
- package/dist/tool-handlers.js.map +1 -1
- package/dist/utils/system-info.d.ts +8 -0
- package/dist/utils/system-info.js +22 -0
- package/dist/utils/system-info.js.map +1 -0
- package/package.json +3 -2
package/dist/common/actions.d.ts
CHANGED
|
@@ -845,16 +845,16 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
845
845
|
fingerprintHash: z.ZodString;
|
|
846
846
|
}, "strip", z.ZodTypeAny, {
|
|
847
847
|
type: "clear-auth-token";
|
|
848
|
-
userId: string;
|
|
849
848
|
fingerprintId: string;
|
|
850
849
|
authToken: string;
|
|
851
850
|
fingerprintHash: string;
|
|
851
|
+
userId: string;
|
|
852
852
|
}, {
|
|
853
853
|
type: "clear-auth-token";
|
|
854
|
-
userId: string;
|
|
855
854
|
fingerprintId: string;
|
|
856
855
|
authToken: string;
|
|
857
856
|
fingerprintHash: string;
|
|
857
|
+
userId: string;
|
|
858
858
|
}>, z.ZodObject<{
|
|
859
859
|
type: z.ZodLiteral<"generate-commit-message">;
|
|
860
860
|
fingerprintId: z.ZodString;
|
|
@@ -882,19 +882,19 @@ export declare const UsageReponseSchema: z.ZodObject<{
|
|
|
882
882
|
session_credits_used: z.ZodNumber;
|
|
883
883
|
}, "strip", z.ZodTypeAny, {
|
|
884
884
|
type: "usage-response";
|
|
885
|
-
|
|
886
|
-
subscription_active: boolean;
|
|
885
|
+
usage: number;
|
|
887
886
|
limit: number;
|
|
887
|
+
subscription_active: boolean;
|
|
888
|
+
next_quota_reset: Date;
|
|
888
889
|
session_credits_used: number;
|
|
889
|
-
usage: number;
|
|
890
890
|
referralLink?: string | undefined;
|
|
891
891
|
}, {
|
|
892
892
|
type: "usage-response";
|
|
893
|
-
|
|
894
|
-
subscription_active: boolean;
|
|
893
|
+
usage: number;
|
|
895
894
|
limit: number;
|
|
895
|
+
subscription_active: boolean;
|
|
896
|
+
next_quota_reset: Date;
|
|
896
897
|
session_credits_used: number;
|
|
897
|
-
usage: number;
|
|
898
898
|
referralLink?: string | undefined;
|
|
899
899
|
}>;
|
|
900
900
|
export type UsageResponse = z.infer<typeof UsageReponseSchema>;
|
|
@@ -910,19 +910,19 @@ export declare const InitResponseSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
910
910
|
session_credits_used: z.ZodNumber;
|
|
911
911
|
}, "type">>, "strip", z.ZodTypeAny, {
|
|
912
912
|
type: "init-response";
|
|
913
|
-
|
|
914
|
-
subscription_active: boolean;
|
|
913
|
+
usage: number;
|
|
915
914
|
limit: number;
|
|
915
|
+
subscription_active: boolean;
|
|
916
|
+
next_quota_reset: Date;
|
|
916
917
|
session_credits_used: number;
|
|
917
|
-
usage: number;
|
|
918
918
|
referralLink?: string | undefined;
|
|
919
919
|
}, {
|
|
920
920
|
type: "init-response";
|
|
921
|
-
|
|
922
|
-
subscription_active: boolean;
|
|
921
|
+
usage: number;
|
|
923
922
|
limit: number;
|
|
923
|
+
subscription_active: boolean;
|
|
924
|
+
next_quota_reset: Date;
|
|
924
925
|
session_credits_used: number;
|
|
925
|
-
usage: number;
|
|
926
926
|
referralLink?: string | undefined;
|
|
927
927
|
}>;
|
|
928
928
|
export type InitResponse = z.infer<typeof InitResponseSchema>;
|
|
@@ -968,21 +968,21 @@ export declare const ResponseCompleteSchema: z.ZodObject<z.objectUtil.extendShap
|
|
|
968
968
|
}>, "many">;
|
|
969
969
|
resetFileVersions: z.ZodBoolean;
|
|
970
970
|
}, {
|
|
971
|
-
next_quota_reset: z.ZodOptional<z.ZodDate>;
|
|
972
|
-
subscription_active: z.ZodOptional<z.ZodBoolean>;
|
|
973
|
-
limit: z.ZodOptional<z.ZodNumber>;
|
|
974
|
-
session_credits_used: z.ZodOptional<z.ZodNumber>;
|
|
975
971
|
usage: z.ZodOptional<z.ZodNumber>;
|
|
972
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
976
973
|
referralLink: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
974
|
+
subscription_active: z.ZodOptional<z.ZodBoolean>;
|
|
975
|
+
next_quota_reset: z.ZodOptional<z.ZodDate>;
|
|
976
|
+
session_credits_used: z.ZodOptional<z.ZodNumber>;
|
|
977
977
|
}>, "strip", z.ZodTypeAny, {
|
|
978
978
|
type: "response-complete";
|
|
979
|
-
response: string;
|
|
980
979
|
userInputId: string;
|
|
981
980
|
changesAlreadyApplied: {
|
|
982
981
|
type: "patch" | "file";
|
|
983
982
|
content: string;
|
|
984
983
|
filePath: string;
|
|
985
984
|
}[];
|
|
985
|
+
response: string;
|
|
986
986
|
changes: {
|
|
987
987
|
type: "patch" | "file";
|
|
988
988
|
content: string;
|
|
@@ -993,21 +993,21 @@ export declare const ResponseCompleteSchema: z.ZodObject<z.objectUtil.extendShap
|
|
|
993
993
|
content: string;
|
|
994
994
|
}[];
|
|
995
995
|
resetFileVersions: boolean;
|
|
996
|
-
next_quota_reset?: Date | undefined;
|
|
997
|
-
subscription_active?: boolean | undefined;
|
|
998
|
-
limit?: number | undefined;
|
|
999
|
-
session_credits_used?: number | undefined;
|
|
1000
996
|
usage?: number | undefined;
|
|
997
|
+
limit?: number | undefined;
|
|
1001
998
|
referralLink?: string | undefined;
|
|
999
|
+
subscription_active?: boolean | undefined;
|
|
1000
|
+
next_quota_reset?: Date | undefined;
|
|
1001
|
+
session_credits_used?: number | undefined;
|
|
1002
1002
|
}, {
|
|
1003
1003
|
type: "response-complete";
|
|
1004
|
-
response: string;
|
|
1005
1004
|
userInputId: string;
|
|
1006
1005
|
changesAlreadyApplied: {
|
|
1007
1006
|
type: "patch" | "file";
|
|
1008
1007
|
content: string;
|
|
1009
1008
|
filePath: string;
|
|
1010
1009
|
}[];
|
|
1010
|
+
response: string;
|
|
1011
1011
|
changes: {
|
|
1012
1012
|
type: "patch" | "file";
|
|
1013
1013
|
content: string;
|
|
@@ -1018,12 +1018,12 @@ export declare const ResponseCompleteSchema: z.ZodObject<z.objectUtil.extendShap
|
|
|
1018
1018
|
content: string;
|
|
1019
1019
|
}[];
|
|
1020
1020
|
resetFileVersions: boolean;
|
|
1021
|
-
next_quota_reset?: Date | undefined;
|
|
1022
|
-
subscription_active?: boolean | undefined;
|
|
1023
|
-
limit?: number | undefined;
|
|
1024
|
-
session_credits_used?: number | undefined;
|
|
1025
1021
|
usage?: number | undefined;
|
|
1022
|
+
limit?: number | undefined;
|
|
1026
1023
|
referralLink?: string | undefined;
|
|
1024
|
+
subscription_active?: boolean | undefined;
|
|
1025
|
+
next_quota_reset?: Date | undefined;
|
|
1026
|
+
session_credits_used?: number | undefined;
|
|
1027
1027
|
}>;
|
|
1028
1028
|
export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
1029
1029
|
type: z.ZodLiteral<"response-chunk">;
|
|
@@ -1079,21 +1079,21 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
1079
1079
|
}>, "many">;
|
|
1080
1080
|
resetFileVersions: z.ZodBoolean;
|
|
1081
1081
|
}, {
|
|
1082
|
-
next_quota_reset: z.ZodOptional<z.ZodDate>;
|
|
1083
|
-
subscription_active: z.ZodOptional<z.ZodBoolean>;
|
|
1084
|
-
limit: z.ZodOptional<z.ZodNumber>;
|
|
1085
|
-
session_credits_used: z.ZodOptional<z.ZodNumber>;
|
|
1086
1082
|
usage: z.ZodOptional<z.ZodNumber>;
|
|
1083
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
1087
1084
|
referralLink: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
1085
|
+
subscription_active: z.ZodOptional<z.ZodBoolean>;
|
|
1086
|
+
next_quota_reset: z.ZodOptional<z.ZodDate>;
|
|
1087
|
+
session_credits_used: z.ZodOptional<z.ZodNumber>;
|
|
1088
1088
|
}>, "strip", z.ZodTypeAny, {
|
|
1089
1089
|
type: "response-complete";
|
|
1090
|
-
response: string;
|
|
1091
1090
|
userInputId: string;
|
|
1092
1091
|
changesAlreadyApplied: {
|
|
1093
1092
|
type: "patch" | "file";
|
|
1094
1093
|
content: string;
|
|
1095
1094
|
filePath: string;
|
|
1096
1095
|
}[];
|
|
1096
|
+
response: string;
|
|
1097
1097
|
changes: {
|
|
1098
1098
|
type: "patch" | "file";
|
|
1099
1099
|
content: string;
|
|
@@ -1104,21 +1104,21 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
1104
1104
|
content: string;
|
|
1105
1105
|
}[];
|
|
1106
1106
|
resetFileVersions: boolean;
|
|
1107
|
-
next_quota_reset?: Date | undefined;
|
|
1108
|
-
subscription_active?: boolean | undefined;
|
|
1109
|
-
limit?: number | undefined;
|
|
1110
|
-
session_credits_used?: number | undefined;
|
|
1111
1107
|
usage?: number | undefined;
|
|
1108
|
+
limit?: number | undefined;
|
|
1112
1109
|
referralLink?: string | undefined;
|
|
1110
|
+
subscription_active?: boolean | undefined;
|
|
1111
|
+
next_quota_reset?: Date | undefined;
|
|
1112
|
+
session_credits_used?: number | undefined;
|
|
1113
1113
|
}, {
|
|
1114
1114
|
type: "response-complete";
|
|
1115
|
-
response: string;
|
|
1116
1115
|
userInputId: string;
|
|
1117
1116
|
changesAlreadyApplied: {
|
|
1118
1117
|
type: "patch" | "file";
|
|
1119
1118
|
content: string;
|
|
1120
1119
|
filePath: string;
|
|
1121
1120
|
}[];
|
|
1121
|
+
response: string;
|
|
1122
1122
|
changes: {
|
|
1123
1123
|
type: "patch" | "file";
|
|
1124
1124
|
content: string;
|
|
@@ -1129,12 +1129,12 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
1129
1129
|
content: string;
|
|
1130
1130
|
}[];
|
|
1131
1131
|
resetFileVersions: boolean;
|
|
1132
|
-
next_quota_reset?: Date | undefined;
|
|
1133
|
-
subscription_active?: boolean | undefined;
|
|
1134
|
-
limit?: number | undefined;
|
|
1135
|
-
session_credits_used?: number | undefined;
|
|
1136
1132
|
usage?: number | undefined;
|
|
1133
|
+
limit?: number | undefined;
|
|
1137
1134
|
referralLink?: string | undefined;
|
|
1135
|
+
subscription_active?: boolean | undefined;
|
|
1136
|
+
next_quota_reset?: Date | undefined;
|
|
1137
|
+
session_credits_used?: number | undefined;
|
|
1138
1138
|
}>, z.ZodObject<{
|
|
1139
1139
|
type: z.ZodLiteral<"read-files">;
|
|
1140
1140
|
filePaths: z.ZodArray<z.ZodString, "many">;
|
|
@@ -1200,18 +1200,13 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
1200
1200
|
resetFileVersions: z.ZodBoolean;
|
|
1201
1201
|
}, "strip", z.ZodTypeAny, {
|
|
1202
1202
|
type: "tool-call";
|
|
1203
|
-
data: {
|
|
1204
|
-
id: string;
|
|
1205
|
-
name: string;
|
|
1206
|
-
input: Record<string, any>;
|
|
1207
|
-
};
|
|
1208
|
-
response: string;
|
|
1209
1203
|
userInputId: string;
|
|
1210
1204
|
changesAlreadyApplied: {
|
|
1211
1205
|
type: "patch" | "file";
|
|
1212
1206
|
content: string;
|
|
1213
1207
|
filePath: string;
|
|
1214
1208
|
}[];
|
|
1209
|
+
response: string;
|
|
1215
1210
|
changes: {
|
|
1216
1211
|
type: "patch" | "file";
|
|
1217
1212
|
content: string;
|
|
@@ -1222,20 +1217,20 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
1222
1217
|
content: string;
|
|
1223
1218
|
}[];
|
|
1224
1219
|
resetFileVersions: boolean;
|
|
1225
|
-
}, {
|
|
1226
|
-
type: "tool-call";
|
|
1227
1220
|
data: {
|
|
1228
1221
|
id: string;
|
|
1229
1222
|
name: string;
|
|
1230
1223
|
input: Record<string, any>;
|
|
1231
1224
|
};
|
|
1232
|
-
|
|
1225
|
+
}, {
|
|
1226
|
+
type: "tool-call";
|
|
1233
1227
|
userInputId: string;
|
|
1234
1228
|
changesAlreadyApplied: {
|
|
1235
1229
|
type: "patch" | "file";
|
|
1236
1230
|
content: string;
|
|
1237
1231
|
filePath: string;
|
|
1238
1232
|
}[];
|
|
1233
|
+
response: string;
|
|
1239
1234
|
changes: {
|
|
1240
1235
|
type: "patch" | "file";
|
|
1241
1236
|
content: string;
|
|
@@ -1246,18 +1241,23 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
1246
1241
|
content: string;
|
|
1247
1242
|
}[];
|
|
1248
1243
|
resetFileVersions: boolean;
|
|
1244
|
+
data: {
|
|
1245
|
+
id: string;
|
|
1246
|
+
name: string;
|
|
1247
|
+
input: Record<string, any>;
|
|
1248
|
+
};
|
|
1249
1249
|
}>, z.ZodObject<{
|
|
1250
1250
|
type: z.ZodLiteral<"terminal-command-result">;
|
|
1251
1251
|
userInputId: z.ZodString;
|
|
1252
1252
|
result: z.ZodString;
|
|
1253
1253
|
}, "strip", z.ZodTypeAny, {
|
|
1254
1254
|
type: "terminal-command-result";
|
|
1255
|
-
result: string;
|
|
1256
1255
|
userInputId: string;
|
|
1256
|
+
result: string;
|
|
1257
1257
|
}, {
|
|
1258
1258
|
type: "terminal-command-result";
|
|
1259
|
-
result: string;
|
|
1260
1259
|
userInputId: string;
|
|
1260
|
+
result: string;
|
|
1261
1261
|
}>, z.ZodObject<{
|
|
1262
1262
|
type: z.ZodLiteral<"npm-version-status">;
|
|
1263
1263
|
isUpToDate: z.ZodBoolean;
|
|
@@ -1282,19 +1282,19 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
1282
1282
|
session_credits_used: z.ZodNumber;
|
|
1283
1283
|
}, "type">>, "strip", z.ZodTypeAny, {
|
|
1284
1284
|
type: "init-response";
|
|
1285
|
-
|
|
1286
|
-
subscription_active: boolean;
|
|
1285
|
+
usage: number;
|
|
1287
1286
|
limit: number;
|
|
1287
|
+
subscription_active: boolean;
|
|
1288
|
+
next_quota_reset: Date;
|
|
1288
1289
|
session_credits_used: number;
|
|
1289
|
-
usage: number;
|
|
1290
1290
|
referralLink?: string | undefined;
|
|
1291
1291
|
}, {
|
|
1292
1292
|
type: "init-response";
|
|
1293
|
-
|
|
1294
|
-
subscription_active: boolean;
|
|
1293
|
+
usage: number;
|
|
1295
1294
|
limit: number;
|
|
1295
|
+
subscription_active: boolean;
|
|
1296
|
+
next_quota_reset: Date;
|
|
1296
1297
|
session_credits_used: number;
|
|
1297
|
-
usage: number;
|
|
1298
1298
|
referralLink?: string | undefined;
|
|
1299
1299
|
}>, z.ZodObject<{
|
|
1300
1300
|
type: z.ZodLiteral<"auth-result">;
|
|
@@ -1308,16 +1308,16 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
1308
1308
|
}, "strip", z.ZodTypeAny, {
|
|
1309
1309
|
id: string;
|
|
1310
1310
|
name: string | null;
|
|
1311
|
-
email: string;
|
|
1312
1311
|
fingerprintId: string;
|
|
1313
1312
|
authToken: string;
|
|
1313
|
+
email: string;
|
|
1314
1314
|
fingerprintHash: string;
|
|
1315
1315
|
}, {
|
|
1316
1316
|
id: string;
|
|
1317
1317
|
name: string | null;
|
|
1318
|
-
email: string;
|
|
1319
1318
|
fingerprintId: string;
|
|
1320
1319
|
authToken: string;
|
|
1320
|
+
email: string;
|
|
1321
1321
|
fingerprintHash: string;
|
|
1322
1322
|
}>>;
|
|
1323
1323
|
message: z.ZodString;
|
|
@@ -1327,9 +1327,9 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
1327
1327
|
user?: {
|
|
1328
1328
|
id: string;
|
|
1329
1329
|
name: string | null;
|
|
1330
|
-
email: string;
|
|
1331
1330
|
fingerprintId: string;
|
|
1332
1331
|
authToken: string;
|
|
1332
|
+
email: string;
|
|
1333
1333
|
fingerprintHash: string;
|
|
1334
1334
|
} | undefined;
|
|
1335
1335
|
}, {
|
|
@@ -1338,9 +1338,9 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
1338
1338
|
user?: {
|
|
1339
1339
|
id: string;
|
|
1340
1340
|
name: string | null;
|
|
1341
|
-
email: string;
|
|
1342
1341
|
fingerprintId: string;
|
|
1343
1342
|
authToken: string;
|
|
1343
|
+
email: string;
|
|
1344
1344
|
fingerprintHash: string;
|
|
1345
1345
|
} | undefined;
|
|
1346
1346
|
}>, z.ZodObject<{
|
|
@@ -1368,19 +1368,19 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
1368
1368
|
session_credits_used: z.ZodNumber;
|
|
1369
1369
|
}, "strip", z.ZodTypeAny, {
|
|
1370
1370
|
type: "usage-response";
|
|
1371
|
-
|
|
1372
|
-
subscription_active: boolean;
|
|
1371
|
+
usage: number;
|
|
1373
1372
|
limit: number;
|
|
1373
|
+
subscription_active: boolean;
|
|
1374
|
+
next_quota_reset: Date;
|
|
1374
1375
|
session_credits_used: number;
|
|
1375
|
-
usage: number;
|
|
1376
1376
|
referralLink?: string | undefined;
|
|
1377
1377
|
}, {
|
|
1378
1378
|
type: "usage-response";
|
|
1379
|
-
|
|
1380
|
-
subscription_active: boolean;
|
|
1379
|
+
usage: number;
|
|
1381
1380
|
limit: number;
|
|
1381
|
+
subscription_active: boolean;
|
|
1382
|
+
next_quota_reset: Date;
|
|
1382
1383
|
session_credits_used: number;
|
|
1383
|
-
usage: number;
|
|
1384
1384
|
referralLink?: string | undefined;
|
|
1385
1385
|
}>, z.ZodObject<{
|
|
1386
1386
|
type: z.ZodLiteral<"action-error">;
|
|
@@ -19,12 +19,13 @@ export type PlanConfig = {
|
|
|
19
19
|
monthlyPrice: number;
|
|
20
20
|
overageRate: number | null;
|
|
21
21
|
};
|
|
22
|
-
export declare
|
|
23
|
-
ANON
|
|
24
|
-
FREE
|
|
25
|
-
PRO
|
|
26
|
-
MOAR_PRO
|
|
27
|
-
}
|
|
22
|
+
export declare const UsageLimits: {
|
|
23
|
+
readonly ANON: "ANON";
|
|
24
|
+
readonly FREE: "FREE";
|
|
25
|
+
readonly PRO: "PRO";
|
|
26
|
+
readonly MOAR_PRO: "MOAR_PRO";
|
|
27
|
+
};
|
|
28
|
+
export type UsageLimits = (typeof UsageLimits)[keyof typeof UsageLimits];
|
|
28
29
|
export declare const PLAN_CONFIGS: Record<UsageLimits, PlanConfig>;
|
|
29
30
|
export declare const CREDITS_USAGE_LIMITS: Record<UsageLimits, number>;
|
|
30
31
|
export declare const costModes: readonly ["lite", "normal", "pro"];
|
|
@@ -37,7 +38,7 @@ export declare const claudeModels: {
|
|
|
37
38
|
export declare const openaiModels: {
|
|
38
39
|
readonly gpt4o: "gpt-4o-2024-08-06";
|
|
39
40
|
readonly gpt4omini: "gpt-4o-mini-2024-07-18";
|
|
40
|
-
readonly o1: "o1
|
|
41
|
+
readonly o1: "o1";
|
|
41
42
|
};
|
|
42
43
|
export declare const geminiModels: {
|
|
43
44
|
readonly gemini2flash: "gemini-2.0-flash-exp";
|
|
@@ -50,7 +51,7 @@ export declare const models: {
|
|
|
50
51
|
readonly gemini2flash: "gemini-2.0-flash-exp";
|
|
51
52
|
readonly gpt4o: "gpt-4o-2024-08-06";
|
|
52
53
|
readonly gpt4omini: "gpt-4o-mini-2024-07-18";
|
|
53
|
-
readonly o1: "o1
|
|
54
|
+
readonly o1: "o1";
|
|
54
55
|
readonly sonnet: "claude-3-5-sonnet-20241022";
|
|
55
56
|
readonly haiku: "claude-3-5-haiku-20241022";
|
|
56
57
|
};
|
package/dist/common/constants.js
CHANGED
|
@@ -87,40 +87,39 @@ const getUsageLimitFromPlanName = (planName) => {
|
|
|
87
87
|
return entry[0];
|
|
88
88
|
};
|
|
89
89
|
exports.getUsageLimitFromPlanName = getUsageLimitFromPlanName;
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
})(UsageLimits || (exports.UsageLimits = UsageLimits = {}));
|
|
90
|
+
exports.UsageLimits = {
|
|
91
|
+
ANON: 'ANON',
|
|
92
|
+
FREE: 'FREE',
|
|
93
|
+
PRO: 'PRO',
|
|
94
|
+
MOAR_PRO: 'MOAR_PRO',
|
|
95
|
+
};
|
|
97
96
|
// Define base configs with production values
|
|
98
97
|
exports.PLAN_CONFIGS = {
|
|
99
98
|
ANON: {
|
|
100
99
|
limit: 500,
|
|
101
|
-
planName: UsageLimits.ANON,
|
|
100
|
+
planName: exports.UsageLimits.ANON,
|
|
102
101
|
displayName: 'Anonymous',
|
|
103
102
|
monthlyPrice: 0,
|
|
104
103
|
overageRate: null,
|
|
105
104
|
},
|
|
106
105
|
FREE: {
|
|
107
106
|
limit: 1_000,
|
|
108
|
-
planName: UsageLimits.FREE,
|
|
107
|
+
planName: exports.UsageLimits.FREE,
|
|
109
108
|
displayName: 'Free',
|
|
110
109
|
monthlyPrice: 0,
|
|
111
110
|
overageRate: null,
|
|
112
111
|
},
|
|
113
112
|
PRO: {
|
|
114
113
|
limit: 5_000,
|
|
115
|
-
planName: UsageLimits.PRO,
|
|
114
|
+
planName: exports.UsageLimits.PRO,
|
|
116
115
|
displayName: 'Pro',
|
|
117
116
|
monthlyPrice: 49,
|
|
118
117
|
overageRate: exports.OVERAGE_RATE_PRO,
|
|
119
118
|
},
|
|
120
119
|
MOAR_PRO: {
|
|
121
120
|
limit: 27_500,
|
|
122
|
-
planName: UsageLimits.MOAR_PRO,
|
|
123
|
-
displayName: '
|
|
121
|
+
planName: exports.UsageLimits.MOAR_PRO,
|
|
122
|
+
displayName: 'Pro Max',
|
|
124
123
|
monthlyPrice: 249,
|
|
125
124
|
overageRate: exports.OVERAGE_RATE_MOAR_PRO,
|
|
126
125
|
},
|
|
@@ -154,7 +153,7 @@ exports.claudeModels = {
|
|
|
154
153
|
exports.openaiModels = {
|
|
155
154
|
gpt4o: 'gpt-4o-2024-08-06',
|
|
156
155
|
gpt4omini: 'gpt-4o-mini-2024-07-18',
|
|
157
|
-
o1: 'o1
|
|
156
|
+
o1: 'o1',
|
|
158
157
|
// o1: 'o1-2024-12-17',
|
|
159
158
|
};
|
|
160
159
|
exports.geminiModels = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,WAAW,GAAG,GAAG,GAAG,MAAM,CAAA;AAC1B,QAAA,iBAAiB,GAAG,GAAG,GAAG,oBAAoB,CAAA;AAC9C,QAAA,kBAAkB,GAAG,GAAG,GAAG,cAAc,CAAA;AACzC,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;CACR,CAAA;AAEY,QAAA,yBAAyB,GAAG;IACvC,UAAU;IACV,MAAM;IACN,MAAM;IACN,SAAS;IACT,IAAI;IACJ,MAAM;IACN,MAAM;IACN,KAAK;IACL,MAAM;IACN,MAAM;IACN,MAAM;IACN,KAAK;IACL,MAAM;IACN,OAAO;IACP,MAAM;IACN,MAAM;IACN,MAAM;IACN,KAAK;IACL,OAAO;IACP,MAAM;IACN,OAAO;IACP,MAAM;IACN,OAAO;IACP,OAAO;IACP,KAAK;IACL,OAAO;IACP,KAAK;IACL,MAAM;IACN,MAAM;IACN,KAAK;IACL,KAAK;IACL,MAAM;IACN,MAAM;IACN,QAAQ;IACR,OAAO;IACP,MAAM;IACN,IAAI;IACJ,OAAO;IACP,SAAS;CACV,CAAA;AAEY,QAAA,6BAA6B,GAAG,CAAC,CAAA;AACjC,QAAA,QAAQ,GAAG,IAAI,IAAI,CAAC,cAAc,CAAC,CAAA;AACnC,QAAA,mBAAmB,GAAG,EAAE,CAAA;
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,WAAW,GAAG,GAAG,GAAG,MAAM,CAAA;AAC1B,QAAA,iBAAiB,GAAG,GAAG,GAAG,oBAAoB,CAAA;AAC9C,QAAA,kBAAkB,GAAG,GAAG,GAAG,cAAc,CAAA;AACzC,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;CACR,CAAA;AAEY,QAAA,yBAAyB,GAAG;IACvC,UAAU;IACV,MAAM;IACN,MAAM;IACN,SAAS;IACT,IAAI;IACJ,MAAM;IACN,MAAM;IACN,KAAK;IACL,MAAM;IACN,MAAM;IACN,MAAM;IACN,KAAK;IACL,MAAM;IAC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"}
|
|
@@ -6,3 +6,4 @@ export declare function withRetry<T>(operation: () => Promise<T>, options?: {
|
|
|
6
6
|
retryDelayMs?: number;
|
|
7
7
|
}): Promise<T>;
|
|
8
8
|
export declare const mapAsync: <T, U>(items: T[], f: (item: T, index: number) => Promise<U>, maxConcurrentRequests?: number) => Promise<U[]>;
|
|
9
|
+
export declare const sleep: (ms: number) => Promise<unknown>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.mapAsync = exports.INITIAL_RETRY_DELAY = void 0;
|
|
3
|
+
exports.sleep = exports.mapAsync = exports.INITIAL_RETRY_DELAY = void 0;
|
|
4
4
|
exports.withRetry = withRetry;
|
|
5
5
|
exports.INITIAL_RETRY_DELAY = 1000; // 1 second
|
|
6
6
|
async function withRetry(operation, options = {}) {
|
|
@@ -52,4 +52,6 @@ const mapAsync = (items, f, maxConcurrentRequests = 20) => {
|
|
|
52
52
|
});
|
|
53
53
|
};
|
|
54
54
|
exports.mapAsync = mapAsync;
|
|
55
|
+
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
56
|
+
exports.sleep = sleep;
|
|
55
57
|
//# sourceMappingURL=promise.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"promise.js","sourceRoot":"","sources":["../../src/util/promise.ts"],"names":[],"mappings":";;;AAEA,8BAqCC;AAvCY,QAAA,mBAAmB,GAAG,IAAI,CAAA,CAAC,WAAW;AAE5C,KAAK,UAAU,SAAS,CAC7B,SAA2B,EAC3B,UAKI,EAAE;IAEN,MAAM,EACJ,UAAU,GAAG,CAAC,EACd,WAAW,GAAG,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,EAAE,IAAI,KAAK,oBAAoB,EAC7D,OAAO,GAAG,GAAG,EAAE,GAAE,CAAC,EAClB,YAAY,GAAG,2BAAmB,EACnC,GAAG,OAAO,CAAA;IAEX,IAAI,SA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C;QACH,CAAC,CAAA;QAED,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,CAAC,EAAE,CAAC,CAAA;;YAC9B,MAAM,EAAE,CAAA;IACf,CAAC,CAAC,CAAA;AACJ,CAAC,CAAA;AA9BY,QAAA,QAAQ,YA8BpB;AAEM,MAAM,KAAK,GAAG,CAAC,EAAU,EAAE,EAAE,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAA;AAA7D,QAAA,KAAK,SAAwD"}
|
|
@@ -85,7 +85,7 @@ exports.pluralize = pluralize;
|
|
|
85
85
|
const capitalize = (str) => {
|
|
86
86
|
if (!str)
|
|
87
87
|
return str;
|
|
88
|
-
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
88
|
+
return str.charAt(0).toUpperCase() + str.slice(1).toLowerCase();
|
|
89
89
|
};
|
|
90
90
|
exports.capitalize = capitalize;
|
|
91
91
|
const safeReplace = (content, searchStr, replaceStr) => {
|
|
@@ -93,15 +93,19 @@ const safeReplace = (content, searchStr, replaceStr) => {
|
|
|
93
93
|
return content.replace(searchStr, escapedReplaceStr);
|
|
94
94
|
};
|
|
95
95
|
exports.safeReplace = safeReplace;
|
|
96
|
-
const hasLazyEdit = (content) =>
|
|
97
|
-
content.
|
|
98
|
-
//
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
96
|
+
const hasLazyEdit = (content) => {
|
|
97
|
+
const cleanedContent = content.toLowerCase().trim();
|
|
98
|
+
return (cleanedContent.includes('// rest of the') ||
|
|
99
|
+
cleanedContent.includes('# rest of the') ||
|
|
100
|
+
// Match various comment styles with ellipsis and specific words
|
|
101
|
+
/\/\/\s*\.{3}.*(?:rest|unchanged|keep|file|existing|some).*(?:\.{3})?/.test(cleanedContent) || // C-style single line
|
|
102
|
+
/\/\*\s*\.{3}.*(?:rest|unchanged|keep|file|existing|some).*(?:\.{3})?\s*\*\//.test(cleanedContent) || // C-style multi-line
|
|
103
|
+
/#\s*\.{3}.*(?:rest|unchanged|keep|file|existing|some).*(?:\.{3})?/.test(cleanedContent) || // Python/Ruby style
|
|
104
|
+
/<!--\s*\.{3}.*(?:rest|unchanged|keep|file|existing|some).*(?:\.{3})?\s*-->/.test(cleanedContent) || // HTML style
|
|
105
|
+
/--\s*\.{3}.*(?:rest|unchanged|keep|file|existing|some).*(?:\.{3})?/.test(cleanedContent) || // SQL/Haskell style
|
|
106
|
+
/%\s*\.{3}.*(?:rest|unchanged|keep|file|existing|some).*(?:\.{3})?/.test(cleanedContent) || // MATLAB style
|
|
107
|
+
/{\s*\/\*\s*\.{3}.*(?:rest|unchanged|keep|file|existing|some).*(?:\.{3})?\s*\*\/\s*}/.test(cleanedContent) // JSX style
|
|
108
|
+
);
|
|
109
|
+
};
|
|
106
110
|
exports.hasLazyEdit = hasLazyEdit;
|
|
107
111
|
//# sourceMappingURL=string.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"string.js","sourceRoot":"","sources":["../../src/util/string.ts"],"names":[],"mappings":";;;AAAA,mCAA8B;AAEvB,MAAM,cAAc,GAAG,CAAC,GAAW,EAAE,SAAiB,EAAE,EAAE;IAC/D,IAAI,GAAG,CAAC,MAAM,IAAI,SAAS,EAAE,CAAC;QAC5B,OAAO,GAAG,CAAA;IACZ,CAAC;IACD,OAAO,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,SAAS,CAAC,GAAG,KAAK,CAAA;AACxC,CAAC,CAAA;AALY,QAAA,cAAc,kBAK1B;AAEM,MAAM,qCAAqC,GAAG,CACnD,OAAe,EACf,WAAmB,EACX,EAAE;IACV,MAAM,eAAe,GAAG;QACtB,kCAAkC;QAClC;YACE,KAAK,EACH,0FAA0F;YAC5F,WAAW,EAAE,WAAW;SACzB;QACD,gEAAgE;QAChE;YACE,KAAK,EACH,2EAA2E;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