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