Skip to content
This repository was archived by the owner on Jun 24, 2025. It is now read-only.

Commit 6e0fee6

Browse files
committed
fix(llm): resolve tool lint errors
1 parent e0e1f07 commit 6e0fee6

File tree

3 files changed

+19
-6
lines changed

3 files changed

+19
-6
lines changed

apps/server/src/services/llm/tools/smart_retry_tool.ts

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export class SmartRetryTool implements ToolHandler {
6060
*/
6161
private generateBroaderTerms(query: string): string[] {
6262
const terms = query.toLowerCase().split(/\s+/);
63-
const broader = [];
63+
const broader: string[] = [];
6464

6565
// Single words from multi-word queries
6666
if (terms.length > 1) {
@@ -103,7 +103,7 @@ export class SmartRetryTool implements ToolHandler {
103103
'report': ['summary', 'document', 'findings', 'results']
104104
};
105105

106-
const synonyms = [];
106+
const synonyms: string[] = [];
107107
const queryLower = query.toLowerCase();
108108

109109
for (const [word, syns] of Object.entries(synonymMap)) {
@@ -131,7 +131,7 @@ export class SmartRetryTool implements ToolHandler {
131131
'notes': ['meeting notes', 'research notes', 'project notes']
132132
};
133133

134-
const narrower = [];
134+
const narrower: string[] = [];
135135
const queryLower = query.toLowerCase();
136136

137137
for (const [broad, narrowTerms] of Object.entries(narrowerMap)) {
@@ -155,7 +155,7 @@ export class SmartRetryTool implements ToolHandler {
155155
'meeting': ['agenda', 'minutes', 'action items', 'participants']
156156
};
157157

158-
const related = [];
158+
const related: string[] = [];
159159
const queryLower = query.toLowerCase();
160160

161161
for (const [concept, relatedTerms] of Object.entries(relatedMap)) {
@@ -237,7 +237,14 @@ export class SmartRetryTool implements ToolHandler {
237237
}
238238

239239
// Try each alternative
240-
const results = [];
240+
const results: Array<{
241+
query: string;
242+
success: boolean;
243+
count?: number;
244+
result?: any;
245+
message?: string;
246+
error?: string;
247+
}> = [];
241248
let successfulSearches = 0;
242249
let totalResults = 0;
243250

apps/server/src/services/llm/tools/tool_interfaces.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@ export interface ToolParameter {
3434
type: string;
3535
description: string;
3636
enum?: string[];
37+
default?: any;
38+
minimum?: number;
39+
maximum?: number;
40+
minItems?: number;
41+
maxItems?: number;
42+
properties?: Record<string, ToolParameter>;
3743
items?: ToolParameter | {
3844
type: string;
3945
properties?: Record<string, ToolParameter>;

apps/server/src/services/llm/tools/unified_search_tool.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export const unifiedSearchToolDefinition: Tool = {
3737
},
3838
filters: {
3939
type: 'object',
40-
description: 'Optional filters',
40+
description: 'Optional filters for search',
4141
properties: {
4242
parentNoteId: {
4343
type: 'string',

0 commit comments

Comments
 (0)