@pactor-app/skills 1.24.0

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 (80) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +40 -0
  3. package/package.json +26 -0
  4. package/pactor/SKILL.md +373 -0
  5. package/pactor/references/dsl-authoring.md +448 -0
  6. package/prd-to-app/SKILL.md +75 -0
  7. package/prd-to-app/references/acceptance-checklist.md +47 -0
  8. package/prd-to-app/references/component-mapping.md +41 -0
  9. package/prd-to-app/references/mock-data-routes.md +66 -0
  10. package/prd-to-app/references/page-templates.md +274 -0
  11. package/prd-to-app/references/project-structure.md +89 -0
  12. package/prd-to-app/references/theme-and-style.md +41 -0
  13. package/prd-to-app/template/README.md +26 -0
  14. package/prd-to-app/template/app/[[...slug]]/page.tsx +7 -0
  15. package/prd-to-app/template/app/api/auth/login/route.ts +32 -0
  16. package/prd-to-app/template/app/api/auth/logout/route.ts +22 -0
  17. package/prd-to-app/template/app/api/data/[...parts]/route.ts +118 -0
  18. package/prd-to-app/template/app/api/public/pages/[id]/route.ts +40 -0
  19. package/prd-to-app/template/app/api/sitemap/route.ts +21 -0
  20. package/prd-to-app/template/app/api/users/route.ts +57 -0
  21. package/prd-to-app/template/app/favicon.ico +0 -0
  22. package/prd-to-app/template/app/globals.css +248 -0
  23. package/prd-to-app/template/app/layout.tsx +49 -0
  24. package/prd-to-app/template/app/login.css +122 -0
  25. package/prd-to-app/template/eslint.config.mjs +18 -0
  26. package/prd-to-app/template/next-env.d.ts +7 -0
  27. package/prd-to-app/template/next.config.js +32 -0
  28. package/prd-to-app/template/package.json +34 -0
  29. package/prd-to-app/template/pnpm-lock.yaml +6854 -0
  30. package/prd-to-app/template/pnpm-workspace.yaml +7 -0
  31. package/prd-to-app/template/postcss.config.mjs +7 -0
  32. package/prd-to-app/template/public/file.svg +1 -0
  33. package/prd-to-app/template/public/globe.svg +1 -0
  34. package/prd-to-app/template/public/next.svg +1 -0
  35. package/prd-to-app/template/public/skins/chenwunaifu.css +111 -0
  36. package/prd-to-app/template/public/skins/taijingshenlin.css +109 -0
  37. package/prd-to-app/template/public/skins/xuanzhimoyun.css +110 -0
  38. package/prd-to-app/template/public/vercel.svg +1 -0
  39. package/prd-to-app/template/public/window.svg +1 -0
  40. package/prd-to-app/template/scripts/build.mjs +35 -0
  41. package/prd-to-app/template/src/pactor/App.tsx +55 -0
  42. package/prd-to-app/template/src/pactor/actions.ts +438 -0
  43. package/prd-to-app/template/src/pactor/components/card-links.tsx +86 -0
  44. package/prd-to-app/template/src/pactor/components/chip-filter.tsx +89 -0
  45. package/prd-to-app/template/src/pactor/components/chip-node.tsx +46 -0
  46. package/prd-to-app/template/src/pactor/components/debug-chat.tsx +189 -0
  47. package/prd-to-app/template/src/pactor/components/index.ts +28 -0
  48. package/prd-to-app/template/src/pactor/components/log-status.tsx +64 -0
  49. package/prd-to-app/template/src/pactor/components/status-badge.tsx +46 -0
  50. package/prd-to-app/template/src/pactor/components/theme-switcher.tsx +136 -0
  51. package/prd-to-app/template/src/pactor/config.ts +28 -0
  52. package/prd-to-app/template/src/pactor/mocks/audit-mock.ts +403 -0
  53. package/prd-to-app/template/src/pactor/mocks/call-logs-mock.ts +875 -0
  54. package/prd-to-app/template/src/pactor/mocks/client-debug-mock.ts +188 -0
  55. package/prd-to-app/template/src/pactor/mocks/client-templates-mock.ts +497 -0
  56. package/prd-to-app/template/src/pactor/mocks/clients-mock.ts +483 -0
  57. package/prd-to-app/template/src/pactor/mocks/costs-mock.ts +406 -0
  58. package/prd-to-app/template/src/pactor/mocks/dashboard-mock.ts +192 -0
  59. package/prd-to-app/template/src/pactor/mocks/model-debug-mock.ts +144 -0
  60. package/prd-to-app/template/src/pactor/mocks/models-mock.ts +799 -0
  61. package/prd-to-app/template/src/pactor/mocks/ops-usage-mock.ts +806 -0
  62. package/prd-to-app/template/src/pactor/mocks/providers-mock.ts +424 -0
  63. package/prd-to-app/template/src/pactor/mocks/routes-mock.ts +604 -0
  64. package/prd-to-app/template/src/pactor/services.ts +185 -0
  65. package/prd-to-app/template/src/pactor/skin.ts +52 -0
  66. package/prd-to-app/template/src/server/accounts.ts +63 -0
  67. package/prd-to-app/template/src/server/cors.ts +34 -0
  68. package/prd-to-app/template/src/server/sitemap.ts +176 -0
  69. package/prd-to-app/template/src/server/yaml/common/dashboard.yaml +498 -0
  70. package/prd-to-app/template/src/server/yaml/common/login.yaml +84 -0
  71. package/prd-to-app/template/src/server/yaml/provider/provider-create.yaml +340 -0
  72. package/prd-to-app/template/src/server/yaml/provider/provider-detail.yaml +780 -0
  73. package/prd-to-app/template/src/server/yaml/provider/provider-edit.yaml +366 -0
  74. package/prd-to-app/template/src/server/yaml/provider/provider-list.yaml +1989 -0
  75. package/prd-to-app/template/src/server/yaml/route/route-create.yaml +511 -0
  76. package/prd-to-app/template/src/server/yaml/route/route-detail.yaml +610 -0
  77. package/prd-to-app/template/src/server/yaml/route/route-edit.yaml +809 -0
  78. package/prd-to-app/template/src/server/yaml/route/route-list.yaml +1793 -0
  79. package/prd-to-app/template/src/server/yaml/sitemap.yaml +250 -0
  80. package/prd-to-app/template/tsconfig.json +34 -0
@@ -0,0 +1,780 @@
1
+ dsl: "1.0"
2
+ page:
3
+ id: provider-detail
4
+ title: Provider 详情
5
+ name: providerDetail
6
+ description: 模型资产 / Provider 详情:基本信息、连接与凭证、关联模型、引用关系
7
+ state:
8
+ capExtExpanded: false
9
+ dataSources:
10
+ detail:
11
+ type: http
12
+ autoLoad: true
13
+ request:
14
+ method: GET
15
+ url: /api/data/providers/${route.params.code}
16
+ upstream:
17
+ type: http
18
+ request:
19
+ method: GET
20
+ url: /api/data/providers/${route.params.code}/pull-models
21
+ body:
22
+ type: Page
23
+ children:
24
+ - type: Breadcrumb
25
+ props:
26
+ items:
27
+ - label: 模型资产
28
+ - label: Provider
29
+ href: /providers
30
+ - label: ${route.params.code}
31
+ - type: Flex
32
+ when: ${data.detail != null}
33
+ props:
34
+ direction: vertical
35
+ gap: middle
36
+ align: stretch
37
+ children:
38
+ - type: Card
39
+ children:
40
+ - type: Flex
41
+ props:
42
+ justify: space-between
43
+ align: middle
44
+ children:
45
+ - type: Flex
46
+ props:
47
+ align: center
48
+ gap: middle
49
+ children:
50
+ - type: Icon
51
+ props:
52
+ name: ${data.detail.icon}
53
+ size: lg
54
+ - type: Flex
55
+ props:
56
+ direction: vertical
57
+ gap: 0
58
+ children:
59
+ - type: Flex
60
+ props:
61
+ align: center
62
+ gap: middle
63
+ children:
64
+ - type: Typography
65
+ props:
66
+ variant: h3
67
+ text: ${data.detail.name}
68
+ - type: StatusBadge
69
+ props:
70
+ status: ${data.detail.status}
71
+ - type: Text
72
+ props:
73
+ text: "Provider Code: ${data.detail.code}"
74
+ type: secondary
75
+ - type: Flex
76
+ props:
77
+ align: center
78
+ gap: small
79
+ children:
80
+ - type: Button
81
+ props:
82
+ text: 编辑
83
+ icon: edit
84
+ variant: primary
85
+ size: small
86
+ events:
87
+ onClick:
88
+ - action: navigate
89
+ params:
90
+ to: /providers/${route.params.code}/edit
91
+ - type: Button
92
+ props:
93
+ text: "${data.detail.status == 'enabled' ? '停用' : '启用'}"
94
+ icon: "${data.detail.status == 'enabled' ? 'x-circle' : 'check-circle'}"
95
+ size: small
96
+ events:
97
+ onClick:
98
+ - id: statusCfm
99
+ action: overlay.open
100
+ params:
101
+ overlay:
102
+ type: modal
103
+ title: "${data.detail.status == 'enabled' ? '确认停用 Provider' : '确认启用 Provider'}"
104
+ width: 480
105
+ content:
106
+ type: Flex
107
+ props:
108
+ direction: vertical
109
+ gap: middle
110
+ children:
111
+ - type: Text
112
+ props:
113
+ size: small
114
+ text: "${data.detail.status == 'enabled' ? '停用后,该 Provider 将无法被新建 Model / Target
115
+ 引用。' : '启用后,该 Provider 可被 Model /
116
+ Target 引用。'}"
117
+ - type: Flex
118
+ props:
119
+ direction: vertical
120
+ gap: small
121
+ children:
122
+ - type: Text
123
+ props:
124
+ text: 影响范围:
125
+ strong: true
126
+ - type: Text
127
+ props:
128
+ text: · Model:${data.detail.modelCount} 个(${data.detail.enabledModelCount} 个启用)
129
+ type: secondary
130
+ - type: Text
131
+ props:
132
+ text: · Route Target 引用:${data.detail.routes.total} 个
133
+ type: secondary
134
+ - type: Text
135
+ when: ${data.detail.status == 'enabled'}
136
+ props:
137
+ size: small
138
+ text: ⚠ 存在 ONLINE Target 引用时,建议先完成切换再停用。
139
+ type: warning
140
+ - type: Flex
141
+ props:
142
+ justify: end
143
+ gap: middle
144
+ children:
145
+ - type: Button
146
+ props:
147
+ text: 取消
148
+ events:
149
+ onClick:
150
+ - action: overlay.close
151
+ - type: Button
152
+ props:
153
+ text: "${data.detail.status == 'enabled' ? '确认停用' : '确认启用'}"
154
+ variant: primary
155
+ danger: ${data.detail.status == 'enabled'}
156
+ events:
157
+ onClick:
158
+ - action: overlay.close
159
+ params:
160
+ payload:
161
+ ok: true
162
+ - action: if
163
+ params:
164
+ condition: ${actions.statusCfm.ok}
165
+ then:
166
+ - action: message
167
+ params:
168
+ messageType: success
169
+ text: 状态已切换(演示)
170
+ - type: Button
171
+ props:
172
+ text: 查看模型
173
+ icon: eye
174
+ size: small
175
+ events:
176
+ onClick:
177
+ - action: message
178
+ params:
179
+ messageType: info
180
+ text: 跳转 Model 列表(演示:目标页建设中)
181
+ - type: DropdownMenu
182
+ props:
183
+ items:
184
+ - label: 导出
185
+ value: export
186
+ icon: download
187
+ - label: 复制 Code
188
+ value: copy
189
+ icon: copy
190
+ events:
191
+ onSelect:
192
+ - action: message
193
+ params:
194
+ messageType: info
195
+ text: 操作:${event}(演示)
196
+ children:
197
+ - type: Button
198
+ props:
199
+ text: ···
200
+ variant: text
201
+ - type: Grid
202
+ props:
203
+ columns: 4
204
+ gap: 16
205
+ children:
206
+ - type: Card
207
+ children:
208
+ - type: Statistic
209
+ props:
210
+ title: 密钥状态
211
+ value: "${data.detail.keyStatus == 'configured' ? '已配置' : data.detail.keyStatus
212
+ == 'pending' ? '待填密钥' : '无密钥'}"
213
+ - type: Card
214
+ children:
215
+ - type: Statistic
216
+ props:
217
+ title: 模型数量
218
+ value: ${data.detail.modelCount}
219
+ - type: Card
220
+ children:
221
+ - type: Statistic
222
+ props:
223
+ title: 默认协议
224
+ value: ${data.detail.protocol}
225
+ - type: Card
226
+ children:
227
+ - type: Flex
228
+ props:
229
+ justify: space-between
230
+ align: baseline
231
+ children:
232
+ - type: Text
233
+ props:
234
+ text: 最后更新
235
+ type: secondary
236
+ className: text-sm
237
+ - type: Typography
238
+ props:
239
+ variant: muted
240
+ text: 操作人:${data.detail.operator}
241
+ style:
242
+ whiteSpace: nowrap
243
+ flexShrink: 0
244
+ - type: Statistic
245
+ props:
246
+ value: ${data.detail.updatedAt}
247
+ className: mt-[6px]
248
+ - type: Card
249
+ children:
250
+ - type: Tabs
251
+ props:
252
+ variant: line
253
+ items:
254
+ - key: basic
255
+ label: 基本信息
256
+ className: p-2
257
+ children:
258
+ - type: Table
259
+ props:
260
+ rowKey: label
261
+ pagination: false
262
+ dataSource:
263
+ - label: Provider Code
264
+ value: ${data.detail.code}(创建后不可修改)
265
+ - label: Provider Name
266
+ value: ${data.detail.name}
267
+ - label: Provider Type
268
+ value: ${data.detail.providerType}
269
+ - label: Default Protocol
270
+ value: ${data.detail.protocol}
271
+ - label: Status
272
+ value: "${data.detail.status == 'enabled' ? '● 启用' : '● 停用'}"
273
+ - label: Description
274
+ value: ${data.detail.description}
275
+ - label: Capability Extension
276
+ value: ${data.detail.capabilityExtension}
277
+ pre: true
278
+ - label: Created At
279
+ value: ${data.detail.createdAt}
280
+ - label: Updated At
281
+ value: ${data.detail.updatedAt}
282
+ - label: Operator
283
+ value: ${data.detail.operator}
284
+ columns:
285
+ - title: 字段
286
+ dataIndex: label
287
+ width: 220
288
+ - title: 值
289
+ dataIndex: value
290
+ cell:
291
+ type: Flex
292
+ props:
293
+ direction: vertical
294
+ gap: small
295
+ align: start
296
+ children:
297
+ - type: Text
298
+ props:
299
+ text: ${row.value}
300
+ className: "${row.pre ? (state.capExtExpanded ? 'font-mono text-sm
301
+ whitespace-pre-wrap break-all block' :
302
+ 'font-mono text-sm block line-clamp-1
303
+ whitespace-normal break-all') : ''}"
304
+ - type: Button
305
+ props:
306
+ text: "${state.capExtExpanded ? '收起' : '展开'}"
307
+ variant: link
308
+ size: small
309
+ className: h-auto p-0
310
+ when: ${row.pre}
311
+ events:
312
+ onClick:
313
+ - action: setState
314
+ params:
315
+ capExtExpanded: ${!state.capExtExpanded}
316
+ - key: connection
317
+ label: 连接与凭证
318
+ className: p-2
319
+ children:
320
+ - type: Flex
321
+ props:
322
+ direction: vertical
323
+ gap: small
324
+ className: mt-2
325
+ children:
326
+ - type: Alert
327
+ props:
328
+ showIcon: true
329
+ variant: info
330
+ message: Runtime 调用该 Provider 时使用的上游地址与 API Key
331
+ className: mb-2
332
+ - type: Flex
333
+ props:
334
+ align: baseline
335
+ gap: middle
336
+ children:
337
+ - type: Text
338
+ props:
339
+ text: Base URL
340
+ type: secondary
341
+ style:
342
+ width: 180
343
+ flexShrink: 0
344
+ - type: Text
345
+ props:
346
+ text: ${data.detail.baseUrl}
347
+ - type: Flex
348
+ props:
349
+ align: baseline
350
+ gap: middle
351
+ children:
352
+ - type: Text
353
+ props:
354
+ text: Region
355
+ type: secondary
356
+ style:
357
+ width: 180
358
+ flexShrink: 0
359
+ - type: Text
360
+ props:
361
+ text: ${data.detail.region || '—'}
362
+ - type: Flex
363
+ props:
364
+ align: baseline
365
+ gap: middle
366
+ children:
367
+ - type: Text
368
+ props:
369
+ text: API Key
370
+ type: secondary
371
+ style:
372
+ width: 180
373
+ flexShrink: 0
374
+ - type: Text
375
+ props:
376
+ text: "${data.detail.keyStatus == 'configured' ? data.detail.maskedKey : '未配置'}"
377
+ - type: Flex
378
+ props:
379
+ align: baseline
380
+ gap: middle
381
+ children:
382
+ - type: Text
383
+ props:
384
+ text: Timeout
385
+ type: secondary
386
+ style:
387
+ width: 180
388
+ flexShrink: 0
389
+ - type: Text
390
+ props:
391
+ text: ${data.detail.timeout} ms
392
+ - type: Flex
393
+ props:
394
+ align: baseline
395
+ gap: middle
396
+ children:
397
+ - type: Text
398
+ props:
399
+ text: Proxy
400
+ type: secondary
401
+ style:
402
+ width: 180
403
+ flexShrink: 0
404
+ - type: Text
405
+ props:
406
+ text: ${data.detail.proxy || '—'}
407
+ - type: Flex
408
+ props:
409
+ align: baseline
410
+ gap: middle
411
+ children:
412
+ - type: Text
413
+ props:
414
+ text: Last Test
415
+ type: secondary
416
+ style:
417
+ width: 180
418
+ flexShrink: 0
419
+ - type: Text
420
+ props:
421
+ text: "${data.detail.lastTest != null ? data.detail.lastTest.time + ' ' +
422
+ (data.detail.lastTest.ok ? '● 成功' : '● 失败')
423
+ + ' (' + data.detail.lastTest.detail + ')'
424
+ : '—'}"
425
+ - type: Flex
426
+ props:
427
+ justify: end
428
+ gap: middle
429
+ className: mt-2
430
+ children:
431
+ - type: Button
432
+ props:
433
+ text: 测试连接
434
+ icon: zap
435
+ events:
436
+ onClick:
437
+ - action: message
438
+ params:
439
+ messageType: success
440
+ text: 连接测试成功:HTTP 200, 128ms(演示)
441
+ - type: Button
442
+ props:
443
+ text: 编辑连接配置
444
+ icon: edit
445
+ variant: primary
446
+ events:
447
+ onClick:
448
+ - action: navigate
449
+ params:
450
+ to: /providers/${route.params.code}/edit
451
+ - type: Alert
452
+ props:
453
+ showIcon: true
454
+ variant: warning
455
+ message: API Key 保存后不可查看明文;更换时需重新输入。
456
+ className: mt-2
457
+ - key: models
458
+ label: 关联模型
459
+ className: p-2
460
+ children:
461
+ - type: Flex
462
+ props:
463
+ justify: space-between
464
+ align: center
465
+ className: my-2
466
+ children:
467
+ - type: Text
468
+ props:
469
+ text: 该 Provider 下的模型
470
+ strong: true
471
+ - type: Flex
472
+ props:
473
+ align: center
474
+ gap: small
475
+ children:
476
+ - type: Button
477
+ props:
478
+ text: 拉取
479
+ icon: download
480
+ size: small
481
+ events:
482
+ onClick:
483
+ - action: reload
484
+ params:
485
+ dataSource: upstream
486
+ - id: pullResult
487
+ action: overlay.open
488
+ params:
489
+ overlay:
490
+ type: modal
491
+ title: 拉取模型
492
+ width: 720
493
+ content:
494
+ type: Flex
495
+ props:
496
+ direction: vertical
497
+ gap: middle
498
+ children:
499
+ - type: Text
500
+ props:
501
+ size: small
502
+ type: secondary
503
+ text: 将从 ${data.detail.name} 上游拉取模型列表(Base URL + API Key)
504
+ className: text-sm
505
+ - type: Table
506
+ props:
507
+ dataSource: ${data.upstream}
508
+ rowKey: id
509
+ pagination: false
510
+ columns:
511
+ - title: 状态
512
+ width: 64
513
+ cell:
514
+ type: Checkbox
515
+ props:
516
+ value: ${row.local == '新增'}
517
+ disabled: ${row.local != '新增'}
518
+ - title: Provider Model ID
519
+ dataIndex: id
520
+ - title: 建议 Model Name
521
+ dataIndex: name
522
+ - title: 本地状态
523
+ dataIndex: local
524
+ - type: Text
525
+ props:
526
+ text: 已选 2 项(新增) · 0 项已存在将跳过
527
+ type: secondary
528
+ className: text-sm
529
+ - type: Flex
530
+ props:
531
+ justify: end
532
+ gap: middle
533
+ children:
534
+ - type: Button
535
+ props:
536
+ text: 取消
537
+ events:
538
+ onClick:
539
+ - action: overlay.close
540
+ - type: Button
541
+ props:
542
+ text: 确认拉取
543
+ variant: primary
544
+ events:
545
+ onClick:
546
+ - action: overlay.close
547
+ params:
548
+ payload:
549
+ ok: true
550
+ - action: if
551
+ params:
552
+ condition: ${actions.pullResult.ok}
553
+ then:
554
+ - action: message
555
+ params:
556
+ messageType: success
557
+ text: 已为选中项批量创建 Model(演示)
558
+ - action: reload
559
+ params:
560
+ dataSource: detail
561
+ - type: Button
562
+ props:
563
+ text: 导入
564
+ icon: upload
565
+ size: small
566
+ events:
567
+ onClick:
568
+ - id: importResult
569
+ action: overlay.open
570
+ params:
571
+ overlay:
572
+ type: modal
573
+ title: 导入模型
574
+ width: 560
575
+ content:
576
+ type: Form
577
+ props:
578
+ name: importModel
579
+ events:
580
+ onSubmit:
581
+ - action: overlay.close
582
+ params:
583
+ payload:
584
+ ok: true
585
+ children:
586
+ - type: Field
587
+ props:
588
+ label: Model Name
589
+ required: true
590
+ children:
591
+ - type: Input
592
+ props:
593
+ name: modelName
594
+ placeholder: 展示名称,平台内识别用
595
+ rules:
596
+ - required: true
597
+ message: 请输入 Model Name
598
+ - type: Field
599
+ props:
600
+ label: Provider Model ID
601
+ required: true
602
+ children:
603
+ - type: Input
604
+ props:
605
+ name: providerModelId
606
+ placeholder: 上游 API 实际调用的模型 ID
607
+ rules:
608
+ - required: true
609
+ message: 请输入 Provider Model ID
610
+ - type: Field
611
+ props:
612
+ label: Model Type
613
+ children:
614
+ - type: Select
615
+ props:
616
+ name: modelType
617
+ value: LLM
618
+ options:
619
+ - label: LLM
620
+ value: LLM
621
+ - label: Embedding
622
+ value: Embedding
623
+ - label: Image
624
+ value: Image
625
+ - label: Audio
626
+ value: Audio
627
+ controlClassName: w-full [&_[data-slot=select-trigger]]:w-full
628
+ - type: Field
629
+ props:
630
+ label: Model Code
631
+ children:
632
+ - type: Input
633
+ props:
634
+ name: modelCode
635
+ placeholder: 留空时根据 Name 自动生成
636
+ - type: Flex
637
+ props:
638
+ justify: end
639
+ gap: middle
640
+ children:
641
+ - type: Button
642
+ props:
643
+ text: 取消
644
+ events:
645
+ onClick:
646
+ - action: overlay.close
647
+ - type: Button
648
+ props:
649
+ text: 确认导入
650
+ variant: primary
651
+ submit: true
652
+ - action: if
653
+ params:
654
+ condition: ${actions.importResult.ok}
655
+ then:
656
+ - action: message
657
+ params:
658
+ messageType: success
659
+ text: 已创建 Model 草稿(演示:可去编辑补全定价与参数)
660
+ - action: reload
661
+ params:
662
+ dataSource: detail
663
+ - type: Button
664
+ props:
665
+ text: 查看全部模型
666
+ icon: eye
667
+ size: small
668
+ events:
669
+ onClick:
670
+ - action: message
671
+ params:
672
+ messageType: info
673
+ text: 跳转 Model 列表(带 Provider 筛选,演示:目标页建设中)
674
+ - type: Table
675
+ props:
676
+ dataSource: ${data.detail.models}
677
+ rowKey: code
678
+ pagination:
679
+ pageSize: 10
680
+ columns:
681
+ - title: Model Code
682
+ dataIndex: code
683
+ - title: Model Name
684
+ dataIndex: name
685
+ - title: Type
686
+ dataIndex: type
687
+ - title: Provider Model ID
688
+ dataIndex: providerModelId
689
+ - title: 定价摘要
690
+ dataIndex: pricing
691
+ - title: Status
692
+ cell:
693
+ type: Badge
694
+ props:
695
+ text: ${row.status}
696
+ variant: "${row.status == 'ONLINE' ? 'default' : 'secondary'}"
697
+ - title: 路由
698
+ dataIndex: routes
699
+ - title: 操作
700
+ cell:
701
+ type: Button
702
+ props:
703
+ text: 详情
704
+ variant: link
705
+ size: small
706
+ className: p-0
707
+ events:
708
+ onClick:
709
+ - action: message
710
+ params:
711
+ messageType: info
712
+ text: 跳转模型详情:${row.code}(演示:目标页建设中)
713
+ - key: relations
714
+ label: 引用关系
715
+ className: p-2
716
+ children:
717
+ - type: Card
718
+ props:
719
+ bordered: false
720
+ children:
721
+ - type: Text
722
+ props:
723
+ text: >-
724
+ ${data.detail.code} (Provider)
725
+
726
+ │
727
+
728
+ ├── Model (${data.detail.modelCount})
729
+
730
+ │ ├── ${data.detail.models[0].code}
731
+
732
+ │ └── ...
733
+
734
+ │
735
+
736
+ └── 被引用
737
+ └── Model → Route Target (${data.detail.routes.total}) → Route Pool
738
+ className: font-mono text-sm
739
+ style:
740
+ whiteSpace: pre
741
+ - type: Flex
742
+ props:
743
+ align: center
744
+ gap: middle
745
+ children:
746
+ - type: Button
747
+ props:
748
+ text: 展开全部
749
+ size: small
750
+ events:
751
+ onClick:
752
+ - action: message
753
+ params:
754
+ messageType: info
755
+ text: 展开全部(演示)
756
+ - type: Button
757
+ props:
758
+ text: 导出关系图
759
+ size: small
760
+ events:
761
+ onClick:
762
+ - action: message
763
+ params:
764
+ messageType: info
765
+ text: 导出关系图(演示)
766
+ - type: Empty
767
+ when: ${data.detail == null && !dataStatus.detail.loading}
768
+ props:
769
+ title: 未找到 Provider
770
+ description: Provider Code「${route.params.code}」不存在或已被删除
771
+ children:
772
+ - type: Button
773
+ props:
774
+ text: 返回列表
775
+ variant: primary
776
+ events:
777
+ onClick:
778
+ - action: navigate
779
+ params:
780
+ to: /providers