MCPcopy Create free account
hub / github.com/TeleBoxOrg/TeleBox_Plugins / appendActionSources

Function appendActionSources

ai/ai.ts:2038–2048  ·  view source on GitHub ↗
(action: any)

Source from the content-addressed store, hash-verified

2036
2037 const appendActionSources = (action: any) => {
2038 const sourceList = Array.isArray(action?.sources)
2039 ? action.sources
2040 : Array.isArray(action)
2041 ? action
2042 : [];
2043 for (const entry of sourceList) {
2044 if (typeof entry?.url !== "string") continue;
2045 appendSource(entry.url, entry.title);
2046 }
2047 };
2048
2049 if (item?.type === "message") {
2050 for (const part of item.content || []) {
2051 appendAnnotations(part?.annotations);

Callers 1

collectResponsesSourcesFunction · 0.85

Calls 1

appendSourceFunction · 0.85

Tested by

no test coverage detected