qwen-code/packages/core/src/telemetry/telemetry-utils.ts
tanzhenxin 9824e395a8 refactor(core): rename read_file parameter from absolute_path to file_path
This unifies the parameter naming convention across file-related tools
(edit, write_file, read_file) to consistently use file_path.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-20 11:05:47 +08:00

17 lines
425 B
TypeScript

/**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { getLanguageFromFilePath } from '../utils/language-detection.js';
export function getProgrammingLanguage(
args: Record<string, unknown>,
): string | undefined {
const filePath = args['file_path'] || args['path'];
if (typeof filePath === 'string') {
return getLanguageFromFilePath(filePath);
}
return undefined;
}