Fix workspace detail races and provider default handling
Keep analysis and Skill detail responses bound to the selected request, reject stale publish confirmations, and clear failed position-history results with retry controls. Reject removal of the current default provider with HTTP 409 and reflect that contract in the form. Track the OpenAPI page and API module by restricting the docs ignore rule to the repository root. Validate the staged provider contract with four isolated tests. Reuse the matching candidate's frontend lint, type check, 26 test groups, and production build results.
This commit is contained in:
1 parent
3178a2cc31
commit
d1a6325ed7
12 files changed
+405
-23
No files matched your search
@@ -14,6 +14,7 @@ const PROTOCOL_LABELS = { openai: "OpenAI 格式(/v1/chat/completions)", ant
|
||||
const providers = ref<Provider[]>([])
|
||||
const dialogVisible = ref(false)
|
||||
const editingId = ref<number | null>(null)
|
||||
const editingDefault = ref(false)
|
||||
const saving = ref(false)
|
||||
const testing = ref<number | null>(null)
|
||||
|
||||
@@ -58,6 +59,7 @@ async function load() {
|
||||
|
||||
function openCreate() {
|
||||
editingId.value = null
|
||||
editingDefault.value = false
|
||||
form.value = emptyForm()
|
||||
formRef.value?.clearValidate()
|
||||
dialogVisible.value = true
|
||||
@@ -65,6 +67,7 @@ function openCreate() {
|
||||
|
||||
function openEdit(p: Provider) {
|
||||
editingId.value = p.id
|
||||
editingDefault.value = p.is_default
|
||||
// key 不回显,留空表示不修改
|
||||
form.value = {
|
||||
name: p.name,
|
||||
@@ -240,7 +243,8 @@ onMounted(load)
|
||||
<span class="ml-2 text-xs">Chat 默认值,可在 Chat 页按轮调整;留空则不传,由模型决定。越高越慢、越贵</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="设为默认">
|
||||
<el-switch v-model="form.is_default" />
|
||||
<el-switch v-model="form.is_default" :disabled="editingDefault" />
|
||||
<span v-if="editingDefault" class="ml-2 text-xs">请将其他模型设为默认以切换</span>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
|
||||
Reference in new issue
Block a user