karajan-code 4.62.1 → 4.63.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/packages/hu-board/src/plan-mutations.js +21 -0
- package/src/cli/register-meta.js +15 -2
- package/src/commands/hu.js +110 -13
- package/src/commands/rag.js +34 -8
- package/src/hu/github-board.js +20 -3
- package/src/hu/team-board-cache.js +84 -0
- package/src/hu/team-board-mirror.js +26 -0
- package/src/lang/chunk-go.js +2 -27
- package/src/lang/chunk-java.js +7 -32
- package/src/lang/chunk-python.js +2 -27
- package/src/lang/chunk-rust.js +2 -27
- package/src/lang/chunk-span.js +49 -0
- package/src/plan/plan-store.js +4 -1
- package/src/rag/auto-update.js +55 -7
- package/src/rag/bootstrap-index.js +86 -0
- package/src/rag/chunker-ast.js +5 -12
- package/src/rag/chunker.js +2 -14
- package/src/rag/embed-header.js +35 -0
- package/src/rag/embed-schema.js +28 -0
- package/src/rag/eval.js +39 -3
- package/src/rag/indexer.js +36 -14
- package/src/rag/worktree-files.js +26 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// KJC-TSK-1174 (RAG-A1): what the working tree holds beyond HEAD, for the pre-query refresh.
|
|
2
|
+
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
3
|
+
import { dirname } from "node:path";
|
|
4
|
+
import { execa } from "execa";
|
|
5
|
+
import { projectDbPath } from "./project-store.js";
|
|
6
|
+
|
|
7
|
+
/** Files git does not track yet and does not ignore: the ones a session has just created. */
|
|
8
|
+
export async function untrackedFiles(projectDir) {
|
|
9
|
+
const { stdout } = await execa("git", ["-C", projectDir, "ls-files", "--others", "--exclude-standard", "-z"]);
|
|
10
|
+
return stdout.split("\0").filter(Boolean);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
// The dirty paths the last refresh indexed, next to the store. Reverted or deleted since, git no
|
|
14
|
+
// longer lists them, yet the index holds their discarded content: the next refresh reconciles them.
|
|
15
|
+
const notePath = (projectDir) => `${projectDbPath(projectDir)}.worktree-paths`;
|
|
16
|
+
|
|
17
|
+
export function readRefreshedPaths(projectDir) {
|
|
18
|
+
const file = notePath(projectDir);
|
|
19
|
+
return existsSync(file) ? JSON.parse(readFileSync(file, "utf8")) : [];
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export function writeRefreshedPaths(projectDir, paths) {
|
|
23
|
+
const file = notePath(projectDir);
|
|
24
|
+
mkdirSync(dirname(file), { recursive: true });
|
|
25
|
+
writeFileSync(file, JSON.stringify(paths), "utf8");
|
|
26
|
+
}
|