fillContextualAI function exported
Last updated: 2026-03-05T23:41:17.531Z
Metrics
LOC: 20
Complexity: 6
Params: 0
Signature
fillContextualAI(): : Promise<void>
Source Code
export async function fillContextualAI(): Promise<void> {
const context = await openAIContextModal();
if (!context) return;
addLog(t("fillContextualAI"));
const btn = document.getElementById("btn-fill-contextual-ai");
const label = btn?.querySelector(".card-label");
if (label) label.textContent = "⏳...";
try {
const result = (await sendToPage({
type: "FILL_CONTEXTUAL_AI",
payload: context,
})) as { filled?: number };
addLog(`${result?.filled ?? 0} ${t("filled")}`, "success");
} catch (err) {
addLog(`Erro ao preencher com IA: ${err}`, "error");
} finally {
if (label) label.textContent = t("fillContextualAI");
}
}
No outgoing dependencies.
Impact (Incoming)
| Source | Type |
|---|---|
| toggleWatch | calls |