@michengai/dsh-automation 0.1.21 → 0.1.23

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 CHANGED
@@ -31,6 +31,7 @@ var import_react11 = require("react");
31
31
 
32
32
  // src/client/AutomationView.tsx
33
33
  var import_react6 = require("react");
34
+ var import_dsh_client_ui_primitives2 = require("@deepseek-ai/dsh-client-ui-primitives");
34
35
 
35
36
  // src/client/helpers.ts
36
37
  var AutomationFormError = class extends Error {
@@ -384,6 +385,9 @@ function ClockIcon(props) {
384
385
  function ChatIcon(props) {
385
386
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(IconFrame, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M5.5 6.5h13v9.2H9.2L5.5 18.8V6.5Z" }) });
386
387
  }
388
+ function GithubIcon(props) {
389
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", { viewBox: "0 0 16 16", width: 16, height: 16, "aria-hidden": "true", focusable: "false", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { fill: "currentColor", d: "M8 0a8 8 0 0 0-2.53 15.59c.4.074.547-.173.547-.385 0-.19-.007-.693-.01-1.36-2.226.484-2.695-1.073-2.695-1.073-.364-.924-.89-1.17-.89-1.17-.726-.496.055-.486.055-.486.803.056 1.225.824 1.225.824.714 1.223 1.872.87 2.328.665.072-.517.28-.87.508-1.07-1.777-.202-3.645-.888-3.645-3.956 0-.874.31-1.588.823-2.148-.083-.202-.357-1.017.078-2.12 0 0 .672-.215 2.2.82A7.65 7.65 0 0 1 8 4.8c.68.003 1.365.092 2.004.27 1.527-1.035 2.197-.82 2.197-.82.437 1.103.162 1.918.08 2.12.513.56.822 1.274.822 2.148 0 3.076-1.872 3.752-3.654 3.95.288.248.544.735.544 1.482 0 1.07-.01 1.932-.01 2.195 0 .214.144.463.55.384A8.001 8.001 0 0 0 8 0Z" }) });
390
+ }
387
391
  function FolderIcon(props) {
388
392
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(IconFrame, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M4 7.2h6.1l1.7 1.8H20V18H4V7.2Z" }) });
389
393
  }
@@ -1707,7 +1711,19 @@ function AutomationView({ t, permissionT, modelT, runtime, closeSettings }) {
1707
1711
  return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "dsh-st-shell", children: [
1708
1712
  /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("header", { className: "dsh-st-top", children: [
1709
1713
  /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "dsh-st-heading", children: [
1710
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("h1", { children: t("tab") }),
1714
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "dsh-st-heading-row", children: [
1715
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("h1", { children: t("tab") }),
1716
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "dsh-st-heading-links", children: [
1717
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("a", { className: "dsh-st-heading-link", href: "https://github.com/MichengAI/dsh-automation", target: "_blank", rel: "noreferrer", "aria-label": t("header.githubProject"), children: [
1718
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(GithubIcon, {}),
1719
+ t("header.githubProject")
1720
+ ] }),
1721
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("a", { className: "dsh-st-heading-link", href: "https://github.com/MichengAI/dsh-automation/issues", target: "_blank", rel: "noreferrer", "aria-label": t("header.githubFeedback"), children: [
1722
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_dsh_client_ui_primitives2.IconListPenOutline16, {}),
1723
+ t("header.githubFeedback")
1724
+ ] })
1725
+ ] })
1726
+ ] }),
1711
1727
  /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { children: t("header.lead") })
1712
1728
  ] }),
1713
1729
  /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "dsh-st-toolbar", children: [
@@ -1998,6 +2014,8 @@ var en = {
1998
2014
  "sidebar.sortManual": "Manual",
1999
2015
  "sidebar.sortTime": "Recently updated",
2000
2016
  "header.lead": "Plan automatic tasks, or trigger them by hand. Describe the recurring work in any chat to create it quickly.",
2017
+ "header.githubProject": "GitHub",
2018
+ "header.githubFeedback": "Issues",
2001
2019
  "examples.title": "Recommended examples",
2002
2020
  "examples.1.title": "Daily regression check",
2003
2021
  "examples.1.body": "Create a scheduled task that runs every day and inspects new test failures.",
@@ -2213,6 +2231,8 @@ var zh = {
2213
2231
  "sidebar.sortManual": "\u624B\u52A8\u6392\u5E8F",
2214
2232
  "sidebar.sortTime": "\u6700\u8FD1\u66F4\u65B0",
2215
2233
  "header.lead": "\u6309\u8BA1\u5212\u81EA\u52A8\u6267\u884C\u4EFB\u52A1\uFF0C\u4E5F\u53EF\u968F\u65F6\u624B\u52A8\u89E6\u53D1\u3002\u5728\u4EFB\u610F\u5BF9\u8BDD\u4E2D\u63CF\u8FF0\u4F60\u60F3\u5B9A\u671F\u505A\u7684\u4E8B\uFF0C\u5373\u53EF\u5FEB\u901F\u521B\u5EFA",
2234
+ "header.githubProject": "GitHub",
2235
+ "header.githubFeedback": "\u95EE\u9898\u53CD\u9988",
2216
2236
  "examples.title": "\u63A8\u8350\u6848\u4F8B",
2217
2237
  "examples.1.title": "\u6BCF\u65E5\u56DE\u5F52\u68C0\u67E5",
2218
2238
  "examples.1.body": "\u6211\u8981\u521B\u5EFA\u4E00\u4E2A\u5B9A\u65F6\u4EFB\u52A1\uFF0C\u6BCF\u3010\u5929\u3011\u6267\u884C\u3010\u68C0\u67E5\u65B0\u589E\u6D4B\u8BD5\u5931\u8D25\u5E76\u7ED9\u51FA\u6700\u5C0F\u4FEE\u590D\u3011\u3002",
@@ -2484,7 +2504,7 @@ function isForeignSidebarHost(component) {
2484
2504
  // src/client/native-session-list.tsx
2485
2505
  var import_react9 = require("react");
2486
2506
  var import_react_dom3 = require("react-dom");
2487
- var import_dsh_client_ui_primitives2 = require("@deepseek-ai/dsh-client-ui-primitives");
2507
+ var import_dsh_client_ui_primitives3 = require("@deepseek-ai/dsh-client-ui-primitives");
2488
2508
 
2489
2509
  // src/client/native-session-menu.ts
2490
2510
  function resolveEventElement(target) {
@@ -3213,7 +3233,7 @@ function NativeScheduleSessionList(props) {
3213
3233
  ] })
3214
3234
  ] }),
3215
3235
  /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
3216
- import_dsh_client_ui_primitives2.Modal,
3236
+ import_dsh_client_ui_primitives3.Modal,
3217
3237
  {
3218
3238
  open: archiveGroupTarget !== void 0,
3219
3239
  onClose: () => {
@@ -3224,11 +3244,11 @@ function NativeScheduleSessionList(props) {
3224
3244
  closeLabel: t("session.archiveGroupClose"),
3225
3245
  title: t("session.archiveGroup"),
3226
3246
  footer: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "dsh-st-n-dialog-actions", children: [
3227
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_dsh_client_ui_primitives2.Button, { variant: "outline", disabled: archiveGroupBusy, onClick: () => {
3247
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_dsh_client_ui_primitives3.Button, { variant: "outline", disabled: archiveGroupBusy, onClick: () => {
3228
3248
  setArchiveGroupTarget(void 0);
3229
3249
  setArchiveGroupError(void 0);
3230
3250
  }, children: t("session.archiveGroupCancel") }),
3231
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_dsh_client_ui_primitives2.Button, { variant: "outline", className: "dsh-st-n-danger-button", disabled: archiveGroupBusy, onClick: confirmArchiveGroup, children: t("session.archiveGroupConfirm") })
3251
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_dsh_client_ui_primitives3.Button, { variant: "outline", className: "dsh-st-n-danger-button", disabled: archiveGroupBusy, onClick: confirmArchiveGroup, children: t("session.archiveGroupConfirm") })
3232
3252
  ] }),
3233
3253
  children: [
3234
3254
  /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { className: "dsh-st-n-dialog-copy", children: archiveGroupTarget === void 0 ? "" : t("session.archiveGroupDescription", { name: archiveGroupTarget.name, count: archiveGroupTarget.sessionIds.length }) }),
@@ -3242,10 +3262,10 @@ function NativeScheduleSessionList(props) {
3242
3262
  function NativeScheduleGroupRow(props) {
3243
3263
  const { t, id, name: name2, expanded, hasCurrentSession, menuOpen, canArchiveGroup, onToggle, onMenuChange, onTaskSettings, onArchiveGroup } = props;
3244
3264
  const items = [
3245
- { id: "task-settings", label: t("session.taskSettings"), icon: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_dsh_client_ui_primitives2.IconSettingsOutline16, { size: 16 }) },
3265
+ { id: "task-settings", label: t("session.taskSettings"), icon: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_dsh_client_ui_primitives3.IconSettingsOutline16, { size: 16 }) },
3246
3266
  ...canArchiveGroup ? [
3247
3267
  { type: "separator", id: "archive-separator" },
3248
- { id: "archive-group", label: t("session.archiveGroup"), icon: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_dsh_client_ui_primitives2.IconArchiveOutline20, { size: 16 }), danger: true }
3268
+ { id: "archive-group", label: t("session.archiveGroup"), icon: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_dsh_client_ui_primitives3.IconArchiveOutline20, { size: 16 }), danger: true }
3249
3269
  ] : []
3250
3270
  ];
3251
3271
  const rowClass = "dsh-st-n-row" + (hasCurrentSession ? " has-current-session" : "") + (menuOpen ? " is-menu" : "");
@@ -3261,7 +3281,7 @@ function NativeScheduleGroupRow(props) {
3261
3281
  /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "dsh-st-n-slot dsh-st-n-folder", children: expanded ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(FolderOpenIcon, { width: 16, height: 16 }) : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(FolderClosedIcon, { width: 16, height: 16 }) }),
3262
3282
  /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "dsh-st-n-title", children: name2 }),
3263
3283
  /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "dsh-st-n-acts", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
3264
- import_dsh_client_ui_primitives2.Menu,
3284
+ import_dsh_client_ui_primitives3.Menu,
3265
3285
  {
3266
3286
  open: menuOpen,
3267
3287
  onClose: () => {
@@ -3289,7 +3309,7 @@ function NativeScheduleGroupRow(props) {
3289
3309
  event.stopPropagation();
3290
3310
  onMenuChange(!menuOpen);
3291
3311
  },
3292
- children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_dsh_client_ui_primitives2.IconEllipsisOutline16, { size: 16 })
3312
+ children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_dsh_client_ui_primitives3.IconEllipsisOutline16, { size: 16 })
3293
3313
  }
3294
3314
  )
3295
3315
  }
@@ -3656,6 +3676,7 @@ var CSS_TEXT = `
3656
3676
  .dsh-st-shell{box-sizing:border-box;max-width:1080px;width:100%;margin:0 auto;padding:0 0 32px;color:var(--dsw-alias-label-primary);font-family:var(--dsw-font-family,system-ui)}
3657
3677
  .dsh-st-top{display:flex;flex-direction:column;align-items:stretch;gap:12px;margin-bottom:12px}
3658
3678
  .dsh-st-heading h1,.dsh-st-top h1{margin:0;font-size:20px;line-height:28px;font-weight:650;letter-spacing:-.2px}
3679
+ .dsh-st-heading-row{display:flex;align-items:center;gap:8px;min-width:0;flex-wrap:wrap}.dsh-st-heading-links{display:inline-flex;align-items:center;gap:4px;min-width:0}.dsh-st-heading-link{display:inline-flex;align-items:center;gap:5px;min-height:28px;padding:0 8px;color:var(--dsw-alias-label-secondary);background:transparent;border:1px solid var(--dsw-alias-border-l2);border-radius:7px;font-size:12px;font-weight:500;line-height:18px;text-decoration:none;white-space:nowrap}.dsh-st-heading-link:hover{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-interactive-bg-hover)}.dsh-st-heading-link:focus-visible{outline:2px solid var(--dsw-alias-state-success-primary);outline-offset:2px}.dsh-st-heading-link svg{flex:none}
3659
3680
  .dsh-st-heading p,.dsh-st-top p{margin:4px 0 0;max-width:none;color:var(--dsw-alias-label-tertiary);font-size:13px;line-height:1.5}
3660
3681
  .dsh-st-toolbar{display:flex;flex-wrap:nowrap;align-items:center;justify-content:flex-start;gap:8px}
3661
3682
  .dsh-st-search{flex:1;min-width:0;max-width:280px;height:32px;padding:0 12px;border:1px solid var(--dsw-alias-border-l2);border-radius:8px;background:var(--dsw-alias-bg-layer-3,var(--dsw-alias-bg-layer-1));color:inherit;font:inherit;font-size:13px}