Skip to content

Commit c932344

Browse files
committed
Fix type errors from main branch merge
The main branch code attempted to pass clientUserAgent to DirectContext.create/import and AugmentLanguageModel, but these APIs don't accept that parameter. Changes: - Removed clientUserAgent from DirectContext.create() call in indexer.ts - Removed clientUserAgent from DirectContext.import() calls in indexer.ts and search-client.ts - Removed clientUserAgent from AugmentLanguageModel config in cli-agent.ts The clientUserAgent is still stored in SearchClient and Indexer for future use, but is not passed to APIs that don't support it.
1 parent 81b4dbf commit c932344

File tree

3 files changed

+0
-4
lines changed

3 files changed

+0
-4
lines changed

src/clients/cli-agent.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,6 @@ async function loadModel(
192192
return new AugmentLanguageModel(modelName, {
193193
apiKey: credentials.apiKey,
194194
apiUrl: credentials.apiUrl,
195-
clientUserAgent,
196195
}) as unknown as LanguageModel;
197196
}
198197
default:

src/clients/search-client.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,6 @@ export class SearchClient {
169169
this.context = await DirectContext.import(this.state.contextState, {
170170
apiKey: this.apiKey,
171171
apiUrl: this.apiUrl,
172-
clientUserAgent: this.clientUserAgent,
173172
});
174173
}
175174

src/core/indexer.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,6 @@ export class Indexer {
198198
const context = await DirectContext.create({
199199
apiKey: this.apiKey,
200200
apiUrl: this.apiUrl,
201-
clientUserAgent: this.clientUserAgent,
202201
});
203202

204203
// Fetch all files from source
@@ -262,7 +261,6 @@ export class Indexer {
262261
const context = await DirectContext.import(previousState.contextState, {
263262
apiKey: this.apiKey,
264263
apiUrl: this.apiUrl,
265-
clientUserAgent: this.clientUserAgent,
266264
});
267265

268266
// Remove deleted files

0 commit comments

Comments
 (0)