You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This discussion was converted from issue #1906 on November 07, 2026 12:24.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
DISCLAIMER: 这个issue是我用AI生成的。
现状
/vim的开关是会话级、仅内存的:开启后输入框显示INSERT徽标,Esc进NORMAL,但每次重启 dsh-TUI 都要重新敲一次/vim。这不是遗漏,PR #583 的说明里写得很清楚:
实现上也确实只活在组件状态里:
PromptInput的局部 state(vimEnabled/vimInsert),没有任何写盘动作;promptDraftCache的vimEnabled快照带回来,仍是进程内存,重启即失;lib/settings.json的 schema 里没有任何vim键,~/.dsh-tui/settings.json也不会记它;为什么想要它
我用 vim 键位编辑输入框(而不是只按
Esc切模式),每次开会话先敲/vim这一步纯粹是摩擦;同一个 profile 里/theme、/lang这类开关都能留住,vim 却留不住。提案
把「vim 模式是否开启」做成可持久化的启动选项,默认关闭(保持现行为),开启后新会话直接可
Esc:lib/settings.json的 schema 里加一个布尔键,建议input.vim(或shortcuts.vim),group放shortcuts,restartRequired: false;PromptInput挂载时用它做vimEnabled初值;/vim仍然可以就地切换,并且写穿到~/.dsh-tui/settings.json,与/settings的自动保存行为一致(参考/theme落盘~/.dsh-tui/theme.json的既有做法);INSERT,与现在/vim每次 toggle 都回 INSERT 的约定一致 —— 持久化只记「开/关」,不记「上次停在 NORMAL」。可接受的替代实现
只要能在启动时读到,落点无所谓:
vim: true(和fullscreen/lang同级);~/.dsh-tui/vim.json,对齐theme.json/lang.json;DSH_TUI_VIM=1,作为一次性覆盖。验收
INSERT徽标,Esc可进NORMAL;/vim关掉后再重开,仍保持关闭;/vim时不再需要重启即可生效(与现状一致)。环境
dsh-tui 0.18.0(
@deepseek-harness-tui/dsh-tui),Linux,profiletui。All reactions