wujingjing
2024-10-09 b0b31b379cfb6e57ffc14b3d8804256df25a1ac3
src/views/project/yw/systemManage/supervisorPrompt/SupervisorPrompt.vue
@@ -6,19 +6,23 @@
            <el-button :icon="Refresh" circle @click="refreshPrompt"></el-button>
         </div>
      </template>
      <div class="overflow-y-auto whitespace-pre">
      <div class="overflow-y-auto relative">
         <template v-for="(item, index) in promptPiece" :key="index">
            <Br v-if="item === ''" />
            <p v-else>{{ item }}</p>
            <pre class="pre-wrap" v-else>{{ item }}</pre>
         </template>
      </div>
   </el-card>
</template>
<script setup lang="ts">
import { Refresh } from '@element-plus/icons-vue';
import { onMounted, ref } from 'vue';
import * as agentApi from '/@/api/agent/';
import { Refresh } from '@element-plus/icons-vue';
import commonFunction from '/@/utils/commonFunction';
const promptPiece = ref([]);
const getGlobalPrompt = async () => {
   const res = await agentApi.GetGlobalSupervisorPrompt();
@@ -29,6 +33,11 @@
   const res = await agentApi.RestartSupervisorPrompt();
};
const { copyText } = commonFunction();
const copyInfo = async (item) => {
   copyText(item);
};
onMounted(() => {
   getGlobalPrompt();
});