mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-05-21 18:46:47 +00:00
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>
17 lines
425 B
TypeScript
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;
|
|
}
|