Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Contributing to astchunk
# Contributing to code-chunk

Thank you for your interest in contributing to our project! This guide will help you get started with the development process.

Expand All @@ -11,8 +11,8 @@ Thank you for your interest in contributing to our project! This guide will help
### Getting Started

1. Fork the repository
2. Clone your fork: `git clone https://github.com/supermemoryai/astchunk.git`
3. Navigate to the project directory: `cd astchunk`
2. Clone your fork: `git clone https://github.com/supermemoryai/code-chunk.git`
3. Navigate to the project directory: `cd code-chunk`
4. Install dependencies: `bun install`
5. Start development: `bun run dev`

Expand Down Expand Up @@ -53,6 +53,6 @@ Please be respectful and constructive in all interactions within our community.

## Questions?

If you have any questions, please [open an issue](https://github.com/supermemoryai/astchunk/issues/new) for discussion.
If you have any questions, please [open an issue](https://github.com/supermemoryai/code-chunk/issues/new) for discussion.

Thank you for contributing to astchunk!
Thank you for contributing to code-chunk!
2 changes: 1 addition & 1 deletion biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
},
"overrides": [
{
"includes": ["**/test/**/*.ts", "packages/astchunk/test/**/*.ts"],
"includes": ["**/test/**/*.ts", "packages/code-chunk/test/**/*.ts"],
"linter": {
"rules": {
"style": {
Expand Down
20 changes: 8 additions & 12 deletions bun.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
"configVersion": 1,
"workspaces": {
"": {
"name": "astchunk-monorepo",
"name": "code-chunk-monorepo",
"devDependencies": {
"@biomejs/biome": "^2.3.8",
"typescript": "^5.9.3",
},
},
"packages/astchunk": {
"packages/code-chunk": {
"name": "code-chunk",
"version": "0.1.0",
"dependencies": {
Expand Down Expand Up @@ -75,7 +75,7 @@

"@bunup/dts": ["@bunup/[email protected]", "", { "dependencies": { "@babel/parser": "^7.28.4", "coffi": "^0.1.37", "oxc-minify": "^0.93.0", "oxc-resolver": "^11.9.0", "oxc-transform": "^0.93.0", "picocolors": "^1.1.1", "std-env": "^3.9.0", "ts-import-resolver": "^0.1.23" }, "peerDependencies": { "typescript": ">=4.5.0" }, "optionalPeers": ["typescript"] }, "sha512-ky/82sy2FLMvMTGxOhegB+EUvru5dH5xW+TkGpx4jmUlEa3IR8GxKOKlCgBmb5jmmcJitOagJrCh1LM6pguReQ=="],

"@bunup/shared": ["@bunup/[email protected].8", "", { "peerDependencies": { "typescript": "latest" }, "optionalPeers": ["typescript"] }, "sha512-HBh5RLjhBSKgWTooX1f9WUwIQVLxeGfcNKjpV+04U6z2BolxKLSMn7MxUgYOxU4Q8hfCG6HGVD+Ks5fcnh9wBw=="],
"@bunup/shared": ["@bunup/[email protected].10", "", { "peerDependencies": { "typescript": "latest" }, "optionalPeers": ["typescript"] }, "sha512-XDrhTdLS9OnXguHDGDTqrdcce17zlndBF3vOuuyQ5Vy6+T3b8waqMq9cAeYYlvhSTSkNTtDsDGiyWVji0KNPKQ=="],

"@emnapi/core": ["@emnapi/[email protected]", "", { "dependencies": { "@emnapi/wasi-threads": "1.1.0", "tslib": "^2.4.0" } }, "sha512-o1uhUASyo921r2XtHYOHy7gdkGLge8ghBEQHMWmyJFoXlpU58kIrhhN3w26lpQb6dspetweapMn2CSNwQ8I4wg=="],

Expand Down Expand Up @@ -211,19 +211,19 @@

"bun-types": ["[email protected]", "", { "dependencies": { "@types/node": "*" } }, "sha512-inmAYe2PFLs0SUbFOWSVD24sg1jFlMPxOjOSSCYqUgn4Hsc3rDc7dFvfVYjFPNHtov6kgUeulV4SxbuIV/stPw=="],

"bunup": ["[email protected].10", "", { "dependencies": { "@bunup/dts": "^0.14.37", "@bunup/shared": "0.16.8", "chokidar": "^4.0.3", "coffi": "^0.1.37", "lightningcss": "^1.30.2", "picocolors": "^1.1.1", "tinyexec": "^1.0.1", "tree-kill": "^1.2.2", "zlye": "^0.4.4" }, "peerDependencies": { "typescript": "latest" }, "optionalPeers": ["typescript"], "bin": { "bunup": "dist/cli/index.js" } }, "sha512-rG++Esy3K5BYmZc/cFE58KRlDnzX4kvUPCpTE9gFf8n8ly5SNnCXPgEHMILmZ2VH1+VwJp2uY3tbaOI65TAXHQ=="],
"bunup": ["[email protected].11", "", { "dependencies": { "@bunup/dts": "^0.14.37", "@bunup/shared": "0.16.10", "chokidar": "^5.0.0", "coffi": "^0.1.37", "lightningcss": "^1.30.2", "picocolors": "^1.1.1", "tinyexec": "^1.0.1", "tree-kill": "^1.2.2", "zlye": "^0.4.4" }, "peerDependencies": { "typescript": "latest" }, "optionalPeers": ["typescript"], "bin": { "bunup": "dist/cli/index.js" } }, "sha512-hy8DeA4HAkG+exZJ92UYQoUd6g1ZCwFtZQKguedomMvnrv/k+5OhkSMetQTrUOb/qSlJFwqG0QyRXLeILU9hlg=="],

"c12": ["[email protected]", "", { "dependencies": { "chokidar": "^5.0.0", "confbox": "^0.2.2", "defu": "^6.1.4", "dotenv": "^17.2.3", "exsolve": "^1.0.8", "giget": "^2.0.0", "jiti": "^2.6.1", "ohash": "^2.0.11", "pathe": "^2.0.3", "perfect-debounce": "^2.0.0", "pkg-types": "^2.3.0", "rc9": "^2.1.2" }, "peerDependencies": { "magicast": "*" }, "optionalPeers": ["magicast"] }, "sha512-750hTRvgBy5kcMNPdh95Qo+XUBeGo8C7nsKSmedDmaQI+E0r82DwHeM6vBewDe4rGFbnxoa4V9pw+sPh5+Iz8Q=="],

"cac": ["[email protected]", "", {}, "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ=="],

"call-bind-apply-helpers": ["[email protected]", "", { "dependencies": { "es-errors": "^1.3.0", "function-bind": "^1.1.2" } }, "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ=="],

"chokidar": ["chokidar@4.0.3", "", { "dependencies": { "readdirp": "^4.0.1" } }, "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA=="],
"chokidar": ["chokidar@5.0.0", "", { "dependencies": { "readdirp": "^5.0.0" } }, "sha512-TQMmc3w+5AxjpL8iIiwebF73dRDF4fBIieAqGn9RGCWaEVwQ6Fb2cGe31Yns0RRIzii5goJ1Y7xbMwo1TxMplw=="],

"citty": ["[email protected]", "", { "dependencies": { "consola": "^3.2.3" } }, "sha512-tskPPKEs8D2KPafUypv2gxwJP8h/OaJmC82QQGGDQcHvXX43xF2VDACcJVmZ0EuSxkpO9Kc4MlrA3q0+FG58AQ=="],

"code-chunk": ["code-chunk@workspace:packages/astchunk"],
"code-chunk": ["code-chunk@workspace:packages/code-chunk"],

"coffi": ["[email protected]", "", { "dependencies": { "strip-json-comments": "^5.0.3" } }, "sha512-ewO5Xis7sw7g54yI/3lJ/nNV90Er4ZnENeDORZjrs58T70MmwKFLZgevraNCz+RmB4KDKsYT1ui1wDB36iPWqQ=="],

Expand All @@ -245,7 +245,7 @@

"dunder-proto": ["[email protected]", "", { "dependencies": { "call-bind-apply-helpers": "^1.0.1", "es-errors": "^1.3.0", "gopd": "^1.2.0" } }, "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A=="],

"effect": ["[email protected].12", "", { "dependencies": { "@standard-schema/spec": "^1.0.0", "fast-check": "^3.23.1" } }, "sha512-7F9RGTrCTC3D7nh9Zw+3VlJWwZgo5k33KA+476BAaD0rKIXKZsY/jQ+ipyhR/Avo239Fi6GqAVFs1mqM1IJ7yg=="],
"effect": ["[email protected].13", "", { "dependencies": { "@standard-schema/spec": "^1.0.0", "fast-check": "^3.23.1" } }, "sha512-8MZ783YuHRwHZX2Mmm+bpGxq+7XPd88sWwYAz2Ysry80sEKpftDZXs2Hg9ZyjESi1IBTNHF0oDKe0zJRkUlyew=="],

"es-define-property": ["[email protected]", "", {}, "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g=="],

Expand Down Expand Up @@ -363,7 +363,7 @@

"rc9": ["[email protected]", "", { "dependencies": { "defu": "^6.1.4", "destr": "^2.0.3" } }, "sha512-btXCnMmRIBINM2LDZoEmOogIZU7Qe7zn4BpomSKZ/ykbLObuBdvG+mFq11DL6fjH1DRwHhrlgtYWG96bJiC7Cg=="],

"readdirp": ["readdirp@4.1.2", "", {}, "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg=="],
"readdirp": ["readdirp@5.0.0", "", {}, "sha512-9u/XQ1pvrQtYyMpZe7DXKv2p5CNvyVwzUB6uhLAnQwHMSgKMBR62lc7AHljaeteeHXn11XTAaLLUVZYVZyuRBQ=="],

"semver": ["[email protected]", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q=="],

Expand Down Expand Up @@ -411,10 +411,6 @@

"zlye": ["[email protected]", "", { "dependencies": { "picocolors": "^1.1.1" }, "peerDependencies": { "typescript": ">=4.5.0" }, "optionalPeers": ["typescript"] }, "sha512-fwpeC841X3ElOLYRMKXbwX29pitNrsm6nRNvEhDMrRXDl3BhR2i03Bkr0GNrpyYgZJuEzUsBylXAYzgGPXXOCQ=="],

"c12/chokidar": ["[email protected]", "", { "dependencies": { "readdirp": "^5.0.0" } }, "sha512-TQMmc3w+5AxjpL8iIiwebF73dRDF4fBIieAqGn9RGCWaEVwQ6Fb2cGe31Yns0RRIzii5goJ1Y7xbMwo1TxMplw=="],

"tree-sitter-typescript/tree-sitter-javascript": ["[email protected]", "", { "dependencies": { "node-addon-api": "^8.2.2", "node-gyp-build": "^4.8.2" }, "peerDependencies": { "tree-sitter": "^0.21.1" }, "optionalPeers": ["tree-sitter"] }, "sha512-/bnhbrTD9frUYHQTiYnPcxyHORIw157ERBa6dqzaKxvR/x3PC4Yzd+D1pZIMS6zNg2v3a8BZ0oK7jHqsQo9fWA=="],

"c12/chokidar/readdirp": ["[email protected]", "", {}, "sha512-9u/XQ1pvrQtYyMpZe7DXKv2p5CNvyVwzUB6uhLAnQwHMSgKMBR62lc7AHljaeteeHXn11XTAaLLUVZYVZyuRBQ=="],
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "astchunk-monorepo",
"name": "code-chunk-monorepo",
"private": true,
"workspaces": [
"packages/*"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
"name": "code-chunk",
"version": "0.1.0",
"description": "AST-aware code chunking for semantic search and RAG",
"homepage": "https://github.com/supermemoryai/astchunk#readme",
"homepage": "https://github.com/supermemoryai/code-chunk#readme",
"bugs": {
"url": "https://github.com/supermemoryai/astchunk/issues"
"url": "https://github.com/supermemoryai/code-chunk/issues"
},
"license": "MIT",
"files": [
"dist"
],
"repository": {
"type": "git",
"url": "git+https://github.com/supermemoryai/astchunk.git"
"url": "git+https://github.com/supermemoryai/code-chunk.git"
},
"scripts": {
"build": "bunup",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ const chunkEffect = (
/**
* Chunk source code into pieces with semantic context
*
* This is the main entry point for the astchunk library. It takes source code
* This is the main entry point for the code-chunk library. It takes source code
* and returns an array of chunks, each with contextual information about the
* code's structure.
*
Expand All @@ -128,7 +128,7 @@ const chunkEffect = (
*
* @example
* ```ts
* import { chunk } from 'astchunk'
* import { chunk } from 'code-chunk'
*
* const chunks = await chunk('src/utils.ts', sourceCode)
* for (const chunk of chunks) {
Expand Down Expand Up @@ -203,7 +203,7 @@ const prepareChunking = (
*
* @example
* ```ts
* import { chunkStreamEffect } from 'astchunk'
* import { chunkStreamEffect } from 'code-chunk'
* import { Effect, Stream } from 'effect'
*
* const program = Stream.runForEach(
Expand Down Expand Up @@ -268,7 +268,7 @@ export const chunkStreamEffect = (
*
* @example
* ```ts
* import { chunkStream } from 'astchunk'
* import { chunkStream } from 'code-chunk'
*
* for await (const chunk of chunkStream('src/utils.ts', sourceCode)) {
* console.log(chunk.text, chunk.context)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class ChunkerImpl implements Chunker {
*
* @example
* ```ts
* import { createChunker } from 'astchunk'
* import { createChunker } from 'code-chunk'
*
* const chunker = createChunker({ maxChunkSize: 2048 })
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* astchunk - AST-aware code chunking for LLMs
* code-chunk - AST-aware code chunking for LLMs
*
* This library provides intelligent code chunking that preserves semantic
* context by leveraging tree-sitter for AST parsing. Each chunk includes
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion packages/eval/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@supermemory/eval",
"version": "0.1.0",
"private": true,
"description": "Evaluation harness for astchunk",
"description": "Evaluation harness for code-chunk",
"type": "module",
"scripts": {
"start": "bun run src/run.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/eval/src/chunkers/ast.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* AST-aware chunker wrapper for evaluation
*
* Wraps the astchunk library for use in the evaluation harness.
* Wraps the code-chunk library for use in the evaluation harness.
* Uses the built-in contextualizedText for better embedding quality.
*/

Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"files": [],
"references": [
{ "path": "./packages/astchunk" },
{ "path": "./packages/code-chunk" },
{ "path": "./packages/eval" }
]
}