Merge branch 'main' into skill/ollama-tool

This commit is contained in:
github-actions[bot]
2026-03-18 09:52:24 +00:00
4 changed files with 26 additions and 4 deletions
+4 -4
View File
@@ -1,5 +1,5 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="97" height="20" role="img" aria-label="40.4k tokens, 20% of context window">
<title>40.4k tokens, 20% of context window</title>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="97" height="20" role="img" aria-label="40.5k tokens, 20% of context window">
<title>40.5k tokens, 20% of context window</title>
<linearGradient id="s" x2="0" y2="100%">
<stop offset="0" stop-color="#bbb" stop-opacity=".1"/>
<stop offset="1" stop-opacity=".1"/>
@@ -15,8 +15,8 @@
<g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" font-size="11">
<text aria-hidden="true" x="26" y="15" fill="#010101" fill-opacity=".3">tokens</text>
<text x="26" y="14">tokens</text>
<text aria-hidden="true" x="74" y="15" fill="#010101" fill-opacity=".3">40.4k</text>
<text x="74" y="14">40.4k</text>
<text aria-hidden="true" x="74" y="15" fill="#010101" fill-opacity=".3">40.5k</text>
<text x="74" y="14">40.5k</text>
</g>
</g>
</a>

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

+15
View File
@@ -632,6 +632,21 @@ async function main(): Promise<void> {
getAvailableGroups,
writeGroupsSnapshot: (gf, im, ag, rj) =>
writeGroupsSnapshot(gf, im, ag, rj),
onTasksChanged: () => {
const tasks = getAllTasks();
const taskRows = tasks.map((t) => ({
id: t.id,
groupFolder: t.group_folder,
prompt: t.prompt,
schedule_type: t.schedule_type,
schedule_value: t.schedule_value,
status: t.status,
next_run: t.next_run,
}));
for (const group of Object.values(registeredGroups)) {
writeTasksSnapshot(group.folder, group.isMain === true, taskRows);
}
},
});
queue.setProcessMessagesFn(processGroupMessages);
recoverPendingMessages();
+1
View File
@@ -62,6 +62,7 @@ beforeEach(() => {
syncGroups: async () => {},
getAvailableGroups: () => [],
writeGroupsSnapshot: () => {},
onTasksChanged: () => {},
};
});
+6
View File
@@ -22,6 +22,7 @@ export interface IpcDeps {
availableGroups: AvailableGroup[],
registeredJids: Set<string>,
) => void;
onTasksChanged: () => void;
}
let ipcWatcherRunning = false;
@@ -270,6 +271,7 @@ export async function processTaskIpc(
{ taskId, sourceGroup, targetFolder, contextMode },
'Task created via IPC',
);
deps.onTasksChanged();
}
break;
@@ -282,6 +284,7 @@ export async function processTaskIpc(
{ taskId: data.taskId, sourceGroup },
'Task paused via IPC',
);
deps.onTasksChanged();
} else {
logger.warn(
{ taskId: data.taskId, sourceGroup },
@@ -300,6 +303,7 @@ export async function processTaskIpc(
{ taskId: data.taskId, sourceGroup },
'Task resumed via IPC',
);
deps.onTasksChanged();
} else {
logger.warn(
{ taskId: data.taskId, sourceGroup },
@@ -318,6 +322,7 @@ export async function processTaskIpc(
{ taskId: data.taskId, sourceGroup },
'Task cancelled via IPC',
);
deps.onTasksChanged();
} else {
logger.warn(
{ taskId: data.taskId, sourceGroup },
@@ -388,6 +393,7 @@ export async function processTaskIpc(
{ taskId: data.taskId, sourceGroup, updates },
'Task updated via IPC',
);
deps.onTasksChanged();
}
break;