fix(memory/qmd): throttle embed + citations auto + restore --force

This commit is contained in:
vignesh07
2026-01-28 02:05:58 -08:00
committed by Vignesh
parent 20578da204
commit 9df78b3379
11 changed files with 90 additions and 18 deletions

View File

@@ -22,6 +22,7 @@ type MemoryCommandOptions = {
json?: boolean;
deep?: boolean;
index?: boolean;
force?: boolean;
verbose?: boolean;
};
@@ -287,7 +288,7 @@ export async function runMemoryStatus(opts: MemoryCommandOptions) {
try {
await syncFn({
reason: "cli",
force: true,
force: Boolean(opts.force),
progress: (syncUpdate) => {
update({
completed: syncUpdate.completed,
@@ -495,7 +496,7 @@ export function registerMemoryCli(program: Command) {
.option("--deep", "Probe embedding provider availability")
.option("--index", "Reindex if dirty (implies --deep)")
.option("--verbose", "Verbose logging", false)
.action(async (opts: MemoryCommandOptions) => {
.action(async (opts: MemoryCommandOptions & { force?: boolean }) => {
await runMemoryStatus(opts);
});
@@ -503,6 +504,7 @@ export function registerMemoryCli(program: Command) {
.command("index")
.description("Reindex memory files")
.option("--agent <id>", "Agent id (default: default agent)")
.option("--force", "Force full reindex", false)
.option("--verbose", "Verbose logging", false)
.action(async (opts: MemoryCommandOptions) => {
setVerbose(Boolean(opts.verbose));
@@ -605,7 +607,7 @@ export function registerMemoryCli(program: Command) {
try {
await syncFn({
reason: "cli",
force: true,
force: Boolean(opts.force),
progress: (syncUpdate) => {
if (syncUpdate.label) {
lastLabel = syncUpdate.label;