fix: update tool status display and add localization for inactive tools

This commit is contained in:
Soulter
2026-02-20 16:01:55 +08:00
parent 46152d3faf
commit 4be1027444
3 changed files with 21 additions and 3 deletions

View File

@@ -35,12 +35,20 @@
<div v-for="tool in resolvedTools" v-else :key="tool.name" class="tool-item">
<v-chip
size="small"
color="primary"
:color="tool.active === false ? 'warning' : 'primary'"
variant="outlined"
label
>
{{ tool.name }}
</v-chip>
<v-tooltip v-if="tool.active === false" location="top">
<template v-slot:activator="{ props: tooltipProps }">
<small class="text-warning tool-inactive" v-bind="tooltipProps">
{{ tm('personaQuickPreview.toolInactive') }}
</small>
</template>
{{ tm('personaQuickPreview.toolInactiveTooltip') }}
</v-tooltip>
<small v-if="tool.origin || tool.origin_name" class="text-grey tool-meta">
<span v-if="tool.origin">{{ tm('personaQuickPreview.originLabel') }}: {{ tool.origin }}</span>
<span v-if="tool.origin_name"> | {{ tm('personaQuickPreview.originNameLabel') }}: {{ tool.origin_name }}</span>
@@ -117,7 +125,8 @@ const resolvedTools = computed(() =>
return {
name: toolName,
origin: meta.origin || '',
origin_name: meta.origin_name || ''
origin_name: meta.origin_name || '',
active: meta.active
}
})
)
@@ -134,7 +143,8 @@ async function loadToolsMeta() {
}
nextMap[tool.name] = {
origin: tool.origin || '',
origin_name: tool.origin_name || ''
origin_name: tool.origin_name || '',
active: tool.active
}
}
toolMetaMap.value = nextMap
@@ -279,6 +289,10 @@ onBeforeUnmount(() => {
font-size: 0.74rem;
}
.tool-inactive {
font-size: 0.74rem;
}
@media (max-width: 600px) {
.tools-wrap {
max-height: 120px;

View File

@@ -72,6 +72,8 @@
"skillsLabel": "Skills",
"originLabel": "Origin",
"originNameLabel": "Origin Name",
"toolInactive": "Disabled",
"toolInactiveTooltip": "This tool is disabled. Re-enable it in Extensions -> Handlers -> Function Tools.",
"allTools": "All tools available",
"allToolsWithCount": "All tools available ({count})",
"noTools": "No tools configured",

View File

@@ -72,6 +72,8 @@
"skillsLabel": "技能Skills",
"originLabel": "来源",
"originNameLabel": "来源名称",
"toolInactive": "已禁用",
"toolInactiveTooltip": "该工具已被禁用。在插件->管理行为->函数工具中重新启用。",
"allTools": "全部工具可用",
"allToolsWithCount": "全部工具可用({count}",
"noTools": "未配置工具",