chore(types) - Fix type checks

This commit is contained in:
2026-04-14 16:47:20 +05:30
parent 5413f86d2b
commit 164747c255
10 changed files with 15 additions and 15 deletions
+1 -1
View File
@@ -42,7 +42,7 @@ export function createGraphExplorerTool(graph: Graph) {
if (nodeAttr.file) result += `- File: ${nodeAttr.file}\n`;
result += `\nConnected parts:\n`;
neighbors.forEach((neighbor) => {
neighbors.forEach((neighbor: string) => {
const attr = graph.getNodeAttributes(neighbor);
const edges = graph.edges(nodeId, neighbor);
const edgeAttr = graph.getEdgeAttributes(edges[0]);
+1 -1
View File
@@ -3,7 +3,7 @@
* Uses Ollama's reranker API to score documents against a query.
*/
import { RERANKER_MODEL } from "../constants";
import { RERANKER_MODEL } from "../constants.js";
const OLLAMA_HOST = process.env.OLLAMA_HOST || "http://localhost:11434";
+2 -2
View File
@@ -11,13 +11,13 @@ import {
createGetSectionContentTool,
createGraphExplorerTool,
createSearchSpecSectionsTool,
} from "./agent-tools";
} from "./agent-tools/index.js";
import {
CONFIG_FILE,
EMBEDDING_MODEL,
GRAPH_FILE,
STORAGE_DIR,
} from "./constants";
} from "./constants.js";
const embeddings = new OllamaEmbeddings({
model: EMBEDDING_MODEL,
+3 -3
View File
@@ -8,9 +8,9 @@ import { OllamaEmbeddings } from "@langchain/ollama";
import * as cheerio from "cheerio";
import { glob } from "glob";
import ora from "ora";
import { EMBEDDING_MODEL, SPEC_DIR, STORAGE_DIR } from "../constants";
import { HTMLTextSplitter } from "./text-splitters";
import { formatForIngestion } from "./utils/formatHTMLForIngestion";
import { EMBEDDING_MODEL, SPEC_DIR, STORAGE_DIR } from "../constants.js";
import { HTMLTextSplitter } from "./text-splitters/index.js";
import { formatForIngestion } from "./utils/formatHTMLForIngestion.js";
const embeddings = new OllamaEmbeddings({
model: EMBEDDING_MODEL,
@@ -1,6 +1,6 @@
import { describe, expect, test } from "bun:test";
import { Document } from "@langchain/core/documents";
import { HTMLTextSplitter } from "./index";
import { HTMLTextSplitter } from "./index.js";
describe("HTMLTextSplitter", () => {
test("keeps small HTML in a single chunk", async () => {
+1 -1
View File
@@ -1 +1 @@
export * from "./HtmlTextSplitter";
export * from "./HtmlTextSplitter.js";
@@ -9,7 +9,7 @@ import {
convertTablesToMarkdown,
DEFAULT_CONFIG,
formatForIngestion,
} from "./formatHTMLForIngestion";
} from "./formatHTMLForIngestion.js";
describe("formatHTMLForIngestion", () => {
describe("convertLinksToMarkdown", () => {
+3 -3
View File
@@ -13,8 +13,8 @@
import * as lancedbSdk from "@lancedb/lancedb";
import { OllamaEmbeddings } from "@langchain/ollama";
import { createSearchSpecSectionsTool } from "../../agent-tools";
import { EMBEDDING_MODEL, STORAGE_DIR } from "../../constants";
import { createSearchSpecSectionsTool } from "../../agent-tools/index.js";
import { EMBEDDING_MODEL, STORAGE_DIR } from "../../constants.js";
async function main() {
// Get query from command line or use default
@@ -43,7 +43,7 @@ async function main() {
console.log("✓ Tool created\n");
console.log("Executing tool...\n");
const result = await searchSpecSectionsTool.func({ query });
const result = await searchSpecSectionsTool({ query });
console.log("=== TOOL OUTPUT ===");
console.log(result);
+1 -1
View File
@@ -21,7 +21,7 @@ import type { Table } from "@lancedb/lancedb";
import * as lancedbSdk from "@lancedb/lancedb";
import { OllamaEmbeddings } from "@langchain/ollama";
import { Command } from "commander";
import { EMBEDDING_MODEL, STORAGE_DIR } from "../../constants";
import { EMBEDDING_MODEL, STORAGE_DIR } from "../../constants.js";
const embeddings = new OllamaEmbeddings({
model: EMBEDDING_MODEL,