Sync upstream Gemini-CLI v0.8.2 (#838)

This commit is contained in:
tanzhenxin
2025-10-23 09:27:04 +08:00
committed by GitHub
parent 096fabb5d6
commit eb95c131be
644 changed files with 70389 additions and 23709 deletions

View File

@@ -0,0 +1,22 @@
/**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
/**
* Computes the window title for the Gemini CLI application.
*
* @param folderName - The name of the current folder/workspace to display in the title
* @returns The computed window title, either from CLI_TITLE environment variable or the default Gemini title
*/
export function computeWindowTitle(folderName: string): string {
const title = process.env['CLI_TITLE'] || `Qwen - ${folderName}`;
// Remove control characters that could cause issues in terminal titles
return title.replace(
// eslint-disable-next-line no-control-regex
/[\x00-\x1F\x7F]/g,
'',
);
}