@lucas-bur/pix 0.8.0 → 0.9.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/dist/index.mjs +16 -15
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -33,6 +33,21 @@ var GetStatus = class extends Effect.Service()("GetStatus", {
|
|
|
33
33
|
})
|
|
34
34
|
}) {};
|
|
35
35
|
//#endregion
|
|
36
|
+
//#region src/domain/config.ts
|
|
37
|
+
var ConfigError = class extends Data.TaggedError("ConfigError") {};
|
|
38
|
+
const DEFAULT_CONFIG = {
|
|
39
|
+
schema: "1",
|
|
40
|
+
chunkLines: 60,
|
|
41
|
+
overlapLines: 10,
|
|
42
|
+
chunkConcurrency: 8,
|
|
43
|
+
files: {},
|
|
44
|
+
embedder: {
|
|
45
|
+
model: "Xenova/all-MiniLM-L6-v2",
|
|
46
|
+
device: "auto",
|
|
47
|
+
dtype: "fp32"
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
//#endregion
|
|
36
51
|
//#region src/application/index-project.ts
|
|
37
52
|
/**
|
|
38
53
|
* Use case: index project files. Pipeline: scan → chunk → embed → store. Depends on ConfigStore,
|
|
@@ -47,6 +62,7 @@ var IndexProject = class extends Effect.Service()("IndexProject", {
|
|
|
47
62
|
const embedder = yield* Embedder;
|
|
48
63
|
const vectorStore = yield* VectorStore;
|
|
49
64
|
const index = () => Effect.gen(function* () {
|
|
65
|
+
if (!(yield* configStore.configExists())) yield* configStore.writeConfig(DEFAULT_CONFIG);
|
|
50
66
|
const config = yield* configStore.readConfig();
|
|
51
67
|
const extensions = Object.keys(config.files).length > 0 ? Object.keys(config.files) : [
|
|
52
68
|
".ts",
|
|
@@ -89,21 +105,6 @@ var IndexProject = class extends Effect.Service()("IndexProject", {
|
|
|
89
105
|
})
|
|
90
106
|
}) {};
|
|
91
107
|
//#endregion
|
|
92
|
-
//#region src/domain/config.ts
|
|
93
|
-
var ConfigError = class extends Data.TaggedError("ConfigError") {};
|
|
94
|
-
const DEFAULT_CONFIG = {
|
|
95
|
-
schema: "1",
|
|
96
|
-
chunkLines: 60,
|
|
97
|
-
overlapLines: 10,
|
|
98
|
-
chunkConcurrency: 8,
|
|
99
|
-
files: {},
|
|
100
|
-
embedder: {
|
|
101
|
-
model: "Xenova/all-MiniLM-L6-v2",
|
|
102
|
-
device: "auto",
|
|
103
|
-
dtype: "fp32"
|
|
104
|
-
}
|
|
105
|
-
};
|
|
106
|
-
//#endregion
|
|
107
108
|
//#region src/application/init-project.ts
|
|
108
109
|
/**
|
|
109
110
|
* Use case: initialize a pix project by writing default config. Depends on ConfigStore via Effect
|