dsh-workbench-message 0.1.0 → 0.1.2
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 +217 -76
- package/lib/index.js +1 -1
- package/package.json +4 -4
package/lib/client.js
CHANGED
|
@@ -39,6 +39,42 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
39
39
|
};
|
|
40
40
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
41
41
|
|
|
42
|
+
// packages/addons/lib/icons.cjs
|
|
43
|
+
var require_icons = __commonJS({
|
|
44
|
+
"packages/addons/lib/icons.cjs"(exports2, module2) {
|
|
45
|
+
"use strict";
|
|
46
|
+
var h = require("react").createElement;
|
|
47
|
+
function create(prefix, glyphs, options) {
|
|
48
|
+
var opts = options || {};
|
|
49
|
+
var ICONS = Object.assign({}, glyphs);
|
|
50
|
+
function Icon2(props) {
|
|
51
|
+
var C = ICONS[props.name] || (opts.fallback ? ICONS[opts.fallback] : null);
|
|
52
|
+
if (!C) return null;
|
|
53
|
+
var size = typeof opts.sizeOf === "function" ? opts.sizeOf(props) : props.size || 14;
|
|
54
|
+
var cls = prefix + "-svg" + (opts.classNameAppend && props.className ? " " + props.className : "");
|
|
55
|
+
var attrs = {
|
|
56
|
+
size,
|
|
57
|
+
strokeWidth: props.strokeWidth || 2,
|
|
58
|
+
"aria-hidden": "true",
|
|
59
|
+
className: cls
|
|
60
|
+
};
|
|
61
|
+
if (opts.focusable) attrs.focusable = false;
|
|
62
|
+
return h(C, attrs);
|
|
63
|
+
}
|
|
64
|
+
var set = { ICONS, Icon: Icon2 };
|
|
65
|
+
if (opts.tabIcon) {
|
|
66
|
+
set.tabIcon = function(name) {
|
|
67
|
+
return function TabIcon() {
|
|
68
|
+
return h(Icon2, { name, size: 14 });
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
return set;
|
|
73
|
+
}
|
|
74
|
+
module2.exports = { create };
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
|
|
42
78
|
// node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/shared/src/utils/toKebabCase.mjs
|
|
43
79
|
var toKebabCase;
|
|
44
80
|
var init_toKebabCase = __esm({
|
|
@@ -966,6 +1002,70 @@ var init_play = __esm({
|
|
|
966
1002
|
}
|
|
967
1003
|
});
|
|
968
1004
|
|
|
1005
|
+
// node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/message-square.mjs
|
|
1006
|
+
var message_square_exports = {};
|
|
1007
|
+
__export(message_square_exports, {
|
|
1008
|
+
__iconData: () => __iconData25,
|
|
1009
|
+
default: () => MessageSquare
|
|
1010
|
+
});
|
|
1011
|
+
var __iconData25, MessageSquare;
|
|
1012
|
+
var init_message_square = __esm({
|
|
1013
|
+
"node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/message-square.mjs"() {
|
|
1014
|
+
init_createLucideIcon();
|
|
1015
|
+
__iconData25 = {
|
|
1016
|
+
name: "message-square",
|
|
1017
|
+
size: 24,
|
|
1018
|
+
node: [
|
|
1019
|
+
[
|
|
1020
|
+
"path",
|
|
1021
|
+
{
|
|
1022
|
+
d: "M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",
|
|
1023
|
+
key: "18887p"
|
|
1024
|
+
}
|
|
1025
|
+
]
|
|
1026
|
+
]
|
|
1027
|
+
};
|
|
1028
|
+
__iconData25.node;
|
|
1029
|
+
MessageSquare = createLucideIcon(__iconData25);
|
|
1030
|
+
}
|
|
1031
|
+
});
|
|
1032
|
+
|
|
1033
|
+
// packages/addons/message/client/ui/icons.cjs
|
|
1034
|
+
var require_icons2 = __commonJS({
|
|
1035
|
+
"packages/addons/message/client/ui/icons.cjs"(exports2, module2) {
|
|
1036
|
+
"use strict";
|
|
1037
|
+
var icons = require_icons();
|
|
1038
|
+
var set = icons.create("wbg", {
|
|
1039
|
+
bell: (init_bell(), __toCommonJS(bell_exports)).default,
|
|
1040
|
+
"bell-off": (init_bell_off(), __toCommonJS(bell_off_exports)).default,
|
|
1041
|
+
inbox: (init_inbox(), __toCommonJS(inbox_exports)).default,
|
|
1042
|
+
mail: (init_mail(), __toCommonJS(mail_exports)).default,
|
|
1043
|
+
"mail-open": (init_mail_open(), __toCommonJS(mail_open_exports)).default,
|
|
1044
|
+
chart: (init_chart_column(), __toCommonJS(chart_column_exports)).default,
|
|
1045
|
+
settings: (init_settings(), __toCommonJS(settings_exports)).default,
|
|
1046
|
+
database: (init_database(), __toCommonJS(database_exports)).default,
|
|
1047
|
+
list: (init_list(), __toCommonJS(list_exports)).default,
|
|
1048
|
+
check: (init_check(), __toCommonJS(check_exports)).default,
|
|
1049
|
+
"check-check": (init_check_check(), __toCommonJS(check_check_exports)).default,
|
|
1050
|
+
search: (init_search(), __toCommonJS(search_exports)).default,
|
|
1051
|
+
refresh: (init_refresh_cw(), __toCommonJS(refresh_cw_exports)).default,
|
|
1052
|
+
plus: (init_plus(), __toCommonJS(plus_exports)).default,
|
|
1053
|
+
volume: (init_volume_2(), __toCommonJS(volume_2_exports)).default,
|
|
1054
|
+
mute: (init_volume_x(), __toCommonJS(volume_x_exports)).default,
|
|
1055
|
+
moon: (init_moon(), __toCommonJS(moon_exports)).default,
|
|
1056
|
+
clock: (init_clock(), __toCommonJS(clock_exports)).default,
|
|
1057
|
+
info: (init_info(), __toCommonJS(info_exports)).default,
|
|
1058
|
+
success: (init_circle_check(), __toCommonJS(circle_check_exports)).default,
|
|
1059
|
+
warning: (init_triangle_alert(), __toCommonJS(triangle_alert_exports)).default,
|
|
1060
|
+
error: (init_circle_alert(), __toCommonJS(circle_alert_exports)).default,
|
|
1061
|
+
reset: (init_rotate_ccw(), __toCommonJS(rotate_ccw_exports)).default,
|
|
1062
|
+
play: (init_play(), __toCommonJS(play_exports)).default,
|
|
1063
|
+
"message-square": (init_message_square(), __toCommonJS(message_square_exports)).default
|
|
1064
|
+
}, { fallback: "info", tabIcon: true });
|
|
1065
|
+
module2.exports = { ICONS: set.ICONS, Icon: set.Icon, tabIcon: set.tabIcon };
|
|
1066
|
+
}
|
|
1067
|
+
});
|
|
1068
|
+
|
|
969
1069
|
// packages/addons/message/client/ui/copy.cjs
|
|
970
1070
|
var require_copy = __commonJS({
|
|
971
1071
|
"packages/addons/message/client/ui/copy.cjs"(exports2, module2) {
|
|
@@ -3149,8 +3249,21 @@ var require_action_schema_style = __commonJS({
|
|
|
3149
3249
|
"." + P + " select:focus-visible{outline:2px solid var(--dsw-alias-brand-primary,#4f6ef7);outline-offset:1px}",
|
|
3150
3250
|
"." + P + "-list{display:flex;flex-direction:column;gap:8px}",
|
|
3151
3251
|
"." + P + "-card{border:1px solid var(--wb-border,#e3e5e9);border-radius:10px;padding:10px 12px;background:var(--wb-surface,var(--dsw-alias-bg-layer-1,transparent));display:flex;flex-direction:column;gap:8px;min-width:0}",
|
|
3152
|
-
"." + P + "-cardhead{display:
|
|
3153
|
-
"." + P + "-
|
|
3252
|
+
"." + P + "-cardhead{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:8px}",
|
|
3253
|
+
"." + P + "-cardmeta{display:flex;align-items:center;flex-wrap:wrap;gap:8px;min-width:0;min-height:24px}",
|
|
3254
|
+
"." + P + "-cardhead code{font-weight:640;overflow-wrap:anywhere;min-width:0}",
|
|
3255
|
+
"." + P + "-hintline{margin:0;color:var(--dsw-alias-label-tertiary,inherit);font-size:11.5px;line-height:1.5}",
|
|
3256
|
+
"." + P + "-toggle{display:inline-flex;align-items:center;gap:6px;min-height:24px;padding:0 2px;border:0;background:transparent;font:inherit;font-size:11.5px;color:var(--wb-muted);cursor:pointer}",
|
|
3257
|
+
"." + P + "-track{display:inline-flex;align-items:center;box-sizing:border-box;width:30px;height:18px;padding:2px;border:1px solid var(--wb-muted);border-radius:999px;background:var(--wb-surface);color:var(--wb-muted)}",
|
|
3258
|
+
"." + P + "-track::before{content:'';width:12px;height:12px;border-radius:50%;background:currentColor;transition:transform .15s ease}",
|
|
3259
|
+
"." + P + "-toggle[aria-checked=true] ." + P + "-track{background:var(--wb-accent);border-color:var(--wb-accent);color:var(--wb-card)}",
|
|
3260
|
+
"." + P + "-toggle[aria-checked=true] ." + P + "-track::before{transform:translateX(12px)}",
|
|
3261
|
+
"." + P + "-toggle:hover:not(:disabled) ." + P + "-track{outline:1px solid var(--wb-accent)}",
|
|
3262
|
+
"." + P + "-toggle:focus-visible{outline:2px solid var(--wb-accent);outline-offset:2px}",
|
|
3263
|
+
"." + P + "-toggle:disabled{opacity:.6;cursor:progress}",
|
|
3264
|
+
"@media(prefers-reduced-motion:reduce){." + P + "-track::before{transition:none}}",
|
|
3265
|
+
// 安全约束(不可放开):用警示色描边,和可切换的开关区分开。
|
|
3266
|
+
"." + P + "-locked{border-color:var(--wb-warn,#b7791f);color:var(--wb-warn,#b7791f)}",
|
|
3154
3267
|
"." + P + "-desc{margin:0;color:var(--dsw-alias-label-secondary,inherit);line-height:1.55;font-size:12.5px}",
|
|
3155
3268
|
// 搜索命中:用品牌色透明度叠加而不是写死浅色,深浅主题都可读;继承文字颜色、不覆盖 ::selection。
|
|
3156
3269
|
"." + P + " mark." + P + "-hit{background:color-mix(in oklab,var(--dsw-alias-brand-primary,#4f6ef7) 22%,transparent);color:inherit;border-radius:2px;padding:0;font:inherit;box-decoration-break:clone;-webkit-box-decoration-break:clone}",
|
|
@@ -3202,6 +3315,15 @@ var require_action_schema_view = __commonJS({
|
|
|
3202
3315
|
zh: {
|
|
3203
3316
|
title: "Action",
|
|
3204
3317
|
hint: "\u8FD0\u884C\u65F6\u6CE8\u518C \xB7 \u53EA\u8BFB",
|
|
3318
|
+
switchHint: "agent \u5F00\u5173\u843D\u672C\u673A\u3001\u5373\u6539\u5373\u751F\u6548\uFF1B\u754C\u9762\u64CD\u4F5C\u4E0D\u53D7\u5F71\u54CD\u3002",
|
|
3319
|
+
hostHint: "\u5BBF\u4E3B action \u7684 agent \u5F00\u5173\uFF1B\u6807\u300C\u4EC5\u754C\u9762 \xB7 \u5B89\u5168\u7EA6\u675F\u300D\u7684\u4E0D\u53EF\u653E\u5F00\u3002",
|
|
3320
|
+
agentSwitch: "agent \u53EF\u7528",
|
|
3321
|
+
agentLocked: "\u4EC5\u754C\u9762 \xB7 \u5B89\u5168\u7EA6\u675F",
|
|
3322
|
+
agentLockedHint: "\u8BE5 action \u53EA\u80FD\u5728\u754C\u9762\u6267\u884C\uFF08\u5B89\u5168\u7EA6\u675F\uFF09\uFF0Cagent \u5F00\u5173\u4E0D\u53EF\u653E\u5F00",
|
|
3323
|
+
agentSaving: "\u4FDD\u5B58\u4E2D\u2026",
|
|
3324
|
+
agentOnToast: "\u5DF2\u5141\u8BB8 agent \u8C03\u7528",
|
|
3325
|
+
agentOffToast: "\u5DF2\u7981\u6B62 agent \u8C03\u7528",
|
|
3326
|
+
agentFail: "\u5207\u6362 agent \u5F00\u5173\u5931\u8D25",
|
|
3205
3327
|
domain: "\u57DF",
|
|
3206
3328
|
versionLabel: "\u7248\u672C",
|
|
3207
3329
|
shell: "\u5BBF\u4E3B",
|
|
@@ -3247,6 +3369,15 @@ var require_action_schema_view = __commonJS({
|
|
|
3247
3369
|
en: {
|
|
3248
3370
|
title: "Actions",
|
|
3249
3371
|
hint: "runtime registry \xB7 read-only",
|
|
3372
|
+
switchHint: "The agent switch is stored locally and applies immediately; UI actions are unaffected.",
|
|
3373
|
+
hostHint: "Agent switch for host actions; items marked UI-only (security) cannot be opened up.",
|
|
3374
|
+
agentSwitch: "Agent callable",
|
|
3375
|
+
agentLocked: "UI only \xB7 security",
|
|
3376
|
+
agentLockedHint: "This action can only run from the UI (security constraint); the agent switch cannot be opened",
|
|
3377
|
+
agentSaving: "Saving\u2026",
|
|
3378
|
+
agentOnToast: "Agent calls allowed",
|
|
3379
|
+
agentOffToast: "Agent calls blocked",
|
|
3380
|
+
agentFail: "Failed to change the agent switch",
|
|
3250
3381
|
domain: "Domain",
|
|
3251
3382
|
versionLabel: "Version",
|
|
3252
3383
|
shell: "Host",
|
|
@@ -3359,7 +3490,9 @@ var require_action_schema_view = __commonJS({
|
|
|
3359
3490
|
}
|
|
3360
3491
|
module2.exports = function createActionSchemaView(options) {
|
|
3361
3492
|
var raw = String(options.domain || "");
|
|
3362
|
-
var
|
|
3493
|
+
var SOURCE = options.source === "actions.list" ? "actions.list" : "actionSchema";
|
|
3494
|
+
var DOMAIN = SOURCE === "actions.list" ? raw : raw.indexOf("wb-addon-") === 0 ? raw : "wb-addon-" + raw;
|
|
3495
|
+
var LIST_DOMAIN = options.listDomain ? String(options.listDomain) : DOMAIN;
|
|
3363
3496
|
var prefix = options.prefix;
|
|
3364
3497
|
var P = prefix + "-as";
|
|
3365
3498
|
var Icon2 = options.Icon || null;
|
|
@@ -3403,6 +3536,8 @@ var require_action_schema_view = __commonJS({
|
|
|
3403
3536
|
var typePick = typeState[0], setTypePick = typeState[1];
|
|
3404
3537
|
var toastState = React.useState("");
|
|
3405
3538
|
var toast = toastState[0], setToast = toastState[1];
|
|
3539
|
+
var savingState = React.useState("");
|
|
3540
|
+
var saving = savingState[0], setSaving = savingState[1];
|
|
3406
3541
|
React.useEffect(function() {
|
|
3407
3542
|
injectCss();
|
|
3408
3543
|
}, []);
|
|
@@ -3411,9 +3546,10 @@ var require_action_schema_view = __commonJS({
|
|
|
3411
3546
|
setLoading(true);
|
|
3412
3547
|
setErr("");
|
|
3413
3548
|
var pending;
|
|
3414
|
-
var actionName = DOMAIN.replace(/^wb-addon-/, "") + ".actionSchema";
|
|
3549
|
+
var actionName = SOURCE === "actions.list" ? "actions.list" : DOMAIN.replace(/^wb-addon-/, "") + ".actionSchema";
|
|
3550
|
+
var callArgs = SOURCE === "actions.list" ? { detail: true, domain: LIST_DOMAIN } : void 0;
|
|
3415
3551
|
if (api && typeof api.call === "function") {
|
|
3416
|
-
pending = Promise.resolve(api.call(actionName)).then(function(r) {
|
|
3552
|
+
pending = Promise.resolve(api.call(actionName, callArgs)).then(function(r) {
|
|
3417
3553
|
if (r && r.ok === false) return r;
|
|
3418
3554
|
return r && r.result || r;
|
|
3419
3555
|
});
|
|
@@ -3453,6 +3589,39 @@ var require_action_schema_view = __commonJS({
|
|
|
3453
3589
|
plainCopy(text);
|
|
3454
3590
|
done();
|
|
3455
3591
|
}
|
|
3592
|
+
function setAgent(action, next) {
|
|
3593
|
+
var name = action.name;
|
|
3594
|
+
setSaving(name);
|
|
3595
|
+
setToast("");
|
|
3596
|
+
var fail = function(e) {
|
|
3597
|
+
setSaving("");
|
|
3598
|
+
setToast(t.agentFail + "\uFF1A" + String(e && e.message || e || ""));
|
|
3599
|
+
};
|
|
3600
|
+
var done = function(r) {
|
|
3601
|
+
setSaving("");
|
|
3602
|
+
var payload = r && typeof r === "object" && Object.prototype.hasOwnProperty.call(r, "result") ? r.result : r;
|
|
3603
|
+
if (r && r.ok === false) {
|
|
3604
|
+
setToast(t.agentFail + "\uFF1A" + String(r.error || r.text || ""));
|
|
3605
|
+
return;
|
|
3606
|
+
}
|
|
3607
|
+
var value = payload && typeof payload.agentEnabled === "boolean" ? payload.agentEnabled : next;
|
|
3608
|
+
setSnap(function(prev) {
|
|
3609
|
+
if (!prev || !Array.isArray(prev.actions)) return prev;
|
|
3610
|
+
return Object.assign({}, prev, {
|
|
3611
|
+
actions: prev.actions.map(function(a) {
|
|
3612
|
+
if (!a || a.name !== name) return a;
|
|
3613
|
+
return Object.assign({}, a, { agentEnabled: value });
|
|
3614
|
+
})
|
|
3615
|
+
});
|
|
3616
|
+
});
|
|
3617
|
+
setToast(value ? t.agentOnToast : t.agentOffToast);
|
|
3618
|
+
};
|
|
3619
|
+
if (!api || typeof api.call !== "function") {
|
|
3620
|
+
fail(new Error("no call api"));
|
|
3621
|
+
return;
|
|
3622
|
+
}
|
|
3623
|
+
Promise.resolve(api.call("actions.setAgentAccess", { action: name, agentEnabled: next })).then(done, fail);
|
|
3624
|
+
}
|
|
3456
3625
|
var all = snap && Array.isArray(snap.actions) ? snap.actions.filter(function(a) {
|
|
3457
3626
|
return a && a.domain === DOMAIN;
|
|
3458
3627
|
}) : [];
|
|
@@ -3501,6 +3670,35 @@ var require_action_schema_view = __commonJS({
|
|
|
3501
3670
|
h("td", null, Highlight.hit(row.description, kw))
|
|
3502
3671
|
);
|
|
3503
3672
|
}
|
|
3673
|
+
function agentSwitch(action) {
|
|
3674
|
+
if (action.agentLocked === true) {
|
|
3675
|
+
return h("span", {
|
|
3676
|
+
className: P + "-badge " + P + "-locked",
|
|
3677
|
+
title: t.agentLockedHint,
|
|
3678
|
+
"data-agent-locked": action.name
|
|
3679
|
+
}, t.agentLocked);
|
|
3680
|
+
}
|
|
3681
|
+
if (typeof action.agentEnabled !== "boolean") return null;
|
|
3682
|
+
var busy = saving === action.name;
|
|
3683
|
+
return h(
|
|
3684
|
+
"button",
|
|
3685
|
+
{
|
|
3686
|
+
className: P + "-toggle",
|
|
3687
|
+
"data-agent-row": action.name,
|
|
3688
|
+
type: "button",
|
|
3689
|
+
role: "switch",
|
|
3690
|
+
"aria-checked": action.agentEnabled,
|
|
3691
|
+
disabled: busy,
|
|
3692
|
+
"data-agent-toggle": action.name,
|
|
3693
|
+
"aria-label": t.agentSwitch + " \xB7 " + action.name,
|
|
3694
|
+
onClick: function() {
|
|
3695
|
+
setAgent(action, !action.agentEnabled);
|
|
3696
|
+
}
|
|
3697
|
+
},
|
|
3698
|
+
h("span", { className: P + "-track", "aria-hidden": true }),
|
|
3699
|
+
h("span", null, busy ? t.agentSaving : t.agentSwitch)
|
|
3700
|
+
);
|
|
3701
|
+
}
|
|
3504
3702
|
function card(action) {
|
|
3505
3703
|
var rows = paramRows(action);
|
|
3506
3704
|
var examples = Array.isArray(action.examples) ? action.examples : [];
|
|
@@ -3510,12 +3708,16 @@ var require_action_schema_view = __commonJS({
|
|
|
3510
3708
|
h(
|
|
3511
3709
|
"div",
|
|
3512
3710
|
{ className: P + "-cardhead" },
|
|
3513
|
-
h(
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
|
|
3711
|
+
h(
|
|
3712
|
+
"div",
|
|
3713
|
+
{ className: P + "-cardmeta" },
|
|
3714
|
+
h("code", { className: P + "-mono" }, Highlight.hit(action.name, kw)),
|
|
3715
|
+
h("span", { className: P + "-badge" }, rows.length ? t.paramCount(rows.length) : t.noParams),
|
|
3716
|
+
rows.some(function(row) {
|
|
3717
|
+
return row.required;
|
|
3718
|
+
}) ? h("span", { className: P + "-badge " + P + "-req" }, t.required) : null
|
|
3719
|
+
),
|
|
3720
|
+
agentSwitch(action)
|
|
3519
3721
|
),
|
|
3520
3722
|
action.description ? h("p", { className: P + "-desc" }, Highlight.hit(action.description, kw)) : null,
|
|
3521
3723
|
rows.length ? h(
|
|
@@ -3592,6 +3794,7 @@ var require_action_schema_view = __commonJS({
|
|
|
3592
3794
|
h("span", { className: P + "-badge" }, t.count(visible.length, all.length)),
|
|
3593
3795
|
h("span", { className: P + "-none" }, t.hint)
|
|
3594
3796
|
),
|
|
3797
|
+
h("p", { className: P + "-hintline" }, SOURCE === "actions.list" ? t.hostHint : t.switchHint),
|
|
3595
3798
|
snap ? h(
|
|
3596
3799
|
"div",
|
|
3597
3800
|
{ className: P + "-toolbar" },
|
|
@@ -3659,34 +3862,6 @@ var require_actions = __commonJS({
|
|
|
3659
3862
|
}
|
|
3660
3863
|
});
|
|
3661
3864
|
|
|
3662
|
-
// node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/message-square.mjs
|
|
3663
|
-
var message_square_exports = {};
|
|
3664
|
-
__export(message_square_exports, {
|
|
3665
|
-
__iconData: () => __iconData25,
|
|
3666
|
-
default: () => MessageSquare
|
|
3667
|
-
});
|
|
3668
|
-
var __iconData25, MessageSquare;
|
|
3669
|
-
var init_message_square = __esm({
|
|
3670
|
-
"node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/message-square.mjs"() {
|
|
3671
|
-
init_createLucideIcon();
|
|
3672
|
-
__iconData25 = {
|
|
3673
|
-
name: "message-square",
|
|
3674
|
-
size: 24,
|
|
3675
|
-
node: [
|
|
3676
|
-
[
|
|
3677
|
-
"path",
|
|
3678
|
-
{
|
|
3679
|
-
d: "M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",
|
|
3680
|
-
key: "18887p"
|
|
3681
|
-
}
|
|
3682
|
-
]
|
|
3683
|
-
]
|
|
3684
|
-
};
|
|
3685
|
-
__iconData25.node;
|
|
3686
|
-
MessageSquare = createLucideIcon(__iconData25);
|
|
3687
|
-
}
|
|
3688
|
-
});
|
|
3689
|
-
|
|
3690
3865
|
// packages/addons/message/client/client.src.cjs
|
|
3691
3866
|
(function() {
|
|
3692
3867
|
var root = typeof window !== "undefined" ? window : null;
|
|
@@ -3699,41 +3874,7 @@ var init_message_square = __esm({
|
|
|
3699
3874
|
}
|
|
3700
3875
|
var React = host.react;
|
|
3701
3876
|
var h = host.h;
|
|
3702
|
-
var ICONS =
|
|
3703
|
-
bell: (init_bell(), __toCommonJS(bell_exports)).default,
|
|
3704
|
-
"bell-off": (init_bell_off(), __toCommonJS(bell_off_exports)).default,
|
|
3705
|
-
inbox: (init_inbox(), __toCommonJS(inbox_exports)).default,
|
|
3706
|
-
mail: (init_mail(), __toCommonJS(mail_exports)).default,
|
|
3707
|
-
"mail-open": (init_mail_open(), __toCommonJS(mail_open_exports)).default,
|
|
3708
|
-
chart: (init_chart_column(), __toCommonJS(chart_column_exports)).default,
|
|
3709
|
-
settings: (init_settings(), __toCommonJS(settings_exports)).default,
|
|
3710
|
-
database: (init_database(), __toCommonJS(database_exports)).default,
|
|
3711
|
-
list: (init_list(), __toCommonJS(list_exports)).default,
|
|
3712
|
-
check: (init_check(), __toCommonJS(check_exports)).default,
|
|
3713
|
-
"check-check": (init_check_check(), __toCommonJS(check_check_exports)).default,
|
|
3714
|
-
search: (init_search(), __toCommonJS(search_exports)).default,
|
|
3715
|
-
refresh: (init_refresh_cw(), __toCommonJS(refresh_cw_exports)).default,
|
|
3716
|
-
plus: (init_plus(), __toCommonJS(plus_exports)).default,
|
|
3717
|
-
volume: (init_volume_2(), __toCommonJS(volume_2_exports)).default,
|
|
3718
|
-
mute: (init_volume_x(), __toCommonJS(volume_x_exports)).default,
|
|
3719
|
-
moon: (init_moon(), __toCommonJS(moon_exports)).default,
|
|
3720
|
-
clock: (init_clock(), __toCommonJS(clock_exports)).default,
|
|
3721
|
-
info: (init_info(), __toCommonJS(info_exports)).default,
|
|
3722
|
-
success: (init_circle_check(), __toCommonJS(circle_check_exports)).default,
|
|
3723
|
-
warning: (init_triangle_alert(), __toCommonJS(triangle_alert_exports)).default,
|
|
3724
|
-
error: (init_circle_alert(), __toCommonJS(circle_alert_exports)).default,
|
|
3725
|
-
reset: (init_rotate_ccw(), __toCommonJS(rotate_ccw_exports)).default,
|
|
3726
|
-
play: (init_play(), __toCommonJS(play_exports)).default
|
|
3727
|
-
};
|
|
3728
|
-
function Icon2(props) {
|
|
3729
|
-
var C = ICONS[props.name] || ICONS.info;
|
|
3730
|
-
return h(C, { size: props.size || 14, strokeWidth: 2, "aria-hidden": "true", className: "wbg-svg" });
|
|
3731
|
-
}
|
|
3732
|
-
function tabIcon(name) {
|
|
3733
|
-
return function() {
|
|
3734
|
-
return h(Icon2, { name, size: 14 });
|
|
3735
|
-
};
|
|
3736
|
-
}
|
|
3877
|
+
var icons = require_icons2(), ICONS = icons.ICONS, Icon2 = icons.Icon, tabIcon = icons.tabIcon;
|
|
3737
3878
|
var COPY = require_copy();
|
|
3738
3879
|
var CSS = require_styles();
|
|
3739
3880
|
var configView = require_config();
|
|
@@ -3771,8 +3912,8 @@ var init_message_square = __esm({
|
|
|
3771
3912
|
ensureStyles();
|
|
3772
3913
|
host.registerAddon({
|
|
3773
3914
|
id: "wb-addon-message",
|
|
3774
|
-
version: "0.1.
|
|
3775
|
-
icon:
|
|
3915
|
+
version: "0.1.2",
|
|
3916
|
+
icon: ICONS["message-square"],
|
|
3776
3917
|
views: [
|
|
3777
3918
|
{ id: "stats", icon: tabIcon("chart"), title: { zh: "\u7EDF\u8BA1", en: "Stats" }, component: Stats },
|
|
3778
3919
|
{ id: "inbox", icon: tabIcon("inbox"), title: { zh: "\u6536\u4EF6\u7BB1", en: "Inbox" }, component: Inbox2 },
|
package/lib/index.js
CHANGED
|
@@ -82,7 +82,7 @@ export function apply(ctx) {
|
|
|
82
82
|
id: "wb-addon-message",
|
|
83
83
|
title: "消息",
|
|
84
84
|
description: "统一消息入口:子插件与 agent 都能发消息,含未读计数、提示音与保留期清理;含统计、收件箱、配置、数据与 Action 五个视图",
|
|
85
|
-
version: "0.1.
|
|
85
|
+
version: "0.1.2",
|
|
86
86
|
tables: ["message"],
|
|
87
87
|
// 只在本机保存:显式声明不同步任何表(不写 sync 时宿主默认按行同步)。
|
|
88
88
|
sync: { tables: [] },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-workbench-message",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "个人工作台消息插件:统一消息发送入口、收件箱、未读统计与提示音",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
"id": "wb-addon-message",
|
|
17
17
|
"title": "消息",
|
|
18
18
|
"description": "统一消息入口 + 统计/收件箱/配置/数据四个视图:子插件与 agent 都能发消息,带未读计数与提示音",
|
|
19
|
-
"version": "0.1.
|
|
20
|
-
"minShell": "0.
|
|
19
|
+
"version": "0.1.2",
|
|
20
|
+
"minShell": "0.8.0",
|
|
21
21
|
"tables": [
|
|
22
22
|
"message"
|
|
23
23
|
],
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"./package.json": "./package.json"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"dsh-workbench-host": "^0.
|
|
52
|
+
"dsh-workbench-host": "^0.8.1"
|
|
53
53
|
},
|
|
54
54
|
"dsh": {
|
|
55
55
|
"bundle": {
|