fix issues

This commit is contained in:
bracesproul
2025-03-13 17:52:37 -07:00
parent 130ed94a78
commit 70f94c8534
8 changed files with 30 additions and 8 deletions
-1
View File
@@ -2,5 +2,4 @@ node_modules
dist
.env
coverage
templates/**
index.js
+3 -3
View File
@@ -70,7 +70,7 @@ This will contain all of the required secrets the agent(s) need in order to run.
Finally, start the development servers. This command will start both the web, and LangGraph servers:
```bash
npm dev
npm run dev
# or
pnpm dev
# or
@@ -106,7 +106,7 @@ Web:
```bash
cd apps/web
npm dev
npm run dev
# or
pnpm dev
# or
@@ -118,7 +118,7 @@ LangGraph:
```bash
cd apps/agents
npm dev
npm run dev
# or
pnpm dev
# or
@@ -0,0 +1,24 @@
{
"extends": "@tsconfig/recommended",
"compilerOptions": {
"outDir": "./dist",
"rootDir": "./src",
"baseUrl": ".",
"target": "ES2021",
"lib": ["ES2021", "ES2022.Object", "DOM", "es2023"],
"module": "NodeNext",
"moduleResolution": "NodeNext",
"esModuleInterop": true,
"declaration": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"useDefineForClassFields": true,
"strictPropertyInitialization": false,
"allowJs": true,
"strict": true
},
"include": ["src/"],
"exclude": ["node_modules/", "dist"]
}
+1
View File
@@ -21,6 +21,7 @@
"@typescript-eslint/eslint-plugin": "^5.59.8",
"@eslint/eslintrc": "^3.1.0",
"@typescript-eslint/parser": "^5.59.8",
"@tsconfig/recommended": "^1.0.8",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-no-instanceof": "^1.0.1",
+1 -1
View File
@@ -71,7 +71,7 @@
"dotenv": "^16.4.7",
"turbo": "latest",
"eslint": "^9.19.0",
"eslint-config-next": "14.2.10",
"eslint-config-next": "15.2.2",
"eslint-plugin-react-hooks": "^5.0.0",
"eslint-plugin-react-refresh": "^0.4.18",
"globals": "^15.14.0",
@@ -131,7 +131,6 @@ async function respond(
): Promise<typeof AgentStateAnnotation.Update> {
const configuration = ensureAgentConfiguration(config);
const model = await loadChatModel(configuration.responseModel);
// @ts-ignore
const context = formatDocs(state.documents);
const prompt = configuration.responseSystemPrompt.replace(
"{context}",
@@ -70,7 +70,6 @@ export const AgentStateAnnotation = Annotation.Root({
Document[] | { [key: string]: any }[] | string[] | string | "delete"
>({
default: () => [],
// @ts-ignore
reducer: reduceDocs,
}),
+1 -1
View File
@@ -41,7 +41,7 @@ export function reduceDocs(
existingIds.add(itemId);
} else if (typeof item === "object") {
const metadata = (item as Document).metadata ?? {};
let itemId = metadata.uuid ?? uuidv4();
const itemId = metadata.uuid ?? uuidv4();
if (!existingIds.has(itemId)) {
if ("pageContent" in item) {