修改刷新按钮的位置
This commit is contained in:
parent
8d549d17e2
commit
cf16cff7cf
42
renderer/src/components/main-panel/chat/options/prompt.vue
Normal file
42
renderer/src/components/main-panel/chat/options/prompt.vue
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
<template>
|
||||||
|
<el-tooltip :content="t('context-length')" placement="top">
|
||||||
|
<div class="setting-button" @click="showContextLengthDialog = true">
|
||||||
|
<span class="iconfont icon-length"></span>
|
||||||
|
<span class="value-badge">{{ tabStorage.settings.contextLength }}</span>
|
||||||
|
</div>
|
||||||
|
</el-tooltip>
|
||||||
|
|
||||||
|
<!-- 上下文长度设置 - 改为滑块形式 -->
|
||||||
|
<el-dialog v-model="showContextLengthDialog" :title="t('context-length') + ' ' + tabStorage.settings.contextLength"
|
||||||
|
width="400px">
|
||||||
|
<div class="slider-container">
|
||||||
|
<el-slider v-model="tabStorage.settings.contextLength" :min="1" :max="99" :step="1" />
|
||||||
|
<div class="slider-tips">
|
||||||
|
<span> 1: {{ t('single-dialog') }}</span>
|
||||||
|
<span> >1: {{ t('multi-dialog') }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<template #footer>
|
||||||
|
<el-button @click="showContextLengthDialog = false">{{ t("cancel") }}</el-button>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { defineComponent, inject, ref } from 'vue';
|
||||||
|
import { useI18n } from 'vue-i18n';
|
||||||
|
import { ChatStorage } from '../chat';
|
||||||
|
|
||||||
|
const { t } = useI18n();
|
||||||
|
|
||||||
|
const tabStorage = inject('tabStorage') as ChatStorage;
|
||||||
|
|
||||||
|
const showContextLengthDialog = ref(false);
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.icon-length {
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
</style>
|
42
renderer/src/components/main-panel/chat/options/resource.vue
Normal file
42
renderer/src/components/main-panel/chat/options/resource.vue
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
<template>
|
||||||
|
<el-tooltip :content="t('context-length')" placement="top">
|
||||||
|
<div class="setting-button" @click="showContextLengthDialog = true">
|
||||||
|
<span class="iconfont icon-length"></span>
|
||||||
|
<span class="value-badge">{{ tabStorage.settings.contextLength }}</span>
|
||||||
|
</div>
|
||||||
|
</el-tooltip>
|
||||||
|
|
||||||
|
<!-- 上下文长度设置 - 改为滑块形式 -->
|
||||||
|
<el-dialog v-model="showContextLengthDialog" :title="t('context-length') + ' ' + tabStorage.settings.contextLength"
|
||||||
|
width="400px">
|
||||||
|
<div class="slider-container">
|
||||||
|
<el-slider v-model="tabStorage.settings.contextLength" :min="1" :max="99" :step="1" />
|
||||||
|
<div class="slider-tips">
|
||||||
|
<span> 1: {{ t('single-dialog') }}</span>
|
||||||
|
<span> >1: {{ t('multi-dialog') }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<template #footer>
|
||||||
|
<el-button @click="showContextLengthDialog = false">{{ t("cancel") }}</el-button>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { defineComponent, inject, ref } from 'vue';
|
||||||
|
import { useI18n } from 'vue-i18n';
|
||||||
|
import { ChatStorage } from '../chat';
|
||||||
|
|
||||||
|
const { t } = useI18n();
|
||||||
|
|
||||||
|
const tabStorage = inject('tabStorage') as ChatStorage;
|
||||||
|
|
||||||
|
const showContextLengthDialog = ref(false);
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.icon-length {
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
</style>
|
@ -6,7 +6,6 @@
|
|||||||
<span class="iconfont icon-chat"></span>
|
<span class="iconfont icon-chat"></span>
|
||||||
提示词模块
|
提示词模块
|
||||||
</h2>
|
</h2>
|
||||||
<h3><code>prompts/list</code></h3>
|
|
||||||
|
|
||||||
<PromptTemplates :tab-id="props.tabId"></PromptTemplates>
|
<PromptTemplates :tab-id="props.tabId"></PromptTemplates>
|
||||||
|
|
||||||
|
@ -1,4 +1,12 @@
|
|||||||
<template>
|
<template>
|
||||||
|
<h3 class="resource-template">
|
||||||
|
<code>prompts/list</code>
|
||||||
|
<span
|
||||||
|
@click="reloadPrompts({ first: false })"
|
||||||
|
class="iconfont icon-restart"
|
||||||
|
></span>
|
||||||
|
</h3>
|
||||||
|
|
||||||
<div class="prompt-template-container-scrollbar">
|
<div class="prompt-template-container-scrollbar">
|
||||||
<el-scrollbar height="500px">
|
<el-scrollbar height="500px">
|
||||||
<div class="prompt-template-container">
|
<div class="prompt-template-container">
|
||||||
@ -15,14 +23,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
</div>
|
</div>
|
||||||
<div class="prompt-template-function-container">
|
|
||||||
<el-button
|
|
||||||
type="primary"
|
|
||||||
@click="reloadPrompts({ first: false })"
|
|
||||||
>
|
|
||||||
{{ t('refresh') }}
|
|
||||||
</el-button>
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
@ -6,8 +6,6 @@
|
|||||||
<span class="iconfont icon-tool"></span>
|
<span class="iconfont icon-tool"></span>
|
||||||
工具模块
|
工具模块
|
||||||
</h2>
|
</h2>
|
||||||
<h3><code>tools/list</code></h3>
|
|
||||||
|
|
||||||
<ToolList :tab-id="props.tabId"></ToolList>
|
<ToolList :tab-id="props.tabId"></ToolList>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,4 +1,12 @@
|
|||||||
<template>
|
<template>
|
||||||
|
<h3 class="resource-template">
|
||||||
|
<code>tools/list</code>
|
||||||
|
<span
|
||||||
|
class="iconfont icon-restart"
|
||||||
|
@click="reloadTools({ first: false })"
|
||||||
|
></span>
|
||||||
|
</h3>
|
||||||
|
|
||||||
<div class="tool-list-container-scrollbar">
|
<div class="tool-list-container-scrollbar">
|
||||||
<el-scrollbar height="500px">
|
<el-scrollbar height="500px">
|
||||||
<div class="tool-list-container">
|
<div class="tool-list-container">
|
||||||
@ -19,15 +27,6 @@
|
|||||||
<div>
|
<div>
|
||||||
<!-- resources/list -->
|
<!-- resources/list -->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="tool-list-function-container">
|
|
||||||
<el-button
|
|
||||||
type="primary"
|
|
||||||
@click="reloadTools({ first: false })"
|
|
||||||
>
|
|
||||||
{{ t('refresh') }}
|
|
||||||
</el-button>
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user