mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-06 12:54:20 +01:00
Clean up and enhance memory plugin (#151)
* refactor storage to use worker-based vector operations * update memory service and agent implementations * update opencode plugin sdk * update memory plugin documentation * add tests for memory service and injection hook * update lockfile for dependency changes * Add memory plugin v0.0.13 with message deduplication and config UI * Remove planning state feature from memory plugin
This commit is contained in:
1 parent
47ef830cbb
commit
6ef68774d8
53 files changed
+1683
-1885
No files matched your search
@@ -169,6 +169,7 @@ export class MemoryService {
|
||||
}
|
||||
): Promise<MemorySearchResult[]> {
|
||||
const embedding = await this.embeddingService.embedText(query)
|
||||
this.logger?.log(`memory-search: embedding generated (dimensions=${embedding.length}, hasSignal=${embedding.some(v => v !== 0)})`)
|
||||
const results = await this.queries.search(embedding, projectId, filters)
|
||||
results.forEach((r) => this.queries.trackAccess(r.memory.id))
|
||||
return results
|
||||
@@ -197,11 +198,11 @@ export class MemoryService {
|
||||
return this.queries.countByProject(projectId)
|
||||
}
|
||||
|
||||
getMemoriesWithoutEmbeddings(projectId?: string, limit: number = 50): Memory[] {
|
||||
async getMemoriesWithoutEmbeddings(projectId?: string, limit: number = 50): Promise<Memory[]> {
|
||||
return this.queries.getMemoriesWithoutEmbeddings(projectId, limit)
|
||||
}
|
||||
|
||||
countMemoriesWithoutEmbeddings(projectId?: string): number {
|
||||
async countMemoriesWithoutEmbeddings(projectId?: string): Promise<number> {
|
||||
return this.queries.countMemoriesWithoutEmbeddings(projectId)
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user