Skip to content

Commit b2e55a8

Browse files
magesh-presidioanand-presidio
authored andcommitted
fix: find files tool executes correctly when indexing is enabled (#164)
1 parent 87e7728 commit b2e55a8

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

.changeset/bright-clouds-drop.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"hai-build-code-generator": patch
3+
---
4+
5+
Resolved an issue where buildContextOptions was undefined, which caused useIndex to default to false. As a result, the find_relevant_tools custom tool prompt was not being rendered.This fix ensures buildContextOptions is properly initialized before being accessed, restoring expected behavior in the tool selection flow.

src/core/controller/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,7 @@ export class Controller {
245245
enableCheckpointsSetting ?? true,
246246
customInstructions,
247247
expertPrompt,
248+
buildContextOptions,
248249
task,
249250
images,
250251
historyItem,

src/core/task/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ export class Task {
206206
enableCheckpointsSetting: boolean,
207207
customInstructions?: string,
208208
expertPrompt?: string,
209+
buildContextOptions?: HaiBuildContextOptions,
209210
task?: string,
210211
images?: string[],
211212
historyItem?: HistoryItem,
@@ -235,6 +236,7 @@ export class Task {
235236
// HAI variable initialization
236237
this.task = task
237238
this.expertPrompt = expertPrompt
239+
this.buildContextOptions = buildContextOptions
238240
this.apiConfiguration = apiConfiguration
239241
this.embeddingConfiguration = embeddingConfiguration
240242

0 commit comments

Comments
 (0)