.pol β AI control, data, commands (main logic)
.html .css .js β Visual/graphic output
.py .json .md β Data & scripts
Important: AI logic must go in .pol files. Use other languages for UI/graphics only.
# This is a comment # Use # for comments (NOT //)
@nombre: "Extension Name" @version: "1.0.0" @autor: "you@email.com" @descripcion: "What it does" @precio: 0
variable name = "Pollo" variable age = 25 variable active = verdadero variable list = [1, 2, 3]
funcion greet(name) {
retornar "Hello " + name
}
variable greeting = greet("User")
si (age >= 18) {
mostrar("Adult")
} sino si (age >= 13) {
mostrar("Teen")
} sino {
mostrar("Child")
}
para (variable i = 0; i < 10; i++) {
mostrar(i)
}
mientras (counter < 100) {
counter = counter + 1
}
para_cada (item en list) {
mostrar(item)
}
PolloAPI.chat.enviar("text") β Send message to chat
PolloAPI.chat.obtenerUltimo() β Get last message
PolloAPI.chat.obtenerHistorial(n) β Get chat history
PolloAPI.ia.ask("question?") β Ask the AI
PolloAPI.ia.analizarSentimiento(text) β Sentiment analysis
PolloAPI.web.buscar("query") β Web search
PolloAPI.info.MessageUsed() β Messages used
PolloAPI.info.Plan() β User plan
PolloAPI.info.Usuario() β User info
PolloAPI.utilidades.fecha() β Current date
PolloAPI.utilidades.random(min, max) β Random number
PolloAPI.utilidades.esperar(ms) β Wait milliseconds
# Runs when extension loads
funcion iniciar() {
PolloAPI.chat.enviar("Started!")
}
# Runs on each user message
cuando mensaje_recibido(msg) {
si (msg contiene "hello") {
PolloAPI.chat.enviar("Hi! π")
}
}
# Show custom artifact
PolloAPI.chat.enviar("artefacto_style_[1]")
# Show artifact from URL
PolloAPI.chat.enviar("artefacto_[\"https://example.com\"]")
β
Use # for comments β β NOT //
β
Use "text " + variable β β NOT template literals
β
AI logic in .pol β β NOT in .html/.js