mirror of
https://github.com/block/buzz.git
synced 2026-11-14 05:12:27 +00:00
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:
@@ -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: [],
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user