@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
15 lines • 813 B
JavaScript
import { parseRuleActivationDetails, RULE_ACTIVATION_ENTRY_TYPE, } from "../../../core/extensions/builtin/rule-activation/types.js";
/** Undefined for stream rules, legacy notices without a tool call id, and calls outside the group. */
export function projectRulesOfCall(card, calls) {
const entry = card.customEntry;
if (entry.customType !== RULE_ACTIVATION_ENTRY_TYPE)
return undefined;
const details = parseRuleActivationDetails(entry.data);
if (details?.kind !== "project-rules" || details.toolCallId === undefined)
return undefined;
const toolCallId = details.toolCallId;
return calls.some(({ component }) => component.presentationSnapshot.identity.toolCallId === toolCallId)
? details.rules
: undefined;
}
//# sourceMappingURL=exploration-rules.js.map