@waterwx/dsh-novel-forge 1.3.3 → 1.4.1
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/lib/client.js +1126 -584
- package/lib/client.js.map +1 -1
- package/lib/index.js +468 -31
- package/lib/index.js.map +1 -1
- package/lib/types/bookshelf.d.ts +5 -0
- package/lib/types/client/api.d.ts +10 -0
- package/lib/types/client/locales.d.ts +4 -2
- package/lib/types/client/panel/ImportModal.d.ts +7 -0
- package/lib/types/client/panel/ShelfView.d.ts +3 -1
- package/lib/types/engine.d.ts +32 -0
- package/lib/types/index.d.ts +2 -0
- package/lib/types/protocol.d.ts +74 -0
- package/package.json +97 -97
- package/src/bookshelf.ts +16 -0
- package/src/client/api.ts +435 -410
- package/src/client/locales.ts +7 -3
- package/src/client/panel/ImportModal.tsx +293 -0
- package/src/client/panel/NovelPanel.tsx +5132 -5046
- package/src/client/panel/ShelfView.tsx +249 -236
- package/src/client/panel/panel.module.css +3114 -2941
- package/src/engine.ts +3172 -2943
- package/src/index.ts +6 -0
- package/src/protocol.ts +1277 -1207
- package/src/routes.ts +2409 -2272
package/src/index.ts
CHANGED
|
@@ -48,6 +48,8 @@ export interface Config {
|
|
|
48
48
|
model?: string
|
|
49
49
|
/** LLM reasoning effort (off/low/high/max). */
|
|
50
50
|
reasoningEffort?: 'off' | 'low' | 'high' | 'max'
|
|
51
|
+
/** 分析类任务(提炼/拆书/反推大纲等)的推理档位;默认 low。 */
|
|
52
|
+
analysisReasoning?: 'off' | 'low' | 'high' | 'max'
|
|
51
53
|
/** Target characters per chapter. */
|
|
52
54
|
chapterChars?: number
|
|
53
55
|
/** Max output tokens per chapter call. */
|
|
@@ -76,6 +78,7 @@ export const Config: z<Config> = z.object({
|
|
|
76
78
|
provider: z.string().default('deepseek-official'),
|
|
77
79
|
model: z.string().default('deepseek-v4-flash'),
|
|
78
80
|
reasoningEffort: z.union(['off', 'low', 'high', 'max']).default('off'),
|
|
81
|
+
analysisReasoning: z.union(['off', 'low', 'high', 'max']).default('low'),
|
|
79
82
|
chapterChars: z.number().default(3500),
|
|
80
83
|
maxTokens: z.number().default(12000),
|
|
81
84
|
reviewPassScore: z.number().default(70),
|
|
@@ -94,6 +97,7 @@ const DEFAULT_OUTPUT_DIR = join(homedir(), '.dsh', 'novels')
|
|
|
94
97
|
const DEFAULT_PROVIDER = 'deepseek-official'
|
|
95
98
|
const DEFAULT_MODEL = 'deepseek-v4-flash'
|
|
96
99
|
const DEFAULT_REASONING_EFFORT = 'off' as const
|
|
100
|
+
const DEFAULT_ANALYSIS_REASONING = 'low' as const
|
|
97
101
|
const DEFAULT_CHAPTER_CHARS = 3500
|
|
98
102
|
const DEFAULT_MAX_TOKENS = 12000
|
|
99
103
|
const DEFAULT_REVIEW_PASS_SCORE = 70
|
|
@@ -115,6 +119,7 @@ export function resolveConfig(value: Partial<Config> | undefined): NovelConfig {
|
|
|
115
119
|
provider: value?.provider ?? DEFAULT_PROVIDER,
|
|
116
120
|
model: value?.model ?? DEFAULT_MODEL,
|
|
117
121
|
reasoningEffort: value?.reasoningEffort ?? DEFAULT_REASONING_EFFORT,
|
|
122
|
+
analysisReasoning: value?.analysisReasoning ?? DEFAULT_ANALYSIS_REASONING,
|
|
118
123
|
chapterChars: value?.chapterChars ?? DEFAULT_CHAPTER_CHARS,
|
|
119
124
|
maxTokens: value?.maxTokens ?? DEFAULT_MAX_TOKENS,
|
|
120
125
|
reviewPassScore: value?.reviewPassScore ?? DEFAULT_REVIEW_PASS_SCORE,
|
|
@@ -153,6 +158,7 @@ export function apply(ctx: Context, config?: Config): void {
|
|
|
153
158
|
if (patch.provider !== undefined) next.provider = patch.provider
|
|
154
159
|
if (patch.model !== undefined) next.model = patch.model
|
|
155
160
|
if (patch.reasoningEffort !== undefined) next.reasoningEffort = patch.reasoningEffort
|
|
161
|
+
if (patch.analysisReasoning !== undefined) next.analysisReasoning = patch.analysisReasoning
|
|
156
162
|
if (patch.chapterChars !== undefined) next.chapterChars = patch.chapterChars
|
|
157
163
|
if (patch.maxTokens !== undefined) next.maxTokens = patch.maxTokens
|
|
158
164
|
if (patch.reviewPassScore !== undefined) next.reviewPassScore = patch.reviewPassScore
|