Commit e3c00c45 by Liu

fix:工单分割线每次提问都展示

parent 5b51f76d
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
flex: 1 1; flex: 1 1;
height: 100%; height: 100%;
width: 100%; width: 100%;
max-width: calc(100vw - 120px); // max-width: calc(100vw - 120px);
position: relative; position: relative;
box-sizing: border-box; box-sizing: border-box;
// padding: 0 12px; // padding: 0 12px;
......
...@@ -357,7 +357,10 @@ export const TacticsChat: React.FC = () => { ...@@ -357,7 +357,10 @@ export const TacticsChat: React.FC = () => {
// 分割线应该显示在已有对话记录之后、新记录之前 // 分割线应该显示在已有对话记录之后、新记录之前
// 渲染时使用 divider.index === index + 1 来匹配,所以分割线的 index 应该是新记录的位置 // 渲染时使用 divider.index === index + 1 来匹配,所以分割线的 index 应该是新记录的位置
// 判断 allItems 中是否存在除了 system 之外的记录(user 或 ai) // 判断 allItems 中是否存在除了 system 之外的记录(user 或 ai)
if (isReanalyze) { // 场景1: 重新分析时显示分割线
// 场景2: orderMeta 场景下,有历史记录且自动调用时也显示分割线
const shouldCreateDivider = isReanalyze || (orderMeta && hasHistory === true && !question)
if (shouldCreateDivider) {
const hasExistingRecords = allItems.some(item => item.role !== 'system') const hasExistingRecords = allItems.some(item => item.role !== 'system')
if (hasExistingRecords) { if (hasExistingRecords) {
// 基于当前 allItems 长度计算分割线位置 // 基于当前 allItems 长度计算分割线位置
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment