Skip to content

Commit b7321c7

Browse files
committed
Include blob body in compatibleBlobs list
1 parent a0edb40 commit b7321c7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

typescript/packages/toolshed/routes/ai/spell/behavior/spell-search.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ interface SpellSearchResult {
77
compatibleBlobs: Array<{
88
key: string;
99
snippet: string;
10+
data: unknown;
1011
}>;
1112
}>;
1213
blobs: Array<{
@@ -208,8 +209,8 @@ function findCompatibleSpells(
208209
function findCompatibleBlobs(
209210
spell: Record<string, unknown>,
210211
blobs: Record<string, Record<string, unknown>>,
211-
): Array<{ key: string; snippet: string }> {
212-
const compatible: Array<{ key: string; snippet: string }> = [];
212+
): Array<{ key: string; snippet: string; data: unknown; }> {
213+
const compatible: Array<{ key: string; snippet: string; data: unknown; }> = [];
213214
const spellStr = JSON.stringify(spell).toLowerCase();
214215

215216
for (const [key, blob] of Object.entries(blobs)) {
@@ -223,6 +224,7 @@ function findCompatibleBlobs(
223224
compatible.push({
224225
key,
225226
snippet: getRelevantSnippet(blobStr),
227+
data: blob
226228
});
227229
}
228230
}

0 commit comments

Comments
 (0)