fix(agents): refresh edited shared instruction previews

Invalidate cached detail when a replaceable note gets a new event ID, and cover the edit-preview-edit path end to end.

Co-authored-by: Rizz <302abe414ca6e3134763d2539bfcf145aea2a63fe5f8455204ed602fd40cf381@buzz.block.builderlab.xyz>

Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
This commit is contained in:
Taylor Ho
2026-08-25 00:51:25 -07:00
committed by Rizz
parent af20831bb7
commit 60608f4dc1
3 changed files with 58 additions and 16 deletions

View File

@@ -14034,14 +14034,40 @@ export function maybeInstallE2eTauriMocks() {
}
).input;
const [, publisher = "", slug = ""] = input.coordinate.split(":", 3);
const eventId = "de".repeat(32);
const updatedAt = 1_700_000_001;
const mock = getConfig()?.mock;
const cover = mock?.relaySkills?.find(
(candidate) => candidate.coordinate === input.coordinate,
);
if (cover) {
Object.assign(cover, {
title: input.title,
summary: input.summary,
eventId,
updatedAt,
});
}
const detail = mock?.relaySkillDetails?.find(
(candidate) => candidate.coordinate === input.coordinate,
);
if (detail) {
Object.assign(detail, {
title: input.title,
summary: input.summary,
content: input.instructions,
eventId,
updatedAt,
});
}
return {
coordinate: input.coordinate,
publisher,
slug,
title: input.title,
summary: input.summary,
eventId: "de".repeat(32),
updatedAt: 1_700_000_001,
eventId,
updatedAt,
compatible: true,
incompatibilities: [],
};