feat(terminal): 支持配置 shell 与 shellArgs,终端标题使用 shell 名 (#125)

- 支持通过 cordis.patch.yml 指定终端 shell
- 支持 shellArgs 带参启动终端 shell
- 终端标题改用 shell 名,内部使用 uuid 管理
This commit is contained in:
NuperAki authored and GitHub committed 2026-08-18 19:56:04 +08:00
1 parent 498528d2eb
commit c973d6ec1b
15 files changed
+193 -23

No files matched your search

+8
View File
@@ -37,10 +37,18 @@ describe('dsh-better-sidebar plugin export shape', () => {
// The terminal shell config defaults to auto-resolution (empty shell =
// the platform chain in defaultShell()).
expect(resolved.shell).toBe('')
// Shell args default to an empty list; non-empty values replace the
// automatic platform login flag.
expect(resolved.shellArgs).toEqual([])
const configured = (schema as unknown as {
(input: Record<string, unknown> | undefined): Record<string, unknown>
})({ shell: 'pwsh.exe' })
expect(configured.shell).toBe('pwsh.exe')
const configuredWithArgs = (schema as unknown as {
(input: Record<string, unknown> | undefined): Record<string, unknown>
})({ shell: '/bin/zsh', shellArgs: ['--noprofile', '--no-rc'] })
expect(configuredWithArgs.shell).toBe('/bin/zsh')
expect(configuredWithArgs.shellArgs).toEqual(['--noprofile', '--no-rc'])
})
it('registers the side card preferences schema with the documented defaults', async () => {