Skip to content

Postres index #1566

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open

Postres index #1566

wants to merge 2 commits into from

Conversation

pelikhan
Copy link
Member

@pelikhan pelikhan commented May 20, 2025

  • adding pg pgvector based index
  • instruction to launch local db / docker

High-Level Summary of Changes

  • ➕ Added PostgreSQL Vector Index Integration (pgvector)

    • Introduced pgvector as a new type of vector index for vector similarity search in the core library.
    • Created a Postgres-backed implementation of WorkspaceFileIndex leveraging the pgvector extension.
    • Updated public API in prompt_template.d.ts to include pgvector as a supported vector index type.
  • ⬆️ Dependency Updates

    • Updated several dependencies across multiple packages, including:
      • @modelcontextprotocol/sdk to ^1.11.4
      • zod to ^3.25.7
      • dompurify to ^3.2.6
      • es-toolkit to ^1.38.0
    • Added new dependencies: pg and pgvector for PostgreSQL integration.
  • 📄 Added New Module

    • Added pgvector.ts under packages/core/src to handle vector indexing with PostgreSQL.
  • 🔍 Enhanced Vector Search Capability

    • The core vectorsearch.ts now supports the pgvector-based implementation as an additional option alongside existing methods.
  • 🐛 Miscellaneous Improvements

    • Ensured code improvements around embedding calculations for better vector indexing and searching performance.

This PR primarily enhances the library's vector search capabilities with PostgreSQL support, alongside dependency upgrades for better compatibility and stability. 🚀

AI-generated content by pr-describe may be incorrect. Use reactions to eval.

Copy link
Contributor

LGTM 🚀

AI-generated content by pr-review may be incorrect. Use reactions to eval.

Copy link
Contributor

Linter: variable-names

No visible variables introduced or altered in this diff; therefore, no comments related to testing variable names are required.


Linter: stats

Here are the changes summarized in a table:

Change Type Count
Modified Files 19
Added Files 10
Deleted Lines 43
Added Lines 90
Total Line Changes 133

Linter: no-fix-mes

No FIXME comments detected in this diff.


Linter: grumpy-dev

Oh, the horror! Here's a grumpy commentary on the mess you've introduced:

  1. .devcontainer/devcontainer.json

    • You removed "vsls-contrib.gistfs". Why? Did your editor palette suddenly become allergic to useful extensions? At least comment on why it's gone.
  2. .github/workflows/*.yml Changes:

    • Absolute mayhem in your workflow files. You’re deleting and adding env variables like you’re redecorating a house—no clear rhyme or reason why these are shuffled.
    • Removed cron schedules (npm-check.yaml, licenses.yml). Was "consistency" an unfamiliar word today?
    • Committing to main, dev branches simultaneously for some files but not for others—why the inconsistency?
  3. .github/workflows/build-genai-commit.yml

    • Enjoyed ripping out half the Docker-related setup? Was ollama:start eating too much RAM? Warning: documentation or reasoning could reduce my rising blood pressure.
  4. .github/workflows/npm-check.yml

    • Rest in peace, cron: "0 4 * * *". Did automation offend particular moral principles? Explain somewhere.
  5. genaiscript.instructions.md

    • What’s this new runtime "node.js reimagined" spiel? Self-importance isn’t a substitute for actual elaboration.
  6. Deleted Lines Without Impact

    • Half your genai-pr-docs-review looks removed for sport. Reminder: Partial deletion isn’t equatable with optimization.

Summation: Back in my day, we programmed to solve problems, not to dance around half-hearted GitHub Actions edits while introducing redundancy elsewhere.


Linter: diagrams

Below is a diagram highlighting the workflow and file interactions, showing added/deleted/modified components.

graph TD;
  subgraph .github/workflows
    A[build-genai-commit.yml: Modified]
    B[genai-commit-tests.yml: Added]
    C[genai-pr-commit-review.yml: Modified]
    D[genai-pr-review.yml: Modified]
    E[licenses.yml: Modified]
    F[npm-check.yml: Modified]
  end
  subgraph docs
    G[astro.config.mjs: Modified]
    H[jsconfig.json: Modified]
    I[tsconfig.json: Modified]
    J[package.json: Modified]
    K[genaisrc/glossary.genai.mts: Added]
  end
  A --> B
  A --> E
  J --> G
Loading

Linter: description

The pull request description is missing or insufficiently does not explain the scope of the changes, which cover a range of dev container setup, GitHub workflows, code configurations, and new file additions. Update the description to align with these modifications.

Suggested Description:
"This PR updates several GitHub Actions workflows, modifies devcontainer setup, and updates configuration files across the repository. It also introduces new script and markdown files under the demo and docs directories."


Linter: comments

Your changes look like someone was in a rush to clean their room before guests arrived. Here's the rundown:

  • Workflow files (.github/workflows):

    • Almost no inline comments whatsoever. Deleting half the setup (env, cron, run) requires some annotation, if only for humanity’s sake.
  • docs/astro.config.mjs and tsconfig.json/jsconfig.json:

    • Not a single note anywhere. Changing targets to ES2023? Great. But this impacts downstream compatibility—could you at least leave a warning for other developers?

General advice: If you won’t document why changes happen, maybe don’t throw your code over the wall indistinctly at collaborators.

AI-generated content by linters may be incorrect. Use reactions to eval.

@pelikhan pelikhan changed the base branch from main to dev May 20, 2025 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant