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