Harden architecture hot paths

This commit is contained in:
gsxdsm
2026-04-12 15:13:27 -07:00
parent 7b78963a4c
commit a34ba41ad1
38 changed files with 1212 additions and 561 deletions

View File

@@ -290,7 +290,7 @@ export default function kbExtension(pi: ExtensionAPI) {
async execute(_toolCallId, params, _signal, _onUpdate, ctx) {
const store = await getStore(ctx.cwd);
const tasks = await store.listTasks();
const tasks = await store.listTasks({ slim: true });
if (tasks.length === 0) {
return {
@@ -763,7 +763,7 @@ export default function kbExtension(pi: ExtensionAPI) {
}
const store = await getStore(ctx.cwd);
const existingTasks = await store.listTasks();
const existingTasks = await store.listTasks({ slim: true });
const createdTasks: Array<{ id: string; title: string }> = [];
for (const issue of issues) {
@@ -841,7 +841,7 @@ export default function kbExtension(pi: ExtensionAPI) {
// Check if already imported
const store = await getStore(ctx.cwd);
const existingTasks = await store.listTasks();
const existingTasks = await store.listTasks({ slim: true });
const sourceUrl = issue.html_url;
for (const task of existingTasks) {
@@ -936,7 +936,7 @@ export default function kbExtension(pi: ExtensionAPI) {
// Check which issues are already imported
const store = await getStore(ctx.cwd);
const existingTasks = await store.listTasks();
const existingTasks = await store.listTasks({ slim: true });
const importedUrls = new Set<string>();
for (const task of existingTasks) {