mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-21 01:07:46 +00:00
Initial auto-fixing of linting errors.
- This is the result of runing `npm lint -- -fix`
This commit is contained in:
committed by
N. Taylor Mullen
parent
cb30351403
commit
e0339993ae
@@ -351,7 +351,7 @@ export class GrepTool extends BaseTool<GrepToolParams, GrepToolResult> {
|
||||
results.push({
|
||||
// Use relative path, or just the filename if it's in the base path itself
|
||||
filePath: relativeFilePath || path.basename(absoluteFilePath),
|
||||
lineNumber: lineNumber,
|
||||
lineNumber,
|
||||
line: lineContent, // Use the full extracted line content
|
||||
});
|
||||
}
|
||||
@@ -555,7 +555,7 @@ export class GrepTool extends BaseTool<GrepToolParams, GrepToolResult> {
|
||||
path.relative(absolutePath, fileAbsolutePath) ||
|
||||
path.basename(fileAbsolutePath),
|
||||
lineNumber: index + 1,
|
||||
line: line,
|
||||
line,
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
@@ -36,7 +36,7 @@ export class ReadFileTool extends BaseTool<
|
||||
ReadFileToolParams,
|
||||
ReadFileToolResult
|
||||
> {
|
||||
public static readonly Name: string = 'read_file';
|
||||
static readonly Name: string = 'read_file';
|
||||
|
||||
// Maximum number of lines to read by default
|
||||
private static readonly DEFAULT_MAX_LINES = 2000;
|
||||
|
||||
@@ -127,7 +127,7 @@ export class TerminalTool extends BaseTool<
|
||||
TerminalToolParams,
|
||||
TerminalToolResult
|
||||
> {
|
||||
public static Name: string = 'execute_bash_command';
|
||||
static Name: string = 'execute_bash_command';
|
||||
|
||||
private readonly rootDirectory: string;
|
||||
private readonly outputLimit: number;
|
||||
@@ -387,7 +387,7 @@ Use this tool for running build steps (\`npm install\`, \`make\`), linters (\`es
|
||||
const confirmationDetails: ToolExecuteConfirmationDetails = {
|
||||
title: 'Confirm Shell Command',
|
||||
command: params.command,
|
||||
rootCommand: rootCommand,
|
||||
rootCommand,
|
||||
description: `Execute in '${this.currentCwd}':\n${description}`,
|
||||
onConfirm: async (outcome: ToolConfirmationOutcome) => {
|
||||
if (outcome === ToolConfirmationOutcome.ProceedAlways) {
|
||||
|
||||
@@ -76,10 +76,10 @@ export abstract class BaseTool<
|
||||
* @param parameterSchema JSON Schema defining the parameters
|
||||
*/
|
||||
constructor(
|
||||
public readonly name: string,
|
||||
public readonly displayName: string,
|
||||
public readonly description: string,
|
||||
public readonly parameterSchema: Record<string, unknown>,
|
||||
readonly name: string,
|
||||
readonly displayName: string,
|
||||
readonly description: string,
|
||||
readonly parameterSchema: Record<string, unknown>,
|
||||
) {}
|
||||
|
||||
/**
|
||||
|
||||
@@ -37,7 +37,7 @@ export class WriteFileTool extends BaseTool<
|
||||
WriteFileToolParams,
|
||||
WriteFileToolResult
|
||||
> {
|
||||
public static readonly Name: string = 'write_file';
|
||||
static readonly Name: string = 'write_file';
|
||||
private shouldAlwaysWrite = false;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user