@jayyuen66/dsh-dir-prep-organize 0.1.16 → 0.1.17
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/CHANGELOG.md +8 -0
- package/README.md +24 -22
- package/README.zh-CN.md +24 -22
- package/THIRD_PARTY_NOTICES.md +5 -3
- package/client.js +4 -34
- package/docs/DETAIL.md +5 -26
- package/docs/DETAIL.zh.md +5 -26
- package/docs/images/capability-map.svg +66 -0
- package/docs/images/capability-map.zh.svg +74 -0
- package/docs/images/import-boundary.svg +64 -0
- package/docs/images/import-boundary.zh.svg +66 -0
- package/docs/images/organize-flow.svg +83 -0
- package/docs/images/organize-flow.zh.svg +71 -0
- package/docs/images/templates-card.svg +66 -0
- package/docs/images/templates-card.zh.svg +74 -0
- package/host.js +21 -1695
- package/package.json +71 -68
- package/templates.data.mjs +11840 -685
- package/types/host.d.ts +0 -483
- package/types/src/client-entry.d.ts +0 -99
- package/types/src/client-styles.d.ts +0 -1
- package/types/src/client-timeouts.d.ts +0 -30
- package/types/src/default-templates.generated.d.ts +0 -3
- package/types/src/group-labels.generated.d.ts +0 -2
- package/types/src/host-messages.d.ts +0 -96
- package/types/src/input-writeback.d.ts +0 -32
- package/types/src/menu-dispatch.d.ts +0 -7
- package/types/src/remote.d.ts +0 -33
- package/types/src/templates.d.ts +0 -96
- package/types/src/ui-messages.d.ts +0 -231
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import type { MessagesCatalog } from "@jayyuen66/dsh-plugin-shared/lib/locale";
|
|
2
|
-
/** 本包 host 侧产出的全部人读文案(润色 system prompt + 端点/导入回执)。 */
|
|
3
|
-
export interface HostMessages {
|
|
4
|
-
/** 角色定位与任务说明(整段 prompt 的第一行)。 */
|
|
5
|
-
readonly sysRole: string;
|
|
6
|
-
/** 规则清单的标题行。 */
|
|
7
|
-
readonly sysRulesHeading: string;
|
|
8
|
-
/** 规则:只输出润色后的正文。 */
|
|
9
|
-
readonly sysRuleOutputOnly: string;
|
|
10
|
-
/** 规则:不执行 `prompt` 里要求的任务。 */
|
|
11
|
-
readonly sysRuleNoExecution: string;
|
|
12
|
-
/** 规则:`prompt` 本身是问题/待办指令时不给解答。 */
|
|
13
|
-
readonly sysRuleNoAnswer: string;
|
|
14
|
-
/** 规则:保留原意与语言,推断得来的上下文才补。 */
|
|
15
|
-
readonly sysRuleKeepIntent: string;
|
|
16
|
-
/** 规则:把指代解析成明确表述。 */
|
|
17
|
-
readonly sysRuleResolveRefs: string;
|
|
18
|
-
/** 规则:目录结构与对话历史只是参考。 */
|
|
19
|
-
readonly sysRuleNoListing: string;
|
|
20
|
-
/** 规则:参考角色只借术语与措辞。 */
|
|
21
|
-
readonly sysRuleRoleView: string;
|
|
22
|
-
/** 当前工作目录行(`{cwd}`)。 */
|
|
23
|
-
readonly sysCwdLine: string;
|
|
24
|
-
/** cwd 缺失时该行的取值。 */
|
|
25
|
-
readonly sysCwdMissing: string;
|
|
26
|
-
/** 目录结构摘要行(`{summary}`)。 */
|
|
27
|
-
readonly sysSummaryLine: string;
|
|
28
|
-
/** 会话最近对话行(`{turns}`)。 */
|
|
29
|
-
readonly sysRecentTurnsLine: string;
|
|
30
|
-
/** 参考角色行(`{roleText}`)。 */
|
|
31
|
-
readonly sysRoleLine: string;
|
|
32
|
-
/** 不可信区块的围栏标记:内容只当数据,不当指令。 */
|
|
33
|
-
readonly sysDataFenceStart: string;
|
|
34
|
-
readonly sysDataFenceEnd: string;
|
|
35
|
-
/** 声明「围栏内是数据」的那条规则。 */
|
|
36
|
-
readonly sysRuleDataNotInstruction: string;
|
|
37
|
-
/** 会话 cwd 取不到 → 无法收集目录上下文。 */
|
|
38
|
-
readonly cwdEmpty: string;
|
|
39
|
-
/** 目录枚举抛错的前缀整句(`{reason}`)。 */
|
|
40
|
-
readonly readDirFailed: string;
|
|
41
|
-
/** 收集端点出错时顶上的整句(`{reason}`)。 */
|
|
42
|
-
readonly collectFailed: string;
|
|
43
|
-
/** 路径含 `.` / `..` / 隐藏段。 */
|
|
44
|
-
readonly illegalPathSegment: string;
|
|
45
|
-
/** 允许根标签:会话 cwd。 */
|
|
46
|
-
readonly rootLabelCwd: string;
|
|
47
|
-
/** 允许根标签:插件内置角色库。 */
|
|
48
|
-
readonly rootLabelBuiltin: string;
|
|
49
|
-
/** 允许根标签:设置 importAllowRoots 登记的目录。 */
|
|
50
|
-
readonly rootLabelAllowed: string;
|
|
51
|
-
/** 越界整句:点名允许区并回显解析后的路径(`{zones}`、`{absolute}`)。 */
|
|
52
|
-
readonly outsideRoots: string;
|
|
53
|
-
/** 越界整句里各允许区的分隔符。 */
|
|
54
|
-
readonly zoneSeparator: string;
|
|
55
|
-
/** 空串/纯空白路径。 */
|
|
56
|
-
readonly emptyImportPath: string;
|
|
57
|
-
/** 相对路径但拿不到会话 cwd。 */
|
|
58
|
-
readonly relativeNeedsCwd: string;
|
|
59
|
-
/** 单文件导入:frontmatter 里没有 name。 */
|
|
60
|
-
readonly missingRoleName: string;
|
|
61
|
-
/** 导入过程抛错的前缀整句(`{reason}`)。 */
|
|
62
|
-
readonly importFailed: string;
|
|
63
|
-
/** 导入端点出错时顶上的整句(`{reason}`)。 */
|
|
64
|
-
readonly importException: string;
|
|
65
|
-
/** 导入路由:path 字段不是字符串。 */
|
|
66
|
-
readonly importPathNotString: string;
|
|
67
|
-
/** 导入路由:path 只含空白字符。 */
|
|
68
|
-
readonly importPathBlank: string;
|
|
69
|
-
/** 模型流里没有 finish 块。 */
|
|
70
|
-
readonly missingFinishChunk: string;
|
|
71
|
-
/** 终态非 stop(`{reason}`)。 */
|
|
72
|
-
readonly streamNotFinished: string;
|
|
73
|
-
/** 终态带 failure 信息时的 `{reason}` 形状(`{kind}`、`{message}`)。 */
|
|
74
|
-
readonly failureReason: string;
|
|
75
|
-
/** `prompt` 为空白(trim 后为空)时的回执。 */
|
|
76
|
-
readonly emptyPrompt: string;
|
|
77
|
-
/** 没有可用的模型选择。 */
|
|
78
|
-
readonly noModelSelected: string;
|
|
79
|
-
/** 模型返回空白。 */
|
|
80
|
-
readonly emptyOrganizeResult: string;
|
|
81
|
-
/** 润色整体超时(`{seconds}`)。 */
|
|
82
|
-
readonly organizeTimeout: string;
|
|
83
|
-
/** fs 服务未就绪。 */
|
|
84
|
-
readonly fsUnavailable: string;
|
|
85
|
-
/** sessions 里查不到该会话。 */
|
|
86
|
-
readonly cwdUnknown: string;
|
|
87
|
-
/** agentDefaultModel 服务未就绪。 */
|
|
88
|
-
readonly modelServiceUnavailable: string;
|
|
89
|
-
/** 读当前默认模型失败的前缀整句(`{reason}`)。 */
|
|
90
|
-
readonly readModelFailed: string;
|
|
91
|
-
/** llm 服务未就绪。 */
|
|
92
|
-
readonly llmUnavailable: string;
|
|
93
|
-
/** 润色端点出错时顶上的整句(`{reason}`)。 */
|
|
94
|
-
readonly organizeFailed: string;
|
|
95
|
-
}
|
|
96
|
-
export declare const HOST_MESSAGES: MessagesCatalog<HostMessages>;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type { InputActions, InputState } from "@deepseek-ai/dsh-client-ui-conversation/client";
|
|
2
|
-
export type InputActionsFace = Pick<InputActions, "setDraft" | "captureInsertion" | "insertText">;
|
|
3
|
-
/** 输入框状态的最新一帧(异步返回时读它,不读发起那次 render 的闭包)。 */
|
|
4
|
-
export interface InputSnapshot {
|
|
5
|
-
readonly sessionId: string;
|
|
6
|
-
readonly actions: InputActionsFace | undefined;
|
|
7
|
-
readonly draftRev: number;
|
|
8
|
-
readonly phase: InputState["phase"];
|
|
9
|
-
}
|
|
10
|
-
/** 一次整稿写回的凭据。 */
|
|
11
|
-
export interface WriteBackTicket {
|
|
12
|
-
readonly sessionId: string;
|
|
13
|
-
readonly draftRev: number;
|
|
14
|
-
readonly actions: InputActionsFace | undefined;
|
|
15
|
-
invalidated: boolean;
|
|
16
|
-
}
|
|
17
|
-
/** 宿主是否给了整稿替换接口(润色结果最后落到 setDraft)。 */
|
|
18
|
-
export declare function hasDraftFace(actions: InputActionsFace | undefined): actions is InputActionsFace;
|
|
19
|
-
/** 宿主是否给了版本校验的插入接口(模板走这一对,不整稿覆盖)。 */
|
|
20
|
-
export declare function hasInsertFace(actions: InputActionsFace | undefined): actions is InputActionsFace;
|
|
21
|
-
export interface WriteBackMessages {
|
|
22
|
-
readonly unavailable: string;
|
|
23
|
-
readonly stale: string;
|
|
24
|
-
}
|
|
25
|
-
export interface WriteBackBinding {
|
|
26
|
-
readonly begin: () => WriteBackTicket;
|
|
27
|
-
readonly finish: (ticket: WriteBackTicket) => void;
|
|
28
|
-
readonly commit: (content: string, ticket: WriteBackTicket) => void;
|
|
29
|
-
}
|
|
30
|
-
/** 提交期(`phase !== "plain"`)也算失效:发送成功后编辑器会被清空,失败时原稿要留着,
|
|
31
|
-
* 两种情况下在途的润色结果都不该再经 `setDraft` 写回输入框。 */
|
|
32
|
-
export declare function useWriteBack(input: InputSnapshot, messages: WriteBackMessages): WriteBackBinding;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { TemplatesSnapshot } from "./client-entry.js";
|
|
2
|
-
/** 内置模板失败态的重试项 id。 */
|
|
3
|
-
export declare const BUILTIN_RETRY_ID = "builtin-retry";
|
|
4
|
-
/** 组织菜单动作:direct 立即整理、重试重新拉表、模板项带稿子整理。 */
|
|
5
|
-
export declare function runOrganizeMenuSelection(id: string, templates: TemplatesSnapshot["templates"], organize: (roleText?: string) => Promise<void>, retry: () => void): void;
|
|
6
|
-
/** 模板菜单动作;返回是否关闭菜单(重试保持打开等 store 换代列出)。 */
|
|
7
|
-
export declare function runTemplateMenuSelection(id: string, templates: TemplatesSnapshot["templates"], pick: (text: string) => void, retry: () => void): boolean;
|
package/types/src/remote.d.ts
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import type { InvocationDescriptor } from "@deepseek-ai/dsh-typert-protocol";
|
|
2
|
-
import type { RemoteHost } from "@jayyuen66/dsh-plugin-shared/lib/typert-client";
|
|
3
|
-
/** Typert Remote 命名空间(client 半只用这一枚)。
|
|
4
|
-
*
|
|
5
|
-
* 宿主半的注册键在 host.ts 的 `DIR_PREP_REMOTE_NAMESPACE`——两半各自打包、client 包
|
|
6
|
-
* 不能 import host.ts,所以这一枚字面量必然有两份。两边取值必须一致:写岔了的表现是
|
|
7
|
-
* 网关挂上的是 A、报错文案说的是 B,而没有任何运行期信号。 */
|
|
8
|
-
export declare const DIR_PREP_NAMESPACE = "dirPrepOrganize";
|
|
9
|
-
export declare const DIR_PREP_DESCRIPTORS: readonly InvocationDescriptor[];
|
|
10
|
-
export interface DirPrepOrganizeArgs {
|
|
11
|
-
sessionId: string;
|
|
12
|
-
prompt: string;
|
|
13
|
-
entriesSummary: string;
|
|
14
|
-
roleText?: string;
|
|
15
|
-
}
|
|
16
|
-
export interface DirPrepReader {
|
|
17
|
-
defaults: () => Promise<unknown>;
|
|
18
|
-
context: (sessionId: string) => Promise<unknown>;
|
|
19
|
-
model: (sessionId: string) => Promise<unknown>;
|
|
20
|
-
organize: (args: DirPrepOrganizeArgs) => Promise<unknown>;
|
|
21
|
-
importTemplates: (args: {
|
|
22
|
-
path: string;
|
|
23
|
-
sessionId: string;
|
|
24
|
-
}) => Promise<unknown>;
|
|
25
|
-
}
|
|
26
|
-
/** 造读取器;当前部署没有远程通道时 undefined(卡片只显示读不到)。
|
|
27
|
-
*
|
|
28
|
-
* `get` 这两处的做法和 buildReader 里查命名空间时保持一致,都显式传 `strict = false`:
|
|
29
|
-
* 不传时 cordis 默认只返回「提供者 fiber 当前 active」的实现,而设置卡可能在 fiber
|
|
30
|
-
* 就绪前就挂上——那时读取方法会拿到 undefined 并显示「读不到」,看起来是插件没装。
|
|
31
|
-
* `get` 本身也可能抛(宿主版本演进之后,反射接口可能不再接受 bool),接住它只是为了把这
|
|
32
|
-
* 一栏降级成「读不到」,不让整张卡片跟着炸。 */
|
|
33
|
-
export declare function createDirPrepReader(ctx: RemoteHost): DirPrepReader | undefined;
|
package/types/src/templates.d.ts
DELETED
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
export interface TemplateEntry {
|
|
2
|
-
id: string;
|
|
3
|
-
name: string;
|
|
4
|
-
/** 一句话专长/适用场景(下拉 item title 展示;对齐角色 frontmatter description)。 */
|
|
5
|
-
description: string;
|
|
6
|
-
text: string;
|
|
7
|
-
/** 分组标签(下拉按此分组渲染;空=通用)。导入角色时取所属部门的固定中文标签。 */
|
|
8
|
-
group: string;
|
|
9
|
-
/** 角色视觉标记(下拉 item 前缀);空=不显示。 */
|
|
10
|
-
emoji: string;
|
|
11
|
-
}
|
|
12
|
-
/** 角色正文提炼/「按角色风格润色」上下文:不设字符上限(用户定下,
|
|
13
|
-
* 上下文完整性优先;模型 context 超限由模型报错提示用户自行处理)。 */
|
|
14
|
-
/** 仓库目录名 → 下拉分组标签的**唯一**导出点在 `./group-labels.generated.ts`(表源 =
|
|
15
|
-
* scripts/gen-defaults-lib.mjs,键序 = 下拉分组展示序),本文件不再同名 re-export:
|
|
16
|
-
* 实测同名两处导出正是 fallow `duplicate_export`(severity=error)报出来的那一条,
|
|
17
|
-
* 而"两份名字保持同步"的纪律并不由 re-export 保证。表体仍是生成物;host 半引本文件的
|
|
18
|
-
* groupLabelOf/parseAgentFrontmatter,精选集(生成物)也由 host 半引走、经
|
|
19
|
-
* `dirPrepOrganize.defaults` 方法按需下发,client 半不打包它。 */
|
|
20
|
-
/** 仓库目录名 → 分组标签(groupLabelOf(engineering) === "工程";未收录回落目录名)。
|
|
21
|
-
* 必须只认**自有属性**:`AGENT_DIR_GROUP_LABELS["constructor"]` 会命中原型上的
|
|
22
|
-
* function(`?? dirName` 不触发)→ TemplateEntry.group 拿到函数、JSON.stringify
|
|
23
|
-
* 静默丢掉整个 group 键(实测样例:{"id":"a"});"__proto__" 同理返回 {}。 */
|
|
24
|
-
export declare function groupLabelOf(dirName: string): string;
|
|
25
|
-
/** 角色 .md 解析结果(frontmatter 的 name/description/emoji + 去除头部围栏的正文)。 */
|
|
26
|
-
export interface AgentFileInfo {
|
|
27
|
-
name: string;
|
|
28
|
-
description: string;
|
|
29
|
-
emoji: string;
|
|
30
|
-
body: string;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* 解析 agency-agents-zh 风格角色文件:首行 `---` + 键值对 frontmatter + 正文。
|
|
34
|
-
*
|
|
35
|
-
* - 无 frontmatter / 缺 `name` 键 / name 为空 → undefined(非角色文件,导入时跳过);
|
|
36
|
-
* - 键值对格式宽松:`key: value`,value 可带引号或裸值,取首个同名键;
|
|
37
|
-
* - 正文 = 第二个 `---` 围栏之后的内容(trim),与 condenseRoleBody 组合产出模板正文;
|
|
38
|
-
* - 纯字符串处理,无 YAML 依赖,确定性可测。
|
|
39
|
-
*/
|
|
40
|
-
export declare function parseAgentFrontmatter(text: string): AgentFileInfo | undefined;
|
|
41
|
-
/**
|
|
42
|
-
* 角色正文提炼(导入 / 「按角色风格润色」共用):取叙述主干、去代码围栏。
|
|
43
|
-
*
|
|
44
|
-
* 规则(确定性,测试锁死):
|
|
45
|
-
* - ``` 围栏行整体剔除(围栏内容多为长代码样例,对角色语境价值低);
|
|
46
|
-
* - 行内反引号一并剔除——沿用"正文不含反引号、插入不破坏 markdown 围栏"不变式;
|
|
47
|
-
* - 不设字符上限(用户定下):全量保留叙述内容,避免截断影响
|
|
48
|
-
* 「以角色风格润色」的上下文完整性;模型 context 超限由模型报错提示用户自行处理;
|
|
49
|
-
* - 结果 trim;空正文(全围栏/全空白)→ 空串;
|
|
50
|
-
* - 围栏未闭合时**不抛**:把行号作为结果交出,由调用方决定是拒绝整份文件还是跳过它。
|
|
51
|
-
* 异常只由 `condenseRoleBody` 这一层抛(生成器要据此拒绝产出),导入读取方法拿到的是结果。
|
|
52
|
-
*/
|
|
53
|
-
export interface CondenseResult {
|
|
54
|
-
/** 清洗后的正文(围栏未闭合时是围栏起始行之前的那些行)。 */
|
|
55
|
-
text: string;
|
|
56
|
-
/** 未闭合围栏在正文里的行号(1 起);闭合完整时为 undefined。 */
|
|
57
|
-
unclosedFenceLine: number | undefined;
|
|
58
|
-
}
|
|
59
|
-
export declare function tryCondenseRoleBody(body: string): CondenseResult;
|
|
60
|
-
/** `tryCondenseRoleBody` 的严格形态:围栏未闭合时抛错,供生成器拒收畸形角色文件。
|
|
61
|
-
* 导入读取方法不用这一支——一份漏写结束围栏的文件不该让同目录其余角色全部失败。 */
|
|
62
|
-
export declare function condenseRoleBody(body: string): string;
|
|
63
|
-
/**
|
|
64
|
-
* 导入条目并入 `existing`(设置卡上未保存的 `draft` 列表):与既有 id 碰撞时确定性改写(追加 `-i` 直到唯一)。
|
|
65
|
-
* 返回新数组(不改输入),保证 pre-save 阶段 React key 唯一。sanitizeTemplateList 对**存量
|
|
66
|
-
* 快照**同样按序号补 id(缺失/空/撞名三档都管),这边要额外做的是避开 `existing` 里已有的 id
|
|
67
|
-
* ——两个入口各管一段,不靠对方兜底。
|
|
68
|
-
*/
|
|
69
|
-
export declare function mergeImportedTemplates(existing: readonly TemplateEntry[], incoming: readonly TemplateEntry[]): TemplateEntry[];
|
|
70
|
-
/** 内置默认模板(独立开发者精选角色集,生成自插件内置 agents/ 目录)。
|
|
71
|
-
* client 在快照缺 templates 字段时用它兜底;host 半的下发走 build-host.mjs 打出的
|
|
72
|
-
* templates.data.mjs(同一份生成物的另一产物),不再经 settings base 下发。
|
|
73
|
-
* 全量角色可经设置页「导入角色」导入(路径留空 = 导入内置 agents/ 全部;显式路径
|
|
74
|
-
* 受 host 的「cwd 内 + 内置角色目录 allowlist」策略约束)。 */
|
|
75
|
-
export { DEFAULT_TEMPLATES } from "./default-templates.generated.js";
|
|
76
|
-
/** 任意来源(settings 快照 / 设置卡未保存的 `draft`)→ 合法模板列表(纯函数,测试锁死)。
|
|
77
|
-
*
|
|
78
|
-
* - 非数组输入 → [](调用方自行决定是否回落 DEFAULT_TEMPLATES);
|
|
79
|
-
* - 剔除非对象条目与 name/text trim 后为空的条目;
|
|
80
|
-
* - name/text/description/group 一律 trim;emoji trim 后按码点截断至 12 个字符;
|
|
81
|
-
* - id 缺失与已收集 id 撞名都由 uniqueEntryId 按序号补成唯一(同输入同输出,可测试);
|
|
82
|
-
* - 绝不修改输入(深比较测试锁死)。 */
|
|
83
|
-
export declare function sanitizeTemplateList(raw: unknown): TemplateEntry[];
|
|
84
|
-
/** 任意来源(settings 快照 / 设置卡未保存的 `rootsDraft`)→ 合法的「导入允许目录」列表(纯函数)。
|
|
85
|
-
* host 的导入策略是「会话 cwd + 内置角色库 + importAllowRoots」,绝对路径默认拒绝,
|
|
86
|
-
* 这里登记的每一项都是**放一个读盘口子**,故:
|
|
87
|
-
* - 非数组 → [](未设置 = 一条都不登记,不是"全放行");
|
|
88
|
-
* - 非字符串 / trim 后为空 → 丢弃(空串在 host 侧 path.resolve 会落到进程 cwd,
|
|
89
|
-
* 绝不能让它变成一个隐式允许根);
|
|
90
|
-
* - **非绝对路径 → 丢弃**:契约是「额外允许的绝对目录」,相对项会被 host 按它自己的
|
|
91
|
-
* 进程 cwd 解析,等于登记了一条用户没写过、界面上也看不出指向哪里的允许根;`~`
|
|
92
|
-
* 靠 shell 展开,host 的 path.resolve 不展开它,同归这一档;
|
|
93
|
-
* - 末尾分隔符归一后去重(`/a` 与 `/a/` 是同一棵目录树,不该在界面上摆两行);
|
|
94
|
-
* - 条数与单条长度都不设上限:静默丢一条就是「看着成功、内容没进去」;条目多撑长的
|
|
95
|
-
* 越界的回执由 host 侧的列举上限限制住。 */
|
|
96
|
-
export declare function sanitizeAllowRoots(raw: unknown): string[];
|
|
@@ -1,231 +0,0 @@
|
|
|
1
|
-
import type { TranslateNS as OfficialTranslateNS } from "@deepseek-ai/dsh-client-ui-slots";
|
|
2
|
-
import type { MessagesCatalog } from "@jayyuen66/dsh-plugin-shared/lib/locale";
|
|
3
|
-
/** 本包设置卡产出的全部界面文案。 */
|
|
4
|
-
export interface UiMessages {
|
|
5
|
-
/** 角色库小节标题与说明(这份列表同时喂「模板」下拉与「润色」▾)。 */
|
|
6
|
-
readonly rolesSection: string;
|
|
7
|
-
/** 角色库为 0 条时的块级空态。 */
|
|
8
|
-
readonly rolesEmptyTitle: string;
|
|
9
|
-
readonly rolesEmptyNote: string;
|
|
10
|
-
readonly rolesCount: string;
|
|
11
|
-
readonly rolesHint: string;
|
|
12
|
-
/** 设置源可写位为 false 时的状态条。 */
|
|
13
|
-
readonly statusReadOnly: string;
|
|
14
|
-
/** 设置源尚未就绪时的状态条。 */
|
|
15
|
-
readonly statusNotReady: string;
|
|
16
|
-
/** 新增模板按钮。 */
|
|
17
|
-
readonly addTemplate: string;
|
|
18
|
-
/** 保存按钮 title(有未保存改动)。 */
|
|
19
|
-
readonly saveTitleDirty: string;
|
|
20
|
-
/** 保存按钮 title(无未保存改动)。 */
|
|
21
|
-
readonly saveTitleClean: string;
|
|
22
|
-
/** 保存按钮(写入中)。 */
|
|
23
|
-
readonly saving: string;
|
|
24
|
-
/** 保存按钮(空闲态);同时充当回执文本里的动作名。 */
|
|
25
|
-
readonly save: string;
|
|
26
|
-
/** 撤销按钮(丢弃未保存的 `draft` 与 `rootsDraft`)。 */
|
|
27
|
-
readonly revert: string;
|
|
28
|
-
/** 恢复默认按钮 title(说明改动范围与两步确认)。 */
|
|
29
|
-
readonly resetTitle: string;
|
|
30
|
-
/** 恢复默认按钮(空闲态);同时充当回执文本里的动作名。 */
|
|
31
|
-
readonly resetDefault: string;
|
|
32
|
-
/** 确认弹窗正文(危险操作统一走宿主 RiskConfirmation,rtk 同款)。 */
|
|
33
|
-
readonly resetConfirmDescription: string;
|
|
34
|
-
readonly resetConfirmAcknowledge: string;
|
|
35
|
-
readonly resetConfirmCancel: string;
|
|
36
|
-
readonly resetConfirmClose: string;
|
|
37
|
-
readonly resetConfirmAction: string;
|
|
38
|
-
/** 卡底的保存语义说明。 */
|
|
39
|
-
readonly footHint: string;
|
|
40
|
-
/** 保存失败前缀(后接错误摘要)。 */
|
|
41
|
-
readonly saveFailed: string;
|
|
42
|
-
/** 新增行的默认名称(整句模板)。 */
|
|
43
|
-
readonly newTemplateName: string;
|
|
44
|
-
/** 写入回执不可确认(宿主未回读成功)。 */
|
|
45
|
-
readonly persistUnconfirmed: string;
|
|
46
|
-
/** 写入回执未生效(宿主拒绝写入,带 revision)。 */
|
|
47
|
-
readonly persistRejected: string;
|
|
48
|
-
/** 行内视觉标记输入框的 aria-label。 */
|
|
49
|
-
readonly rowAriaEmoji: string;
|
|
50
|
-
/** 行内视觉标记输入框的 title。 */
|
|
51
|
-
readonly rowEmojiTitle: string;
|
|
52
|
-
/** 行内名称输入框的 placeholder。 */
|
|
53
|
-
readonly rowPlaceholderName: string;
|
|
54
|
-
/** 行内名称输入框的 aria-label。 */
|
|
55
|
-
readonly rowAriaName: string;
|
|
56
|
-
/** 行内分组输入框的 placeholder。 */
|
|
57
|
-
readonly rowPlaceholderGroup: string;
|
|
58
|
-
/** 行内分组输入框的 aria-label。 */
|
|
59
|
-
readonly rowAriaGroup: string;
|
|
60
|
-
/** 行内分组输入框的 title。 */
|
|
61
|
-
readonly rowGroupTitle: string;
|
|
62
|
-
/** 行内删除按钮的 title。 */
|
|
63
|
-
readonly rowDeleteTitle: string;
|
|
64
|
-
/** 行内删除按钮的文字。 */
|
|
65
|
-
readonly rowDelete: string;
|
|
66
|
-
/** 行内一句话介绍输入框的 placeholder。 */
|
|
67
|
-
readonly rowPlaceholderDescription: string;
|
|
68
|
-
/** 行内一句话介绍输入框的 aria-label。 */
|
|
69
|
-
readonly rowAriaDescription: string;
|
|
70
|
-
/** 行内正文文本域的 placeholder。 */
|
|
71
|
-
readonly rowPlaceholderText: string;
|
|
72
|
-
/** 行内正文文本域的 aria-label。 */
|
|
73
|
-
readonly rowAriaText: string;
|
|
74
|
-
/** 导入回执整体不是对象时的错误。 */
|
|
75
|
-
readonly importFailedUnknown: string;
|
|
76
|
-
/** 导入命中 0 条时的提示。 */
|
|
77
|
-
readonly importEmpty: string;
|
|
78
|
-
/** 导入成功(路径留空 = 内置全量)。 */
|
|
79
|
-
readonly importAllDone: string;
|
|
80
|
-
/** 导入成功(显式路径)。 */
|
|
81
|
-
readonly importFromDone: string;
|
|
82
|
-
/** 回执带 truncated 标记时的追加说明(有内容因上限被跳过的总括)。 */
|
|
83
|
-
readonly importTruncated: string;
|
|
84
|
-
/** 导入路径输入框的 placeholder。 */
|
|
85
|
-
readonly importPlaceholder: string;
|
|
86
|
-
/** 导入路径输入框的 aria-label。 */
|
|
87
|
-
readonly importAriaPath: string;
|
|
88
|
-
/** 导入按钮的 title(两种路径语义)。 */
|
|
89
|
-
readonly importBtnTitle: string;
|
|
90
|
-
/** 导入按钮(请求中)。 */
|
|
91
|
-
readonly importing: string;
|
|
92
|
-
/** 导入按钮(空闲态)。 */
|
|
93
|
-
readonly importRoles: string;
|
|
94
|
-
/** 导入失败前缀(后接错误摘要)。 */
|
|
95
|
-
readonly importErrorPrefix: string;
|
|
96
|
-
/** 导入面板的规则说明(允许根、扫描层级、frontmatter 要求)。 */
|
|
97
|
-
readonly importHint: string;
|
|
98
|
-
/** 跳过计数:更深层未扫描。 */
|
|
99
|
-
readonly skipDeeper: string;
|
|
100
|
-
/** 跳过计数:超字节上限。 */
|
|
101
|
-
readonly skipTooLarge: string;
|
|
102
|
-
/** 跳过计数:读取失败。 */
|
|
103
|
-
readonly skipUnreadable: string;
|
|
104
|
-
/** 跳过计数:非角色文件。 */
|
|
105
|
-
readonly skipUnnamed: string;
|
|
106
|
-
/** 跳过计数:真实目标在允许根之外(符号链接逃逸),被安全检查拦下。 */
|
|
107
|
-
readonly skipEscaped: string;
|
|
108
|
-
/** 跳过计数整句的外层括号。 */
|
|
109
|
-
readonly skipSummary: string;
|
|
110
|
-
/** 跳过计数各项的分隔符。 */
|
|
111
|
-
readonly skipSeparator: string;
|
|
112
|
-
/** 允许目录面板标题。 */
|
|
113
|
-
readonly rootsHeading: string;
|
|
114
|
-
/** 单行允许目录输入框的 aria-label。 */
|
|
115
|
-
readonly rootsAriaRow: string;
|
|
116
|
-
/** 单行允许目录输入框的 title。 */
|
|
117
|
-
readonly rootsRowTitle: string;
|
|
118
|
-
/** 单行移除按钮的 title。 */
|
|
119
|
-
readonly rootsRemoveTitle: string;
|
|
120
|
-
/** 单行移除按钮的文字。 */
|
|
121
|
-
readonly rootsRemove: string;
|
|
122
|
-
/** 新增行输入框的 placeholder。 */
|
|
123
|
-
readonly rootsAddPlaceholder: string;
|
|
124
|
-
/** 新增行输入框的 aria-label。 */
|
|
125
|
-
readonly rootsAddAria: string;
|
|
126
|
-
/** 新增行按钮的 title。 */
|
|
127
|
-
readonly rootsAddTitle: string;
|
|
128
|
-
/** 新增行按钮的文字。 */
|
|
129
|
-
readonly rootsAdd: string;
|
|
130
|
-
/** 允许目录面板的规则说明(绝对路径默认拒绝)。 */
|
|
131
|
-
readonly rootsHint: string;
|
|
132
|
-
/** dock 注册项 label:「润色」按钮。 */
|
|
133
|
-
readonly dockOrganizeEntry: string;
|
|
134
|
-
/** dock 注册项 label:「模板」按钮。 */
|
|
135
|
-
readonly dockTemplatesEntry: string;
|
|
136
|
-
/** 空输入框的占位提示(`conversation.input.placeholder`)。 */
|
|
137
|
-
readonly inputPlaceholder: string;
|
|
138
|
-
/** 「润色」主键(空闲态)。 */
|
|
139
|
-
readonly organizeIdle: string;
|
|
140
|
-
/** 「润色」主键(请求中)。 */
|
|
141
|
-
readonly organizeLoading: string;
|
|
142
|
-
/** 「润色」主键(失败闪烁)。 */
|
|
143
|
-
readonly organizeFailedShort: string;
|
|
144
|
-
/** 「润色」按钮 title(空闲态)。 */
|
|
145
|
-
readonly organizeIdleTitle: string;
|
|
146
|
-
/** 「润色」失败时 title 前缀(后接错误摘要)。 */
|
|
147
|
-
readonly organizeFailedTitle: string;
|
|
148
|
-
/** 润色前置检查失败:目录上下文读取失败({message} = 宿主原文,原样带出)。 */
|
|
149
|
-
readonly organizeErrContextFailed: string;
|
|
150
|
-
/** 润色前置检查失败:读取模型失败({message} = 宿主原文)。 */
|
|
151
|
-
readonly organizeErrModelFailed: string;
|
|
152
|
-
/** 润色前置检查失败:输入框为空。 */
|
|
153
|
-
readonly organizeErrEmpty: string;
|
|
154
|
-
/** 润色请求超时(宿主端未在时限内回报)。 */
|
|
155
|
-
readonly organizeErrTimeout: string;
|
|
156
|
-
/** 没有会话 id 时「润色」不可用的 title 说明。 */
|
|
157
|
-
/** 润色链路兜底:宿主回执没带 error 字段时给 {message} 的占位原因。 */
|
|
158
|
-
readonly organizeErrUnknownReason: string;
|
|
159
|
-
/** 润色回执整体不是对象时的兜底错误。 */
|
|
160
|
-
readonly organizeErrUnknown: string;
|
|
161
|
-
/** ▾ 角色菜单按钮的 aria-label。 */
|
|
162
|
-
readonly organizeCaretAria: string;
|
|
163
|
-
/** ▾ 角色菜单按钮的 title。 */
|
|
164
|
-
readonly organizeCaretTitle: string;
|
|
165
|
-
/** 「润色」主键的 aria-label。 */
|
|
166
|
-
readonly organizeMainAria: string;
|
|
167
|
-
/** 角色菜单分组标题(画板 F:菜单项上方的「角色」小标签)。 */
|
|
168
|
-
readonly organizeRoleGroup: string;
|
|
169
|
-
/** 角色菜单首项:直接润色。 */
|
|
170
|
-
readonly organizeDirectItem: string;
|
|
171
|
-
/** 角色菜单空态(没有任何模板)。 */
|
|
172
|
-
readonly organizeNoTemplates: string;
|
|
173
|
-
/** 角色菜单条目({name} = 模板名)。 */
|
|
174
|
-
readonly organizeRoleItem: string;
|
|
175
|
-
/** 润色成功但输入框动作缺失时抛出的错误(会闪烁在按钮上)。 */
|
|
176
|
-
readonly organizeWriteBackUnavailable: string;
|
|
177
|
-
/** 润色结果因 `draftRev` 变化或会话切换而没有写回时的错误。 */
|
|
178
|
-
readonly organizeWriteBackStale: string;
|
|
179
|
-
/** 「润色」按钮 title(输入框处于提交期,输入区只读)。 */
|
|
180
|
-
readonly organizeBusyTitle: string;
|
|
181
|
-
/** 「模板」按钮 title(可写时)。 */
|
|
182
|
-
readonly templatesIdleTitle: string;
|
|
183
|
-
/** 「模板」按钮 title(输入框动作缺失)。 */
|
|
184
|
-
readonly templatesBrokenTitle: string;
|
|
185
|
-
/** 「模板」按钮 title(输入框处于提交期,输入区只读)。 */
|
|
186
|
-
readonly templatesBusyTitle: string;
|
|
187
|
-
/** 空分组名的归组名。 */
|
|
188
|
-
readonly templatesGroupCommon: string;
|
|
189
|
-
/** 「模板」按钮的 aria-label。 */
|
|
190
|
-
readonly templatesAria: string;
|
|
191
|
-
/** 「模板」下拉空态(用户删光了列表)。 */
|
|
192
|
-
readonly templatesEmptyHint: string;
|
|
193
|
-
/** 内置精选表在 host 侧、首次打开菜单/进卡片时才拉:拉取中的占位行。 */
|
|
194
|
-
readonly builtinLoading: string;
|
|
195
|
-
/** 内置表拉取失败(含 {message}):静默显示空列表会被当成"内置角色没了"。 */
|
|
196
|
-
readonly builtinFailed: string;
|
|
197
|
-
/** 内置表拉取失败后的重试按钮。 */
|
|
198
|
-
readonly builtinRetry: string;
|
|
199
|
-
}
|
|
200
|
-
/**
|
|
201
|
-
* 本包的文案命名空间 merge 进官方的 `LocaleNamespaceMap`(installed
|
|
202
|
-
* `dsh-client-ui-slots/lib/types/index.d.ts`「Dictionary owners extend via declaration
|
|
203
|
-
* merging (exactly like SlotMap)」)。这不是美化:不 merge 时 `ctx.locale.bind(NS)` 只能
|
|
204
|
-
* 落到官方那条**未类型化**重载(返回 `Translate<string>`),卡片要的窄键集 `t` 就无官方
|
|
205
|
-
* 来源,本地只好手写一份同构签名。
|
|
206
|
-
* ⚠ interface 键位必须是字面量,故用下面的等式常量把它与 client-entry.ts 的 `NS` 钉住。
|
|
207
|
-
*/
|
|
208
|
-
declare module "@deepseek-ai/dsh-client-ui-slots" {
|
|
209
|
-
interface LocaleNamespaceMap {
|
|
210
|
-
/** 本包设置卡的全部界面文案键。 */
|
|
211
|
-
"dir-prep-organize": keyof UiMessages;
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
/** 编译期契约:merge 里写死的命名空间键(`Translate` 由它取键集)就是卡片的条目 id。 */
|
|
215
|
-
declare const LOCALE_NS_KEY: "dir-prep-organize";
|
|
216
|
-
/**
|
|
217
|
-
* 本源只以**类型**形态对外流通:`client-entry.ts` 的 `const NS: LocaleNs = "dir-prep-organize"` 把条目
|
|
218
|
-
* id 钉在本源上(分叉即编译期红),而产物漂移检查仍要按字面量形状从 bundle 里抓 `NS`,所以那里
|
|
219
|
-
* 保留字面量、只加类型标注——值导出不必存在(用例侧同理:要断言运行时那串就写字面量)。
|
|
220
|
-
*/
|
|
221
|
-
export type LocaleNs = typeof LOCALE_NS_KEY;
|
|
222
|
-
/**
|
|
223
|
-
* 卡片取文案的函数形状:官方 `TranslateNS<N> = Translate<LocaleKeysOf<N>>`(installed
|
|
224
|
-
* `dsh-client-ui-slots/lib/types/index.d.ts`,而 `Translate<K> =
|
|
225
|
-
* (key: K, params?: Record<string, unknown>) => string`,同文件)。函数类型归官方,
|
|
226
|
-
* 键集就是上面 merge 的 `keyof UiMessages`(外加官方 `LocaleKeysOf` 一并放行的
|
|
227
|
-
* `common` 命名空间键——那是宿主查不到键时的回落,运行时行为见其 `lookup`)。
|
|
228
|
-
*/
|
|
229
|
-
export type Translate = OfficialTranslateNS<typeof LOCALE_NS_KEY>;
|
|
230
|
-
export declare const UI_MESSAGES: MessagesCatalog<UiMessages>;
|
|
231
|
-
export {};
|