Skip to content

Commit 4be1027

Browse files
committed
fix: update tool status display and add localization for inactive tools
1 parent 46152d3 commit 4be1027

File tree

3 files changed

+21
-3
lines changed

3 files changed

+21
-3
lines changed

dashboard/src/components/shared/PersonaQuickPreview.vue

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,20 @@
3535
<div v-for="tool in resolvedTools" v-else :key="tool.name" class="tool-item">
3636
<v-chip
3737
size="small"
38-
color="primary"
38+
:color="tool.active === false ? 'warning' : 'primary'"
3939
variant="outlined"
4040
label
4141
>
4242
{{ tool.name }}
4343
</v-chip>
44+
<v-tooltip v-if="tool.active === false" location="top">
45+
<template v-slot:activator="{ props: tooltipProps }">
46+
<small class="text-warning tool-inactive" v-bind="tooltipProps">
47+
{{ tm('personaQuickPreview.toolInactive') }}
48+
</small>
49+
</template>
50+
{{ tm('personaQuickPreview.toolInactiveTooltip') }}
51+
</v-tooltip>
4452
<small v-if="tool.origin || tool.origin_name" class="text-grey tool-meta">
4553
<span v-if="tool.origin">{{ tm('personaQuickPreview.originLabel') }}: {{ tool.origin }}</span>
4654
<span v-if="tool.origin_name"> | {{ tm('personaQuickPreview.originNameLabel') }}: {{ tool.origin_name }}</span>
@@ -117,7 +125,8 @@ const resolvedTools = computed(() =>
117125
return {
118126
name: toolName,
119127
origin: meta.origin || '',
120-
origin_name: meta.origin_name || ''
128+
origin_name: meta.origin_name || '',
129+
active: meta.active
121130
}
122131
})
123132
)
@@ -134,7 +143,8 @@ async function loadToolsMeta() {
134143
}
135144
nextMap[tool.name] = {
136145
origin: tool.origin || '',
137-
origin_name: tool.origin_name || ''
146+
origin_name: tool.origin_name || '',
147+
active: tool.active
138148
}
139149
}
140150
toolMetaMap.value = nextMap
@@ -279,6 +289,10 @@ onBeforeUnmount(() => {
279289
font-size: 0.74rem;
280290
}
281291
292+
.tool-inactive {
293+
font-size: 0.74rem;
294+
}
295+
282296
@media (max-width: 600px) {
283297
.tools-wrap {
284298
max-height: 120px;

dashboard/src/i18n/locales/en-US/core/shared.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@
7272
"skillsLabel": "Skills",
7373
"originLabel": "Origin",
7474
"originNameLabel": "Origin Name",
75+
"toolInactive": "Disabled",
76+
"toolInactiveTooltip": "This tool is disabled. Re-enable it in Extensions -> Handlers -> Function Tools.",
7577
"allTools": "All tools available",
7678
"allToolsWithCount": "All tools available ({count})",
7779
"noTools": "No tools configured",

dashboard/src/i18n/locales/zh-CN/core/shared.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@
7272
"skillsLabel": "技能(Skills)",
7373
"originLabel": "来源",
7474
"originNameLabel": "来源名称",
75+
"toolInactive": "已禁用",
76+
"toolInactiveTooltip": "该工具已被禁用。在插件->管理行为->函数工具中重新启用。",
7577
"allTools": "全部工具可用",
7678
"allToolsWithCount": "全部工具可用({count})",
7779
"noTools": "未配置工具",

0 commit comments

Comments
 (0)