feat: Add LLM call timeout configuration to agent frontend
- Add llm_call_timeout field to CustomAgentConfig TypeScript interface - Add thinking field to CustomAgentConfig (for extended thinking support) - Add UI control (number input) in AgentEditorModal for timeout configuration - Range: 0-600 seconds (0 = use global default) - Supports 60-600 seconds recommended range - Add i18n translations in Chinese (zh-CN) and English (en-US) - Label: "LLM 调用超时" / "LLM Call Timeout" - Description with explanation of timeout behavior - Hint about default and unlimited wait implications - Placeholder with recommended range - Initialize llm_call_timeout: 0 in formData (uses global default) This completes the frontend support for per-agent LLM timeout configuration that was previously missing. The setting integrates with the existing three-tier configuration hierarchy: 1. Per-agent config (llm_call_timeout in custom_agents table) 2. Global config (agent.llm_call_timeout in config.yaml) 3. Hardcoded default (120 seconds)
This commit is contained in:
@@ -748,6 +748,25 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- LLM 调用超时时间 -->
|
||||
<div class="setting-row">
|
||||
<div class="setting-info">
|
||||
<label>{{ $t('agentEditor.llmCallTimeout.label') }}</label>
|
||||
<p class="desc">{{ $t('agentEditor.llmCallTimeout.desc') }}</p>
|
||||
<p class="desc-hint">{{ $t('agentEditor.llmCallTimeout.hint') }}</p>
|
||||
</div>
|
||||
<div class="setting-control">
|
||||
<t-input-number
|
||||
v-model="formData.config.llm_call_timeout"
|
||||
:min="0"
|
||||
:max="600"
|
||||
theme="column"
|
||||
:placeholder="$t('agentEditor.llmCallTimeout.placeholder')"
|
||||
clearable
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- MCP 服务选择 -->
|
||||
<div class="setting-row">
|
||||
<div class="setting-info">
|
||||
@@ -1797,6 +1816,7 @@ const defaultFormData = {
|
||||
thinking: false, // 默认禁用思考模式
|
||||
// Agent模式设置
|
||||
max_iterations: 10,
|
||||
llm_call_timeout: 120, // 120 seconds
|
||||
allowed_tools: [] as string[],
|
||||
reflection_enabled: false,
|
||||
// MCP 服务设置
|
||||
|
||||
Reference in New Issue
Block a user