feat(frontend): add MCP config section and unify modal navigation styles
- Add dedicated MCP service configuration section in AgentEditorModal (agent mode only) - Unify sidebar nav hover/active states across settings and editor modals - Refine tool card and tag chip colors to use design tokens and color-mix - Tighten suggested questions button padding and border-radius
This commit is contained in:
@@ -108,8 +108,8 @@
|
|||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
width: auto;
|
width: auto;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 11px 14px;
|
padding: 8px 14px;
|
||||||
border-radius: 14px;
|
border-radius: 10px;
|
||||||
border: 1px solid var(--td-component-stroke);
|
border: 1px solid var(--td-component-stroke);
|
||||||
background: var(--td-bg-color-container);
|
background: var(--td-bg-color-container);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|||||||
@@ -893,7 +893,17 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- MCP 服务配置(仅 Agent 模式) -->
|
||||||
|
<div v-show="currentSection === 'mcp' && isAgentMode" class="section">
|
||||||
|
<div class="section-header">
|
||||||
|
<h2>{{ $t('agentEditor.mcp.label') }}</h2>
|
||||||
|
<p class="section-description">{{ $t('agentEditor.mcp.desc') }}</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="settings-group">
|
||||||
<!-- MCP 服务选择 -->
|
<!-- MCP 服务选择 -->
|
||||||
<div class="setting-row">
|
<div class="setting-row">
|
||||||
<div class="setting-info">
|
<div class="setting-info">
|
||||||
@@ -1842,6 +1852,7 @@ const navItems = computed(() => {
|
|||||||
// Agent 模式能力
|
// Agent 模式能力
|
||||||
if (isAgentMode.value) {
|
if (isAgentMode.value) {
|
||||||
items.push({ key: 'tools', icon: 'tools', label: t('agent.editor.toolsConfig') });
|
items.push({ key: 'tools', icon: 'tools', label: t('agent.editor.toolsConfig') });
|
||||||
|
items.push({ key: 'mcp', icon: 'server', label: t('agentEditor.mcp.label') });
|
||||||
}
|
}
|
||||||
if (isAgentMode.value && skillsAvailable.value) {
|
if (isAgentMode.value && skillsAvailable.value) {
|
||||||
items.push({ key: 'skills', icon: 'lightbulb', label: t('agent.editor.skillsConfig') });
|
items.push({ key: 'skills', icon: 'lightbulb', label: t('agent.editor.skillsConfig') });
|
||||||
@@ -1876,7 +1887,7 @@ const navGroups = computed(() => {
|
|||||||
{
|
{
|
||||||
key: 'capability',
|
key: 'capability',
|
||||||
label: t('agentEditor.navGroups.capability'),
|
label: t('agentEditor.navGroups.capability'),
|
||||||
items: pickItems(['multimodal', 'tools', 'skills']),
|
items: pickItems(['multimodal', 'tools', 'mcp', 'skills']),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'integration',
|
key: 'integration',
|
||||||
@@ -3910,12 +3921,12 @@ const handleSave = async () => {
|
|||||||
user-select: none;
|
user-select: none;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background-color: var(--td-bg-color-secondarycontainer-hover);
|
background-color: var(--td-bg-color-container-hover);
|
||||||
color: var(--td-text-color-primary);
|
color: var(--td-text-color-primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
&.active {
|
&.active {
|
||||||
background-color: rgba(7, 192, 95, 0.1);
|
background-color: var(--td-bg-color-secondarycontainer);
|
||||||
color: var(--td-brand-color);
|
color: var(--td-brand-color);
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
@@ -4607,7 +4618,7 @@ const handleSave = async () => {
|
|||||||
|
|
||||||
&:hover:not(.tool-card--disabled) {
|
&:hover:not(.tool-card--disabled) {
|
||||||
border-color: var(--td-brand-color);
|
border-color: var(--td-brand-color);
|
||||||
background: var(--td-brand-color-1, rgba(0, 82, 217, 0.04));
|
background: var(--td-brand-color-1, rgba(7, 192, 95, 0.06));
|
||||||
}
|
}
|
||||||
|
|
||||||
// checkbox 的勾选框 + label 改造
|
// checkbox 的勾选框 + label 改造
|
||||||
@@ -4624,7 +4635,7 @@ const handleSave = async () => {
|
|||||||
|
|
||||||
&.t-is-checked {
|
&.t-is-checked {
|
||||||
border-color: var(--td-brand-color);
|
border-color: var(--td-brand-color);
|
||||||
background: var(--td-brand-color-1, rgba(0, 82, 217, 0.06));
|
background: var(--td-brand-color-1, rgba(7, 192, 95, 0.08));
|
||||||
}
|
}
|
||||||
|
|
||||||
&--disabled {
|
&--disabled {
|
||||||
@@ -4731,8 +4742,8 @@ const handleSave = async () => {
|
|||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
line-height: 18px;
|
line-height: 18px;
|
||||||
color: var(--td-brand-color);
|
color: var(--td-brand-color);
|
||||||
background: var(--td-brand-color-1, rgba(0, 82, 217, 0.08));
|
background: color-mix(in srgb, var(--td-brand-color) 10%, transparent);
|
||||||
border: 1px solid var(--td-brand-color-2, rgba(0, 82, 217, 0.16));
|
border: 1px solid color-mix(in srgb, var(--td-brand-color) 22%, transparent);
|
||||||
border-radius: 999px;
|
border-radius: 999px;
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1538,12 +1538,12 @@ watch(
|
|||||||
user-select: none;
|
user-select: none;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background-color: var(--td-bg-color-secondarycontainer-hover);
|
background-color: var(--td-bg-color-container-hover);
|
||||||
color: var(--td-text-color-primary);
|
color: var(--td-text-color-primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
&.active {
|
&.active {
|
||||||
background-color: rgba(7, 192, 95, 0.1);
|
background-color: var(--td-bg-color-secondarycontainer);
|
||||||
color: var(--td-brand-color);
|
color: var(--td-brand-color);
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -516,11 +516,12 @@ watch(() => props.mode, () => {
|
|||||||
color: var(--td-text-color-secondary);
|
color: var(--td-text-color-secondary);
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background: var(--td-bg-color-secondarycontainer);
|
background: var(--td-bg-color-container-hover);
|
||||||
|
color: var(--td-text-color-primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
&.active {
|
&.active {
|
||||||
background: var(--td-brand-color-light);
|
background: var(--td-bg-color-secondarycontainer);
|
||||||
color: var(--td-brand-color);
|
color: var(--td-brand-color);
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1713,13 +1713,13 @@ watch(currentSection, (section) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background: var(--td-bg-color-secondarycontainer-hover);
|
background: var(--td-bg-color-container-hover);
|
||||||
color: var(--td-text-color-primary);
|
color: var(--td-text-color-primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
&.active {
|
&.active {
|
||||||
background: var(--td-brand-color-light);
|
background: var(--td-bg-color-secondarycontainer);
|
||||||
color: @primary-color;
|
color: var(--td-brand-color);
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -580,12 +580,12 @@ onUnmounted(() => {
|
|||||||
user-select: none;
|
user-select: none;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background-color: var(--td-bg-color-secondarycontainer-hover);
|
background-color: var(--td-bg-color-container-hover);
|
||||||
color: var(--td-text-color-primary);
|
color: var(--td-text-color-primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
&.active {
|
&.active {
|
||||||
background-color: rgba(7, 192, 95, 0.1);
|
background-color: var(--td-bg-color-secondarycontainer);
|
||||||
color: var(--td-brand-color);
|
color: var(--td-brand-color);
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
@@ -629,12 +629,12 @@ onUnmounted(() => {
|
|||||||
user-select: none;
|
user-select: none;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background-color: var(--td-bg-color-secondarycontainer-hover);
|
background-color: var(--td-bg-color-container-hover);
|
||||||
color: var(--td-text-color-primary);
|
color: var(--td-text-color-primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
&.active {
|
&.active {
|
||||||
background-color: rgba(7, 192, 95, 0.08);
|
background-color: var(--td-bg-color-secondarycontainer);
|
||||||
color: var(--td-brand-color);
|
color: var(--td-brand-color);
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user