mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-04 20:00:00 +08:00
fix: not using system default terminal on deepin (#9527)
* fix: not using system default terminal on deepin deepin-terminal is not in the `linuxTerminals` list, that will cause xterm picked as the terminal to run code tool, which has compatibility with Chinese charaters. see: https://bbs.deepin.org.cn/post/290948 Signed-off-by: Hualet Wang <mr.asianwang@gmail.com> * feat(codetool): add support for deepin-terminal --------- Signed-off-by: Hualet Wang <mr.asianwang@gmail.com> Co-authored-by: GeorgeDong32 <GeorgeDong32@qq.com>
This commit is contained in:
parent
f95b9cef77
commit
8240493685
@ -421,7 +421,7 @@ end tell`
|
||||
const envPrefix = buildEnvPrefix(false)
|
||||
const command = envPrefix ? `${envPrefix} && ${baseCommand}` : baseCommand
|
||||
|
||||
const linuxTerminals = ['gnome-terminal', 'konsole', 'xterm', 'x-terminal-emulator']
|
||||
const linuxTerminals = ['gnome-terminal', 'konsole', 'deepin-terminal', 'xterm', 'x-terminal-emulator']
|
||||
let foundTerminal = 'xterm' // Default to xterm
|
||||
|
||||
for (const terminal of linuxTerminals) {
|
||||
@ -448,6 +448,9 @@ end tell`
|
||||
} else if (foundTerminal === 'konsole') {
|
||||
terminalCommand = 'konsole'
|
||||
terminalArgs = ['--workdir', directory, '-e', 'bash', '-c', `clear && ${command}; exec bash`]
|
||||
} else if (foundTerminal === 'deepin-terminal') {
|
||||
terminalCommand = 'deepin-terminal'
|
||||
terminalArgs = ['-w', directory, '-e', 'bash', '-c', `clear && ${command}; exec bash`]
|
||||
} else {
|
||||
// Default to xterm
|
||||
terminalCommand = 'xterm'
|
||||
|
||||
Loading…
Reference in New Issue
Block a user