mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-19 09:33:53 +00:00
fix: Honor DEBUG and CLI_TITLE environment variables (#3560)
This commit is contained in:
committed by
GitHub
parent
c0940a194e
commit
2ed1b378cb
@@ -222,7 +222,12 @@ export async function main() {
|
||||
|
||||
function setWindowTitle(title: string, settings: LoadedSettings) {
|
||||
if (!settings.merged.hideWindowTitle) {
|
||||
process.stdout.write(`\x1b]2; Gemini - ${title} \x07`);
|
||||
const windowTitle = (process.env.CLI_TITLE || `Gemini - ${title}`).replace(
|
||||
// eslint-disable-next-line no-control-regex
|
||||
/[\x00-\x1F\x7F]/g,
|
||||
'',
|
||||
);
|
||||
process.stdout.write(`\x1b]2;${windowTitle}\x07`);
|
||||
|
||||
process.on('exit', () => {
|
||||
process.stdout.write(`\x1b]2;\x07`);
|
||||
|
||||
Reference in New Issue
Block a user