feat&fix: update paths in configuration, enhance error handling, and improve UI elements
This commit is contained in:
@@ -4,6 +4,9 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Task Detail: {{ task_id }}</title>
|
||||
<link rel="icon" href="/static/favicon.png" type="image/x-icon">
|
||||
<link rel="shortcut icon" href="/static/favicon.png" type="image/x-icon">
|
||||
<link rel="apple-touch-icon" href="/static/favicon.png">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css">
|
||||
<link rel="stylesheet" href="/static/task_detail.css">
|
||||
</head>
|
||||
@@ -21,11 +24,41 @@
|
||||
<dt>Instruction</dt>
|
||||
<dd>{{ task_info.instruction }}</dd>
|
||||
<dt>Status</dt>
|
||||
<dd class="status status-{{ task_status.status|lower|replace(' ', '-') }}">{{ task_status.status }}</dd>
|
||||
<dd class="status status-{{ task_status.status|lower|replace(' ', '-')|replace('(', '')|replace(')', '') }}">
|
||||
{{ task_status.status }}
|
||||
{% if task_status.status == 'Error' %}
|
||||
<span class="tooltip">
|
||||
<i class="fas fa-question-circle"></i>
|
||||
<span class="tooltip-text">Error occurred during task execution</span>
|
||||
</span>
|
||||
{% elif task_status.status == 'Done (Message Exit)' %}
|
||||
<span class="tooltip">
|
||||
<i class="fas fa-question-circle"></i>
|
||||
<span class="tooltip-text">Task completed with a message exit condition</span>
|
||||
</span>
|
||||
{% elif task_status.status == 'Done (Max Steps)' %}
|
||||
<span class="tooltip">
|
||||
<i class="fas fa-question-circle"></i>
|
||||
<span class="tooltip-text">Maximum steps reached, task completed</span>
|
||||
</span>
|
||||
{% endif %}
|
||||
</dd>
|
||||
<dt>Current Step</dt>
|
||||
<dd>{{ task_status.progress }}</dd>
|
||||
<dt>Last Update</dt>
|
||||
<dd>{{ task_status.last_update or 'None' }}</dd>
|
||||
{% if task_status.log_data and task_status.log_data.exit_condition %}
|
||||
<dt>Exit Condition</dt>
|
||||
<dd class="exit-condition">
|
||||
{{ task_status.log_data.exit_condition }}
|
||||
</dd>
|
||||
{% endif %}
|
||||
{% if task_status.status == 'Done (Message Exit)' and task_status.log_data and task_status.log_data.last_message %}
|
||||
<dt>Exit Message</dt>
|
||||
<dd class="exit-message">
|
||||
{{ task_status.log_data.last_message }}
|
||||
</dd>
|
||||
{% endif %}
|
||||
<dt>Result</dt>
|
||||
<dd>{{ task_status.result }}</dd>
|
||||
</dl>
|
||||
@@ -40,7 +73,15 @@
|
||||
<div class="step-title"><i class="fas fa-check-circle"></i> Step {{ step.step_num }}</div>
|
||||
<div class="step-time"><i class="far fa-clock"></i> {{ step.action_timestamp }}</div>
|
||||
</div>
|
||||
<pre>{{ step.action.action }}</pre>
|
||||
{% if task_status.log_data and task_status.log_data.agent_responses and loop.index0 < task_status.log_data.agent_responses|length %}
|
||||
<div class="step-intent">
|
||||
<i class="fas fa-comment"></i> <strong>Agent Intent:</strong> {{ task_status.log_data.agent_responses[loop.index0] }}
|
||||
</div>
|
||||
{% endif %}
|
||||
<pre>{% if step.action and step.action.action %}{{ step.action.action }}
|
||||
{% elif step.Error %}Error: {{ step.Error }}
|
||||
{% else %}{{ step|tojson }}
|
||||
{% endif %}</pre>
|
||||
{% if step.screenshot_file %}
|
||||
<div>
|
||||
<img src="/task/{{ task_type }}/{{ task_id }}/screenshot/{{ step.screenshot_file }}"
|
||||
|
||||
Reference in New Issue
Block a user