INNER CODE UNIT · TypeScript
onEdit
google-marketing-solutions/feedgen · src/app.ts:73
export function onEdit(event: GoogleAppsScript.Events.SheetsOnEdit) {
const sheet = event.source.getActiveSheet();
const range = event.range;
const isModelFamilyCell =
sheet.getName() === CONFIG.sheets.config.name &&
range.getA1Notation() ===
CONFIG.userSettings.vertexAi.languageModelFamily.notation;
const isModelIdCell =
sheet.getName() === CONFIG.sheets.config.name &&
range.getA1Notation() ===
CONFIG.userSettings.vertexAi.languageModelId.notation;
const useImageUnderstanding = getConfigSheetValue(
CONFIG.userSettings.feed.imageUnderstanding
);
if (isModelFamilyCell) {
SheetsService.getInstance().clearCellContents(