@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.
- package/LICENSE +21 -0
- package/README.md +40 -0
- package/package.json +26 -0
- package/pactor/SKILL.md +373 -0
- package/pactor/references/dsl-authoring.md +448 -0
- package/prd-to-app/SKILL.md +75 -0
- package/prd-to-app/references/acceptance-checklist.md +47 -0
- package/prd-to-app/references/component-mapping.md +41 -0
- package/prd-to-app/references/mock-data-routes.md +66 -0
- package/prd-to-app/references/page-templates.md +274 -0
- package/prd-to-app/references/project-structure.md +89 -0
- package/prd-to-app/references/theme-and-style.md +41 -0
- package/prd-to-app/template/README.md +26 -0
- package/prd-to-app/template/app/[[...slug]]/page.tsx +7 -0
- package/prd-to-app/template/app/api/auth/login/route.ts +32 -0
- package/prd-to-app/template/app/api/auth/logout/route.ts +22 -0
- package/prd-to-app/template/app/api/data/[...parts]/route.ts +118 -0
- package/prd-to-app/template/app/api/public/pages/[id]/route.ts +40 -0
- package/prd-to-app/template/app/api/sitemap/route.ts +21 -0
- package/prd-to-app/template/app/api/users/route.ts +57 -0
- package/prd-to-app/template/app/favicon.ico +0 -0
- package/prd-to-app/template/app/globals.css +248 -0
- package/prd-to-app/template/app/layout.tsx +49 -0
- package/prd-to-app/template/app/login.css +122 -0
- package/prd-to-app/template/eslint.config.mjs +18 -0
- package/prd-to-app/template/next-env.d.ts +7 -0
- package/prd-to-app/template/next.config.js +32 -0
- package/prd-to-app/template/package.json +34 -0
- package/prd-to-app/template/pnpm-lock.yaml +6854 -0
- package/prd-to-app/template/pnpm-workspace.yaml +7 -0
- package/prd-to-app/template/postcss.config.mjs +7 -0
- package/prd-to-app/template/public/file.svg +1 -0
- package/prd-to-app/template/public/globe.svg +1 -0
- package/prd-to-app/template/public/next.svg +1 -0
- package/prd-to-app/template/public/skins/chenwunaifu.css +111 -0
- package/prd-to-app/template/public/skins/taijingshenlin.css +109 -0
- package/prd-to-app/template/public/skins/xuanzhimoyun.css +110 -0
- package/prd-to-app/template/public/vercel.svg +1 -0
- package/prd-to-app/template/public/window.svg +1 -0
- package/prd-to-app/template/scripts/build.mjs +35 -0
- package/prd-to-app/template/src/pactor/App.tsx +55 -0
- package/prd-to-app/template/src/pactor/actions.ts +438 -0
- package/prd-to-app/template/src/pactor/components/card-links.tsx +86 -0
- package/prd-to-app/template/src/pactor/components/chip-filter.tsx +89 -0
- package/prd-to-app/template/src/pactor/components/chip-node.tsx +46 -0
- package/prd-to-app/template/src/pactor/components/debug-chat.tsx +189 -0
- package/prd-to-app/template/src/pactor/components/index.ts +28 -0
- package/prd-to-app/template/src/pactor/components/log-status.tsx +64 -0
- package/prd-to-app/template/src/pactor/components/status-badge.tsx +46 -0
- package/prd-to-app/template/src/pactor/components/theme-switcher.tsx +136 -0
- package/prd-to-app/template/src/pactor/config.ts +28 -0
- package/prd-to-app/template/src/pactor/mocks/audit-mock.ts +403 -0
- package/prd-to-app/template/src/pactor/mocks/call-logs-mock.ts +875 -0
- package/prd-to-app/template/src/pactor/mocks/client-debug-mock.ts +188 -0
- package/prd-to-app/template/src/pactor/mocks/client-templates-mock.ts +497 -0
- package/prd-to-app/template/src/pactor/mocks/clients-mock.ts +483 -0
- package/prd-to-app/template/src/pactor/mocks/costs-mock.ts +406 -0
- package/prd-to-app/template/src/pactor/mocks/dashboard-mock.ts +192 -0
- package/prd-to-app/template/src/pactor/mocks/model-debug-mock.ts +144 -0
- package/prd-to-app/template/src/pactor/mocks/models-mock.ts +799 -0
- package/prd-to-app/template/src/pactor/mocks/ops-usage-mock.ts +806 -0
- package/prd-to-app/template/src/pactor/mocks/providers-mock.ts +424 -0
- package/prd-to-app/template/src/pactor/mocks/routes-mock.ts +604 -0
- package/prd-to-app/template/src/pactor/services.ts +185 -0
- package/prd-to-app/template/src/pactor/skin.ts +52 -0
- package/prd-to-app/template/src/server/accounts.ts +63 -0
- package/prd-to-app/template/src/server/cors.ts +34 -0
- package/prd-to-app/template/src/server/sitemap.ts +176 -0
- package/prd-to-app/template/src/server/yaml/common/dashboard.yaml +498 -0
- package/prd-to-app/template/src/server/yaml/common/login.yaml +84 -0
- package/prd-to-app/template/src/server/yaml/provider/provider-create.yaml +340 -0
- package/prd-to-app/template/src/server/yaml/provider/provider-detail.yaml +780 -0
- package/prd-to-app/template/src/server/yaml/provider/provider-edit.yaml +366 -0
- package/prd-to-app/template/src/server/yaml/provider/provider-list.yaml +1989 -0
- package/prd-to-app/template/src/server/yaml/route/route-create.yaml +511 -0
- package/prd-to-app/template/src/server/yaml/route/route-detail.yaml +610 -0
- package/prd-to-app/template/src/server/yaml/route/route-edit.yaml +809 -0
- package/prd-to-app/template/src/server/yaml/route/route-list.yaml +1793 -0
- package/prd-to-app/template/src/server/yaml/sitemap.yaml +250 -0
- package/prd-to-app/template/tsconfig.json +34 -0
|
@@ -0,0 +1,610 @@
|
|
|
1
|
+
dsl: "1.0"
|
|
2
|
+
page:
|
|
3
|
+
id: route-detail
|
|
4
|
+
title: 路由详情
|
|
5
|
+
name: routeDetail
|
|
6
|
+
description: 模型路由 / 路由详情:基本信息、入口配置、模型与路由策略(单页纵向,无 Tab)
|
|
7
|
+
dataSources:
|
|
8
|
+
detail:
|
|
9
|
+
type: http
|
|
10
|
+
autoLoad: true
|
|
11
|
+
request:
|
|
12
|
+
method: GET
|
|
13
|
+
url: /api/data/routes/${route.params.code}
|
|
14
|
+
body:
|
|
15
|
+
type: Page
|
|
16
|
+
children:
|
|
17
|
+
- type: Breadcrumb
|
|
18
|
+
props:
|
|
19
|
+
items:
|
|
20
|
+
- label: 模型路由
|
|
21
|
+
- label: 路由
|
|
22
|
+
href: /routes
|
|
23
|
+
- label: ${route.params.code}
|
|
24
|
+
- type: Flex
|
|
25
|
+
when: ${data.detail != null}
|
|
26
|
+
props:
|
|
27
|
+
direction: vertical
|
|
28
|
+
gap: middle
|
|
29
|
+
align: stretch
|
|
30
|
+
children:
|
|
31
|
+
- type: Card
|
|
32
|
+
children:
|
|
33
|
+
- type: Flex
|
|
34
|
+
props:
|
|
35
|
+
justify: space-between
|
|
36
|
+
align: middle
|
|
37
|
+
children:
|
|
38
|
+
- type: Flex
|
|
39
|
+
props:
|
|
40
|
+
align: center
|
|
41
|
+
gap: middle
|
|
42
|
+
children:
|
|
43
|
+
- type: Flex
|
|
44
|
+
props:
|
|
45
|
+
align: center
|
|
46
|
+
justify: center
|
|
47
|
+
className: size-12 shrink-0 rounded-full bg-(--muted)
|
|
48
|
+
children:
|
|
49
|
+
- type: Icon
|
|
50
|
+
props:
|
|
51
|
+
name: list-filter
|
|
52
|
+
size: 24
|
|
53
|
+
- type: Flex
|
|
54
|
+
props:
|
|
55
|
+
direction: vertical
|
|
56
|
+
gap: 0
|
|
57
|
+
children:
|
|
58
|
+
- type: Flex
|
|
59
|
+
props:
|
|
60
|
+
align: center
|
|
61
|
+
gap: middle
|
|
62
|
+
children:
|
|
63
|
+
- type: Typography
|
|
64
|
+
props:
|
|
65
|
+
variant: h3
|
|
66
|
+
text: ${data.detail.name}
|
|
67
|
+
- type: StatusBadge
|
|
68
|
+
props:
|
|
69
|
+
status: ${data.detail.status}
|
|
70
|
+
- type: Text
|
|
71
|
+
props:
|
|
72
|
+
text: ${data.detail.code} · ${data.detail.typeLabel} · ${data.detail.path}
|
|
73
|
+
type: secondary
|
|
74
|
+
- type: Flex
|
|
75
|
+
props:
|
|
76
|
+
align: center
|
|
77
|
+
gap: small
|
|
78
|
+
children:
|
|
79
|
+
- type: Button
|
|
80
|
+
props:
|
|
81
|
+
text: 编辑
|
|
82
|
+
icon: edit
|
|
83
|
+
variant: primary
|
|
84
|
+
size: small
|
|
85
|
+
events:
|
|
86
|
+
onClick:
|
|
87
|
+
- action: navigate
|
|
88
|
+
params:
|
|
89
|
+
to: /routes/${route.params.code}/edit
|
|
90
|
+
- type: Button
|
|
91
|
+
props:
|
|
92
|
+
text: "${data.detail.status == 'enabled' ? '停用' : '启用'}"
|
|
93
|
+
icon: "${data.detail.status == 'enabled' ? 'x-circle' : 'check-circle'}"
|
|
94
|
+
size: small
|
|
95
|
+
events:
|
|
96
|
+
onClick:
|
|
97
|
+
- id: statusCfm
|
|
98
|
+
action: overlay.open
|
|
99
|
+
params:
|
|
100
|
+
overlay:
|
|
101
|
+
type: modal
|
|
102
|
+
title: "${data.detail.status == 'enabled' ? '确认停用 Route' : '确认启用 Route'}"
|
|
103
|
+
width: 480
|
|
104
|
+
content:
|
|
105
|
+
type: Flex
|
|
106
|
+
props:
|
|
107
|
+
direction: vertical
|
|
108
|
+
gap: middle
|
|
109
|
+
children:
|
|
110
|
+
- type: Text
|
|
111
|
+
props:
|
|
112
|
+
size: small
|
|
113
|
+
text: "${data.detail.status == 'enabled' ? '停用后,Runtime 不再匹配该路由,客户端通过该入口的调用将失败。'
|
|
114
|
+
: '启用后,Runtime 将按入口配置与路由策略匹配并调度该路由。'}"
|
|
115
|
+
- type: Flex
|
|
116
|
+
props:
|
|
117
|
+
direction: vertical
|
|
118
|
+
gap: small
|
|
119
|
+
children:
|
|
120
|
+
- type: Text
|
|
121
|
+
props:
|
|
122
|
+
text: 影响范围:
|
|
123
|
+
strong: true
|
|
124
|
+
- type: Text
|
|
125
|
+
props:
|
|
126
|
+
text: · 关联模型:${data.detail.models.length} 个(启用 ${data.detail.enabledModelCount}
|
|
127
|
+
个)
|
|
128
|
+
type: secondary
|
|
129
|
+
- type: Text
|
|
130
|
+
props:
|
|
131
|
+
text: · 请求入口:${data.detail.path} · ${data.detail.protocol}
|
|
132
|
+
type: secondary
|
|
133
|
+
- type: Text
|
|
134
|
+
when: ${data.detail.status == 'enabled' && data.detail.enabledModelCount > 0}
|
|
135
|
+
props:
|
|
136
|
+
size: small
|
|
137
|
+
text: ⚠ 存在启用模型时,建议先完成流量切换再停用。
|
|
138
|
+
type: warning
|
|
139
|
+
- type: Flex
|
|
140
|
+
props:
|
|
141
|
+
justify: end
|
|
142
|
+
gap: middle
|
|
143
|
+
children:
|
|
144
|
+
- type: Button
|
|
145
|
+
props:
|
|
146
|
+
text: 取消
|
|
147
|
+
events:
|
|
148
|
+
onClick:
|
|
149
|
+
- action: overlay.close
|
|
150
|
+
- type: Button
|
|
151
|
+
props:
|
|
152
|
+
text: "${data.detail.status == 'enabled' ? '确认停用' : '确认启用'}"
|
|
153
|
+
variant: primary
|
|
154
|
+
danger: ${data.detail.status == 'enabled'}
|
|
155
|
+
events:
|
|
156
|
+
onClick:
|
|
157
|
+
- action: overlay.close
|
|
158
|
+
params:
|
|
159
|
+
payload:
|
|
160
|
+
ok: true
|
|
161
|
+
- action: if
|
|
162
|
+
params:
|
|
163
|
+
condition: ${actions.statusCfm.ok}
|
|
164
|
+
then:
|
|
165
|
+
- action: message
|
|
166
|
+
params:
|
|
167
|
+
messageType: success
|
|
168
|
+
text: 状态已切换(演示)
|
|
169
|
+
- type: Button
|
|
170
|
+
props:
|
|
171
|
+
text: 模拟调用
|
|
172
|
+
icon: zap
|
|
173
|
+
size: small
|
|
174
|
+
events:
|
|
175
|
+
onClick:
|
|
176
|
+
- id: simulate
|
|
177
|
+
action: overlay.open
|
|
178
|
+
params:
|
|
179
|
+
overlay:
|
|
180
|
+
type: modal
|
|
181
|
+
title: 模拟调用
|
|
182
|
+
width: 560
|
|
183
|
+
content:
|
|
184
|
+
type: Flex
|
|
185
|
+
props:
|
|
186
|
+
direction: vertical
|
|
187
|
+
gap: middle
|
|
188
|
+
align: stretch
|
|
189
|
+
children:
|
|
190
|
+
- type: Text
|
|
191
|
+
props:
|
|
192
|
+
text: 输入 channel、routeTag 等参数,演算当前路由的命中模型与策略结果。
|
|
193
|
+
type: secondary
|
|
194
|
+
className: text-sm
|
|
195
|
+
- type: Field
|
|
196
|
+
props:
|
|
197
|
+
label: Channel
|
|
198
|
+
children:
|
|
199
|
+
- type: Input
|
|
200
|
+
props:
|
|
201
|
+
className: w-full
|
|
202
|
+
placeholder: 如 web / ios / android
|
|
203
|
+
- type: Field
|
|
204
|
+
props:
|
|
205
|
+
label: Route Tag
|
|
206
|
+
children:
|
|
207
|
+
- type: Input
|
|
208
|
+
props:
|
|
209
|
+
className: w-full
|
|
210
|
+
placeholder: 可选,如 premium
|
|
211
|
+
- type: Flex
|
|
212
|
+
props:
|
|
213
|
+
justify: end
|
|
214
|
+
gap: middle
|
|
215
|
+
children:
|
|
216
|
+
- type: Button
|
|
217
|
+
props:
|
|
218
|
+
text: 取消
|
|
219
|
+
events:
|
|
220
|
+
onClick:
|
|
221
|
+
- action: overlay.close
|
|
222
|
+
- type: Button
|
|
223
|
+
props:
|
|
224
|
+
text: 运行演算
|
|
225
|
+
icon: send
|
|
226
|
+
variant: primary
|
|
227
|
+
events:
|
|
228
|
+
onClick:
|
|
229
|
+
- action: overlay.close
|
|
230
|
+
- action: message
|
|
231
|
+
params:
|
|
232
|
+
messageType: success
|
|
233
|
+
text: 命中模型:${data.detail.models[0].modelName} ·
|
|
234
|
+
策略:${data.detail.strategyLabel}(演示)
|
|
235
|
+
- type: DropdownMenu
|
|
236
|
+
props:
|
|
237
|
+
items:
|
|
238
|
+
- label: 复制路由标识
|
|
239
|
+
value: copy
|
|
240
|
+
icon: copy
|
|
241
|
+
- label: 导出配置 JSON
|
|
242
|
+
value: export
|
|
243
|
+
icon: download
|
|
244
|
+
events:
|
|
245
|
+
onSelect:
|
|
246
|
+
- action: message
|
|
247
|
+
params:
|
|
248
|
+
messageType: info
|
|
249
|
+
text: 操作:${event}(演示)
|
|
250
|
+
children:
|
|
251
|
+
- type: Button
|
|
252
|
+
props:
|
|
253
|
+
text: ···
|
|
254
|
+
variant: text
|
|
255
|
+
- type: Card
|
|
256
|
+
props:
|
|
257
|
+
title: ① 基本信息
|
|
258
|
+
children:
|
|
259
|
+
- type: Flex
|
|
260
|
+
props:
|
|
261
|
+
direction: vertical
|
|
262
|
+
gap: middle
|
|
263
|
+
align: stretch
|
|
264
|
+
children:
|
|
265
|
+
- type: Flex
|
|
266
|
+
props:
|
|
267
|
+
align: baseline
|
|
268
|
+
gap: middle
|
|
269
|
+
children:
|
|
270
|
+
- type: Text
|
|
271
|
+
props:
|
|
272
|
+
text: 路由名称
|
|
273
|
+
type: secondary
|
|
274
|
+
style:
|
|
275
|
+
width: 180
|
|
276
|
+
flexShrink: 0
|
|
277
|
+
- type: Text
|
|
278
|
+
props:
|
|
279
|
+
text: ${data.detail.name}
|
|
280
|
+
- type: Flex
|
|
281
|
+
props:
|
|
282
|
+
align: baseline
|
|
283
|
+
gap: middle
|
|
284
|
+
children:
|
|
285
|
+
- type: Text
|
|
286
|
+
props:
|
|
287
|
+
text: 路由标识
|
|
288
|
+
type: secondary
|
|
289
|
+
style:
|
|
290
|
+
width: 180
|
|
291
|
+
flexShrink: 0
|
|
292
|
+
- type: Text
|
|
293
|
+
props:
|
|
294
|
+
text: ${data.detail.code}(创建后不可修改)
|
|
295
|
+
- type: Flex
|
|
296
|
+
props:
|
|
297
|
+
align: baseline
|
|
298
|
+
gap: middle
|
|
299
|
+
children:
|
|
300
|
+
- type: Text
|
|
301
|
+
props:
|
|
302
|
+
text: 类型
|
|
303
|
+
type: secondary
|
|
304
|
+
style:
|
|
305
|
+
width: 180
|
|
306
|
+
flexShrink: 0
|
|
307
|
+
- type: Text
|
|
308
|
+
props:
|
|
309
|
+
text: ${data.detail.typeLabel}
|
|
310
|
+
- type: Flex
|
|
311
|
+
props:
|
|
312
|
+
align: baseline
|
|
313
|
+
gap: middle
|
|
314
|
+
children:
|
|
315
|
+
- type: Text
|
|
316
|
+
props:
|
|
317
|
+
text: 逻辑模型 Alias
|
|
318
|
+
type: secondary
|
|
319
|
+
style:
|
|
320
|
+
width: 180
|
|
321
|
+
flexShrink: 0
|
|
322
|
+
- type: Text
|
|
323
|
+
props:
|
|
324
|
+
text: "${data.detail.alias != '' ? data.detail.alias : '—'}"
|
|
325
|
+
- type: Flex
|
|
326
|
+
props:
|
|
327
|
+
align: baseline
|
|
328
|
+
gap: middle
|
|
329
|
+
children:
|
|
330
|
+
- type: Text
|
|
331
|
+
props:
|
|
332
|
+
text: 标签
|
|
333
|
+
type: secondary
|
|
334
|
+
style:
|
|
335
|
+
width: 180
|
|
336
|
+
flexShrink: 0
|
|
337
|
+
- type: Text
|
|
338
|
+
props:
|
|
339
|
+
text: "${data.detail.tagsText != '' ? data.detail.tagsText : '—'}"
|
|
340
|
+
- type: Flex
|
|
341
|
+
props:
|
|
342
|
+
align: baseline
|
|
343
|
+
gap: middle
|
|
344
|
+
children:
|
|
345
|
+
- type: Text
|
|
346
|
+
props:
|
|
347
|
+
text: 描述
|
|
348
|
+
type: secondary
|
|
349
|
+
style:
|
|
350
|
+
width: 180
|
|
351
|
+
flexShrink: 0
|
|
352
|
+
- type: Text
|
|
353
|
+
props:
|
|
354
|
+
text: "${data.detail.description != '' ? data.detail.description : '—'}"
|
|
355
|
+
- type: Flex
|
|
356
|
+
props:
|
|
357
|
+
align: baseline
|
|
358
|
+
gap: middle
|
|
359
|
+
children:
|
|
360
|
+
- type: Text
|
|
361
|
+
props:
|
|
362
|
+
text: 状态
|
|
363
|
+
type: secondary
|
|
364
|
+
style:
|
|
365
|
+
width: 180
|
|
366
|
+
flexShrink: 0
|
|
367
|
+
- type: Text
|
|
368
|
+
props:
|
|
369
|
+
text: "${data.detail.status == 'enabled' ? '● 启用' : data.detail.status ==
|
|
370
|
+
'disabled' ? '● 停用' : '草稿'}"
|
|
371
|
+
- type: Card
|
|
372
|
+
props:
|
|
373
|
+
title: ② 入口配置
|
|
374
|
+
children:
|
|
375
|
+
- type: Flex
|
|
376
|
+
props:
|
|
377
|
+
direction: vertical
|
|
378
|
+
gap: middle
|
|
379
|
+
align: stretch
|
|
380
|
+
children:
|
|
381
|
+
- type: Flex
|
|
382
|
+
props:
|
|
383
|
+
align: baseline
|
|
384
|
+
gap: middle
|
|
385
|
+
children:
|
|
386
|
+
- type: Text
|
|
387
|
+
props:
|
|
388
|
+
text: 请求路径
|
|
389
|
+
type: secondary
|
|
390
|
+
style:
|
|
391
|
+
width: 180
|
|
392
|
+
flexShrink: 0
|
|
393
|
+
- type: Text
|
|
394
|
+
props:
|
|
395
|
+
text: ${data.detail.path}
|
|
396
|
+
- type: Flex
|
|
397
|
+
props:
|
|
398
|
+
align: baseline
|
|
399
|
+
gap: middle
|
|
400
|
+
children:
|
|
401
|
+
- type: Text
|
|
402
|
+
props:
|
|
403
|
+
text: 协议格式
|
|
404
|
+
type: secondary
|
|
405
|
+
style:
|
|
406
|
+
width: 180
|
|
407
|
+
flexShrink: 0
|
|
408
|
+
- type: Text
|
|
409
|
+
props:
|
|
410
|
+
text: ${data.detail.protocol}
|
|
411
|
+
- type: Flex
|
|
412
|
+
props:
|
|
413
|
+
align: baseline
|
|
414
|
+
gap: middle
|
|
415
|
+
children:
|
|
416
|
+
- type: Text
|
|
417
|
+
props:
|
|
418
|
+
text: Ingress Operation
|
|
419
|
+
type: secondary
|
|
420
|
+
style:
|
|
421
|
+
width: 180
|
|
422
|
+
flexShrink: 0
|
|
423
|
+
- type: Text
|
|
424
|
+
props:
|
|
425
|
+
text: ${data.detail.operation}
|
|
426
|
+
- type: Flex
|
|
427
|
+
props:
|
|
428
|
+
align: center
|
|
429
|
+
gap: middle
|
|
430
|
+
children:
|
|
431
|
+
- type: Text
|
|
432
|
+
props:
|
|
433
|
+
text: 协议说明
|
|
434
|
+
type: secondary
|
|
435
|
+
style:
|
|
436
|
+
width: 180
|
|
437
|
+
flexShrink: 0
|
|
438
|
+
- type: Flex
|
|
439
|
+
props:
|
|
440
|
+
align: center
|
|
441
|
+
gap: middle
|
|
442
|
+
children:
|
|
443
|
+
- type: Text
|
|
444
|
+
props:
|
|
445
|
+
text: Schema 引用与示例 JSON(只读)
|
|
446
|
+
type: secondary
|
|
447
|
+
- type: Button
|
|
448
|
+
props:
|
|
449
|
+
text: 查看 Schema / 示例 JSON
|
|
450
|
+
icon: code
|
|
451
|
+
size: small
|
|
452
|
+
events:
|
|
453
|
+
onClick:
|
|
454
|
+
- id: schemaView
|
|
455
|
+
action: overlay.open
|
|
456
|
+
params:
|
|
457
|
+
overlay:
|
|
458
|
+
type: modal
|
|
459
|
+
title: 协议说明
|
|
460
|
+
width: 560
|
|
461
|
+
content:
|
|
462
|
+
type: Flex
|
|
463
|
+
props:
|
|
464
|
+
direction: vertical
|
|
465
|
+
gap: middle
|
|
466
|
+
align: stretch
|
|
467
|
+
children:
|
|
468
|
+
- type: Alert
|
|
469
|
+
props:
|
|
470
|
+
showIcon: true
|
|
471
|
+
variant: info
|
|
472
|
+
message: Ingress Protocol 描述对外请求格式,与 Model「提供商」Tab 中的上游协议无关。
|
|
473
|
+
- type: Text
|
|
474
|
+
props:
|
|
475
|
+
text: >-
|
|
476
|
+
{
|
|
477
|
+
"model": "reasoning",
|
|
478
|
+
"messages": [
|
|
479
|
+
{ "role": "system", "content": "You are a helpful assistant." },
|
|
480
|
+
{ "role": "user", "content": "你好" }
|
|
481
|
+
],
|
|
482
|
+
"channel": "web",
|
|
483
|
+
"routeTag": "premium"
|
|
484
|
+
}
|
|
485
|
+
className: font-mono text-sm whitespace-pre-wrap break-all
|
|
486
|
+
- type: Card
|
|
487
|
+
props:
|
|
488
|
+
title: ③ 模型与路由策略
|
|
489
|
+
children:
|
|
490
|
+
- type: Flex
|
|
491
|
+
props:
|
|
492
|
+
direction: vertical
|
|
493
|
+
gap: middle
|
|
494
|
+
align: stretch
|
|
495
|
+
children:
|
|
496
|
+
- type: Flex
|
|
497
|
+
props:
|
|
498
|
+
align: baseline
|
|
499
|
+
gap: middle
|
|
500
|
+
children:
|
|
501
|
+
- type: Text
|
|
502
|
+
props:
|
|
503
|
+
text: 路由策略
|
|
504
|
+
type: secondary
|
|
505
|
+
style:
|
|
506
|
+
width: 180
|
|
507
|
+
flexShrink: 0
|
|
508
|
+
- type: Text
|
|
509
|
+
props:
|
|
510
|
+
text: ${data.detail.strategySummary}
|
|
511
|
+
- type: Flex
|
|
512
|
+
props:
|
|
513
|
+
align: baseline
|
|
514
|
+
gap: middle
|
|
515
|
+
children:
|
|
516
|
+
- type: Text
|
|
517
|
+
props:
|
|
518
|
+
text: 粘性 Session
|
|
519
|
+
type: secondary
|
|
520
|
+
style:
|
|
521
|
+
width: 180
|
|
522
|
+
flexShrink: 0
|
|
523
|
+
- type: Text
|
|
524
|
+
props:
|
|
525
|
+
text: "${data.detail.stickySession ? '开' : '关'}"
|
|
526
|
+
- type: Flex
|
|
527
|
+
props:
|
|
528
|
+
align: baseline
|
|
529
|
+
gap: middle
|
|
530
|
+
children:
|
|
531
|
+
- type: Text
|
|
532
|
+
props:
|
|
533
|
+
text: 健康过滤
|
|
534
|
+
type: secondary
|
|
535
|
+
style:
|
|
536
|
+
width: 180
|
|
537
|
+
flexShrink: 0
|
|
538
|
+
- type: Text
|
|
539
|
+
props:
|
|
540
|
+
text: "${data.detail.healthFilter ? '仅调度 HEALTHY 实例' : '关闭'}"
|
|
541
|
+
- type: Table
|
|
542
|
+
props:
|
|
543
|
+
dataSource: ${data.detail.models}
|
|
544
|
+
rowKey: modelCode
|
|
545
|
+
pagination: false
|
|
546
|
+
className: mt-2
|
|
547
|
+
columns:
|
|
548
|
+
- title: Model
|
|
549
|
+
cell:
|
|
550
|
+
type: Button
|
|
551
|
+
props:
|
|
552
|
+
text: ${row.modelName}
|
|
553
|
+
variant: link
|
|
554
|
+
size: small
|
|
555
|
+
className: p-0 h-auto
|
|
556
|
+
events:
|
|
557
|
+
onClick:
|
|
558
|
+
- action: navigate
|
|
559
|
+
params:
|
|
560
|
+
to: /models/${row.modelCode}
|
|
561
|
+
- title: Provider 摘要
|
|
562
|
+
dataIndex: providerSummary
|
|
563
|
+
- title: 权重
|
|
564
|
+
cell:
|
|
565
|
+
type: Text
|
|
566
|
+
props:
|
|
567
|
+
text: ${row.weight}
|
|
568
|
+
className: tabular-nums
|
|
569
|
+
- title: 优先级
|
|
570
|
+
dataIndex: priority
|
|
571
|
+
- title: C
|
|
572
|
+
cell:
|
|
573
|
+
type: Text
|
|
574
|
+
props:
|
|
575
|
+
text: "${row.costRate == null ? '继承' : '×' + row.costRate}"
|
|
576
|
+
- title: M
|
|
577
|
+
cell:
|
|
578
|
+
type: Text
|
|
579
|
+
props:
|
|
580
|
+
text: "${row.billingRate == null ? '继承' : '×' + row.billingRate}"
|
|
581
|
+
- title: 状态
|
|
582
|
+
cell:
|
|
583
|
+
type: StatusBadge
|
|
584
|
+
props:
|
|
585
|
+
status: ${row.status}
|
|
586
|
+
- type: Text
|
|
587
|
+
when: ${data.detail.models.length == 0}
|
|
588
|
+
props:
|
|
589
|
+
text: 尚未添加模型;草稿允许 0 条,启用前至少 1 条启用模型。
|
|
590
|
+
type: secondary
|
|
591
|
+
- type: Text
|
|
592
|
+
props:
|
|
593
|
+
text: 权重合计(启用)${data.detail.weightTotal} · 点击模型名 → Model 详情
|
|
594
|
+
type: secondary
|
|
595
|
+
className: text-sm
|
|
596
|
+
- type: Empty
|
|
597
|
+
when: ${data.detail == null && !dataStatus.detail.loading}
|
|
598
|
+
props:
|
|
599
|
+
title: 未找到路由
|
|
600
|
+
description: 路由标识「${route.params.code}」不存在或已被删除
|
|
601
|
+
children:
|
|
602
|
+
- type: Button
|
|
603
|
+
props:
|
|
604
|
+
text: 返回列表
|
|
605
|
+
variant: primary
|
|
606
|
+
events:
|
|
607
|
+
onClick:
|
|
608
|
+
- action: navigate
|
|
609
|
+
params:
|
|
610
|
+
to: /routes
|