feat(input): 精简输入栏版本控制与权限显示
- 版本控制按钮只显示「版本控制」,不再显示开/关状态 - 权限按钮去掉「权限:」前缀,右侧新增执行环境标签 (沙箱=次要色 / 完全访问=警示黄),仅在宿主机模式显示
This commit is contained in:
parent
794742e981
commit
5969d04c99
@ -390,7 +390,7 @@
|
|||||||
:disabled="!isConnected || streamingMessage"
|
:disabled="!isConnected || streamingMessage"
|
||||||
@click="$emit('open-versioning-dialog')"
|
@click="$emit('open-versioning-dialog')"
|
||||||
>
|
>
|
||||||
<span>版本控制:{{ versioningEnabled ? '开启' : '关闭' }}</span>
|
<span>版本控制</span>
|
||||||
</button>
|
</button>
|
||||||
<div class="permission-switcher__block">
|
<div class="permission-switcher__block">
|
||||||
<button
|
<button
|
||||||
@ -399,7 +399,13 @@
|
|||||||
:disabled="!isConnected"
|
:disabled="!isConnected"
|
||||||
@click="$emit('toggle-permission-menu')"
|
@click="$emit('toggle-permission-menu')"
|
||||||
>
|
>
|
||||||
<span>权限:{{ currentPermissionLabel }}</span>
|
<span>{{ currentPermissionLabel }}</span>
|
||||||
|
<span
|
||||||
|
v-if="executionModeEnabled"
|
||||||
|
class="permission-switcher__exec"
|
||||||
|
:class="{ 'permission-switcher__exec--warn': currentExecutionMode === 'direct' }"
|
||||||
|
>{{ currentExecutionShortLabel }}</span
|
||||||
|
>
|
||||||
<span class="permission-switcher__caret" :class="{ open: permissionMenuOpen }">›</span>
|
<span class="permission-switcher__caret" :class="{ open: permissionMenuOpen }">›</span>
|
||||||
</button>
|
</button>
|
||||||
<div
|
<div
|
||||||
@ -2746,11 +2752,11 @@ const currentPermissionLabel = computed(() => {
|
|||||||
return matched ? matched.label : props.currentPermissionMode;
|
return matched ? matched.label : props.currentPermissionMode;
|
||||||
});
|
});
|
||||||
|
|
||||||
const currentExecutionLabel = computed(() => {
|
const currentExecutionShortLabel = computed(() => {
|
||||||
const options = props.executionModeOptions || [];
|
const mode = String(props.currentExecutionMode || '');
|
||||||
const currentMode = String(props.currentExecutionMode || '');
|
if (mode === 'direct') return '完全访问';
|
||||||
const currentMatched = options.find((item) => item.value === currentMode);
|
if (mode === 'sandbox') return '沙箱';
|
||||||
return currentMatched ? currentMatched.label : currentMode;
|
return mode;
|
||||||
});
|
});
|
||||||
|
|
||||||
const modelContextWindow = computed(() => {
|
const modelContextWindow = computed(() => {
|
||||||
|
|||||||
@ -528,6 +528,14 @@ body[data-theme='light'] {
|
|||||||
transition: transform 0.18s ease;
|
transition: transform 0.18s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.permission-switcher__exec {
|
||||||
|
color: var(--text-secondary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.permission-switcher__exec--warn {
|
||||||
|
color: var(--state-warning);
|
||||||
|
}
|
||||||
|
|
||||||
.permission-switcher__caret.open {
|
.permission-switcher__caret.open {
|
||||||
transform: rotate(270deg);
|
transform: rotate(270deg);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user