@thothdev/pink 1.0.12 → 1.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,11 @@
3
3
  O Pink é um fork do Pi (MIT, veja `LICENSE-PI.txt` e `NOTICE.md`). Aqui só entra o que mudou no Pink; a base de cada
4
4
  versão está no campo `upstream` do `rebrand.json` do repositório.
5
5
 
6
+ ## [1.0.13] - 2026-11-25
7
+
8
+ - Subagentes: na tela cheia ficam na coluna da direita, abaixo da SESSÃO; fora dela (modo regular ou terminal
9
+ estreito), embaixo da caixa de digitar, como no Claude Code. Vale para os do Pink, do DAG do Thoth e do /agente.
10
+
6
11
  ## [1.0.12] - 2026-11-25
7
12
 
8
13
  - Comandos com opções: o Tab no nome (/microf + Tab) completa e já mostra as opções; Enter sem nada abre um menu
@@ -375,7 +375,7 @@ export default function (pink: any, list: typeof externalAgents = externalAgents
375
375
  return fit(` ${mark} ${theme.fg("text", item.agent)} ${theme.fg("muted", item.task)} ${theme.fg("dim", clock)}`, width);
376
376
  }),
377
377
  invalidate() {},
378
- }) : undefined, { placement: "aboveEditor" });
378
+ }) : undefined, { placement: "belowEditor" }); // sem a lateral: embaixo da caixa, como no Claude Code (owner 2026-11-25)
379
379
  screenRef?.requestRender?.(); // a lateral relê a lista mesmo com a conversa parada
380
380
  };
381
381
  tick();
@@ -292,6 +292,7 @@ export async function savedSnapshot(entries, entryId, cwd, run = runGit) {
292
292
  export const LEFT_WIDTH = 32; // com a borda (pink.3: +2 para o horário de cada sessão)
293
293
  export const RIGHT_WIDTH = 36; // com a borda
294
294
  const ABOVE_BOX = "pink-acima-da-caixa";
295
+ const BELOW_BOX = "pink-subagentes-embaixo";
295
296
  export const THREE_COLUMNS = 150; // >= 150: sessões, conversa e contexto
296
297
  export const TWO_COLUMNS = 115; // 115-149: some a coluna de sessões; < 115: só a conversa
297
298
  export const PLACEHOLDER = t("Peça a próxima etapa...", "Pide el siguiente paso...", "Ask for the next step...");
@@ -431,13 +432,12 @@ export function agentLine(theme, item, width, now = Date.now()) {
431
432
  return footerLine({ theme, width, left: fit(text, Math.max(1, width - visible(clock) - 1)), right: clock });
432
433
  }
433
434
 
434
- // Acima da caixa enquanto o Pink trabalha (owner 2026-11-25): os subagentes quando a coluna da direita não está na tela
435
- // (modo regular ou terminal estreito) e, por último, uma linha vazia que separa o "Trabalhando" da caixa de digitar.
436
- // Os de segundo plano não entram: o pink-subagent-bg já os lista embaixo da caixa sem a coluna.
437
- export function aboveBox(theme, width, { agents = [], side = false, now = Date.now() } = {}) {
438
- const shown = side ? [] : agents;
439
- const head = shown.length ? [` ${theme.fg("muted", `${t("SUBAGENTES", "SUBAGENTES", "SUBAGENTS")} ${shown.length}`)}`, ...shown.map((item) => ` ${agentLine(theme, item, Math.max(10, width - 2), now)}`)] : [];
440
- return [...head, ""];
435
+ // Subagentes enquanto o Pink trabalha (owner 2026-11-25): na tela cheia ficam na coluna da direita; sem ela (modo regular
436
+ // ou terminal estreito), embaixo da caixa de digitar, como no Claude Code. Os de segundo plano não entram: o
437
+ // pink-subagent-bg já os lista embaixo da caixa sem a coluna.
438
+ export function belowBox(theme, width, { agents = [], side = false, now = Date.now() } = {}) {
439
+ if (side || !agents.length) return [];
440
+ return [` ${theme.fg("muted", `${t("SUBAGENTES", "SUBAGENTES", "SUBAGENTS")} ${agents.length}`)}`, ...agents.map((item) => ` ${agentLine(theme, item, Math.max(10, width - 2), now)}`)];
441
441
  }
442
442
 
443
443
  export const MAX_CHANGES = 5;
@@ -1573,17 +1573,19 @@ function registerOpenCodeFunctions(pink) {
1573
1573
  PINK.runShow = show; // o message_update também atualiza (tokens), o relógio só o tempo
1574
1574
  PINK.runTimer = setInterval(show, 1000);
1575
1575
  PINK.runTimer.unref?.();
1576
- // o relógio de cima (1 s) redesenha a tela, e esta lista junto
1577
- ctx.ui.setWidget?.(ABOVE_BOX, (_tui, theme) => ({
1578
- render: (width) => aboveBox(theme, width, { agents: [...runningSubagents(PINK.subagents), ...dagAgentsCached(ctx.cwd)], side: Date.now() - (globalThis.__pinkSideAt ?? 0) < 5000 }),
1576
+ // uma linha vazia entre o "Trabalhando" e a caixa; o relógio de cima (1 s) redesenha a tela e a lista de baixo junto
1577
+ ctx.ui.setWidget?.(ABOVE_BOX, [""], { placement: "aboveEditor" });
1578
+ ctx.ui.setWidget?.(BELOW_BOX, (_tui, theme) => ({
1579
+ render: (width) => belowBox(theme, width, { agents: [...runningSubagents(PINK.subagents), ...dagAgentsCached(ctx.cwd)], side: Date.now() - (globalThis.__pinkSideAt ?? 0) < 5000 }),
1579
1580
  invalidate() {},
1580
- }), { placement: "aboveEditor" });
1581
+ }), { placement: "belowEditor" });
1581
1582
  });
1582
1583
  pink.on("agent_end", async (_event, ctx) => {
1583
1584
  clearInterval(PINK.runTimer);
1584
1585
  PINK.subagents.clear(); // ferramenta bloqueada ou interrompida não manda tool_result
1585
1586
  ctx.ui.setWorkingMessage?.();
1586
1587
  ctx.ui.setWidget?.(ABOVE_BOX, undefined);
1588
+ ctx.ui.setWidget?.(BELOW_BOX, undefined);
1587
1589
  if (PINK.run?.last !== undefined) PINK.runOf.set(PINK.run.last, PINK.run.summary());
1588
1590
  [PINK.lastRun, PINK.lastRunEnd, PINK.run, PINK.runShow] = [PINK.run, Date.now(), undefined, undefined];
1589
1591
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thothdev/pink",
3
- "version": "1.0.12",
3
+ "version": "1.0.13",
4
4
  "description": "Pink: coding agent of the Thoth project, with a pink theme",
5
5
  "type": "module",
6
6
  "piConfig": {