@dickpy/dsh-oil-slide 0.2.8 → 0.2.9
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/index.js
CHANGED
|
@@ -112,11 +112,36 @@ const fields$1 = {
|
|
|
112
112
|
font: z.string().max(500),
|
|
113
113
|
footer: z.string().max(500)
|
|
114
114
|
};
|
|
115
|
+
const placement = z.object({
|
|
116
|
+
corner: z.enum([
|
|
117
|
+
"top-left",
|
|
118
|
+
"top-right",
|
|
119
|
+
"bottom-left",
|
|
120
|
+
"bottom-right"
|
|
121
|
+
]),
|
|
122
|
+
size: z.enum([
|
|
123
|
+
"small",
|
|
124
|
+
"medium",
|
|
125
|
+
"large"
|
|
126
|
+
]),
|
|
127
|
+
scope: z.enum([
|
|
128
|
+
"all",
|
|
129
|
+
"cover",
|
|
130
|
+
"body"
|
|
131
|
+
])
|
|
132
|
+
});
|
|
133
|
+
const material = z.object({
|
|
134
|
+
file: z.string(),
|
|
135
|
+
name: z.string().max(120)
|
|
136
|
+
});
|
|
115
137
|
const brandSchema = z.object({
|
|
116
138
|
...fields$1,
|
|
117
139
|
id: key,
|
|
118
140
|
images: z.array(z.string()),
|
|
119
|
-
template: z.boolean().optional()
|
|
141
|
+
template: z.boolean().optional(),
|
|
142
|
+
logoPlacement: placement.optional(),
|
|
143
|
+
logoPreview: z.string().optional(),
|
|
144
|
+
materials: z.array(material).optional()
|
|
120
145
|
});
|
|
121
146
|
const regionSchema = z.object({
|
|
122
147
|
id: key,
|
|
@@ -136,8 +161,15 @@ const operationSchema = z.discriminatedUnion("kind", [
|
|
|
136
161
|
z.object({
|
|
137
162
|
kind: z.literal("save-brand"),
|
|
138
163
|
...fields$1,
|
|
139
|
-
|
|
140
|
-
|
|
164
|
+
baseId: key.optional(),
|
|
165
|
+
logo: asset.nullable().optional(),
|
|
166
|
+
logoPlacement: placement.optional(),
|
|
167
|
+
template: asset.nullable().optional(),
|
|
168
|
+
materials: z.array(z.object({
|
|
169
|
+
name: z.string().max(120),
|
|
170
|
+
file: z.string().optional(),
|
|
171
|
+
asset: asset.optional()
|
|
172
|
+
})).max(4).optional()
|
|
141
173
|
}),
|
|
142
174
|
z.object({
|
|
143
175
|
kind: z.literal("outline"),
|
|
@@ -2333,7 +2365,7 @@ const DSH_PLUGIN_APPENDIX = `
|
|
|
2333
2365
|
|
|
2334
2366
|
- **反问工具映射**:需要前期澄清少量关键前提时,使用宿主原生 \`ask_user_question\` 工具结构化提问,无需长段文字追问。
|
|
2335
2367
|
- **生图执行路径**:PPT 样稿与成稿通过 slide_workflow.py render-draft / render-page 请求「生图设置」中的模型顺序,转换素材使用同一配置的 editppt image。发生自动切换时,向用户说明实际使用的备用模型。未配置或全部模型失败时,保留当前进度并提示检查渠道。
|
|
2336
|
-
-
|
|
2368
|
+
- 大纲阶段让用户在右侧编辑、从 PPT 素材库选择方案及样稿数量。需要对话确认时只发一道单选题,使用当前状态的 outlineQuestionId 作为 id,接受面板提交的最新版本、页码和数量。生成前重新读取状态。已配置的企业 Logo 由工作流按位置叠加,生成或导入底图时为它留白,保留用户上传的原图。
|
|
2337
2369
|
- 圈选修改在幻灯片预览中直接生成候选并由用户决定是否采用。更新可编辑版时按 editable-prepare 返回的 changed 页码映射重建,若没有变化则直接 editable-finalize。
|
|
2338
2370
|
- **风格选择题与右侧设计图共用一个回答**:每轮样稿齐全后读取 slide-workflow.json 的 reviewId。使用宿主的结构化提问工具发一道单选题,id 必须逐字使用 reviewId,选项以“设计稿 1 · …”“设计稿 2 · …”(英文 “Design 1 · …”)标明对应候选编号。接受自由填写的改稿、换组或恢复历史版本要求;完成后刷新面板,用新的 reviewId 重新提问。用户采用后只执行一次 approve-style,使用选中候选的当前 SHA。成稿和可编辑结果使用 canvas 预览,设计稿使用 reference。
|
|
2339
2371
|
- **自动展开右侧预览栏(重要)**:每当生成或更新参考设计稿(如 \`s1.png\` / \`deck-2x2.png\`)、组装或更新 \`web/index.html\`、或导出 \`.pptx\` 后,**必须立即调用 \`oil_slide_open_preview\`**(传入 \`deckRelPath\` 和 \`tab: "reference"\` 或 \`"canvas"\`),自动展开并刷新右侧 Oil Slide 预览面板给用户查看。
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dickpy/dsh-oil-slide",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.9",
|
|
4
4
|
"description": "Oil Slide plugin for DeepSeek Harness with a Studio-aligned design draft gallery, live HTML slide canvas, offline HTML export, and editable native PPTX export",
|
|
5
5
|
"author": "Oil Oil",
|
|
6
6
|
"homepage": "https://github.com/dickpy/oil-slide#readme",
|