dsh-connect-lingxi 0.0.2 → 0.0.3
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 +72 -0
- package/lib/index.js +1 -1
- package/package.json +3 -1
package/lib/client.js
CHANGED
|
@@ -65,6 +65,7 @@
|
|
|
65
65
|
diagnostic: '诊断',
|
|
66
66
|
diagVersion: '插件版本',
|
|
67
67
|
diagLogin: '登录态',
|
|
68
|
+
navPanel: 'WPS 灵犀',
|
|
68
69
|
diagSource: '登录来源',
|
|
69
70
|
diagAccount: '账号',
|
|
70
71
|
diagError: '上游最近一次错误',
|
|
@@ -135,6 +136,7 @@
|
|
|
135
136
|
diagnostic: 'Diagnostics',
|
|
136
137
|
diagVersion: 'Plugin version',
|
|
137
138
|
diagLogin: 'Sign-in',
|
|
139
|
+
navPanel: 'WPS Lingxi',
|
|
138
140
|
diagSource: 'Credential source',
|
|
139
141
|
diagAccount: 'Account',
|
|
140
142
|
diagError: 'Last upstream error',
|
|
@@ -1074,6 +1076,76 @@
|
|
|
1074
1076
|
CreditPillGate,
|
|
1075
1077
|
);
|
|
1076
1078
|
});
|
|
1079
|
+
|
|
1080
|
+
/**
|
|
1081
|
+
* 设置页侧栏入口(参考 DSH 自带设置的布局:左侧导航 + 右侧整页)。
|
|
1082
|
+
*
|
|
1083
|
+
* `id` 同时驱动两件事:侧栏过滤(`only: active`)与图标匹配
|
|
1084
|
+
* (`settings.section.icon` 的 id 必须等于 section 的 id,不匹配就不渲染)。
|
|
1085
|
+
* `order` 挑 60:排在官方页(general/models/plugins …)之后,
|
|
1086
|
+
* 不挤它们的位置。
|
|
1087
|
+
*/
|
|
1088
|
+
var SETTINGS_SECTION_ID = 'dsh-connect-lingxi';
|
|
1089
|
+
injectSlot('settings.section', function () {
|
|
1090
|
+
return ctx.slots.register(
|
|
1091
|
+
{
|
|
1092
|
+
name: 'settings.section',
|
|
1093
|
+
id: SETTINGS_SECTION_ID,
|
|
1094
|
+
order: 60,
|
|
1095
|
+
label: function () {
|
|
1096
|
+
return t('navPanel');
|
|
1097
|
+
},
|
|
1098
|
+
locale: namespace,
|
|
1099
|
+
inject: function () {
|
|
1100
|
+
return { t: t };
|
|
1101
|
+
},
|
|
1102
|
+
},
|
|
1103
|
+
function (props) {
|
|
1104
|
+
// owner props 是 `{ close }`(设置面板的开合归壳所有)。
|
|
1105
|
+
// 本页不需要关面板,但要把签名收全,方便以后用。
|
|
1106
|
+
void props.close;
|
|
1107
|
+
return h(PluginPage, props);
|
|
1108
|
+
},
|
|
1109
|
+
);
|
|
1110
|
+
});
|
|
1111
|
+
|
|
1112
|
+
// 侧栏图标:id 必须等于 section 的 id;props 是 `{ size, active }`。
|
|
1113
|
+
// 用内联 SVG 而不是图片文件 —— 经典脚本里没有打包资源管线。
|
|
1114
|
+
injectSlot('settings.section.icon', function () {
|
|
1115
|
+
return ctx.slots.register(
|
|
1116
|
+
{
|
|
1117
|
+
name: 'settings.section.icon',
|
|
1118
|
+
id: SETTINGS_SECTION_ID,
|
|
1119
|
+
locale: namespace,
|
|
1120
|
+
},
|
|
1121
|
+
function (props) {
|
|
1122
|
+
var size = typeof props.size === 'number' ? props.size : 16;
|
|
1123
|
+
var color = props.active === true ? textPrimary : textTertiary;
|
|
1124
|
+
return h('span', {
|
|
1125
|
+
style: {
|
|
1126
|
+
display: 'inline-flex',
|
|
1127
|
+
width: String(size) + 'px',
|
|
1128
|
+
height: String(size) + 'px',
|
|
1129
|
+
alignItems: 'center',
|
|
1130
|
+
justifyContent: 'center',
|
|
1131
|
+
color: color,
|
|
1132
|
+
},
|
|
1133
|
+
dangerouslySetInnerHTML: {
|
|
1134
|
+
__html:
|
|
1135
|
+
'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="' +
|
|
1136
|
+
String(size) +
|
|
1137
|
+
'" height="' +
|
|
1138
|
+
String(size) +
|
|
1139
|
+
'" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">' +
|
|
1140
|
+
// 星座连线形状:一颗四角星 + 两条光线,呼应「灵犀」。
|
|
1141
|
+
'<path d="M12 3l2.2 6.8L21 12l-6.8 2.2L12 21l-2.2-6.8L3 12l6.8-2.2z"/>' +
|
|
1142
|
+
'<path d="M19 3l.9 2.1L22 6l-2.1.9L19 9l-.9-2.1L16 6l2.1-.9z"/>' +
|
|
1143
|
+
'</svg>',
|
|
1144
|
+
},
|
|
1145
|
+
});
|
|
1146
|
+
},
|
|
1147
|
+
);
|
|
1148
|
+
});
|
|
1077
1149
|
}
|
|
1078
1150
|
|
|
1079
1151
|
return {
|
package/lib/index.js
CHANGED
|
@@ -51,7 +51,7 @@ Config({});
|
|
|
51
51
|
/** DSH provider 路由键;同时是 pi-ai collection 的 key。 */
|
|
52
52
|
const PROVIDER = "wps-lingxi";
|
|
53
53
|
/** 插件版本号(卡片与日志显示)。与 package.json 的 version 保持一致。 */
|
|
54
|
-
const VERSION = "0.0.
|
|
54
|
+
const VERSION = "0.0.3";
|
|
55
55
|
/** 设置页命名空间(插件设置卡片的挂载点)。 */
|
|
56
56
|
const SETTINGS_NS = "lingxi";
|
|
57
57
|
/** 灵犀主站。 */
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "dsh-connect-lingxi",
|
|
3
3
|
"displayName": "DSH Connect WPS 灵犀",
|
|
4
4
|
"description": "把 WPS 灵犀(Lingxi Claw)接入 DeepSeek Harness:原生 tools / tool_calls / reasoning_content 直通,14 个模型(含 DeepSeek V4.1 Flash 1M 上下文)出现在 DSH 模型选择器里;插件设置页显示智点余额、临时积分、每日签到与任务、模型目录与倍率。",
|
|
5
|
-
"version": "0.0.
|
|
5
|
+
"version": "0.0.3",
|
|
6
6
|
"author": "xinstart-1",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"keywords": [
|
|
@@ -89,6 +89,8 @@
|
|
|
89
89
|
},
|
|
90
90
|
"scripts": {
|
|
91
91
|
"build": "tsdown && node scripts/copy-client.mjs && node scripts/check-client.mjs",
|
|
92
|
+
"gate": "node scripts/gate.mjs",
|
|
93
|
+
"verify:published": "node scripts/verify-published.mjs",
|
|
92
94
|
"typecheck": "tsc --noEmit -p tsconfig.json",
|
|
93
95
|
"test": "node --experimental-strip-types --test \"test/*.test.ts\"",
|
|
94
96
|
"check": "npm run typecheck && npm run test && npm run build"
|