dsh-claude-slides 2.7.0 → 2.7.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 +1 -1
- package/lib/index.js +10 -4
- package/package.json +1 -1
- package/skills/claude-slides/scripts/artifact.mjs +1 -1
package/lib/client.js
CHANGED
package/lib/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
// dsh-claude-slides 2.7.
|
|
1
|
+
// dsh-claude-slides 2.7.1: built from baoyu-design.
|
|
2
2
|
var define_PLUGIN_default = { name: "claude-slides", provider: "dsh-claude-slides", skills: [{ name: "claude-slides", description: "Make and revise slide decks in the Slides artifact format (project/deck.json plus one HTML file per slide) as local files, then open them in a local slide editor where the user can present, retype, drag, and export PDF, HTML or PowerPoint. Use when the user asks for an editable slide deck or presentation in this format, names claude-slides or the Slides type, or wants to revise a folder that holds project/deck.json. A one-off single-file HTML deck or prototype is baoyu-design's.", comments: true }] };
|
|
3
3
|
|
|
4
4
|
import { spawn as spawn2 } from "node:child_process";
|
|
5
5
|
import { randomUUID } from "node:crypto";
|
|
6
6
|
import { statSync } from "node:fs";
|
|
7
7
|
import { readFile } from "node:fs/promises";
|
|
8
|
-
import { delimiter, dirname, isAbsolute, join as join2, sep } from "node:path";
|
|
8
|
+
import { basename as basename2, delimiter, dirname, isAbsolute, join as join2, sep } from "node:path";
|
|
9
9
|
import { fileURLToPath } from "node:url";
|
|
10
10
|
|
|
11
11
|
import { spawn } from "node:child_process";
|
|
@@ -345,13 +345,19 @@ function openedEditor(script, exec, result) {
|
|
|
345
345
|
const args = exec.arguments;
|
|
346
346
|
const command = args?.command;
|
|
347
347
|
if (typeof command !== "string" || args?.run_in_background === true) return null;
|
|
348
|
-
|
|
349
|
-
if (at < 0 || !/(?:^|[\s"'])open(?:[\s"']|$)/.test(command.slice(at + script.length))) return null;
|
|
348
|
+
if (!/(?:^|[\s"'])open(?:[\s"']|$)/.test(command)) return null;
|
|
350
349
|
const stdout = bashStdout(result);
|
|
351
350
|
const opened = stdout === null ? void 0 : jsonObjects(stdout).findLast((o) => typeof o.root === "string" && typeof o.url === "string");
|
|
352
351
|
if (typeof opened?.root !== "string" || typeof opened.url !== "string") return null;
|
|
352
|
+
if (!ranScript(script, command, opened.stop)) return null;
|
|
353
353
|
return { session: String(exec.agent.id), root: opened.root, url: opened.url };
|
|
354
354
|
}
|
|
355
|
+
function ranScript(script, command, stop) {
|
|
356
|
+
if (typeof stop !== "string") return command.includes(script);
|
|
357
|
+
if (stop.includes(script)) return true;
|
|
358
|
+
const folder = basename2(dirname(dirname(script)));
|
|
359
|
+
return new RegExp(`[/\\\\]${folder.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}[/\\\\]scripts[/\\\\]artifact\\.mjs`).test(stop);
|
|
360
|
+
}
|
|
355
361
|
var bound = (text) => text.length <= SUMMARY_MAX ? text : `${text.slice(0, SUMMARY_MAX - 1)}…`;
|
|
356
362
|
function commentMessage(skill, plugin, out, root) {
|
|
357
363
|
const title = typeof out.title === "string" && out.title ? out.title : root.split(/[\\/]/).pop() || root;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-claude-slides",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.1",
|
|
4
4
|
"description": "DeepSeek Harness plugin: the claude-slides skill from baoyu-design. The agent writes editable slide decks as files and opens them in a local slide editor.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"dsh",
|
|
@@ -3221,7 +3221,7 @@ async function open(a, flags) {
|
|
|
3221
3221
|
assertServerFiles();
|
|
3222
3222
|
const existing = await runningServer2(a.root);
|
|
3223
3223
|
if (existing) {
|
|
3224
|
-
print({ url: existing.url, root: a.root, pid: existing.pid, reused: true, ...await lanOn2(existing.url, flags), ...reusedNote(a, flags) });
|
|
3224
|
+
print({ url: existing.url, root: a.root, pid: existing.pid, reused: true, ...await lanOn2(existing.url, flags), log: path13.join(a.root, LOG_FILE), stop: script("stop", a.root), ...reusedNote(a, flags) });
|
|
3225
3225
|
return;
|
|
3226
3226
|
}
|
|
3227
3227
|
const state = await startBackground(a, flags);
|