diff --git a/templates/base.html b/templates/base.html index fb33baa..941e486 100644 --- a/templates/base.html +++ b/templates/base.html @@ -376,7 +376,7 @@ -
+
{% if messages %}
{% for message in messages %} diff --git a/templates/chat/index.html b/templates/chat/index.html index f17057d..b4c3c21 100644 --- a/templates/chat/index.html +++ b/templates/chat/index.html @@ -1,16 +1,359 @@ {% extends "base.html" %} {% block title %}审核智能体{% endblock %} +{% block page_class %}chat-page{% endblock %} {% block content %} -
+
-
-
+
+

对话区与节点导航

-

中间区域承接用户问题、Agent 回答和节点式结果摘要。

+

像聊天一样提问,Agent 会结合知识库和所选文档回答。

-
- {% if node_results %} -
+ {% if node_results %} +
{% for node in node_results %} {{ node.label }} / {{ node.status }} {% endfor %}
- {% endif %} -
+ {% endif %} +
+ +
+ {% if conversation %} +
+
RA
+
+ 审核智能体 + 当前会话已就绪。可以询问资料目录、法规依据、字段抽取、一致性问题或风险整改建议。 +
+
+ {% else %} +
+
RA
+
+ 审核智能体 + 可以先不上传资料,直接询问注册法规、资料清单、模板字段或历史知识库内容。 +
+
+ {% endif %} + {% if form.message.value %} +
+
+
+ 用户问题 + {{ form.message.value|linebreaksbr }} +
+
+ {% endif %} + {% if result %} +
+
RA
+
+ Agent 回答 + {{ result.answer|linebreaksbr }} +
+
+ {% else %} +
+ {% for item in prompt_templates %} + {{ item }} + {% endfor %} +
+ {% endif %} +
+ + {% csrf_token %} -
+
{{ form.message.label_tag }} {{ form.message }} {% if form.message.errors %}

{{ form.message.errors|join:" " }}

{% endif %} -
-
- {{ form.document_ids.label_tag }} -
- {% for checkbox in form.document_ids %} - - {% empty %} -
未选择文档时,Agent 会按问题检索当前知识库。
- {% endfor %} +
+ {{ form.document_ids.label_tag }} +
+ {% for checkbox in form.document_ids %} + + {% empty %} +
未选择文档时,Agent 会按问题检索当前知识库。
+ {% endfor %} +
+
+
+ 默认检索知识库;聚焦输入框可选择文档范围。 +
-
- -
- {% if result %} -
- Agent 回答 -
{{ result.answer|linebreaksbr }}
-
- {% elif not conversation %} -
可以先不上传资料,直接询问注册法规、资料清单、模板字段或历史知识库内容。
- {% endif %}
-
+

节点式结果

{% if analysis_card or export_card or risk_card or notify_card %}
@@ -391,13 +778,17 @@
-
-
-

上传区

-

右侧保留资料包上传入口和当前会话的资料上下文。

+
+
通知状态
{{ workspace_summary.notify_status }}
- -
  • +
  • +
    导出状态
    {{ workspace_summary.export_status }}
    - -
  • +
  • +
    + - + {% endblock %}