Server: remove members, parameters and a route alias nothing uses
Bundle.id, Libraries.flush, UsageTracker.now and the wiki cache's size getter had no callers; upsert's `save` flag only ever skipped a save on an index with no file, text()'s `required` and recordCall's default were never used, and wikiRoutes imported readJson for nothing. Renaming a library answered POST as well as PATCH, which nothing sends. revertTo refused commits from before the library existed, which no library's history holds any more; an export's file name fell back to "untitled", which slugify already does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014yB6q4BHMwptTX3YFtkRab
This commit is contained in:
1 parent
714449fd54
commit
63593fdb22
9 files changed
+9
-27
No files matched your search
+2
-2
@@ -264,7 +264,7 @@ export class VectorIndex {
|
||||
}
|
||||
|
||||
/** Add or update entries. Unchanged text (same hash, vector present) is not re-embedded. */
|
||||
async upsert(items: { id: string; text: string }[], save = true): Promise<UpsertReport> {
|
||||
async upsert(items: { id: string; text: string }[]): Promise<UpsertReport> {
|
||||
const todo: Entry[] = [];
|
||||
let skipped = 0;
|
||||
for (const { id, text } of items) {
|
||||
@@ -281,7 +281,7 @@ export class VectorIndex {
|
||||
if (todo.length) this.bm25 = null;
|
||||
const vectors = todo.length && this.embedder ? await this.embedder.embed(todo.map((e) => e.text)) : null;
|
||||
if (vectors) todo.forEach((e, i) => (e.vector = vectors[i]));
|
||||
if (save && todo.length) this.save();
|
||||
if (todo.length) this.save();
|
||||
return {
|
||||
embedded: vectors ? todo.length : 0,
|
||||
skipped,
|
||||
|
||||
Reference in new issue
Block a user