@dsh-plus/llm-pi 0.1.23 → 0.1.25

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.
Files changed (3) hide show
  1. package/lib/client.js +4 -2620
  2. package/package.json +29 -29
  3. package/lib/style.css +0 -471
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dsh-plus/llm-pi",
3
- "version": "0.1.23",
3
+ "version": "0.1.25",
4
4
  "description": "dsh-plus service+ui plugin: 基于 PiAiAdapter 的自定义 LLM 路由(全量 compat、模型继承、models.dev 目录兜底)",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -32,42 +32,42 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "https-proxy-agent": "^9.1.0",
35
- "@dsh-plus/shared": "0.1.13"
35
+ "@dsh-plus/shared": "0.1.14"
36
36
  },
37
37
  "peerDependencies": {
38
38
  "@deepseek-ai/cordis": "^4.0.2",
39
- "@deepseek-ai/dsh-anonymous-user-id": "^0.1.5-alpha.2",
40
- "@deepseek-ai/dsh-credentials": "^0.1.5-alpha.2",
41
- "@deepseek-ai/dsh-home-paths": "^0.1.5-alpha.2",
42
- "@deepseek-ai/dsh-host-webserver": "^0.1.5-alpha.2",
43
- "@deepseek-ai/dsh-launch-environment": "^0.1.5-alpha.2",
44
- "@deepseek-ai/dsh-llm": "^0.1.5-alpha.2",
45
- "@deepseek-ai/dsh-llm-deepseek": "^0.1.5-alpha.2",
46
- "@deepseek-ai/dsh-llm-pi-ai": "^0.1.5-alpha.2",
47
- "@deepseek-ai/dsh-settings": "^0.1.5-alpha.2",
48
- "@deepseek-ai/dsh-util-values": "^0.1.5-alpha.2",
39
+ "@deepseek-ai/dsh-anonymous-user-id": "^0.1.5-rc.1",
40
+ "@deepseek-ai/dsh-credentials": "^0.1.5-rc.1",
41
+ "@deepseek-ai/dsh-home-paths": "^0.1.5-rc.1",
42
+ "@deepseek-ai/dsh-host-webserver": "^0.1.5-rc.1",
43
+ "@deepseek-ai/dsh-launch-environment": "^0.1.5-rc.1",
44
+ "@deepseek-ai/dsh-llm": "^0.1.5-rc.1",
45
+ "@deepseek-ai/dsh-llm-deepseek": "^0.1.5-rc.1",
46
+ "@deepseek-ai/dsh-llm-pi-ai": "^0.1.5-rc.1",
47
+ "@deepseek-ai/dsh-settings": "^0.1.5-rc.1",
48
+ "@deepseek-ai/dsh-util-values": "^0.1.5-rc.1",
49
49
  "@deepseek-ai/schemastery": "^3.18.2",
50
- "@earendil-works/pi-ai": "^0.84.2"
50
+ "@earendil-works/pi-ai": "^0.85.1"
51
51
  },
52
52
  "devDependencies": {
53
53
  "@deepseek-ai/cordis": "4.0.2",
54
- "@deepseek-ai/dsh-anonymous-user-id": "0.1.5-alpha.2",
55
- "@deepseek-ai/dsh-atomic-write": "0.1.5-alpha.2",
56
- "@deepseek-ai/dsh-attachment": "0.1.5-alpha.2",
57
- "@deepseek-ai/dsh-credentials": "0.1.5-alpha.2",
58
- "@deepseek-ai/dsh-home-paths": "0.1.5-alpha.2",
59
- "@deepseek-ai/dsh-host-webserver": "0.1.5-alpha.2",
60
- "@deepseek-ai/dsh-launch-environment": "0.1.5-alpha.2",
61
- "@deepseek-ai/dsh-llm": "0.1.5-alpha.2",
62
- "@deepseek-ai/dsh-llm-deepseek": "0.1.5-alpha.2",
63
- "@deepseek-ai/dsh-llm-pi-ai": "0.1.5-alpha.2",
64
- "@deepseek-ai/dsh-settings": "0.1.5-alpha.2",
65
- "@deepseek-ai/dsh-timeout": "0.1.5-alpha.2",
66
- "@deepseek-ai/dsh-typert-protocol": "0.1.5-alpha.2",
67
- "@deepseek-ai/dsh-util-crypto": "0.1.5-alpha.2",
68
- "@deepseek-ai/dsh-util-values": "0.1.5-alpha.2",
54
+ "@deepseek-ai/dsh-anonymous-user-id": "0.1.5-rc.1",
55
+ "@deepseek-ai/dsh-atomic-write": "0.1.5-rc.1",
56
+ "@deepseek-ai/dsh-attachment": "0.1.5-rc.1",
57
+ "@deepseek-ai/dsh-credentials": "0.1.5-rc.1",
58
+ "@deepseek-ai/dsh-home-paths": "0.1.5-rc.1",
59
+ "@deepseek-ai/dsh-host-webserver": "0.1.5-rc.1",
60
+ "@deepseek-ai/dsh-launch-environment": "0.1.5-rc.1",
61
+ "@deepseek-ai/dsh-llm": "0.1.5-rc.1",
62
+ "@deepseek-ai/dsh-llm-deepseek": "0.1.5-rc.1",
63
+ "@deepseek-ai/dsh-llm-pi-ai": "0.1.5-rc.1",
64
+ "@deepseek-ai/dsh-settings": "0.1.5-rc.1",
65
+ "@deepseek-ai/dsh-timeout": "0.1.5-rc.1",
66
+ "@deepseek-ai/dsh-typert-protocol": "0.1.5-rc.1",
67
+ "@deepseek-ai/dsh-util-crypto": "0.1.5-rc.1",
68
+ "@deepseek-ai/dsh-util-values": "0.1.5-rc.1",
69
69
  "@deepseek-ai/schemastery": "3.18.2",
70
- "@earendil-works/pi-ai": "0.84.4",
70
+ "@earendil-works/pi-ai": "0.85.1",
71
71
  "@types/react": "~18.3.31",
72
72
  "react": "^18.2.0"
73
73
  },
package/lib/style.css DELETED
@@ -1,471 +0,0 @@
1
- .Bz5CTG_block {
2
- --dsl-diff-radius: 12px;
3
- --dsl-diff-line-height: 22px;
4
- color: var(--dsw-alias-label-primary);
5
- background: var(--dsw-alias-markdown-code-block);
6
- border-radius: var(--dsl-diff-radius);
7
- margin: 16px 0;
8
- position: relative;
9
- }
10
-
11
- .Bz5CTG_copyButton {
12
- z-index: 1;
13
- color: var(--dsw-alias-label-secondary);
14
- cursor: pointer;
15
- font: var(--dsw-font-xs-13);
16
- background-color: #0000;
17
- border: none;
18
- margin: 0;
19
- padding: 0;
20
- position: absolute;
21
- top: 8px;
22
- right: 12px;
23
- }
24
-
25
- .Bz5CTG_body {
26
- font: var(--dsw-font-markdown-code-block);
27
- padding: 12px 14px;
28
- overflow: auto hidden;
29
- }
30
-
31
- .Bz5CTG_line {
32
- min-height: var(--dsl-diff-line-height);
33
- white-space: pre;
34
- }
35
-
36
- .Bz5CTG_path {
37
- color: var(--dsw-alias-label-primary);
38
- padding-right: 56px;
39
- font-weight: 600;
40
- }
41
-
42
- .Bz5CTG_gap {
43
- color: var(--dsw-alias-label-tertiary);
44
- }
45
-
46
- .Bz5CTG_del:before {
47
- content: "- ";
48
- color: var(--dsw-alias-state-error-primary);
49
- }
50
-
51
- .Bz5CTG_del {
52
- color: var(--dsw-alias-state-error-primary);
53
- }
54
-
55
- .Bz5CTG_add:before {
56
- content: "+ ";
57
- color: var(--dsw-alias-state-success-primary);
58
- }
59
-
60
- .Bz5CTG_add {
61
- color: var(--dsw-alias-state-success-primary);
62
- }
63
-
64
- .Bz5CTG_expand {
65
- width: 100%;
66
- color: var(--dsw-alias-label-tertiary);
67
- cursor: pointer;
68
- font: inherit;
69
- text-align: left;
70
- background-color: #0000;
71
- border: none;
72
- padding: 0;
73
- display: block;
74
- }
75
-
76
- .Bz5CTG_expand:hover {
77
- color: var(--dsw-alias-label-secondary);
78
- }
79
-
80
- .Bz5CTG_footer {
81
- font: var(--dsw-font-markdown-code-block);
82
- color: var(--dsw-alias-label-tertiary);
83
- padding: 0 14px 12px;
84
- }
85
- .gcpIYW_block {
86
- --dsl-code-block-banner-background-color: var(--dsw-alias-markdown-code-block-banner);
87
- --dsl-code-block-border-radius: 12px;
88
- --dsl-code-block-banner-font: 11px/18px var(--dsw-font-family);
89
- --dsl-code-block-content-font: var(--dsw-font-markdown-code-block);
90
- --dsl-code-block-background: var(--dsw-alias-markdown-code-block);
91
- color: var(--dsw-alias-label-primary);
92
- background: var(--dsl-code-block-background);
93
- border-radius: var(--dsl-code-block-border-radius);
94
- margin: 16px 0;
95
- position: relative;
96
- }
97
-
98
- .gcpIYW_block:not(:last-child) {
99
- margin-bottom: 11px;
100
- }
101
-
102
- .gcpIYW_bannerWrap {
103
- z-index: 6;
104
- background-color: var(--dsw-alias-bg-base);
105
- border-top-left-radius: var(--dsl-code-block-border-radius);
106
- border-top-right-radius: var(--dsl-code-block-border-radius);
107
- position: sticky;
108
- top: 0;
109
- }
110
-
111
- .gcpIYW_banner {
112
- background: var(--dsl-code-block-banner-background-color);
113
- font: var(--dsl-code-block-banner-font);
114
- border-top-left-radius: var(--dsl-code-block-border-radius);
115
- border-top-right-radius: var(--dsl-code-block-border-radius);
116
- justify-content: space-between;
117
- align-items: center;
118
- gap: 12px;
119
- padding: 9px 14px;
120
- display: flex;
121
- }
122
-
123
- .gcpIYW_infostring {
124
- color: var(--dsw-alias-label-primary);
125
- font-family: var(--ds-font-family-code);
126
- text-overflow: ellipsis;
127
- white-space: nowrap;
128
- min-width: 0;
129
- font-size: 11px;
130
- line-height: 18px;
131
- overflow: hidden;
132
- }
133
-
134
- .gcpIYW_action {
135
- flex-shrink: 0;
136
- align-items: center;
137
- display: flex;
138
- }
139
-
140
- .gcpIYW_copyButton {
141
- color: inherit;
142
- cursor: pointer;
143
- font: inherit;
144
- background-color: #fff0;
145
- border: none;
146
- margin: 0;
147
- padding: 0;
148
- }
149
-
150
- .gcpIYW_block :where(pre) {
151
- font: var(--dsl-code-block-content-font);
152
- white-space: pre-wrap;
153
- word-break: break-all;
154
- background: var(--dsl-code-block-background);
155
- border-bottom-left-radius: var(--dsl-code-block-border-radius);
156
- border-bottom-right-radius: var(--dsl-code-block-border-radius);
157
- padding: 16px;
158
- overflow-x: auto;
159
- margin: 0 !important;
160
- }
161
-
162
- .gcpIYW_block :where(pre.gcpIYW_shiki) {
163
- background: var(--dsl-code-block-background) !important;
164
- }
165
-
166
- .gcpIYW_block :where(pre) code {
167
- font: inherit;
168
- background: none;
169
- padding: 0;
170
- }
171
-
172
- .gcpIYW_plain {
173
- color: var(--dsw-alias-label-primary);
174
- }
175
-
176
- .gcpIYW_numbered :where(pre) code {
177
- counter-reset: source-line;
178
- white-space: normal;
179
- display: block;
180
- }
181
-
182
- .gcpIYW_numbered :where(pre) code > .line {
183
- min-height: 1lh;
184
- counter-increment: source-line;
185
- white-space: var(--dsl-code-block-line-white-space, pre-wrap);
186
- padding-inline-start: calc(var(--dsl-code-block-line-number-width) + 12px);
187
- display: block;
188
- position: relative;
189
- }
190
-
191
- .gcpIYW_numbered :where(pre) code > .line:before {
192
- width: var(--dsl-code-block-line-number-width);
193
- color: var(--dsw-alias-label-tertiary);
194
- text-align: end;
195
- content: counter(source-line);
196
- user-select: none;
197
- position: absolute;
198
- inset-inline-start: 0;
199
- }
200
- .fdgmDq_markdown {
201
- overflow-wrap: anywhere;
202
- min-width: 0;
203
- font: var(--dsw-font-markdown-base);
204
- color: var(--dsw-alias-label-primary);
205
- }
206
-
207
- .fdgmDq_markdown strong {
208
- font-weight: 600;
209
- }
210
-
211
- .fdgmDq_markdown h1 {
212
- font: var(--dsw-font-markdown-h1);
213
- margin: 32px 0 16px;
214
- }
215
-
216
- .fdgmDq_markdown h2 {
217
- font: var(--dsw-font-markdown-h2);
218
- margin: 32px 0 16px;
219
- }
220
-
221
- .fdgmDq_markdown h3 {
222
- font: var(--dsw-font-markdown-h3);
223
- margin: 32px 0 16px;
224
- }
225
-
226
- .fdgmDq_markdown h4 {
227
- font: var(--dsw-font-markdown-h4);
228
- margin: 16px 0;
229
- }
230
-
231
- .fdgmDq_markdown :where(h5, h6) {
232
- font: var(--dsw-font-markdown-base-strong);
233
- margin: 16px 0;
234
- }
235
-
236
- .fdgmDq_markdown :where(h1, h2, h3, h4, h5, h6) strong {
237
- font-weight: inherit;
238
- }
239
-
240
- .fdgmDq_markdown p {
241
- margin: 16px 0;
242
- }
243
-
244
- .fdgmDq_markdown :where(h4, h5, h6) + :where(ul, ol) {
245
- margin-top: 8px;
246
- }
247
-
248
- .fdgmDq_markdown :where(h4, h5, h6):has( + :where(ul, ol)) {
249
- margin-bottom: 8px;
250
- }
251
-
252
- .fdgmDq_markdown a {
253
- color: var(--dsw-alias-link);
254
- transition: box-shadow var(--ds-transition-duration) var(--ds-ease-in-out);
255
- border: 2px solid #fff0;
256
- border-width: 2px 3px;
257
- margin-left: -3px;
258
- margin-right: -3px;
259
- font-weight: 500;
260
- text-decoration: none;
261
- position: relative;
262
- }
263
-
264
- .fdgmDq_markdown a:hover, .fdgmDq_markdown a:focus {
265
- text-decoration: underline dotted var(--dsw-alias-link);
266
- text-underline-offset: 3px;
267
- outline: none;
268
- }
269
-
270
- .fdgmDq_markdown a:focus-visible {
271
- box-shadow: 0 0 0 2px var(--dsw-alias-state-business-primary);
272
- }
273
-
274
- .fdgmDq_linkIcon {
275
- vertical-align: -.25em;
276
- flex: none;
277
- width: 1.1em;
278
- height: 1.1em;
279
- margin-right: 5px;
280
- }
281
-
282
- .fdgmDq_markdown :where(ul, ol) {
283
- margin: 16px 0;
284
- padding-left: 18px;
285
- }
286
-
287
- .fdgmDq_markdown li:not(:first-child) {
288
- margin-top: 6px;
289
- }
290
-
291
- .fdgmDq_markdown li > :where(ul, ol) {
292
- margin-top: 4px;
293
- }
294
-
295
- .fdgmDq_markdown li::marker {
296
- color: var(--dsw-alias-label-secondary);
297
- line-height: 24px;
298
- }
299
-
300
- .fdgmDq_markdown :where(ul, ol) ol {
301
- padding-left: 0;
302
- list-style-position: inside;
303
- }
304
-
305
- .fdgmDq_markdown :where(ul, ol) ol li p {
306
- display: inline;
307
- }
308
-
309
- .fdgmDq_markdown li > p {
310
- margin: 8px 0;
311
- }
312
-
313
- .fdgmDq_markdown li > :first-child {
314
- margin-top: 0;
315
- }
316
-
317
- .fdgmDq_markdown li > :last-child:not(.md-code-block) {
318
- margin-bottom: 0;
319
- }
320
-
321
- .fdgmDq_markdown hr {
322
- background: var(--dsw-alias-border-l2);
323
- border: none;
324
- height: .5px;
325
- margin: 32px 0;
326
- display: block;
327
- }
328
-
329
- .fdgmDq_markdown blockquote {
330
- border-left: 2px solid var(--dsw-alias-label-caption);
331
- margin: 16px 0 0;
332
- padding-left: 14px;
333
- }
334
-
335
- .fdgmDq_markdown pre {
336
- font-family: var(--ds-font-family-code);
337
- margin: 16px 0;
338
- overflow: auto;
339
- }
340
-
341
- .fdgmDq_markdown :not(pre) > code {
342
- box-sizing: border-box;
343
- font: var(--dsw-font-markdown-code);
344
- font-family: var(--ds-font-family-code);
345
- background-color: var(--dsw-alias-markdown-inline-code);
346
- border: .5px solid var(--dsw-alias-border-l1);
347
- border-radius: 6px;
348
- align-items: center;
349
- padding: 0 5px;
350
- display: inline-flex;
351
- font-size: .875em !important;
352
- }
353
-
354
- .fdgmDq_markdown :where(h1, h2, h3, h4, h5, h6) code {
355
- font: inherit;
356
- font-family: var(--ds-font-family-code);
357
- }
358
-
359
- .fdgmDq_markdown .katex-display {
360
- max-width: 100%;
361
- overflow: auto hidden;
362
- }
363
-
364
- .fdgmDq_markdown input[type="checkbox"] {
365
- accent-color: var(--dsw-alias-label-secondary);
366
- margin: 0 8px 0 0;
367
- }
368
-
369
- .fdgmDq_tableScroll {
370
- overscroll-behavior-x: contain;
371
- max-width: 100%;
372
- overflow-x: auto;
373
- }
374
-
375
- .fdgmDq_tableScroll.md-table-wide {
376
- padding-bottom: var(--dsh-scrollbar-width, 8px);
377
- overflow-x: hidden;
378
- }
379
-
380
- .fdgmDq_tableScroll.md-table-wide:hover, .fdgmDq_tableScroll.md-table-wide:focus-visible {
381
- padding-bottom: 0;
382
- overflow-x: auto;
383
- }
384
-
385
- .fdgmDq_tableScroll:focus-visible {
386
- box-shadow: 0 0 0 2px var(--dsw-alias-state-business-primary);
387
- outline: none;
388
- }
389
-
390
- .fdgmDq_tableScroll table {
391
- border-collapse: collapse;
392
- width: max-content;
393
- max-width: max-content;
394
- }
395
-
396
- .fdgmDq_tableFill table {
397
- width: 100%;
398
- max-width: none;
399
- }
400
-
401
- .fdgmDq_tableScroll th {
402
- text-align: start;
403
- border-bottom: .5px solid var(--dsw-alias-border-l3);
404
- font: var(--dsw-font-markdown-table-head);
405
- border-top: none;
406
- min-width: 100px;
407
- max-width: min(30vw, 320px);
408
- padding: 10px 16px;
409
- }
410
-
411
- .fdgmDq_tableScroll td {
412
- border-bottom: .5px solid var(--dsw-alias-border-l2);
413
- font: var(--dsw-font-markdown-table);
414
- min-width: 100px;
415
- max-width: min(30vw, 320px);
416
- padding: 10px 16px;
417
- }
418
-
419
- .fdgmDq_tableScroll th:first-child, .fdgmDq_tableScroll td:first-child {
420
- padding-left: 0;
421
- }
422
-
423
- .fdgmDq_tableScroll td:last-child {
424
- padding-right: 0;
425
- }
426
-
427
- .fdgmDq_tableScroll table code {
428
- font-size: 11px;
429
- }
430
-
431
- .fdgmDq_markdown > :first-child, .fdgmDq_markdown p:first-child {
432
- margin-top: 0 !important;
433
- }
434
-
435
- .fdgmDq_markdown > :last-child, .fdgmDq_markdown p:last-child {
436
- margin-bottom: 0 !important;
437
- }
438
-
439
- .fdgmDq_imageAlt {
440
- color: var(--dsw-alias-label-tertiary);
441
- font-style: italic;
442
- }
443
-
444
- .fdgmDq_image {
445
- background: var(--dsw-alias-bg-base);
446
- object-fit: contain;
447
- border-radius: 8px;
448
- width: auto;
449
- max-width: 100%;
450
- height: auto;
451
- margin: 0;
452
- display: block;
453
- }
454
-
455
- .fdgmDq_fileMention {
456
- font: inherit;
457
- color: var(--dsw-alias-link);
458
- cursor: pointer;
459
- background: none;
460
- border: none;
461
- margin: 0;
462
- padding: 0;
463
- font-weight: 500;
464
- text-decoration: none;
465
- }
466
-
467
- .fdgmDq_fileMention:hover, .fdgmDq_fileMention:focus {
468
- text-decoration: underline dotted var(--dsw-alias-link);
469
- text-underline-offset: 3px;
470
- outline: none;
471
- }