@surfishs/dsh-prompt-enhance 0.1.5 → 0.1.7
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.en.md +7 -3
- package/README.md +10 -4
- package/lib/client.js +16 -8
- package/lib/index.js +1 -1
- package/lib/index.js.map +2 -2
- package/package.json +1 -1
- package/src/client/UndoBar.tsx +14 -1
- package/src/client/locales.ts +2 -2
- package/src/client/shortcut.ts +26 -10
- package/src/config.ts +1 -1
package/README.en.md
CHANGED
|
@@ -11,7 +11,9 @@
|
|
|
11
11
|
|
|
12
12
|
[简体中文](./README.md) | English
|
|
13
13
|
|
|
14
|
-
**Prompt enhancement for the DeepSeek Harness web GUI** — turn a composer draft into a structured prompt in one click: role and goal, context and constraints, executable steps, output format, acceptance criteria, edge cases.
|
|
14
|
+
**Prompt enhancement for the DeepSeek Harness web GUI** — turn a composer draft into a structured prompt in one click: role and goal, context and constraints, executable steps, output format, acceptance criteria, edge cases.
|
|
15
|
+
|
|
16
|
+
The draft is the source of truth: intent unchanged, no invented requirements, a placeholder wherever information is missing — and it is never modified, not even when a call fails. The result appears in a card above the composer, is written back only when you apply it, and one click undoes that.
|
|
15
17
|
|
|
16
18
|

|
|
17
19
|
|
|
@@ -19,9 +21,11 @@
|
|
|
19
21
|
|
|
20
22
|
## Why you need it
|
|
21
23
|
|
|
22
|
-
|
|
24
|
+
Users tend to open with a pleading "So… could you help me out?" — and that alone often sends the model off-course: it drifts from what you meant and fills in the gaps itself. That is not the user's fault: what is hard is rarely the thinking, it is turning what you have thought through into a form the model can follow.
|
|
25
|
+
|
|
26
|
+
A good prompt spells out six things: who the model acts as and what it delivers, the context and constraints it works under, which steps it takes, in what format, what counts as correct, and where the boundaries are.
|
|
23
27
|
|
|
24
|
-
The plugin adds a Prompt enhancement button to the composer toolbar: one click sends the draft to DSH's model service, which rewrites it around those
|
|
28
|
+
The plugin adds a Prompt enhancement button to the composer toolbar: one click sends the draft to DSH's model service, which rewrites it around those six things as a structured prompt.
|
|
25
29
|
|
|
26
30
|
The result appears in a card docked above the composer without covering the conversation; your draft is never replaced — apply it, copy it, regenerate it, or undo, and the original text can always be restored.
|
|
27
31
|
|
package/README.md
CHANGED
|
@@ -12,7 +12,9 @@
|
|
|
12
12
|
|
|
13
13
|
简体中文 | [English](./README.en.md)
|
|
14
14
|
|
|
15
|
-
**DeepSeek Harness Web GUI 的「提示词增强」插件** ——
|
|
15
|
+
**DeepSeek Harness Web GUI 的「提示词增强」插件** —— 一键把输入框草稿改写为结构化提示词:角色与目标、上下文与约束、可执行步骤、输出格式、验收标准、边界条件。
|
|
16
|
+
|
|
17
|
+
以原文为准:不改变原意、不凭空编造需求;信息不足时留占位。改写不改动你的草稿(出错时也不会):结果先出现在停靠卡里,点「回填」才写回,回填后可一键撤销。
|
|
16
18
|
|
|
17
19
|

|
|
18
20
|
|
|
@@ -20,9 +22,11 @@
|
|
|
20
22
|
|
|
21
23
|
## 为什么需要它
|
|
22
24
|
|
|
23
|
-
|
|
25
|
+
用户往往带着祈求式的「那你能帮帮我吗?」发问。而这往往让模型偏离用户意愿、自行补充内容。问题不在用户身上:难点通常不在想,而在把想过的东西整理成模型能照着做的形式。
|
|
26
|
+
|
|
27
|
+
一段好的提示词会讲清六件事:让模型扮演谁和交付什么、在什么上下文和约束下做、分哪几步、以什么格式、怎样算合格、边界在哪。
|
|
24
28
|
|
|
25
|
-
插件在输入框工具栏加了一个「提示词增强」按钮:点一下,草稿就会交给 DSH
|
|
29
|
+
插件在输入框工具栏加了一个「提示词增强」按钮:点一下,草稿就会交给 DSH 的模型服务,按上面那六件事改写成结构化提示词。
|
|
26
30
|
|
|
27
31
|
结果出现在输入框上方的停靠卡里,不遮挡对话;草稿不会被直接替换——你可以回填、复制、重新生成或撤销,原文随时可恢复。
|
|
28
32
|
|
|
@@ -145,7 +149,7 @@ dsh plugin --profile <profile> remove @surfishs/dsh-prompt-enhance
|
|
|
145
149
|
| `contextAware` | `true` | 读取最近几条消息以消解指代;含敏感内容的会话建议关闭 |
|
|
146
150
|
| `streaming` | `true` | 边写边显示;仅影响显示节奏,最终结果不变 |
|
|
147
151
|
| `systemPrompt` | 空 | 自定义系统提示词;留空使用内置增强策略 |
|
|
148
|
-
| `shortcut` | 空(禁用) | 触发增强的快捷键;例如 `ctrl+alt+shift+e`。须包含 ctrl/alt/meta 中至少一个修饰键,shift
|
|
152
|
+
| `shortcut` | 空(禁用) | 触发增强的快捷键;例如 `ctrl+alt+shift+e`。须包含 ctrl/alt/meta 中至少一个修饰键,shift 可选;F13–F24 这类物理键盘上通常没有、由宏键盘或改键工具发出的键可单独使用(无修饰键);设置页可点「录制」直接按键录入 |
|
|
149
153
|
|
|
150
154
|
### 高级设置
|
|
151
155
|
|
|
@@ -169,6 +173,7 @@ dsh plugin --profile <profile> remove @surfishs/dsh-prompt-enhance
|
|
|
169
173
|
- **仅本机可访问**:增强路由由本机 DSH 宿主提供,信任判断分两层。宿主提供连接校验(`ctx.connection.requestRejection`)时以宿主为准:`Host` 必须是回环或可信主机、`Sec-Fetch-Site` 非 cross-site、`Origin` 与 `Host` 同源,并校验浏览器会话;返回 401/403 即拒绝。宿主放行后,插件只再做结构性检查(socket 回环、`Host` 允许列表、拒绝 `X-Forwarded-For` / `Forwarded`),不再自行判断 `Origin` / `Sec-Fetch-*`——桌面版(Electron 桥接)的请求不带这些头,判断由宿主完成。宿主不提供该服务时退回插件栅栏并记录一次警告,此时按完整规则默认拒绝:缺 `Host`、`Sec-Fetch-Site: cross-site`、非 GET 请求缺 `Origin` 均被拒。宿主提供连接校验时,本机脚本直接调用需要 DSH 会话,否则会收到 401;调试请用 DSH 界面里发起的请求。
|
|
170
174
|
- **只接受 JSON 请求体**:缺 `Content-Type` 或不是 `application/json`(含 `+json` 后缀)的请求返回 415,挡掉表单式的简单跨站请求。
|
|
171
175
|
- **不要经反向代理暴露**:代理会改写 `Host`、可能丢弃 `Origin`,插件看到的就不再是访客的真实来源;带 `X-Forwarded-For` / `Forwarded` 的请求会被直接拒绝,但这不足以让反代场景变安全。请只在本机直连使用,不要把本插件的路由放在反向代理后面。
|
|
176
|
+
- **远程访问下不可用**:当 GUI 不是从本机地址(`127.0.0.1` / `localhost`)打开,而是经由远程访问或中继地址打开时,点增强会失败并返回 `403 forbidden: loopback-only`。这类请求会带上 `X-Forwarded-For`,`Host` 也是非回环域名,而插件的结构性检查不区分转发来源,一律拒绝。这是有意的安全边界,不是故障;请在本机浏览器中使用增强。
|
|
172
177
|
- **提示注入边界**:草稿被包在 `<raw_prompt>` 标签里,草稿内出现的闭合标签会被中和;这能降低标签逃逸风险,但提示词层面的边界是**最佳努力,不是硬保证**。
|
|
173
178
|
- **不保存模型密钥**:插件不读取或存储模型 API key,调用复用 DSH 已有的模型配置与凭据。
|
|
174
179
|
- **上下文仅在开启时发送**:`contextAware` 开启时,最近几条 user/assistant 消息和当前草稿会发给当前配置的模型服务商(默认最多 8 条消息、4000 字符);系统消息、模型推理内容、工具结果和附件不会进入上下文;增强器只会知道草稿附带的附件数量(用于避免误称“没有附件”),不会收到附件内容;它可以在任务描述里写「见附件」这类指代,但不会据此描述或推断其内容;只统计你本人发送的消息与助手回复,DSH 注入的环境/技能/时间等上下文不会计入,也不会消耗这段预算。关闭后只发送草稿。
|
|
@@ -267,6 +272,7 @@ flowchart LR
|
|
|
267
272
|
| 提示「每分钟最多 N 次增强」 | 达到 `rateLimitPerMinute` | 按提示等待,或在设置中调大该值 |
|
|
268
273
|
| 提示增强超时,或增强被取消 | 超过 `timeoutMs`,或你点了「取消」 | 超时可重试或调大 `timeoutMs`;取消不会改动原输入,重新点增强即可 |
|
|
269
274
|
| 提示鉴权失败 | 对应 provider 的凭据或 API key 无效 | 检查该 provider 在 DSH 中的凭据/API key 是否有效 |
|
|
275
|
+
| 手机或另一台设备上,增强不可用 | 页面不是从本机打开,而是经远程访问 / 中继转发进来;插件只接受本机请求 | 改在本机浏览器里使用增强 |
|
|
270
276
|
| 结果被截断 | 达到 `maxOutputTokens` | 查看截断提示,并在设置中调高 `maxOutputTokens` |
|
|
271
277
|
| 上下文用量显示 `8/8 条`(默认值) | 达到 `contextMaxMessages` 的消息条数上限(默认 8);这是正常截断,不显示警告 | 一般无需处理;需要更早的对话时调大 `contextMaxMessages`,但可能先撞上 `contextMaxChars`(默认 4,000 字) |
|
|
272
278
|
| 上下文用量显示 `4,000/4,000 字`(默认值,琥珀色) | 达到 `contextMaxChars` 的字数上限(默认 4,000),较早内容未发送;最新一条被截头时原因行会写「最新一条仅发送了开头」 | 调大 `contextMaxChars`,或精简对话/减少引用;上下文越多,输入 token 和费用越高 |
|
package/lib/client.js
CHANGED
|
@@ -1912,8 +1912,14 @@ function UndoBar(props) {
|
|
|
1912
1912
|
(0, import_react8.useEffect)(() => {
|
|
1913
1913
|
if (entry !== void 0 && entry.applied !== draft) popUndo(uiKey);
|
|
1914
1914
|
}, [draft, entry, uiKey]);
|
|
1915
|
+
const phase = useInput((state) => {
|
|
1916
|
+
const value = state.phase;
|
|
1917
|
+
return typeof value === "string" ? value : "";
|
|
1918
|
+
});
|
|
1919
|
+
const composerIdle = phase === "" || phase === "plain";
|
|
1915
1920
|
const panel = getPanel();
|
|
1916
|
-
const
|
|
1921
|
+
const cardGone = panel === void 0 || panel.sessionId !== uiKey;
|
|
1922
|
+
const visible = cardGone && composerIdle && entry !== void 0 && entry.applied === draft;
|
|
1917
1923
|
const rootRef = useDockAlignment(visible, uiKey);
|
|
1918
1924
|
if (!visible) return null;
|
|
1919
1925
|
const undo = () => {
|
|
@@ -2101,7 +2107,7 @@ var zh = {
|
|
|
2101
2107
|
"settings.row.rateLimitPerMinute.label": "\u6BCF\u5206\u949F\u8C03\u7528\u4E0A\u9650",
|
|
2102
2108
|
"settings.row.rateLimitPerMinute.hint": "\u6BCF\u5206\u949F\u589E\u5F3A\u6B21\u6570\u4E0A\u9650\uFF08\u6ED1\u52A8\u7A97\u53E3\uFF09\uFF1B\u8D85\u9650\u65F6\u63D0\u793A\u7A0D\u540E\u518D\u8BD5\u3002\u9ED8\u8BA4 10\u3002",
|
|
2103
2109
|
"settings.row.shortcut.label": "\u5FEB\u6377\u952E",
|
|
2104
|
-
"settings.row.shortcut.hint": "\u9ED8\u8BA4\u7559\u7A7A\uFF08\u7981\u7528\uFF09\uFF1B\u586B\u5199\u540E\u751F\u6548\uFF0C\u4F8B\uFF1Actrl+alt+shift+e\uFF08\u987B\u5305\u542B ctrl/alt/meta \u4E2D\u81F3\u5C11\u4E00\u4E2A\u4FEE\u9970\u952E\uFF09\u3002",
|
|
2110
|
+
"settings.row.shortcut.hint": "\u9ED8\u8BA4\u7559\u7A7A\uFF08\u7981\u7528\uFF09\uFF1B\u586B\u5199\u540E\u751F\u6548\uFF0C\u4F8B\uFF1Actrl+alt+shift+e\uFF08\u987B\u5305\u542B ctrl/alt/meta \u4E2D\u81F3\u5C11\u4E00\u4E2A\u4FEE\u9970\u952E\uFF1BF13\u2013F24 \u53EF\u5355\u72EC\u4F7F\u7528\uFF09\u3002",
|
|
2105
2111
|
"settings.row.shortcut.placeholder": "\u4F8B\uFF1Actrl+alt+shift+e",
|
|
2106
2112
|
"settings.strategy.replace": "\u66FF\u6362\u5185\u7F6E\u7B56\u7565",
|
|
2107
2113
|
"settings.strategy.extend": "\u8FFD\u52A0\u5728\u5185\u7F6E\u7B56\u7565\u540E",
|
|
@@ -2283,7 +2289,7 @@ var en = {
|
|
|
2283
2289
|
"settings.row.rateLimitPerMinute.label": "Calls per minute",
|
|
2284
2290
|
"settings.row.rateLimitPerMinute.hint": "Successful enhancements per minute (sliding window); past the limit the request is told to retry later. Default 10.",
|
|
2285
2291
|
"settings.row.shortcut.label": "Shortcut",
|
|
2286
|
-
"settings.row.shortcut.hint": "Empty by default (disabled); set it to enable, e.g. ctrl+alt+shift+e (needs at least one of ctrl/alt/meta).",
|
|
2292
|
+
"settings.row.shortcut.hint": "Empty by default (disabled); set it to enable, e.g. ctrl+alt+shift+e (needs at least one of ctrl/alt/meta; F13\u2013F24 may be used alone).",
|
|
2287
2293
|
"settings.row.shortcut.placeholder": "e.g. ctrl+alt+shift+e",
|
|
2288
2294
|
"settings.strategy.replace": "Replace the built-in strategy",
|
|
2289
2295
|
"settings.strategy.extend": "Append after the built-in strategy",
|
|
@@ -3133,7 +3139,9 @@ var MODIFIER_ALIASES = /* @__PURE__ */ new Map([
|
|
|
3133
3139
|
["win", "meta"],
|
|
3134
3140
|
["super", "meta"]
|
|
3135
3141
|
]);
|
|
3136
|
-
var
|
|
3142
|
+
var FUNCTION_KEY_TOKEN = /^f([1-9]|1[0-9]|2[0-4])$/;
|
|
3143
|
+
var isKeyToken = (token) => /^[a-z0-9]$/.test(token) || FUNCTION_KEY_TOKEN.test(token);
|
|
3144
|
+
var isBareFunctionKey = (token) => /^f(1[3-9]|2[0-4])$/.test(token);
|
|
3137
3145
|
function codeFor(token) {
|
|
3138
3146
|
if (/^[a-z]$/.test(token)) return `Key${token.toUpperCase()}`;
|
|
3139
3147
|
if (/^[0-9]$/.test(token)) return `Digit${token}`;
|
|
@@ -3151,7 +3159,7 @@ function parseShortcut(spec) {
|
|
|
3151
3159
|
if (modifier === void 0) return null;
|
|
3152
3160
|
modifiers[modifier] = true;
|
|
3153
3161
|
}
|
|
3154
|
-
if (!modifiers.ctrl && !modifiers.alt && !modifiers.meta) return null;
|
|
3162
|
+
if (!modifiers.ctrl && !modifiers.alt && !modifiers.meta && !isBareFunctionKey(last)) return null;
|
|
3155
3163
|
return { ...modifiers, key: last, code: codeFor(last) };
|
|
3156
3164
|
}
|
|
3157
3165
|
function matchesShortcut(event, combo) {
|
|
@@ -3163,15 +3171,15 @@ function keyTokenOf(event) {
|
|
|
3163
3171
|
if (letter !== void 0) return letter.toLowerCase();
|
|
3164
3172
|
const digit = /^Digit([0-9])$/.exec(event.code)?.[1];
|
|
3165
3173
|
if (digit !== void 0) return digit;
|
|
3166
|
-
const fn = /^F([1-9]|1[0-2])$/.exec(event.code)?.[1];
|
|
3174
|
+
const fn = /^F([1-9]|1[0-9]|2[0-4])$/.exec(event.code)?.[1];
|
|
3167
3175
|
if (fn !== void 0) return `f${fn}`;
|
|
3168
3176
|
const byKey = event.key.toLowerCase();
|
|
3169
3177
|
return isKeyToken(byKey) ? byKey : null;
|
|
3170
3178
|
}
|
|
3171
3179
|
function shortcutSpecOf(event) {
|
|
3172
|
-
if (!event.ctrlKey && !event.altKey && !event.metaKey) return null;
|
|
3173
3180
|
const token = keyTokenOf(event);
|
|
3174
3181
|
if (token === null) return null;
|
|
3182
|
+
if (!event.ctrlKey && !event.altKey && !event.metaKey && !isBareFunctionKey(token)) return null;
|
|
3175
3183
|
const parts = [];
|
|
3176
3184
|
if (event.ctrlKey) parts.push("ctrl");
|
|
3177
3185
|
if (event.altKey) parts.push("alt");
|
|
@@ -3683,7 +3691,7 @@ var REPOSITORY_URL = "https://github.com/surfishs/dsh-prompt-enhance";
|
|
|
3683
3691
|
var NPM_URL = "https://www.npmjs.com/package/@surfishs/dsh-prompt-enhance";
|
|
3684
3692
|
var GITHUB_MARK = "M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82a7.6 7.6 0 0 1 2-.27c.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0 0 16 8c0-4.42-3.58-8-8-8z";
|
|
3685
3693
|
var NPM_MARK = "M1.763 0C.786 0 0 .786 0 1.763v20.474C0 23.214.786 24 1.763 24h20.474c.977 0 1.763-.786 1.763-1.763V1.763C24 .786 23.214 0 22.237 0zM5.13 5.323l13.837.019-.009 13.836h-3.464l.01-10.382h-3.456L12.04 19.17H5.113z";
|
|
3686
|
-
var PLUGIN_VERSION = true ? "0.1.
|
|
3694
|
+
var PLUGIN_VERSION = true ? "0.1.7" : "0.0.0";
|
|
3687
3695
|
var HEADER_STYLE = { display: "flex", flexDirection: "column", gap: 12, padding: "2px 0" };
|
|
3688
3696
|
var HEADER_ROW_STYLE = { display: "flex", alignItems: "center", gap: 10, flexWrap: "wrap" };
|
|
3689
3697
|
var HEADER_TITLE_STYLE = {
|
package/lib/index.js
CHANGED
|
@@ -140,7 +140,7 @@ var Config = z.object({
|
|
|
140
140
|
timeoutMs: z.number().step(1).min(FIELD_LIMITS.timeoutMs.min).max(FIELD_LIMITS.timeoutMs.max).default(DEFAULT_CONFIG.timeoutMs).description("\u5355\u6B21\u589E\u5F3A\u7684\u8D85\u65F6\uFF08\u6BEB\u79D2\uFF09").volatile(),
|
|
141
141
|
systemPrompt: z.string().role("textarea").default(DEFAULT_CONFIG.systemPrompt).description("\u7CFB\u7EDF\u63D0\u793A\u8BCD\uFF1B\u7559\u7A7A\u4F7F\u7528\u5185\u7F6E\u589E\u5F3A\u7B56\u7565").volatile(),
|
|
142
142
|
strategyMode: z.union(["replace-default", "extend-default"]).default(DEFAULT_CONFIG.strategyMode).description("\u81EA\u5B9A\u4E49\u7CFB\u7EDF\u63D0\u793A\u8BCD\u7684\u7EC4\u5408\u65B9\u5F0F\uFF1A\u6574\u4F53\u66FF\u6362\u5185\u7F6E\u7B56\u7565\uFF08\u9ED8\u8BA4\uFF1B\u4EC5\u4FDD\u7559\u63D2\u4EF6\u59CB\u7EC8\u8FFD\u52A0\u7684\u6700\u5C0F\u8F93\u51FA\u5951\u7EA6\uFF1A\u8F93\u5165\u662F\u6570\u636E\u3001\u53EA\u8F93\u51FA\u6539\u5199\u7ED3\u679C\uFF09\uFF0C\u6216\u628A\u81EA\u5B9A\u4E49\u6587\u672C\u8FFD\u52A0\u5728\u5185\u7F6E\u7B56\u7565\u4E4B\u540E\uFF08\u5185\u7F6E\u89C4\u5219\u7EE7\u7EED\u751F\u6548\uFF09").volatile(),
|
|
143
|
-
shortcut: z.string().default(DEFAULT_CONFIG.shortcut).description("\u89E6\u53D1\u5FEB\u6377\u952E\uFF0C\u9ED8\u8BA4\u7559\u7A7A\u5373\u7981\u7528\uFF1B\u5982\u9700\u542F\u7528\uFF0C\u586B\u5982 ctrl+alt+e\uFF08\u987B\u5305\u542B ctrl/alt/meta \u4E2D\u81F3\u5C11\u4E00\u4E2A\u4FEE\u9970\u952E\uFF0Cshift \u4EC5\u53EF\u4F5C\u9644\u52A0\uFF0C\u7EAF\u5B57\u6BCD/\u6570\u5B57\u6216 shift+\u5B57\u6BCD\u4F1A\u88AB\u5FFD\u7565\uFF09").volatile(),
|
|
143
|
+
shortcut: z.string().default(DEFAULT_CONFIG.shortcut).description("\u89E6\u53D1\u5FEB\u6377\u952E\uFF0C\u9ED8\u8BA4\u7559\u7A7A\u5373\u7981\u7528\uFF1B\u5982\u9700\u542F\u7528\uFF0C\u586B\u5982 ctrl+alt+e\uFF08\u987B\u5305\u542B ctrl/alt/meta \u4E2D\u81F3\u5C11\u4E00\u4E2A\u4FEE\u9970\u952E\uFF0Cshift \u4EC5\u53EF\u4F5C\u9644\u52A0\uFF0C\u7EAF\u5B57\u6BCD/\u6570\u5B57\u6216 shift+\u5B57\u6BCD\u4F1A\u88AB\u5FFD\u7565\uFF1BF13\u2013F24 \u53EF\u5355\u72EC\u4F7F\u7528\uFF09").volatile(),
|
|
144
144
|
maxConcurrent: z.number().step(1).min(FIELD_LIMITS.maxConcurrent.min).max(FIELD_LIMITS.maxConcurrent.max).default(DEFAULT_CONFIG.maxConcurrent).description("\u5BBF\u4E3B\u4FA7\u5E76\u53D1\u4E0A\u9650\uFF1A\u540C\u65F6\u8FDB\u884C\u7684\u589E\u5F3A\u8C03\u7528\u6570\uFF0C\u8D85\u51FA\u7684\u8BF7\u6C42\u8FD4\u56DE 429").volatile(),
|
|
145
145
|
rateLimitPerMinute: z.number().step(1).min(FIELD_LIMITS.rateLimitPerMinute.min).max(FIELD_LIMITS.rateLimitPerMinute.max).default(DEFAULT_CONFIG.rateLimitPerMinute).description("\u6BCF\u5206\u949F\u589E\u5F3A\u6B21\u6570\u4E0A\u9650\uFF08\u6ED1\u52A8\u7A97\u53E3\uFF09\uFF0C\u8D85\u51FA\u8FD4\u56DE 429").volatile(),
|
|
146
146
|
streaming: z.boolean().default(DEFAULT_CONFIG.streaming).description("\u589E\u91CF\u5C55\u793A\uFF1A\u6A21\u578B\u8FB9\u5199\u8FB9\u5728\u9762\u677F\u663E\u793A\uFF08\u4EC5\u5F71\u54CD\u663E\u793A\u8282\u594F\uFF0C\u6700\u7EC8\u7ED3\u679C\u4E0D\u53D8\uFF1B\u5BBF\u4E3B\u6216\u7F51\u7EDC\u4E0D\u652F\u6301\u65F6\u81EA\u52A8\u56DE\u9000\u4E3A\u4E00\u6B21\u6027\u8FD4\u56DE\uFF09").volatile(),
|