kecare-tools 1.0.0-beta.48 → 1.0.0-beta.50
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/__VERSION__.ts +1 -1
- package/index.ts +54 -0
- package/package.json +1 -1
package/__VERSION__.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const __VERSION__ = '1.0.0-beta.
|
|
1
|
+
export const __VERSION__ = '1.0.0-beta.50'
|
package/index.ts
CHANGED
|
@@ -13,6 +13,15 @@ export type Article = {
|
|
|
13
13
|
headings: Heading[];
|
|
14
14
|
hidden?: boolean;
|
|
15
15
|
filename?: string;
|
|
16
|
+
translate?: boolean;
|
|
17
|
+
targetLanguage?: string;
|
|
18
|
+
Variant: ArticleVariant;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
type ArticleVariant = {
|
|
22
|
+
title: string | undefined;
|
|
23
|
+
contentHtml: string | undefined;
|
|
24
|
+
language: string | undefined;
|
|
16
25
|
};
|
|
17
26
|
|
|
18
27
|
export type HeadingH1 = {
|
|
@@ -28,6 +37,51 @@ export type HeadingH2 = {
|
|
|
28
37
|
};
|
|
29
38
|
export type Heading = HeadingH1 | HeadingH2;
|
|
30
39
|
|
|
40
|
+
/**
|
|
41
|
+
* Translation configuration (user-configurable settings)
|
|
42
|
+
*/
|
|
43
|
+
export type TranslationConfigOptions = {
|
|
44
|
+
/**
|
|
45
|
+
* Model name (e.g., 'deepseek-chat', 'gpt-4', etc.)
|
|
46
|
+
*/
|
|
47
|
+
model?: string;
|
|
48
|
+
/**
|
|
49
|
+
* API base URL
|
|
50
|
+
*/
|
|
51
|
+
baseUrl?: string;
|
|
52
|
+
/**
|
|
53
|
+
* API key
|
|
54
|
+
*/
|
|
55
|
+
apiKey?: string;
|
|
56
|
+
/**
|
|
57
|
+
* Additional system prompts
|
|
58
|
+
*/
|
|
59
|
+
additionalPrompts?: string[];
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
export type TranslateCallOptions = {
|
|
63
|
+
/**
|
|
64
|
+
* Text to translate
|
|
65
|
+
*/
|
|
66
|
+
text: string;
|
|
67
|
+
/**
|
|
68
|
+
* Target language (optional, defaults to TranslationConfig.targetLanguage)
|
|
69
|
+
*/
|
|
70
|
+
targetLanguage?: string;
|
|
71
|
+
/**
|
|
72
|
+
* Model name (optional, defaults to TranslationConfig.model)
|
|
73
|
+
*/
|
|
74
|
+
model?: string;
|
|
75
|
+
/**
|
|
76
|
+
* Additional system prompts (optional, defaults to TranslationConfig.additionalPrompts)
|
|
77
|
+
*/
|
|
78
|
+
additionalPrompts?: string[];
|
|
79
|
+
/*
|
|
80
|
+
*
|
|
81
|
+
*/
|
|
82
|
+
title: string;
|
|
83
|
+
};
|
|
84
|
+
|
|
31
85
|
export type ArticleListGenerator = (params: { projectPath: string; article: Article; articles: Article[]; NavItems: NavItem[] }) => Promise<{
|
|
32
86
|
path: string;
|
|
33
87
|
template: string;
|