cckit 0.1.4 → 0.1.5
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/README.md +20 -4
- package/dist/commands.d.ts.map +1 -1
- package/dist/commands.js +4 -0
- package/dist/commands.js.map +1 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +13 -0
- package/dist/config.js.map +1 -1
- package/dist/i18n.d.ts.map +1 -1
- package/dist/i18n.js +2 -0
- package/dist/i18n.js.map +1 -1
- package/dist/index.js +87 -122
- package/dist/index.js.map +1 -1
- package/dist/providers.d.ts.map +1 -1
- package/dist/providers.js +11 -0
- package/dist/providers.js.map +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/constants.d.ts +65 -0
- package/dist/utils/constants.d.ts.map +1 -0
- package/dist/utils/constants.js +66 -0
- package/dist/utils/constants.js.map +1 -0
- package/dist/utils/errors.d.ts +64 -0
- package/dist/utils/errors.d.ts.map +1 -0
- package/dist/utils/errors.js +92 -0
- package/dist/utils/errors.js.map +1 -0
- package/dist/utils/helpers.d.ts +68 -0
- package/dist/utils/helpers.d.ts.map +1 -0
- package/dist/utils/helpers.js +115 -0
- package/dist/utils/helpers.js.map +1 -0
- package/dist/utils/index.d.ts +8 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +8 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/logger.d.ts +38 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +68 -0
- package/dist/utils/logger.js.map +1 -0
- package/package.json +15 -6
package/dist/providers.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"providers.d.ts","sourceRoot":"","sources":["../src/providers.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAE/E,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"providers.d.ts","sourceRoot":"","sources":["../src/providers.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAE/E,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAgE3D,CAAC;AAEF,wBAAgB,kBAAkB,CAAC,YAAY,EAAE,MAAM,GAAG,cAAc,GAAG,SAAS,CAEnF;AAgED,wBAAsB,YAAY,CAAC,QAAQ,EAAE,aAAa,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAmBvF"}
|
package/dist/providers.js
CHANGED
|
@@ -52,6 +52,17 @@ export const PROVIDER_CONFIGS = {
|
|
|
52
52
|
api_version_header: ['anthropic-version', '2023-06-01'],
|
|
53
53
|
capabilities: ['Model Gateway', 'Multi-provider', 'Claude Compatible', 'Load Balancing'],
|
|
54
54
|
},
|
|
55
|
+
streamlake: {
|
|
56
|
+
provider_type: 'streamlake',
|
|
57
|
+
display_name: 'Kuaishou StreamLake',
|
|
58
|
+
default_model: 'kat-coder-pro-v1',
|
|
59
|
+
base_url: 'https://wanqing.streamlakeapi.com/api/gateway/v1/endpoints/kat-coder-pro-v1/claude-code-proxy',
|
|
60
|
+
auth_header_name: 'Authorization',
|
|
61
|
+
auth_prefix: 'Bearer ',
|
|
62
|
+
endpoint: '/v1/messages',
|
|
63
|
+
api_version_header: ['anthropic-version', '2023-06-01'],
|
|
64
|
+
capabilities: ['Chat', 'Code Generation', 'Chinese Support', 'Video Understanding', 'Multimodal'],
|
|
65
|
+
},
|
|
55
66
|
};
|
|
56
67
|
export function findProviderConfig(providerType) {
|
|
57
68
|
return PROVIDER_CONFIGS[providerType];
|
package/dist/providers.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"providers.js","sourceRoot":"","sources":["../src/providers.ts"],"names":[],"mappings":"AAAA,OAAO,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}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export interface ModelProvider {
|
|
2
2
|
id: string;
|
|
3
3
|
name: string;
|
|
4
|
-
provider_type: 'zhipu' | 'minimax' | 'kimi' | 'claude' | 'zenmux';
|
|
4
|
+
provider_type: 'zhipu' | 'minimax' | 'kimi' | 'claude' | 'zenmux' | 'streamlake';
|
|
5
5
|
api_key: string;
|
|
6
6
|
base_url?: string;
|
|
7
7
|
models: string[];
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,QAAQ,GAAG,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,QAAQ,GAAG,QAAQ,GAAG,YAAY,CAAC;IACjF,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,WAAW;IAC1B,SAAS,EAAE,aAAa,EAAE,CAAC;IAC3B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,SAAS;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB;AAED,MAAM,WAAW,cAAc;IAC7B,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,MAAM,CAAC;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,kBAAkB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB;AAED,MAAM,WAAW,cAAc;IAC7B,GAAG,EAAE;QACH,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;KACvB,CAAC;IACF,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Application constants
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Current version of the application
|
|
6
|
+
* Injected by scripts/inject-version.js during build
|
|
7
|
+
*/
|
|
8
|
+
export declare const APP_VERSION = "0.1.5";
|
|
9
|
+
/**
|
|
10
|
+
* Default base URLs for providers
|
|
11
|
+
*/
|
|
12
|
+
export declare const DEFAULT_BASE_URLS: Readonly<{
|
|
13
|
+
readonly zhipu: "https://open.bigmodel.cn/api/anthropic";
|
|
14
|
+
readonly minimax: "https://api.minimaxi.com/anthropic";
|
|
15
|
+
readonly kimi: "https://api.kimi.com/coding/";
|
|
16
|
+
readonly zenmux: "https://zenmux.ai/api/anthropic";
|
|
17
|
+
readonly streamlake: "https://wanqing.streamlakeapi.com/api/gateway/v1/endpoints/kat-coder-pro-v1/claude-code-proxy";
|
|
18
|
+
}>;
|
|
19
|
+
/**
|
|
20
|
+
* Default models for providers
|
|
21
|
+
*/
|
|
22
|
+
export declare const DEFAULT_MODELS: Readonly<{
|
|
23
|
+
readonly zhipu: "GLM-4.7";
|
|
24
|
+
readonly minimax: "MiniMax-M2";
|
|
25
|
+
readonly kimi: "kimi-for-coding";
|
|
26
|
+
readonly zenmux: "claude-3-5-sonnet-20241022";
|
|
27
|
+
readonly claude: "claude-3-5-sonnet-20241022";
|
|
28
|
+
readonly streamlake: "kat-coder-pro-v1";
|
|
29
|
+
}>;
|
|
30
|
+
/**
|
|
31
|
+
* Provider type enum
|
|
32
|
+
*/
|
|
33
|
+
export declare enum ProviderType {
|
|
34
|
+
ZHIPU = "zhipu",
|
|
35
|
+
MINIMAX = "minimax",
|
|
36
|
+
KIMI = "kimi",
|
|
37
|
+
CLAUDE = "claude",
|
|
38
|
+
ZENMUX = "zenmux",
|
|
39
|
+
STREAMLAKE = "streamlake"
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* File paths
|
|
43
|
+
*/
|
|
44
|
+
export declare const PATHS: Readonly<{
|
|
45
|
+
readonly CONFIG_DIR: ".cckit";
|
|
46
|
+
readonly CONFIG_FILE: "config.json";
|
|
47
|
+
readonly CLAUDE_DIR: ".claude";
|
|
48
|
+
readonly CLAUDE_SETTINGS: "settings.json";
|
|
49
|
+
}>;
|
|
50
|
+
/**
|
|
51
|
+
* Timeouts in milliseconds
|
|
52
|
+
*/
|
|
53
|
+
export declare const TIMEOUTS: Readonly<{
|
|
54
|
+
readonly CLI_CHECK: 5000;
|
|
55
|
+
readonly API_REQUEST: 10000;
|
|
56
|
+
readonly USER_INPUT: 60000;
|
|
57
|
+
}>;
|
|
58
|
+
/**
|
|
59
|
+
* API registry mirrors
|
|
60
|
+
*/
|
|
61
|
+
export declare const NPM_REGISTRIES: Readonly<{
|
|
62
|
+
readonly DEFAULT: "https://registry.npmjs.org";
|
|
63
|
+
readonly NPMMIRROR: "https://registry.npmmirror.com";
|
|
64
|
+
}>;
|
|
65
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/utils/constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;GAGG;AACH,eAAO,MAAM,WAAW,UAAU,CAAC;AAEnC;;GAEG;AACH,eAAO,MAAM,iBAAiB;;;;;;EAMnB,CAAC;AAEZ;;GAEG;AACH,eAAO,MAAM,cAAc;;;;;;;EAOhB,CAAC;AAEZ;;GAEG;AACH,oBAAY,YAAY;IACtB,KAAK,UAAU;IACf,OAAO,YAAY;IACnB,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,UAAU,eAAe;CAC1B;AAED;;GAEG;AACH,eAAO,MAAM,KAAK;;;;;EAKP,CAAC;AAEZ;;GAEG;AACH,eAAO,MAAM,QAAQ;;;;EAIV,CAAC;AAEZ;;GAEG;AACH,eAAO,MAAM,cAAc;;;EAGhB,CAAC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Application constants
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Current version of the application
|
|
6
|
+
* Injected by scripts/inject-version.js during build
|
|
7
|
+
*/
|
|
8
|
+
export const APP_VERSION = '0.1.5';
|
|
9
|
+
/**
|
|
10
|
+
* Default base URLs for providers
|
|
11
|
+
*/
|
|
12
|
+
export const DEFAULT_BASE_URLS = Object.freeze({
|
|
13
|
+
zhipu: 'https://open.bigmodel.cn/api/anthropic',
|
|
14
|
+
minimax: 'https://api.minimaxi.com/anthropic',
|
|
15
|
+
kimi: 'https://api.kimi.com/coding/',
|
|
16
|
+
zenmux: 'https://zenmux.ai/api/anthropic',
|
|
17
|
+
streamlake: 'https://wanqing.streamlakeapi.com/api/gateway/v1/endpoints/kat-coder-pro-v1/claude-code-proxy',
|
|
18
|
+
});
|
|
19
|
+
/**
|
|
20
|
+
* Default models for providers
|
|
21
|
+
*/
|
|
22
|
+
export const DEFAULT_MODELS = Object.freeze({
|
|
23
|
+
zhipu: 'GLM-4.7',
|
|
24
|
+
minimax: 'MiniMax-M2',
|
|
25
|
+
kimi: 'kimi-for-coding',
|
|
26
|
+
zenmux: 'claude-3-5-sonnet-20241022',
|
|
27
|
+
claude: 'claude-3-5-sonnet-20241022',
|
|
28
|
+
streamlake: 'kat-coder-pro-v1',
|
|
29
|
+
});
|
|
30
|
+
/**
|
|
31
|
+
* Provider type enum
|
|
32
|
+
*/
|
|
33
|
+
export var ProviderType;
|
|
34
|
+
(function (ProviderType) {
|
|
35
|
+
ProviderType["ZHIPU"] = "zhipu";
|
|
36
|
+
ProviderType["MINIMAX"] = "minimax";
|
|
37
|
+
ProviderType["KIMI"] = "kimi";
|
|
38
|
+
ProviderType["CLAUDE"] = "claude";
|
|
39
|
+
ProviderType["ZENMUX"] = "zenmux";
|
|
40
|
+
ProviderType["STREAMLAKE"] = "streamlake";
|
|
41
|
+
})(ProviderType || (ProviderType = {}));
|
|
42
|
+
/**
|
|
43
|
+
* File paths
|
|
44
|
+
*/
|
|
45
|
+
export const PATHS = Object.freeze({
|
|
46
|
+
CONFIG_DIR: '.cckit',
|
|
47
|
+
CONFIG_FILE: 'config.json',
|
|
48
|
+
CLAUDE_DIR: '.claude',
|
|
49
|
+
CLAUDE_SETTINGS: 'settings.json',
|
|
50
|
+
});
|
|
51
|
+
/**
|
|
52
|
+
* Timeouts in milliseconds
|
|
53
|
+
*/
|
|
54
|
+
export const TIMEOUTS = Object.freeze({
|
|
55
|
+
CLI_CHECK: 5000,
|
|
56
|
+
API_REQUEST: 10000,
|
|
57
|
+
USER_INPUT: 60000,
|
|
58
|
+
});
|
|
59
|
+
/**
|
|
60
|
+
* API registry mirrors
|
|
61
|
+
*/
|
|
62
|
+
export const NPM_REGISTRIES = Object.freeze({
|
|
63
|
+
DEFAULT: 'https://registry.npmjs.org',
|
|
64
|
+
NPMMIRROR: 'https://registry.npmmirror.com',
|
|
65
|
+
});
|
|
66
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/utils/constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;GAGG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,OAAO,CAAC;AAEnC;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,CAAC;IAC7C,KAAK,EAAE,wCAAwC;IAC/C,OAAO,EAAE,oCAAoC;IAC7C,IAAI,EAAE,8BAA8B;IACpC,MAAM,EAAE,iCAAiC;IACzC,UAAU,EAAE,+FAA+F;CACnG,CAAC,CAAC;AAEZ;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,CAAC;IAC1C,KAAK,EAAE,SAAS;IAChB,OAAO,EAAE,YAAY;IACrB,IAAI,EAAE,iBAAiB;IACvB,MAAM,EAAE,4BAA4B;IACpC,MAAM,EAAE,4BAA4B;IACpC,UAAU,EAAE,kBAAkB;CACtB,CAAC,CAAC;AAEZ;;GAEG;AACH,MAAM,CAAN,IAAY,YAOX;AAPD,WAAY,YAAY;IACtB,+BAAe,CAAA;IACf,mCAAmB,CAAA;IACnB,6BAAa,CAAA;IACb,iCAAiB,CAAA;IACjB,iCAAiB,CAAA;IACjB,yCAAyB,CAAA;AAC3B,CAAC,EAPW,YAAY,KAAZ,YAAY,QAOvB;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC;IACjC,UAAU,EAAE,QAAQ;IACpB,WAAW,EAAE,aAAa;IAC1B,UAAU,EAAE,SAAS;IACrB,eAAe,EAAE,eAAe;CACxB,CAAC,CAAC;AAEZ;;GAEG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC;IACpC,SAAS,EAAE,IAAI;IACf,WAAW,EAAE,KAAK;IAClB,UAAU,EAAE,KAAK;CACT,CAAC,CAAC;AAEZ;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,CAAC;IAC1C,OAAO,EAAE,4BAA4B;IACrC,SAAS,EAAE,gCAAgC;CACnC,CAAC,CAAC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Custom error classes
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Base error class for application errors
|
|
6
|
+
*/
|
|
7
|
+
export declare class CCKitError extends Error {
|
|
8
|
+
readonly code: string;
|
|
9
|
+
readonly details?: unknown | undefined;
|
|
10
|
+
constructor(message: string, code: string, details?: unknown | undefined);
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Error thrown when a provider is not found
|
|
14
|
+
*/
|
|
15
|
+
export declare class ProviderNotFoundError extends CCKitError {
|
|
16
|
+
constructor(providerId: string);
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Error thrown when a provider is not configured
|
|
20
|
+
*/
|
|
21
|
+
export declare class ProviderNotConfiguredError extends CCKitError {
|
|
22
|
+
constructor(providerId: string);
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Error thrown when a model is not found in provider
|
|
26
|
+
*/
|
|
27
|
+
export declare class ModelNotFoundError extends CCKitError {
|
|
28
|
+
constructor(modelName: string, providerId: string);
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Error thrown when configuration file is invalid
|
|
32
|
+
*/
|
|
33
|
+
export declare class InvalidConfigError extends CCKitError {
|
|
34
|
+
readonly filePath?: string | undefined;
|
|
35
|
+
constructor(message: string, filePath?: string | undefined);
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Error thrown when Claude Code installation check fails
|
|
39
|
+
*/
|
|
40
|
+
export declare class ClaudeCodeNotInstalledError extends CCKitError {
|
|
41
|
+
constructor();
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Error thrown when an operation times out
|
|
45
|
+
*/
|
|
46
|
+
export declare class TimeoutError extends CCKitError {
|
|
47
|
+
constructor(operation: string, timeout: number);
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Error thrown when file system operation fails
|
|
51
|
+
*/
|
|
52
|
+
export declare class FileSystemError extends CCKitError {
|
|
53
|
+
readonly originalError?: Error | undefined;
|
|
54
|
+
constructor(operation: string, filePath: string, originalError?: Error | undefined);
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Type guard to check if error is a CCKitError
|
|
58
|
+
*/
|
|
59
|
+
export declare function isCCKitError(error: unknown): error is CCKitError;
|
|
60
|
+
/**
|
|
61
|
+
* Gets a user-friendly error message
|
|
62
|
+
*/
|
|
63
|
+
export declare function getErrorMessage(error: unknown): string;
|
|
64
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/utils/errors.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,qBAAa,UAAW,SAAQ,KAAK;aAGjB,IAAI,EAAE,MAAM;aACZ,OAAO,CAAC,EAAE,OAAO;gBAFjC,OAAO,EAAE,MAAM,EACC,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,OAAO,YAAA;CAMpC;AAED;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,UAAU;gBACvC,UAAU,EAAE,MAAM;CAO/B;AAED;;GAEG;AACH,qBAAa,0BAA2B,SAAQ,UAAU;gBAC5C,UAAU,EAAE,MAAM;CAO/B;AAED;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,UAAU;gBACpC,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM;CAOlD;AAED;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,UAAU;aACH,QAAQ,CAAC,EAAE,MAAM;gBAAlD,OAAO,EAAE,MAAM,EAAkB,QAAQ,CAAC,EAAE,MAAM,YAAA;CAO/D;AAED;;GAEG;AACH,qBAAa,2BAA4B,SAAQ,UAAU;;CAO1D;AAED;;GAEG;AACH,qBAAa,YAAa,SAAQ,UAAU;gBAC9B,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;CAO/C;AAED;;GAEG;AACH,qBAAa,eAAgB,SAAQ,UAAU;aAI3B,aAAa,CAAC,EAAE,KAAK;gBAFrC,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,EACA,aAAa,CAAC,EAAE,KAAK,YAAA;CAQxC;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,UAAU,CAEhE;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAUtD"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Custom error classes
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Base error class for application errors
|
|
6
|
+
*/
|
|
7
|
+
export class CCKitError extends Error {
|
|
8
|
+
constructor(message, code, details) {
|
|
9
|
+
super(message);
|
|
10
|
+
this.code = code;
|
|
11
|
+
this.details = details;
|
|
12
|
+
this.name = this.constructor.name;
|
|
13
|
+
Error.captureStackTrace(this, this.constructor);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Error thrown when a provider is not found
|
|
18
|
+
*/
|
|
19
|
+
export class ProviderNotFoundError extends CCKitError {
|
|
20
|
+
constructor(providerId) {
|
|
21
|
+
super(`Provider '${providerId}' not found`, 'PROVIDER_NOT_FOUND', { providerId });
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Error thrown when a provider is not configured
|
|
26
|
+
*/
|
|
27
|
+
export class ProviderNotConfiguredError extends CCKitError {
|
|
28
|
+
constructor(providerId) {
|
|
29
|
+
super(`Provider '${providerId}' is not configured with an API key`, 'PROVIDER_NOT_CONFIGURED', { providerId });
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Error thrown when a model is not found in provider
|
|
34
|
+
*/
|
|
35
|
+
export class ModelNotFoundError extends CCKitError {
|
|
36
|
+
constructor(modelName, providerId) {
|
|
37
|
+
super(`Model '${modelName}' not found in provider '${providerId}'`, 'MODEL_NOT_FOUND', { modelName, providerId });
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Error thrown when configuration file is invalid
|
|
42
|
+
*/
|
|
43
|
+
export class InvalidConfigError extends CCKitError {
|
|
44
|
+
constructor(message, filePath) {
|
|
45
|
+
super(`Invalid configuration: ${message}`, 'INVALID_CONFIG', { filePath });
|
|
46
|
+
this.filePath = filePath;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Error thrown when Claude Code installation check fails
|
|
51
|
+
*/
|
|
52
|
+
export class ClaudeCodeNotInstalledError extends CCKitError {
|
|
53
|
+
constructor() {
|
|
54
|
+
super('Claude Code is not installed', 'CLAUDE_CODE_NOT_INSTALLED');
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Error thrown when an operation times out
|
|
59
|
+
*/
|
|
60
|
+
export class TimeoutError extends CCKitError {
|
|
61
|
+
constructor(operation, timeout) {
|
|
62
|
+
super(`${operation} timed out after ${timeout}ms`, 'TIMEOUT', { operation, timeout });
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Error thrown when file system operation fails
|
|
67
|
+
*/
|
|
68
|
+
export class FileSystemError extends CCKitError {
|
|
69
|
+
constructor(operation, filePath, originalError) {
|
|
70
|
+
super(`Failed to ${operation} file: ${filePath}`, 'FILESYSTEM_ERROR', { filePath, originalError: originalError?.message });
|
|
71
|
+
this.originalError = originalError;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Type guard to check if error is a CCKitError
|
|
76
|
+
*/
|
|
77
|
+
export function isCCKitError(error) {
|
|
78
|
+
return error instanceof CCKitError;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Gets a user-friendly error message
|
|
82
|
+
*/
|
|
83
|
+
export function getErrorMessage(error) {
|
|
84
|
+
if (isCCKitError(error)) {
|
|
85
|
+
return error.message;
|
|
86
|
+
}
|
|
87
|
+
if (error instanceof Error) {
|
|
88
|
+
return error.message;
|
|
89
|
+
}
|
|
90
|
+
return String(error);
|
|
91
|
+
}
|
|
92
|
+
//# sourceMappingURL=errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/utils/errors.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,MAAM,OAAO,UAAW,SAAQ,KAAK;IACnC,YACE,OAAe,EACC,IAAY,EACZ,OAAiB;QAEjC,KAAK,CAAC,OAAO,CAAC,CAAC;QAHC,SAAI,GAAJ,IAAI,CAAQ;QACZ,YAAO,GAAP,OAAO,CAAU;QAGjC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC;QAClC,KAAK,CAAC,iBAAiB,CAAC,IAAI,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;IAClD,CAAC;CACF;AAED;;GAEG;AACH,MAAM,OAAO,qBAAsB,SAAQ,UAAU;IACnD,YAAY,UAAkB;QAC5B,KAAK,CACH,aAAa,UAAU,aAAa,EACpC,oBAAoB,EACpB,EAAE,UAAU,EAAE,CACf,CAAC;IACJ,CAAC;CACF;AAED;;GAEG;AACH,MAAM,OAAO,0BAA2B,SAAQ,UAAU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OAAO,KAAK,YAAY,UAAU,CAAC;AACrC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,KAAc;IAC5C,IAAI,YAAY,CAAC,KAAK,CAAC,EAAE,CAAC;QACxB,OAAO,KAAK,CAAC,OAAO,CAAC;IACvB,CAAC;IAED,IAAI,KAAK,YAAY,KAAK,EAAE,CAAC;QAC3B,OAAO,KAAK,CAAC,OAAO,CAAC;IACvB,CAAC;IAED,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Helper utility functions
|
|
3
|
+
*/
|
|
4
|
+
import type { ModelProvider } from '../types.js';
|
|
5
|
+
/**
|
|
6
|
+
* Masks an API key for secure display
|
|
7
|
+
* @param apiKey - The API key to mask
|
|
8
|
+
* @param visibleChars - Number of characters to show at the beginning (default: 8)
|
|
9
|
+
* @returns Masked API key string
|
|
10
|
+
*/
|
|
11
|
+
export declare function maskApiKey(apiKey: string, visibleChars?: number): string;
|
|
12
|
+
/**
|
|
13
|
+
* Finds a provider by ID, name, or type
|
|
14
|
+
* @param providers - Array of providers to search
|
|
15
|
+
* @param identifier - Provider ID, name, or type
|
|
16
|
+
* @returns Found provider or undefined
|
|
17
|
+
*/
|
|
18
|
+
export declare function findProvider(providers: ModelProvider[], identifier: string): ModelProvider | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* Provider type mapping configuration
|
|
21
|
+
*/
|
|
22
|
+
export declare const PROVIDER_TYPE_MAP: Record<string, [string, string]>;
|
|
23
|
+
/**
|
|
24
|
+
* Gets provider type and display name from identifier
|
|
25
|
+
* @param identifier - Provider identifier
|
|
26
|
+
* @returns Tuple of [providerType, displayName] or null
|
|
27
|
+
*/
|
|
28
|
+
export declare function getProviderTypeInfo(identifier: string): [string, string] | null;
|
|
29
|
+
/**
|
|
30
|
+
* Formats file size for display
|
|
31
|
+
* @param bytes - Size in bytes
|
|
32
|
+
* @returns Formatted size string
|
|
33
|
+
*/
|
|
34
|
+
export declare function formatBytes(bytes: number): string;
|
|
35
|
+
/**
|
|
36
|
+
* Safely executes a function and handles errors
|
|
37
|
+
* @param fn - Function to execute
|
|
38
|
+
* @param errorHandler - Error handler function
|
|
39
|
+
* @returns Result or undefined if error occurred
|
|
40
|
+
*/
|
|
41
|
+
export declare function safeExecute<T>(fn: () => T, errorHandler?: (error: Error) => void): T | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* Creates a promise that resolves after a delay
|
|
44
|
+
* @param ms - Milliseconds to delay
|
|
45
|
+
* @returns Promise that resolves after delay
|
|
46
|
+
*/
|
|
47
|
+
export declare function delay(ms: number): Promise<void>;
|
|
48
|
+
/**
|
|
49
|
+
* Checks if a value is defined and not null
|
|
50
|
+
* @param value - Value to check
|
|
51
|
+
* @returns True if value is defined and not null
|
|
52
|
+
*/
|
|
53
|
+
export declare function isDefined<T>(value: T | null | undefined): value is T;
|
|
54
|
+
/**
|
|
55
|
+
* Gets the active model for a provider
|
|
56
|
+
* @param provider - Provider configuration
|
|
57
|
+
* @returns Active model name or undefined
|
|
58
|
+
*/
|
|
59
|
+
export declare function getActiveModel(provider: ModelProvider): string | undefined;
|
|
60
|
+
/**
|
|
61
|
+
* Wraps an async function with timeout
|
|
62
|
+
* @param promise - Promise to wrap
|
|
63
|
+
* @param timeoutMs - Timeout in milliseconds
|
|
64
|
+
* @param errorMessage - Error message on timeout
|
|
65
|
+
* @returns Promise that rejects on timeout
|
|
66
|
+
*/
|
|
67
|
+
export declare function withTimeout<T>(promise: Promise<T>, timeoutMs: number, errorMessage?: string): Promise<T>;
|
|
68
|
+
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/utils/helpers.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD;;;;;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
* Helper utility functions
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Masks an API key for secure display
|
|
6
|
+
* @param apiKey - The API key to mask
|
|
7
|
+
* @param visibleChars - Number of characters to show at the beginning (default: 8)
|
|
8
|
+
* @returns Masked API key string
|
|
9
|
+
*/
|
|
10
|
+
export function maskApiKey(apiKey, visibleChars = 8) {
|
|
11
|
+
if (!apiKey || apiKey.length <= visibleChars) {
|
|
12
|
+
return apiKey ? apiKey.substring(0, 4) + '***' : '***';
|
|
13
|
+
}
|
|
14
|
+
return apiKey.substring(0, visibleChars) + '***';
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Finds a provider by ID, name, or type
|
|
18
|
+
* @param providers - Array of providers to search
|
|
19
|
+
* @param identifier - Provider ID, name, or type
|
|
20
|
+
* @returns Found provider or undefined
|
|
21
|
+
*/
|
|
22
|
+
export function findProvider(providers, identifier) {
|
|
23
|
+
return providers.find((p) => p.id === identifier || p.name === identifier || p.provider_type === identifier);
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Provider type mapping configuration
|
|
27
|
+
*/
|
|
28
|
+
export const PROVIDER_TYPE_MAP = {
|
|
29
|
+
zhipu: ['zhipu', '智谱LLM (Zhipu)'],
|
|
30
|
+
'智谱': ['zhipu', '智谱LLM (Zhipu)'],
|
|
31
|
+
minimax: ['minimax', 'MiniMax'],
|
|
32
|
+
kimi: ['kimi', 'Kimi (Moonshot)'],
|
|
33
|
+
claude: ['claude', 'Claude (Official)'],
|
|
34
|
+
zenmux: ['zenmux', 'ZenMux.ai'],
|
|
35
|
+
streamlake: ['streamlake', 'Kuaishou StreamLake'],
|
|
36
|
+
kuaishou: ['streamlake', 'Kuaishou StreamLake'],
|
|
37
|
+
'快手': ['streamlake', 'Kuaishou StreamLake'],
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Gets provider type and display name from identifier
|
|
41
|
+
* @param identifier - Provider identifier
|
|
42
|
+
* @returns Tuple of [providerType, displayName] or null
|
|
43
|
+
*/
|
|
44
|
+
export function getProviderTypeInfo(identifier) {
|
|
45
|
+
return PROVIDER_TYPE_MAP[identifier] || null;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Formats file size for display
|
|
49
|
+
* @param bytes - Size in bytes
|
|
50
|
+
* @returns Formatted size string
|
|
51
|
+
*/
|
|
52
|
+
export function formatBytes(bytes) {
|
|
53
|
+
if (bytes === 0)
|
|
54
|
+
return '0 B';
|
|
55
|
+
const k = 1024;
|
|
56
|
+
const sizes = ['B', 'KB', 'MB', 'GB'];
|
|
57
|
+
const i = Math.floor(Math.log(bytes) / Math.log(k));
|
|
58
|
+
return `${parseFloat((bytes / Math.pow(k, i)).toFixed(2))} ${sizes[i]}`;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Safely executes a function and handles errors
|
|
62
|
+
* @param fn - Function to execute
|
|
63
|
+
* @param errorHandler - Error handler function
|
|
64
|
+
* @returns Result or undefined if error occurred
|
|
65
|
+
*/
|
|
66
|
+
export function safeExecute(fn, errorHandler) {
|
|
67
|
+
try {
|
|
68
|
+
return fn();
|
|
69
|
+
}
|
|
70
|
+
catch (error) {
|
|
71
|
+
const err = error instanceof Error ? error : new Error(String(error));
|
|
72
|
+
if (errorHandler) {
|
|
73
|
+
errorHandler(err);
|
|
74
|
+
}
|
|
75
|
+
return undefined;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Creates a promise that resolves after a delay
|
|
80
|
+
* @param ms - Milliseconds to delay
|
|
81
|
+
* @returns Promise that resolves after delay
|
|
82
|
+
*/
|
|
83
|
+
export function delay(ms) {
|
|
84
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Checks if a value is defined and not null
|
|
88
|
+
* @param value - Value to check
|
|
89
|
+
* @returns True if value is defined and not null
|
|
90
|
+
*/
|
|
91
|
+
export function isDefined(value) {
|
|
92
|
+
return value !== null && value !== undefined;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Gets the active model for a provider
|
|
96
|
+
* @param provider - Provider configuration
|
|
97
|
+
* @returns Active model name or undefined
|
|
98
|
+
*/
|
|
99
|
+
export function getActiveModel(provider) {
|
|
100
|
+
return provider.current_model || provider.models[0];
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Wraps an async function with timeout
|
|
104
|
+
* @param promise - Promise to wrap
|
|
105
|
+
* @param timeoutMs - Timeout in milliseconds
|
|
106
|
+
* @param errorMessage - Error message on timeout
|
|
107
|
+
* @returns Promise that rejects on timeout
|
|
108
|
+
*/
|
|
109
|
+
export function withTimeout(promise, timeoutMs, errorMessage = 'Operation timed out') {
|
|
110
|
+
return Promise.race([
|
|
111
|
+
promise,
|
|
112
|
+
new Promise((_, reject) => setTimeout(() => reject(new Error(errorMessage)), timeoutMs)),
|
|
113
|
+
]);
|
|
114
|
+
}
|
|
115
|
+
//# sourceMappingURL=helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../src/utils/helpers.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH;;;;;GAKG;AACH,MAAM,UAAU,UAAU,CAAC,MAAc,EAAE,eAAuB,CAAC;IACjE,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC,MAAM,IAAI,YAAY,EAAE,CAAC;QAC7C,OAAO,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC;IACzD,CAAC;IACD,OAAO,MAAM,CAAC,SAAS,CAAC,CAAC,EAAE,YAAY,CAAC,GAAG,KAAK,CAAC;AACnD,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,YAAY,CAC1B,SAA0B,EAC1B,UAAkB;IAElB,OAAO,SAAS,CAAC,IAAI,CAC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CAAC,YAAY,CAAC,CAAC,EAAE,SAAS,CAAC,CAC7D;KACF,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Logging utilities
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Log levels
|
|
6
|
+
*/
|
|
7
|
+
export declare enum LogLevel {
|
|
8
|
+
DEBUG = 0,
|
|
9
|
+
INFO = 1,
|
|
10
|
+
WARN = 2,
|
|
11
|
+
ERROR = 3,
|
|
12
|
+
SUCCESS = 4
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Simple logger class
|
|
16
|
+
*/
|
|
17
|
+
export declare class Logger {
|
|
18
|
+
private level;
|
|
19
|
+
setLevel(level: LogLevel): void;
|
|
20
|
+
debug(message: string, ...args: unknown[]): void;
|
|
21
|
+
info(message: string, ...args: unknown[]): void;
|
|
22
|
+
warn(message: string, ...args: unknown[]): void;
|
|
23
|
+
error(message: string, ...args: unknown[]): void;
|
|
24
|
+
success(message: string, ...args: unknown[]): void;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Global logger instance
|
|
28
|
+
*/
|
|
29
|
+
export declare const logger: Logger;
|
|
30
|
+
/**
|
|
31
|
+
* Sets the log level
|
|
32
|
+
*/
|
|
33
|
+
export declare function setLogLevel(level: LogLevel): void;
|
|
34
|
+
/**
|
|
35
|
+
* Enables debug mode
|
|
36
|
+
*/
|
|
37
|
+
export declare function enableDebugMode(): void;
|
|
38
|
+
//# sourceMappingURL=logger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/utils/logger.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH;;GAEG;AACH,oBAAY,QAAQ;IAClB,KAAK,IAAI;IACT,IAAI,IAAI;IACR,IAAI,IAAI;IACR,KAAK,IAAI;IACT,OAAO,IAAI;CACZ;AAED;;GAEG;AACH,qBAAa,MAAM;IACjB,OAAO,CAAC,KAAK,CAA2B;IAExC,QAAQ,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI;IAI/B,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI;IAMhD,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI;IAM/C,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI;IAM/C,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI;IAMhD,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI;CAKnD;AAED;;GAEG;AACH,eAAO,MAAM,MAAM,QAAe,CAAC;AAEnC;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI,CAEjD;AAED;;GAEG;AACH,wBAAgB,eAAe,IAAI,IAAI,CAEtC"}
|