fix: linter cleanup on flow service implementations

Minor fixes from linter: readonly modifiers, unused parameter prefixes,
type narrowing in graph-rag BFS traversal and edge scoring.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
elpresidank 2026-04-05 22:52:40 -05:00
parent b6536eca38
commit 0042f9259c
7 changed files with 21 additions and 19 deletions

View file

@ -31,7 +31,7 @@ export class DocumentRag {
async query(
queryText: string,
options?: {
_options?: {
collection?: string;
streaming?: boolean;
chunkCallback?: ChunkCallback;

View file

@ -12,19 +12,19 @@
*/
import type {
RequestResponse,
TextCompletionRequest,
TextCompletionResponse,
EmbeddingsRequest,
EmbeddingsResponse,
GraphEmbeddingsRequest,
GraphEmbeddingsResponse,
TriplesQueryRequest,
TriplesQueryResponse,
PromptRequest,
PromptResponse,
RequestResponse,
Term,
TextCompletionRequest,
TextCompletionResponse,
Triple,
TriplesQueryRequest,
TriplesQueryResponse,
} from "@trustgraph/base";
export interface GraphRagConfig {
@ -87,9 +87,11 @@ export class GraphRag {
const scoredEdges = await this.scoreEdges(queryText, subgraph);
// Step 6: Synthesize answer
const answer = await this.synthesize(queryText, scoredEdges, options?.chunkCallback);
return answer;
return await this.synthesize(
queryText,
scoredEdges,
options?.chunkCallback
);
}
private async extractConcepts(query: string): Promise<string[]> {