Arm the target button in the composer and the next prompt becomes a goal: the server keeps the session working toward it (idle tick -> small-model audit -> continuation) until the objective is verifiably complete, blocked, or out of budget — even with the UI closed. Server (packages/web/server/lib/session-goal): - event-driven loop on the global SSE hub; goal state lives in session.metadata.openchamber.goal (merge-safe patches, stale-write guard by goal id), so it survives restarts and syncs to every client for free - the small-model audit (objective + last assistant turn only, language pinned to the objective) is the sole termination authority; blocked needs 3 consecutive verdicts, audit outages tolerate one unaudited continuation then stop the goal as resumable-blocked - hard stops: optional token budget, auto-continuation cap (Resume grants a fresh allowance), turn errors; user abort pauses the goal instead of blocking it, and resuming over an aborted tail nudges immediately - token accounting as a snapshot of the latest turn (input + cache.read + output), goal-relative via a creation baseline and segmented across compactions; a compaction summary skips the audit and continues - continuations reuse the session's own provider/model/agent/variant UI: - three-mode target button (arm / disarm / manage dialog), informational goal strip with inline pause/resume and an Evaluating indicator, sidebar state glyph, objective length counter (2000-char server clamp), read-only completed goals - goal entry points: composer (sessions and drafts), start-new-session- from-answer dialog, plan implement dialog (plan content becomes the objective), scheduled tasks (Run as goal + budget) - Settings -> Chat -> Goal: feature toggle + default token budget with three-layer parity (web server, client persistence, VS Code bridge); VS Code renders goal state but hides the entry points (the loop runs in the web server only) Notifications: per-turn "ready" notifications are suppressed while a goal is active; settling sends one final notification (desktop, web-push, APNs generic titles with the session name as body) honoring the completion toggle. Error/question/permission notifications are untouched. Docs: user guide (session-goals) in all 9 locales + sidebar entry, scheduled-tasks cross-reference, server module DOCUMENTATION.md.
36 lines
1.7 KiB
Plaintext
36 lines
1.7 KiB
Plaintext
---
|
|
title: Tarefas Agendadas
|
|
description: Execute um prompt automaticamente em uma agenda.
|
|
---
|
|
|
|
# Tarefas Agendadas
|
|
|
|
Uma tarefa agendada executa um prompt para você em uma agenda — por exemplo, um "resumir as mudanças de ontem" diário ou uma limpeza semanal. Quando ela é executada, o OpenChamber inicia uma nova sessão e envia o prompt sozinho. Abra o agendador pelo botão no topo da barra lateral de sessões.
|
|
|
|
## Criar uma tarefa
|
|
|
|
1. Abra a caixa de diálogo de tarefas agendadas pela barra lateral de sessões.
|
|
2. Adicione uma tarefa e dê a ela um nome.
|
|
3. Escolha quando ela é executada:
|
|
- **diária** — em um ou mais horários a cada dia
|
|
- **semanal** — em dias da semana e horários escolhidos
|
|
- **uma vez** — uma única data e hora
|
|
4. Defina o que ela faz: o prompt a enviar, e o provedor, modelo e agente a usar. O prompt pode ser um comando de barra, como `/review`.
|
|
5. Salve e certifique-se de que a tarefa está ativada.
|
|
|
|
Você pode executar qualquer tarefa imediatamente com **run now** para verificar se ela faz o que você espera.
|
|
|
|
Marque **Executar como objetivo** para que a execução persiga o prompt até concluir em vez de parar após uma resposta — veja [Objetivos de sessão](/session-goals/).
|
|
|
|
## Como é o sucesso
|
|
|
|
Após uma execução, a tarefa mostra quando rodou pela última vez, se teve êxito e um link para a sessão que ela criou. Se uma execução falha, o erro também é mostrado ali.
|
|
|
|
## Tenha em mente
|
|
|
|
As tarefas só disparam enquanto o servidor do OpenChamber estiver em execução. Se você o fechar, as execuções agendadas ficam pausadas até ele voltar a funcionar.
|
|
|
|
## Relacionado
|
|
|
|
- [Comandos e Snippets](/pt-br/commands-snippets/) — reutilize um comando de barra como o prompt
|