fix: ambiguous literals (#461)

This commit is contained in:
Mingholy
2025-08-27 15:23:21 +08:00
committed by GitHub
parent 009e083b73
commit 347e606366
9 changed files with 13 additions and 12 deletions

View File

@@ -438,7 +438,7 @@ Arguments passed directly when running the CLI can override other configurations
- `auto_edit`: Automatically approve edit tools (replace, write_file) while prompting for others - `auto_edit`: Automatically approve edit tools (replace, write_file) while prompting for others
- `yolo`: Automatically approve all tool calls (equivalent to `--yolo`) - `yolo`: Automatically approve all tool calls (equivalent to `--yolo`)
- Cannot be used together with `--yolo`. Use `--approval-mode=yolo` instead of `--yolo` for the new unified approach. - Cannot be used together with `--yolo`. Use `--approval-mode=yolo` instead of `--yolo` for the new unified approach.
- Example: `gemini --approval-mode auto_edit` - Example: `qwen --approval-mode auto_edit`
- **`--telemetry`**: - **`--telemetry`**:
- Enables [telemetry](../telemetry.md). - Enables [telemetry](../telemetry.md).
- **`--telemetry-target`**: - **`--telemetry-target`**:

View File

@@ -89,7 +89,7 @@ The verbose output is formatted to clearly identify the source of the logs:
``` ```
--- TEST: <log dir>:<test-name> --- --- TEST: <log dir>:<test-name> ---
... output from the gemini command ... ... output from the qwen command ...
--- END TEST: <log dir>:<test-name> --- --- END TEST: <log dir>:<test-name> ---
``` ```

View File

@@ -218,7 +218,7 @@ export async function parseArguments(): Promise<CliArgs> {
.option('proxy', { .option('proxy', {
type: 'string', type: 'string',
description: description:
'Proxy for gemini client, like schema://user:password@host:port', 'Proxy for qwen client, like schema://user:password@host:port',
}) })
.option('include-directories', { .option('include-directories', {
type: 'array', type: 'array',

View File

@@ -88,7 +88,7 @@ export function IdeIntegrationNudge({
<Box marginBottom={1} flexDirection="column"> <Box marginBottom={1} flexDirection="column">
<Text> <Text>
<Text color="yellow">{'> '}</Text> <Text color="yellow">{'> '}</Text>
{`Do you want to connect ${ideName ?? 'your'} editor to Gemini CLI?`} {`Do you want to connect ${ideName ?? 'your'} editor to Qwen Code?`}
</Text> </Text>
<Text dimColor>{installText}</Text> <Text dimColor>{installText}</Text>
</Box> </Box>

View File

@@ -130,7 +130,7 @@ export const ideCommand = (config: Config | null): SlashCommand | null => {
({ ({
type: 'message', type: 'message',
messageType: 'error', messageType: 'error',
content: `IDE integration is not supported in your current environment. To use this feature, run Gemini CLI in one of these supported IDEs: ${Object.values( content: `IDE integration is not supported in your current environment. To use this feature, run Qwen Code in one of these supported IDEs: ${Object.values(
DetectedIde, DetectedIde,
) )
.map((ide) => getIdeInfo(ide).displayName) .map((ide) => getIdeInfo(ide).displayName)

View File

@@ -146,7 +146,7 @@ describe('mcpCommand', () => {
type: 'message', type: 'message',
messageType: 'info', messageType: 'info',
content: content:
'No MCP servers configured. Please view MCP documentation in your browser: https://goo.gle/gemini-cli-docs-mcp or use the cli /docs command', 'No MCP servers configured. Please view MCP documentation in your browser: https://qwenlm.github.io/qwen-code-docs/en/tools/mcp-server/#how-to-set-up-your-mcp-server or use the cli /docs command',
}); });
}); });
}); });

View File

@@ -58,7 +58,8 @@ const getMcpStatus = async (
const blockedMcpServers = config.getBlockedMcpServers() || []; const blockedMcpServers = config.getBlockedMcpServers() || [];
if (serverNames.length === 0 && blockedMcpServers.length === 0) { if (serverNames.length === 0 && blockedMcpServers.length === 0) {
const docsUrl = 'https://goo.gle/gemini-cli-docs-mcp'; const docsUrl =
'https://qwenlm.github.io/qwen-code-docs/en/tools/mcp-server/#how-to-set-up-your-mcp-server';
return { return {
type: 'message', type: 'message',
messageType: 'info', messageType: 'info',

View File

@@ -136,7 +136,7 @@ function buildImage(imageName, dockerfile) {
if (isWindows) { if (isWindows) {
// PowerShell doesn't support <() process substitution. // PowerShell doesn't support <() process substitution.
// Create a temporary auth file that we will clean up after. // Create a temporary auth file that we will clean up after.
tempAuthFile = join(os.tmpdir(), `gemini-auth-${Date.now()}.json`); tempAuthFile = join(os.tmpdir(), `qwen-auth-${Date.now()}.json`);
writeFileSync(tempAuthFile, '{}'); writeFileSync(tempAuthFile, '{}');
buildCommandArgs = `--authfile="${tempAuthFile}"`; buildCommandArgs = `--authfile="${tempAuthFile}"`;
} else { } else {

View File

@@ -5,7 +5,7 @@ set -euo pipefail
# Determine the project directory # Determine the project directory
PROJECT_DIR=$(cd "$(dirname "$0")/.." && pwd) PROJECT_DIR=$(cd "$(dirname "$0")/.." && pwd)
ALIAS_COMMAND="alias gemini='node "${PROJECT_DIR}/scripts/start.js"'" ALIAS_COMMAND="alias qwen='node "${PROJECT_DIR}/scripts/start.js"'"
# Detect shell and set config file path # Detect shell and set config file path
if [[ "${SHELL}" == *"/bash" ]]; then if [[ "${SHELL}" == *"/bash" ]]; then
@@ -22,8 +22,8 @@ echo " ${ALIAS_COMMAND}"
echo "" echo ""
# Check if the alias already exists # Check if the alias already exists
if grep -q "alias gemini=" "${CONFIG_FILE}"; then if grep -q "alias qwen=" "${CONFIG_FILE}"; then
echo "A 'gemini' alias already exists in ${CONFIG_FILE}. No changes were made." echo "A 'qwen' alias already exists in ${CONFIG_FILE}. No changes were made."
exit 0 exit 0
fi fi
@@ -33,7 +33,7 @@ if [[ "${REPLY}" =~ ^[Yy]$ ]]; then
echo "${ALIAS_COMMAND}" >> "${CONFIG_FILE}" echo "${ALIAS_COMMAND}" >> "${CONFIG_FILE}"
echo "" echo ""
echo "Alias added to ${CONFIG_FILE}." echo "Alias added to ${CONFIG_FILE}."
echo "Please run 'source ${CONFIG_FILE}' or open a new terminal to use the 'gemini' command." echo "Please run 'source ${CONFIG_FILE}' or open a new terminal to use the 'qwen' command."
else else
echo "Aborted. No changes were made." echo "Aborted. No changes were made."
fi fi