0.4.0 convex及界面修改

This commit is contained in:
liaibo
2026-02-01 08:47:40 +08:00
parent d1f055f51a
commit af92c4b149
636 changed files with 7522 additions and 1815 deletions
+27 -6
View File
@@ -132,11 +132,18 @@ export const run = internalAction({
const title = meta.title ?? "无标题";
const text = extractTextFromDocumentContent(contentRes?.content ?? null);
const fileSource = `document:${documentId}`;
const { trackId } = await lightragIngestText({ fileSource, text: `# ${title}\n\n${text}` });
const ingest = await lightragIngestText({ fileSource, text: `# ${title}\n\n${text}` });
if (ingest.skipped) {
await ctx.runMutation(internal.jobs.finishSuccess, {
id: args.id,
result: { ok: true, kind: "document", documentId, skipped: true, reason: ingest.reason ?? "skipped" },
});
return;
}
await ctx.runMutation(internal.jobs.finishSuccess, {
id: args.id,
result: { ok: true, kind: "document", documentId, trackId },
result: { ok: true, kind: "document", documentId, trackId: ingest.trackId },
});
return;
}
@@ -165,11 +172,18 @@ export const run = internalAction({
const title = docMeta.title ?? "无标题";
const text = extractTextFromMindmapData(mindmapRes.data ?? null);
const fileSource = `mindmap:${docId}:${mindmapId}`;
const { trackId } = await lightragIngestText({ fileSource, text: `# ${title}\n\n${text}` });
const ingest = await lightragIngestText({ fileSource, text: `# ${title}\n\n${text}` });
if (ingest.skipped) {
await ctx.runMutation(internal.jobs.finishSuccess, {
id: args.id,
result: { ok: true, kind: "mindmap", docId, mindmapId, skipped: true, reason: ingest.reason ?? "skipped" },
});
return;
}
await ctx.runMutation(internal.jobs.finishSuccess, {
id: args.id,
result: { ok: true, kind: "mindmap", docId, mindmapId, trackId },
result: { ok: true, kind: "mindmap", docId, mindmapId, trackId: ingest.trackId },
});
return;
}
@@ -191,11 +205,18 @@ export const run = internalAction({
return;
}
const fileSource = `media:${assetId}`;
const { trackId } = await lightragIngestText({ fileSource, text: `# ${title}\n\n${text}` });
const ingest = await lightragIngestText({ fileSource, text: `# ${title}\n\n${text}` });
if (ingest.skipped) {
await ctx.runMutation(internal.jobs.finishSuccess, {
id: args.id,
result: { ok: true, kind: "media_asset", assetId, skipped: true, reason: ingest.reason ?? "skipped" },
});
return;
}
await ctx.runMutation(internal.jobs.finishSuccess, {
id: args.id,
result: { ok: true, kind: "media_asset", assetId, trackId },
result: { ok: true, kind: "media_asset", assetId, trackId: ingest.trackId },
});
return;
}