zhangxiao
2024-08-30 3313467ddc324d3e19610142756423c8355dc82d
fix: 更新聊天展示
2个文件已修改
37 ■■■■■ 已修改文件
src/views/sessionManager/components/seniorAgentSession.vue 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/sessionManager/index.vue 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/sessionManager/components/seniorAgentSession.vue
@@ -364,7 +364,9 @@
            <!--                      <icon-file style="color: #0960bd" />-->
            <!--                    </a-avatar>-->
            <img :src="getIconByExtension(item.name)" alt="" />
            <div style="font-size: 12px">{{ item.textName }}</div>
            <div v-show="!item.onFileSelectedLoading" style="font-size: 12px">{{
              item.textName
            }}</div>
          </template>
        </a-comment>
        <icon-close-circle-fill
src/views/sessionManager/index.vue
@@ -291,18 +291,20 @@
                  />
                </template>
                <template #content>
                  <a-textarea
                    readonly
                    auto-size
                    v-model="displayedText"
                    :class="{ chatItemAnswer: theme === 'light' }"
                    :style="{
                      backgroundColor:
                        theme === 'light' ? '#ffffff' : '#000000',
                    }"
                    style="border: none"
                  >
                  </a-textarea>
                  <a-spin :loading="chartLoading" dot style="width: 100%">
                    <a-textarea
                      readonly
                      auto-size
                      v-model="displayedText"
                      :class="{ chatItemAnswer: theme === 'light' }"
                      :style="{
                        backgroundColor:
                          theme === 'light' ? '#ffffff' : '#000000',
                      }"
                      style="border: none"
                    >
                    </a-textarea>
                  </a-spin>
                </template>
                <template #actions>
@@ -574,6 +576,7 @@
  const modalObj = reactive({ add: false });
  const dialogId = ref('');
  const chatDis = ref(false);
  const chartLoading = ref(false);
  const loading = ref(false);
  const agentType = ref('1');
  const agentTitle = ref('未命名会话');
@@ -924,6 +927,7 @@
  const startChat = async (valMsg) => {
    chatDis.value = true;
    loading.value = true;
    chartLoading.value = true;
    toStop = false;
    sessionDetailList.value.push({
      content: valMsg,
@@ -967,6 +971,7 @@
          if (typeof d !== 'boolean') {
            // console.info("data:", d);
            streamStr.value = d.content;
            chartLoading.value = false;
            startDisplayStr();
          }
        } catch (e) {
@@ -975,6 +980,7 @@
        if (done) {
          console.info('done');
          displayedText.value = '';
          chartLoading.value = false;
          if (isStopChat.value) {
            setChatDataMeg(chatDataMeg);
          } else {
@@ -1426,6 +1432,9 @@
          margin-left: 10px;
        }
      }
      :deep(.arco-spin-loading .arco-spin-mask-icon) {
        left: 10%;
      }
    }
    .right {