fix(llm): resolve tool lint errors

This commit is contained in:
perf3ct
2025-06-19 16:13:28 +00:00
parent e0e1f0796b
commit 6e0fee6cb3
3 changed files with 19 additions and 6 deletions

View File

@@ -60,7 +60,7 @@ export class SmartRetryTool implements ToolHandler {
*/
private generateBroaderTerms(query: string): string[] {
const terms = query.toLowerCase().split(/\s+/);
const broader = [];
const broader: string[] = [];
// Single words from multi-word queries
if (terms.length > 1) {
@@ -103,7 +103,7 @@ export class SmartRetryTool implements ToolHandler {
'report': ['summary', 'document', 'findings', 'results']
};
const synonyms = [];
const synonyms: string[] = [];
const queryLower = query.toLowerCase();
for (const [word, syns] of Object.entries(synonymMap)) {
@@ -131,7 +131,7 @@ export class SmartRetryTool implements ToolHandler {
'notes': ['meeting notes', 'research notes', 'project notes']
};
const narrower = [];
const narrower: string[] = [];
const queryLower = query.toLowerCase();
for (const [broad, narrowTerms] of Object.entries(narrowerMap)) {
@@ -155,7 +155,7 @@ export class SmartRetryTool implements ToolHandler {
'meeting': ['agenda', 'minutes', 'action items', 'participants']
};
const related = [];
const related: string[] = [];
const queryLower = query.toLowerCase();
for (const [concept, relatedTerms] of Object.entries(relatedMap)) {
@@ -237,7 +237,14 @@ export class SmartRetryTool implements ToolHandler {
}
// Try each alternative
const results = [];
const results: Array<{
query: string;
success: boolean;
count?: number;
result?: any;
message?: string;
error?: string;
}> = [];
let successfulSearches = 0;
let totalResults = 0;

View File

@@ -34,6 +34,12 @@ export interface ToolParameter {
type: string;
description: string;
enum?: string[];
default?: any;
minimum?: number;
maximum?: number;
minItems?: number;
maxItems?: number;
properties?: Record<string, ToolParameter>;
items?: ToolParameter | {
type: string;
properties?: Record<string, ToolParameter>;

View File

@@ -37,7 +37,7 @@ export const unifiedSearchToolDefinition: Tool = {
},
filters: {
type: 'object',
description: 'Optional filters',
description: 'Optional filters for search',
properties: {
parentNoteId: {
type: 'string',