Skip to content

Commit c34bbeb

Browse files
committed
feat: support experimental settings
1 parent 6c9f20f commit c34bbeb

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed

addons/settings/locales/zh-CN.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
"Enable Sticky Scroll#!settings.label.terminal.shell.stickyScroll": "启用黏性滚动",
2323
"Display the current command at the top of the terminal#!settings.comments.0.terminal.shell.stickyScroll": "在终端顶部显示当前命令",
2424
"Requires Shell Integration to be enabled#!settings.comments.1.terminal.shell.stickyScroll": "需要启用 Shell 集成",
25+
"Enable Zsh Capture Completion#!settings.label.terminal.shell.experimentalZshCaptureCompletion": "启用 Zsh 捕获补全",
26+
"Get completions from zsh pty session#!settings.comments.0.terminal.shell.experimentalZshCaptureCompletion": "从 zsh pty 会话获取补全",
27+
"Requires Shell Integration to be enabled#!settings.comments.1.terminal.shell.experimentalZshCaptureCompletion": "需要启用 Shell 集成",
2528
"External#!settings.group.terminal.external": "外部",
2629
"Open External Path In#!settings.label.terminal.external.openPathIn": "打开外部路径于",
2730
"Specify how to open external paths#!settings.comments.0.terminal.external.openPathIn": "指定如何打开外部路径",
@@ -116,5 +119,6 @@
116119
"List of enabled addon name#!settings.comments.0.terminal.addon.includes": "启用的附加功能名称列表",
117120
"Settings#!settings.1": "设置",
118121
"Configure Settings#!settings.2": "配置设置",
119-
"Select local font#!settings.3": "选择本地字体"
122+
"Select local font#!settings.3": "选择本地字体",
123+
"Experimental#!settings.4": "实验性"
120124
}

addons/settings/src/renderer/SettingsLine.vue

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ function pickFont(event: InputEvent) {
172172
<VisualIcon name="lucide-chevron-down" />
173173
</a>
174174
<span class="line-description">
175+
<span v-if="spec.experimental" v-i18n class="item-tag" @click.prevent>Experimental#!settings.4</span>
175176
<span v-i18n class="item-label" @click.prevent>{{ spec.label }}#!settings.label.{{ spec.key }}</span>
176177
<span class="item-key" @click.prevent>{{ spec.key }}</span>
177178
<a v-if="isRecoverable" data-commas class="recover" @click.prevent="recover">
@@ -289,6 +290,17 @@ function pickFont(event: InputEvent) {
289290
font-style: italic;
290291
}
291292
}
293+
.item-tag {
294+
flex: none;
295+
align-self: center;
296+
padding: 4px 0.5em;
297+
color: white;
298+
font-size: 12px;
299+
line-height: 1em;
300+
text-transform: uppercase;
301+
background: rgb(var(--theme-red));
302+
border-radius: 1em;
303+
}
292304
.item-key {
293305
flex: none;
294306
margin-left: 8px;

src/types/settings.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export interface Settings {
1717
'terminal.shell.highlightErrors': boolean,
1818
'terminal.shell.autoCompletion': boolean,
1919
'terminal.shell.stickyScroll': boolean,
20+
'terminal.shell.captureCompletion': boolean,
2021
'terminal.external.openPathIn': 'new-tab' | 'new-window',
2122
'terminal.external.explorer': string,
2223
'terminal.external.remoteExplorer': string,
@@ -55,4 +56,5 @@ export interface SettingsSpec {
5556
reload?: boolean,
5657
overrides?: boolean,
5758
default?: any,
59+
experimental?: boolean,
5860
}

0 commit comments

Comments
 (0)