mirror of
https://github.com/agent0ai/agent-zero.git
synced 2026-12-03 12:56:02 +00:00
fix: call _memory plugin paths for knowledge reindex
Import knowledge and project knowledge browse POSTed to /api/knowledge_reindex, which is not registered. Route those calls through /plugins/_memory/knowledge_reindex so dispatch matches plugin api handlers. Chat import already used knowledge_path_get under the plugin; its call is reformatted only. update knowledge_reindex.py
This commit is contained in:
parent
91d5005b20
commit
e24b304ecb
2 changed files with 6 additions and 5 deletions
|
|
@ -101,9 +101,10 @@ const model = {
|
|||
|
||||
async loadKnowledge() {
|
||||
try {
|
||||
const resp = await shortcuts.callJsonApi("/plugins/_memory/knowledge_path_get", {
|
||||
ctxid: shortcuts.getCurrentContextId(),
|
||||
});
|
||||
const resp = await shortcuts.callJsonApi(
|
||||
"/plugins/_memory/knowledge_path_get",
|
||||
{ ctxid: shortcuts.getCurrentContextId() }
|
||||
);
|
||||
if (!resp.ok) throw new Error("Error getting knowledge path");
|
||||
const path = resp.path;
|
||||
|
||||
|
|
@ -121,7 +122,7 @@ const model = {
|
|||
});
|
||||
|
||||
// then reindex knowledge
|
||||
await globalThis.sendJsonData("/knowledge_reindex", {
|
||||
await globalThis.sendJsonData("/plugins/_memory/knowledge_reindex", {
|
||||
ctxid: shortcuts.getCurrentContextId(),
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -459,7 +459,7 @@ const model = {
|
|||
});
|
||||
|
||||
// call reindex knowledge
|
||||
const reindexCall = api.callJsonApi("/knowledge_reindex", {
|
||||
const reindexCall = api.callJsonApi("/plugins/_memory/knowledge_reindex", {
|
||||
ctxid: shortcuts.getCurrentContextId(),
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue