mirror of
https://github.com/hellodigua/ChatLab.git
synced 2026-10-25 17:54:34 +08:00
fix(settings): reorder nav, rename skillSettings key, fix SubTabs wrapping
- AISettingsTab: move 对话偏好 above 工具设置 in left nav to match content order - Rename i18n key skillSettings → chatPreferences across all locales and components; the section covers general chat preferences, not just skills - SubTabs: add whitespace-nowrap + shrink-0 to tab buttons and overflow-x-auto to horizontal container so labels never wrap at narrow desktop widths Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
0ae7ab0c18
commit
842866aff3
7 files changed
+18
-15
No files matched your search
@@ -153,6 +153,7 @@ watch(
|
||||
'flex items-center justify-between',
|
||||
bordered !== false ? 'border-b border-gray-200/50 dark:border-gray-800/50' : '',
|
||||
size === 'sm' ? 'px-3' : 'px-6',
|
||||
'overflow-x-auto',
|
||||
],
|
||||
]"
|
||||
>
|
||||
@@ -161,7 +162,7 @@ watch(
|
||||
v-for="tab in items"
|
||||
:key="tab.id"
|
||||
:ref="(el) => setTabRef(tab.id, el as HTMLElement)"
|
||||
class="flex items-center font-medium transition-colors"
|
||||
class="flex shrink-0 items-center whitespace-nowrap font-medium transition-colors"
|
||||
:class="[
|
||||
isVertical
|
||||
? 'justify-start gap-2 px-3 py-2 text-sm'
|
||||
|
||||
@@ -42,9 +42,9 @@ const enableAutoSkill = computed({
|
||||
})
|
||||
|
||||
const chartAutoModeOptions = computed(() => [
|
||||
{ label: t('settings.aiPrompt.skillSettings.chartAutoMode.explicit'), value: 'explicit' },
|
||||
{ label: t('settings.aiPrompt.skillSettings.chartAutoMode.suggest'), value: 'suggest' },
|
||||
{ label: t('settings.aiPrompt.skillSettings.chartAutoMode.aggressive'), value: 'aggressive' },
|
||||
{ label: t('settings.aiPrompt.chatPreferences.chartAutoMode.explicit'), value: 'explicit' },
|
||||
{ label: t('settings.aiPrompt.chatPreferences.chartAutoMode.suggest'), value: 'suggest' },
|
||||
{ label: t('settings.aiPrompt.chatPreferences.chartAutoMode.aggressive'), value: 'aggressive' },
|
||||
])
|
||||
|
||||
const chartAutoMode = computed({
|
||||
@@ -55,7 +55,9 @@ const chartAutoMode = computed({
|
||||
},
|
||||
})
|
||||
|
||||
const chartAutoModeHint = computed(() => t(`settings.aiPrompt.skillSettings.chartAutoMode.${chartAutoMode.value}Hint`))
|
||||
const chartAutoModeHint = computed(() =>
|
||||
t(`settings.aiPrompt.chatPreferences.chartAutoMode.${chartAutoMode.value}Hint`)
|
||||
)
|
||||
|
||||
const searchContextBefore = computed({
|
||||
get: () => aiGlobalSettings.value.searchContextBefore ?? 3,
|
||||
@@ -126,16 +128,16 @@ const maxToolResultPercent = computed({
|
||||
<div :ref="(el) => setPromptSectionRef('skill', el as HTMLElement | null)">
|
||||
<h4 class="mb-3 flex items-center gap-2 text-sm font-semibold text-gray-900 dark:text-white">
|
||||
<UIcon name="i-heroicons-bolt" class="h-4 w-4 text-amber-500" />
|
||||
{{ t('settings.aiPrompt.skillSettings.title') }}
|
||||
{{ t('settings.aiPrompt.chatPreferences.title') }}
|
||||
</h4>
|
||||
<div class="space-y-4 rounded-lg border border-gray-200 bg-gray-50 p-4 dark:border-gray-700 dark:bg-gray-800/50">
|
||||
<div class="flex items-center justify-between">
|
||||
<div class="flex-1 pr-4">
|
||||
<p class="text-sm font-medium text-gray-900 dark:text-white">
|
||||
{{ t('settings.aiPrompt.skillSettings.enableAutoSkill') }}
|
||||
{{ t('settings.aiPrompt.chatPreferences.enableAutoSkill') }}
|
||||
</p>
|
||||
<p class="text-xs text-gray-500 dark:text-gray-400">
|
||||
{{ t('settings.aiPrompt.skillSettings.enableAutoSkillDesc') }}
|
||||
{{ t('settings.aiPrompt.chatPreferences.enableAutoSkillDesc') }}
|
||||
</p>
|
||||
</div>
|
||||
<USwitch v-model="enableAutoSkill" />
|
||||
@@ -144,10 +146,10 @@ const maxToolResultPercent = computed({
|
||||
<div class="flex items-center justify-between">
|
||||
<div class="flex-1 pr-4">
|
||||
<p class="text-sm font-medium text-gray-900 dark:text-white">
|
||||
{{ t('settings.aiPrompt.skillSettings.chartAutoMode.title') }}
|
||||
{{ t('settings.aiPrompt.chatPreferences.chartAutoMode.title') }}
|
||||
</p>
|
||||
<p class="text-xs text-gray-500 dark:text-gray-400">
|
||||
{{ t('settings.aiPrompt.skillSettings.chartAutoMode.description') }}
|
||||
{{ t('settings.aiPrompt.chatPreferences.chartAutoMode.description') }}
|
||||
</p>
|
||||
</div>
|
||||
<div class="flex flex-col items-end gap-1">
|
||||
|
||||
@@ -21,8 +21,8 @@ const emit = defineEmits<{
|
||||
const navItems = computed(() => [
|
||||
{ id: 'model', label: t('settings.tabs.aiConfig') },
|
||||
{ id: 'defaultModel', label: t('settings.tabs.aiDefaultModel') },
|
||||
{ id: 'skill', label: t('settings.aiPrompt.chatPreferences.title') },
|
||||
{ id: 'chat', label: t('settings.aiPrompt.chatSettings.title') },
|
||||
{ id: 'skill', label: t('settings.aiPrompt.skillSettings.title') },
|
||||
{ id: 'compression', label: t('settings.aiPrompt.compression.title') },
|
||||
{ id: 'preprocess', label: t('settings.tabs.aiPreprocess') },
|
||||
{ id: 'sessionIndex', label: t('settings.tabs.sessionManage') },
|
||||
|
||||
@@ -298,7 +298,7 @@
|
||||
"exportSettings": {
|
||||
"title": "Export Settings"
|
||||
},
|
||||
"skillSettings": {
|
||||
"chatPreferences": {
|
||||
"title": "Conversation Preferences",
|
||||
"enableAutoSkill": "AI Auto-Select Skills",
|
||||
"enableAutoSkillDesc": "When enabled, AI will automatically match and activate suitable analysis skills based on user queries; when disabled, skills only take effect when manually selected",
|
||||
|
||||
@@ -298,7 +298,7 @@
|
||||
"exportSettings": {
|
||||
"title": "エクスポート設定"
|
||||
},
|
||||
"skillSettings": {
|
||||
"chatPreferences": {
|
||||
"title": "会話設定",
|
||||
"enableAutoSkill": "AI 自動スキル選択",
|
||||
"enableAutoSkillDesc": "有効にすると、AI がユーザーの質問に基づいて適切な分析スキルを自動的にマッチして有効化します。無効にすると、手動で選択した場合のみスキルが適用されます",
|
||||
|
||||
@@ -298,7 +298,7 @@
|
||||
"exportSettings": {
|
||||
"title": "导出设置"
|
||||
},
|
||||
"skillSettings": {
|
||||
"chatPreferences": {
|
||||
"title": "对话偏好",
|
||||
"enableAutoSkill": "AI 自主选择技能",
|
||||
"enableAutoSkillDesc": "启用后,AI 会根据用户的问题自动匹配并激活合适的分析技能;关闭后仅在手动选择技能时生效",
|
||||
|
||||
@@ -298,7 +298,7 @@
|
||||
"exportSettings": {
|
||||
"title": "匯出設定"
|
||||
},
|
||||
"skillSettings": {
|
||||
"chatPreferences": {
|
||||
"title": "對話偏好",
|
||||
"enableAutoSkill": "AI 自主選擇技能",
|
||||
"enableAutoSkillDesc": "啟用後,AI 會根據使用者的問題自動匹配並啟用合適的分析技能;關閉後僅在手動選擇技能時生效",
|
||||
|
||||
Reference in new issue
Block a user