Merge pull request #1326 from 3clyp50/development

This commit is contained in:
Jan Tomášek 2026-03-25 21:39:48 +01:00 committed by GitHub
commit 35d47c5ef8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 12 additions and 11 deletions

View file

@ -25,7 +25,7 @@ Send messages to Agent Zero and receive responses. Supports text messages, file
* `message` (string, required): The message to send
* `attachments` (array, optional): Array of `{filename, base64}` objects
* `lifetime_hours` (number, optional): Chat lifetime in hours (default: 24)
* `project` (string, optional): Project name to activate (only on first message)
* `project_name` (string, optional): Project name to activate (only on first message)
**Headers:**
* `X-API-KEY` (required)
@ -185,7 +185,7 @@ async function sendMessageWithProject() {
},
body: JSON.stringify({
message: "Analyze the project structure",
project: "my-web-app" // Activates this project
project_name: "my-web-app" // Activates this project
})
});
@ -206,7 +206,7 @@ async function sendMessageWithProject() {
body: JSON.stringify({
context_id: data.context_id,
message: "What files are in the project?"
// Do NOT include project field here - already set on first message
// Do NOT include project_name here - already set on first message
})
});

View file

@ -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(),
});

View file

@ -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(),
});

View file

@ -35,7 +35,7 @@
<code>message</code> (string, required): The message to send<br>
<code>attachments</code> (array, optional): Array of {filename, base64} objects<br>
<code>lifetime_hours</code> (number, optional): Chat lifetime in hours (default: 24)<br>
<code>project</code> (string, optional): Project name to activate (only on first message)
<code>project_name</code> (string, optional): Project name to activate (only on first message)
</p>
<p style="margin: 0; color: var(--color-text-secondary); font-size: 14px;">
<strong>Headers:</strong> <code>X-API-KEY</code> (required), <code>Content-Type: application/json</code>
@ -629,7 +629,7 @@ async function sendMessageWithProject() {
},
body: JSON.stringify({
message: "Analyze the project structure",
project: "my-web-app" // Activates this project
project_name: "my-web-app" // Activates this project
})
});
@ -650,7 +650,7 @@ async function sendMessageWithProject() {
body: JSON.stringify({
context_id: data.context_id,
message: "What files are in the project?"
// Do NOT include project field here - already set on first message
// Do NOT include project_name here - already set on first message
})
});