| | |
| | | <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(); |
| | |
| | | const res = await agentApi.RestartSupervisorPrompt(); |
| | | }; |
| | | |
| | | const { copyText } = commonFunction(); |
| | | |
| | | const copyInfo = async (item) => { |
| | | copyText(item); |
| | | }; |
| | | onMounted(() => { |
| | | getGlobalPrompt(); |
| | | }); |