format: g 格式化代码
This commit is contained in:
parent
1764ffedb0
commit
3eac205c0e
@ -510,6 +510,7 @@ async def resume_agent_chat(
|
||||
db: AsyncSession = Depends(get_db),
|
||||
):
|
||||
"""恢复被人工审批中断的对话(需要登录)"""
|
||||
|
||||
def normalize_resume_input(raw_answer: Any, raw_approved: bool | None) -> Any:
|
||||
if raw_answer is not None:
|
||||
if isinstance(raw_answer, str):
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
"""测试 chat_stream_service 中的 interrupt 相关函数"""
|
||||
|
||||
import pytest
|
||||
import sys
|
||||
import os
|
||||
|
||||
@ -12,7 +12,11 @@
|
||||
</div>
|
||||
|
||||
<div class="question-options">
|
||||
<label v-for="(item, index) in options" :key="`${item.value}-${index}`" class="option-item">
|
||||
<label
|
||||
v-for="(item, index) in options"
|
||||
:key="`${item.value}-${index}`"
|
||||
class="option-item"
|
||||
>
|
||||
<input
|
||||
v-if="multiSelect"
|
||||
type="checkbox"
|
||||
@ -30,7 +34,9 @@
|
||||
:disabled="isProcessing"
|
||||
@change="setSingle(item.value)"
|
||||
/>
|
||||
<span :class="{ recommended: index === 0 && String(item.label).includes('(Recommended)') }">
|
||||
<span
|
||||
:class="{ recommended: index === 0 && String(item.label).includes('(Recommended)') }"
|
||||
>
|
||||
{{ item.label }}
|
||||
</span>
|
||||
</label>
|
||||
@ -48,7 +54,9 @@
|
||||
|
||||
<div class="approval-actions">
|
||||
<button class="btn btn-reject" @click="handleCancel" :disabled="isProcessing">取消</button>
|
||||
<button class="btn btn-approve" @click="handleSubmit" :disabled="isSubmitDisabled">提交</button>
|
||||
<button class="btn btn-approve" @click="handleSubmit" :disabled="isSubmitDisabled">
|
||||
提交
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div v-if="isProcessing" class="approval-processing">
|
||||
|
||||
@ -5,9 +5,7 @@
|
||||
<span class="note">提问</span>
|
||||
<span class="separator">|</span>
|
||||
<span class="description">{{ shortQuestion }}</span>
|
||||
<span v-if="userAnswer" class="tag tag-answered">
|
||||
已回答: {{ displayAnswer }}
|
||||
</span>
|
||||
<span v-if="userAnswer" class="tag tag-answered"> 已回答: {{ displayAnswer }} </span>
|
||||
</div>
|
||||
</template>
|
||||
</BaseToolCall>
|
||||
|
||||
@ -109,7 +109,10 @@ export function useApproval({ getThreadState, resetOnGoingConv, fetchThreadMessa
|
||||
}
|
||||
|
||||
const processApprovalInStream = (chunk, threadId, currentAgentId) => {
|
||||
if (chunk.status !== 'ask_user_question_required' && chunk.status !== 'human_approval_required') {
|
||||
if (
|
||||
chunk.status !== 'ask_user_question_required' &&
|
||||
chunk.status !== 'human_approval_required'
|
||||
) {
|
||||
return false
|
||||
}
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
<!-- 服务状态提示 -->
|
||||
<div v-if="serverStatus === 'error'" class="server-status-alert">
|
||||
<div class="alert-content">
|
||||
<exclamation-circle-icon class="alert-icon" size="20" />
|
||||
<exclamation-circle-icon class="alert-icon" size="20" />
|
||||
<div class="alert-text">
|
||||
<div class="alert-title">服务端连接失败</div>
|
||||
<div class="alert-message">{{ serverError }}</div>
|
||||
@ -160,7 +160,7 @@
|
||||
>
|
||||
<a-input v-model:value="loginForm.loginId" placeholder="用户ID或手机号">
|
||||
<template #prefix>
|
||||
<user-icon size="18"/>
|
||||
<user-icon size="18" />
|
||||
</template>
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user