Merge feature/98-99-100 into main
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
added
.memory/handoffs/2026-11-15-98-99-100.md +9 -0 | new file mode 100644 | ||
| @@ -0,0 +1,9 @@ | ||
| 1 | +# Handoff — 2026-11-15 — #98, #99, #100 | |
| 2 | + | |
| 3 | +## State | |
| 4 | + | |
| 5 | +Branch `feature/98-99-100` (from main; nothing pushed, not merged). One commit per ticket (+ OpenAI logo, + order-tolerant creator tests). Tickets still open, waiting for the owner's test on the Mac: #98 (task 1: real sbx/docker output), #99, #100. | |
| 6 | + | |
| 7 | +## Next steps | |
| 8 | + | |
| 9 | +On the Mac: create a sbx agent (logos on the cards, name following the title, taken name warning), write to it the first time (progress card while `sbx env create` pulls). If sbx prints no percentage, the card shows the animation and the last line — fine; if its lines are noisy (ANSI codes, carriage returns), clean them in `agents.Manager.log` before `emitProgress`. | |
| new file mode 100644 | |||
| @@ -0,0 +1,9 @@ | |||
| 1 | +# Handoff — 2026-11-15 — #98, #99, #100 | ||
| 2 | + | ||
| 3 | +## State | ||
| 4 | + | ||
| 5 | +Branch `feature/98-99-100` (from main; nothing pushed, not merged). One commit per ticket (+ OpenAI logo, + order-tolerant creator tests). Tickets still open, waiting for the owner's test on the Mac: #98 (task 1: real sbx/docker output), #99, #100. | ||
| 6 | + | ||
| 7 | +## Next steps | ||
| 8 | + | ||
| 9 | +On the Mac: create a sbx agent (logos on the cards, name following the title, taken name warning), write to it the first time (progress card while `sbx env create` pulls). If sbx prints no percentage, the card shows the animation and the last line — fine; if its lines are noisy (ANSI codes, carriage returns), clean them in `agents.Manager.log` before `emitProgress`. | ||
modified
.memory/history.md +10 -0 | @@ -282,3 +282,13 @@ | ||
| 282 | 282 | - **2026-11-15 — #86 closed** (owner's word) **and ticket #99** (owner: "in the wizard, the display name and the @ name: by default make the name from the display name"): #99 in v1.5.0 (listed in #93) — @ name derived from the title (agentform `nameFromTitle`, no `_` for sbx) and following it until edited, free variant suggested; also in the mini-me assistant (add the title field, prefilled by mm). Not started. |
| 283 | 283 | - **2026-11-15 — #86 confirmed** (owner: "the Vibe agent works"): comment added; `agent: vibe` + `vibe-acp` verified on the Mac. |
| 284 | 284 | - **2026-11-15 — ticket #100** (owner: "official brand logos for the 4 agents of the wizard"): #100 in v1.5.0 (listed in #93) — needs an image icon (`icon: "logo:<kind>"`, bundled SVGs) beyond emoji/letter, light/dark themes, and checking each brand's usage rules (trademarks; Simple Icons is CC0 but does not grant trademark rights). Not started. |
| 285 | + | |
| 286 | +## 2026-11-15 — #99, #100, #98 (branch feature/98-99-100) | |
| 287 | + | |
| 288 | +- Asked: "implement 98, 99 and 100" (+ mid-way: "for Codex take OpenAI's logo"). | |
| 289 | +- #99: `sbxNameFromTitle`, `freeName` (lib/creator.ts); Go returns `taken` (SbxCheck, CreatorStart); both assistants: @ name follows the name shown until typed, taken name flagged before sending with a suggestion; mini-me assistant got a "Name shown" field (CreatorFinish.title). For mini-me the @ name starts from mm's name and follows the title once it is edited. | |
| 290 | +- Flaky creator tests found when all packages run together: a message mm sends just before a form may come with the next view (SDK goroutines) — tests made order-tolerant (own commit). | |
| 291 | +- #100: icon `logo:<name>` (claude, gemini, openai, mistral) on a white disc; Simple Icons 16.37.0 (CC0) and 13.21.0 for OpenAI (removed later; owner chose to ship it); config warning + schema; Go↔TS list test; catalogue icons; wizard cards/picker draw logos. Brand rules not read in detail — owner's decision recorded in #100. | |
| 292 | +- #98: `agent:progress` events from agents.Manager (checking → preparing on first lifecycle line → connecting; every line during start; Status.step/since), `progress.ts` (percent / sizes, elapsed), `StartProgress.svelte`, Agents panel short step, `showLog`. Xvfb with a fake slow `sbx env create`: card, bar, log button, then the answer. Task 1 (real sbx/docker output) open. | |
| 293 | +- Checks: Go + vitest + lint + svelte-check green. Docs EN/FR (guides, references, release notes v1.5.0). | |
| 294 | +- **2026-11-15 — #98, #99, #100 closed** (owner tested on the Mac: it works); feature/98-99-100 merged into main (not pushed). | |
| @@ -282,3 +282,13 @@ | |||
| 282 | - **2026-11-15 — #86 closed** (owner's word) **and ticket #99** (owner: "in the wizard, the display name and the @ name: by default make the name from the display name"): #99 in v1.5.0 (listed in #93) — @ name derived from the title (agentform `nameFromTitle`, no `_` for sbx) and following it until edited, free variant suggested; also in the mini-me assistant (add the title field, prefilled by mm). Not started. | 282 | - **2026-11-15 — #86 closed** (owner's word) **and ticket #99** (owner: "in the wizard, the display name and the @ name: by default make the name from the display name"): #99 in v1.5.0 (listed in #93) — @ name derived from the title (agentform `nameFromTitle`, no `_` for sbx) and following it until edited, free variant suggested; also in the mini-me assistant (add the title field, prefilled by mm). Not started. |
| 283 | - **2026-11-15 — #86 confirmed** (owner: "the Vibe agent works"): comment added; `agent: vibe` + `vibe-acp` verified on the Mac. | 283 | - **2026-11-15 — #86 confirmed** (owner: "the Vibe agent works"): comment added; `agent: vibe` + `vibe-acp` verified on the Mac. |
| 284 | - **2026-11-15 — ticket #100** (owner: "official brand logos for the 4 agents of the wizard"): #100 in v1.5.0 (listed in #93) — needs an image icon (`icon: "logo:<kind>"`, bundled SVGs) beyond emoji/letter, light/dark themes, and checking each brand's usage rules (trademarks; Simple Icons is CC0 but does not grant trademark rights). Not started. | 284 | - **2026-11-15 — ticket #100** (owner: "official brand logos for the 4 agents of the wizard"): #100 in v1.5.0 (listed in #93) — needs an image icon (`icon: "logo:<kind>"`, bundled SVGs) beyond emoji/letter, light/dark themes, and checking each brand's usage rules (trademarks; Simple Icons is CC0 but does not grant trademark rights). Not started. |
| 285 | + | ||
| 286 | +## 2026-11-15 — #99, #100, #98 (branch feature/98-99-100) | ||
| 287 | + | ||
| 288 | +- Asked: "implement 98, 99 and 100" (+ mid-way: "for Codex take OpenAI's logo"). | ||
| 289 | +- #99: `sbxNameFromTitle`, `freeName` (lib/creator.ts); Go returns `taken` (SbxCheck, CreatorStart); both assistants: @ name follows the name shown until typed, taken name flagged before sending with a suggestion; mini-me assistant got a "Name shown" field (CreatorFinish.title). For mini-me the @ name starts from mm's name and follows the title once it is edited. | ||
| 290 | +- Flaky creator tests found when all packages run together: a message mm sends just before a form may come with the next view (SDK goroutines) — tests made order-tolerant (own commit). | ||
| 291 | +- #100: icon `logo:<name>` (claude, gemini, openai, mistral) on a white disc; Simple Icons 16.37.0 (CC0) and 13.21.0 for OpenAI (removed later; owner chose to ship it); config warning + schema; Go↔TS list test; catalogue icons; wizard cards/picker draw logos. Brand rules not read in detail — owner's decision recorded in #100. | ||
| 292 | +- #98: `agent:progress` events from agents.Manager (checking → preparing on first lifecycle line → connecting; every line during start; Status.step/since), `progress.ts` (percent / sizes, elapsed), `StartProgress.svelte`, Agents panel short step, `showLog`. Xvfb with a fake slow `sbx env create`: card, bar, log button, then the answer. Task 1 (real sbx/docker output) open. | ||
| 293 | +- Checks: Go + vitest + lint + svelte-check green. Docs EN/FR (guides, references, release notes v1.5.0). | ||
| 294 | +- **2026-11-15 — #98, #99, #100 closed** (owner tested on the Mac: it works); feature/98-99-100 merged into main (not pushed). | ||
modified
.memory/summary.md +1 -0 | @@ -27,6 +27,7 @@ What exists: | ||
| 27 | 27 | - Mini-me creation assistant (#94, `CreatorService`, page `CreateMiniMeAgent.svelte`): Sidekicks is the ACP client of `mm --acp-create --project yes --output .mm/agent.yaml` (mm ≥ 1.0.9, checked with `mm --version`; an unparsable version is accepted); `.mm` layout imposed; the wizard runs in `<agentsFolder>/.sidekicks-new-agent-*`, renamed to `<agentsFolder>/<name>` at Finish (name = folder = agent name; an existing folder is never touched); container/sbx files come from `/dockerinit` / `/sbxinit` in an mm restarted in the final folder. `agentsFolder` (top-level config key) defaults to `~/Documents`. mm's questions stay in English (they are mm's). |
| 28 | 28 | - Agent forms (#95): every conversation agent is started with `acp.Spec.Forms` (advertises `elicitation.form`); a form goes to the session named in `_meta["mm.elicitationScope"]`, else to the only session with a prompt in flight, and is shown as a `FormCard` under the answer (`form:requested`/`form:resolved`, `ChannelService.AnswerForm`); Stop cancels it. Fields rendered by `chat/FormFields.svelte`, shared with the creator. |
| 29 | 29 | - Sandbox creation assistant (#96, `SbxCreatorService`, page `CreateSbxAgent.svelte`, package `internal/sbxcreate`): catalogue of kinds (Claude `claude-agent-acp`, Gemini through Antigravity `agy acp` with kit `docker.io/sbx/antigravity`, Codex `codex-acp`, Vibe `vibe-acp` with kit `docker.io/sbx/vibe-kit`, service `mistral` — #86); writes `<agentsFolder>/<name>/sbxenv.yaml` (English comments) + `workspace/`; name = agent = folder = sandbox (`^[a-z][a-z0-9-]{0,31}$`); API key checked with `sbx secret ls --service`, set with `sbx secret set <service>` on stdin (never in args, files or logs). `appState.creator` is `'' | 'mini-me' | 'sbx'`. |
| 30 | +- Agent icons (#100): `icon` may be `logo:<name>` (`config.LogoNames` = claude, gemini, openai, mistral; drawn by `frontend/src/lib/logos.ts` from Simple Icons, CC0 — OpenAI from 13.21.0; a Go test checks both lists; unknown name = warning, shows a letter). Start progress (#98): `agent:progress` {agent, step checking|preparing|connecting, line, since} from `agents.Manager`, card `chat/StartProgress.svelte`; `showLog(agent)` opens the Log panel. Assistants' @ name follows the name shown until edited, free variant from Go's `taken` list (#99). | |
| 30 | 31 | - Interface language: ADR 0005 — `ui.language` defaults to `en`; every UI text is a key of `frontend/src/lib/i18n/messages.ts` (`fr` typed `Record<MessageKey,string>`, test checks keys and variables); config errors use the Go catalogue in the same language; agent titles and channel names are user data, never translated. Default config file and `examples/test-agents.yaml` are in English. |
| 31 | 32 | - Packages and data model: ADR 0003 + Amendments 1 and 2 (main at the root, only main.go imports Wails, `internal/events` with an `Emitter` interface, LRU eviction of idle agents at the limit). |
| 32 | 33 | - Frontend dependencies with **pnpm 12.11.2** and `frontend/pnpm-workspace.yaml` `supportedArchitectures` (darwin+linux): the repository folder is shared between the Mac and the Linux sandbox. Never use npm in `frontend/`. |
| @@ -27,6 +27,7 @@ What exists: | |||
| 27 | - Mini-me creation assistant (#94, `CreatorService`, page `CreateMiniMeAgent.svelte`): Sidekicks is the ACP client of `mm --acp-create --project yes --output .mm/agent.yaml` (mm ≥ 1.0.9, checked with `mm --version`; an unparsable version is accepted); `.mm` layout imposed; the wizard runs in `<agentsFolder>/.sidekicks-new-agent-*`, renamed to `<agentsFolder>/<name>` at Finish (name = folder = agent name; an existing folder is never touched); container/sbx files come from `/dockerinit` / `/sbxinit` in an mm restarted in the final folder. `agentsFolder` (top-level config key) defaults to `~/Documents`. mm's questions stay in English (they are mm's). | 27 | - Mini-me creation assistant (#94, `CreatorService`, page `CreateMiniMeAgent.svelte`): Sidekicks is the ACP client of `mm --acp-create --project yes --output .mm/agent.yaml` (mm ≥ 1.0.9, checked with `mm --version`; an unparsable version is accepted); `.mm` layout imposed; the wizard runs in `<agentsFolder>/.sidekicks-new-agent-*`, renamed to `<agentsFolder>/<name>` at Finish (name = folder = agent name; an existing folder is never touched); container/sbx files come from `/dockerinit` / `/sbxinit` in an mm restarted in the final folder. `agentsFolder` (top-level config key) defaults to `~/Documents`. mm's questions stay in English (they are mm's). |
| 28 | - Agent forms (#95): every conversation agent is started with `acp.Spec.Forms` (advertises `elicitation.form`); a form goes to the session named in `_meta["mm.elicitationScope"]`, else to the only session with a prompt in flight, and is shown as a `FormCard` under the answer (`form:requested`/`form:resolved`, `ChannelService.AnswerForm`); Stop cancels it. Fields rendered by `chat/FormFields.svelte`, shared with the creator. | 28 | - Agent forms (#95): every conversation agent is started with `acp.Spec.Forms` (advertises `elicitation.form`); a form goes to the session named in `_meta["mm.elicitationScope"]`, else to the only session with a prompt in flight, and is shown as a `FormCard` under the answer (`form:requested`/`form:resolved`, `ChannelService.AnswerForm`); Stop cancels it. Fields rendered by `chat/FormFields.svelte`, shared with the creator. |
| 29 | - Sandbox creation assistant (#96, `SbxCreatorService`, page `CreateSbxAgent.svelte`, package `internal/sbxcreate`): catalogue of kinds (Claude `claude-agent-acp`, Gemini through Antigravity `agy acp` with kit `docker.io/sbx/antigravity`, Codex `codex-acp`, Vibe `vibe-acp` with kit `docker.io/sbx/vibe-kit`, service `mistral` — #86); writes `<agentsFolder>/<name>/sbxenv.yaml` (English comments) + `workspace/`; name = agent = folder = sandbox (`^[a-z][a-z0-9-]{0,31}$`); API key checked with `sbx secret ls --service`, set with `sbx secret set <service>` on stdin (never in args, files or logs). `appState.creator` is `'' | 'mini-me' | 'sbx'`. | 29 | - Sandbox creation assistant (#96, `SbxCreatorService`, page `CreateSbxAgent.svelte`, package `internal/sbxcreate`): catalogue of kinds (Claude `claude-agent-acp`, Gemini through Antigravity `agy acp` with kit `docker.io/sbx/antigravity`, Codex `codex-acp`, Vibe `vibe-acp` with kit `docker.io/sbx/vibe-kit`, service `mistral` — #86); writes `<agentsFolder>/<name>/sbxenv.yaml` (English comments) + `workspace/`; name = agent = folder = sandbox (`^[a-z][a-z0-9-]{0,31}$`); API key checked with `sbx secret ls --service`, set with `sbx secret set <service>` on stdin (never in args, files or logs). `appState.creator` is `'' | 'mini-me' | 'sbx'`. |
| 30 | +- Agent icons (#100): `icon` may be `logo:<name>` (`config.LogoNames` = claude, gemini, openai, mistral; drawn by `frontend/src/lib/logos.ts` from Simple Icons, CC0 — OpenAI from 13.21.0; a Go test checks both lists; unknown name = warning, shows a letter). Start progress (#98): `agent:progress` {agent, step checking|preparing|connecting, line, since} from `agents.Manager`, card `chat/StartProgress.svelte`; `showLog(agent)` opens the Log panel. Assistants' @ name follows the name shown until edited, free variant from Go's `taken` list (#99). | ||
| 30 | - Interface language: ADR 0005 — `ui.language` defaults to `en`; every UI text is a key of `frontend/src/lib/i18n/messages.ts` (`fr` typed `Record<MessageKey,string>`, test checks keys and variables); config errors use the Go catalogue in the same language; agent titles and channel names are user data, never translated. Default config file and `examples/test-agents.yaml` are in English. | 31 | - Interface language: ADR 0005 — `ui.language` defaults to `en`; every UI text is a key of `frontend/src/lib/i18n/messages.ts` (`fr` typed `Record<MessageKey,string>`, test checks keys and variables); config errors use the Go catalogue in the same language; agent titles and channel names are user data, never translated. Default config file and `examples/test-agents.yaml` are in English. |
| 31 | - Packages and data model: ADR 0003 + Amendments 1 and 2 (main at the root, only main.go imports Wails, `internal/events` with an `Emitter` interface, LRU eviction of idle agents at the limit). | 32 | - Packages and data model: ADR 0003 + Amendments 1 and 2 (main at the root, only main.go imports Wails, `internal/events` with an `Emitter` interface, LRU eviction of idle agents at the limit). |
| 32 | - Frontend dependencies with **pnpm 12.11.2** and `frontend/pnpm-workspace.yaml` `supportedArchitectures` (darwin+linux): the repository folder is shared between the Mac and the Linux sandbox. Never use npm in `frontend/`. | 33 | - Frontend dependencies with **pnpm 12.11.2** and `frontend/pnpm-workspace.yaml` `supportedArchitectures` (darwin+linux): the repository folder is shared between the Mac and the Linux sandbox. Never use npm in `frontend/`. |
modified
.tickets/issues/0098-afficher-la-progression-de-la-creation-d-une-san.yaml +40 -8 | @@ -1,12 +1,12 @@ | ||
| 1 | 1 | # Managed by IssueSpec. Hand edits are welcome; keep the schema valid. |
| 2 | 2 | id: 98 |
| 3 | 3 | title: "Afficher la progression de la création d'une sandbox (ou d'un conteneur) au premier démarrage" |
| 4 | -state: open | |
| 4 | +state: closed | |
| 5 | 5 | author: |
| 6 | 6 | name: k33g |
| 7 | 7 | email: ph.charriere@gmail.com |
| 8 | 8 | createdAt: 2026-11-15T03:10:13.000Z |
| 9 | -updatedAt: 2026-11-15T03:10:13.000Z | |
| 9 | +updatedAt: 2026-11-15T03:41:06.000Z | |
| 10 | 10 | labels: |
| 11 | 11 | - kind::feature |
| 12 | 12 | - area::ui |
| @@ -58,42 +58,74 @@ body: | | ||
| 58 | 58 | tasks: |
| 59 | 59 | - id: 1 |
| 60 | 60 | title: "Relever la sortie réelle de sbx env create et de docker compose up --build hors terminal (sur le Mac)" |
| 61 | - state: open | |
| 61 | + state: closed | |
| 62 | 62 | priority: high |
| 63 | 63 | author: |
| 64 | 64 | name: k33g |
| 65 | 65 | email: ph.charriere@gmail.com |
| 66 | 66 | createdAt: 2026-11-15T03:10:13.000Z |
| 67 | + updatedAt: 2026-11-15T03:41:06.000Z | |
| 68 | + closedAt: 2026-11-15T03:41:06.000Z | |
| 67 | 69 | - id: 2 |
| 68 | 70 | title: "Go : événement de progression (agent, étape, dernière ligne, début) depuis Ensure et le démarrage ACP" |
| 69 | - state: open | |
| 71 | + state: closed | |
| 70 | 72 | priority: high |
| 71 | 73 | author: |
| 72 | 74 | name: k33g |
| 73 | 75 | email: ph.charriere@gmail.com |
| 74 | 76 | createdAt: 2026-11-15T03:10:13.000Z |
| 77 | + updatedAt: 2026-11-15T03:34:55.000Z | |
| 78 | + closedAt: 2026-11-15T03:34:55.000Z | |
| 75 | 79 | - id: 3 |
| 76 | 80 | title: "Interface : carte de progression dans la conversation (étape, temps écoulé, dernière ligne, lien Journal) et sur la ligne de l'agent" |
| 77 | - state: open | |
| 81 | + state: closed | |
| 78 | 82 | priority: high |
| 79 | 83 | author: |
| 80 | 84 | name: k33g |
| 81 | 85 | email: ph.charriere@gmail.com |
| 82 | 86 | createdAt: 2026-11-15T03:10:13.000Z |
| 87 | + updatedAt: 2026-11-15T03:34:55.000Z | |
| 88 | + closedAt: 2026-11-15T03:34:55.000Z | |
| 83 | 89 | - id: 4 |
| 84 | 90 | title: "Lecture des pourcentages / tailles quand la sortie en donne (barre), sinon animation indéterminée" |
| 85 | - state: open | |
| 91 | + state: closed | |
| 86 | 92 | priority: medium |
| 87 | 93 | author: |
| 88 | 94 | name: k33g |
| 89 | 95 | email: ph.charriere@gmail.com |
| 90 | 96 | createdAt: 2026-11-15T03:10:13.000Z |
| 97 | + updatedAt: 2026-11-15T03:34:55.000Z | |
| 98 | + closedAt: 2026-11-15T03:34:55.000Z | |
| 91 | 99 | - id: 5 |
| 92 | 100 | title: "Tests Go + vitest, textes et doc EN + FR, notes de release v1.5.0" |
| 93 | - state: open | |
| 101 | + state: closed | |
| 94 | 102 | priority: medium |
| 95 | 103 | author: |
| 96 | 104 | name: k33g |
| 97 | 105 | email: ph.charriere@gmail.com |
| 98 | 106 | createdAt: 2026-11-15T03:10:13.000Z |
| 99 | -comments: [] | |
| 107 | + updatedAt: 2026-11-15T03:34:55.000Z | |
| 108 | + closedAt: 2026-11-15T03:34:55.000Z | |
| 109 | +comments: | |
| 110 | + - id: 1 | |
| 111 | + author: | |
| 112 | + name: k33g | |
| 113 | + email: ph.charriere@gmail.com | |
| 114 | + createdAt: 2026-11-15T03:34:55.000Z | |
| 115 | + body: | | |
| 116 | + Implémenté sur `feature/98-99-100` : événement `agent:progress` (`agents.Manager` : étapes `checking` → | |
| 117 | + `preparing` (une ligne de la commande de cycle de vie) → `connecting`, chaque ligne du démarrage, heure de | |
| 118 | + début ; `Status.step/since` pour une interface rechargée), `lib/progress.ts` (pourcentage ou tailles | |
| 119 | + `fait/total`, temps écoulé), carte `StartProgress.svelte` dans la conversation (étape, temps, phrase qui | |
| 120 | + rassure, barre, dernière ligne, « Voir le journal » qui ouvre le Journal sur l'agent), étape courte dans le panneau | |
| 121 | + Agents. Vérifié : tests Go et vitest ; sous Xvfb avec un faux sbx qui « télécharge » (5 % … 100 %) puis lance un | |
| 122 | + faux agent ACP : carte, barre, journal, puis la réponse. Reste la tâche 1 : la sortie réelle de `sbx env create` | |
| 123 | + et de `docker compose up` hors terminal (si elle ne donne pas de pourcentage, la carte montre l'animation et la | |
| 124 | + dernière ligne). | |
| 125 | + - id: 2 | |
| 126 | + author: | |
| 127 | + name: k33g | |
| 128 | + email: ph.charriere@gmail.com | |
| 129 | + createdAt: 2026-11-15T03:41:06.000Z | |
| 130 | + body: | | |
| 131 | + Testé sur le Mac par l'owner : ça fonctionne. Ticket fermé. | |
| @@ -1,12 +1,12 @@ | |||
| 1 | # Managed by IssueSpec. Hand edits are welcome; keep the schema valid. | 1 | # Managed by IssueSpec. Hand edits are welcome; keep the schema valid. |
| 2 | id: 98 | 2 | id: 98 |
| 3 | title: "Afficher la progression de la création d'une sandbox (ou d'un conteneur) au premier démarrage" | 3 | title: "Afficher la progression de la création d'une sandbox (ou d'un conteneur) au premier démarrage" |
| 4 | -state: open | 4 | +state: closed |
| 5 | author: | 5 | author: |
| 6 | name: k33g | 6 | name: k33g |
| 7 | email: ph.charriere@gmail.com | 7 | email: ph.charriere@gmail.com |
| 8 | createdAt: 2026-11-15T03:10:13.000Z | 8 | createdAt: 2026-11-15T03:10:13.000Z |
| 9 | -updatedAt: 2026-11-15T03:10:13.000Z | 9 | +updatedAt: 2026-11-15T03:41:06.000Z |
| 10 | labels: | 10 | labels: |
| 11 | - kind::feature | 11 | - kind::feature |
| 12 | - area::ui | 12 | - area::ui |
| @@ -58,42 +58,74 @@ body: | | |||
| 58 | tasks: | 58 | tasks: |
| 59 | - id: 1 | 59 | - id: 1 |
| 60 | title: "Relever la sortie réelle de sbx env create et de docker compose up --build hors terminal (sur le Mac)" | 60 | title: "Relever la sortie réelle de sbx env create et de docker compose up --build hors terminal (sur le Mac)" |
| 61 | - state: open | 61 | + state: closed |
| 62 | priority: high | 62 | priority: high |
| 63 | author: | 63 | author: |
| 64 | name: k33g | 64 | name: k33g |
| 65 | email: ph.charriere@gmail.com | 65 | email: ph.charriere@gmail.com |
| 66 | createdAt: 2026-11-15T03:10:13.000Z | 66 | createdAt: 2026-11-15T03:10:13.000Z |
| 67 | + updatedAt: 2026-11-15T03:41:06.000Z | ||
| 68 | + closedAt: 2026-11-15T03:41:06.000Z | ||
| 67 | - id: 2 | 69 | - id: 2 |
| 68 | title: "Go : événement de progression (agent, étape, dernière ligne, début) depuis Ensure et le démarrage ACP" | 70 | title: "Go : événement de progression (agent, étape, dernière ligne, début) depuis Ensure et le démarrage ACP" |
| 69 | - state: open | 71 | + state: closed |
| 70 | priority: high | 72 | priority: high |
| 71 | author: | 73 | author: |
| 72 | name: k33g | 74 | name: k33g |
| 73 | email: ph.charriere@gmail.com | 75 | email: ph.charriere@gmail.com |
| 74 | createdAt: 2026-11-15T03:10:13.000Z | 76 | createdAt: 2026-11-15T03:10:13.000Z |
| 77 | + updatedAt: 2026-11-15T03:34:55.000Z | ||
| 78 | + closedAt: 2026-11-15T03:34:55.000Z | ||
| 75 | - id: 3 | 79 | - id: 3 |
| 76 | title: "Interface : carte de progression dans la conversation (étape, temps écoulé, dernière ligne, lien Journal) et sur la ligne de l'agent" | 80 | title: "Interface : carte de progression dans la conversation (étape, temps écoulé, dernière ligne, lien Journal) et sur la ligne de l'agent" |
| 77 | - state: open | 81 | + state: closed |
| 78 | priority: high | 82 | priority: high |
| 79 | author: | 83 | author: |
| 80 | name: k33g | 84 | name: k33g |
| 81 | email: ph.charriere@gmail.com | 85 | email: ph.charriere@gmail.com |
| 82 | createdAt: 2026-11-15T03:10:13.000Z | 86 | createdAt: 2026-11-15T03:10:13.000Z |
| 87 | + updatedAt: 2026-11-15T03:34:55.000Z | ||
| 88 | + closedAt: 2026-11-15T03:34:55.000Z | ||
| 83 | - id: 4 | 89 | - id: 4 |
| 84 | title: "Lecture des pourcentages / tailles quand la sortie en donne (barre), sinon animation indéterminée" | 90 | title: "Lecture des pourcentages / tailles quand la sortie en donne (barre), sinon animation indéterminée" |
| 85 | - state: open | 91 | + state: closed |
| 86 | priority: medium | 92 | priority: medium |
| 87 | author: | 93 | author: |
| 88 | name: k33g | 94 | name: k33g |
| 89 | email: ph.charriere@gmail.com | 95 | email: ph.charriere@gmail.com |
| 90 | createdAt: 2026-11-15T03:10:13.000Z | 96 | createdAt: 2026-11-15T03:10:13.000Z |
| 97 | + updatedAt: 2026-11-15T03:34:55.000Z | ||
| 98 | + closedAt: 2026-11-15T03:34:55.000Z | ||
| 91 | - id: 5 | 99 | - id: 5 |
| 92 | title: "Tests Go + vitest, textes et doc EN + FR, notes de release v1.5.0" | 100 | title: "Tests Go + vitest, textes et doc EN + FR, notes de release v1.5.0" |
| 93 | - state: open | 101 | + state: closed |
| 94 | priority: medium | 102 | priority: medium |
| 95 | author: | 103 | author: |
| 96 | name: k33g | 104 | name: k33g |
| 97 | email: ph.charriere@gmail.com | 105 | email: ph.charriere@gmail.com |
| 98 | createdAt: 2026-11-15T03:10:13.000Z | 106 | createdAt: 2026-11-15T03:10:13.000Z |
| 99 | -comments: [] | 107 | + updatedAt: 2026-11-15T03:34:55.000Z |
| 108 | + closedAt: 2026-11-15T03:34:55.000Z | ||
| 109 | +comments: | ||
| 110 | + - id: 1 | ||
| 111 | + author: | ||
| 112 | + name: k33g | ||
| 113 | + email: ph.charriere@gmail.com | ||
| 114 | + createdAt: 2026-11-15T03:34:55.000Z | ||
| 115 | + body: | | ||
| 116 | + Implémenté sur `feature/98-99-100` : événement `agent:progress` (`agents.Manager` : étapes `checking` → | ||
| 117 | + `preparing` (une ligne de la commande de cycle de vie) → `connecting`, chaque ligne du démarrage, heure de | ||
| 118 | + début ; `Status.step/since` pour une interface rechargée), `lib/progress.ts` (pourcentage ou tailles | ||
| 119 | + `fait/total`, temps écoulé), carte `StartProgress.svelte` dans la conversation (étape, temps, phrase qui | ||
| 120 | + rassure, barre, dernière ligne, « Voir le journal » qui ouvre le Journal sur l'agent), étape courte dans le panneau | ||
| 121 | + Agents. Vérifié : tests Go et vitest ; sous Xvfb avec un faux sbx qui « télécharge » (5 % … 100 %) puis lance un | ||
| 122 | + faux agent ACP : carte, barre, journal, puis la réponse. Reste la tâche 1 : la sortie réelle de `sbx env create` | ||
| 123 | + et de `docker compose up` hors terminal (si elle ne donne pas de pourcentage, la carte montre l'animation et la | ||
| 124 | + dernière ligne). | ||
| 125 | + - id: 2 | ||
| 126 | + author: | ||
| 127 | + name: k33g | ||
| 128 | + email: ph.charriere@gmail.com | ||
| 129 | + createdAt: 2026-11-15T03:41:06.000Z | ||
| 130 | + body: | | ||
| 131 | + Testé sur le Mac par l'owner : ça fonctionne. Ticket fermé. | ||
modified
.tickets/issues/0099-assistants-nom-utilise-avec-cree-a-partir-du-nom.yaml +37 -8 | @@ -1,12 +1,12 @@ | ||
| 1 | 1 | # Managed by IssueSpec. Hand edits are welcome; keep the schema valid. |
| 2 | 2 | id: 99 |
| 3 | 3 | title: "Assistants : nom utilisé avec @ créé à partir du nom affiché" |
| 4 | -state: open | |
| 4 | +state: closed | |
| 5 | 5 | author: |
| 6 | 6 | name: k33g |
| 7 | 7 | email: ph.charriere@gmail.com |
| 8 | 8 | createdAt: 2026-11-15T03:18:04.000Z |
| 9 | -updatedAt: 2026-11-15T03:18:04.000Z | |
| 9 | +updatedAt: 2026-11-15T03:41:06.000Z | |
| 10 | 10 | labels: |
| 11 | 11 | - kind::feature |
| 12 | 12 | - area::ui |
| @@ -42,42 +42,71 @@ body: | | ||
| 42 | 42 | tasks: |
| 43 | 43 | - id: 1 |
| 44 | 44 | title: "Dérivation du nom @ depuis le nom affiché (agentform nameFromTitle ; variante sans _ pour sbx) et suivi tant qu'il n'est pas modifié" |
| 45 | - state: open | |
| 45 | + state: closed | |
| 46 | 46 | priority: high |
| 47 | 47 | author: |
| 48 | 48 | name: k33g |
| 49 | 49 | email: ph.charriere@gmail.com |
| 50 | 50 | createdAt: 2026-11-15T03:18:04.000Z |
| 51 | + updatedAt: 2026-11-15T03:25:02.000Z | |
| 52 | + closedAt: 2026-11-15T03:25:02.000Z | |
| 51 | 53 | - id: 2 |
| 52 | 54 | title: "Variante libre proposée (agent, dossier, sandbox) avant l'envoi" |
| 53 | - state: open | |
| 55 | + state: closed | |
| 54 | 56 | priority: medium |
| 55 | 57 | author: |
| 56 | 58 | name: k33g |
| 57 | 59 | email: ph.charriere@gmail.com |
| 58 | 60 | createdAt: 2026-11-15T03:18:04.000Z |
| 61 | + updatedAt: 2026-11-15T03:25:02.000Z | |
| 62 | + closedAt: 2026-11-15T03:25:02.000Z | |
| 59 | 63 | - id: 3 |
| 60 | 64 | title: "Assistant des sandboxes : nom affiché d'abord, nom @ qui suit" |
| 61 | - state: open | |
| 65 | + state: closed | |
| 62 | 66 | priority: high |
| 63 | 67 | author: |
| 64 | 68 | name: k33g |
| 65 | 69 | email: ph.charriere@gmail.com |
| 66 | 70 | createdAt: 2026-11-15T03:18:04.000Z |
| 71 | + updatedAt: 2026-11-15T03:25:02.000Z | |
| 72 | + closedAt: 2026-11-15T03:25:02.000Z | |
| 67 | 73 | - id: 4 |
| 68 | 74 | title: "Assistant mini-me : ajouter le nom affiché (prérempli par mm), nom @ qui suit" |
| 69 | - state: open | |
| 75 | + state: closed | |
| 70 | 76 | priority: high |
| 71 | 77 | author: |
| 72 | 78 | name: k33g |
| 73 | 79 | email: ph.charriere@gmail.com |
| 74 | 80 | createdAt: 2026-11-15T03:18:04.000Z |
| 81 | + updatedAt: 2026-11-15T03:25:02.000Z | |
| 82 | + closedAt: 2026-11-15T03:25:02.000Z | |
| 75 | 83 | - id: 5 |
| 76 | 84 | title: "Tests vitest, textes EN + FR, doc des guides" |
| 77 | - state: open | |
| 85 | + state: closed | |
| 78 | 86 | priority: medium |
| 79 | 87 | author: |
| 80 | 88 | name: k33g |
| 81 | 89 | email: ph.charriere@gmail.com |
| 82 | 90 | createdAt: 2026-11-15T03:18:04.000Z |
| 83 | -comments: [] | |
| 91 | + updatedAt: 2026-11-15T03:25:02.000Z | |
| 92 | + closedAt: 2026-11-15T03:25:02.000Z | |
| 93 | +comments: | |
| 94 | + - id: 1 | |
| 95 | + author: | |
| 96 | + name: k33g | |
| 97 | + email: ph.charriere@gmail.com | |
| 98 | + createdAt: 2026-11-15T03:25:02.000Z | |
| 99 | + body: | | |
| 100 | + Implémenté sur `feature/98-99-100` : `sbxNameFromTitle` et `freeName` (`lib/creator.ts`) ; Go renvoie les | |
| 101 | + noms pris (`SbxCheck.taken`, `CreatorStart.taken` : agents, dossiers, sandboxes) ; dans les deux assistants le | |
| 102 | + nom @ suit le nom affiché tant qu'il n'est pas tapé à la main, un nom pris est signalé avant l'envoi avec une | |
| 103 | + suggestion ; l'assistant mini-me a son champ « Nom affiché » (prérempli par mm, transmis à `Finish` en | |
| 104 | + `title`). Pour mini-me, le nom @ part du nom donné à mm (`marcel`) et ne suit le nom affiché qu'une fois | |
| 105 | + celui-ci modifié. Tests Go et vitest, svelte-check ; doc des deux guides et de la référence. | |
| 106 | + - id: 2 | |
| 107 | + author: | |
| 108 | + name: k33g | |
| 109 | + email: ph.charriere@gmail.com | |
| 110 | + createdAt: 2026-11-15T03:41:06.000Z | |
| 111 | + body: | | |
| 112 | + Testé sur le Mac par l'owner : ça fonctionne. Ticket fermé. | |
| @@ -1,12 +1,12 @@ | |||
| 1 | # Managed by IssueSpec. Hand edits are welcome; keep the schema valid. | 1 | # Managed by IssueSpec. Hand edits are welcome; keep the schema valid. |
| 2 | id: 99 | 2 | id: 99 |
| 3 | title: "Assistants : nom utilisé avec @ créé à partir du nom affiché" | 3 | title: "Assistants : nom utilisé avec @ créé à partir du nom affiché" |
| 4 | -state: open | 4 | +state: closed |
| 5 | author: | 5 | author: |
| 6 | name: k33g | 6 | name: k33g |
| 7 | email: ph.charriere@gmail.com | 7 | email: ph.charriere@gmail.com |
| 8 | createdAt: 2026-11-15T03:18:04.000Z | 8 | createdAt: 2026-11-15T03:18:04.000Z |
| 9 | -updatedAt: 2026-11-15T03:18:04.000Z | 9 | +updatedAt: 2026-11-15T03:41:06.000Z |
| 10 | labels: | 10 | labels: |
| 11 | - kind::feature | 11 | - kind::feature |
| 12 | - area::ui | 12 | - area::ui |
| @@ -42,42 +42,71 @@ body: | | |||
| 42 | tasks: | 42 | tasks: |
| 43 | - id: 1 | 43 | - id: 1 |
| 44 | title: "Dérivation du nom @ depuis le nom affiché (agentform nameFromTitle ; variante sans _ pour sbx) et suivi tant qu'il n'est pas modifié" | 44 | title: "Dérivation du nom @ depuis le nom affiché (agentform nameFromTitle ; variante sans _ pour sbx) et suivi tant qu'il n'est pas modifié" |
| 45 | - state: open | 45 | + state: closed |
| 46 | priority: high | 46 | priority: high |
| 47 | author: | 47 | author: |
| 48 | name: k33g | 48 | name: k33g |
| 49 | email: ph.charriere@gmail.com | 49 | email: ph.charriere@gmail.com |
| 50 | createdAt: 2026-11-15T03:18:04.000Z | 50 | createdAt: 2026-11-15T03:18:04.000Z |
| 51 | + updatedAt: 2026-11-15T03:25:02.000Z | ||
| 52 | + closedAt: 2026-11-15T03:25:02.000Z | ||
| 51 | - id: 2 | 53 | - id: 2 |
| 52 | title: "Variante libre proposée (agent, dossier, sandbox) avant l'envoi" | 54 | title: "Variante libre proposée (agent, dossier, sandbox) avant l'envoi" |
| 53 | - state: open | 55 | + state: closed |
| 54 | priority: medium | 56 | priority: medium |
| 55 | author: | 57 | author: |
| 56 | name: k33g | 58 | name: k33g |
| 57 | email: ph.charriere@gmail.com | 59 | email: ph.charriere@gmail.com |
| 58 | createdAt: 2026-11-15T03:18:04.000Z | 60 | createdAt: 2026-11-15T03:18:04.000Z |
| 61 | + updatedAt: 2026-11-15T03:25:02.000Z | ||
| 62 | + closedAt: 2026-11-15T03:25:02.000Z | ||
| 59 | - id: 3 | 63 | - id: 3 |
| 60 | title: "Assistant des sandboxes : nom affiché d'abord, nom @ qui suit" | 64 | title: "Assistant des sandboxes : nom affiché d'abord, nom @ qui suit" |
| 61 | - state: open | 65 | + state: closed |
| 62 | priority: high | 66 | priority: high |
| 63 | author: | 67 | author: |
| 64 | name: k33g | 68 | name: k33g |
| 65 | email: ph.charriere@gmail.com | 69 | email: ph.charriere@gmail.com |
| 66 | createdAt: 2026-11-15T03:18:04.000Z | 70 | createdAt: 2026-11-15T03:18:04.000Z |
| 71 | + updatedAt: 2026-11-15T03:25:02.000Z | ||
| 72 | + closedAt: 2026-11-15T03:25:02.000Z | ||
| 67 | - id: 4 | 73 | - id: 4 |
| 68 | title: "Assistant mini-me : ajouter le nom affiché (prérempli par mm), nom @ qui suit" | 74 | title: "Assistant mini-me : ajouter le nom affiché (prérempli par mm), nom @ qui suit" |
| 69 | - state: open | 75 | + state: closed |
| 70 | priority: high | 76 | priority: high |
| 71 | author: | 77 | author: |
| 72 | name: k33g | 78 | name: k33g |
| 73 | email: ph.charriere@gmail.com | 79 | email: ph.charriere@gmail.com |
| 74 | createdAt: 2026-11-15T03:18:04.000Z | 80 | createdAt: 2026-11-15T03:18:04.000Z |
| 81 | + updatedAt: 2026-11-15T03:25:02.000Z | ||
| 82 | + closedAt: 2026-11-15T03:25:02.000Z | ||
| 75 | - id: 5 | 83 | - id: 5 |
| 76 | title: "Tests vitest, textes EN + FR, doc des guides" | 84 | title: "Tests vitest, textes EN + FR, doc des guides" |
| 77 | - state: open | 85 | + state: closed |
| 78 | priority: medium | 86 | priority: medium |
| 79 | author: | 87 | author: |
| 80 | name: k33g | 88 | name: k33g |
| 81 | email: ph.charriere@gmail.com | 89 | email: ph.charriere@gmail.com |
| 82 | createdAt: 2026-11-15T03:18:04.000Z | 90 | createdAt: 2026-11-15T03:18:04.000Z |
| 83 | -comments: [] | 91 | + updatedAt: 2026-11-15T03:25:02.000Z |
| 92 | + closedAt: 2026-11-15T03:25:02.000Z | ||
| 93 | +comments: | ||
| 94 | + - id: 1 | ||
| 95 | + author: | ||
| 96 | + name: k33g | ||
| 97 | + email: ph.charriere@gmail.com | ||
| 98 | + createdAt: 2026-11-15T03:25:02.000Z | ||
| 99 | + body: | | ||
| 100 | + Implémenté sur `feature/98-99-100` : `sbxNameFromTitle` et `freeName` (`lib/creator.ts`) ; Go renvoie les | ||
| 101 | + noms pris (`SbxCheck.taken`, `CreatorStart.taken` : agents, dossiers, sandboxes) ; dans les deux assistants le | ||
| 102 | + nom @ suit le nom affiché tant qu'il n'est pas tapé à la main, un nom pris est signalé avant l'envoi avec une | ||
| 103 | + suggestion ; l'assistant mini-me a son champ « Nom affiché » (prérempli par mm, transmis à `Finish` en | ||
| 104 | + `title`). Pour mini-me, le nom @ part du nom donné à mm (`marcel`) et ne suit le nom affiché qu'une fois | ||
| 105 | + celui-ci modifié. Tests Go et vitest, svelte-check ; doc des deux guides et de la référence. | ||
| 106 | + - id: 2 | ||
| 107 | + author: | ||
| 108 | + name: k33g | ||
| 109 | + email: ph.charriere@gmail.com | ||
| 110 | + createdAt: 2026-11-15T03:41:06.000Z | ||
| 111 | + body: | | ||
| 112 | + Testé sur le Mac par l'owner : ça fonctionne. Ticket fermé. | ||
modified
.tickets/issues/0100-logos-officiels-des-agents-claude-gemini-codex-v.yaml +54 -8 | @@ -1,12 +1,12 @@ | ||
| 1 | 1 | # Managed by IssueSpec. Hand edits are welcome; keep the schema valid. |
| 2 | 2 | id: 100 |
| 3 | 3 | title: "Logos officiels des agents (Claude, Gemini, Codex, Vibe) dans l'assistant des sandboxes" |
| 4 | -state: open | |
| 4 | +state: closed | |
| 5 | 5 | author: |
| 6 | 6 | name: k33g |
| 7 | 7 | email: ph.charriere@gmail.com |
| 8 | 8 | createdAt: 2026-11-15T03:21:21.000Z |
| 9 | -updatedAt: 2026-11-15T03:21:21.000Z | |
| 9 | +updatedAt: 2026-11-15T03:41:06.000Z | |
| 10 | 10 | labels: |
| 11 | 11 | - kind::feature |
| 12 | 12 | - area::ui |
| @@ -55,42 +55,88 @@ body: | | ||
| 55 | 55 | tasks: |
| 56 | 56 | - id: 1 |
| 57 | 57 | title: "Vérifier les règles d'usage des quatre marques ; choisir et noter la source de chaque logo (SVG)" |
| 58 | - state: open | |
| 58 | + state: closed | |
| 59 | 59 | priority: high |
| 60 | 60 | author: |
| 61 | 61 | name: k33g |
| 62 | 62 | email: ph.charriere@gmail.com |
| 63 | 63 | createdAt: 2026-11-15T03:21:21.000Z |
| 64 | + updatedAt: 2026-11-15T03:32:42.000Z | |
| 65 | + closedAt: 2026-11-15T03:32:42.000Z | |
| 64 | 66 | - id: 2 |
| 65 | 67 | title: "Icône image : icon logo:<type> (schéma, validation, avatarOf, AgentAvatar, textIcon)" |
| 66 | - state: open | |
| 68 | + state: closed | |
| 67 | 69 | priority: high |
| 68 | 70 | author: |
| 69 | 71 | name: k33g |
| 70 | 72 | email: ph.charriere@gmail.com |
| 71 | 73 | createdAt: 2026-11-15T03:21:21.000Z |
| 74 | + updatedAt: 2026-11-15T03:29:47.000Z | |
| 75 | + closedAt: 2026-11-15T03:29:47.000Z | |
| 72 | 76 | - id: 3 |
| 73 | 77 | title: "Logos dans le catalogue sbxcreate et sur les cartes de l'assistant ; icône par défaut de l'agent créé" |
| 74 | - state: open | |
| 78 | + state: closed | |
| 75 | 79 | priority: high |
| 76 | 80 | author: |
| 77 | 81 | name: k33g |
| 78 | 82 | email: ph.charriere@gmail.com |
| 79 | 83 | createdAt: 2026-11-15T03:21:21.000Z |
| 84 | + updatedAt: 2026-11-15T03:29:47.000Z | |
| 85 | + closedAt: 2026-11-15T03:29:47.000Z | |
| 80 | 86 | - id: 4 |
| 81 | 87 | title: "Thèmes clair et sombre" |
| 82 | - state: open | |
| 88 | + state: closed | |
| 83 | 89 | priority: medium |
| 84 | 90 | author: |
| 85 | 91 | name: k33g |
| 86 | 92 | email: ph.charriere@gmail.com |
| 87 | 93 | createdAt: 2026-11-15T03:21:21.000Z |
| 94 | + updatedAt: 2026-11-15T03:29:47.000Z | |
| 95 | + closedAt: 2026-11-15T03:29:47.000Z | |
| 88 | 96 | - id: 5 |
| 89 | 97 | title: "Tests, doc EN + FR (référence icon), notes de release v1.5.0" |
| 90 | - state: open | |
| 98 | + state: closed | |
| 91 | 99 | priority: medium |
| 92 | 100 | author: |
| 93 | 101 | name: k33g |
| 94 | 102 | email: ph.charriere@gmail.com |
| 95 | 103 | createdAt: 2026-11-15T03:21:21.000Z |
| 96 | -comments: [] | |
| 104 | + updatedAt: 2026-11-15T03:29:47.000Z | |
| 105 | + closedAt: 2026-11-15T03:29:47.000Z | |
| 106 | +comments: | |
| 107 | + - id: 1 | |
| 108 | + author: | |
| 109 | + name: k33g | |
| 110 | + email: ph.charriere@gmail.com | |
| 111 | + createdAt: 2026-11-15T03:29:47.000Z | |
| 112 | + body: | | |
| 113 | + Implémenté sur `feature/98-99-100` : icône `logo:<nom>` (`lib/logos.ts`, `avatarOf`, `AgentAvatar` : le | |
| 114 | + logo dans sa couleur sur un disque clair, lisible en thème clair et sombre ; `textIcon` ne montre rien) ; | |
| 115 | + `config.LogoNames` (avertissement pour un nom inconnu, schéma) et un test qui vérifie que Go et l'interface ont | |
| 116 | + la même liste ; catalogue : Claude `logo:claude`, Gemini `logo:gemini`, Vibe `logo:mistral` ; les cartes et | |
| 117 | + le choix d'icône de l'assistant dessinent les logos. | |
| 118 | + | |
| 119 | + **Tâche 1 (marques) — à valider par l'owner** : les tracés viennent de Simple Icons 16.37.0 (CC0-1.0), relevés | |
| 120 | + sur claude.ai, gemini.google.com et chat.mistral.ai ; source et licence notées dans `logos.ts`. La CC0 couvre | |
| 121 | + les dessins, pas les marques : usage pour nommer le produit, logo non modifié, sans suggérer de partenariat. | |
| 122 | + Je n'ai pas lu les règles de marque d'Anthropic, de Google ni de Mistral AI. **OpenAI (Codex)** : retiré de | |
| 123 | + Simple Icons ; ses règles (openai.com/brand) demandent ses propres fichiers, non modifiés, et réservent le droit | |
| 124 | + de retirer l'autorisation : Codex garde l'emoji 📗. Pour l'ajouter : déposer le SVG officiel (Blossom) dans | |
| 125 | + `logos.ts` et `openai` dans `LogoNames`. | |
| 126 | + - id: 2 | |
| 127 | + author: | |
| 128 | + name: k33g | |
| 129 | + email: ph.charriere@gmail.com | |
| 130 | + createdAt: 2026-11-15T03:32:42.000Z | |
| 131 | + body: | | |
| 132 | + L'owner : « pour codex prend le logo d'openai ». Ajouté : `logo:openai`, tracé de Simple Icons 13.21.0 | |
| 133 | + (dernière version qui l'a, CC0-1.0, source openai.com/brand), en noir comme sur openai.com/brand, non modifié ; | |
| 134 | + Codex l'a pour icône par défaut. Tâche 1 close sur la décision de l'owner (les règles des marques n'ont pas été | |
| 135 | + lues en détail). | |
| 136 | + - id: 3 | |
| 137 | + author: | |
| 138 | + name: k33g | |
| 139 | + email: ph.charriere@gmail.com | |
| 140 | + createdAt: 2026-11-15T03:41:06.000Z | |
| 141 | + body: | | |
| 142 | + Testé sur le Mac par l'owner : ça fonctionne. Ticket fermé. | |
| @@ -1,12 +1,12 @@ | |||
| 1 | # Managed by IssueSpec. Hand edits are welcome; keep the schema valid. | 1 | # Managed by IssueSpec. Hand edits are welcome; keep the schema valid. |
| 2 | id: 100 | 2 | id: 100 |
| 3 | title: "Logos officiels des agents (Claude, Gemini, Codex, Vibe) dans l'assistant des sandboxes" | 3 | title: "Logos officiels des agents (Claude, Gemini, Codex, Vibe) dans l'assistant des sandboxes" |
| 4 | -state: open | 4 | +state: closed |
| 5 | author: | 5 | author: |
| 6 | name: k33g | 6 | name: k33g |
| 7 | email: ph.charriere@gmail.com | 7 | email: ph.charriere@gmail.com |
| 8 | createdAt: 2026-11-15T03:21:21.000Z | 8 | createdAt: 2026-11-15T03:21:21.000Z |
| 9 | -updatedAt: 2026-11-15T03:21:21.000Z | 9 | +updatedAt: 2026-11-15T03:41:06.000Z |
| 10 | labels: | 10 | labels: |
| 11 | - kind::feature | 11 | - kind::feature |
| 12 | - area::ui | 12 | - area::ui |
| @@ -55,42 +55,88 @@ body: | | |||
| 55 | tasks: | 55 | tasks: |
| 56 | - id: 1 | 56 | - id: 1 |
| 57 | title: "Vérifier les règles d'usage des quatre marques ; choisir et noter la source de chaque logo (SVG)" | 57 | title: "Vérifier les règles d'usage des quatre marques ; choisir et noter la source de chaque logo (SVG)" |
| 58 | - state: open | 58 | + state: closed |
| 59 | priority: high | 59 | priority: high |
| 60 | author: | 60 | author: |
| 61 | name: k33g | 61 | name: k33g |
| 62 | email: ph.charriere@gmail.com | 62 | email: ph.charriere@gmail.com |
| 63 | createdAt: 2026-11-15T03:21:21.000Z | 63 | createdAt: 2026-11-15T03:21:21.000Z |
| 64 | + updatedAt: 2026-11-15T03:32:42.000Z | ||
| 65 | + closedAt: 2026-11-15T03:32:42.000Z | ||
| 64 | - id: 2 | 66 | - id: 2 |
| 65 | title: "Icône image : icon logo:<type> (schéma, validation, avatarOf, AgentAvatar, textIcon)" | 67 | title: "Icône image : icon logo:<type> (schéma, validation, avatarOf, AgentAvatar, textIcon)" |
| 66 | - state: open | 68 | + state: closed |
| 67 | priority: high | 69 | priority: high |
| 68 | author: | 70 | author: |
| 69 | name: k33g | 71 | name: k33g |
| 70 | email: ph.charriere@gmail.com | 72 | email: ph.charriere@gmail.com |
| 71 | createdAt: 2026-11-15T03:21:21.000Z | 73 | createdAt: 2026-11-15T03:21:21.000Z |
| 74 | + updatedAt: 2026-11-15T03:29:47.000Z | ||
| 75 | + closedAt: 2026-11-15T03:29:47.000Z | ||
| 72 | - id: 3 | 76 | - id: 3 |
| 73 | title: "Logos dans le catalogue sbxcreate et sur les cartes de l'assistant ; icône par défaut de l'agent créé" | 77 | title: "Logos dans le catalogue sbxcreate et sur les cartes de l'assistant ; icône par défaut de l'agent créé" |
| 74 | - state: open | 78 | + state: closed |
| 75 | priority: high | 79 | priority: high |
| 76 | author: | 80 | author: |
| 77 | name: k33g | 81 | name: k33g |
| 78 | email: ph.charriere@gmail.com | 82 | email: ph.charriere@gmail.com |
| 79 | createdAt: 2026-11-15T03:21:21.000Z | 83 | createdAt: 2026-11-15T03:21:21.000Z |
| 84 | + updatedAt: 2026-11-15T03:29:47.000Z | ||
| 85 | + closedAt: 2026-11-15T03:29:47.000Z | ||
| 80 | - id: 4 | 86 | - id: 4 |
| 81 | title: "Thèmes clair et sombre" | 87 | title: "Thèmes clair et sombre" |
| 82 | - state: open | 88 | + state: closed |
| 83 | priority: medium | 89 | priority: medium |
| 84 | author: | 90 | author: |
| 85 | name: k33g | 91 | name: k33g |
| 86 | email: ph.charriere@gmail.com | 92 | email: ph.charriere@gmail.com |
| 87 | createdAt: 2026-11-15T03:21:21.000Z | 93 | createdAt: 2026-11-15T03:21:21.000Z |
| 94 | + updatedAt: 2026-11-15T03:29:47.000Z | ||
| 95 | + closedAt: 2026-11-15T03:29:47.000Z | ||
| 88 | - id: 5 | 96 | - id: 5 |
| 89 | title: "Tests, doc EN + FR (référence icon), notes de release v1.5.0" | 97 | title: "Tests, doc EN + FR (référence icon), notes de release v1.5.0" |
| 90 | - state: open | 98 | + state: closed |
| 91 | priority: medium | 99 | priority: medium |
| 92 | author: | 100 | author: |
| 93 | name: k33g | 101 | name: k33g |
| 94 | email: ph.charriere@gmail.com | 102 | email: ph.charriere@gmail.com |
| 95 | createdAt: 2026-11-15T03:21:21.000Z | 103 | createdAt: 2026-11-15T03:21:21.000Z |
| 96 | -comments: [] | 104 | + updatedAt: 2026-11-15T03:29:47.000Z |
| 105 | + closedAt: 2026-11-15T03:29:47.000Z | ||
| 106 | +comments: | ||
| 107 | + - id: 1 | ||
| 108 | + author: | ||
| 109 | + name: k33g | ||
| 110 | + email: ph.charriere@gmail.com | ||
| 111 | + createdAt: 2026-11-15T03:29:47.000Z | ||
| 112 | + body: | | ||
| 113 | + Implémenté sur `feature/98-99-100` : icône `logo:<nom>` (`lib/logos.ts`, `avatarOf`, `AgentAvatar` : le | ||
| 114 | + logo dans sa couleur sur un disque clair, lisible en thème clair et sombre ; `textIcon` ne montre rien) ; | ||
| 115 | + `config.LogoNames` (avertissement pour un nom inconnu, schéma) et un test qui vérifie que Go et l'interface ont | ||
| 116 | + la même liste ; catalogue : Claude `logo:claude`, Gemini `logo:gemini`, Vibe `logo:mistral` ; les cartes et | ||
| 117 | + le choix d'icône de l'assistant dessinent les logos. | ||
| 118 | + | ||
| 119 | + **Tâche 1 (marques) — à valider par l'owner** : les tracés viennent de Simple Icons 16.37.0 (CC0-1.0), relevés | ||
| 120 | + sur claude.ai, gemini.google.com et chat.mistral.ai ; source et licence notées dans `logos.ts`. La CC0 couvre | ||
| 121 | + les dessins, pas les marques : usage pour nommer le produit, logo non modifié, sans suggérer de partenariat. | ||
| 122 | + Je n'ai pas lu les règles de marque d'Anthropic, de Google ni de Mistral AI. **OpenAI (Codex)** : retiré de | ||
| 123 | + Simple Icons ; ses règles (openai.com/brand) demandent ses propres fichiers, non modifiés, et réservent le droit | ||
| 124 | + de retirer l'autorisation : Codex garde l'emoji 📗. Pour l'ajouter : déposer le SVG officiel (Blossom) dans | ||
| 125 | + `logos.ts` et `openai` dans `LogoNames`. | ||
| 126 | + - id: 2 | ||
| 127 | + author: | ||
| 128 | + name: k33g | ||
| 129 | + email: ph.charriere@gmail.com | ||
| 130 | + createdAt: 2026-11-15T03:32:42.000Z | ||
| 131 | + body: | | ||
| 132 | + L'owner : « pour codex prend le logo d'openai ». Ajouté : `logo:openai`, tracé de Simple Icons 13.21.0 | ||
| 133 | + (dernière version qui l'a, CC0-1.0, source openai.com/brand), en noir comme sur openai.com/brand, non modifié ; | ||
| 134 | + Codex l'a pour icône par défaut. Tâche 1 close sur la décision de l'owner (les règles des marques n'ont pas été | ||
| 135 | + lues en détail). | ||
| 136 | + - id: 3 | ||
| 137 | + author: | ||
| 138 | + name: k33g | ||
| 139 | + email: ph.charriere@gmail.com | ||
| 140 | + createdAt: 2026-11-15T03:41:06.000Z | ||
| 141 | + body: | | ||
| 142 | + Testé sur le Mac par l'owner : ça fonctionne. Ticket fermé. | ||
modified
docs/en/how-to/create-a-mini-me-agent.md +2 -1 | @@ -7,7 +7,8 @@ This guide shows how to create a new [mini-me](https://git.rickub.com/bots-garde | ||
| 7 | 7 | 1. Open the assistant: **✨ Create my first agent** on the welcome screen, **✨ Create a mini-me agent** under the agents list, or **Create a mini-me agent** in the command palette (⌘K, Ctrl+K on Linux and Windows). |
| 8 | 8 | 2. Answer the questions of mini-me, a few at a time: the model server, the model, what the agent is for, which machine runs the model, whether it asks before each command or file change, the agent's name… Each question comes with mini-me's default: **Next →** takes it. **About these choices** explains the options. |
| 9 | 9 | 3. When mini-me has written the agent, give its last details: |
| 10 | - - **Name**: what you call it with in a conversation (`@marcel`), and the name of its folder. It starts from the name you gave mini-me; lowercase letters, digits, `-` and `_`, starting with a letter. | |
| 10 | + - **Name shown**: mini-me's (`Marcel (developer)`), which you can change. | |
| 11 | + - **Name**: what you call it with in a conversation (`@marcel`), and the name of its folder. It starts from the name you gave mini-me, then follows the **Name shown** when you change it, until you type it yourself; lowercase letters, digits, `-` and `_`, starting with a letter. A name already used is said before you click, with a free one to try. | |
| 11 | 12 | - **Emoji**: pick one, or type any emoji. |
| 12 | 13 | - **Where does it run?** **On this computer** (the simplest), **In a Docker container** (Docker must be installed) or **In a Docker Sandbox (sbx)** (sbx must be installed). |
| 13 | 14 | 4. Click **Add the agent**. Its direct conversation opens: write to it. |
| @@ -7,7 +7,8 @@ This guide shows how to create a new [mini-me](https://git.rickub.com/bots-garde | |||
| 7 | 1. Open the assistant: **✨ Create my first agent** on the welcome screen, **✨ Create a mini-me agent** under the agents list, or **Create a mini-me agent** in the command palette (⌘K, Ctrl+K on Linux and Windows). | 7 | 1. Open the assistant: **✨ Create my first agent** on the welcome screen, **✨ Create a mini-me agent** under the agents list, or **Create a mini-me agent** in the command palette (⌘K, Ctrl+K on Linux and Windows). |
| 8 | 2. Answer the questions of mini-me, a few at a time: the model server, the model, what the agent is for, which machine runs the model, whether it asks before each command or file change, the agent's name… Each question comes with mini-me's default: **Next →** takes it. **About these choices** explains the options. | 8 | 2. Answer the questions of mini-me, a few at a time: the model server, the model, what the agent is for, which machine runs the model, whether it asks before each command or file change, the agent's name… Each question comes with mini-me's default: **Next →** takes it. **About these choices** explains the options. |
| 9 | 3. When mini-me has written the agent, give its last details: | 9 | 3. When mini-me has written the agent, give its last details: |
| 10 | - - **Name**: what you call it with in a conversation (`@marcel`), and the name of its folder. It starts from the name you gave mini-me; lowercase letters, digits, `-` and `_`, starting with a letter. | 10 | + - **Name shown**: mini-me's (`Marcel (developer)`), which you can change. |
| 11 | + - **Name**: what you call it with in a conversation (`@marcel`), and the name of its folder. It starts from the name you gave mini-me, then follows the **Name shown** when you change it, until you type it yourself; lowercase letters, digits, `-` and `_`, starting with a letter. A name already used is said before you click, with a free one to try. | ||
| 11 | - **Emoji**: pick one, or type any emoji. | 12 | - **Emoji**: pick one, or type any emoji. |
| 12 | - **Where does it run?** **On this computer** (the simplest), **In a Docker container** (Docker must be installed) or **In a Docker Sandbox (sbx)** (sbx must be installed). | 13 | - **Where does it run?** **On this computer** (the simplest), **In a Docker container** (Docker must be installed) or **In a Docker Sandbox (sbx)** (sbx must be installed). |
| 13 | 4. Click **Add the agent**. Its direct conversation opens: write to it. | 14 | 4. Click **Add the agent**. Its direct conversation opens: write to it. |
modified
docs/en/how-to/create-an-agent-in-a-sandbox.md +2 -2 | @@ -7,8 +7,8 @@ This guide shows how to create a new Claude, Gemini, Codex or Vibe agent that ru | ||
| 7 | 7 | 1. Open the assistant: **✨ Create a Claude, Gemini, Codex or Vibe agent** on the welcome screen, **✨ Create an agent in a sandbox** under the agents list, or **Create an agent in a sandbox** in the command palette (⌘K, Ctrl+K on Linux and Windows). |
| 8 | 8 | 2. Choose the agent: **Claude** (Anthropic's Claude Code), **Gemini** (Google's, through Antigravity), **Codex** (OpenAI's) or **Vibe** (Mistral AI's). |
| 9 | 9 | 3. If sbx does not hold its key yet, paste it in **API key** and click **Save the key**. **Get a key…** opens the page where the company gives you one. Sidekicks hands the key to sbx, which keeps it and gives it to your sandboxes for their calls to that company only; it is never written in a file. A key already saved is shown as **✓ Your … key is stored in sbx**. |
| 10 | -4. Give the agent its last details: **Name shown**, **Name** (what you call it with, `@claude`, and the name of its folder and of its sandbox: lowercase letters, digits and `-`, starting with a letter) and an **Emoji**. Sidekicks suggests a name nobody uses yet. | |
| 11 | -5. Click **Add the agent**. Its conversation opens. Its sandbox is created the first time you write to it, so that first answer takes a while. | |
| 10 | +4. Give the agent its last details: **Name shown**, **Name** (what you call it with, `@claude`, and the name of its folder and of its sandbox: lowercase letters, digits and `-`, starting with a letter) and an **Emoji** (the agent's logo is chosen first). The **Name** follows the **Name shown** (`Marcel (assistant)` gives `marcel-assistant`) until you type it yourself; Sidekicks always suggests one nobody uses yet, and says so before you click when the one you typed is taken. | |
| 11 | +5. Click **Add the agent**. Its conversation opens. Its sandbox is created the first time you write to it, so that first answer takes a while: the conversation shows what is happening — the step, the time elapsed, what sbx is downloading — and **See the log** opens the details. | |
| 12 | 12 | |
| 13 | 13 | The agent's folder is created in your **Documents** folder, named after the agent (`~/Documents/claude`): its `sbxenv.yaml` and its `workspace/` folder, where the agent works. |
| 14 | 14 | |
| @@ -7,8 +7,8 @@ This guide shows how to create a new Claude, Gemini, Codex or Vibe agent that ru | |||
| 7 | 1. Open the assistant: **✨ Create a Claude, Gemini, Codex or Vibe agent** on the welcome screen, **✨ Create an agent in a sandbox** under the agents list, or **Create an agent in a sandbox** in the command palette (⌘K, Ctrl+K on Linux and Windows). | 7 | 1. Open the assistant: **✨ Create a Claude, Gemini, Codex or Vibe agent** on the welcome screen, **✨ Create an agent in a sandbox** under the agents list, or **Create an agent in a sandbox** in the command palette (⌘K, Ctrl+K on Linux and Windows). |
| 8 | 2. Choose the agent: **Claude** (Anthropic's Claude Code), **Gemini** (Google's, through Antigravity), **Codex** (OpenAI's) or **Vibe** (Mistral AI's). | 8 | 2. Choose the agent: **Claude** (Anthropic's Claude Code), **Gemini** (Google's, through Antigravity), **Codex** (OpenAI's) or **Vibe** (Mistral AI's). |
| 9 | 3. If sbx does not hold its key yet, paste it in **API key** and click **Save the key**. **Get a key…** opens the page where the company gives you one. Sidekicks hands the key to sbx, which keeps it and gives it to your sandboxes for their calls to that company only; it is never written in a file. A key already saved is shown as **✓ Your … key is stored in sbx**. | 9 | 3. If sbx does not hold its key yet, paste it in **API key** and click **Save the key**. **Get a key…** opens the page where the company gives you one. Sidekicks hands the key to sbx, which keeps it and gives it to your sandboxes for their calls to that company only; it is never written in a file. A key already saved is shown as **✓ Your … key is stored in sbx**. |
| 10 | -4. Give the agent its last details: **Name shown**, **Name** (what you call it with, `@claude`, and the name of its folder and of its sandbox: lowercase letters, digits and `-`, starting with a letter) and an **Emoji**. Sidekicks suggests a name nobody uses yet. | 10 | +4. Give the agent its last details: **Name shown**, **Name** (what you call it with, `@claude`, and the name of its folder and of its sandbox: lowercase letters, digits and `-`, starting with a letter) and an **Emoji** (the agent's logo is chosen first). The **Name** follows the **Name shown** (`Marcel (assistant)` gives `marcel-assistant`) until you type it yourself; Sidekicks always suggests one nobody uses yet, and says so before you click when the one you typed is taken. |
| 11 | -5. Click **Add the agent**. Its conversation opens. Its sandbox is created the first time you write to it, so that first answer takes a while. | 11 | +5. Click **Add the agent**. Its conversation opens. Its sandbox is created the first time you write to it, so that first answer takes a while: the conversation shows what is happening — the step, the time elapsed, what sbx is downloading — and **See the log** opens the details. |
| 12 | 12 | ||
| 13 | The agent's folder is created in your **Documents** folder, named after the agent (`~/Documents/claude`): its `sbxenv.yaml` and its `workspace/` folder, where the agent works. | 13 | The agent's folder is created in your **Documents** folder, named after the agent (`~/Documents/claude`): its `sbxenv.yaml` and its `workspace/` folder, where the agent works. |
| 14 | 14 | ||
modified
docs/en/reference/agents-and-events.md +10 -9 | @@ -38,6 +38,7 @@ Stopping an agent closes its stdin, waits 5 seconds, then kills its process grou | ||
| 38 | 38 | | `config:changed` | `{path, valid, problems[]}` | The configuration file was saved and reloaded (valid or not). | |
| 39 | 39 | | `agent:state` | `{agent, state, error?}` | An agent changes state or its definition changes. | |
| 40 | 40 | | `agent:log` | `{agent, line}` | An agent writes a line on its standard error, or a sandbox command of the agent prints one (prefixed with `sandbox: `). | |
| 41 | +| `agent:progress` | `{agent, step, line, since}` | A starting agent moved to another step — `checking` (its sandbox or container is looked at), `preparing` (it is created or started: a line came from its lifecycle command), `connecting` (its program starts and answers `initialize`) — or printed a line (`line`, without the `sandbox: ` prefix of the log); `since` is when the start began, in Unix milliseconds (issue #98). The conversation shows a progress card with the step, the time elapsed, the last line (a bar when it holds a percentage or `done/total` sizes) and **See the log**; the Agents panel shows the step. Ends with the next `agent:state`. | | |
| 41 | 42 | | `files:dropped` | `{target, files[]}` | Files are dropped from the system on an element marked `data-file-drop-target`; `target` is its `id`, `files` their absolute paths. | |
| 42 | 43 | |
| 43 | 44 | The Go names and types are in `internal/events`; the TypeScript constants and types are generated in `frontend/bindings/events` and `frontend/bindings/…/internal/events`. |
| @@ -46,7 +47,7 @@ The Go names and types are in `internal/events`; the TypeScript constants and ty | ||
| 46 | 47 | |
| 47 | 48 | | Service | Method | Effect | |
| 48 | 49 | | --- | --- | --- | |
| 49 | -| `AgentService` | `List()` | Every agent with `name, title, icon, description, state, error, outdated, runtime, canStopSandbox, canRemoveSandbox`, in configuration order. | | |
| 50 | +| `AgentService` | `List()` | Every agent with `name, title, icon, description, state, error, outdated, runtime, canStopSandbox, canRemoveSandbox` (and, while starting, `step, since` as `agent:progress` gives them), in configuration order. | | |
| 50 | 51 | | | `Start(name)`, `Stop(name)`, `Restart(name)` | As in the transitions above; an error is returned to the interface. A start first recreates a missing sandbox when `runtime.lifecycle.create` is set. | |
| 51 | 52 | | | `StopSandbox(name)`, `RemoveSandbox(name)` | Stops the agent, then runs `runtime.lifecycle.stop` or `remove` (container or sandbox); the output goes to the agent's log. | |
| 52 | 53 | | | `Unload(name)` | Has a running, idle agent that announced the `unload` command unload its model (issue #51): `/unload` is sent in a session of its own, which no conversation shows; the answer goes to the agent's log as `unload: …` lines. Errors: unknown agent, `the agent is not running…`, `the agent is answering…`, `this agent cannot unload its model…`. | |
| @@ -244,29 +245,29 @@ The assistant that creates a mini-me agent (issue #94, [How to create a mini-me | ||
| 244 | 245 | |
| 245 | 246 | | Method | Effect | |
| 246 | 247 | | --- | --- | |
| 247 | -| `Start()` | Runs `mm --version` (`mini-me (mm) is not installed`; `mini-me (mm) 1.0.8 is too old: version 1.0.9 or later is needed`; a version mm cannot tell is accepted), closes a wizard left open, creates the temporary folder (and removes those older than a day), starts mm there and sends `/start`. Returns `{view, agentsFolder, version}`. | | |
| 248 | +| `Start()` | Runs `mm --version` (`mini-me (mm) is not installed`; `mini-me (mm) 1.0.8 is too old: version 1.0.9 or later is needed`; a version mm cannot tell is accepted), closes a wizard left open, creates the temporary folder (and removes those older than a day), starts mm there and sends `/start`. Returns `{view, agentsFolder, version, taken[]}` (`taken`: the names of the agents and of the folders of the agents' folder, issue #99). | | |
| 248 | 249 | | `Answer(answer)` | Answers the form shown: `{action: "accept", content: {name: value…}}`, `decline` or `cancel`. Returns the next `view`. | |
| 249 | 250 | | `Send(text)` | Sends a message to mm (`/back`, `/restart`, `/start`…); refused while a form waits (decline it first). Returns the next `view`. | |
| 250 | -| `Finish({name, icon, environment})` | Renames the temporary folder `<agentsFolder>/<name>` (mode 0755), then, for `container` or `sbx`, starts mm again in it and sends `/dockerinit` or `/sbxinit`; adds the agent with `mm --acp --config <folder>/.mm/agent.yaml`, through `docker exec -i <container>` or `sbx exec -i <sandbox>` with the lifecycle commands of the `compose.yaml` or `sbxenv.yaml` (as the "add an agent" assistant does with a dropped file), its title from `acp.title`. Returns `{problem, problems[], name, folder, messages[]}`: `problem` is `nameTaken`, `folderExists` or `invalidName` when nothing was changed and another name can be tried; `problems` are the configuration's. An existing folder is never touched. | | |
| 251 | +| `Finish({name, title, icon, environment})` | Renames the temporary folder `<agentsFolder>/<name>` (mode 0755), then, for `container` or `sbx`, starts mm again in it and sends `/dockerinit` or `/sbxinit`; adds the agent with `mm --acp --config <folder>/.mm/agent.yaml`, through `docker exec -i <container>` or `sbx exec -i <sandbox>` with the lifecycle commands of the `compose.yaml` or `sbxenv.yaml` (as the "add an agent" assistant does with a dropped file), its title `title`, else `acp.title`. Returns `{problem, problems[], name, folder, messages[]}`: `problem` is `nameTaken`, `folderExists` or `invalidName` when nothing was changed and another name can be tried; `problems` are the configuration's. An existing folder is never touched. | | |
| 251 | 252 | | `Cancel()` | Stops mm; before `Finish`, removes the temporary folder. Also done when Sidekicks quits. | |
| 252 | 253 | |
| 253 | 254 | A `view` is `{messages[], form, written, name, title}`: mm's messages since the last call (each one whole), the form waiting (`{message, fields[{name, title, description, type, options[], default, required}]}`, `null` when none), and, once `.mm/agent.yaml` exists, `written` with mm's `acp.name` (turned into a valid name) and `acp.title`. The page shows mm's `⚠️` messages and folds the others; a `model` field asked as text means that no model server answered. |
| 254 | 255 | |
| 255 | 256 | ## `SbxCreatorService` |
| 256 | 257 | |
| 257 | -The assistant that creates an agent in a Docker Sandbox (issue #96, [How to create a Claude, Gemini, Codex or Vibe agent in a sandbox](../how-to/create-an-agent-in-a-sandbox.md)). The kinds it offers are a catalogue (`internal/sbxcreate`): one entry per kind, with what its `sbxenv.yaml` holds and how Sidekicks starts it. | |
| 258 | +The assistant that creates an agent in a Docker Sandbox (issue #96, [How to create a Claude, Gemini, Codex or Vibe agent in a sandbox](../how-to/create-an-agent-in-a-sandbox.md)). The kinds it offers are a catalogue (`internal/sbxcreate`): one entry per kind, with what its `sbxenv.yaml` holds, how Sidekicks starts it, and its default icon: its brand's logo (issue #100). | |
| 258 | 259 | |
| 259 | 260 | | Kind | `agent:` | Kit | Program in the sandbox | sbx secret | |
| 260 | 261 | | --- | --- | --- | --- | --- | |
| 261 | -| `claude` 📙 | `claude` | `docker.io/sbx/claude-acp:latest` | `claude-agent-acp` | `anthropic` | | |
| 262 | -| `gemini` 📘 | `antigravity` | `docker.io/sbx/antigravity:latest` | `agy acp` | `google` | | |
| 263 | -| `codex` 📗 | `codex` | `docker.io/sbx/codex-acp:latest` | `codex-acp` | `openai` | | |
| 264 | -| `vibe` 🟧 | `vibe` | `docker.io/sbx/vibe-kit:latest` | `vibe-acp` | `mistral` | | |
| 262 | +| `claude` (`logo:claude`) | `claude` | `docker.io/sbx/claude-acp:latest` | `claude-agent-acp` | `anthropic` | | |
| 263 | +| `gemini` (`logo:gemini`) | `antigravity` | `docker.io/sbx/antigravity:latest` | `agy acp` | `google` | | |
| 264 | +| `codex` (`logo:openai`) | `codex` | `docker.io/sbx/codex-acp:latest` | `codex-acp` | `openai` | | |
| 265 | +| `vibe` (`logo:mistral`) | `vibe` | `docker.io/sbx/vibe-kit:latest` | `vibe-acp` | `mistral` | | |
| 265 | 266 | |
| 266 | 267 | | Method | Effect | |
| 267 | 268 | | --- | --- | |
| 268 | 269 | | `Kinds()` | The catalogue, in order: `{id, title, icon, agent, kit, program, service, keyUrl}`. | |
| 269 | -| `Check(kind)` | `sbx is not installed` when sbx cannot be found (`sbx` in PATH, `/usr/local/bin`, `/opt/homebrew/bin`). Returns `{hasKey, name, agentsFolder}`: whether `sbx secret ls --service <service>` shows a global secret, and the first free name among `<kind>`, `<kind>-2`… — free as an agent of the configuration, a folder of the agents' folder and a sandbox (`sbx ls -q`). | | |
| 270 | +| `Check(kind)` | `sbx is not installed` when sbx cannot be found (`sbx` in PATH, `/usr/local/bin`, `/opt/homebrew/bin`). Returns `{hasKey, name, agentsFolder, taken[]}` (`taken`: the names used by an agent, a folder or a sandbox, issue #99): whether `sbx secret ls --service <service>` shows a global secret, and the first free name among `<kind>`, `<kind>-2`… — free as an agent of the configuration, a folder of the agents' folder and a sandbox (`sbx ls -q`). | | |
| 270 | 271 | | `SetKey(kind, key)` | `sbx secret set <service>` with the key on its standard input — never in its arguments, a file or a log; an error never repeats it. Global: every sandbox gets it. | |
| 271 | 272 | | `Login()` | Runs `sbx login` (issue #97) — or joins the one in progress — and returns once sbx printed its device code and URL, 20 seconds at most: `{code, url, done, user, error, output[]}`. The code is the first `XXXX-XXXX`, the URL the first `https://…` naming `login`; `output` keeps every line for when sbx prints something else. Its standard input is empty: a question asked on the keyboard gets no answer. | |
| 272 | 273 | | `LoginStatus()` | Waits, 20 seconds at most, for `sbx login` to end and returns the same state; `done` with `user` (from `Signed in as <user>.`) when signed in, else `error` (`cancelled` after `CancelLogin`). The interface calls it again until `done`. | |
| @@ -38,6 +38,7 @@ Stopping an agent closes its stdin, waits 5 seconds, then kills its process grou | |||
| 38 | | `config:changed` | `{path, valid, problems[]}` | The configuration file was saved and reloaded (valid or not). | | 38 | | `config:changed` | `{path, valid, problems[]}` | The configuration file was saved and reloaded (valid or not). | |
| 39 | | `agent:state` | `{agent, state, error?}` | An agent changes state or its definition changes. | | 39 | | `agent:state` | `{agent, state, error?}` | An agent changes state or its definition changes. | |
| 40 | | `agent:log` | `{agent, line}` | An agent writes a line on its standard error, or a sandbox command of the agent prints one (prefixed with `sandbox: `). | | 40 | | `agent:log` | `{agent, line}` | An agent writes a line on its standard error, or a sandbox command of the agent prints one (prefixed with `sandbox: `). | |
| 41 | +| `agent:progress` | `{agent, step, line, since}` | A starting agent moved to another step — `checking` (its sandbox or container is looked at), `preparing` (it is created or started: a line came from its lifecycle command), `connecting` (its program starts and answers `initialize`) — or printed a line (`line`, without the `sandbox: ` prefix of the log); `since` is when the start began, in Unix milliseconds (issue #98). The conversation shows a progress card with the step, the time elapsed, the last line (a bar when it holds a percentage or `done/total` sizes) and **See the log**; the Agents panel shows the step. Ends with the next `agent:state`. | | ||
| 41 | | `files:dropped` | `{target, files[]}` | Files are dropped from the system on an element marked `data-file-drop-target`; `target` is its `id`, `files` their absolute paths. | | 42 | | `files:dropped` | `{target, files[]}` | Files are dropped from the system on an element marked `data-file-drop-target`; `target` is its `id`, `files` their absolute paths. | |
| 42 | 43 | ||
| 43 | The Go names and types are in `internal/events`; the TypeScript constants and types are generated in `frontend/bindings/events` and `frontend/bindings/…/internal/events`. | 44 | The Go names and types are in `internal/events`; the TypeScript constants and types are generated in `frontend/bindings/events` and `frontend/bindings/…/internal/events`. |
| @@ -46,7 +47,7 @@ The Go names and types are in `internal/events`; the TypeScript constants and ty | |||
| 46 | 47 | ||
| 47 | | Service | Method | Effect | | 48 | | Service | Method | Effect | |
| 48 | | --- | --- | --- | | 49 | | --- | --- | --- | |
| 49 | -| `AgentService` | `List()` | Every agent with `name, title, icon, description, state, error, outdated, runtime, canStopSandbox, canRemoveSandbox`, in configuration order. | | 50 | +| `AgentService` | `List()` | Every agent with `name, title, icon, description, state, error, outdated, runtime, canStopSandbox, canRemoveSandbox` (and, while starting, `step, since` as `agent:progress` gives them), in configuration order. | |
| 50 | | | `Start(name)`, `Stop(name)`, `Restart(name)` | As in the transitions above; an error is returned to the interface. A start first recreates a missing sandbox when `runtime.lifecycle.create` is set. | | 51 | | | `Start(name)`, `Stop(name)`, `Restart(name)` | As in the transitions above; an error is returned to the interface. A start first recreates a missing sandbox when `runtime.lifecycle.create` is set. | |
| 51 | | | `StopSandbox(name)`, `RemoveSandbox(name)` | Stops the agent, then runs `runtime.lifecycle.stop` or `remove` (container or sandbox); the output goes to the agent's log. | | 52 | | | `StopSandbox(name)`, `RemoveSandbox(name)` | Stops the agent, then runs `runtime.lifecycle.stop` or `remove` (container or sandbox); the output goes to the agent's log. | |
| 52 | | | `Unload(name)` | Has a running, idle agent that announced the `unload` command unload its model (issue #51): `/unload` is sent in a session of its own, which no conversation shows; the answer goes to the agent's log as `unload: …` lines. Errors: unknown agent, `the agent is not running…`, `the agent is answering…`, `this agent cannot unload its model…`. | | 53 | | | `Unload(name)` | Has a running, idle agent that announced the `unload` command unload its model (issue #51): `/unload` is sent in a session of its own, which no conversation shows; the answer goes to the agent's log as `unload: …` lines. Errors: unknown agent, `the agent is not running…`, `the agent is answering…`, `this agent cannot unload its model…`. | |
| @@ -244,29 +245,29 @@ The assistant that creates a mini-me agent (issue #94, [How to create a mini-me | |||
| 244 | 245 | ||
| 245 | | Method | Effect | | 246 | | Method | Effect | |
| 246 | | --- | --- | | 247 | | --- | --- | |
| 247 | -| `Start()` | Runs `mm --version` (`mini-me (mm) is not installed`; `mini-me (mm) 1.0.8 is too old: version 1.0.9 or later is needed`; a version mm cannot tell is accepted), closes a wizard left open, creates the temporary folder (and removes those older than a day), starts mm there and sends `/start`. Returns `{view, agentsFolder, version}`. | | 248 | +| `Start()` | Runs `mm --version` (`mini-me (mm) is not installed`; `mini-me (mm) 1.0.8 is too old: version 1.0.9 or later is needed`; a version mm cannot tell is accepted), closes a wizard left open, creates the temporary folder (and removes those older than a day), starts mm there and sends `/start`. Returns `{view, agentsFolder, version, taken[]}` (`taken`: the names of the agents and of the folders of the agents' folder, issue #99). | |
| 248 | | `Answer(answer)` | Answers the form shown: `{action: "accept", content: {name: value…}}`, `decline` or `cancel`. Returns the next `view`. | | 249 | | `Answer(answer)` | Answers the form shown: `{action: "accept", content: {name: value…}}`, `decline` or `cancel`. Returns the next `view`. | |
| 249 | | `Send(text)` | Sends a message to mm (`/back`, `/restart`, `/start`…); refused while a form waits (decline it first). Returns the next `view`. | | 250 | | `Send(text)` | Sends a message to mm (`/back`, `/restart`, `/start`…); refused while a form waits (decline it first). Returns the next `view`. | |
| 250 | -| `Finish({name, icon, environment})` | Renames the temporary folder `<agentsFolder>/<name>` (mode 0755), then, for `container` or `sbx`, starts mm again in it and sends `/dockerinit` or `/sbxinit`; adds the agent with `mm --acp --config <folder>/.mm/agent.yaml`, through `docker exec -i <container>` or `sbx exec -i <sandbox>` with the lifecycle commands of the `compose.yaml` or `sbxenv.yaml` (as the "add an agent" assistant does with a dropped file), its title from `acp.title`. Returns `{problem, problems[], name, folder, messages[]}`: `problem` is `nameTaken`, `folderExists` or `invalidName` when nothing was changed and another name can be tried; `problems` are the configuration's. An existing folder is never touched. | | 251 | +| `Finish({name, title, icon, environment})` | Renames the temporary folder `<agentsFolder>/<name>` (mode 0755), then, for `container` or `sbx`, starts mm again in it and sends `/dockerinit` or `/sbxinit`; adds the agent with `mm --acp --config <folder>/.mm/agent.yaml`, through `docker exec -i <container>` or `sbx exec -i <sandbox>` with the lifecycle commands of the `compose.yaml` or `sbxenv.yaml` (as the "add an agent" assistant does with a dropped file), its title `title`, else `acp.title`. Returns `{problem, problems[], name, folder, messages[]}`: `problem` is `nameTaken`, `folderExists` or `invalidName` when nothing was changed and another name can be tried; `problems` are the configuration's. An existing folder is never touched. | |
| 251 | | `Cancel()` | Stops mm; before `Finish`, removes the temporary folder. Also done when Sidekicks quits. | | 252 | | `Cancel()` | Stops mm; before `Finish`, removes the temporary folder. Also done when Sidekicks quits. | |
| 252 | 253 | ||
| 253 | A `view` is `{messages[], form, written, name, title}`: mm's messages since the last call (each one whole), the form waiting (`{message, fields[{name, title, description, type, options[], default, required}]}`, `null` when none), and, once `.mm/agent.yaml` exists, `written` with mm's `acp.name` (turned into a valid name) and `acp.title`. The page shows mm's `⚠️` messages and folds the others; a `model` field asked as text means that no model server answered. | 254 | A `view` is `{messages[], form, written, name, title}`: mm's messages since the last call (each one whole), the form waiting (`{message, fields[{name, title, description, type, options[], default, required}]}`, `null` when none), and, once `.mm/agent.yaml` exists, `written` with mm's `acp.name` (turned into a valid name) and `acp.title`. The page shows mm's `⚠️` messages and folds the others; a `model` field asked as text means that no model server answered. |
| 254 | 255 | ||
| 255 | ## `SbxCreatorService` | 256 | ## `SbxCreatorService` |
| 256 | 257 | ||
| 257 | -The assistant that creates an agent in a Docker Sandbox (issue #96, [How to create a Claude, Gemini, Codex or Vibe agent in a sandbox](../how-to/create-an-agent-in-a-sandbox.md)). The kinds it offers are a catalogue (`internal/sbxcreate`): one entry per kind, with what its `sbxenv.yaml` holds and how Sidekicks starts it. | 258 | +The assistant that creates an agent in a Docker Sandbox (issue #96, [How to create a Claude, Gemini, Codex or Vibe agent in a sandbox](../how-to/create-an-agent-in-a-sandbox.md)). The kinds it offers are a catalogue (`internal/sbxcreate`): one entry per kind, with what its `sbxenv.yaml` holds, how Sidekicks starts it, and its default icon: its brand's logo (issue #100). |
| 258 | 259 | ||
| 259 | | Kind | `agent:` | Kit | Program in the sandbox | sbx secret | | 260 | | Kind | `agent:` | Kit | Program in the sandbox | sbx secret | |
| 260 | | --- | --- | --- | --- | --- | | 261 | | --- | --- | --- | --- | --- | |
| 261 | -| `claude` 📙 | `claude` | `docker.io/sbx/claude-acp:latest` | `claude-agent-acp` | `anthropic` | | 262 | +| `claude` (`logo:claude`) | `claude` | `docker.io/sbx/claude-acp:latest` | `claude-agent-acp` | `anthropic` | |
| 262 | -| `gemini` 📘 | `antigravity` | `docker.io/sbx/antigravity:latest` | `agy acp` | `google` | | 263 | +| `gemini` (`logo:gemini`) | `antigravity` | `docker.io/sbx/antigravity:latest` | `agy acp` | `google` | |
| 263 | -| `codex` 📗 | `codex` | `docker.io/sbx/codex-acp:latest` | `codex-acp` | `openai` | | 264 | +| `codex` (`logo:openai`) | `codex` | `docker.io/sbx/codex-acp:latest` | `codex-acp` | `openai` | |
| 264 | -| `vibe` 🟧 | `vibe` | `docker.io/sbx/vibe-kit:latest` | `vibe-acp` | `mistral` | | 265 | +| `vibe` (`logo:mistral`) | `vibe` | `docker.io/sbx/vibe-kit:latest` | `vibe-acp` | `mistral` | |
| 265 | 266 | ||
| 266 | | Method | Effect | | 267 | | Method | Effect | |
| 267 | | --- | --- | | 268 | | --- | --- | |
| 268 | | `Kinds()` | The catalogue, in order: `{id, title, icon, agent, kit, program, service, keyUrl}`. | | 269 | | `Kinds()` | The catalogue, in order: `{id, title, icon, agent, kit, program, service, keyUrl}`. | |
| 269 | -| `Check(kind)` | `sbx is not installed` when sbx cannot be found (`sbx` in PATH, `/usr/local/bin`, `/opt/homebrew/bin`). Returns `{hasKey, name, agentsFolder}`: whether `sbx secret ls --service <service>` shows a global secret, and the first free name among `<kind>`, `<kind>-2`… — free as an agent of the configuration, a folder of the agents' folder and a sandbox (`sbx ls -q`). | | 270 | +| `Check(kind)` | `sbx is not installed` when sbx cannot be found (`sbx` in PATH, `/usr/local/bin`, `/opt/homebrew/bin`). Returns `{hasKey, name, agentsFolder, taken[]}` (`taken`: the names used by an agent, a folder or a sandbox, issue #99): whether `sbx secret ls --service <service>` shows a global secret, and the first free name among `<kind>`, `<kind>-2`… — free as an agent of the configuration, a folder of the agents' folder and a sandbox (`sbx ls -q`). | |
| 270 | | `SetKey(kind, key)` | `sbx secret set <service>` with the key on its standard input — never in its arguments, a file or a log; an error never repeats it. Global: every sandbox gets it. | | 271 | | `SetKey(kind, key)` | `sbx secret set <service>` with the key on its standard input — never in its arguments, a file or a log; an error never repeats it. Global: every sandbox gets it. | |
| 271 | | `Login()` | Runs `sbx login` (issue #97) — or joins the one in progress — and returns once sbx printed its device code and URL, 20 seconds at most: `{code, url, done, user, error, output[]}`. The code is the first `XXXX-XXXX`, the URL the first `https://…` naming `login`; `output` keeps every line for when sbx prints something else. Its standard input is empty: a question asked on the keyboard gets no answer. | | 272 | | `Login()` | Runs `sbx login` (issue #97) — or joins the one in progress — and returns once sbx printed its device code and URL, 20 seconds at most: `{code, url, done, user, error, output[]}`. The code is the first `XXXX-XXXX`, the URL the first `https://…` naming `login`; `output` keeps every line for when sbx prints something else. Its standard input is empty: a question asked on the keyboard gets no answer. | |
| 272 | | `LoginStatus()` | Waits, 20 seconds at most, for `sbx login` to end and returns the same state; `done` with `user` (from `Signed in as <user>.`) when signed in, else `error` (`cancelled` after `CancelLogin`). The interface calls it again until `done`. | | 273 | | `LoginStatus()` | Waits, 20 seconds at most, for `sbx login` to end and returns the same state; `done` with `user` (from `Signed in as <user>.`) when signed in, else `error` (`cancelled` after `CancelLogin`). The interface calls it again until `done`. | |
modified
docs/en/reference/configuration.md +1 -1 | @@ -83,7 +83,7 @@ agentTools: | ||
| 83 | 83 | | --- | --- | --- | --- | --- | |
| 84 | 84 | | `name` | identifier | yes | | Lowercase letters, digits, `-`, `_`; starts with a letter; 32 characters at most. Used as `@name` and `/name:command`. **Unique.** | |
| 85 | 85 | | `title` | text | no | `name` | Name shown in the interface. | |
| 86 | -| `icon` | text (an emoji or a letter) | no | | Shown next to the agent. An emoji is shown as it is; otherwise its first letter is shown in a coloured circle (the colour depends on `name`). Without `icon`, the circle holds the first letter of `title`. | | |
| 86 | +| `icon` | text (an emoji, a letter or `logo:<name>`) | no | | Shown next to the agent. An emoji is shown as it is; `logo:claude`, `logo:gemini`, `logo:openai` or `logo:mistral` shows that brand's logo on a light disc (another name is a warning, and shows a letter); otherwise its first letter is shown in a coloured circle (the colour depends on `name`). Without `icon`, the circle holds the first letter of `title`. | | |
| 87 | 87 | | `description` | text | no | | One sentence shown in the `@` list. | |
| 88 | 88 | | `command` | text | yes | | Program serving ACP on stdio. | |
| 89 | 89 | | `args` | list of text | no | `[]` | Its arguments. | |
| @@ -83,7 +83,7 @@ agentTools: | |||
| 83 | | --- | --- | --- | --- | --- | | 83 | | --- | --- | --- | --- | --- | |
| 84 | | `name` | identifier | yes | | Lowercase letters, digits, `-`, `_`; starts with a letter; 32 characters at most. Used as `@name` and `/name:command`. **Unique.** | | 84 | | `name` | identifier | yes | | Lowercase letters, digits, `-`, `_`; starts with a letter; 32 characters at most. Used as `@name` and `/name:command`. **Unique.** | |
| 85 | | `title` | text | no | `name` | Name shown in the interface. | | 85 | | `title` | text | no | `name` | Name shown in the interface. | |
| 86 | -| `icon` | text (an emoji or a letter) | no | | Shown next to the agent. An emoji is shown as it is; otherwise its first letter is shown in a coloured circle (the colour depends on `name`). Without `icon`, the circle holds the first letter of `title`. | | 86 | +| `icon` | text (an emoji, a letter or `logo:<name>`) | no | | Shown next to the agent. An emoji is shown as it is; `logo:claude`, `logo:gemini`, `logo:openai` or `logo:mistral` shows that brand's logo on a light disc (another name is a warning, and shows a letter); otherwise its first letter is shown in a coloured circle (the colour depends on `name`). Without `icon`, the circle holds the first letter of `title`. | |
| 87 | | `description` | text | no | | One sentence shown in the `@` list. | | 87 | | `description` | text | no | | One sentence shown in the `@` list. | |
| 88 | | `command` | text | yes | | Program serving ACP on stdio. | | 88 | | `command` | text | yes | | Program serving ACP on stdio. | |
| 89 | | `args` | list of text | no | `[]` | Its arguments. | | 89 | | `args` | list of text | no | `[]` | Its arguments. | |
modified
docs/fr/how-to/creer-un-agent-dans-une-sandbox.md +2 -2 | @@ -7,8 +7,8 @@ Ce guide montre comment créer un nouvel agent Claude, Gemini, Codex ou Vibe qui | ||
| 7 | 7 | 1. Ouvrez l'assistant : **✨ Créer un agent Claude, Gemini, Codex ou Vibe** sur l'écran d'accueil, **✨ Créer un agent dans une sandbox** sous la liste des agents, ou **Créer un agent dans une sandbox** dans la palette de commandes (⌘K, Ctrl+K sous Linux et Windows). |
| 8 | 8 | 2. Choisissez l'agent : **Claude** (Claude Code, d'Anthropic), **Gemini** (de Google, via Antigravity), **Codex** (d'OpenAI) ou **Vibe** (de Mistral AI). |
| 9 | 9 | 3. Si sbx n'a pas encore sa clé, collez-la dans **Clé d'API** et cliquez sur **Enregistrer la clé**. **Obtenir une clé…** ouvre la page où l'éditeur vous en donne une. Sidekicks confie la clé à sbx, qui la garde et la fournit à vos sandboxes seulement pour leurs appels à cet éditeur ; elle n'est jamais écrite dans un fichier. Une clé déjà enregistrée s'affiche **✓ Votre clé … est enregistrée dans sbx**. |
| 10 | -4. Donnez à l'agent ses derniers détails : **Nom affiché**, **Nom** (ce qui l'appelle, `@claude`, et le nom de son dossier et de sa sandbox : minuscules, chiffres et `-`, en commençant par une lettre) et un **Emoji**. Sidekicks propose un nom que personne n'utilise encore. | |
| 11 | -5. Cliquez sur **Ajouter l'agent**. Sa conversation s'ouvre. Sa sandbox est créée la première fois que vous lui écrivez : cette première réponse prend un moment. | |
| 10 | +4. Donnez à l'agent ses derniers détails : **Nom affiché**, **Nom** (ce qui l'appelle, `@claude`, et le nom de son dossier et de sa sandbox : minuscules, chiffres et `-`, en commençant par une lettre) et un **Emoji** (le logo de l'agent est choisi d'abord). Le **Nom** suit le **Nom affiché** (`Marcel (assistant)` donne `marcel-assistant`) tant que vous ne le tapez pas vous-même ; Sidekicks en propose toujours un que personne n'utilise encore, et prévient avant le clic quand celui que vous avez tapé est pris. | |
| 11 | +5. Cliquez sur **Ajouter l'agent**. Sa conversation s'ouvre. Sa sandbox est créée la première fois que vous lui écrivez : cette première réponse prend un moment ; la conversation montre ce qui se passe — l'étape, le temps écoulé, ce que sbx télécharge — et **Voir le journal** ouvre le détail. | |
| 12 | 12 | |
| 13 | 13 | Le dossier de l'agent est créé dans votre dossier **Documents**, au nom de l'agent (`~/Documents/claude`) : son `sbxenv.yaml` et son dossier `workspace/`, où l'agent travaille. |
| 14 | 14 | |
| @@ -7,8 +7,8 @@ Ce guide montre comment créer un nouvel agent Claude, Gemini, Codex ou Vibe qui | |||
| 7 | 1. Ouvrez l'assistant : **✨ Créer un agent Claude, Gemini, Codex ou Vibe** sur l'écran d'accueil, **✨ Créer un agent dans une sandbox** sous la liste des agents, ou **Créer un agent dans une sandbox** dans la palette de commandes (⌘K, Ctrl+K sous Linux et Windows). | 7 | 1. Ouvrez l'assistant : **✨ Créer un agent Claude, Gemini, Codex ou Vibe** sur l'écran d'accueil, **✨ Créer un agent dans une sandbox** sous la liste des agents, ou **Créer un agent dans une sandbox** dans la palette de commandes (⌘K, Ctrl+K sous Linux et Windows). |
| 8 | 2. Choisissez l'agent : **Claude** (Claude Code, d'Anthropic), **Gemini** (de Google, via Antigravity), **Codex** (d'OpenAI) ou **Vibe** (de Mistral AI). | 8 | 2. Choisissez l'agent : **Claude** (Claude Code, d'Anthropic), **Gemini** (de Google, via Antigravity), **Codex** (d'OpenAI) ou **Vibe** (de Mistral AI). |
| 9 | 3. Si sbx n'a pas encore sa clé, collez-la dans **Clé d'API** et cliquez sur **Enregistrer la clé**. **Obtenir une clé…** ouvre la page où l'éditeur vous en donne une. Sidekicks confie la clé à sbx, qui la garde et la fournit à vos sandboxes seulement pour leurs appels à cet éditeur ; elle n'est jamais écrite dans un fichier. Une clé déjà enregistrée s'affiche **✓ Votre clé … est enregistrée dans sbx**. | 9 | 3. Si sbx n'a pas encore sa clé, collez-la dans **Clé d'API** et cliquez sur **Enregistrer la clé**. **Obtenir une clé…** ouvre la page où l'éditeur vous en donne une. Sidekicks confie la clé à sbx, qui la garde et la fournit à vos sandboxes seulement pour leurs appels à cet éditeur ; elle n'est jamais écrite dans un fichier. Une clé déjà enregistrée s'affiche **✓ Votre clé … est enregistrée dans sbx**. |
| 10 | -4. Donnez à l'agent ses derniers détails : **Nom affiché**, **Nom** (ce qui l'appelle, `@claude`, et le nom de son dossier et de sa sandbox : minuscules, chiffres et `-`, en commençant par une lettre) et un **Emoji**. Sidekicks propose un nom que personne n'utilise encore. | 10 | +4. Donnez à l'agent ses derniers détails : **Nom affiché**, **Nom** (ce qui l'appelle, `@claude`, et le nom de son dossier et de sa sandbox : minuscules, chiffres et `-`, en commençant par une lettre) et un **Emoji** (le logo de l'agent est choisi d'abord). Le **Nom** suit le **Nom affiché** (`Marcel (assistant)` donne `marcel-assistant`) tant que vous ne le tapez pas vous-même ; Sidekicks en propose toujours un que personne n'utilise encore, et prévient avant le clic quand celui que vous avez tapé est pris. |
| 11 | -5. Cliquez sur **Ajouter l'agent**. Sa conversation s'ouvre. Sa sandbox est créée la première fois que vous lui écrivez : cette première réponse prend un moment. | 11 | +5. Cliquez sur **Ajouter l'agent**. Sa conversation s'ouvre. Sa sandbox est créée la première fois que vous lui écrivez : cette première réponse prend un moment ; la conversation montre ce qui se passe — l'étape, le temps écoulé, ce que sbx télécharge — et **Voir le journal** ouvre le détail. |
| 12 | 12 | ||
| 13 | Le dossier de l'agent est créé dans votre dossier **Documents**, au nom de l'agent (`~/Documents/claude`) : son `sbxenv.yaml` et son dossier `workspace/`, où l'agent travaille. | 13 | Le dossier de l'agent est créé dans votre dossier **Documents**, au nom de l'agent (`~/Documents/claude`) : son `sbxenv.yaml` et son dossier `workspace/`, où l'agent travaille. |
| 14 | 14 | ||
modified
docs/fr/how-to/creer-un-agent-mini-me.md +2 -1 | @@ -7,7 +7,8 @@ Ce guide montre comment créer un nouvel agent [mini-me](https://git.rickub.com/ | ||
| 7 | 7 | 1. Ouvrez l'assistant : **✨ Créer mon premier agent** sur l'écran d'accueil, **✨ Créer un agent mini-me** sous la liste des agents, ou **Créer un agent mini-me** dans la palette de commandes (⌘K, Ctrl+K sous Linux et Windows). |
| 8 | 8 | 2. Répondez aux questions de mini-me, quelques-unes à la fois : le serveur de modèles, le modèle, à quoi sert l'agent, quelle machine fait tourner le modèle, s'il demande avant chaque commande ou modification de fichier, le nom de l'agent… Chaque question arrive avec la valeur par défaut de mini-me : **Suivant →** la prend. **À propos de ces choix** explique les options. Les questions sont celles de mini-me, en anglais. |
| 9 | 9 | 3. Quand mini-me a écrit l'agent, donnez ses derniers détails : |
| 10 | - - **Nom** : ce qui l'appelle dans une conversation (`@marcel`), et le nom de son dossier. Il part du nom donné à mini-me ; minuscules, chiffres, `-` et `_`, en commençant par une lettre. | |
| 10 | + - **Nom affiché** : celui de mini-me (`Marcel (developer)`), modifiable. | |
| 11 | + - **Nom** : ce qui l'appelle dans une conversation (`@marcel`), et le nom de son dossier. Il part du nom donné à mini-me, puis suit le **Nom affiché** quand vous le changez, tant que vous ne le tapez pas vous-même ; minuscules, chiffres, `-` et `_`, en commençant par une lettre. Un nom déjà utilisé est signalé avant le clic, avec un nom libre à essayer. | |
| 11 | 12 | - **Emoji** : choisissez-en un, ou tapez n'importe quel emoji. |
| 12 | 13 | - **Où s'exécute-t-il ?** **Sur cet ordinateur** (le plus simple), **Dans un conteneur Docker** (Docker doit être installé) ou **Dans une Docker Sandbox (sbx)** (sbx doit être installé). |
| 13 | 14 | 4. Cliquez sur **Ajouter l'agent**. Sa conversation directe s'ouvre : écrivez-lui. |
| @@ -7,7 +7,8 @@ Ce guide montre comment créer un nouvel agent [mini-me](https://git.rickub.com/ | |||
| 7 | 1. Ouvrez l'assistant : **✨ Créer mon premier agent** sur l'écran d'accueil, **✨ Créer un agent mini-me** sous la liste des agents, ou **Créer un agent mini-me** dans la palette de commandes (⌘K, Ctrl+K sous Linux et Windows). | 7 | 1. Ouvrez l'assistant : **✨ Créer mon premier agent** sur l'écran d'accueil, **✨ Créer un agent mini-me** sous la liste des agents, ou **Créer un agent mini-me** dans la palette de commandes (⌘K, Ctrl+K sous Linux et Windows). |
| 8 | 2. Répondez aux questions de mini-me, quelques-unes à la fois : le serveur de modèles, le modèle, à quoi sert l'agent, quelle machine fait tourner le modèle, s'il demande avant chaque commande ou modification de fichier, le nom de l'agent… Chaque question arrive avec la valeur par défaut de mini-me : **Suivant →** la prend. **À propos de ces choix** explique les options. Les questions sont celles de mini-me, en anglais. | 8 | 2. Répondez aux questions de mini-me, quelques-unes à la fois : le serveur de modèles, le modèle, à quoi sert l'agent, quelle machine fait tourner le modèle, s'il demande avant chaque commande ou modification de fichier, le nom de l'agent… Chaque question arrive avec la valeur par défaut de mini-me : **Suivant →** la prend. **À propos de ces choix** explique les options. Les questions sont celles de mini-me, en anglais. |
| 9 | 3. Quand mini-me a écrit l'agent, donnez ses derniers détails : | 9 | 3. Quand mini-me a écrit l'agent, donnez ses derniers détails : |
| 10 | - - **Nom** : ce qui l'appelle dans une conversation (`@marcel`), et le nom de son dossier. Il part du nom donné à mini-me ; minuscules, chiffres, `-` et `_`, en commençant par une lettre. | 10 | + - **Nom affiché** : celui de mini-me (`Marcel (developer)`), modifiable. |
| 11 | + - **Nom** : ce qui l'appelle dans une conversation (`@marcel`), et le nom de son dossier. Il part du nom donné à mini-me, puis suit le **Nom affiché** quand vous le changez, tant que vous ne le tapez pas vous-même ; minuscules, chiffres, `-` et `_`, en commençant par une lettre. Un nom déjà utilisé est signalé avant le clic, avec un nom libre à essayer. | ||
| 11 | - **Emoji** : choisissez-en un, ou tapez n'importe quel emoji. | 12 | - **Emoji** : choisissez-en un, ou tapez n'importe quel emoji. |
| 12 | - **Où s'exécute-t-il ?** **Sur cet ordinateur** (le plus simple), **Dans un conteneur Docker** (Docker doit être installé) ou **Dans une Docker Sandbox (sbx)** (sbx doit être installé). | 13 | - **Où s'exécute-t-il ?** **Sur cet ordinateur** (le plus simple), **Dans un conteneur Docker** (Docker doit être installé) ou **Dans une Docker Sandbox (sbx)** (sbx doit être installé). |
| 13 | 4. Cliquez sur **Ajouter l'agent**. Sa conversation directe s'ouvre : écrivez-lui. | 14 | 4. Cliquez sur **Ajouter l'agent**. Sa conversation directe s'ouvre : écrivez-lui. |
modified
docs/fr/reference/agents-et-evenements.md +10 -9 | @@ -38,6 +38,7 @@ Arrêter un agent ferme son entrée standard, attend 5 secondes, puis tue son gr | ||
| 38 | 38 | | `config:changed` | `{path, valid, problems[]}` | Le fichier de configuration a été enregistré et rechargé (valide ou non). | |
| 39 | 39 | | `agent:state` | `{agent, state, error?}` | Un agent change d'état ou sa définition change. | |
| 40 | 40 | | `agent:log` | `{agent, line}` | Un agent écrit une ligne sur sa sortie d'erreur, ou une commande de sa sandbox en affiche une (préfixée par `sandbox: `). | |
| 41 | +| `agent:progress` | `{agent, step, line, since}` | Un agent qui démarre passe à une autre étape — `checking` (sa sandbox ou son conteneur est examiné), `preparing` (il est créé ou démarré : une ligne est venue de sa commande de cycle de vie), `connecting` (son programme démarre et répond à `initialize`) — ou a écrit une ligne (`line`, sans le préfixe `sandbox: ` du journal) ; `since` est le début du démarrage, en millisecondes Unix (issue #98). La conversation montre une carte de progression avec l'étape, le temps écoulé, la dernière ligne (une barre quand elle contient un pourcentage ou des tailles `fait/total`) et **Voir le journal** ; le panneau Agents montre l'étape. Se termine avec le `agent:state` suivant. | | |
| 41 | 42 | | `files:dropped` | `{target, files[]}` | Des fichiers du système sont déposés sur un élément marqué `data-file-drop-target` ; `target` est son `id`, `files` leurs chemins absolus. | |
| 42 | 43 | |
| 43 | 44 | Les noms et types Go sont dans `internal/events` ; les constantes et types TypeScript sont générés dans `frontend/bindings/events` et `frontend/bindings/…/internal/events`. |
| @@ -46,7 +47,7 @@ Les noms et types Go sont dans `internal/events` ; les constantes et types TypeS | ||
| 46 | 47 | |
| 47 | 48 | | Service | Méthode | Effet | |
| 48 | 49 | | --- | --- | --- | |
| 49 | -| `AgentService` | `List()` | Tous les agents avec `name, title, icon, description, state, error, outdated, runtime, canStopSandbox, canRemoveSandbox`, dans l'ordre de la configuration. | | |
| 50 | +| `AgentService` | `List()` | Tous les agents avec `name, title, icon, description, state, error, outdated, runtime, canStopSandbox, canRemoveSandbox` (et, pendant un démarrage, `step, since` comme les donne `agent:progress`), dans l'ordre de la configuration. | | |
| 50 | 51 | | | `Start(name)`, `Stop(name)`, `Restart(name)` | Comme dans les transitions ci-dessus ; une erreur est renvoyée à l'interface. Un démarrage recrée d'abord une sandbox absente si `runtime.lifecycle.create` est défini. | |
| 51 | 52 | | | `StopSandbox(name)`, `RemoveSandbox(name)` | Arrête l'agent, puis lance `runtime.lifecycle.stop` ou `remove` (conteneur ou sandbox) ; la sortie va dans le journal de l'agent. | |
| 52 | 53 | | | `Unload(name)` | Demande à un agent en marche et inactif, qui a annoncé la commande `unload`, de décharger son modèle (ticket #51) : `/unload` est envoyé dans une session à part, qu'aucune conversation ne montre ; la réponse va dans le journal de l'agent, en lignes `unload: …`. Erreurs : agent inconnu, `the agent is not running…`, `the agent is answering…`, `this agent cannot unload its model…`. | |
| @@ -244,29 +245,29 @@ L'assistant qui crée un agent mini-me (issue #94, [Créer un agent mini-me](../ | ||
| 244 | 245 | |
| 245 | 246 | | Méthode | Effet | |
| 246 | 247 | | --- | --- | |
| 247 | -| `Start()` | Lance `mm --version` (`mini-me (mm) is not installed` ; `mini-me (mm) 1.0.8 is too old: version 1.0.9 or later is needed` ; une version que mm ne sait pas dire est acceptée), ferme un assistant resté ouvert, crée le dossier temporaire (et supprime ceux de plus d'un jour), y démarre mm et envoie `/start`. Renvoie `{view, agentsFolder, version}`. | | |
| 248 | +| `Start()` | Lance `mm --version` (`mini-me (mm) is not installed` ; `mini-me (mm) 1.0.8 is too old: version 1.0.9 or later is needed` ; une version que mm ne sait pas dire est acceptée), ferme un assistant resté ouvert, crée le dossier temporaire (et supprime ceux de plus d'un jour), y démarre mm et envoie `/start`. Renvoie `{view, agentsFolder, version, taken[]}` (`taken` : les noms des agents et des dossiers du dossier des agents, issue #99). | | |
| 248 | 249 | | `Answer(answer)` | Répond au formulaire affiché : `{action: "accept", content: {nom: valeur…}}`, `decline` ou `cancel`. Renvoie la `view` suivante. | |
| 249 | 250 | | `Send(text)` | Envoie un message à mm (`/back`, `/restart`, `/start`…) ; refusé tant qu'un formulaire attend (le refuser d'abord). Renvoie la `view` suivante. | |
| 250 | -| `Finish({name, icon, environment})` | Renomme le dossier temporaire en `<agentsFolder>/<name>` (mode 0755), puis, pour `container` ou `sbx`, y redémarre mm et envoie `/dockerinit` ou `/sbxinit` ; ajoute l'agent avec `mm --acp --config <dossier>/.mm/agent.yaml`, à travers `docker exec -i <conteneur>` ou `sbx exec -i <sandbox>` avec les commandes de cycle de vie du `compose.yaml` ou du `sbxenv.yaml` (comme l'assistant « ajouter un agent » avec un fichier déposé), son titre venant de `acp.title`. Renvoie `{problem, problems[], name, folder, messages[]}` : `problem` vaut `nameTaken`, `folderExists` ou `invalidName` quand rien n'a été changé et qu'un autre nom peut être essayé ; `problems` sont ceux de la configuration. Un dossier existant n'est jamais touché. | | |
| 251 | +| `Finish({name, title, icon, environment})` | Renomme le dossier temporaire en `<agentsFolder>/<name>` (mode 0755), puis, pour `container` ou `sbx`, y redémarre mm et envoie `/dockerinit` ou `/sbxinit` ; ajoute l'agent avec `mm --acp --config <dossier>/.mm/agent.yaml`, à travers `docker exec -i <conteneur>` ou `sbx exec -i <sandbox>` avec les commandes de cycle de vie du `compose.yaml` ou du `sbxenv.yaml` (comme l'assistant « ajouter un agent » avec un fichier déposé), son titre étant `title`, sinon `acp.title`. Renvoie `{problem, problems[], name, folder, messages[]}` : `problem` vaut `nameTaken`, `folderExists` ou `invalidName` quand rien n'a été changé et qu'un autre nom peut être essayé ; `problems` sont ceux de la configuration. Un dossier existant n'est jamais touché. | | |
| 251 | 252 | | `Cancel()` | Arrête mm ; avant `Finish`, supprime le dossier temporaire. Fait aussi quand Sidekicks se ferme. | |
| 252 | 253 | |
| 253 | 254 | Une `view` vaut `{messages[], form, written, name, title}` : les messages de mm depuis le dernier appel (chacun entier), le formulaire en attente (`{message, fields[{name, title, description, type, options[], default, required}]}`, `null` sinon) et, dès que `.mm/agent.yaml` existe, `written` avec le `acp.name` de mm (transformé en nom valide) et le `acp.title`. La page affiche les messages `⚠️` de mm et replie les autres ; un champ `model` demandé en texte signifie qu'aucun serveur de modèles n'a répondu. |
| 254 | 255 | |
| 255 | 256 | ## `SbxCreatorService` |
| 256 | 257 | |
| 257 | -L'assistant qui crée un agent dans une Docker Sandbox (issue #96, [Créer un agent Claude, Gemini, Codex ou Vibe dans une sandbox](../how-to/creer-un-agent-dans-une-sandbox.md)). Les types qu'il propose forment un catalogue (`internal/sbxcreate`) : une entrée par type, avec ce que contient son `sbxenv.yaml` et la façon dont Sidekicks le démarre. | |
| 258 | +L'assistant qui crée un agent dans une Docker Sandbox (issue #96, [Créer un agent Claude, Gemini, Codex ou Vibe dans une sandbox](../how-to/creer-un-agent-dans-une-sandbox.md)). Les types qu'il propose forment un catalogue (`internal/sbxcreate`) : une entrée par type, avec ce que contient son `sbxenv.yaml`, la façon dont Sidekicks le démarre, et son icône par défaut : le logo de sa marque (issue #100). | |
| 258 | 259 | |
| 259 | 260 | | Type | `agent:` | Kit | Programme dans la sandbox | Secret sbx | |
| 260 | 261 | | --- | --- | --- | --- | --- | |
| 261 | -| `claude` 📙 | `claude` | `docker.io/sbx/claude-acp:latest` | `claude-agent-acp` | `anthropic` | | |
| 262 | -| `gemini` 📘 | `antigravity` | `docker.io/sbx/antigravity:latest` | `agy acp` | `google` | | |
| 263 | -| `codex` 📗 | `codex` | `docker.io/sbx/codex-acp:latest` | `codex-acp` | `openai` | | |
| 264 | -| `vibe` 🟧 | `vibe` | `docker.io/sbx/vibe-kit:latest` | `vibe-acp` | `mistral` | | |
| 262 | +| `claude` (`logo:claude`) | `claude` | `docker.io/sbx/claude-acp:latest` | `claude-agent-acp` | `anthropic` | | |
| 263 | +| `gemini` (`logo:gemini`) | `antigravity` | `docker.io/sbx/antigravity:latest` | `agy acp` | `google` | | |
| 264 | +| `codex` (`logo:openai`) | `codex` | `docker.io/sbx/codex-acp:latest` | `codex-acp` | `openai` | | |
| 265 | +| `vibe` (`logo:mistral`) | `vibe` | `docker.io/sbx/vibe-kit:latest` | `vibe-acp` | `mistral` | | |
| 265 | 266 | |
| 266 | 267 | | Méthode | Effet | |
| 267 | 268 | | --- | --- | |
| 268 | 269 | | `Kinds()` | Le catalogue, dans l'ordre : `{id, title, icon, agent, kit, program, service, keyUrl}`. | |
| 269 | -| `Check(kind)` | `sbx is not installed` quand sbx est introuvable (`sbx` dans le PATH, `/usr/local/bin`, `/opt/homebrew/bin`). Renvoie `{hasKey, name, agentsFolder}` : si `sbx secret ls --service <service>` montre un secret global, et le premier nom libre parmi `<type>`, `<type>-2`… — libre comme agent de la configuration, dossier du dossier des agents et sandbox (`sbx ls -q`). | | |
| 270 | +| `Check(kind)` | `sbx is not installed` quand sbx est introuvable (`sbx` dans le PATH, `/usr/local/bin`, `/opt/homebrew/bin`). Renvoie `{hasKey, name, agentsFolder, taken[]}` (`taken` : les noms pris par un agent, un dossier ou une sandbox, issue #99) : si `sbx secret ls --service <service>` montre un secret global, et le premier nom libre parmi `<type>`, `<type>-2`… — libre comme agent de la configuration, dossier du dossier des agents et sandbox (`sbx ls -q`). | | |
| 270 | 271 | | `SetKey(kind, key)` | `sbx secret set <service>` avec la clé sur son entrée standard — jamais dans ses arguments, un fichier ou un journal ; une erreur ne la répète jamais. Globale : toutes les sandboxes l'ont. | |
| 271 | 272 | | `Login()` | Lance `sbx login` (issue #97) — ou rejoint celui en cours — et revient dès que sbx a affiché son code et son adresse, 20 secondes au plus : `{code, url, done, user, error, output[]}`. Le code est le premier `XXXX-XXXX`, l'adresse le premier `https://…` qui contient `login` ; `output` garde chaque ligne pour le cas où sbx affiche autre chose. Son entrée standard est vide : une question posée au clavier n'a pas de réponse. | |
| 272 | 273 | | `LoginStatus()` | Attend, 20 secondes au plus, la fin de `sbx login` et renvoie le même état ; `done` avec `user` (tiré de `Signed in as <user>.`) une fois connecté, sinon `error` (`cancelled` après `CancelLogin`). L'interface le rappelle jusqu'à `done`. | |
| @@ -38,6 +38,7 @@ Arrêter un agent ferme son entrée standard, attend 5 secondes, puis tue son gr | |||
| 38 | | `config:changed` | `{path, valid, problems[]}` | Le fichier de configuration a été enregistré et rechargé (valide ou non). | | 38 | | `config:changed` | `{path, valid, problems[]}` | Le fichier de configuration a été enregistré et rechargé (valide ou non). | |
| 39 | | `agent:state` | `{agent, state, error?}` | Un agent change d'état ou sa définition change. | | 39 | | `agent:state` | `{agent, state, error?}` | Un agent change d'état ou sa définition change. | |
| 40 | | `agent:log` | `{agent, line}` | Un agent écrit une ligne sur sa sortie d'erreur, ou une commande de sa sandbox en affiche une (préfixée par `sandbox: `). | | 40 | | `agent:log` | `{agent, line}` | Un agent écrit une ligne sur sa sortie d'erreur, ou une commande de sa sandbox en affiche une (préfixée par `sandbox: `). | |
| 41 | +| `agent:progress` | `{agent, step, line, since}` | Un agent qui démarre passe à une autre étape — `checking` (sa sandbox ou son conteneur est examiné), `preparing` (il est créé ou démarré : une ligne est venue de sa commande de cycle de vie), `connecting` (son programme démarre et répond à `initialize`) — ou a écrit une ligne (`line`, sans le préfixe `sandbox: ` du journal) ; `since` est le début du démarrage, en millisecondes Unix (issue #98). La conversation montre une carte de progression avec l'étape, le temps écoulé, la dernière ligne (une barre quand elle contient un pourcentage ou des tailles `fait/total`) et **Voir le journal** ; le panneau Agents montre l'étape. Se termine avec le `agent:state` suivant. | | ||
| 41 | | `files:dropped` | `{target, files[]}` | Des fichiers du système sont déposés sur un élément marqué `data-file-drop-target` ; `target` est son `id`, `files` leurs chemins absolus. | | 42 | | `files:dropped` | `{target, files[]}` | Des fichiers du système sont déposés sur un élément marqué `data-file-drop-target` ; `target` est son `id`, `files` leurs chemins absolus. | |
| 42 | 43 | ||
| 43 | Les noms et types Go sont dans `internal/events` ; les constantes et types TypeScript sont générés dans `frontend/bindings/events` et `frontend/bindings/…/internal/events`. | 44 | Les noms et types Go sont dans `internal/events` ; les constantes et types TypeScript sont générés dans `frontend/bindings/events` et `frontend/bindings/…/internal/events`. |
| @@ -46,7 +47,7 @@ Les noms et types Go sont dans `internal/events` ; les constantes et types TypeS | |||
| 46 | 47 | ||
| 47 | | Service | Méthode | Effet | | 48 | | Service | Méthode | Effet | |
| 48 | | --- | --- | --- | | 49 | | --- | --- | --- | |
| 49 | -| `AgentService` | `List()` | Tous les agents avec `name, title, icon, description, state, error, outdated, runtime, canStopSandbox, canRemoveSandbox`, dans l'ordre de la configuration. | | 50 | +| `AgentService` | `List()` | Tous les agents avec `name, title, icon, description, state, error, outdated, runtime, canStopSandbox, canRemoveSandbox` (et, pendant un démarrage, `step, since` comme les donne `agent:progress`), dans l'ordre de la configuration. | |
| 50 | | | `Start(name)`, `Stop(name)`, `Restart(name)` | Comme dans les transitions ci-dessus ; une erreur est renvoyée à l'interface. Un démarrage recrée d'abord une sandbox absente si `runtime.lifecycle.create` est défini. | | 51 | | | `Start(name)`, `Stop(name)`, `Restart(name)` | Comme dans les transitions ci-dessus ; une erreur est renvoyée à l'interface. Un démarrage recrée d'abord une sandbox absente si `runtime.lifecycle.create` est défini. | |
| 51 | | | `StopSandbox(name)`, `RemoveSandbox(name)` | Arrête l'agent, puis lance `runtime.lifecycle.stop` ou `remove` (conteneur ou sandbox) ; la sortie va dans le journal de l'agent. | | 52 | | | `StopSandbox(name)`, `RemoveSandbox(name)` | Arrête l'agent, puis lance `runtime.lifecycle.stop` ou `remove` (conteneur ou sandbox) ; la sortie va dans le journal de l'agent. | |
| 52 | | | `Unload(name)` | Demande à un agent en marche et inactif, qui a annoncé la commande `unload`, de décharger son modèle (ticket #51) : `/unload` est envoyé dans une session à part, qu'aucune conversation ne montre ; la réponse va dans le journal de l'agent, en lignes `unload: …`. Erreurs : agent inconnu, `the agent is not running…`, `the agent is answering…`, `this agent cannot unload its model…`. | | 53 | | | `Unload(name)` | Demande à un agent en marche et inactif, qui a annoncé la commande `unload`, de décharger son modèle (ticket #51) : `/unload` est envoyé dans une session à part, qu'aucune conversation ne montre ; la réponse va dans le journal de l'agent, en lignes `unload: …`. Erreurs : agent inconnu, `the agent is not running…`, `the agent is answering…`, `this agent cannot unload its model…`. | |
| @@ -244,29 +245,29 @@ L'assistant qui crée un agent mini-me (issue #94, [Créer un agent mini-me](../ | |||
| 244 | 245 | ||
| 245 | | Méthode | Effet | | 246 | | Méthode | Effet | |
| 246 | | --- | --- | | 247 | | --- | --- | |
| 247 | -| `Start()` | Lance `mm --version` (`mini-me (mm) is not installed` ; `mini-me (mm) 1.0.8 is too old: version 1.0.9 or later is needed` ; une version que mm ne sait pas dire est acceptée), ferme un assistant resté ouvert, crée le dossier temporaire (et supprime ceux de plus d'un jour), y démarre mm et envoie `/start`. Renvoie `{view, agentsFolder, version}`. | | 248 | +| `Start()` | Lance `mm --version` (`mini-me (mm) is not installed` ; `mini-me (mm) 1.0.8 is too old: version 1.0.9 or later is needed` ; une version que mm ne sait pas dire est acceptée), ferme un assistant resté ouvert, crée le dossier temporaire (et supprime ceux de plus d'un jour), y démarre mm et envoie `/start`. Renvoie `{view, agentsFolder, version, taken[]}` (`taken` : les noms des agents et des dossiers du dossier des agents, issue #99). | |
| 248 | | `Answer(answer)` | Répond au formulaire affiché : `{action: "accept", content: {nom: valeur…}}`, `decline` ou `cancel`. Renvoie la `view` suivante. | | 249 | | `Answer(answer)` | Répond au formulaire affiché : `{action: "accept", content: {nom: valeur…}}`, `decline` ou `cancel`. Renvoie la `view` suivante. | |
| 249 | | `Send(text)` | Envoie un message à mm (`/back`, `/restart`, `/start`…) ; refusé tant qu'un formulaire attend (le refuser d'abord). Renvoie la `view` suivante. | | 250 | | `Send(text)` | Envoie un message à mm (`/back`, `/restart`, `/start`…) ; refusé tant qu'un formulaire attend (le refuser d'abord). Renvoie la `view` suivante. | |
| 250 | -| `Finish({name, icon, environment})` | Renomme le dossier temporaire en `<agentsFolder>/<name>` (mode 0755), puis, pour `container` ou `sbx`, y redémarre mm et envoie `/dockerinit` ou `/sbxinit` ; ajoute l'agent avec `mm --acp --config <dossier>/.mm/agent.yaml`, à travers `docker exec -i <conteneur>` ou `sbx exec -i <sandbox>` avec les commandes de cycle de vie du `compose.yaml` ou du `sbxenv.yaml` (comme l'assistant « ajouter un agent » avec un fichier déposé), son titre venant de `acp.title`. Renvoie `{problem, problems[], name, folder, messages[]}` : `problem` vaut `nameTaken`, `folderExists` ou `invalidName` quand rien n'a été changé et qu'un autre nom peut être essayé ; `problems` sont ceux de la configuration. Un dossier existant n'est jamais touché. | | 251 | +| `Finish({name, title, icon, environment})` | Renomme le dossier temporaire en `<agentsFolder>/<name>` (mode 0755), puis, pour `container` ou `sbx`, y redémarre mm et envoie `/dockerinit` ou `/sbxinit` ; ajoute l'agent avec `mm --acp --config <dossier>/.mm/agent.yaml`, à travers `docker exec -i <conteneur>` ou `sbx exec -i <sandbox>` avec les commandes de cycle de vie du `compose.yaml` ou du `sbxenv.yaml` (comme l'assistant « ajouter un agent » avec un fichier déposé), son titre étant `title`, sinon `acp.title`. Renvoie `{problem, problems[], name, folder, messages[]}` : `problem` vaut `nameTaken`, `folderExists` ou `invalidName` quand rien n'a été changé et qu'un autre nom peut être essayé ; `problems` sont ceux de la configuration. Un dossier existant n'est jamais touché. | |
| 251 | | `Cancel()` | Arrête mm ; avant `Finish`, supprime le dossier temporaire. Fait aussi quand Sidekicks se ferme. | | 252 | | `Cancel()` | Arrête mm ; avant `Finish`, supprime le dossier temporaire. Fait aussi quand Sidekicks se ferme. | |
| 252 | 253 | ||
| 253 | Une `view` vaut `{messages[], form, written, name, title}` : les messages de mm depuis le dernier appel (chacun entier), le formulaire en attente (`{message, fields[{name, title, description, type, options[], default, required}]}`, `null` sinon) et, dès que `.mm/agent.yaml` existe, `written` avec le `acp.name` de mm (transformé en nom valide) et le `acp.title`. La page affiche les messages `⚠️` de mm et replie les autres ; un champ `model` demandé en texte signifie qu'aucun serveur de modèles n'a répondu. | 254 | Une `view` vaut `{messages[], form, written, name, title}` : les messages de mm depuis le dernier appel (chacun entier), le formulaire en attente (`{message, fields[{name, title, description, type, options[], default, required}]}`, `null` sinon) et, dès que `.mm/agent.yaml` existe, `written` avec le `acp.name` de mm (transformé en nom valide) et le `acp.title`. La page affiche les messages `⚠️` de mm et replie les autres ; un champ `model` demandé en texte signifie qu'aucun serveur de modèles n'a répondu. |
| 254 | 255 | ||
| 255 | ## `SbxCreatorService` | 256 | ## `SbxCreatorService` |
| 256 | 257 | ||
| 257 | -L'assistant qui crée un agent dans une Docker Sandbox (issue #96, [Créer un agent Claude, Gemini, Codex ou Vibe dans une sandbox](../how-to/creer-un-agent-dans-une-sandbox.md)). Les types qu'il propose forment un catalogue (`internal/sbxcreate`) : une entrée par type, avec ce que contient son `sbxenv.yaml` et la façon dont Sidekicks le démarre. | 258 | +L'assistant qui crée un agent dans une Docker Sandbox (issue #96, [Créer un agent Claude, Gemini, Codex ou Vibe dans une sandbox](../how-to/creer-un-agent-dans-une-sandbox.md)). Les types qu'il propose forment un catalogue (`internal/sbxcreate`) : une entrée par type, avec ce que contient son `sbxenv.yaml`, la façon dont Sidekicks le démarre, et son icône par défaut : le logo de sa marque (issue #100). |
| 258 | 259 | ||
| 259 | | Type | `agent:` | Kit | Programme dans la sandbox | Secret sbx | | 260 | | Type | `agent:` | Kit | Programme dans la sandbox | Secret sbx | |
| 260 | | --- | --- | --- | --- | --- | | 261 | | --- | --- | --- | --- | --- | |
| 261 | -| `claude` 📙 | `claude` | `docker.io/sbx/claude-acp:latest` | `claude-agent-acp` | `anthropic` | | 262 | +| `claude` (`logo:claude`) | `claude` | `docker.io/sbx/claude-acp:latest` | `claude-agent-acp` | `anthropic` | |
| 262 | -| `gemini` 📘 | `antigravity` | `docker.io/sbx/antigravity:latest` | `agy acp` | `google` | | 263 | +| `gemini` (`logo:gemini`) | `antigravity` | `docker.io/sbx/antigravity:latest` | `agy acp` | `google` | |
| 263 | -| `codex` 📗 | `codex` | `docker.io/sbx/codex-acp:latest` | `codex-acp` | `openai` | | 264 | +| `codex` (`logo:openai`) | `codex` | `docker.io/sbx/codex-acp:latest` | `codex-acp` | `openai` | |
| 264 | -| `vibe` 🟧 | `vibe` | `docker.io/sbx/vibe-kit:latest` | `vibe-acp` | `mistral` | | 265 | +| `vibe` (`logo:mistral`) | `vibe` | `docker.io/sbx/vibe-kit:latest` | `vibe-acp` | `mistral` | |
| 265 | 266 | ||
| 266 | | Méthode | Effet | | 267 | | Méthode | Effet | |
| 267 | | --- | --- | | 268 | | --- | --- | |
| 268 | | `Kinds()` | Le catalogue, dans l'ordre : `{id, title, icon, agent, kit, program, service, keyUrl}`. | | 269 | | `Kinds()` | Le catalogue, dans l'ordre : `{id, title, icon, agent, kit, program, service, keyUrl}`. | |
| 269 | -| `Check(kind)` | `sbx is not installed` quand sbx est introuvable (`sbx` dans le PATH, `/usr/local/bin`, `/opt/homebrew/bin`). Renvoie `{hasKey, name, agentsFolder}` : si `sbx secret ls --service <service>` montre un secret global, et le premier nom libre parmi `<type>`, `<type>-2`… — libre comme agent de la configuration, dossier du dossier des agents et sandbox (`sbx ls -q`). | | 270 | +| `Check(kind)` | `sbx is not installed` quand sbx est introuvable (`sbx` dans le PATH, `/usr/local/bin`, `/opt/homebrew/bin`). Renvoie `{hasKey, name, agentsFolder, taken[]}` (`taken` : les noms pris par un agent, un dossier ou une sandbox, issue #99) : si `sbx secret ls --service <service>` montre un secret global, et le premier nom libre parmi `<type>`, `<type>-2`… — libre comme agent de la configuration, dossier du dossier des agents et sandbox (`sbx ls -q`). | |
| 270 | | `SetKey(kind, key)` | `sbx secret set <service>` avec la clé sur son entrée standard — jamais dans ses arguments, un fichier ou un journal ; une erreur ne la répète jamais. Globale : toutes les sandboxes l'ont. | | 271 | | `SetKey(kind, key)` | `sbx secret set <service>` avec la clé sur son entrée standard — jamais dans ses arguments, un fichier ou un journal ; une erreur ne la répète jamais. Globale : toutes les sandboxes l'ont. | |
| 271 | | `Login()` | Lance `sbx login` (issue #97) — ou rejoint celui en cours — et revient dès que sbx a affiché son code et son adresse, 20 secondes au plus : `{code, url, done, user, error, output[]}`. Le code est le premier `XXXX-XXXX`, l'adresse le premier `https://…` qui contient `login` ; `output` garde chaque ligne pour le cas où sbx affiche autre chose. Son entrée standard est vide : une question posée au clavier n'a pas de réponse. | | 272 | | `Login()` | Lance `sbx login` (issue #97) — ou rejoint celui en cours — et revient dès que sbx a affiché son code et son adresse, 20 secondes au plus : `{code, url, done, user, error, output[]}`. Le code est le premier `XXXX-XXXX`, l'adresse le premier `https://…` qui contient `login` ; `output` garde chaque ligne pour le cas où sbx affiche autre chose. Son entrée standard est vide : une question posée au clavier n'a pas de réponse. | |
| 272 | | `LoginStatus()` | Attend, 20 secondes au plus, la fin de `sbx login` et renvoie le même état ; `done` avec `user` (tiré de `Signed in as <user>.`) une fois connecté, sinon `error` (`cancelled` après `CancelLogin`). L'interface le rappelle jusqu'à `done`. | | 273 | | `LoginStatus()` | Attend, 20 secondes au plus, la fin de `sbx login` et renvoie le même état ; `done` avec `user` (tiré de `Signed in as <user>.`) une fois connecté, sinon `error` (`cancelled` après `CancelLogin`). L'interface le rappelle jusqu'à `done`. | |
modified
docs/fr/reference/configuration.md +1 -1 | @@ -83,7 +83,7 @@ agentTools: | ||
| 83 | 83 | | --- | --- | --- | --- | --- | |
| 84 | 84 | | `name` | identifiant | oui | | Minuscules, chiffres, `-`, `_` ; commence par une lettre ; 32 caractères au plus. Sert dans `@nom` et `/nom:commande`. **Unique.** | |
| 85 | 85 | | `title` | texte | non | `name` | Nom affiché dans l'interface. | |
| 86 | -| `icon` | texte (un emoji ou une lettre) | non | | Affiché à côté de l'agent. Un emoji est affiché tel quel ; sinon sa première lettre est affichée dans un rond coloré (la couleur dépend de `name`). Sans `icon`, le rond contient la première lettre de `title`. | | |
| 86 | +| `icon` | texte (un emoji, une lettre ou `logo:<nom>`) | non | | Affiché à côté de l'agent. Un emoji est affiché tel quel ; `logo:claude`, `logo:gemini`, `logo:openai` ou `logo:mistral` affiche le logo de cette marque sur un disque clair (un autre nom est un avertissement, et affiche une lettre) ; sinon sa première lettre est affichée dans un rond coloré (la couleur dépend de `name`). Sans `icon`, le rond contient la première lettre de `title`. | | |
| 87 | 87 | | `description` | texte | non | | Une phrase affichée dans la liste `@`. | |
| 88 | 88 | | `command` | texte | oui | | Programme qui sert ACP sur stdio. | |
| 89 | 89 | | `args` | liste de textes | non | `[]` | Ses arguments. | |
| @@ -83,7 +83,7 @@ agentTools: | |||
| 83 | | --- | --- | --- | --- | --- | | 83 | | --- | --- | --- | --- | --- | |
| 84 | | `name` | identifiant | oui | | Minuscules, chiffres, `-`, `_` ; commence par une lettre ; 32 caractères au plus. Sert dans `@nom` et `/nom:commande`. **Unique.** | | 84 | | `name` | identifiant | oui | | Minuscules, chiffres, `-`, `_` ; commence par une lettre ; 32 caractères au plus. Sert dans `@nom` et `/nom:commande`. **Unique.** | |
| 85 | | `title` | texte | non | `name` | Nom affiché dans l'interface. | | 85 | | `title` | texte | non | `name` | Nom affiché dans l'interface. | |
| 86 | -| `icon` | texte (un emoji ou une lettre) | non | | Affiché à côté de l'agent. Un emoji est affiché tel quel ; sinon sa première lettre est affichée dans un rond coloré (la couleur dépend de `name`). Sans `icon`, le rond contient la première lettre de `title`. | | 86 | +| `icon` | texte (un emoji, une lettre ou `logo:<nom>`) | non | | Affiché à côté de l'agent. Un emoji est affiché tel quel ; `logo:claude`, `logo:gemini`, `logo:openai` ou `logo:mistral` affiche le logo de cette marque sur un disque clair (un autre nom est un avertissement, et affiche une lettre) ; sinon sa première lettre est affichée dans un rond coloré (la couleur dépend de `name`). Sans `icon`, le rond contient la première lettre de `title`. | |
| 87 | | `description` | texte | non | | Une phrase affichée dans la liste `@`. | | 87 | | `description` | texte | non | | Une phrase affichée dans la liste `@`. | |
| 88 | | `command` | texte | oui | | Programme qui sert ACP sur stdio. | | 88 | | `command` | texte | oui | | Programme qui sert ACP sur stdio. | |
| 89 | | `args` | liste de textes | non | `[]` | Ses arguments. | | 89 | | `args` | liste de textes | non | `[]` | Ses arguments. | |
modified
docs/release-notes/v1.5.0.fr.md +5 -2 | @@ -19,7 +19,8 @@ Sidekicks 1.5.0 rend la création d'agents facile pour tout le monde : deux assi | ||
| 19 | 19 | |
| 20 | 20 | - **✨ Créer un agent dans une sandbox** — sous la liste des agents, sur l'écran d'accueil et dans la palette de commandes : choisissez **Claude**, **Gemini** (via Google Antigravity), **Codex** ou **Vibe** (Mistral AI, #86), donnez-lui un nom et un emoji, et Sidekicks écrit son dossier dans votre dossier Documents (son `sbxenv.yaml` et son `workspace/`) puis l'ajoute. Sa sandbox est créée à son premier démarrage. |
| 21 | 21 | - Pas encore de clé d'API dans sbx ? L'assistant explique laquelle il faut, ouvre la page qui en donne une, et la confie à sbx (`sbx secret set`) : la clé n'est jamais écrite dans un fichier ni dans un journal. |
| 22 | -- Le nom donné est aussi celui du dossier et de la sandbox ; Sidekicks en propose un qui est libre. | |
| 22 | +- Chaque type montre le logo de sa marque — Claude, Gemini, OpenAI, Mistral AI — qui devient l'icône de l'agent (#100 ; on peut toujours choisir un emoji). | |
| 23 | +- Le nom qui l'appelle suit le nom affiché (`Marcel (assistant)` donne `@marcel-assistant`) tant que vous ne le tapez pas vous-même ; c'est aussi celui du dossier et de la sandbox, et Sidekicks en propose un libre avant le clic (#99). L'assistant mini-me demande aussi le nom affiché. | |
| 23 | 24 | - Pas encore connecté à Docker ? **Se connecter à Docker** lance `sbx login` pour vous : Sidekicks affiche le code et ouvre la page où vous le confirmez, puis continue (#97). Le même bouton apparaît sous l'erreur d'un agent sbx qui ne démarre pas. |
| 24 | 25 | - L'assistant « Ajouter un agent » reconnaît aussi une sandbox de Gemini via Antigravity (`agent: antigravity` : `agy acp`) et de Vibe (`agent: vibe` : `vibe-acp`). |
| 25 | 26 | |
| @@ -34,12 +35,14 @@ Sidekicks 1.5.0 rend la création d'agents facile pour tout le monde : deux assi | ||
| 34 | 35 | |
| 35 | 36 | ### Petits changements |
| 36 | 37 | |
| 38 | +- Pendant que la sandbox ou le conteneur d'un agent est créé à son premier démarrage — plusieurs minutes la première fois — la conversation montre l'étape, le temps écoulé et ce qui est téléchargé, avec une barre quand sbx ou docker donne un pourcentage, et **Voir le journal** (#98). Le panneau Agents montre aussi l'étape. | |
| 39 | + | |
| 37 | 40 | - Les commandes qui créent, arrêtent ou suppriment le conteneur ou la sandbox d'un agent s'exécutent maintenant avec `PWD` égal à leur dossier, comme dans un terminal : le `compose.yaml` de `mm dockerinit` monte `${PWD}`, qui valait `/` quand Sidekicks était ouvert depuis le Finder. |
| 38 | 41 | |
| 39 | 42 | ## Bon à savoir pour la mise à jour |
| 40 | 43 | |
| 41 | 44 | - Glissez le nouveau **sidekicks** dans **Applications** et confirmez le remplacement ; votre configuration et votre historique sont gardés. |
| 42 | -- Vos fichiers de configuration fonctionnent tels quels. Une nouvelle clé facultative : `agentsFolder`, où l'assistant crée les dossiers des agents (`~/Documents` par défaut). | |
| 45 | +- Vos fichiers de configuration fonctionnent tels quels. Une nouvelle clé facultative : `agentsFolder`, où les assistants créent les dossiers des agents (`~/Documents` par défaut) ; et l'`icon` d'un agent peut maintenant valoir `logo:claude`, `logo:gemini`, `logo:openai` ou `logo:mistral`. | |
| 43 | 46 | - L'assistant des sandboxes a besoin de sbx (Docker Sandboxes). Gemini passe maintenant par le kit `antigravity` de Docker, qui remplace son `gemini-kit` déprécié ; vos sandboxes Gemini existantes continuent de fonctionner. |
| 44 | 47 | - L'assistant de création d'agents mini-me a besoin de mini-me (`mm`) **1.0.9 ou plus récent**. Pour un agent dans un conteneur Docker, utilisez la version de mini-me qui corrige le compte de `mm dockerinit` ; un agent créé avant affiche `I have no name!` dans son terminal : réécrivez ses fichiers (`mm dockerinit`) et reconstruisez son image (`docker compose up -d --build`). |
| 45 | 48 | |
| @@ -19,7 +19,8 @@ Sidekicks 1.5.0 rend la création d'agents facile pour tout le monde : deux assi | |||
| 19 | 19 | ||
| 20 | - **✨ Créer un agent dans une sandbox** — sous la liste des agents, sur l'écran d'accueil et dans la palette de commandes : choisissez **Claude**, **Gemini** (via Google Antigravity), **Codex** ou **Vibe** (Mistral AI, #86), donnez-lui un nom et un emoji, et Sidekicks écrit son dossier dans votre dossier Documents (son `sbxenv.yaml` et son `workspace/`) puis l'ajoute. Sa sandbox est créée à son premier démarrage. | 20 | - **✨ Créer un agent dans une sandbox** — sous la liste des agents, sur l'écran d'accueil et dans la palette de commandes : choisissez **Claude**, **Gemini** (via Google Antigravity), **Codex** ou **Vibe** (Mistral AI, #86), donnez-lui un nom et un emoji, et Sidekicks écrit son dossier dans votre dossier Documents (son `sbxenv.yaml` et son `workspace/`) puis l'ajoute. Sa sandbox est créée à son premier démarrage. |
| 21 | - Pas encore de clé d'API dans sbx ? L'assistant explique laquelle il faut, ouvre la page qui en donne une, et la confie à sbx (`sbx secret set`) : la clé n'est jamais écrite dans un fichier ni dans un journal. | 21 | - Pas encore de clé d'API dans sbx ? L'assistant explique laquelle il faut, ouvre la page qui en donne une, et la confie à sbx (`sbx secret set`) : la clé n'est jamais écrite dans un fichier ni dans un journal. |
| 22 | -- Le nom donné est aussi celui du dossier et de la sandbox ; Sidekicks en propose un qui est libre. | 22 | +- Chaque type montre le logo de sa marque — Claude, Gemini, OpenAI, Mistral AI — qui devient l'icône de l'agent (#100 ; on peut toujours choisir un emoji). |
| 23 | +- Le nom qui l'appelle suit le nom affiché (`Marcel (assistant)` donne `@marcel-assistant`) tant que vous ne le tapez pas vous-même ; c'est aussi celui du dossier et de la sandbox, et Sidekicks en propose un libre avant le clic (#99). L'assistant mini-me demande aussi le nom affiché. | ||
| 23 | - Pas encore connecté à Docker ? **Se connecter à Docker** lance `sbx login` pour vous : Sidekicks affiche le code et ouvre la page où vous le confirmez, puis continue (#97). Le même bouton apparaît sous l'erreur d'un agent sbx qui ne démarre pas. | 24 | - Pas encore connecté à Docker ? **Se connecter à Docker** lance `sbx login` pour vous : Sidekicks affiche le code et ouvre la page où vous le confirmez, puis continue (#97). Le même bouton apparaît sous l'erreur d'un agent sbx qui ne démarre pas. |
| 24 | - L'assistant « Ajouter un agent » reconnaît aussi une sandbox de Gemini via Antigravity (`agent: antigravity` : `agy acp`) et de Vibe (`agent: vibe` : `vibe-acp`). | 25 | - L'assistant « Ajouter un agent » reconnaît aussi une sandbox de Gemini via Antigravity (`agent: antigravity` : `agy acp`) et de Vibe (`agent: vibe` : `vibe-acp`). |
| 25 | 26 | ||
| @@ -34,12 +35,14 @@ Sidekicks 1.5.0 rend la création d'agents facile pour tout le monde : deux assi | |||
| 34 | 35 | ||
| 35 | ### Petits changements | 36 | ### Petits changements |
| 36 | 37 | ||
| 38 | +- Pendant que la sandbox ou le conteneur d'un agent est créé à son premier démarrage — plusieurs minutes la première fois — la conversation montre l'étape, le temps écoulé et ce qui est téléchargé, avec une barre quand sbx ou docker donne un pourcentage, et **Voir le journal** (#98). Le panneau Agents montre aussi l'étape. | ||
| 39 | + | ||
| 37 | - Les commandes qui créent, arrêtent ou suppriment le conteneur ou la sandbox d'un agent s'exécutent maintenant avec `PWD` égal à leur dossier, comme dans un terminal : le `compose.yaml` de `mm dockerinit` monte `${PWD}`, qui valait `/` quand Sidekicks était ouvert depuis le Finder. | 40 | - Les commandes qui créent, arrêtent ou suppriment le conteneur ou la sandbox d'un agent s'exécutent maintenant avec `PWD` égal à leur dossier, comme dans un terminal : le `compose.yaml` de `mm dockerinit` monte `${PWD}`, qui valait `/` quand Sidekicks était ouvert depuis le Finder. |
| 38 | 41 | ||
| 39 | ## Bon à savoir pour la mise à jour | 42 | ## Bon à savoir pour la mise à jour |
| 40 | 43 | ||
| 41 | - Glissez le nouveau **sidekicks** dans **Applications** et confirmez le remplacement ; votre configuration et votre historique sont gardés. | 44 | - Glissez le nouveau **sidekicks** dans **Applications** et confirmez le remplacement ; votre configuration et votre historique sont gardés. |
| 42 | -- Vos fichiers de configuration fonctionnent tels quels. Une nouvelle clé facultative : `agentsFolder`, où l'assistant crée les dossiers des agents (`~/Documents` par défaut). | 45 | +- Vos fichiers de configuration fonctionnent tels quels. Une nouvelle clé facultative : `agentsFolder`, où les assistants créent les dossiers des agents (`~/Documents` par défaut) ; et l'`icon` d'un agent peut maintenant valoir `logo:claude`, `logo:gemini`, `logo:openai` ou `logo:mistral`. |
| 43 | - L'assistant des sandboxes a besoin de sbx (Docker Sandboxes). Gemini passe maintenant par le kit `antigravity` de Docker, qui remplace son `gemini-kit` déprécié ; vos sandboxes Gemini existantes continuent de fonctionner. | 46 | - L'assistant des sandboxes a besoin de sbx (Docker Sandboxes). Gemini passe maintenant par le kit `antigravity` de Docker, qui remplace son `gemini-kit` déprécié ; vos sandboxes Gemini existantes continuent de fonctionner. |
| 44 | - L'assistant de création d'agents mini-me a besoin de mini-me (`mm`) **1.0.9 ou plus récent**. Pour un agent dans un conteneur Docker, utilisez la version de mini-me qui corrige le compte de `mm dockerinit` ; un agent créé avant affiche `I have no name!` dans son terminal : réécrivez ses fichiers (`mm dockerinit`) et reconstruisez son image (`docker compose up -d --build`). | 47 | - L'assistant de création d'agents mini-me a besoin de mini-me (`mm`) **1.0.9 ou plus récent**. Pour un agent dans un conteneur Docker, utilisez la version de mini-me qui corrige le compte de `mm dockerinit` ; un agent créé avant affiche `I have no name!` dans son terminal : réécrivez ses fichiers (`mm dockerinit`) et reconstruisez son image (`docker compose up -d --build`). |
| 45 | 48 | ||
modified
docs/release-notes/v1.5.0.md +5 -2 | @@ -19,7 +19,8 @@ Sidekicks 1.5.0 makes creating agents easy for everyone: two assistants create a | ||
| 19 | 19 | |
| 20 | 20 | - **✨ Create an agent in a sandbox** — under the agents list, on the welcome screen and in the command palette: choose **Claude**, **Gemini** (through Google Antigravity), **Codex** or **Vibe** (Mistral AI, #86), give it a name and an emoji, and Sidekicks writes its folder in your Documents folder (its `sbxenv.yaml` and its `workspace/`) and adds it. Its sandbox is created at its first start. |
| 21 | 21 | - No API key in sbx yet? The assistant explains which one is needed, opens the page that gives one, and stores it with sbx (`sbx secret set`): the key is never written in a file nor in a log. |
| 22 | -- The name you give is also the folder's and the sandbox's; Sidekicks suggests one that is free. | |
| 22 | +- Each kind shows its brand's logo — Claude, Gemini, OpenAI, Mistral AI — which becomes the agent's icon (#100; any emoji can still be chosen). | |
| 23 | +- The name you call it with follows the name shown (`Marcel (assistant)` gives `@marcel-assistant`) until you type it yourself; it is also the folder's and the sandbox's, and Sidekicks suggests a free one before you click (#99). The mini-me assistant asks for the name shown too. | |
| 23 | 24 | - Not signed in to Docker yet? **Sign in to Docker** runs `sbx login` for you: Sidekicks shows the code and opens the page where you confirm it, then goes on (#97). The same button appears under the error of an sbx agent that cannot start. |
| 24 | 25 | - The "Add an agent" assistant also recognises a sandbox of Gemini through Antigravity (`agent: antigravity`: `agy acp`) and of Vibe (`agent: vibe`: `vibe-acp`). |
| 25 | 26 | |
| @@ -34,12 +35,14 @@ Sidekicks 1.5.0 makes creating agents easy for everyone: two assistants create a | ||
| 34 | 35 | |
| 35 | 36 | ### Smaller changes |
| 36 | 37 | |
| 38 | +- While an agent's sandbox or container is created at its first start — minutes the first time — the conversation shows the step, the time elapsed and what is being downloaded, with a bar when sbx or docker gives a percentage, and **See the log** (#98). The Agents panel shows the step too. | |
| 39 | + | |
| 37 | 40 | - The commands that create, stop or remove an agent's container or sandbox now run with `PWD` set to their folder, as in a terminal: the `compose.yaml` of `mm dockerinit` mounts `${PWD}`, which was `/` when Sidekicks was opened from the Finder. |
| 38 | 41 | |
| 39 | 42 | ## Worth knowing when upgrading |
| 40 | 43 | |
| 41 | 44 | - Drag the new **sidekicks** into **Applications** and confirm the replacement; your configuration and your history are kept. |
| 42 | -- Your configuration files keep working as they are. One new optional key: `agentsFolder`, where the assistant creates the agents' folders (`~/Documents` by default). | |
| 45 | +- Your configuration files keep working as they are. One new optional key: `agentsFolder`, where the assistants create the agents' folders (`~/Documents` by default); and an agent's `icon` may now be `logo:claude`, `logo:gemini`, `logo:openai` or `logo:mistral`. | |
| 43 | 46 | - The sandbox assistant needs sbx (Docker Sandboxes). Gemini now goes through Docker's `antigravity` kit, which replaces its deprecated `gemini-kit`; your existing Gemini sandboxes keep working. |
| 44 | 47 | - The mini-me creation assistant needs mini-me (`mm`) **1.0.9 or later**. For an agent in a Docker container, use the mini-me release with the account fix of `mm dockerinit`; an agent created before it shows `I have no name!` in its terminal: write its files again (`mm dockerinit`) and rebuild its image (`docker compose up -d --build`). |
| 45 | 48 | |
| @@ -19,7 +19,8 @@ Sidekicks 1.5.0 makes creating agents easy for everyone: two assistants create a | |||
| 19 | 19 | ||
| 20 | - **✨ Create an agent in a sandbox** — under the agents list, on the welcome screen and in the command palette: choose **Claude**, **Gemini** (through Google Antigravity), **Codex** or **Vibe** (Mistral AI, #86), give it a name and an emoji, and Sidekicks writes its folder in your Documents folder (its `sbxenv.yaml` and its `workspace/`) and adds it. Its sandbox is created at its first start. | 20 | - **✨ Create an agent in a sandbox** — under the agents list, on the welcome screen and in the command palette: choose **Claude**, **Gemini** (through Google Antigravity), **Codex** or **Vibe** (Mistral AI, #86), give it a name and an emoji, and Sidekicks writes its folder in your Documents folder (its `sbxenv.yaml` and its `workspace/`) and adds it. Its sandbox is created at its first start. |
| 21 | - No API key in sbx yet? The assistant explains which one is needed, opens the page that gives one, and stores it with sbx (`sbx secret set`): the key is never written in a file nor in a log. | 21 | - No API key in sbx yet? The assistant explains which one is needed, opens the page that gives one, and stores it with sbx (`sbx secret set`): the key is never written in a file nor in a log. |
| 22 | -- The name you give is also the folder's and the sandbox's; Sidekicks suggests one that is free. | 22 | +- Each kind shows its brand's logo — Claude, Gemini, OpenAI, Mistral AI — which becomes the agent's icon (#100; any emoji can still be chosen). |
| 23 | +- The name you call it with follows the name shown (`Marcel (assistant)` gives `@marcel-assistant`) until you type it yourself; it is also the folder's and the sandbox's, and Sidekicks suggests a free one before you click (#99). The mini-me assistant asks for the name shown too. | ||
| 23 | - Not signed in to Docker yet? **Sign in to Docker** runs `sbx login` for you: Sidekicks shows the code and opens the page where you confirm it, then goes on (#97). The same button appears under the error of an sbx agent that cannot start. | 24 | - Not signed in to Docker yet? **Sign in to Docker** runs `sbx login` for you: Sidekicks shows the code and opens the page where you confirm it, then goes on (#97). The same button appears under the error of an sbx agent that cannot start. |
| 24 | - The "Add an agent" assistant also recognises a sandbox of Gemini through Antigravity (`agent: antigravity`: `agy acp`) and of Vibe (`agent: vibe`: `vibe-acp`). | 25 | - The "Add an agent" assistant also recognises a sandbox of Gemini through Antigravity (`agent: antigravity`: `agy acp`) and of Vibe (`agent: vibe`: `vibe-acp`). |
| 25 | 26 | ||
| @@ -34,12 +35,14 @@ Sidekicks 1.5.0 makes creating agents easy for everyone: two assistants create a | |||
| 34 | 35 | ||
| 35 | ### Smaller changes | 36 | ### Smaller changes |
| 36 | 37 | ||
| 38 | +- While an agent's sandbox or container is created at its first start — minutes the first time — the conversation shows the step, the time elapsed and what is being downloaded, with a bar when sbx or docker gives a percentage, and **See the log** (#98). The Agents panel shows the step too. | ||
| 39 | + | ||
| 37 | - The commands that create, stop or remove an agent's container or sandbox now run with `PWD` set to their folder, as in a terminal: the `compose.yaml` of `mm dockerinit` mounts `${PWD}`, which was `/` when Sidekicks was opened from the Finder. | 40 | - The commands that create, stop or remove an agent's container or sandbox now run with `PWD` set to their folder, as in a terminal: the `compose.yaml` of `mm dockerinit` mounts `${PWD}`, which was `/` when Sidekicks was opened from the Finder. |
| 38 | 41 | ||
| 39 | ## Worth knowing when upgrading | 42 | ## Worth knowing when upgrading |
| 40 | 43 | ||
| 41 | - Drag the new **sidekicks** into **Applications** and confirm the replacement; your configuration and your history are kept. | 44 | - Drag the new **sidekicks** into **Applications** and confirm the replacement; your configuration and your history are kept. |
| 42 | -- Your configuration files keep working as they are. One new optional key: `agentsFolder`, where the assistant creates the agents' folders (`~/Documents` by default). | 45 | +- Your configuration files keep working as they are. One new optional key: `agentsFolder`, where the assistants create the agents' folders (`~/Documents` by default); and an agent's `icon` may now be `logo:claude`, `logo:gemini`, `logo:openai` or `logo:mistral`. |
| 43 | - The sandbox assistant needs sbx (Docker Sandboxes). Gemini now goes through Docker's `antigravity` kit, which replaces its deprecated `gemini-kit`; your existing Gemini sandboxes keep working. | 46 | - The sandbox assistant needs sbx (Docker Sandboxes). Gemini now goes through Docker's `antigravity` kit, which replaces its deprecated `gemini-kit`; your existing Gemini sandboxes keep working. |
| 44 | - The mini-me creation assistant needs mini-me (`mm`) **1.0.9 or later**. For an agent in a Docker container, use the mini-me release with the account fix of `mm dockerinit`; an agent created before it shows `I have no name!` in its terminal: write its files again (`mm dockerinit`) and rebuild its image (`docker compose up -d --build`). | 47 | - The mini-me creation assistant needs mini-me (`mm`) **1.0.9 or later**. For an agent in a Docker container, use the mini-me release with the account fix of `mm dockerinit`; an agent created before it shows `I have no name!` in its terminal: write its files again (`mm dockerinit`) and rebuild its image (`docker compose up -d --build`). |
| 45 | 48 | ||
modified
frontend/bindings/events/index.ts +5 -0 | @@ -13,6 +13,11 @@ import "../github.com/wailsapp/wails/v3/internal/eventcreate.js"; | ||
| 13 | 13 | */ |
| 14 | 14 | export const AgentLog = "agent:log"; |
| 15 | 15 | |
| 16 | +/** | |
| 17 | + * Name of the custom event "agent:progress". | |
| 18 | + */ | |
| 19 | +export const AgentProgress = "agent:progress"; | |
| 20 | + | |
| 16 | 21 | /** |
| 17 | 22 | * Name of the custom event "agent:state". |
| 18 | 23 | */ |
| @@ -13,6 +13,11 @@ import "../github.com/wailsapp/wails/v3/internal/eventcreate.js"; | |||
| 13 | */ | 13 | */ |
| 14 | export const AgentLog = "agent:log"; | 14 | export const AgentLog = "agent:log"; |
| 15 | 15 | ||
| 16 | +/** | ||
| 17 | + * Name of the custom event "agent:progress". | ||
| 18 | + */ | ||
| 19 | +export const AgentProgress = "agent:progress"; | ||
| 20 | + | ||
| 16 | /** | 21 | /** |
| 17 | * Name of the custom event "agent:state". | 22 | * Name of the custom event "agent:state". |
| 18 | */ | 23 | */ |
modified
frontend/bindings/git.rickub.com/bots-garden/sidekicks/internal/agents/models.ts +7 -0 | @@ -51,4 +51,11 @@ export interface Status { | ||
| 51 | 51 | */ |
| 52 | 52 | "canStopSandbox": boolean; |
| 53 | 53 | "canRemoveSandbox": boolean; |
| 54 | + | |
| 55 | + /** | |
| 56 | + * Step and Since: while starting, the step and when the start began | |
| 57 | + * (Unix milliseconds), as agent:progress gives them (issue #98). | |
| 58 | + */ | |
| 59 | + "step"?: string; | |
| 60 | + "since"?: number; | |
| 54 | 61 | } |
| @@ -51,4 +51,11 @@ export interface Status { | |||
| 51 | */ | 51 | */ |
| 52 | "canStopSandbox": boolean; | 52 | "canStopSandbox": boolean; |
| 53 | "canRemoveSandbox": boolean; | 53 | "canRemoveSandbox": boolean; |
| 54 | + | ||
| 55 | + /** | ||
| 56 | + * Step and Since: while starting, the step and when the start began | ||
| 57 | + * (Unix milliseconds), as agent:progress gives them (issue #98). | ||
| 58 | + */ | ||
| 59 | + "step"?: string; | ||
| 60 | + "since"?: number; | ||
| 54 | } | 61 | } |
modified
frontend/bindings/git.rickub.com/bots-garden/sidekicks/internal/app/models.ts +17 -0 | @@ -119,6 +119,11 @@ export interface ConfigView { | ||
| 119 | 119 | */ |
| 120 | 120 | export interface CreatorFinish { |
| 121 | 121 | "name": string; |
| 122 | + | |
| 123 | + /** | |
| 124 | + * Title is the name shown; "" keeps mm's (acp.title). | |
| 125 | + */ | |
| 126 | + "title": string; | |
| 122 | 127 | "icon": string; |
| 123 | 128 | "environment": string; |
| 124 | 129 | } |
| @@ -157,6 +162,12 @@ export interface CreatorStart { | ||
| 157 | 162 | * Version is what mm --version said. |
| 158 | 163 | */ |
| 159 | 164 | "version": string; |
| 165 | + | |
| 166 | + /** | |
| 167 | + * Taken is the names already used, by an agent or by a folder of the | |
| 168 | + * agents' folder: the interface suggests a free one (issue #99). | |
| 169 | + */ | |
| 170 | + "taken": string[] | null; | |
| 160 | 171 | } |
| 161 | 172 | |
| 162 | 173 | /** |
| @@ -243,6 +254,12 @@ export interface SbxCheck { | ||
| 243 | 254 | "hasKey": boolean; |
| 244 | 255 | "name": string; |
| 245 | 256 | "agentsFolder": string; |
| 257 | + | |
| 258 | + /** | |
| 259 | + * Taken is the names already used, by an agent, a folder of the agents' | |
| 260 | + * folder or a sandbox: the interface suggests a free one (issue #99). | |
| 261 | + */ | |
| 262 | + "taken": string[] | null; | |
| 246 | 263 | } |
| 247 | 264 | |
| 248 | 265 | /** |
| @@ -119,6 +119,11 @@ export interface ConfigView { | |||
| 119 | */ | 119 | */ |
| 120 | export interface CreatorFinish { | 120 | export interface CreatorFinish { |
| 121 | "name": string; | 121 | "name": string; |
| 122 | + | ||
| 123 | + /** | ||
| 124 | + * Title is the name shown; "" keeps mm's (acp.title). | ||
| 125 | + */ | ||
| 126 | + "title": string; | ||
| 122 | "icon": string; | 127 | "icon": string; |
| 123 | "environment": string; | 128 | "environment": string; |
| 124 | } | 129 | } |
| @@ -157,6 +162,12 @@ export interface CreatorStart { | |||
| 157 | * Version is what mm --version said. | 162 | * Version is what mm --version said. |
| 158 | */ | 163 | */ |
| 159 | "version": string; | 164 | "version": string; |
| 165 | + | ||
| 166 | + /** | ||
| 167 | + * Taken is the names already used, by an agent or by a folder of the | ||
| 168 | + * agents' folder: the interface suggests a free one (issue #99). | ||
| 169 | + */ | ||
| 170 | + "taken": string[] | null; | ||
| 160 | } | 171 | } |
| 161 | 172 | ||
| 162 | /** | 173 | /** |
| @@ -243,6 +254,12 @@ export interface SbxCheck { | |||
| 243 | "hasKey": boolean; | 254 | "hasKey": boolean; |
| 244 | "name": string; | 255 | "name": string; |
| 245 | "agentsFolder": string; | 256 | "agentsFolder": string; |
| 257 | + | ||
| 258 | + /** | ||
| 259 | + * Taken is the names already used, by an agent, a folder of the agents' | ||
| 260 | + * folder or a sandbox: the interface suggests a free one (issue #99). | ||
| 261 | + */ | ||
| 262 | + "taken": string[] | null; | ||
| 246 | } | 263 | } |
| 247 | 264 | ||
| 248 | /** | 265 | /** |
modified
frontend/bindings/git.rickub.com/bots-garden/sidekicks/internal/events/index.ts +1 -0 | @@ -3,6 +3,7 @@ | ||
| 3 | 3 | |
| 4 | 4 | export type { |
| 5 | 5 | AgentLogPayload, |
| 6 | + AgentProgressPayload, | |
| 6 | 7 | AgentStatePayload, |
| 7 | 8 | ConfigChangedPayload, |
| 8 | 9 | FilesDroppedPayload, |
| @@ -3,6 +3,7 @@ | |||
| 3 | 3 | ||
| 4 | export type { | 4 | export type { |
| 5 | AgentLogPayload, | 5 | AgentLogPayload, |
| 6 | + AgentProgressPayload, | ||
| 6 | AgentStatePayload, | 7 | AgentStatePayload, |
| 7 | ConfigChangedPayload, | 8 | ConfigChangedPayload, |
| 8 | FilesDroppedPayload, | 9 | FilesDroppedPayload, |
modified
frontend/bindings/git.rickub.com/bots-garden/sidekicks/internal/events/models.ts +12 -0 | @@ -9,6 +9,18 @@ export interface AgentLogPayload { | ||
| 9 | 9 | "line": string; |
| 10 | 10 | } |
| 11 | 11 | |
| 12 | +/** | |
| 13 | + * AgentProgressPayload is where the start of an agent is: its step, the last | |
| 14 | + * line printed (by sbx, docker or the agent), and when the start began | |
| 15 | + * (Unix milliseconds), for the time elapsed. | |
| 16 | + */ | |
| 17 | +export interface AgentProgressPayload { | |
| 18 | + "agent": string; | |
| 19 | + "step": string; | |
| 20 | + "line": string; | |
| 21 | + "since": number; | |
| 22 | +} | |
| 23 | + | |
| 12 | 24 | /** |
| 13 | 25 | * AgentStatePayload is one state transition of an agent. |
| 14 | 26 | */ |
| @@ -9,6 +9,18 @@ export interface AgentLogPayload { | |||
| 9 | "line": string; | 9 | "line": string; |
| 10 | } | 10 | } |
| 11 | 11 | ||
| 12 | +/** | ||
| 13 | + * AgentProgressPayload is where the start of an agent is: its step, the last | ||
| 14 | + * line printed (by sbx, docker or the agent), and when the start began | ||
| 15 | + * (Unix milliseconds), for the time elapsed. | ||
| 16 | + */ | ||
| 17 | +export interface AgentProgressPayload { | ||
| 18 | + "agent": string; | ||
| 19 | + "step": string; | ||
| 20 | + "line": string; | ||
| 21 | + "since": number; | ||
| 22 | +} | ||
| 23 | + | ||
| 12 | /** | 24 | /** |
| 13 | * AgentStatePayload is one state transition of an agent. | 25 | * AgentStatePayload is one state transition of an agent. |
| 14 | */ | 26 | */ |
modified
frontend/bindings/git.rickub.com/bots-garden/sidekicks/internal/sbxcreate/models.ts +5 -0 | @@ -8,6 +8,11 @@ | ||
| 8 | 8 | export interface Kind { |
| 9 | 9 | "id": string; |
| 10 | 10 | "title": string; |
| 11 | + | |
| 12 | + /** | |
| 13 | + * Icon is the agent's default icon: its brand's logo ("logo:<name>", | |
| 14 | + * issue #100). | |
| 15 | + */ | |
| 11 | 16 | "icon": string; |
| 12 | 17 | |
| 13 | 18 | /** |
| @@ -8,6 +8,11 @@ | |||
| 8 | export interface Kind { | 8 | export interface Kind { |
| 9 | "id": string; | 9 | "id": string; |
| 10 | "title": string; | 10 | "title": string; |
| 11 | + | ||
| 12 | + /** | ||
| 13 | + * Icon is the agent's default icon: its brand's logo ("logo:<name>", | ||
| 14 | + * issue #100). | ||
| 15 | + */ | ||
| 11 | "icon": string; | 16 | "icon": string; |
| 12 | 17 | ||
| 13 | /** | 18 | /** |
modified
frontend/bindings/github.com/wailsapp/wails/v3/internal/eventdata.d.ts +1 -0 | @@ -19,6 +19,7 @@ declare module "@wailsio/runtime" { | ||
| 19 | 19 | namespace Events { |
| 20 | 20 | interface CustomEvents { |
| 21 | 21 | "agent:log": events$0.AgentLogPayload; |
| 22 | + "agent:progress": events$0.AgentProgressPayload; | |
| 22 | 23 | "agent:state": events$0.AgentStatePayload; |
| 23 | 24 | "channels:changed": channels$0.ListPayload; |
| 24 | 25 | "commands:changed": channels$0.CommandsPayload; |
| @@ -19,6 +19,7 @@ declare module "@wailsio/runtime" { | |||
| 19 | namespace Events { | 19 | namespace Events { |
| 20 | interface CustomEvents { | 20 | interface CustomEvents { |
| 21 | "agent:log": events$0.AgentLogPayload; | 21 | "agent:log": events$0.AgentLogPayload; |
| 22 | + "agent:progress": events$0.AgentProgressPayload; | ||
| 22 | "agent:state": events$0.AgentStatePayload; | 23 | "agent:state": events$0.AgentStatePayload; |
| 23 | "channels:changed": channels$0.ListPayload; | 24 | "channels:changed": channels$0.ListPayload; |
| 24 | "commands:changed": channels$0.CommandsPayload; | 25 | "commands:changed": channels$0.CommandsPayload; |
modified
frontend/src/lib/agent/AgentAvatar.svelte +21 -3 | @@ -1,7 +1,8 @@ | ||
| 1 | 1 | <!-- Copyright (c) 2026 Philippe Charrière — Sidekicks Source-Available License 1.0, see LICENSE --> |
| 2 | 2 | <script lang="ts"> |
| 3 | - // An agent's avatar: its emoji, or a letter in a coloured circle (see | |
| 4 | - // avatarOf). Decorative: the agent's title is always written next to it. | |
| 3 | + // An agent's avatar: the logo of its brand on a light disc, its emoji, or | |
| 4 | + // a letter in a coloured circle (see avatarOf). Decorative: the agent's | |
| 5 | + // title is always written next to it. | |
| 5 | 6 | import { avatarOf } from '../avatar' |
| 6 | 7 | |
| 7 | 8 | let { icon, title, name, size = 18 }: { icon?: string; title: string; name: string; size?: number } = $props() |
| @@ -9,13 +10,30 @@ | ||
| 9 | 10 | const avatar = $derived(avatarOf(icon, title, name)) |
| 10 | 11 | </script> |
| 11 | 12 | |
| 12 | -{#if 'emoji' in avatar} | |
| 13 | +{#if 'logo' in avatar} | |
| 14 | + <span class="logo" aria-hidden="true" style:--size="{size}px"> | |
| 15 | + <svg viewBox="0 0 24 24" fill={avatar.logo.color}><path d={avatar.logo.path} /></svg> | |
| 16 | + </span> | |
| 17 | +{:else if 'emoji' in avatar} | |
| 13 | 18 | <span class="emoji" aria-hidden="true">{avatar.emoji}</span> |
| 14 | 19 | {:else} |
| 15 | 20 | <span class="letter" aria-hidden="true" style:background={avatar.color} style:--size="{size}px">{avatar.letter}</span> |
| 16 | 21 | {/if} |
| 17 | 22 | |
| 18 | 23 | <style> |
| 24 | + .logo { | |
| 25 | + display: inline-flex; | |
| 26 | + align-items: center; | |
| 27 | + justify-content: center; | |
| 28 | + flex: none; | |
| 29 | + width: var(--size); | |
| 30 | + height: var(--size); | |
| 31 | + border-radius: 50%; | |
| 32 | + background: #fff; | |
| 33 | + box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12); | |
| 34 | + vertical-align: middle; | |
| 35 | + } | |
| 36 | + .logo svg { width: 66%; height: 66%; } | |
| 19 | 37 | .letter { |
| 20 | 38 | display: inline-flex; |
| 21 | 39 | align-items: center; |
| @@ -1,7 +1,8 @@ | |||
| 1 | <!-- Copyright (c) 2026 Philippe Charrière — Sidekicks Source-Available License 1.0, see LICENSE --> | 1 | <!-- Copyright (c) 2026 Philippe Charrière — Sidekicks Source-Available License 1.0, see LICENSE --> |
| 2 | <script lang="ts"> | 2 | <script lang="ts"> |
| 3 | - // An agent's avatar: its emoji, or a letter in a coloured circle (see | 3 | + // An agent's avatar: the logo of its brand on a light disc, its emoji, or |
| 4 | - // avatarOf). Decorative: the agent's title is always written next to it. | 4 | + // a letter in a coloured circle (see avatarOf). Decorative: the agent's |
| 5 | + // title is always written next to it. | ||
| 5 | import { avatarOf } from '../avatar' | 6 | import { avatarOf } from '../avatar' |
| 6 | 7 | ||
| 7 | let { icon, title, name, size = 18 }: { icon?: string; title: string; name: string; size?: number } = $props() | 8 | let { icon, title, name, size = 18 }: { icon?: string; title: string; name: string; size?: number } = $props() |
| @@ -9,13 +10,30 @@ | |||
| 9 | const avatar = $derived(avatarOf(icon, title, name)) | 10 | const avatar = $derived(avatarOf(icon, title, name)) |
| 10 | </script> | 11 | </script> |
| 11 | 12 | ||
| 12 | -{#if 'emoji' in avatar} | 13 | +{#if 'logo' in avatar} |
| 14 | + <span class="logo" aria-hidden="true" style:--size="{size}px"> | ||
| 15 | + <svg viewBox="0 0 24 24" fill={avatar.logo.color}><path d={avatar.logo.path} /></svg> | ||
| 16 | + </span> | ||
| 17 | +{:else if 'emoji' in avatar} | ||
| 13 | <span class="emoji" aria-hidden="true">{avatar.emoji}</span> | 18 | <span class="emoji" aria-hidden="true">{avatar.emoji}</span> |
| 14 | {:else} | 19 | {:else} |
| 15 | <span class="letter" aria-hidden="true" style:background={avatar.color} style:--size="{size}px">{avatar.letter}</span> | 20 | <span class="letter" aria-hidden="true" style:background={avatar.color} style:--size="{size}px">{avatar.letter}</span> |
| 16 | {/if} | 21 | {/if} |
| 17 | 22 | ||
| 18 | <style> | 23 | <style> |
| 24 | + .logo { | ||
| 25 | + display: inline-flex; | ||
| 26 | + align-items: center; | ||
| 27 | + justify-content: center; | ||
| 28 | + flex: none; | ||
| 29 | + width: var(--size); | ||
| 30 | + height: var(--size); | ||
| 31 | + border-radius: 50%; | ||
| 32 | + background: #fff; | ||
| 33 | + box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12); | ||
| 34 | + vertical-align: middle; | ||
| 35 | + } | ||
| 36 | + .logo svg { width: 66%; height: 66%; } | ||
| 19 | .letter { | 37 | .letter { |
| 20 | display: inline-flex; | 38 | display: inline-flex; |
| 21 | align-items: center; | 39 | align-items: center; |
modified
frontend/src/lib/agent/CreateMiniMeAgent.svelte +28 -8 | @@ -10,7 +10,8 @@ | ||
| 10 | 10 | import { t, type MessageKey } from '../i18n/index.svelte' |
| 11 | 11 | import { CreatorService } from '../../../bindings/git.rickub.com/bots-garden/sidekicks/internal/app' |
| 12 | 12 | import { agentAdded, appState } from '../state.svelte' |
| 13 | - import { agentFolder, contentOf, environments, iconChoices, initialValues, missingFields, noModelServer, problemKey, splitMessages, startProblem, validName, type Environment, type Form, type Value } from '../creator' | |
| 13 | + import { agentFolder, contentOf, environments, freeName, iconChoices, initialValues, missingFields, noModelServer, problemKey, splitMessages, startProblem, validName, type Environment, type Form, type Value } from '../creator' | |
| 14 | + import { nameFromTitle } from '../agentform' | |
| 14 | 15 | import AgentAvatar from './AgentAvatar.svelte' |
| 15 | 16 | import ErrorText from '../chat/ErrorText.svelte' |
| 16 | 17 | import Markdown from '../chat/Markdown.svelte' |
| @@ -32,6 +33,11 @@ | ||
| 32 | 33 | // The last step. |
| 33 | 34 | let name = $state('') |
| 34 | 35 | let title = $state('') |
| 36 | + // Issue #99: the @ name follows the name shown until it is typed by hand; | |
| 37 | + // taken is the names already used (agents, folders of the agents' folder). | |
| 38 | + let nameEdited = $state(false) | |
| 39 | + let taken = $state<string[]>([]) | |
| 40 | + const takenNow = $derived(name !== '' && taken.includes(name)) | |
| 35 | 41 | let icon = $state('🤖') |
| 36 | 42 | let environment = $state<Environment>('local') |
| 37 | 43 | let problem = $state('') |
| @@ -64,8 +70,9 @@ | ||
| 64 | 70 | step = 'questions' |
| 65 | 71 | } else if (view.written) { |
| 66 | 72 | form = null |
| 67 | - name = name || view.name | |
| 68 | - title = view.title | |
| 73 | + // mm's name, the one the user typed in the wizard, made free. | |
| 74 | + name = name || freeName(view.name, taken) | |
| 75 | + title = title || view.title | |
| 69 | 76 | step = 'ready' |
| 70 | 77 | } else { |
| 71 | 78 | form = null |
| @@ -92,6 +99,7 @@ | ||
| 92 | 99 | try { |
| 93 | 100 | const started = await CreatorService.Start() |
| 94 | 101 | agentsFolder = started.agentsFolder |
| 102 | + taken = started.taken ?? [] | |
| 95 | 103 | show(started.view) |
| 96 | 104 | } catch (caught) { |
| 97 | 105 | failure = caught instanceof Error ? caught.message : String(caught) |
| @@ -128,7 +136,7 @@ | ||
| 128 | 136 | } |
| 129 | 137 | busy = true |
| 130 | 138 | try { |
| 131 | - const result = await CreatorService.Finish({ name, icon: icon.trim(), environment }) | |
| 139 | + const result = await CreatorService.Finish({ name, title: title.trim(), icon: icon.trim(), environment }) | |
| 132 | 140 | if (result.problem) problem = result.problem |
| 133 | 141 | else if (result.problems && result.problems.length > 0) refused = result.problems |
| 134 | 142 | else { |
| @@ -142,6 +150,14 @@ | ||
| 142 | 150 | } |
| 143 | 151 | } |
| 144 | 152 | |
| 153 | + // The @ name made from the name shown, free, while it was not typed by hand. | |
| 154 | + function followTitle() { | |
| 155 | + if (nameEdited) return | |
| 156 | + const made = nameFromTitle(title) | |
| 157 | + if (made) name = freeName(made, taken) | |
| 158 | + problem = '' | |
| 159 | + } | |
| 160 | + | |
| 145 | 161 | function close() { |
| 146 | 162 | appState.creator = '' |
| 147 | 163 | } |
| @@ -210,12 +226,16 @@ | ||
| 210 | 226 | <div class="row"> |
| 211 | 227 | <span class="preview"><AgentAvatar icon={icon} title={title || name} name={name} size={34} /></span> |
| 212 | 228 | <label class="grow"> |
| 213 | - {t('creator.name')} | |
| 214 | - <input bind:value={name} oninput={() => (problem = '')} aria-invalid={problem !== ''} aria-describedby="creator-name-hint" spellcheck="false" autocapitalize="off" /> | |
| 229 | + {t('creator.agentTitle')} | |
| 230 | + <input bind:value={title} oninput={followTitle} /> | |
| 215 | 231 | </label> |
| 216 | 232 | </div> |
| 217 | - <small id="creator-name-hint" class:problem-text={problem !== ''} role={problem ? 'alert' : undefined}> | |
| 218 | - {problem ? t(problemKey(problem)) : t('creator.nameHint', { name, folder: agentFolder(agentsFolder, name) })} | |
| 233 | + <label> | |
| 234 | + {t('creator.name')} | |
| 235 | + <input bind:value={name} oninput={() => ((problem = ''), (nameEdited = true))} aria-invalid={problem !== '' || takenNow} aria-describedby="creator-name-hint" spellcheck="false" autocapitalize="off" /> | |
| 236 | + </label> | |
| 237 | + <small id="creator-name-hint" class:problem-text={problem !== '' || takenNow} role={problem || takenNow ? 'alert' : undefined}> | |
| 238 | + {#if problem}{t(problemKey(problem))}{:else if takenNow}{t('creator.problem.taken', { suggestion: freeName(name, taken) })}{:else}{t('creator.nameHint', { name, folder: agentFolder(agentsFolder, name) })}{/if} | |
| 219 | 239 | </small> |
| 220 | 240 | <div class="group" aria-label={t('creator.icon')}> |
| 221 | 241 | <span class="label">{t('creator.icon')}</span> |
| @@ -10,7 +10,8 @@ | |||
| 10 | import { t, type MessageKey } from '../i18n/index.svelte' | 10 | import { t, type MessageKey } from '../i18n/index.svelte' |
| 11 | import { CreatorService } from '../../../bindings/git.rickub.com/bots-garden/sidekicks/internal/app' | 11 | import { CreatorService } from '../../../bindings/git.rickub.com/bots-garden/sidekicks/internal/app' |
| 12 | import { agentAdded, appState } from '../state.svelte' | 12 | import { agentAdded, appState } from '../state.svelte' |
| 13 | - import { agentFolder, contentOf, environments, iconChoices, initialValues, missingFields, noModelServer, problemKey, splitMessages, startProblem, validName, type Environment, type Form, type Value } from '../creator' | 13 | + import { agentFolder, contentOf, environments, freeName, iconChoices, initialValues, missingFields, noModelServer, problemKey, splitMessages, startProblem, validName, type Environment, type Form, type Value } from '../creator' |
| 14 | + import { nameFromTitle } from '../agentform' | ||
| 14 | import AgentAvatar from './AgentAvatar.svelte' | 15 | import AgentAvatar from './AgentAvatar.svelte' |
| 15 | import ErrorText from '../chat/ErrorText.svelte' | 16 | import ErrorText from '../chat/ErrorText.svelte' |
| 16 | import Markdown from '../chat/Markdown.svelte' | 17 | import Markdown from '../chat/Markdown.svelte' |
| @@ -32,6 +33,11 @@ | |||
| 32 | // The last step. | 33 | // The last step. |
| 33 | let name = $state('') | 34 | let name = $state('') |
| 34 | let title = $state('') | 35 | let title = $state('') |
| 36 | + // Issue #99: the @ name follows the name shown until it is typed by hand; | ||
| 37 | + // taken is the names already used (agents, folders of the agents' folder). | ||
| 38 | + let nameEdited = $state(false) | ||
| 39 | + let taken = $state<string[]>([]) | ||
| 40 | + const takenNow = $derived(name !== '' && taken.includes(name)) | ||
| 35 | let icon = $state('🤖') | 41 | let icon = $state('🤖') |
| 36 | let environment = $state<Environment>('local') | 42 | let environment = $state<Environment>('local') |
| 37 | let problem = $state('') | 43 | let problem = $state('') |
| @@ -64,8 +70,9 @@ | |||
| 64 | step = 'questions' | 70 | step = 'questions' |
| 65 | } else if (view.written) { | 71 | } else if (view.written) { |
| 66 | form = null | 72 | form = null |
| 67 | - name = name || view.name | 73 | + // mm's name, the one the user typed in the wizard, made free. |
| 68 | - title = view.title | 74 | + name = name || freeName(view.name, taken) |
| 75 | + title = title || view.title | ||
| 69 | step = 'ready' | 76 | step = 'ready' |
| 70 | } else { | 77 | } else { |
| 71 | form = null | 78 | form = null |
| @@ -92,6 +99,7 @@ | |||
| 92 | try { | 99 | try { |
| 93 | const started = await CreatorService.Start() | 100 | const started = await CreatorService.Start() |
| 94 | agentsFolder = started.agentsFolder | 101 | agentsFolder = started.agentsFolder |
| 102 | + taken = started.taken ?? [] | ||
| 95 | show(started.view) | 103 | show(started.view) |
| 96 | } catch (caught) { | 104 | } catch (caught) { |
| 97 | failure = caught instanceof Error ? caught.message : String(caught) | 105 | failure = caught instanceof Error ? caught.message : String(caught) |
| @@ -128,7 +136,7 @@ | |||
| 128 | } | 136 | } |
| 129 | busy = true | 137 | busy = true |
| 130 | try { | 138 | try { |
| 131 | - const result = await CreatorService.Finish({ name, icon: icon.trim(), environment }) | 139 | + const result = await CreatorService.Finish({ name, title: title.trim(), icon: icon.trim(), environment }) |
| 132 | if (result.problem) problem = result.problem | 140 | if (result.problem) problem = result.problem |
| 133 | else if (result.problems && result.problems.length > 0) refused = result.problems | 141 | else if (result.problems && result.problems.length > 0) refused = result.problems |
| 134 | else { | 142 | else { |
| @@ -142,6 +150,14 @@ | |||
| 142 | } | 150 | } |
| 143 | } | 151 | } |
| 144 | 152 | ||
| 153 | + // The @ name made from the name shown, free, while it was not typed by hand. | ||
| 154 | + function followTitle() { | ||
| 155 | + if (nameEdited) return | ||
| 156 | + const made = nameFromTitle(title) | ||
| 157 | + if (made) name = freeName(made, taken) | ||
| 158 | + problem = '' | ||
| 159 | + } | ||
| 160 | + | ||
| 145 | function close() { | 161 | function close() { |
| 146 | appState.creator = '' | 162 | appState.creator = '' |
| 147 | } | 163 | } |
| @@ -210,12 +226,16 @@ | |||
| 210 | <div class="row"> | 226 | <div class="row"> |
| 211 | <span class="preview"><AgentAvatar icon={icon} title={title || name} name={name} size={34} /></span> | 227 | <span class="preview"><AgentAvatar icon={icon} title={title || name} name={name} size={34} /></span> |
| 212 | <label class="grow"> | 228 | <label class="grow"> |
| 213 | - {t('creator.name')} | 229 | + {t('creator.agentTitle')} |
| 214 | - <input bind:value={name} oninput={() => (problem = '')} aria-invalid={problem !== ''} aria-describedby="creator-name-hint" spellcheck="false" autocapitalize="off" /> | 230 | + <input bind:value={title} oninput={followTitle} /> |
| 215 | </label> | 231 | </label> |
| 216 | </div> | 232 | </div> |
| 217 | - <small id="creator-name-hint" class:problem-text={problem !== ''} role={problem ? 'alert' : undefined}> | 233 | + <label> |
| 218 | - {problem ? t(problemKey(problem)) : t('creator.nameHint', { name, folder: agentFolder(agentsFolder, name) })} | 234 | + {t('creator.name')} |
| 235 | + <input bind:value={name} oninput={() => ((problem = ''), (nameEdited = true))} aria-invalid={problem !== '' || takenNow} aria-describedby="creator-name-hint" spellcheck="false" autocapitalize="off" /> | ||
| 236 | + </label> | ||
| 237 | + <small id="creator-name-hint" class:problem-text={problem !== '' || takenNow} role={problem || takenNow ? 'alert' : undefined}> | ||
| 238 | + {#if problem}{t(problemKey(problem))}{:else if takenNow}{t('creator.problem.taken', { suggestion: freeName(name, taken) })}{:else}{t('creator.nameHint', { name, folder: agentFolder(agentsFolder, name) })}{/if} | ||
| 219 | </small> | 239 | </small> |
| 220 | <div class="group" aria-label={t('creator.icon')}> | 240 | <div class="group" aria-label={t('creator.icon')}> |
| 221 | <span class="label">{t('creator.icon')}</span> | 241 | <span class="label">{t('creator.icon')}</span> |
modified
frontend/src/lib/agent/CreateSbxAgent.svelte +25 -10 | @@ -11,8 +11,9 @@ | ||
| 11 | 11 | import { SbxCreatorService } from '../../../bindings/git.rickub.com/bots-garden/sidekicks/internal/app' |
| 12 | 12 | import type { Kind } from '../../../bindings/git.rickub.com/bots-garden/sidekicks/internal/sbxcreate' |
| 13 | 13 | import { agentAdded, appState } from '../state.svelte' |
| 14 | - import { agentFolder, iconChoices, problemKey, sbxMissing, validSbxName } from '../creator' | |
| 14 | + import { agentFolder, freeName, iconChoices, problemKey, sbxMissing, sbxNameFromTitle, validSbxName } from '../creator' | |
| 15 | 15 | import AgentAvatar from './AgentAvatar.svelte' |
| 16 | + import { logoOf } from '../logos' | |
| 16 | 17 | import ErrorText from '../chat/ErrorText.svelte' |
| 17 | 18 | import Spinner from '../chat/Spinner.svelte' |
| 18 | 19 | |
| @@ -31,6 +32,11 @@ | ||
| 31 | 32 | let title = $state('') |
| 32 | 33 | let icon = $state('') |
| 33 | 34 | let problem = $state('') |
| 35 | + // Issue #99: the @ name follows the name shown until it is typed by hand; | |
| 36 | + // taken is the names already used (agents, folders, sandboxes). | |
| 37 | + let nameEdited = $state(false) | |
| 38 | + let taken = $state<string[]>([]) | |
| 39 | + const takenNow = $derived(name !== '' && taken.includes(name)) | |
| 34 | 40 | let refused = $state<string[]>([]) |
| 35 | 41 | let error = $state('') |
| 36 | 42 | |
| @@ -54,6 +60,7 @@ | ||
| 54 | 60 | const result = await SbxCreatorService.Check(kind.id) |
| 55 | 61 | hasKey = result.hasKey |
| 56 | 62 | agentsFolder = result.agentsFolder |
| 63 | + taken = result.taken ?? [] | |
| 57 | 64 | name = name || result.name |
| 58 | 65 | step = hasKey ? 'details' : 'key' |
| 59 | 66 | } catch (caught) { |
| @@ -101,9 +108,17 @@ | ||
| 101 | 108 | } |
| 102 | 109 | } |
| 103 | 110 | |
| 111 | + // The @ name made from the name shown, free, while it was not typed by hand. | |
| 112 | + function followTitle() { | |
| 113 | + if (nameEdited || !kind) return | |
| 114 | + name = freeName(sbxNameFromTitle(title) || kind.id, taken) | |
| 115 | + problem = '' | |
| 116 | + } | |
| 117 | + | |
| 104 | 118 | function another() { |
| 105 | 119 | kind = null |
| 106 | 120 | name = '' |
| 121 | + nameEdited = false | |
| 107 | 122 | problem = '' |
| 108 | 123 | step = 'kind' |
| 109 | 124 | } |
| @@ -121,7 +136,7 @@ | ||
| 121 | 136 | <div class="kinds" role="group" aria-label={t('sbxCreator.choose')}> |
| 122 | 137 | {#each kinds as choice (choice.id)} |
| 123 | 138 | <button type="button" class="kind" onclick={() => choose(choice)}> |
| 124 | - <span class="icon" aria-hidden="true">{choice.icon}</span> | |
| 139 | + <span class="icon" aria-hidden="true"><AgentAvatar icon={choice.icon} title={choice.title} name={choice.id} size={32} /></span> | |
| 125 | 140 | <span><strong>{choice.title}</strong><br /><small>{t(`sbxCreator.kind.${choice.id}` as MessageKey)}</small></span> |
| 126 | 141 | </button> |
| 127 | 142 | {/each} |
| @@ -140,7 +155,7 @@ | ||
| 140 | 155 | </div> |
| 141 | 156 | {:else if step === 'key' && kind} |
| 142 | 157 | <form class="panel" onsubmit={saveKey}> |
| 143 | - <h2>{kind.icon} {t('sbxCreator.key.title', { title: kind.title })}</h2> | |
| 158 | + <h2><AgentAvatar icon={kind.icon} title={kind.title} name={kind.id} size={20} /> {t('sbxCreator.key.title', { title: kind.title })}</h2> | |
| 144 | 159 | <p>{t('sbxCreator.key.explain', { title: kind.title, service: kind.service })}</p> |
| 145 | 160 | <button type="button" class="link" onclick={() => kind && Browser.OpenURL(kind.keyUrl)}>{t('sbxCreator.key.get')}</button> |
| 146 | 161 | <label> |
| @@ -168,23 +183,23 @@ | ||
| 168 | 183 | <span class="preview"><AgentAvatar {icon} title={title || name} {name} size={34} /></span> |
| 169 | 184 | <label class="grow"> |
| 170 | 185 | {t('sbxCreator.agentTitle')} |
| 171 | - <input bind:value={title} /> | |
| 186 | + <input bind:value={title} oninput={followTitle} /> | |
| 172 | 187 | </label> |
| 173 | 188 | </div> |
| 174 | 189 | <label> |
| 175 | 190 | {t('sbxCreator.name')} |
| 176 | - <input bind:value={name} oninput={() => (problem = '')} aria-invalid={problem !== ''} aria-describedby="sbx-name-hint" spellcheck="false" autocapitalize="off" /> | |
| 191 | + <input bind:value={name} oninput={() => ((problem = ''), (nameEdited = true))} aria-invalid={problem !== '' || takenNow} aria-describedby="sbx-name-hint" spellcheck="false" autocapitalize="off" /> | |
| 177 | 192 | </label> |
| 178 | - <small id="sbx-name-hint" class:problem-text={problem !== ''} role={problem ? 'alert' : undefined}> | |
| 179 | - {problem ? t(problemKey(problem)) : t('sbxCreator.nameHint', { name, folder: agentFolder(agentsFolder, name) })} | |
| 193 | + <small id="sbx-name-hint" class:problem-text={problem !== '' || takenNow} role={problem || takenNow ? 'alert' : undefined}> | |
| 194 | + {#if problem}{t(problemKey(problem))}{:else if takenNow}{t('creator.problem.taken', { suggestion: freeName(name, taken) })}{:else}{t('sbxCreator.nameHint', { name, folder: agentFolder(agentsFolder, name) })}{/if} | |
| 180 | 195 | </small> |
| 181 | 196 | <div class="group" aria-label={t('creator.icon')}> |
| 182 | 197 | <span class="label">{t('creator.icon')}</span> |
| 183 | 198 | <div class="icons"> |
| 184 | 199 | {#each icons as choice (choice)} |
| 185 | - <button type="button" class="icon-choice" class:chosen={icon === choice} onclick={() => (icon = choice)} aria-label={choice} aria-pressed={icon === choice}>{choice}</button> | |
| 200 | + <button type="button" class="icon-choice" class:chosen={icon === choice} onclick={() => (icon = choice)} aria-label={logoOf(choice)?.title ?? choice} aria-pressed={icon === choice}>{#if logoOf(choice)}<AgentAvatar icon={choice} title={kind.title} name={kind.id} size={24} />{:else}{choice}{/if}</button> | |
| 186 | 201 | {/each} |
| 187 | - <input class="custom" bind:value={icon} maxlength="8" aria-label={t('creator.icon')} /> | |
| 202 | + <input class="custom" value={logoOf(icon) ? '' : icon} oninput={(event) => (icon = event.currentTarget.value)} maxlength="8" aria-label={t('creator.icon')} /> | |
| 188 | 203 | </div> |
| 189 | 204 | </div> |
| 190 | 205 | </fieldset> |
| @@ -209,7 +224,7 @@ | ||
| 209 | 224 | <style> |
| 210 | 225 | .creator { max-width: 620px; width: 100%; margin: 0 auto; padding: 24px 24px 32px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; box-sizing: border-box; } |
| 211 | 226 | h1 { font-size: 20px; margin: 0; } |
| 212 | - h2 { font-size: 16px; margin: 0; } | |
| 227 | + h2 { font-size: 16px; margin: 0; display: flex; align-items: center; gap: 6px; } | |
| 213 | 228 | .intro, .status { color: var(--muted); margin: 0; } |
| 214 | 229 | .status { display: flex; align-items: center; gap: 8px; } |
| 215 | 230 | .kinds { display: flex; flex-direction: column; gap: 8px; } |
| @@ -11,8 +11,9 @@ | |||
| 11 | import { SbxCreatorService } from '../../../bindings/git.rickub.com/bots-garden/sidekicks/internal/app' | 11 | import { SbxCreatorService } from '../../../bindings/git.rickub.com/bots-garden/sidekicks/internal/app' |
| 12 | import type { Kind } from '../../../bindings/git.rickub.com/bots-garden/sidekicks/internal/sbxcreate' | 12 | import type { Kind } from '../../../bindings/git.rickub.com/bots-garden/sidekicks/internal/sbxcreate' |
| 13 | import { agentAdded, appState } from '../state.svelte' | 13 | import { agentAdded, appState } from '../state.svelte' |
| 14 | - import { agentFolder, iconChoices, problemKey, sbxMissing, validSbxName } from '../creator' | 14 | + import { agentFolder, freeName, iconChoices, problemKey, sbxMissing, sbxNameFromTitle, validSbxName } from '../creator' |
| 15 | import AgentAvatar from './AgentAvatar.svelte' | 15 | import AgentAvatar from './AgentAvatar.svelte' |
| 16 | + import { logoOf } from '../logos' | ||
| 16 | import ErrorText from '../chat/ErrorText.svelte' | 17 | import ErrorText from '../chat/ErrorText.svelte' |
| 17 | import Spinner from '../chat/Spinner.svelte' | 18 | import Spinner from '../chat/Spinner.svelte' |
| 18 | 19 | ||
| @@ -31,6 +32,11 @@ | |||
| 31 | let title = $state('') | 32 | let title = $state('') |
| 32 | let icon = $state('') | 33 | let icon = $state('') |
| 33 | let problem = $state('') | 34 | let problem = $state('') |
| 35 | + // Issue #99: the @ name follows the name shown until it is typed by hand; | ||
| 36 | + // taken is the names already used (agents, folders, sandboxes). | ||
| 37 | + let nameEdited = $state(false) | ||
| 38 | + let taken = $state<string[]>([]) | ||
| 39 | + const takenNow = $derived(name !== '' && taken.includes(name)) | ||
| 34 | let refused = $state<string[]>([]) | 40 | let refused = $state<string[]>([]) |
| 35 | let error = $state('') | 41 | let error = $state('') |
| 36 | 42 | ||
| @@ -54,6 +60,7 @@ | |||
| 54 | const result = await SbxCreatorService.Check(kind.id) | 60 | const result = await SbxCreatorService.Check(kind.id) |
| 55 | hasKey = result.hasKey | 61 | hasKey = result.hasKey |
| 56 | agentsFolder = result.agentsFolder | 62 | agentsFolder = result.agentsFolder |
| 63 | + taken = result.taken ?? [] | ||
| 57 | name = name || result.name | 64 | name = name || result.name |
| 58 | step = hasKey ? 'details' : 'key' | 65 | step = hasKey ? 'details' : 'key' |
| 59 | } catch (caught) { | 66 | } catch (caught) { |
| @@ -101,9 +108,17 @@ | |||
| 101 | } | 108 | } |
| 102 | } | 109 | } |
| 103 | 110 | ||
| 111 | + // The @ name made from the name shown, free, while it was not typed by hand. | ||
| 112 | + function followTitle() { | ||
| 113 | + if (nameEdited || !kind) return | ||
| 114 | + name = freeName(sbxNameFromTitle(title) || kind.id, taken) | ||
| 115 | + problem = '' | ||
| 116 | + } | ||
| 117 | + | ||
| 104 | function another() { | 118 | function another() { |
| 105 | kind = null | 119 | kind = null |
| 106 | name = '' | 120 | name = '' |
| 121 | + nameEdited = false | ||
| 107 | problem = '' | 122 | problem = '' |
| 108 | step = 'kind' | 123 | step = 'kind' |
| 109 | } | 124 | } |
| @@ -121,7 +136,7 @@ | |||
| 121 | <div class="kinds" role="group" aria-label={t('sbxCreator.choose')}> | 136 | <div class="kinds" role="group" aria-label={t('sbxCreator.choose')}> |
| 122 | {#each kinds as choice (choice.id)} | 137 | {#each kinds as choice (choice.id)} |
| 123 | <button type="button" class="kind" onclick={() => choose(choice)}> | 138 | <button type="button" class="kind" onclick={() => choose(choice)}> |
| 124 | - <span class="icon" aria-hidden="true">{choice.icon}</span> | 139 | + <span class="icon" aria-hidden="true"><AgentAvatar icon={choice.icon} title={choice.title} name={choice.id} size={32} /></span> |
| 125 | <span><strong>{choice.title}</strong><br /><small>{t(`sbxCreator.kind.${choice.id}` as MessageKey)}</small></span> | 140 | <span><strong>{choice.title}</strong><br /><small>{t(`sbxCreator.kind.${choice.id}` as MessageKey)}</small></span> |
| 126 | </button> | 141 | </button> |
| 127 | {/each} | 142 | {/each} |
| @@ -140,7 +155,7 @@ | |||
| 140 | </div> | 155 | </div> |
| 141 | {:else if step === 'key' && kind} | 156 | {:else if step === 'key' && kind} |
| 142 | <form class="panel" onsubmit={saveKey}> | 157 | <form class="panel" onsubmit={saveKey}> |
| 143 | - <h2>{kind.icon} {t('sbxCreator.key.title', { title: kind.title })}</h2> | 158 | + <h2><AgentAvatar icon={kind.icon} title={kind.title} name={kind.id} size={20} /> {t('sbxCreator.key.title', { title: kind.title })}</h2> |
| 144 | <p>{t('sbxCreator.key.explain', { title: kind.title, service: kind.service })}</p> | 159 | <p>{t('sbxCreator.key.explain', { title: kind.title, service: kind.service })}</p> |
| 145 | <button type="button" class="link" onclick={() => kind && Browser.OpenURL(kind.keyUrl)}>{t('sbxCreator.key.get')}</button> | 160 | <button type="button" class="link" onclick={() => kind && Browser.OpenURL(kind.keyUrl)}>{t('sbxCreator.key.get')}</button> |
| 146 | <label> | 161 | <label> |
| @@ -168,23 +183,23 @@ | |||
| 168 | <span class="preview"><AgentAvatar {icon} title={title || name} {name} size={34} /></span> | 183 | <span class="preview"><AgentAvatar {icon} title={title || name} {name} size={34} /></span> |
| 169 | <label class="grow"> | 184 | <label class="grow"> |
| 170 | {t('sbxCreator.agentTitle')} | 185 | {t('sbxCreator.agentTitle')} |
| 171 | - <input bind:value={title} /> | 186 | + <input bind:value={title} oninput={followTitle} /> |
| 172 | </label> | 187 | </label> |
| 173 | </div> | 188 | </div> |
| 174 | <label> | 189 | <label> |
| 175 | {t('sbxCreator.name')} | 190 | {t('sbxCreator.name')} |
| 176 | - <input bind:value={name} oninput={() => (problem = '')} aria-invalid={problem !== ''} aria-describedby="sbx-name-hint" spellcheck="false" autocapitalize="off" /> | 191 | + <input bind:value={name} oninput={() => ((problem = ''), (nameEdited = true))} aria-invalid={problem !== '' || takenNow} aria-describedby="sbx-name-hint" spellcheck="false" autocapitalize="off" /> |
| 177 | </label> | 192 | </label> |
| 178 | - <small id="sbx-name-hint" class:problem-text={problem !== ''} role={problem ? 'alert' : undefined}> | 193 | + <small id="sbx-name-hint" class:problem-text={problem !== '' || takenNow} role={problem || takenNow ? 'alert' : undefined}> |
| 179 | - {problem ? t(problemKey(problem)) : t('sbxCreator.nameHint', { name, folder: agentFolder(agentsFolder, name) })} | 194 | + {#if problem}{t(problemKey(problem))}{:else if takenNow}{t('creator.problem.taken', { suggestion: freeName(name, taken) })}{:else}{t('sbxCreator.nameHint', { name, folder: agentFolder(agentsFolder, name) })}{/if} |
| 180 | </small> | 195 | </small> |
| 181 | <div class="group" aria-label={t('creator.icon')}> | 196 | <div class="group" aria-label={t('creator.icon')}> |
| 182 | <span class="label">{t('creator.icon')}</span> | 197 | <span class="label">{t('creator.icon')}</span> |
| 183 | <div class="icons"> | 198 | <div class="icons"> |
| 184 | {#each icons as choice (choice)} | 199 | {#each icons as choice (choice)} |
| 185 | - <button type="button" class="icon-choice" class:chosen={icon === choice} onclick={() => (icon = choice)} aria-label={choice} aria-pressed={icon === choice}>{choice}</button> | 200 | + <button type="button" class="icon-choice" class:chosen={icon === choice} onclick={() => (icon = choice)} aria-label={logoOf(choice)?.title ?? choice} aria-pressed={icon === choice}>{#if logoOf(choice)}<AgentAvatar icon={choice} title={kind.title} name={kind.id} size={24} />{:else}{choice}{/if}</button> |
| 186 | {/each} | 201 | {/each} |
| 187 | - <input class="custom" bind:value={icon} maxlength="8" aria-label={t('creator.icon')} /> | 202 | + <input class="custom" value={logoOf(icon) ? '' : icon} oninput={(event) => (icon = event.currentTarget.value)} maxlength="8" aria-label={t('creator.icon')} /> |
| 188 | </div> | 203 | </div> |
| 189 | </div> | 204 | </div> |
| 190 | </fieldset> | 205 | </fieldset> |
| @@ -209,7 +224,7 @@ | |||
| 209 | <style> | 224 | <style> |
| 210 | .creator { max-width: 620px; width: 100%; margin: 0 auto; padding: 24px 24px 32px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; box-sizing: border-box; } | 225 | .creator { max-width: 620px; width: 100%; margin: 0 auto; padding: 24px 24px 32px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; box-sizing: border-box; } |
| 211 | h1 { font-size: 20px; margin: 0; } | 226 | h1 { font-size: 20px; margin: 0; } |
| 212 | - h2 { font-size: 16px; margin: 0; } | 227 | + h2 { font-size: 16px; margin: 0; display: flex; align-items: center; gap: 6px; } |
| 213 | .intro, .status { color: var(--muted); margin: 0; } | 228 | .intro, .status { color: var(--muted); margin: 0; } |
| 214 | .status { display: flex; align-items: center; gap: 8px; } | 229 | .status { display: flex; align-items: center; gap: 8px; } |
| 215 | .kinds { display: flex; flex-direction: column; gap: 8px; } | 230 | .kinds { display: flex; flex-direction: column; gap: 8px; } |
modified
frontend/src/lib/avatar.test.ts +14 -0 | @@ -3,6 +3,20 @@ | ||
| 3 | 3 | import { describe, expect, it } from 'vitest' |
| 4 | 4 | import { avatarColors, avatarOf, isEmoji, textIcon } from './avatar' |
| 5 | 5 | import { contrastRatio } from './contrast' |
| 6 | +import { logoOf, logos } from './logos' | |
| 7 | + | |
| 8 | +describe('logos (issue #100)', () => { | |
| 9 | + it('draws a logo Sidekicks ships', () => { | |
| 10 | + const avatar = avatarOf('logo:claude', 'Claude', 'claude') | |
| 11 | + expect('logo' in avatar && avatar.logo.title).toBe('Claude') | |
| 12 | + expect(logoOf(' logo:mistral ')?.title).toBe('Mistral AI') | |
| 13 | + expect(Object.keys(logos).sort()).toEqual(['claude', 'gemini', 'mistral', 'openai']) | |
| 14 | + }) | |
| 15 | + it('shows a letter for an unknown logo, and no text icon', () => { | |
| 16 | + expect(avatarOf('logo:nope', 'Codex', 'codex')).toMatchObject({ letter: 'C' }) | |
| 17 | + expect(textIcon('logo:claude')).toBe('') | |
| 18 | + }) | |
| 19 | +}) | |
| 6 | 20 | |
| 7 | 21 | describe('avatarOf', () => { |
| 8 | 22 | it('keeps an emoji', () => { |
| @@ -3,6 +3,20 @@ | |||
| 3 | import { describe, expect, it } from 'vitest' | 3 | import { describe, expect, it } from 'vitest' |
| 4 | import { avatarColors, avatarOf, isEmoji, textIcon } from './avatar' | 4 | import { avatarColors, avatarOf, isEmoji, textIcon } from './avatar' |
| 5 | import { contrastRatio } from './contrast' | 5 | import { contrastRatio } from './contrast' |
| 6 | +import { logoOf, logos } from './logos' | ||
| 7 | + | ||
| 8 | +describe('logos (issue #100)', () => { | ||
| 9 | + it('draws a logo Sidekicks ships', () => { | ||
| 10 | + const avatar = avatarOf('logo:claude', 'Claude', 'claude') | ||
| 11 | + expect('logo' in avatar && avatar.logo.title).toBe('Claude') | ||
| 12 | + expect(logoOf(' logo:mistral ')?.title).toBe('Mistral AI') | ||
| 13 | + expect(Object.keys(logos).sort()).toEqual(['claude', 'gemini', 'mistral', 'openai']) | ||
| 14 | + }) | ||
| 15 | + it('shows a letter for an unknown logo, and no text icon', () => { | ||
| 16 | + expect(avatarOf('logo:nope', 'Codex', 'codex')).toMatchObject({ letter: 'C' }) | ||
| 17 | + expect(textIcon('logo:claude')).toBe('') | ||
| 18 | + }) | ||
| 19 | +}) | ||
| 6 | 20 | ||
| 7 | describe('avatarOf', () => { | 21 | describe('avatarOf', () => { |
| 8 | it('keeps an emoji', () => { | 22 | it('keeps an emoji', () => { |
modified
frontend/src/lib/avatar.ts +11 -3 | @@ -1,12 +1,15 @@ | ||
| 1 | 1 | // Copyright (c) 2026 Philippe Charrière — Sidekicks Source-Available License 1.0, see LICENSE |
| 2 | 2 | |
| 3 | -// An agent's avatar: its emoji, or a letter in a coloured circle when its | |
| 4 | -// icon is not an emoji (a letter typed by the user, or nothing). | |
| 3 | +// An agent's avatar: the logo of its brand (icon "logo:<name>", issue #100), | |
| 4 | +// its emoji, or a letter in a coloured circle when its icon is neither (a | |
| 5 | +// letter typed by the user, an unknown logo, or nothing). | |
| 6 | + | |
| 7 | +import { logoOf, type Logo } from './logos' | |
| 5 | 8 | |
| 6 | 9 | /** Colours of the letter avatars, white text on each passes WCAG AA (4.5:1). */ |
| 7 | 10 | export const avatarColors = ['#3667d0', '#c9354f', '#317b3f', '#8a4fb5', '#b2541a', '#1b7a8c', '#a3367e', '#5b6577'] as const |
| 8 | 11 | |
| 9 | -export type Avatar = { emoji: string } | { letter: string; color: string } | |
| 12 | +export type Avatar = { logo: Logo } | { emoji: string } | { letter: string; color: string } | |
| 10 | 13 | |
| 11 | 14 | const emojiPattern = /\p{Extended_Pictographic}|\p{Regional_Indicator}/u |
| 12 | 15 | |
| @@ -37,9 +40,13 @@ function colorOf(name: string): string { | ||
| 37 | 40 | * avatarOf('🐮', 'Garfield', 'garfield') // { emoji: '🐮' } |
| 38 | 41 | * avatarOf('', 'Hélène', 'helene') // { letter: 'H', color: '#…' } |
| 39 | 42 | * avatarOf('m', 'Milo', 'milo') // { letter: 'M', color: '#…' } |
| 43 | + * avatarOf('logo:claude', 'Claude', 'claude') // { logo: { title: 'Claude', … } } | |
| 40 | 44 | */ |
| 41 | 45 | export function avatarOf(icon: string | undefined, title: string, name: string): Avatar { |
| 42 | 46 | const trimmed = (icon ?? '').trim() |
| 47 | + const logo = logoOf(trimmed) | |
| 48 | + if (logo) return { logo } | |
| 49 | + if (trimmed.startsWith('logo:')) return { letter: initial(title) || initial(name) || '?', color: colorOf(name) } | |
| 43 | 50 | if (isEmoji(trimmed)) return { emoji: trimmed } |
| 44 | 51 | return { letter: initial(trimmed) || initial(title) || initial(name) || '?', color: colorOf(name) } |
| 45 | 52 | } |
| @@ -51,6 +58,7 @@ export function avatarOf(icon: string | undefined, title: string, name: string): | ||
| 51 | 58 | * @example |
| 52 | 59 | * textIcon('🐮') // '🐮 ' |
| 53 | 60 | * textIcon('M') // '' |
| 61 | + * textIcon('logo:claude') // '' (a logo is no text) | |
| 54 | 62 | */ |
| 55 | 63 | export function textIcon(icon: string | undefined): string { |
| 56 | 64 | const trimmed = (icon ?? '').trim() |
| @@ -1,12 +1,15 @@ | |||
| 1 | // Copyright (c) 2026 Philippe Charrière — Sidekicks Source-Available License 1.0, see LICENSE | 1 | // Copyright (c) 2026 Philippe Charrière — Sidekicks Source-Available License 1.0, see LICENSE |
| 2 | 2 | ||
| 3 | -// An agent's avatar: its emoji, or a letter in a coloured circle when its | 3 | +// An agent's avatar: the logo of its brand (icon "logo:<name>", issue #100), |
| 4 | -// icon is not an emoji (a letter typed by the user, or nothing). | 4 | +// its emoji, or a letter in a coloured circle when its icon is neither (a |
| 5 | +// letter typed by the user, an unknown logo, or nothing). | ||
| 6 | + | ||
| 7 | +import { logoOf, type Logo } from './logos' | ||
| 5 | 8 | ||
| 6 | /** Colours of the letter avatars, white text on each passes WCAG AA (4.5:1). */ | 9 | /** Colours of the letter avatars, white text on each passes WCAG AA (4.5:1). */ |
| 7 | export const avatarColors = ['#3667d0', '#c9354f', '#317b3f', '#8a4fb5', '#b2541a', '#1b7a8c', '#a3367e', '#5b6577'] as const | 10 | export const avatarColors = ['#3667d0', '#c9354f', '#317b3f', '#8a4fb5', '#b2541a', '#1b7a8c', '#a3367e', '#5b6577'] as const |
| 8 | 11 | ||
| 9 | -export type Avatar = { emoji: string } | { letter: string; color: string } | 12 | +export type Avatar = { logo: Logo } | { emoji: string } | { letter: string; color: string } |
| 10 | 13 | ||
| 11 | const emojiPattern = /\p{Extended_Pictographic}|\p{Regional_Indicator}/u | 14 | const emojiPattern = /\p{Extended_Pictographic}|\p{Regional_Indicator}/u |
| 12 | 15 | ||
| @@ -37,9 +40,13 @@ function colorOf(name: string): string { | |||
| 37 | * avatarOf('🐮', 'Garfield', 'garfield') // { emoji: '🐮' } | 40 | * avatarOf('🐮', 'Garfield', 'garfield') // { emoji: '🐮' } |
| 38 | * avatarOf('', 'Hélène', 'helene') // { letter: 'H', color: '#…' } | 41 | * avatarOf('', 'Hélène', 'helene') // { letter: 'H', color: '#…' } |
| 39 | * avatarOf('m', 'Milo', 'milo') // { letter: 'M', color: '#…' } | 42 | * avatarOf('m', 'Milo', 'milo') // { letter: 'M', color: '#…' } |
| 43 | + * avatarOf('logo:claude', 'Claude', 'claude') // { logo: { title: 'Claude', … } } | ||
| 40 | */ | 44 | */ |
| 41 | export function avatarOf(icon: string | undefined, title: string, name: string): Avatar { | 45 | export function avatarOf(icon: string | undefined, title: string, name: string): Avatar { |
| 42 | const trimmed = (icon ?? '').trim() | 46 | const trimmed = (icon ?? '').trim() |
| 47 | + const logo = logoOf(trimmed) | ||
| 48 | + if (logo) return { logo } | ||
| 49 | + if (trimmed.startsWith('logo:')) return { letter: initial(title) || initial(name) || '?', color: colorOf(name) } | ||
| 43 | if (isEmoji(trimmed)) return { emoji: trimmed } | 50 | if (isEmoji(trimmed)) return { emoji: trimmed } |
| 44 | return { letter: initial(trimmed) || initial(title) || initial(name) || '?', color: colorOf(name) } | 51 | return { letter: initial(trimmed) || initial(title) || initial(name) || '?', color: colorOf(name) } |
| 45 | } | 52 | } |
| @@ -51,6 +58,7 @@ export function avatarOf(icon: string | undefined, title: string, name: string): | |||
| 51 | * @example | 58 | * @example |
| 52 | * textIcon('🐮') // '🐮 ' | 59 | * textIcon('🐮') // '🐮 ' |
| 53 | * textIcon('M') // '' | 60 | * textIcon('M') // '' |
| 61 | + * textIcon('logo:claude') // '' (a logo is no text) | ||
| 54 | */ | 62 | */ |
| 55 | export function textIcon(icon: string | undefined): string { | 63 | export function textIcon(icon: string | undefined): string { |
| 56 | const trimmed = (icon ?? '').trim() | 64 | const trimmed = (icon ?? '').trim() |
added
frontend/src/lib/chat/StartProgress.svelte +49 -0 | new file mode 100644 | ||
| @@ -0,0 +1,49 @@ | ||
| 1 | +<!-- Copyright (c) 2026 Philippe Charrière — Sidekicks Source-Available License 1.0, see LICENSE --> | |
| 2 | +<script lang="ts"> | |
| 3 | + // The start of an agent, shown while the user waits (issue #98): the step | |
| 4 | + // in plain words, the time elapsed, the last line its sandbox or container | |
| 5 | + // printed (with a bar when the line tells a percentage), and the log. | |
| 6 | + // Creating a sandbox the first time pulls kits and images: minutes. | |
| 7 | + import { onDestroy } from 'svelte' | |
| 8 | + import { t, type MessageKey } from '../i18n/index.svelte' | |
| 9 | + import { agentTitle, appState, showLog } from '../state.svelte' | |
| 10 | + import { elapsed, percentOf } from '../progress' | |
| 11 | + import Spinner from './Spinner.svelte' | |
| 12 | + | |
| 13 | + let { agent }: { agent: string } = $props() | |
| 14 | + | |
| 15 | + const progress = $derived(appState.progress[agent]) | |
| 16 | + let now = $state(Date.now()) | |
| 17 | + const timer = setInterval(() => (now = Date.now()), 1000) | |
| 18 | + onDestroy(() => clearInterval(timer)) | |
| 19 | + | |
| 20 | + const time = $derived(progress ? elapsed(progress.since, now) : { minutes: 0, seconds: 0 }) | |
| 21 | + const percent = $derived(progress?.line ? percentOf(progress.line) : null) | |
| 22 | + // The reassuring sentence once the wait is long enough to worry. | |
| 23 | + const long = $derived(progress?.step === 'preparing' || time.minutes > 0 || time.seconds >= 15) | |
| 24 | +</script> | |
| 25 | + | |
| 26 | +{#if progress} | |
| 27 | + <section class="start" aria-live="polite" aria-label={t('progress.label', { agent: agentTitle(agent) })}> | |
| 28 | + <p class="step"><Spinner /> <strong>{t(`progress.step.${progress.step}` as MessageKey, { agent: agentTitle(agent) })}</strong> | |
| 29 | + <span class="time">{time.minutes > 0 ? t('progress.minutes', { minutes: String(time.minutes), seconds: String(time.seconds) }) : t('progress.seconds', { seconds: String(time.seconds) })}</span> | |
| 30 | + </p> | |
| 31 | + {#if long}<p class="hint">{t('progress.firstTime')}</p>{/if} | |
| 32 | + {#if percent !== null} | |
| 33 | + <div class="bar" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow={percent}><span style:width="{percent}%"></span></div> | |
| 34 | + {/if} | |
| 35 | + {#if progress.line}<code class="line" title={progress.line}>{progress.line}</code>{/if} | |
| 36 | + <button type="button" class="link" onclick={() => showLog(agent)}>{t('progress.log')}</button> | |
| 37 | + </section> | |
| 38 | +{/if} | |
| 39 | + | |
| 40 | +<style> | |
| 41 | + .start { margin: 4px 0; padding: 10px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--panel); display: flex; flex-direction: column; gap: 6px; } | |
| 42 | + .step { margin: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } | |
| 43 | + .time { color: var(--muted); font-size: 12px; margin-left: auto; font-variant-numeric: tabular-nums; } | |
| 44 | + .hint { margin: 0; color: var(--muted); font-size: 12px; } | |
| 45 | + .bar { height: 6px; border-radius: 3px; background: var(--border); overflow: hidden; } | |
| 46 | + .bar span { display: block; height: 100%; background: var(--accent); transition: width 0.3s; } | |
| 47 | + .line { display: block; font-family: var(--mono); font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } | |
| 48 | + .link { align-self: flex-start; border: none; background: none; padding: 0; color: var(--accent); text-decoration: underline; cursor: pointer; font-size: 12px; } | |
| 49 | +</style> | |
| new file mode 100644 | |||
| @@ -0,0 +1,49 @@ | |||
| 1 | +<!-- Copyright (c) 2026 Philippe Charrière — Sidekicks Source-Available License 1.0, see LICENSE --> | ||
| 2 | +<script lang="ts"> | ||
| 3 | + // The start of an agent, shown while the user waits (issue #98): the step | ||
| 4 | + // in plain words, the time elapsed, the last line its sandbox or container | ||
| 5 | + // printed (with a bar when the line tells a percentage), and the log. | ||
| 6 | + // Creating a sandbox the first time pulls kits and images: minutes. | ||
| 7 | + import { onDestroy } from 'svelte' | ||
| 8 | + import { t, type MessageKey } from '../i18n/index.svelte' | ||
| 9 | + import { agentTitle, appState, showLog } from '../state.svelte' | ||
| 10 | + import { elapsed, percentOf } from '../progress' | ||
| 11 | + import Spinner from './Spinner.svelte' | ||
| 12 | + | ||
| 13 | + let { agent }: { agent: string } = $props() | ||
| 14 | + | ||
| 15 | + const progress = $derived(appState.progress[agent]) | ||
| 16 | + let now = $state(Date.now()) | ||
| 17 | + const timer = setInterval(() => (now = Date.now()), 1000) | ||
| 18 | + onDestroy(() => clearInterval(timer)) | ||
| 19 | + | ||
| 20 | + const time = $derived(progress ? elapsed(progress.since, now) : { minutes: 0, seconds: 0 }) | ||
| 21 | + const percent = $derived(progress?.line ? percentOf(progress.line) : null) | ||
| 22 | + // The reassuring sentence once the wait is long enough to worry. | ||
| 23 | + const long = $derived(progress?.step === 'preparing' || time.minutes > 0 || time.seconds >= 15) | ||
| 24 | +</script> | ||
| 25 | + | ||
| 26 | +{#if progress} | ||
| 27 | + <section class="start" aria-live="polite" aria-label={t('progress.label', { agent: agentTitle(agent) })}> | ||
| 28 | + <p class="step"><Spinner /> <strong>{t(`progress.step.${progress.step}` as MessageKey, { agent: agentTitle(agent) })}</strong> | ||
| 29 | + <span class="time">{time.minutes > 0 ? t('progress.minutes', { minutes: String(time.minutes), seconds: String(time.seconds) }) : t('progress.seconds', { seconds: String(time.seconds) })}</span> | ||
| 30 | + </p> | ||
| 31 | + {#if long}<p class="hint">{t('progress.firstTime')}</p>{/if} | ||
| 32 | + {#if percent !== null} | ||
| 33 | + <div class="bar" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow={percent}><span style:width="{percent}%"></span></div> | ||
| 34 | + {/if} | ||
| 35 | + {#if progress.line}<code class="line" title={progress.line}>{progress.line}</code>{/if} | ||
| 36 | + <button type="button" class="link" onclick={() => showLog(agent)}>{t('progress.log')}</button> | ||
| 37 | + </section> | ||
| 38 | +{/if} | ||
| 39 | + | ||
| 40 | +<style> | ||
| 41 | + .start { margin: 4px 0; padding: 10px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--panel); display: flex; flex-direction: column; gap: 6px; } | ||
| 42 | + .step { margin: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } | ||
| 43 | + .time { color: var(--muted); font-size: 12px; margin-left: auto; font-variant-numeric: tabular-nums; } | ||
| 44 | + .hint { margin: 0; color: var(--muted); font-size: 12px; } | ||
| 45 | + .bar { height: 6px; border-radius: 3px; background: var(--border); overflow: hidden; } | ||
| 46 | + .bar span { display: block; height: 100%; background: var(--accent); transition: width 0.3s; } | ||
| 47 | + .line { display: block; font-family: var(--mono); font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } | ||
| 48 | + .link { align-self: flex-start; border: none; background: none; padding: 0; color: var(--accent); text-decoration: underline; cursor: pointer; font-size: 12px; } | ||
| 49 | +</style> | ||
modified
frontend/src/lib/creator.test.ts +16 -1 | @@ -1,7 +1,7 @@ | ||
| 1 | 1 | // Copyright (c) 2026 Philippe Charrière — Sidekicks Source-Available License 1.0, see LICENSE |
| 2 | 2 | |
| 3 | 3 | import { describe, expect, it } from 'vitest' |
| 4 | -import { agentFolder, contentOf, sbxMissing, validSbxName, initialValues, missingFields, noModelServer, problemKey, splitMessages, startProblem, validName, type Field, type Form } from './creator' | |
| 4 | +import { agentFolder, contentOf, freeName, sbxMissing, sbxNameFromTitle, validSbxName, initialValues, missingFields, noModelServer, problemKey, splitMessages, startProblem, validName, type Field, type Form } from './creator' | |
| 5 | 5 | |
| 6 | 6 | function field(name: string, type: string, extra: Partial<Field> = {}): Field { |
| 7 | 7 | return { name, title: name, description: '', type, options: null, default: null, required: true, ...extra } |
| @@ -83,6 +83,21 @@ describe('names and folders', () => { | ||
| 83 | 83 | }) |
| 84 | 84 | }) |
| 85 | 85 | |
| 86 | +describe('the @ name from the name shown (issue #99)', () => { | |
| 87 | + it('makes a sandbox name: no underscore', () => { | |
| 88 | + expect(sbxNameFromTitle('Marcel (assistant)')).toBe('marcel-assistant') | |
| 89 | + expect(sbxNameFromTitle('my_agent')).toBe('my-agent') | |
| 90 | + expect(sbxNameFromTitle('Élodie')).toBe('elodie') | |
| 91 | + expect(sbxNameFromTitle('42')).toBe('') | |
| 92 | + }) | |
| 93 | + it('suggests the first free variant, within 32 characters', () => { | |
| 94 | + expect(freeName('claude', [])).toBe('claude') | |
| 95 | + expect(freeName('claude', ['claude', 'claude-2'])).toBe('claude-3') | |
| 96 | + expect(freeName('a'.repeat(32), ['a'.repeat(32)])).toBe('a'.repeat(30) + '-2') | |
| 97 | + expect(freeName('', ['x'])).toBe('') | |
| 98 | + }) | |
| 99 | +}) | |
| 100 | + | |
| 86 | 101 | describe('the sbx assistant (issue #96)', () => { |
| 87 | 102 | it('accepts sandbox names: no underscore', () => { |
| 88 | 103 | expect(validSbxName('claude-2')).toBe(true) |
| @@ -1,7 +1,7 @@ | |||
| 1 | // Copyright (c) 2026 Philippe Charrière — Sidekicks Source-Available License 1.0, see LICENSE | 1 | // Copyright (c) 2026 Philippe Charrière — Sidekicks Source-Available License 1.0, see LICENSE |
| 2 | 2 | ||
| 3 | import { describe, expect, it } from 'vitest' | 3 | import { describe, expect, it } from 'vitest' |
| 4 | -import { agentFolder, contentOf, sbxMissing, validSbxName, initialValues, missingFields, noModelServer, problemKey, splitMessages, startProblem, validName, type Field, type Form } from './creator' | 4 | +import { agentFolder, contentOf, freeName, sbxMissing, sbxNameFromTitle, validSbxName, initialValues, missingFields, noModelServer, problemKey, splitMessages, startProblem, validName, type Field, type Form } from './creator' |
| 5 | 5 | ||
| 6 | function field(name: string, type: string, extra: Partial<Field> = {}): Field { | 6 | function field(name: string, type: string, extra: Partial<Field> = {}): Field { |
| 7 | return { name, title: name, description: '', type, options: null, default: null, required: true, ...extra } | 7 | return { name, title: name, description: '', type, options: null, default: null, required: true, ...extra } |
| @@ -83,6 +83,21 @@ describe('names and folders', () => { | |||
| 83 | }) | 83 | }) |
| 84 | }) | 84 | }) |
| 85 | 85 | ||
| 86 | +describe('the @ name from the name shown (issue #99)', () => { | ||
| 87 | + it('makes a sandbox name: no underscore', () => { | ||
| 88 | + expect(sbxNameFromTitle('Marcel (assistant)')).toBe('marcel-assistant') | ||
| 89 | + expect(sbxNameFromTitle('my_agent')).toBe('my-agent') | ||
| 90 | + expect(sbxNameFromTitle('Élodie')).toBe('elodie') | ||
| 91 | + expect(sbxNameFromTitle('42')).toBe('') | ||
| 92 | + }) | ||
| 93 | + it('suggests the first free variant, within 32 characters', () => { | ||
| 94 | + expect(freeName('claude', [])).toBe('claude') | ||
| 95 | + expect(freeName('claude', ['claude', 'claude-2'])).toBe('claude-3') | ||
| 96 | + expect(freeName('a'.repeat(32), ['a'.repeat(32)])).toBe('a'.repeat(30) + '-2') | ||
| 97 | + expect(freeName('', ['x'])).toBe('') | ||
| 98 | + }) | ||
| 99 | +}) | ||
| 100 | + | ||
| 86 | describe('the sbx assistant (issue #96)', () => { | 101 | describe('the sbx assistant (issue #96)', () => { |
| 87 | it('accepts sandbox names: no underscore', () => { | 102 | it('accepts sandbox names: no underscore', () => { |
| 88 | expect(validSbxName('claude-2')).toBe(true) | 103 | expect(validSbxName('claude-2')).toBe(true) |
modified
frontend/src/lib/creator.ts +33 -0 | @@ -6,6 +6,7 @@ | ||
| 6 | 6 | // answer mm expects. No Svelte here, so that vitest can test it. |
| 7 | 7 | |
| 8 | 8 | import type { MessageKey } from './i18n/index.svelte' |
| 9 | +import { nameFromTitle } from './agentform' | |
| 9 | 10 | |
| 10 | 11 | /** A question of a form, as acp.FormField gives it. */ |
| 11 | 12 | export interface Field { |
| @@ -119,6 +120,38 @@ export function validSbxName(name: string): boolean { | ||
| 119 | 120 | return /^[a-z][a-z0-9-]{0,31}$/.test(name) |
| 120 | 121 | } |
| 121 | 122 | |
| 123 | +/** | |
| 124 | + * The @ name made from the name shown (issue #99), for an agent in a | |
| 125 | + * sandbox: as the "add an agent" assistant makes it, without "_", which sbx | |
| 126 | + * refuses in a sandbox's name. | |
| 127 | + * | |
| 128 | + * @example | |
| 129 | + * sbxNameFromTitle('Marcel (assistant)') // 'marcel-assistant' | |
| 130 | + * sbxNameFromTitle('my_agent') // 'my-agent' | |
| 131 | + */ | |
| 132 | +export function sbxNameFromTitle(title: string): string { | |
| 133 | + return nameFromTitle(title).replace(/_/g, '-').replace(/-{2,}/g, '-').replace(/-+$/, '') | |
| 134 | +} | |
| 135 | + | |
| 136 | +/** | |
| 137 | + * The first of name, name-2, name-3… that is not taken; the suffix still | |
| 138 | + * fits the 32 characters of a name. '' stays ''. | |
| 139 | + * | |
| 140 | + * @example | |
| 141 | + * freeName('claude', ['claude', 'claude-2']) // 'claude-3' | |
| 142 | + */ | |
| 143 | +export function freeName(name: string, taken: string[] | null | undefined): string { | |
| 144 | + if (!name) return '' | |
| 145 | + const used = new Set(taken ?? []) | |
| 146 | + if (!used.has(name)) return name | |
| 147 | + for (let index = 2; index < 1000; index++) { | |
| 148 | + const suffix = `-${index}` | |
| 149 | + const candidate = name.slice(0, 32 - suffix.length).replace(/-+$/, '') + suffix | |
| 150 | + if (!used.has(candidate)) return candidate | |
| 151 | + } | |
| 152 | + return name | |
| 153 | +} | |
| 154 | + | |
| 122 | 155 | /** An agent name Sidekicks accepts, which is also its folder's name. */ |
| 123 | 156 | export function validName(name: string): boolean { |
| 124 | 157 | return /^[a-z][a-z0-9_-]{0,31}$/.test(name) |
| @@ -6,6 +6,7 @@ | |||
| 6 | // answer mm expects. No Svelte here, so that vitest can test it. | 6 | // answer mm expects. No Svelte here, so that vitest can test it. |
| 7 | 7 | ||
| 8 | import type { MessageKey } from './i18n/index.svelte' | 8 | import type { MessageKey } from './i18n/index.svelte' |
| 9 | +import { nameFromTitle } from './agentform' | ||
| 9 | 10 | ||
| 10 | /** A question of a form, as acp.FormField gives it. */ | 11 | /** A question of a form, as acp.FormField gives it. */ |
| 11 | export interface Field { | 12 | export interface Field { |
| @@ -119,6 +120,38 @@ export function validSbxName(name: string): boolean { | |||
| 119 | return /^[a-z][a-z0-9-]{0,31}$/.test(name) | 120 | return /^[a-z][a-z0-9-]{0,31}$/.test(name) |
| 120 | } | 121 | } |
| 121 | 122 | ||
| 123 | +/** | ||
| 124 | + * The @ name made from the name shown (issue #99), for an agent in a | ||
| 125 | + * sandbox: as the "add an agent" assistant makes it, without "_", which sbx | ||
| 126 | + * refuses in a sandbox's name. | ||
| 127 | + * | ||
| 128 | + * @example | ||
| 129 | + * sbxNameFromTitle('Marcel (assistant)') // 'marcel-assistant' | ||
| 130 | + * sbxNameFromTitle('my_agent') // 'my-agent' | ||
| 131 | + */ | ||
| 132 | +export function sbxNameFromTitle(title: string): string { | ||
| 133 | + return nameFromTitle(title).replace(/_/g, '-').replace(/-{2,}/g, '-').replace(/-+$/, '') | ||
| 134 | +} | ||
| 135 | + | ||
| 136 | +/** | ||
| 137 | + * The first of name, name-2, name-3… that is not taken; the suffix still | ||
| 138 | + * fits the 32 characters of a name. '' stays ''. | ||
| 139 | + * | ||
| 140 | + * @example | ||
| 141 | + * freeName('claude', ['claude', 'claude-2']) // 'claude-3' | ||
| 142 | + */ | ||
| 143 | +export function freeName(name: string, taken: string[] | null | undefined): string { | ||
| 144 | + if (!name) return '' | ||
| 145 | + const used = new Set(taken ?? []) | ||
| 146 | + if (!used.has(name)) return name | ||
| 147 | + for (let index = 2; index < 1000; index++) { | ||
| 148 | + const suffix = `-${index}` | ||
| 149 | + const candidate = name.slice(0, 32 - suffix.length).replace(/-+$/, '') + suffix | ||
| 150 | + if (!used.has(candidate)) return candidate | ||
| 151 | + } | ||
| 152 | + return name | ||
| 153 | +} | ||
| 154 | + | ||
| 122 | /** An agent name Sidekicks accepts, which is also its folder's name. */ | 155 | /** An agent name Sidekicks accepts, which is also its folder's name. */ |
| 123 | export function validName(name: string): boolean { | 156 | export function validName(name: string): boolean { |
| 124 | return /^[a-z][a-z0-9_-]{0,31}$/.test(name) | 157 | return /^[a-z][a-z0-9_-]{0,31}$/.test(name) |
modified
frontend/src/lib/i18n/messages.ts +26 -0 | @@ -112,6 +112,17 @@ export const en = { | ||
| 112 | 112 | 'message.thinking': 'thinking…', |
| 113 | 113 | 'message.usingTool': 'using a tool…', |
| 114 | 114 | 'message.preparing': '{agent} is getting ready…', |
| 115 | + 'progress.label': 'Start of {agent}', | |
| 116 | + 'progress.step.checking': 'Getting {agent} ready…', | |
| 117 | + 'progress.step.preparing': 'Creating the sandbox of {agent}: downloading and installing…', | |
| 118 | + 'progress.step.connecting': 'Starting {agent}…', | |
| 119 | + 'progress.short.checking': 'getting ready…', | |
| 120 | + 'progress.short.preparing': 'creating its sandbox…', | |
| 121 | + 'progress.short.connecting': 'starting…', | |
| 122 | + 'progress.seconds': '{seconds} s', | |
| 123 | + 'progress.minutes': '{minutes} min {seconds} s', | |
| 124 | + 'progress.firstTime': 'The first time, this can take several minutes: everything the agent needs is downloaded. The next times, it starts right away.', | |
| 125 | + 'progress.log': 'See the log', | |
| 115 | 126 | 'message.thought': 'Reasoning', |
| 116 | 127 | 'message.stop.cancelled': 'Answer stopped.', |
| 117 | 128 | 'message.stop.max_tokens': 'Answer cut: the agent reached its length limit.', |
| @@ -338,6 +349,8 @@ export const en = { | ||
| 338 | 349 | 'welcome.createSbxFirst': '✨ Create a Claude, Gemini, Codex or Vibe agent', |
| 339 | 350 | 'action.createSbxAgent': 'Create an agent in a sandbox (Claude, Gemini, Codex, Vibe)', |
| 340 | 351 | 'creator.problem.sandboxExists': 'A sandbox with this name already exists: choose another name.', |
| 352 | + 'creator.problem.taken': 'This name is already used (by an agent, a folder or a sandbox): try {suggestion}.', | |
| 353 | + 'creator.agentTitle': 'Name shown', | |
| 341 | 354 | 'sbxCreator.title': 'Create an agent in a sandbox', |
| 342 | 355 | 'sbxCreator.intro': 'Choose the agent: it runs in a Docker Sandbox, isolated from your computer. Sidekicks prepares everything.', |
| 343 | 356 | 'sbxCreator.choose': 'Which agent?', |
| @@ -593,6 +606,17 @@ export const fr: Record<MessageKey, string> = { | ||
| 593 | 606 | 'message.thinking': 'réfléchit…', |
| 594 | 607 | 'message.usingTool': 'utilise un outil…', |
| 595 | 608 | 'message.preparing': '{agent} se prépare…', |
| 609 | + 'progress.label': 'Démarrage de {agent}', | |
| 610 | + 'progress.step.checking': 'Préparation de {agent}…', | |
| 611 | + 'progress.step.preparing': 'Création de la sandbox de {agent} : téléchargement et installation…', | |
| 612 | + 'progress.step.connecting': 'Démarrage de {agent}…', | |
| 613 | + 'progress.short.checking': 'se prépare…', | |
| 614 | + 'progress.short.preparing': 'crée sa sandbox…', | |
| 615 | + 'progress.short.connecting': 'démarre…', | |
| 616 | + 'progress.seconds': '{seconds} s', | |
| 617 | + 'progress.minutes': '{minutes} min {seconds} s', | |
| 618 | + 'progress.firstTime': "La première fois, cela peut prendre plusieurs minutes : tout ce dont l'agent a besoin est téléchargé. Les fois suivantes, il démarre tout de suite.", | |
| 619 | + 'progress.log': 'Voir le journal', | |
| 596 | 620 | 'message.thought': 'Réflexion', |
| 597 | 621 | 'message.stop.cancelled': 'Réponse arrêtée.', |
| 598 | 622 | 'message.stop.max_tokens': "Réponse coupée : l'agent a atteint sa limite de longueur.", |
| @@ -814,6 +838,8 @@ export const fr: Record<MessageKey, string> = { | ||
| 814 | 838 | 'welcome.createSbxFirst': '✨ Créer un agent Claude, Gemini, Codex ou Vibe', |
| 815 | 839 | 'action.createSbxAgent': 'Créer un agent dans une sandbox (Claude, Gemini, Codex, Vibe)', |
| 816 | 840 | 'creator.problem.sandboxExists': 'Une sandbox porte déjà ce nom : choisissez un autre nom.', |
| 841 | + 'creator.problem.taken': 'Ce nom est déjà utilisé (par un agent, un dossier ou une sandbox) : essayez {suggestion}.', | |
| 842 | + 'creator.agentTitle': 'Nom affiché', | |
| 817 | 843 | 'sbxCreator.title': 'Créer un agent dans une sandbox', |
| 818 | 844 | 'sbxCreator.intro': "Choisissez l'agent : il tourne dans une Docker Sandbox, isolé de votre ordinateur. Sidekicks prépare tout.", |
| 819 | 845 | 'sbxCreator.choose': 'Quel agent ?', |
| @@ -112,6 +112,17 @@ export const en = { | |||
| 112 | 'message.thinking': 'thinking…', | 112 | 'message.thinking': 'thinking…', |
| 113 | 'message.usingTool': 'using a tool…', | 113 | 'message.usingTool': 'using a tool…', |
| 114 | 'message.preparing': '{agent} is getting ready…', | 114 | 'message.preparing': '{agent} is getting ready…', |
| 115 | + 'progress.label': 'Start of {agent}', | ||
| 116 | + 'progress.step.checking': 'Getting {agent} ready…', | ||
| 117 | + 'progress.step.preparing': 'Creating the sandbox of {agent}: downloading and installing…', | ||
| 118 | + 'progress.step.connecting': 'Starting {agent}…', | ||
| 119 | + 'progress.short.checking': 'getting ready…', | ||
| 120 | + 'progress.short.preparing': 'creating its sandbox…', | ||
| 121 | + 'progress.short.connecting': 'starting…', | ||
| 122 | + 'progress.seconds': '{seconds} s', | ||
| 123 | + 'progress.minutes': '{minutes} min {seconds} s', | ||
| 124 | + 'progress.firstTime': 'The first time, this can take several minutes: everything the agent needs is downloaded. The next times, it starts right away.', | ||
| 125 | + 'progress.log': 'See the log', | ||
| 115 | 'message.thought': 'Reasoning', | 126 | 'message.thought': 'Reasoning', |
| 116 | 'message.stop.cancelled': 'Answer stopped.', | 127 | 'message.stop.cancelled': 'Answer stopped.', |
| 117 | 'message.stop.max_tokens': 'Answer cut: the agent reached its length limit.', | 128 | 'message.stop.max_tokens': 'Answer cut: the agent reached its length limit.', |
| @@ -338,6 +349,8 @@ export const en = { | |||
| 338 | 'welcome.createSbxFirst': '✨ Create a Claude, Gemini, Codex or Vibe agent', | 349 | 'welcome.createSbxFirst': '✨ Create a Claude, Gemini, Codex or Vibe agent', |
| 339 | 'action.createSbxAgent': 'Create an agent in a sandbox (Claude, Gemini, Codex, Vibe)', | 350 | 'action.createSbxAgent': 'Create an agent in a sandbox (Claude, Gemini, Codex, Vibe)', |
| 340 | 'creator.problem.sandboxExists': 'A sandbox with this name already exists: choose another name.', | 351 | 'creator.problem.sandboxExists': 'A sandbox with this name already exists: choose another name.', |
| 352 | + 'creator.problem.taken': 'This name is already used (by an agent, a folder or a sandbox): try {suggestion}.', | ||
| 353 | + 'creator.agentTitle': 'Name shown', | ||
| 341 | 'sbxCreator.title': 'Create an agent in a sandbox', | 354 | 'sbxCreator.title': 'Create an agent in a sandbox', |
| 342 | 'sbxCreator.intro': 'Choose the agent: it runs in a Docker Sandbox, isolated from your computer. Sidekicks prepares everything.', | 355 | 'sbxCreator.intro': 'Choose the agent: it runs in a Docker Sandbox, isolated from your computer. Sidekicks prepares everything.', |
| 343 | 'sbxCreator.choose': 'Which agent?', | 356 | 'sbxCreator.choose': 'Which agent?', |
| @@ -593,6 +606,17 @@ export const fr: Record<MessageKey, string> = { | |||
| 593 | 'message.thinking': 'réfléchit…', | 606 | 'message.thinking': 'réfléchit…', |
| 594 | 'message.usingTool': 'utilise un outil…', | 607 | 'message.usingTool': 'utilise un outil…', |
| 595 | 'message.preparing': '{agent} se prépare…', | 608 | 'message.preparing': '{agent} se prépare…', |
| 609 | + 'progress.label': 'Démarrage de {agent}', | ||
| 610 | + 'progress.step.checking': 'Préparation de {agent}…', | ||
| 611 | + 'progress.step.preparing': 'Création de la sandbox de {agent} : téléchargement et installation…', | ||
| 612 | + 'progress.step.connecting': 'Démarrage de {agent}…', | ||
| 613 | + 'progress.short.checking': 'se prépare…', | ||
| 614 | + 'progress.short.preparing': 'crée sa sandbox…', | ||
| 615 | + 'progress.short.connecting': 'démarre…', | ||
| 616 | + 'progress.seconds': '{seconds} s', | ||
| 617 | + 'progress.minutes': '{minutes} min {seconds} s', | ||
| 618 | + 'progress.firstTime': "La première fois, cela peut prendre plusieurs minutes : tout ce dont l'agent a besoin est téléchargé. Les fois suivantes, il démarre tout de suite.", | ||
| 619 | + 'progress.log': 'Voir le journal', | ||
| 596 | 'message.thought': 'Réflexion', | 620 | 'message.thought': 'Réflexion', |
| 597 | 'message.stop.cancelled': 'Réponse arrêtée.', | 621 | 'message.stop.cancelled': 'Réponse arrêtée.', |
| 598 | 'message.stop.max_tokens': "Réponse coupée : l'agent a atteint sa limite de longueur.", | 622 | 'message.stop.max_tokens': "Réponse coupée : l'agent a atteint sa limite de longueur.", |
| @@ -814,6 +838,8 @@ export const fr: Record<MessageKey, string> = { | |||
| 814 | 'welcome.createSbxFirst': '✨ Créer un agent Claude, Gemini, Codex ou Vibe', | 838 | 'welcome.createSbxFirst': '✨ Créer un agent Claude, Gemini, Codex ou Vibe', |
| 815 | 'action.createSbxAgent': 'Créer un agent dans une sandbox (Claude, Gemini, Codex, Vibe)', | 839 | 'action.createSbxAgent': 'Créer un agent dans une sandbox (Claude, Gemini, Codex, Vibe)', |
| 816 | 'creator.problem.sandboxExists': 'Une sandbox porte déjà ce nom : choisissez un autre nom.', | 840 | 'creator.problem.sandboxExists': 'Une sandbox porte déjà ce nom : choisissez un autre nom.', |
| 841 | + 'creator.problem.taken': 'Ce nom est déjà utilisé (par un agent, un dossier ou une sandbox) : essayez {suggestion}.', | ||
| 842 | + 'creator.agentTitle': 'Nom affiché', | ||
| 817 | 'sbxCreator.title': 'Créer un agent dans une sandbox', | 843 | 'sbxCreator.title': 'Créer un agent dans une sandbox', |
| 818 | 'sbxCreator.intro': "Choisissez l'agent : il tourne dans une Docker Sandbox, isolé de votre ordinateur. Sidekicks prépare tout.", | 844 | 'sbxCreator.intro': "Choisissez l'agent : il tourne dans une Docker Sandbox, isolé de votre ordinateur. Sidekicks prépare tout.", |
| 819 | 'sbxCreator.choose': 'Quel agent ?', | 845 | 'sbxCreator.choose': 'Quel agent ?', |
modified
frontend/src/lib/layout/Shell.svelte +5 -0 | @@ -69,6 +69,11 @@ | ||
| 69 | 69 | } |
| 70 | 70 | } |
| 71 | 71 | |
| 72 | + // showLog (issue #98) asks for the Log panel. | |
| 73 | + $effect(() => { | |
| 74 | + if (appState.logRequest > 0 && collapsed.bottom) toggle('bottom') | |
| 75 | + }) | |
| 76 | + | |
| 72 | 77 | function toggle(dock: 'left' | 'right' | 'bottom') { |
| 73 | 78 | const pane = { left, right, bottom }[dock] |
| 74 | 79 | if (!pane) return |
| @@ -69,6 +69,11 @@ | |||
| 69 | } | 69 | } |
| 70 | } | 70 | } |
| 71 | 71 | ||
| 72 | + // showLog (issue #98) asks for the Log panel. | ||
| 73 | + $effect(() => { | ||
| 74 | + if (appState.logRequest > 0 && collapsed.bottom) toggle('bottom') | ||
| 75 | + }) | ||
| 76 | + | ||
| 72 | function toggle(dock: 'left' | 'right' | 'bottom') { | 77 | function toggle(dock: 'left' | 'right' | 'bottom') { |
| 73 | const pane = { left, right, bottom }[dock] | 78 | const pane = { left, right, bottom }[dock] |
| 74 | if (!pane) return | 79 | if (!pane) return |
added
frontend/src/lib/logos.ts +68 -0 | new file mode 100644 | ||
| @@ -0,0 +1,68 @@ | ||
| 1 | +// Copyright (c) 2026 Philippe Charrière — Sidekicks Source-Available License 1.0, see LICENSE | |
| 2 | + | |
| 3 | +// The logos Sidekicks ships for agents (issue #100): an agent whose icon is | |
| 4 | +// "logo:<name>" shows the logo of its brand instead of an emoji or a letter. | |
| 5 | +// The names are those of LogoNames in internal/config/config.go (a Go test | |
| 6 | +// checks both lists). | |
| 7 | +// | |
| 8 | +// Source: Simple Icons 16.37.0 (OpenAI: 13.21.0) (https://simpleicons.org, npm simple-icons), | |
| 9 | +// released under CC0-1.0, each traced from the brand's own site (below). | |
| 10 | +// CC0 covers the drawings, not the trademarks: Claude (Anthropic), Gemini | |
| 11 | +// (Google) and Mistral AI are trademarks of their owners, shown here only | |
| 12 | +// to name their products, unchanged, without any endorsement implied. | |
| 13 | +// OpenAI (for Codex) was removed from Simple Icons after 13.21.0: its | |
| 14 | +// drawing comes from that version, in black as on openai.com/brand, whose | |
| 15 | +// guidelines ask that it be used unchanged; the owner chose to ship it. | |
| 16 | + | |
| 17 | +export interface Logo { | |
| 18 | + title: string | |
| 19 | + /** The brand colour, drawn on a light disc so that it reads in both themes. */ | |
| 20 | + color: string | |
| 21 | + /** One SVG path, in a 24×24 view box. */ | |
| 22 | + path: string | |
| 23 | + /** Where the drawing comes from. */ | |
| 24 | + source: string | |
| 25 | +} | |
| 26 | + | |
| 27 | +export const logos: Record<string, Logo> = { | |
| 28 | + claude: { | |
| 29 | + title: 'Claude', | |
| 30 | + color: '#D97757', | |
| 31 | + source: 'https://claude.ai (Simple Icons, CC0-1.0)', | |
| 32 | + path: 'm4.7144 15.9555 4.7174-2.6471.079-.2307-.079-.1275h-.2307l-.7893-.0486-2.6956-.0729-2.3375-.0971-2.2646-.1214-.5707-.1215-.5343-.7042.0546-.3522.4797-.3218.686.0608 1.5179.1032 2.2767.1578 1.6514.0972 2.4468.255h.3886l.0546-.1579-.1336-.0971-.1032-.0972L6.973 9.8356l-2.55-1.6879-1.3356-.9714-.7225-.4918-.3643-.4614-.1578-1.0078.6557-.7225.8803.0607.2246.0607.8925.686 1.9064 1.4754 2.4893 1.8336.3643.3035.1457-.1032.0182-.0728-.164-.2733-1.3539-2.4467-1.445-2.4893-.6435-1.032-.17-.6194c-.0607-.255-.1032-.4674-.1032-.7285L6.287.1335 6.6997 0l.9957.1336.419.3642.6192 1.4147 1.0018 2.2282 1.5543 3.0296.4553.8985.2429.8318.091.255h.1579v-.1457l.1275-1.706.2368-2.0947.2307-2.6957.0789-.7589.3764-.9107.7468-.4918.5828.2793.4797.686-.0668.4433-.2853 1.8517-.5586 2.9021-.3643 1.9429h.2125l.2429-.2429.9835-1.3053 1.6514-2.0643.7286-.8196.85-.9046.5464-.4311h1.0321l.759 1.1293-.34 1.1657-1.0625 1.3478-.8804 1.1414-1.2628 1.7-.7893 1.36.0729.1093.1882-.0183 2.8535-.607 1.5421-.2794 1.8396-.3157.8318.3886.091.3946-.3278.8075-1.967.4857-2.3072.4614-3.4364.8136-.0425.0304.0486.0607 1.5482.1457.6618.0364h1.621l3.0175.2247.7892.522.4736.6376-.079.4857-1.2142.6193-1.6393-.3886-3.825-.9107-1.3113-.3279h-.1822v.1093l1.0929 1.0686 2.0035 1.8092 2.5075 2.3314.1275.5768-.3218.4554-.34-.0486-2.2039-1.6575-.85-.7468-1.9246-1.621h-.1275v.17l.4432.6496 2.3436 3.5214.1214 1.0807-.17.3521-.6071.2125-.6679-.1214-1.3721-1.9246L14.38 17.959l-1.1414-1.9428-.1397.079-.674 7.2552-.3156.3703-.7286.2793-.6071-.4614-.3218-.7468.3218-1.4753.3886-1.9246.3157-1.53.2853-1.9004.17-.6314-.0121-.0425-.1397.0182-1.4328 1.9672-2.1796 2.9446-1.7243 1.8456-.4128.164-.7164-.3704.0667-.6618.4008-.5889 2.386-3.0357 1.4389-1.882.929-1.0868-.0062-.1579h-.0546l-6.3385 4.1164-1.1293.1457-.4857-.4554.0608-.7467.2307-.2429 1.9064-1.3114Z', | |
| 33 | + }, | |
| 34 | + gemini: { | |
| 35 | + title: 'Google Gemini', | |
| 36 | + color: '#8E75B2', | |
| 37 | + source: 'https://gemini.google.com (Simple Icons, CC0-1.0)', | |
| 38 | + path: 'M11.04 19.32Q12 21.51 12 24q0-2.49.93-4.68.96-2.19 2.58-3.81t3.81-2.55Q21.51 12 24 12q-2.49 0-4.68-.93a12.3 12.3 0 0 1-3.81-2.58 12.3 12.3 0 0 1-2.58-3.81Q12 2.49 12 0q0 2.49-.96 4.68-.93 2.19-2.55 3.81a12.3 12.3 0 0 1-3.81 2.58Q2.49 12 0 12q2.49 0 4.68.96 2.19.93 3.81 2.55t2.55 3.81', | |
| 39 | + }, | |
| 40 | + openai: { | |
| 41 | + title: 'OpenAI', | |
| 42 | + color: '#000000', | |
| 43 | + source: 'https://openai.com/brand (Simple Icons 13.21.0, CC0-1.0)', | |
| 44 | + path: 'M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364 15.1192 7.2a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.407-.667zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z', | |
| 45 | + }, | |
| 46 | + mistral: { | |
| 47 | + title: 'Mistral AI', | |
| 48 | + color: '#FA520F', | |
| 49 | + source: 'https://chat.mistral.ai (Simple Icons, CC0-1.0)', | |
| 50 | + path: 'M17.143 3.429v3.428h-3.429v3.429h-3.428V6.857H6.857V3.43H3.43v13.714H0v3.428h10.286v-3.428H6.857v-3.429h3.429v3.429h3.429v-3.429h3.428v3.429h-3.428v3.428H24v-3.428h-3.43V3.429z', | |
| 51 | + }, | |
| 52 | +} | |
| 53 | + | |
| 54 | +/** The prefix of an icon that is a logo. */ | |
| 55 | +export const logoPrefix = 'logo:' | |
| 56 | + | |
| 57 | +/** | |
| 58 | + * The logo an icon names, or null (not a logo, or one Sidekicks does not ship). | |
| 59 | + * | |
| 60 | + * @example | |
| 61 | + * logoOf('logo:claude') // { title: 'Claude', … } | |
| 62 | + * logoOf('🤖') // null | |
| 63 | + */ | |
| 64 | +export function logoOf(icon: string | undefined): Logo | null { | |
| 65 | + const trimmed = (icon ?? '').trim() | |
| 66 | + if (!trimmed.startsWith(logoPrefix)) return null | |
| 67 | + return logos[trimmed.slice(logoPrefix.length)] ?? null | |
| 68 | +} | |
| new file mode 100644 | |||
| @@ -0,0 +1,68 @@ | |||
| 1 | +// Copyright (c) 2026 Philippe Charrière — Sidekicks Source-Available License 1.0, see LICENSE | ||
| 2 | + | ||
| 3 | +// The logos Sidekicks ships for agents (issue #100): an agent whose icon is | ||
| 4 | +// "logo:<name>" shows the logo of its brand instead of an emoji or a letter. | ||
| 5 | +// The names are those of LogoNames in internal/config/config.go (a Go test | ||
| 6 | +// checks both lists). | ||
| 7 | +// | ||
| 8 | +// Source: Simple Icons 16.37.0 (OpenAI: 13.21.0) (https://simpleicons.org, npm simple-icons), | ||
| 9 | +// released under CC0-1.0, each traced from the brand's own site (below). | ||
| 10 | +// CC0 covers the drawings, not the trademarks: Claude (Anthropic), Gemini | ||
| 11 | +// (Google) and Mistral AI are trademarks of their owners, shown here only | ||
| 12 | +// to name their products, unchanged, without any endorsement implied. | ||
| 13 | +// OpenAI (for Codex) was removed from Simple Icons after 13.21.0: its | ||
| 14 | +// drawing comes from that version, in black as on openai.com/brand, whose | ||
| 15 | +// guidelines ask that it be used unchanged; the owner chose to ship it. | ||
| 16 | + | ||
| 17 | +export interface Logo { | ||
| 18 | + title: string | ||
| 19 | + /** The brand colour, drawn on a light disc so that it reads in both themes. */ | ||
| 20 | + color: string | ||
| 21 | + /** One SVG path, in a 24×24 view box. */ | ||
| 22 | + path: string | ||
| 23 | + /** Where the drawing comes from. */ | ||
| 24 | + source: string | ||
| 25 | +} | ||
| 26 | + | ||
| 27 | +export const logos: Record<string, Logo> = { | ||
| 28 | + claude: { | ||
| 29 | + title: 'Claude', | ||
| 30 | + color: '#D97757', | ||
| 31 | + source: 'https://claude.ai (Simple Icons, CC0-1.0)', | ||
| 32 | + path: 'm4.7144 15.9555 4.7174-2.6471.079-.2307-.079-.1275h-.2307l-.7893-.0486-2.6956-.0729-2.3375-.0971-2.2646-.1214-.5707-.1215-.5343-.7042.0546-.3522.4797-.3218.686.0608 1.5179.1032 2.2767.1578 1.6514.0972 2.4468.255h.3886l.0546-.1579-.1336-.0971-.1032-.0972L6.973 9.8356l-2.55-1.6879-1.3356-.9714-.7225-.4918-.3643-.4614-.1578-1.0078.6557-.7225.8803.0607.2246.0607.8925.686 1.9064 1.4754 2.4893 1.8336.3643.3035.1457-.1032.0182-.0728-.164-.2733-1.3539-2.4467-1.445-2.4893-.6435-1.032-.17-.6194c-.0607-.255-.1032-.4674-.1032-.7285L6.287.1335 6.6997 0l.9957.1336.419.3642.6192 1.4147 1.0018 2.2282 1.5543 3.0296.4553.8985.2429.8318.091.255h.1579v-.1457l.1275-1.706.2368-2.0947.2307-2.6957.0789-.7589.3764-.9107.7468-.4918.5828.2793.4797.686-.0668.4433-.2853 1.8517-.5586 2.9021-.3643 1.9429h.2125l.2429-.2429.9835-1.3053 1.6514-2.0643.7286-.8196.85-.9046.5464-.4311h1.0321l.759 1.1293-.34 1.1657-1.0625 1.3478-.8804 1.1414-1.2628 1.7-.7893 1.36.0729.1093.1882-.0183 2.8535-.607 1.5421-.2794 1.8396-.3157.8318.3886.091.3946-.3278.8075-1.967.4857-2.3072.4614-3.4364.8136-.0425.0304.0486.0607 1.5482.1457.6618.0364h1.621l3.0175.2247.7892.522.4736.6376-.079.4857-1.2142.6193-1.6393-.3886-3.825-.9107-1.3113-.3279h-.1822v.1093l1.0929 1.0686 2.0035 1.8092 2.5075 2.3314.1275.5768-.3218.4554-.34-.0486-2.2039-1.6575-.85-.7468-1.9246-1.621h-.1275v.17l.4432.6496 2.3436 3.5214.1214 1.0807-.17.3521-.6071.2125-.6679-.1214-1.3721-1.9246L14.38 17.959l-1.1414-1.9428-.1397.079-.674 7.2552-.3156.3703-.7286.2793-.6071-.4614-.3218-.7468.3218-1.4753.3886-1.9246.3157-1.53.2853-1.9004.17-.6314-.0121-.0425-.1397.0182-1.4328 1.9672-2.1796 2.9446-1.7243 1.8456-.4128.164-.7164-.3704.0667-.6618.4008-.5889 2.386-3.0357 1.4389-1.882.929-1.0868-.0062-.1579h-.0546l-6.3385 4.1164-1.1293.1457-.4857-.4554.0608-.7467.2307-.2429 1.9064-1.3114Z', | ||
| 33 | + }, | ||
| 34 | + gemini: { | ||
| 35 | + title: 'Google Gemini', | ||
| 36 | + color: '#8E75B2', | ||
| 37 | + source: 'https://gemini.google.com (Simple Icons, CC0-1.0)', | ||
| 38 | + path: 'M11.04 19.32Q12 21.51 12 24q0-2.49.93-4.68.96-2.19 2.58-3.81t3.81-2.55Q21.51 12 24 12q-2.49 0-4.68-.93a12.3 12.3 0 0 1-3.81-2.58 12.3 12.3 0 0 1-2.58-3.81Q12 2.49 12 0q0 2.49-.96 4.68-.93 2.19-2.55 3.81a12.3 12.3 0 0 1-3.81 2.58Q2.49 12 0 12q2.49 0 4.68.96 2.19.93 3.81 2.55t2.55 3.81', | ||
| 39 | + }, | ||
| 40 | + openai: { | ||
| 41 | + title: 'OpenAI', | ||
| 42 | + color: '#000000', | ||
| 43 | + source: 'https://openai.com/brand (Simple Icons 13.21.0, CC0-1.0)', | ||
| 44 | + path: 'M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364 15.1192 7.2a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.407-.667zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z', | ||
| 45 | + }, | ||
| 46 | + mistral: { | ||
| 47 | + title: 'Mistral AI', | ||
| 48 | + color: '#FA520F', | ||
| 49 | + source: 'https://chat.mistral.ai (Simple Icons, CC0-1.0)', | ||
| 50 | + path: 'M17.143 3.429v3.428h-3.429v3.429h-3.428V6.857H6.857V3.43H3.43v13.714H0v3.428h10.286v-3.428H6.857v-3.429h3.429v3.429h3.429v-3.429h3.428v3.429h-3.428v3.428H24v-3.428h-3.43V3.429z', | ||
| 51 | + }, | ||
| 52 | +} | ||
| 53 | + | ||
| 54 | +/** The prefix of an icon that is a logo. */ | ||
| 55 | +export const logoPrefix = 'logo:' | ||
| 56 | + | ||
| 57 | +/** | ||
| 58 | + * The logo an icon names, or null (not a logo, or one Sidekicks does not ship). | ||
| 59 | + * | ||
| 60 | + * @example | ||
| 61 | + * logoOf('logo:claude') // { title: 'Claude', … } | ||
| 62 | + * logoOf('🤖') // null | ||
| 63 | + */ | ||
| 64 | +export function logoOf(icon: string | undefined): Logo | null { | ||
| 65 | + const trimmed = (icon ?? '').trim() | ||
| 66 | + if (!trimmed.startsWith(logoPrefix)) return null | ||
| 67 | + return logos[trimmed.slice(logoPrefix.length)] ?? null | ||
| 68 | +} | ||
modified
frontend/src/lib/panels/AgentsPanel.svelte +1 -1 | @@ -40,7 +40,7 @@ | ||
| 40 | 40 | {#if runningTerminals(agent.name)} |
| 41 | 41 | <span class="terminals" title={t('terminal.running', { count: runningTerminals(agent.name) })} aria-label={t('terminal.running', { count: runningTerminals(agent.name) })}>⌨ {runningTerminals(agent.name)}</span> |
| 42 | 42 | {/if} |
| 43 | - <span class="state">{hasMessage(`agent.state.${agent.state}`) ? t(`agent.state.${agent.state}` as MessageKey) : agent.state}{agent.outdated ? t('agent.outdated') : ''}</span> | |
| 43 | + <span class="state">{#if agent.state === 'starting' && appState.progress[agent.name]}{t(`progress.short.${appState.progress[agent.name].step}` as MessageKey)}{:else}{hasMessage(`agent.state.${agent.state}`) ? t(`agent.state.${agent.state}` as MessageKey) : agent.state}{/if}{agent.outdated ? t('agent.outdated') : ''}</span> | |
| 44 | 44 | <span class="actions"> |
| 45 | 45 | <button onclick={() => openWorkspace(agent.name)} aria-label={t('workspace.open', { agent: agent.title })} title={t('workspace.open', { agent: agent.title })}>📂</button> |
| 46 | 46 | {#if agent.state === 'stopped' || agent.state === 'error'} |
| @@ -40,7 +40,7 @@ | |||
| 40 | {#if runningTerminals(agent.name)} | 40 | {#if runningTerminals(agent.name)} |
| 41 | <span class="terminals" title={t('terminal.running', { count: runningTerminals(agent.name) })} aria-label={t('terminal.running', { count: runningTerminals(agent.name) })}>⌨ {runningTerminals(agent.name)}</span> | 41 | <span class="terminals" title={t('terminal.running', { count: runningTerminals(agent.name) })} aria-label={t('terminal.running', { count: runningTerminals(agent.name) })}>⌨ {runningTerminals(agent.name)}</span> |
| 42 | {/if} | 42 | {/if} |
| 43 | - <span class="state">{hasMessage(`agent.state.${agent.state}`) ? t(`agent.state.${agent.state}` as MessageKey) : agent.state}{agent.outdated ? t('agent.outdated') : ''}</span> | 43 | + <span class="state">{#if agent.state === 'starting' && appState.progress[agent.name]}{t(`progress.short.${appState.progress[agent.name].step}` as MessageKey)}{:else}{hasMessage(`agent.state.${agent.state}`) ? t(`agent.state.${agent.state}` as MessageKey) : agent.state}{/if}{agent.outdated ? t('agent.outdated') : ''}</span> |
| 44 | <span class="actions"> | 44 | <span class="actions"> |
| 45 | <button onclick={() => openWorkspace(agent.name)} aria-label={t('workspace.open', { agent: agent.title })} title={t('workspace.open', { agent: agent.title })}>📂</button> | 45 | <button onclick={() => openWorkspace(agent.name)} aria-label={t('workspace.open', { agent: agent.title })} title={t('workspace.open', { agent: agent.title })}>📂</button> |
| 46 | {#if agent.state === 'stopped' || agent.state === 'error'} | 46 | {#if agent.state === 'stopped' || agent.state === 'error'} |
modified
frontend/src/lib/panels/ConversationPanel.svelte +8 -1 | @@ -6,6 +6,7 @@ | ||
| 6 | 6 | import MessageView from '../chat/MessageView.svelte' |
| 7 | 7 | import PermissionCard from '../chat/PermissionCard.svelte' |
| 8 | 8 | import FormCard from '../chat/FormCard.svelte' |
| 9 | + import StartProgress from '../chat/StartProgress.svelte' | |
| 9 | 10 | import Spinner from '../chat/Spinner.svelte' |
| 10 | 11 | import AgentView from '../agent/AgentView.svelte' |
| 11 | 12 | import LinkedFilePanel from '../agent/LinkedFilePanel.svelte' |
| @@ -165,7 +166,10 @@ | ||
| 165 | 166 | // Between the user's message and the first words of the answer: the agents |
| 166 | 167 | // start, load their model, or wait for their turn elsewhere (several of |
| 167 | 168 | // them with /parallel). |
| 168 | - const gettingReady = $derived(conversation?.busy ? notStreaming(conversation.messages ?? [], answerers).map(agentTitle).join(', ') : '') | |
| 169 | + // The agents not answering yet: a starting one shows its progress (issue #98). | |
| 170 | + const readying = $derived(conversation?.busy ? notStreaming(conversation.messages ?? [], answerers) : []) | |
| 171 | + const starting = $derived(readying.filter((name) => appState.progress[name])) | |
| 172 | + const gettingReady = $derived(readying.filter((name) => !appState.progress[name]).map(agentTitle).join(', ')) | |
| 169 | 173 | |
| 170 | 174 | // Smart scrolling: follow new content only when the reader is at the bottom. |
| 171 | 175 | let list: HTMLElement | undefined = $state() |
| @@ -289,6 +293,9 @@ | ||
| 289 | 293 | {#each conversation.messages ?? [] as message (message.id)} |
| 290 | 294 | <MessageView {message} /> |
| 291 | 295 | {/each} |
| 296 | + {#each starting as name (name)} | |
| 297 | + <StartProgress agent={name} /> | |
| 298 | + {/each} | |
| 292 | 299 | {#if gettingReady} |
| 293 | 300 | <p class="pending"><Spinner /> {t('message.preparing', { agent: gettingReady })}</p> |
| 294 | 301 | {/if} |
| @@ -6,6 +6,7 @@ | |||
| 6 | import MessageView from '../chat/MessageView.svelte' | 6 | import MessageView from '../chat/MessageView.svelte' |
| 7 | import PermissionCard from '../chat/PermissionCard.svelte' | 7 | import PermissionCard from '../chat/PermissionCard.svelte' |
| 8 | import FormCard from '../chat/FormCard.svelte' | 8 | import FormCard from '../chat/FormCard.svelte' |
| 9 | + import StartProgress from '../chat/StartProgress.svelte' | ||
| 9 | import Spinner from '../chat/Spinner.svelte' | 10 | import Spinner from '../chat/Spinner.svelte' |
| 10 | import AgentView from '../agent/AgentView.svelte' | 11 | import AgentView from '../agent/AgentView.svelte' |
| 11 | import LinkedFilePanel from '../agent/LinkedFilePanel.svelte' | 12 | import LinkedFilePanel from '../agent/LinkedFilePanel.svelte' |
| @@ -165,7 +166,10 @@ | |||
| 165 | // Between the user's message and the first words of the answer: the agents | 166 | // Between the user's message and the first words of the answer: the agents |
| 166 | // start, load their model, or wait for their turn elsewhere (several of | 167 | // start, load their model, or wait for their turn elsewhere (several of |
| 167 | // them with /parallel). | 168 | // them with /parallel). |
| 168 | - const gettingReady = $derived(conversation?.busy ? notStreaming(conversation.messages ?? [], answerers).map(agentTitle).join(', ') : '') | 169 | + // The agents not answering yet: a starting one shows its progress (issue #98). |
| 170 | + const readying = $derived(conversation?.busy ? notStreaming(conversation.messages ?? [], answerers) : []) | ||
| 171 | + const starting = $derived(readying.filter((name) => appState.progress[name])) | ||
| 172 | + const gettingReady = $derived(readying.filter((name) => !appState.progress[name]).map(agentTitle).join(', ')) | ||
| 169 | 173 | ||
| 170 | // Smart scrolling: follow new content only when the reader is at the bottom. | 174 | // Smart scrolling: follow new content only when the reader is at the bottom. |
| 171 | let list: HTMLElement | undefined = $state() | 175 | let list: HTMLElement | undefined = $state() |
| @@ -289,6 +293,9 @@ | |||
| 289 | {#each conversation.messages ?? [] as message (message.id)} | 293 | {#each conversation.messages ?? [] as message (message.id)} |
| 290 | <MessageView {message} /> | 294 | <MessageView {message} /> |
| 291 | {/each} | 295 | {/each} |
| 296 | + {#each starting as name (name)} | ||
| 297 | + <StartProgress agent={name} /> | ||
| 298 | + {/each} | ||
| 292 | {#if gettingReady} | 299 | {#if gettingReady} |
| 293 | <p class="pending"><Spinner /> {t('message.preparing', { agent: gettingReady })}</p> | 300 | <p class="pending"><Spinner /> {t('message.preparing', { agent: gettingReady })}</p> |
| 294 | {/if} | 301 | {/if} |
modified
frontend/src/lib/panels/LogsPanel.svelte +4 -0 | @@ -9,6 +9,10 @@ | ||
| 9 | 9 | import { canUnload, unloadReady, unloadSummary, type UnloadLine } from '../unload' |
| 10 | 10 | |
| 11 | 11 | let selected = $state('') |
| 12 | + // showLog (issue #98) chooses the agent. | |
| 13 | + $effect(() => { | |
| 14 | + if (appState.logAgent) selected = appState.logAgent | |
| 15 | + }) | |
| 12 | 16 | const agentName = $derived(selected || appState.agents[0]?.name || '') |
| 13 | 17 | const agent = $derived(appState.agents.find((candidate) => candidate.name === agentName)) |
| 14 | 18 | |
| @@ -9,6 +9,10 @@ | |||
| 9 | import { canUnload, unloadReady, unloadSummary, type UnloadLine } from '../unload' | 9 | import { canUnload, unloadReady, unloadSummary, type UnloadLine } from '../unload' |
| 10 | 10 | ||
| 11 | let selected = $state('') | 11 | let selected = $state('') |
| 12 | + // showLog (issue #98) chooses the agent. | ||
| 13 | + $effect(() => { | ||
| 14 | + if (appState.logAgent) selected = appState.logAgent | ||
| 15 | + }) | ||
| 12 | const agentName = $derived(selected || appState.agents[0]?.name || '') | 16 | const agentName = $derived(selected || appState.agents[0]?.name || '') |
| 13 | const agent = $derived(appState.agents.find((candidate) => candidate.name === agentName)) | 17 | const agent = $derived(appState.agents.find((candidate) => candidate.name === agentName)) |
| 14 | 18 | ||
added
frontend/src/lib/progress.test.ts +36 -0 | new file mode 100644 | ||
| @@ -0,0 +1,36 @@ | ||
| 1 | +// Copyright (c) 2026 Philippe Charrière — Sidekicks Source-Available License 1.0, see LICENSE | |
| 2 | + | |
| 3 | +import { describe, expect, it } from 'vitest' | |
| 4 | +import { elapsed, nextProgress, percentOf } from './progress' | |
| 5 | + | |
| 6 | +describe('percentOf', () => { | |
| 7 | + it('reads a percentage', () => { | |
| 8 | + expect(percentOf('pulling docker.io/sbx/claude-acp:latest 42%')).toBe(42) | |
| 9 | + expect(percentOf('extracting 99.5 %')).toBe(99.5) | |
| 10 | + expect(percentOf('weird 250%')).toBeNull() | |
| 11 | + }) | |
| 12 | + it('reads done/total sizes', () => { | |
| 13 | + expect(percentOf('Downloading 12.5MB/50MB')).toBe(25) | |
| 14 | + expect(percentOf('a1b2: 512kB / 1MB')).toBe(51) | |
| 15 | + expect(percentOf('1.5GiB/3GiB')).toBe(50) | |
| 16 | + }) | |
| 17 | + it('says nothing for other lines', () => { | |
| 18 | + expect(percentOf('sandbox milo-sbx not found: creating it')).toBeNull() | |
| 19 | + expect(percentOf('')).toBeNull() | |
| 20 | + }) | |
| 21 | +}) | |
| 22 | + | |
| 23 | +describe('elapsed', () => { | |
| 24 | + it('splits minutes and seconds', () => { | |
| 25 | + expect(elapsed(1_000, 81_000)).toEqual({ minutes: 1, seconds: 20 }) | |
| 26 | + expect(elapsed(5_000, 1_000)).toEqual({ minutes: 0, seconds: 0 }) | |
| 27 | + }) | |
| 28 | +}) | |
| 29 | + | |
| 30 | +describe('nextProgress', () => { | |
| 31 | + it('keeps the last line when an event has none', () => { | |
| 32 | + const first = nextProgress(undefined, { step: 'preparing', line: 'pulling 10%', since: 1 }) | |
| 33 | + expect(nextProgress(first, { step: 'connecting', line: '', since: 1 })).toEqual({ step: 'connecting', line: 'pulling 10%', since: 1 }) | |
| 34 | + expect(nextProgress(first, { step: 'preparing', line: 'pulling 20%', since: 1 }).line).toBe('pulling 20%') | |
| 35 | + }) | |
| 36 | +}) | |
| new file mode 100644 | |||
| @@ -0,0 +1,36 @@ | |||
| 1 | +// Copyright (c) 2026 Philippe Charrière — Sidekicks Source-Available License 1.0, see LICENSE | ||
| 2 | + | ||
| 3 | +import { describe, expect, it } from 'vitest' | ||
| 4 | +import { elapsed, nextProgress, percentOf } from './progress' | ||
| 5 | + | ||
| 6 | +describe('percentOf', () => { | ||
| 7 | + it('reads a percentage', () => { | ||
| 8 | + expect(percentOf('pulling docker.io/sbx/claude-acp:latest 42%')).toBe(42) | ||
| 9 | + expect(percentOf('extracting 99.5 %')).toBe(99.5) | ||
| 10 | + expect(percentOf('weird 250%')).toBeNull() | ||
| 11 | + }) | ||
| 12 | + it('reads done/total sizes', () => { | ||
| 13 | + expect(percentOf('Downloading 12.5MB/50MB')).toBe(25) | ||
| 14 | + expect(percentOf('a1b2: 512kB / 1MB')).toBe(51) | ||
| 15 | + expect(percentOf('1.5GiB/3GiB')).toBe(50) | ||
| 16 | + }) | ||
| 17 | + it('says nothing for other lines', () => { | ||
| 18 | + expect(percentOf('sandbox milo-sbx not found: creating it')).toBeNull() | ||
| 19 | + expect(percentOf('')).toBeNull() | ||
| 20 | + }) | ||
| 21 | +}) | ||
| 22 | + | ||
| 23 | +describe('elapsed', () => { | ||
| 24 | + it('splits minutes and seconds', () => { | ||
| 25 | + expect(elapsed(1_000, 81_000)).toEqual({ minutes: 1, seconds: 20 }) | ||
| 26 | + expect(elapsed(5_000, 1_000)).toEqual({ minutes: 0, seconds: 0 }) | ||
| 27 | + }) | ||
| 28 | +}) | ||
| 29 | + | ||
| 30 | +describe('nextProgress', () => { | ||
| 31 | + it('keeps the last line when an event has none', () => { | ||
| 32 | + const first = nextProgress(undefined, { step: 'preparing', line: 'pulling 10%', since: 1 }) | ||
| 33 | + expect(nextProgress(first, { step: 'connecting', line: '', since: 1 })).toEqual({ step: 'connecting', line: 'pulling 10%', since: 1 }) | ||
| 34 | + expect(nextProgress(first, { step: 'preparing', line: 'pulling 20%', since: 1 }).line).toBe('pulling 20%') | ||
| 35 | + }) | ||
| 36 | +}) | ||
added
frontend/src/lib/progress.ts +65 -0 | new file mode 100644 | ||
| @@ -0,0 +1,65 @@ | ||
| 1 | +// Copyright (c) 2026 Philippe Charrière — Sidekicks Source-Available License 1.0, see LICENSE | |
| 2 | + | |
| 3 | +// The start of an agent, step by step (issue #98): its sandbox or container | |
| 4 | +// may be created first — kits and images pulled, minutes the first time. | |
| 5 | +// Go sends agent:progress (step, last line, start time); this module reads a | |
| 6 | +// line for a percentage and splits the time elapsed, without Svelte, for | |
| 7 | +// vitest. | |
| 8 | + | |
| 9 | +/** Where a start is, as agent:progress gives it. */ | |
| 10 | +export interface Progress { | |
| 11 | + step: string | |
| 12 | + line: string | |
| 13 | + /** When the start began, in Unix milliseconds. */ | |
| 14 | + since: number | |
| 15 | +} | |
| 16 | + | |
| 17 | +/** The steps, in order. */ | |
| 18 | +export const steps = ['checking', 'preparing', 'connecting'] as const | |
| 19 | + | |
| 20 | +/** | |
| 21 | + * The progress a line of sbx or docker tells, from 0 to 100: a percentage, | |
| 22 | + * or "12.5MB/40MB"; null when it tells none. | |
| 23 | + * | |
| 24 | + * @example | |
| 25 | + * percentOf('pulling layer 42%') // 42 | |
| 26 | + * percentOf('Downloading 12.5MB/50MB') // 25 | |
| 27 | + * percentOf('sandbox milo not found: creating') // null | |
| 28 | + */ | |
| 29 | +export function percentOf(line: string): number | null { | |
| 30 | + const percent = /(\d{1,3}(?:\.\d+)?)\s?%/.exec(line) | |
| 31 | + if (percent) { | |
| 32 | + const value = Number(percent[1]) | |
| 33 | + return value <= 100 ? value : null | |
| 34 | + } | |
| 35 | + const sizes = /(\d+(?:\.\d+)?)\s*([kKMG]?i?B)\s*\/\s*(\d+(?:\.\d+)?)\s*([kKMG]?i?B)/.exec(line) | |
| 36 | + if (!sizes) return null | |
| 37 | + const done = Number(sizes[1]) * unit(sizes[2]) | |
| 38 | + const total = Number(sizes[3]) * unit(sizes[4]) | |
| 39 | + return total > 0 && done <= total ? Math.round((done / total) * 100) : null | |
| 40 | +} | |
| 41 | + | |
| 42 | +function unit(text: string): number { | |
| 43 | + const prefix = text[0].toUpperCase() | |
| 44 | + const base = text.includes('i') ? 1024 : 1000 | |
| 45 | + return prefix === 'K' ? base : prefix === 'M' ? base ** 2 : prefix === 'G' ? base ** 3 : 1 | |
| 46 | +} | |
| 47 | + | |
| 48 | +/** | |
| 49 | + * The time elapsed since a start, in whole minutes and seconds. | |
| 50 | + * | |
| 51 | + * @example | |
| 52 | + * elapsed(1_000, 81_000) // { minutes: 1, seconds: 20 } | |
| 53 | + */ | |
| 54 | +export function elapsed(since: number, now: number): { minutes: number; seconds: number } { | |
| 55 | + const total = Math.max(0, Math.floor((now - since) / 1000)) | |
| 56 | + return { minutes: Math.floor(total / 60), seconds: total % 60 } | |
| 57 | +} | |
| 58 | + | |
| 59 | +/** | |
| 60 | + * The progress after an agent:progress event: a line that says nothing | |
| 61 | + * keeps the last one shown. | |
| 62 | + */ | |
| 63 | +export function nextProgress(previous: Progress | undefined, event: Progress): Progress { | |
| 64 | + return { step: event.step, since: event.since, line: event.line || (previous?.line ?? '') } | |
| 65 | +} | |
| new file mode 100644 | |||
| @@ -0,0 +1,65 @@ | |||
| 1 | +// Copyright (c) 2026 Philippe Charrière — Sidekicks Source-Available License 1.0, see LICENSE | ||
| 2 | + | ||
| 3 | +// The start of an agent, step by step (issue #98): its sandbox or container | ||
| 4 | +// may be created first — kits and images pulled, minutes the first time. | ||
| 5 | +// Go sends agent:progress (step, last line, start time); this module reads a | ||
| 6 | +// line for a percentage and splits the time elapsed, without Svelte, for | ||
| 7 | +// vitest. | ||
| 8 | + | ||
| 9 | +/** Where a start is, as agent:progress gives it. */ | ||
| 10 | +export interface Progress { | ||
| 11 | + step: string | ||
| 12 | + line: string | ||
| 13 | + /** When the start began, in Unix milliseconds. */ | ||
| 14 | + since: number | ||
| 15 | +} | ||
| 16 | + | ||
| 17 | +/** The steps, in order. */ | ||
| 18 | +export const steps = ['checking', 'preparing', 'connecting'] as const | ||
| 19 | + | ||
| 20 | +/** | ||
| 21 | + * The progress a line of sbx or docker tells, from 0 to 100: a percentage, | ||
| 22 | + * or "12.5MB/40MB"; null when it tells none. | ||
| 23 | + * | ||
| 24 | + * @example | ||
| 25 | + * percentOf('pulling layer 42%') // 42 | ||
| 26 | + * percentOf('Downloading 12.5MB/50MB') // 25 | ||
| 27 | + * percentOf('sandbox milo not found: creating') // null | ||
| 28 | + */ | ||
| 29 | +export function percentOf(line: string): number | null { | ||
| 30 | + const percent = /(\d{1,3}(?:\.\d+)?)\s?%/.exec(line) | ||
| 31 | + if (percent) { | ||
| 32 | + const value = Number(percent[1]) | ||
| 33 | + return value <= 100 ? value : null | ||
| 34 | + } | ||
| 35 | + const sizes = /(\d+(?:\.\d+)?)\s*([kKMG]?i?B)\s*\/\s*(\d+(?:\.\d+)?)\s*([kKMG]?i?B)/.exec(line) | ||
| 36 | + if (!sizes) return null | ||
| 37 | + const done = Number(sizes[1]) * unit(sizes[2]) | ||
| 38 | + const total = Number(sizes[3]) * unit(sizes[4]) | ||
| 39 | + return total > 0 && done <= total ? Math.round((done / total) * 100) : null | ||
| 40 | +} | ||
| 41 | + | ||
| 42 | +function unit(text: string): number { | ||
| 43 | + const prefix = text[0].toUpperCase() | ||
| 44 | + const base = text.includes('i') ? 1024 : 1000 | ||
| 45 | + return prefix === 'K' ? base : prefix === 'M' ? base ** 2 : prefix === 'G' ? base ** 3 : 1 | ||
| 46 | +} | ||
| 47 | + | ||
| 48 | +/** | ||
| 49 | + * The time elapsed since a start, in whole minutes and seconds. | ||
| 50 | + * | ||
| 51 | + * @example | ||
| 52 | + * elapsed(1_000, 81_000) // { minutes: 1, seconds: 20 } | ||
| 53 | + */ | ||
| 54 | +export function elapsed(since: number, now: number): { minutes: number; seconds: number } { | ||
| 55 | + const total = Math.max(0, Math.floor((now - since) / 1000)) | ||
| 56 | + return { minutes: Math.floor(total / 60), seconds: total % 60 } | ||
| 57 | +} | ||
| 58 | + | ||
| 59 | +/** | ||
| 60 | + * The progress after an agent:progress event: a line that says nothing | ||
| 61 | + * keeps the last one shown. | ||
| 62 | + */ | ||
| 63 | +export function nextProgress(previous: Progress | undefined, event: Progress): Progress { | ||
| 64 | + return { step: event.step, since: event.since, line: event.line || (previous?.line ?? '') } | ||
| 65 | +} | ||
modified
frontend/src/lib/state.svelte.ts +21 -1 | @@ -8,7 +8,8 @@ import { AgentService, ChannelService, ConfigService, WorkspaceService } from '. | ||
| 8 | 8 | import type { ConfigView } from '../../bindings/git.rickub.com/bots-garden/sidekicks/internal/app' |
| 9 | 9 | import type { Status } from '../../bindings/git.rickub.com/bots-garden/sidekicks/internal/agents' |
| 10 | 10 | import type { Command } from '../../bindings/git.rickub.com/bots-garden/sidekicks/internal/acp' |
| 11 | -import type { AgentLogPayload, AgentStatePayload, ConfigChangedPayload, WorkspaceChangedPayload } from '../../bindings/git.rickub.com/bots-garden/sidekicks/internal/events' | |
| 11 | +import type { AgentLogPayload, AgentProgressPayload, AgentStatePayload, ConfigChangedPayload, WorkspaceChangedPayload } from '../../bindings/git.rickub.com/bots-garden/sidekicks/internal/events' | |
| 12 | +import { nextProgress, type Progress } from './progress' | |
| 12 | 13 | import type { ExitPayload, OutputPayload } from '../../bindings/git.rickub.com/bots-garden/sidekicks/internal/workspace' |
| 13 | 14 | import { terminalExit, terminalOutput } from './terminals' |
| 14 | 15 | import type { |
| @@ -27,6 +28,7 @@ import type { | ||
| 27 | 28 | } from '../../bindings/git.rickub.com/bots-garden/sidekicks/internal/channels' |
| 28 | 29 | import { |
| 29 | 30 | AgentLog, |
| 31 | + AgentProgress, | |
| 30 | 32 | AgentState, |
| 31 | 33 | ChannelsChanged, |
| 32 | 34 | CommandsChanged, |
| @@ -105,6 +107,11 @@ export const appState = $state({ | ||
| 105 | 107 | paletteOpen: false, |
| 106 | 108 | /** Incremented to ask the channels panel for its "new channel" field (⌘N). */ |
| 107 | 109 | newChannelRequest: 0, |
| 110 | + /** Where each starting agent is (issue #98), by agent name. */ | |
| 111 | + progress: {} as Record<string, Progress>, | |
| 112 | + /** The agent whose log the Log panel shows, and a counter that asks the shell to open it. */ | |
| 113 | + logAgent: '', | |
| 114 | + logRequest: 0, | |
| 108 | 115 | }) |
| 109 | 116 | |
| 110 | 117 | // The channels whose conversation was loaded from Go: from then on, the |
| @@ -120,6 +127,9 @@ async function refreshConfig() { | ||
| 120 | 127 | |
| 121 | 128 | async function refreshAgents() { |
| 122 | 129 | appState.agents = (await AgentService.List()) ?? [] |
| 130 | + for (const agent of appState.agents) { | |
| 131 | + if (agent.state === 'starting' && agent.step) appState.progress[agent.name] = nextProgress(appState.progress[agent.name], { step: agent.step, line: '', since: agent.since ?? Date.now() }) | |
| 132 | + } | |
| 123 | 133 | // The conversation or workspace of an agent removed from the |
| 124 | 134 | // configuration is no longer shown. |
| 125 | 135 | const names = appState.agents.map((agent) => agent.name) |
| @@ -217,6 +227,12 @@ export function openWorkspace(agent: string, file = '') { | ||
| 217 | 227 | appState.workspaceFile = file |
| 218 | 228 | } |
| 219 | 229 | |
| 230 | +/** Opens the Log panel on agent's log (issue #98: "See the log"). */ | |
| 231 | +export function showLog(agent: string) { | |
| 232 | + appState.logAgent = agent | |
| 233 | + appState.logRequest++ | |
| 234 | +} | |
| 235 | + | |
| 220 | 236 | /** Shows the "add an agent" assistant in the centre. */ |
| 221 | 237 | export function openAssistant() { |
| 222 | 238 | appState.workspaceAgent = '' |
| @@ -437,6 +453,10 @@ export function connect(): () => void { | ||
| 437 | 453 | } |
| 438 | 454 | agent.state = payload.state as Status['state'] |
| 439 | 455 | agent.error = payload.error ?? '' |
| 456 | + if (payload.state !== 'starting') delete appState.progress[payload.agent] | |
| 457 | + }), | |
| 458 | + subscribe<AgentProgressPayload>(AgentProgress, (payload) => { | |
| 459 | + appState.progress[payload.agent] = nextProgress(appState.progress[payload.agent], payload) | |
| 440 | 460 | }), |
| 441 | 461 | subscribe<AgentLogPayload>(AgentLog, (payload) => logBatcher.push(payload)), |
| 442 | 462 | subscribe<MessagePayload>(MessageUpdated, (payload) => messageBatcher.push({ message: payload })), |
| @@ -8,7 +8,8 @@ import { AgentService, ChannelService, ConfigService, WorkspaceService } from '. | |||
| 8 | import type { ConfigView } from '../../bindings/git.rickub.com/bots-garden/sidekicks/internal/app' | 8 | import type { ConfigView } from '../../bindings/git.rickub.com/bots-garden/sidekicks/internal/app' |
| 9 | import type { Status } from '../../bindings/git.rickub.com/bots-garden/sidekicks/internal/agents' | 9 | import type { Status } from '../../bindings/git.rickub.com/bots-garden/sidekicks/internal/agents' |
| 10 | import type { Command } from '../../bindings/git.rickub.com/bots-garden/sidekicks/internal/acp' | 10 | import type { Command } from '../../bindings/git.rickub.com/bots-garden/sidekicks/internal/acp' |
| 11 | -import type { AgentLogPayload, AgentStatePayload, ConfigChangedPayload, WorkspaceChangedPayload } from '../../bindings/git.rickub.com/bots-garden/sidekicks/internal/events' | 11 | +import type { AgentLogPayload, AgentProgressPayload, AgentStatePayload, ConfigChangedPayload, WorkspaceChangedPayload } from '../../bindings/git.rickub.com/bots-garden/sidekicks/internal/events' |
| 12 | +import { nextProgress, type Progress } from './progress' | ||
| 12 | import type { ExitPayload, OutputPayload } from '../../bindings/git.rickub.com/bots-garden/sidekicks/internal/workspace' | 13 | import type { ExitPayload, OutputPayload } from '../../bindings/git.rickub.com/bots-garden/sidekicks/internal/workspace' |
| 13 | import { terminalExit, terminalOutput } from './terminals' | 14 | import { terminalExit, terminalOutput } from './terminals' |
| 14 | import type { | 15 | import type { |
| @@ -27,6 +28,7 @@ import type { | |||
| 27 | } from '../../bindings/git.rickub.com/bots-garden/sidekicks/internal/channels' | 28 | } from '../../bindings/git.rickub.com/bots-garden/sidekicks/internal/channels' |
| 28 | import { | 29 | import { |
| 29 | AgentLog, | 30 | AgentLog, |
| 31 | + AgentProgress, | ||
| 30 | AgentState, | 32 | AgentState, |
| 31 | ChannelsChanged, | 33 | ChannelsChanged, |
| 32 | CommandsChanged, | 34 | CommandsChanged, |
| @@ -105,6 +107,11 @@ export const appState = $state({ | |||
| 105 | paletteOpen: false, | 107 | paletteOpen: false, |
| 106 | /** Incremented to ask the channels panel for its "new channel" field (⌘N). */ | 108 | /** Incremented to ask the channels panel for its "new channel" field (⌘N). */ |
| 107 | newChannelRequest: 0, | 109 | newChannelRequest: 0, |
| 110 | + /** Where each starting agent is (issue #98), by agent name. */ | ||
| 111 | + progress: {} as Record<string, Progress>, | ||
| 112 | + /** The agent whose log the Log panel shows, and a counter that asks the shell to open it. */ | ||
| 113 | + logAgent: '', | ||
| 114 | + logRequest: 0, | ||
| 108 | }) | 115 | }) |
| 109 | 116 | ||
| 110 | // The channels whose conversation was loaded from Go: from then on, the | 117 | // The channels whose conversation was loaded from Go: from then on, the |
| @@ -120,6 +127,9 @@ async function refreshConfig() { | |||
| 120 | 127 | ||
| 121 | async function refreshAgents() { | 128 | async function refreshAgents() { |
| 122 | appState.agents = (await AgentService.List()) ?? [] | 129 | appState.agents = (await AgentService.List()) ?? [] |
| 130 | + for (const agent of appState.agents) { | ||
| 131 | + if (agent.state === 'starting' && agent.step) appState.progress[agent.name] = nextProgress(appState.progress[agent.name], { step: agent.step, line: '', since: agent.since ?? Date.now() }) | ||
| 132 | + } | ||
| 123 | // The conversation or workspace of an agent removed from the | 133 | // The conversation or workspace of an agent removed from the |
| 124 | // configuration is no longer shown. | 134 | // configuration is no longer shown. |
| 125 | const names = appState.agents.map((agent) => agent.name) | 135 | const names = appState.agents.map((agent) => agent.name) |
| @@ -217,6 +227,12 @@ export function openWorkspace(agent: string, file = '') { | |||
| 217 | appState.workspaceFile = file | 227 | appState.workspaceFile = file |
| 218 | } | 228 | } |
| 219 | 229 | ||
| 230 | +/** Opens the Log panel on agent's log (issue #98: "See the log"). */ | ||
| 231 | +export function showLog(agent: string) { | ||
| 232 | + appState.logAgent = agent | ||
| 233 | + appState.logRequest++ | ||
| 234 | +} | ||
| 235 | + | ||
| 220 | /** Shows the "add an agent" assistant in the centre. */ | 236 | /** Shows the "add an agent" assistant in the centre. */ |
| 221 | export function openAssistant() { | 237 | export function openAssistant() { |
| 222 | appState.workspaceAgent = '' | 238 | appState.workspaceAgent = '' |
| @@ -437,6 +453,10 @@ export function connect(): () => void { | |||
| 437 | } | 453 | } |
| 438 | agent.state = payload.state as Status['state'] | 454 | agent.state = payload.state as Status['state'] |
| 439 | agent.error = payload.error ?? '' | 455 | agent.error = payload.error ?? '' |
| 456 | + if (payload.state !== 'starting') delete appState.progress[payload.agent] | ||
| 457 | + }), | ||
| 458 | + subscribe<AgentProgressPayload>(AgentProgress, (payload) => { | ||
| 459 | + appState.progress[payload.agent] = nextProgress(appState.progress[payload.agent], payload) | ||
| 440 | }), | 460 | }), |
| 441 | subscribe<AgentLogPayload>(AgentLog, (payload) => logBatcher.push(payload)), | 461 | subscribe<AgentLogPayload>(AgentLog, (payload) => logBatcher.push(payload)), |
| 442 | subscribe<MessagePayload>(MessageUpdated, (payload) => messageBatcher.push({ message: payload })), | 462 | subscribe<MessagePayload>(MessageUpdated, (payload) => messageBatcher.push({ message: payload })), |
modified
internal/agents/manager.go +39 -2 | @@ -122,6 +122,10 @@ type Status struct { | ||
| 122 | 122 | // to stop or to remove the agent's sandbox or container (runtime.lifecycle). |
| 123 | 123 | CanStopSandbox bool `json:"canStopSandbox"` |
| 124 | 124 | CanRemoveSandbox bool `json:"canRemoveSandbox"` |
| 125 | + // Step and Since: while starting, the step and when the start began | |
| 126 | + // (Unix milliseconds), as agent:progress gives them (issue #98). | |
| 127 | + Step string `json:"step,omitempty"` | |
| 128 | + Since int64 `json:"since,omitempty"` | |
| 125 | 129 | } |
| 126 | 130 | |
| 127 | 131 | // Manager owns the agent processes. It is safe for concurrent use. |
| @@ -150,6 +154,9 @@ type agent struct { | ||
| 150 | 154 | // stopRequested: Stop was called while the agent was starting. |
| 151 | 155 | stopRequested bool |
| 152 | 156 | logs []string |
| 157 | + // step and since: where the current start is, and when it began (issue #98). | |
| 158 | + step string | |
| 159 | + since time.Time | |
| 153 | 160 | } |
| 154 | 161 | |
| 155 | 162 | // NewManager returns a manager for the agents of the configuration. No agent |
| @@ -187,13 +194,17 @@ func (m *Manager) Statuses() []Status { | ||
| 187 | 194 | } |
| 188 | 195 | |
| 189 | 196 | func (a *agent) status() Status { |
| 190 | - return Status{ | |
| 197 | + status := Status{ | |
| 191 | 198 | Name: a.definition.Name, Title: a.definition.Title, Icon: a.definition.Icon, |
| 192 | 199 | Description: a.definition.Description, State: a.state, Error: a.err, Outdated: a.outdated, |
| 193 | 200 | Runtime: a.definition.Runtime.Type, |
| 194 | 201 | CanStopSandbox: len(a.definition.Runtime.Lifecycle.Stop) > 0, |
| 195 | 202 | CanRemoveSandbox: len(a.definition.Runtime.Lifecycle.Remove) > 0, |
| 196 | 203 | } |
| 204 | + if a.state == StateStarting { | |
| 205 | + status.Step, status.Since = a.step, a.since.UnixMilli() | |
| 206 | + } | |
| 207 | + return status | |
| 197 | 208 | } |
| 198 | 209 | |
| 199 | 210 | // Definition returns the configuration of the agent called name. |
| @@ -300,7 +311,9 @@ func (m *Manager) ensureStarted(ctx context.Context, name string) (*agent, error | ||
| 300 | 311 | return nil, err |
| 301 | 312 | } |
| 302 | 313 | a.starting = make(chan struct{}) |
| 314 | + a.step, a.since = events.StepChecking, m.options.Now() | |
| 303 | 315 | m.setState(a, StateStarting, "") |
| 316 | + m.emitProgress(a, "") | |
| 304 | 317 | definition := a.definition |
| 305 | 318 | m.mu.Unlock() |
| 306 | 319 | |
| @@ -311,6 +324,7 @@ func (m *Manager) ensureStarted(ctx context.Context, name string) (*agent, error | ||
| 311 | 324 | spec := m.specFor(definition) |
| 312 | 325 | startErr := m.prepare(ctx, a, definition) |
| 313 | 326 | if startErr == nil { |
| 327 | + m.toStep(a, events.StepConnecting) | |
| 314 | 328 | if m.options.Tools != nil { |
| 315 | 329 | m.log(a, toolsLine(spec)) |
| 316 | 330 | } |
| @@ -344,7 +358,27 @@ func (m *Manager) prepare(ctx context.Context, a *agent, definition config.Agent | ||
| 344 | 358 | if m.options.Prepare == nil { |
| 345 | 359 | return nil |
| 346 | 360 | } |
| 347 | - return m.options.Prepare(ctx, definition, func(line string) { m.log(a, "sandbox: "+line) }) | |
| 361 | + return m.options.Prepare(ctx, definition, func(line string) { | |
| 362 | + // A line means the sandbox or the container is being made. | |
| 363 | + m.toStep(a, events.StepPreparing) | |
| 364 | + m.log(a, "sandbox: "+line) | |
| 365 | + }) | |
| 366 | +} | |
| 367 | + | |
| 368 | +// toStep moves a starting agent to step (issue #98). | |
| 369 | +func (m *Manager) toStep(a *agent, step string) { | |
| 370 | + m.mu.Lock() | |
| 371 | + defer m.mu.Unlock() | |
| 372 | + if a.state != StateStarting || a.step == step { | |
| 373 | + return | |
| 374 | + } | |
| 375 | + a.step = step | |
| 376 | + m.emitProgress(a, "") | |
| 377 | +} | |
| 378 | + | |
| 379 | +// emitProgress sends agent:progress for a starting agent. The caller holds m.mu. | |
| 380 | +func (m *Manager) emitProgress(a *agent, line string) { | |
| 381 | + m.options.Emitter.Emit(events.AgentProgress, events.AgentProgressPayload{Agent: a.definition.Name, Step: a.step, Line: line, Since: a.since.UnixMilli()}) | |
| 348 | 382 | } |
| 349 | 383 | |
| 350 | 384 | // makeRoom keeps the number of running agents under the limit by stopping |
| @@ -637,6 +671,9 @@ func (m *Manager) log(a *agent, line string) { | ||
| 637 | 671 | a.logs = a.logs[len(a.logs)-logLines:] |
| 638 | 672 | } |
| 639 | 673 | m.options.Emitter.Emit(events.AgentLog, events.AgentLogPayload{Agent: a.definition.Name, Line: line}) |
| 674 | + if a.state == StateStarting { | |
| 675 | + m.emitProgress(a, strings.TrimPrefix(line, "sandbox: ")) | |
| 676 | + } | |
| 640 | 677 | } |
| 641 | 678 | |
| 642 | 679 | // setState changes the state and emits agent:state when it actually changes. |
| @@ -122,6 +122,10 @@ type Status struct { | |||
| 122 | // to stop or to remove the agent's sandbox or container (runtime.lifecycle). | 122 | // to stop or to remove the agent's sandbox or container (runtime.lifecycle). |
| 123 | CanStopSandbox bool `json:"canStopSandbox"` | 123 | CanStopSandbox bool `json:"canStopSandbox"` |
| 124 | CanRemoveSandbox bool `json:"canRemoveSandbox"` | 124 | CanRemoveSandbox bool `json:"canRemoveSandbox"` |
| 125 | + // Step and Since: while starting, the step and when the start began | ||
| 126 | + // (Unix milliseconds), as agent:progress gives them (issue #98). | ||
| 127 | + Step string `json:"step,omitempty"` | ||
| 128 | + Since int64 `json:"since,omitempty"` | ||
| 125 | } | 129 | } |
| 126 | 130 | ||
| 127 | // Manager owns the agent processes. It is safe for concurrent use. | 131 | // Manager owns the agent processes. It is safe for concurrent use. |
| @@ -150,6 +154,9 @@ type agent struct { | |||
| 150 | // stopRequested: Stop was called while the agent was starting. | 154 | // stopRequested: Stop was called while the agent was starting. |
| 151 | stopRequested bool | 155 | stopRequested bool |
| 152 | logs []string | 156 | logs []string |
| 157 | + // step and since: where the current start is, and when it began (issue #98). | ||
| 158 | + step string | ||
| 159 | + since time.Time | ||
| 153 | } | 160 | } |
| 154 | 161 | ||
| 155 | // NewManager returns a manager for the agents of the configuration. No agent | 162 | // NewManager returns a manager for the agents of the configuration. No agent |
| @@ -187,13 +194,17 @@ func (m *Manager) Statuses() []Status { | |||
| 187 | } | 194 | } |
| 188 | 195 | ||
| 189 | func (a *agent) status() Status { | 196 | func (a *agent) status() Status { |
| 190 | - return Status{ | 197 | + status := Status{ |
| 191 | Name: a.definition.Name, Title: a.definition.Title, Icon: a.definition.Icon, | 198 | Name: a.definition.Name, Title: a.definition.Title, Icon: a.definition.Icon, |
| 192 | Description: a.definition.Description, State: a.state, Error: a.err, Outdated: a.outdated, | 199 | Description: a.definition.Description, State: a.state, Error: a.err, Outdated: a.outdated, |
| 193 | Runtime: a.definition.Runtime.Type, | 200 | Runtime: a.definition.Runtime.Type, |
| 194 | CanStopSandbox: len(a.definition.Runtime.Lifecycle.Stop) > 0, | 201 | CanStopSandbox: len(a.definition.Runtime.Lifecycle.Stop) > 0, |
| 195 | CanRemoveSandbox: len(a.definition.Runtime.Lifecycle.Remove) > 0, | 202 | CanRemoveSandbox: len(a.definition.Runtime.Lifecycle.Remove) > 0, |
| 196 | } | 203 | } |
| 204 | + if a.state == StateStarting { | ||
| 205 | + status.Step, status.Since = a.step, a.since.UnixMilli() | ||
| 206 | + } | ||
| 207 | + return status | ||
| 197 | } | 208 | } |
| 198 | 209 | ||
| 199 | // Definition returns the configuration of the agent called name. | 210 | // Definition returns the configuration of the agent called name. |
| @@ -300,7 +311,9 @@ func (m *Manager) ensureStarted(ctx context.Context, name string) (*agent, error | |||
| 300 | return nil, err | 311 | return nil, err |
| 301 | } | 312 | } |
| 302 | a.starting = make(chan struct{}) | 313 | a.starting = make(chan struct{}) |
| 314 | + a.step, a.since = events.StepChecking, m.options.Now() | ||
| 303 | m.setState(a, StateStarting, "") | 315 | m.setState(a, StateStarting, "") |
| 316 | + m.emitProgress(a, "") | ||
| 304 | definition := a.definition | 317 | definition := a.definition |
| 305 | m.mu.Unlock() | 318 | m.mu.Unlock() |
| 306 | 319 | ||
| @@ -311,6 +324,7 @@ func (m *Manager) ensureStarted(ctx context.Context, name string) (*agent, error | |||
| 311 | spec := m.specFor(definition) | 324 | spec := m.specFor(definition) |
| 312 | startErr := m.prepare(ctx, a, definition) | 325 | startErr := m.prepare(ctx, a, definition) |
| 313 | if startErr == nil { | 326 | if startErr == nil { |
| 327 | + m.toStep(a, events.StepConnecting) | ||
| 314 | if m.options.Tools != nil { | 328 | if m.options.Tools != nil { |
| 315 | m.log(a, toolsLine(spec)) | 329 | m.log(a, toolsLine(spec)) |
| 316 | } | 330 | } |
| @@ -344,7 +358,27 @@ func (m *Manager) prepare(ctx context.Context, a *agent, definition config.Agent | |||
| 344 | if m.options.Prepare == nil { | 358 | if m.options.Prepare == nil { |
| 345 | return nil | 359 | return nil |
| 346 | } | 360 | } |
| 347 | - return m.options.Prepare(ctx, definition, func(line string) { m.log(a, "sandbox: "+line) }) | 361 | + return m.options.Prepare(ctx, definition, func(line string) { |
| 362 | + // A line means the sandbox or the container is being made. | ||
| 363 | + m.toStep(a, events.StepPreparing) | ||
| 364 | + m.log(a, "sandbox: "+line) | ||
| 365 | + }) | ||
| 366 | +} | ||
| 367 | + | ||
| 368 | +// toStep moves a starting agent to step (issue #98). | ||
| 369 | +func (m *Manager) toStep(a *agent, step string) { | ||
| 370 | + m.mu.Lock() | ||
| 371 | + defer m.mu.Unlock() | ||
| 372 | + if a.state != StateStarting || a.step == step { | ||
| 373 | + return | ||
| 374 | + } | ||
| 375 | + a.step = step | ||
| 376 | + m.emitProgress(a, "") | ||
| 377 | +} | ||
| 378 | + | ||
| 379 | +// emitProgress sends agent:progress for a starting agent. The caller holds m.mu. | ||
| 380 | +func (m *Manager) emitProgress(a *agent, line string) { | ||
| 381 | + m.options.Emitter.Emit(events.AgentProgress, events.AgentProgressPayload{Agent: a.definition.Name, Step: a.step, Line: line, Since: a.since.UnixMilli()}) | ||
| 348 | } | 382 | } |
| 349 | 383 | ||
| 350 | // makeRoom keeps the number of running agents under the limit by stopping | 384 | // makeRoom keeps the number of running agents under the limit by stopping |
| @@ -637,6 +671,9 @@ func (m *Manager) log(a *agent, line string) { | |||
| 637 | a.logs = a.logs[len(a.logs)-logLines:] | 671 | a.logs = a.logs[len(a.logs)-logLines:] |
| 638 | } | 672 | } |
| 639 | m.options.Emitter.Emit(events.AgentLog, events.AgentLogPayload{Agent: a.definition.Name, Line: line}) | 673 | m.options.Emitter.Emit(events.AgentLog, events.AgentLogPayload{Agent: a.definition.Name, Line: line}) |
| 674 | + if a.state == StateStarting { | ||
| 675 | + m.emitProgress(a, strings.TrimPrefix(line, "sandbox: ")) | ||
| 676 | + } | ||
| 640 | } | 677 | } |
| 641 | 678 | ||
| 642 | // setState changes the state and emits agent:state when it actually changes. | 679 | // setState changes the state and emits agent:state when it actually changes. |
modified
internal/agents/manager_test.go +42 -0 | @@ -416,6 +416,48 @@ func TestPrepareRunsBeforeEachStartAndCanFailIt(t *testing.T) { | ||
| 416 | 416 | } |
| 417 | 417 | } |
| 418 | 418 | |
| 419 | +// Issue #98: a start says where it is — checking, preparing (the sandbox | |
| 420 | +// prints lines), connecting (the agent prints lines) — with when it began. | |
| 421 | +func TestAStartSaysItsStepsAndLines(t *testing.T) { | |
| 422 | + starter, recorder := newFakeStarter(), &events.Recorder{} | |
| 423 | + began := time.Date(2026, 11, 15, 9, 0, 0, 0, time.UTC) | |
| 424 | + var during agents.Status | |
| 425 | + var manager *agents.Manager | |
| 426 | + prepare := func(_ context.Context, _ config.Agent, log func(string)) error { | |
| 427 | + log("sandbox milo-sbx not found: creating it") | |
| 428 | + log("pulling docker.io/sbx/claude-acp:latest 42%") | |
| 429 | + during = manager.Statuses()[0] | |
| 430 | + return nil | |
| 431 | + } | |
| 432 | + manager = agents.NewManager(definitions("milo"), agents.Options{ | |
| 433 | + MaxRunning: maxRunning, Emitter: recorder, Starter: starter.start, Prepare: prepare, Now: func() time.Time { return began }, | |
| 434 | + }) | |
| 435 | + if err := manager.Start(ctx, "milo"); err != nil { | |
| 436 | + t.Fatal(err) | |
| 437 | + } | |
| 438 | + var got []string | |
| 439 | + for _, payload := range recorder.Named(events.AgentProgress) { | |
| 440 | + progress := payload.(events.AgentProgressPayload) | |
| 441 | + if progress.Agent != "milo" || progress.Since != began.UnixMilli() { | |
| 442 | + t.Fatalf("progress: %+v", progress) | |
| 443 | + } | |
| 444 | + got = append(got, progress.Step+"|"+progress.Line) | |
| 445 | + } | |
| 446 | + want := []string{ | |
| 447 | + "checking|", "preparing|", "preparing|sandbox milo-sbx not found: creating it", "preparing|pulling docker.io/sbx/claude-acp:latest 42%", | |
| 448 | + "connecting|", "connecting|milo started in /agents/milo", | |
| 449 | + } | |
| 450 | + if strings.Join(got, "\n") != strings.Join(want, "\n") { | |
| 451 | + t.Fatalf("progress:\n%s", strings.Join(got, "\n")) | |
| 452 | + } | |
| 453 | + if during.State != agents.StateStarting || during.Step != "preparing" || during.Since != began.UnixMilli() { | |
| 454 | + t.Fatalf("status while starting: %+v", during) | |
| 455 | + } | |
| 456 | + if after := manager.Statuses()[0]; after.Step != "" || after.Since != 0 { | |
| 457 | + t.Fatalf("no step once ready: %+v", after) | |
| 458 | + } | |
| 459 | +} | |
| 460 | + | |
| 419 | 461 | func TestStatusSaysWhichSandboxCommandsExist(t *testing.T) { |
| 420 | 462 | definition := config.Agent{Name: "milo", Command: "sbx", Runtime: config.Runtime{Type: "sbx", Sandbox: "milo-sbx", Lifecycle: config.Lifecycle{Stop: []string{"sbx", "stop", "milo-sbx"}}}} |
| 421 | 463 | manager := agents.NewManager([]config.Agent{definition}, agents.Options{Starter: newFakeStarter().start}) |
| @@ -416,6 +416,48 @@ func TestPrepareRunsBeforeEachStartAndCanFailIt(t *testing.T) { | |||
| 416 | } | 416 | } |
| 417 | } | 417 | } |
| 418 | 418 | ||
| 419 | +// Issue #98: a start says where it is — checking, preparing (the sandbox | ||
| 420 | +// prints lines), connecting (the agent prints lines) — with when it began. | ||
| 421 | +func TestAStartSaysItsStepsAndLines(t *testing.T) { | ||
| 422 | + starter, recorder := newFakeStarter(), &events.Recorder{} | ||
| 423 | + began := time.Date(2026, 11, 15, 9, 0, 0, 0, time.UTC) | ||
| 424 | + var during agents.Status | ||
| 425 | + var manager *agents.Manager | ||
| 426 | + prepare := func(_ context.Context, _ config.Agent, log func(string)) error { | ||
| 427 | + log("sandbox milo-sbx not found: creating it") | ||
| 428 | + log("pulling docker.io/sbx/claude-acp:latest 42%") | ||
| 429 | + during = manager.Statuses()[0] | ||
| 430 | + return nil | ||
| 431 | + } | ||
| 432 | + manager = agents.NewManager(definitions("milo"), agents.Options{ | ||
| 433 | + MaxRunning: maxRunning, Emitter: recorder, Starter: starter.start, Prepare: prepare, Now: func() time.Time { return began }, | ||
| 434 | + }) | ||
| 435 | + if err := manager.Start(ctx, "milo"); err != nil { | ||
| 436 | + t.Fatal(err) | ||
| 437 | + } | ||
| 438 | + var got []string | ||
| 439 | + for _, payload := range recorder.Named(events.AgentProgress) { | ||
| 440 | + progress := payload.(events.AgentProgressPayload) | ||
| 441 | + if progress.Agent != "milo" || progress.Since != began.UnixMilli() { | ||
| 442 | + t.Fatalf("progress: %+v", progress) | ||
| 443 | + } | ||
| 444 | + got = append(got, progress.Step+"|"+progress.Line) | ||
| 445 | + } | ||
| 446 | + want := []string{ | ||
| 447 | + "checking|", "preparing|", "preparing|sandbox milo-sbx not found: creating it", "preparing|pulling docker.io/sbx/claude-acp:latest 42%", | ||
| 448 | + "connecting|", "connecting|milo started in /agents/milo", | ||
| 449 | + } | ||
| 450 | + if strings.Join(got, "\n") != strings.Join(want, "\n") { | ||
| 451 | + t.Fatalf("progress:\n%s", strings.Join(got, "\n")) | ||
| 452 | + } | ||
| 453 | + if during.State != agents.StateStarting || during.Step != "preparing" || during.Since != began.UnixMilli() { | ||
| 454 | + t.Fatalf("status while starting: %+v", during) | ||
| 455 | + } | ||
| 456 | + if after := manager.Statuses()[0]; after.Step != "" || after.Since != 0 { | ||
| 457 | + t.Fatalf("no step once ready: %+v", after) | ||
| 458 | + } | ||
| 459 | +} | ||
| 460 | + | ||
| 419 | func TestStatusSaysWhichSandboxCommandsExist(t *testing.T) { | 461 | func TestStatusSaysWhichSandboxCommandsExist(t *testing.T) { |
| 420 | definition := config.Agent{Name: "milo", Command: "sbx", Runtime: config.Runtime{Type: "sbx", Sandbox: "milo-sbx", Lifecycle: config.Lifecycle{Stop: []string{"sbx", "stop", "milo-sbx"}}}} | 462 | definition := config.Agent{Name: "milo", Command: "sbx", Runtime: config.Runtime{Type: "sbx", Sandbox: "milo-sbx", Lifecycle: config.Lifecycle{Stop: []string{"sbx", "stop", "milo-sbx"}}}} |
| 421 | manager := agents.NewManager([]config.Agent{definition}, agents.Options{Starter: newFakeStarter().start}) | 463 | manager := agents.NewManager([]config.Agent{definition}, agents.Options{Starter: newFakeStarter().start}) |
modified
internal/app/creator.go +45 -3 | @@ -6,7 +6,10 @@ import ( | ||
| 6 | 6 | "context" |
| 7 | 7 | "errors" |
| 8 | 8 | "fmt" |
| 9 | + "os" | |
| 9 | 10 | "path/filepath" |
| 11 | + "slices" | |
| 12 | + "strings" | |
| 10 | 13 | "sync" |
| 11 | 14 | |
| 12 | 15 | "git.rickub.com/bots-garden/sidekicks/internal/acp" |
| @@ -42,12 +45,17 @@ type CreatorStart struct { | ||
| 42 | 45 | AgentsFolder string `json:"agentsFolder"` |
| 43 | 46 | // Version is what mm --version said. |
| 44 | 47 | Version string `json:"version"` |
| 48 | + // Taken is the names already used, by an agent or by a folder of the | |
| 49 | + // agents' folder: the interface suggests a free one (issue #99). | |
| 50 | + Taken []string `json:"taken"` | |
| 45 | 51 | } |
| 46 | 52 | |
| 47 | 53 | // CreatorFinish is the last step: the agent's name (its folder's too), its |
| 48 | 54 | // emoji, and where it runs: local, container or sbx. |
| 49 | 55 | type CreatorFinish struct { |
| 50 | - Name string `json:"name"` | |
| 56 | + Name string `json:"name"` | |
| 57 | + // Title is the name shown; "" keeps mm's (acp.title). | |
| 58 | + Title string `json:"title"` | |
| 51 | 59 | Icon string `json:"icon"` |
| 52 | 60 | Environment string `json:"environment"` |
| 53 | 61 | } |
| @@ -112,7 +120,7 @@ func (s *CreatorService) Start(ctx context.Context) (CreatorStart, error) { | ||
| 112 | 120 | } |
| 113 | 121 | creation.session = session |
| 114 | 122 | view, err := session.Begin(ctx) |
| 115 | - return CreatorStart{View: view, AgentsFolder: options.AgentsFolder, Version: version}, err | |
| 123 | + return CreatorStart{View: view, AgentsFolder: options.AgentsFolder, Version: version, Taken: s.Core.takenNames(options.AgentsFolder, nil)}, err | |
| 116 | 124 | } |
| 117 | 125 | |
| 118 | 126 | // session is the wizard in progress, or ErrClosed. |
| @@ -191,6 +199,40 @@ func (s *CreatorService) Cancel() { | ||
| 191 | 199 | } |
| 192 | 200 | } |
| 193 | 201 | |
| 202 | +// takenNames is the names an agent created by an assistant cannot take: the | |
| 203 | +// agents of the configuration, the folders of the agents' folder (but the | |
| 204 | +// assistants' temporary ones) and the sandboxes given, sorted. | |
| 205 | +func (c *Core) takenNames(folder string, sandboxes []string) []string { | |
| 206 | + taken := map[string]bool{} | |
| 207 | + c.mu.Lock() | |
| 208 | + for _, agent := range c.cfg.Agents { | |
| 209 | + taken[agent.Name] = true | |
| 210 | + } | |
| 211 | + c.mu.Unlock() | |
| 212 | + entries, _ := os.ReadDir(folder) | |
| 213 | + for _, entry := range entries { | |
| 214 | + if !strings.HasPrefix(entry.Name(), ".") { | |
| 215 | + taken[entry.Name()] = true | |
| 216 | + } | |
| 217 | + } | |
| 218 | + for _, sandbox := range sandboxes { | |
| 219 | + taken[sandbox] = true | |
| 220 | + } | |
| 221 | + names := make([]string, 0, len(taken)) | |
| 222 | + for name := range taken { | |
| 223 | + names = append(names, name) | |
| 224 | + } | |
| 225 | + slices.Sort(names) | |
| 226 | + return names | |
| 227 | +} | |
| 228 | + | |
| 229 | +func orDefault(value, fallback string) string { | |
| 230 | + if value == "" { | |
| 231 | + return fallback | |
| 232 | + } | |
| 233 | + return value | |
| 234 | +} | |
| 235 | + | |
| 194 | 236 | func (c *Core) hasAgent(name string) bool { |
| 195 | 237 | c.mu.Lock() |
| 196 | 238 | defer c.mu.Unlock() |
| @@ -205,7 +247,7 @@ func (c *Core) hasAgent(name string) bool { | ||
| 205 | 247 | // agent file's path is the same inside. |
| 206 | 248 | func agentFormOf(form CreatorFinish, result creator.Result) (AgentForm, error) { |
| 207 | 249 | agent := AgentForm{ |
| 208 | - Name: form.Name, Title: result.Title, Icon: form.Icon, Environment: result.Environment, | |
| 250 | + Name: form.Name, Title: orDefault(strings.TrimSpace(form.Title), result.Title), Icon: form.Icon, Environment: result.Environment, | |
| 209 | 251 | Program: "mm", Arguments: joinArguments([]string{"--acp", "--config", result.AgentFile}), Workspace: result.Folder, |
| 210 | 252 | } |
| 211 | 253 | switch result.Environment { |
| @@ -6,7 +6,10 @@ import ( | |||
| 6 | "context" | 6 | "context" |
| 7 | "errors" | 7 | "errors" |
| 8 | "fmt" | 8 | "fmt" |
| 9 | + "os" | ||
| 9 | "path/filepath" | 10 | "path/filepath" |
| 11 | + "slices" | ||
| 12 | + "strings" | ||
| 10 | "sync" | 13 | "sync" |
| 11 | 14 | ||
| 12 | "git.rickub.com/bots-garden/sidekicks/internal/acp" | 15 | "git.rickub.com/bots-garden/sidekicks/internal/acp" |
| @@ -42,12 +45,17 @@ type CreatorStart struct { | |||
| 42 | AgentsFolder string `json:"agentsFolder"` | 45 | AgentsFolder string `json:"agentsFolder"` |
| 43 | // Version is what mm --version said. | 46 | // Version is what mm --version said. |
| 44 | Version string `json:"version"` | 47 | Version string `json:"version"` |
| 48 | + // Taken is the names already used, by an agent or by a folder of the | ||
| 49 | + // agents' folder: the interface suggests a free one (issue #99). | ||
| 50 | + Taken []string `json:"taken"` | ||
| 45 | } | 51 | } |
| 46 | 52 | ||
| 47 | // CreatorFinish is the last step: the agent's name (its folder's too), its | 53 | // CreatorFinish is the last step: the agent's name (its folder's too), its |
| 48 | // emoji, and where it runs: local, container or sbx. | 54 | // emoji, and where it runs: local, container or sbx. |
| 49 | type CreatorFinish struct { | 55 | type CreatorFinish struct { |
| 50 | - Name string `json:"name"` | 56 | + Name string `json:"name"` |
| 57 | + // Title is the name shown; "" keeps mm's (acp.title). | ||
| 58 | + Title string `json:"title"` | ||
| 51 | Icon string `json:"icon"` | 59 | Icon string `json:"icon"` |
| 52 | Environment string `json:"environment"` | 60 | Environment string `json:"environment"` |
| 53 | } | 61 | } |
| @@ -112,7 +120,7 @@ func (s *CreatorService) Start(ctx context.Context) (CreatorStart, error) { | |||
| 112 | } | 120 | } |
| 113 | creation.session = session | 121 | creation.session = session |
| 114 | view, err := session.Begin(ctx) | 122 | view, err := session.Begin(ctx) |
| 115 | - return CreatorStart{View: view, AgentsFolder: options.AgentsFolder, Version: version}, err | 123 | + return CreatorStart{View: view, AgentsFolder: options.AgentsFolder, Version: version, Taken: s.Core.takenNames(options.AgentsFolder, nil)}, err |
| 116 | } | 124 | } |
| 117 | 125 | ||
| 118 | // session is the wizard in progress, or ErrClosed. | 126 | // session is the wizard in progress, or ErrClosed. |
| @@ -191,6 +199,40 @@ func (s *CreatorService) Cancel() { | |||
| 191 | } | 199 | } |
| 192 | } | 200 | } |
| 193 | 201 | ||
| 202 | +// takenNames is the names an agent created by an assistant cannot take: the | ||
| 203 | +// agents of the configuration, the folders of the agents' folder (but the | ||
| 204 | +// assistants' temporary ones) and the sandboxes given, sorted. | ||
| 205 | +func (c *Core) takenNames(folder string, sandboxes []string) []string { | ||
| 206 | + taken := map[string]bool{} | ||
| 207 | + c.mu.Lock() | ||
| 208 | + for _, agent := range c.cfg.Agents { | ||
| 209 | + taken[agent.Name] = true | ||
| 210 | + } | ||
| 211 | + c.mu.Unlock() | ||
| 212 | + entries, _ := os.ReadDir(folder) | ||
| 213 | + for _, entry := range entries { | ||
| 214 | + if !strings.HasPrefix(entry.Name(), ".") { | ||
| 215 | + taken[entry.Name()] = true | ||
| 216 | + } | ||
| 217 | + } | ||
| 218 | + for _, sandbox := range sandboxes { | ||
| 219 | + taken[sandbox] = true | ||
| 220 | + } | ||
| 221 | + names := make([]string, 0, len(taken)) | ||
| 222 | + for name := range taken { | ||
| 223 | + names = append(names, name) | ||
| 224 | + } | ||
| 225 | + slices.Sort(names) | ||
| 226 | + return names | ||
| 227 | +} | ||
| 228 | + | ||
| 229 | +func orDefault(value, fallback string) string { | ||
| 230 | + if value == "" { | ||
| 231 | + return fallback | ||
| 232 | + } | ||
| 233 | + return value | ||
| 234 | +} | ||
| 235 | + | ||
| 194 | func (c *Core) hasAgent(name string) bool { | 236 | func (c *Core) hasAgent(name string) bool { |
| 195 | c.mu.Lock() | 237 | c.mu.Lock() |
| 196 | defer c.mu.Unlock() | 238 | defer c.mu.Unlock() |
| @@ -205,7 +247,7 @@ func (c *Core) hasAgent(name string) bool { | |||
| 205 | // agent file's path is the same inside. | 247 | // agent file's path is the same inside. |
| 206 | func agentFormOf(form CreatorFinish, result creator.Result) (AgentForm, error) { | 248 | func agentFormOf(form CreatorFinish, result creator.Result) (AgentForm, error) { |
| 207 | agent := AgentForm{ | 249 | agent := AgentForm{ |
| 208 | - Name: form.Name, Title: result.Title, Icon: form.Icon, Environment: result.Environment, | 250 | + Name: form.Name, Title: orDefault(strings.TrimSpace(form.Title), result.Title), Icon: form.Icon, Environment: result.Environment, |
| 209 | Program: "mm", Arguments: joinArguments([]string{"--acp", "--config", result.AgentFile}), Workspace: result.Folder, | 251 | Program: "mm", Arguments: joinArguments([]string{"--acp", "--config", result.AgentFile}), Workspace: result.Folder, |
| 210 | } | 252 | } |
| 211 | switch result.Environment { | 253 | switch result.Environment { |
modified
internal/app/creator_test.go +3 -3 | @@ -38,7 +38,7 @@ func written(t *testing.T, service *app.CreatorService, name string) { | ||
| 38 | 38 | if err != nil { |
| 39 | 39 | t.Fatal(err) |
| 40 | 40 | } |
| 41 | - if start.View.Form == nil || start.Version != "mm v1.0.9" { | |
| 41 | + if start.View.Form == nil || start.Version != "mm v1.0.9" || !slices.Contains(start.Taken, "alice") { | |
| 42 | 42 | t.Fatalf("start: %+v", start) |
| 43 | 43 | } |
| 44 | 44 | view, err := service.Answer(context.Background(), acp.FormAnswer{Action: acp.FormAccept, Content: map[string]any{"provider": "llmman", "name": name}}) |
| @@ -50,7 +50,7 @@ func written(t *testing.T, service *app.CreatorService, name string) { | ||
| 50 | 50 | func TestTheCreatedAgentIsAddedToTheConfiguration(t *testing.T) { |
| 51 | 51 | service, path, folder := creatorFixture(t, "mm v1.0.9") |
| 52 | 52 | written(t, service, "Bob") |
| 53 | - result, err := service.Finish(context.Background(), app.CreatorFinish{Name: "bob", Icon: "🦊", Environment: creator.Local}) | |
| 53 | + result, err := service.Finish(context.Background(), app.CreatorFinish{Name: "bob", Title: "Bob the fox", Icon: "🦊", Environment: creator.Local}) | |
| 54 | 54 | if err != nil || result.Problem != "" || len(result.Problems) != 0 || result.Name != "bob" { |
| 55 | 55 | t.Fatalf("finish: %+v %v", result, err) |
| 56 | 56 | } |
| @@ -60,7 +60,7 @@ func TestTheCreatedAgentIsAddedToTheConfiguration(t *testing.T) { | ||
| 60 | 60 | } |
| 61 | 61 | bob, ok := cfg.Agent("bob") |
| 62 | 62 | agentFile := filepath.Join(folder, "bob", ".mm", "agent.yaml") |
| 63 | - if !ok || bob.Icon != "🦊" || bob.Title != "Bob (developer)" || bob.Workspace != filepath.Join(folder, "bob") || | |
| 63 | + if !ok || bob.Icon != "🦊" || bob.Title != "Bob the fox" || bob.Workspace != filepath.Join(folder, "bob") || | |
| 64 | 64 | !slices.Equal(bob.Args, []string{"--acp", "--config", agentFile}) || filepath.Base(bob.Command) != "mm" { |
| 65 | 65 | t.Fatalf("bob: %+v", bob) |
| 66 | 66 | } |
| @@ -38,7 +38,7 @@ func written(t *testing.T, service *app.CreatorService, name string) { | |||
| 38 | if err != nil { | 38 | if err != nil { |
| 39 | t.Fatal(err) | 39 | t.Fatal(err) |
| 40 | } | 40 | } |
| 41 | - if start.View.Form == nil || start.Version != "mm v1.0.9" { | 41 | + if start.View.Form == nil || start.Version != "mm v1.0.9" || !slices.Contains(start.Taken, "alice") { |
| 42 | t.Fatalf("start: %+v", start) | 42 | t.Fatalf("start: %+v", start) |
| 43 | } | 43 | } |
| 44 | view, err := service.Answer(context.Background(), acp.FormAnswer{Action: acp.FormAccept, Content: map[string]any{"provider": "llmman", "name": name}}) | 44 | view, err := service.Answer(context.Background(), acp.FormAnswer{Action: acp.FormAccept, Content: map[string]any{"provider": "llmman", "name": name}}) |
| @@ -50,7 +50,7 @@ func written(t *testing.T, service *app.CreatorService, name string) { | |||
| 50 | func TestTheCreatedAgentIsAddedToTheConfiguration(t *testing.T) { | 50 | func TestTheCreatedAgentIsAddedToTheConfiguration(t *testing.T) { |
| 51 | service, path, folder := creatorFixture(t, "mm v1.0.9") | 51 | service, path, folder := creatorFixture(t, "mm v1.0.9") |
| 52 | written(t, service, "Bob") | 52 | written(t, service, "Bob") |
| 53 | - result, err := service.Finish(context.Background(), app.CreatorFinish{Name: "bob", Icon: "🦊", Environment: creator.Local}) | 53 | + result, err := service.Finish(context.Background(), app.CreatorFinish{Name: "bob", Title: "Bob the fox", Icon: "🦊", Environment: creator.Local}) |
| 54 | if err != nil || result.Problem != "" || len(result.Problems) != 0 || result.Name != "bob" { | 54 | if err != nil || result.Problem != "" || len(result.Problems) != 0 || result.Name != "bob" { |
| 55 | t.Fatalf("finish: %+v %v", result, err) | 55 | t.Fatalf("finish: %+v %v", result, err) |
| 56 | } | 56 | } |
| @@ -60,7 +60,7 @@ func TestTheCreatedAgentIsAddedToTheConfiguration(t *testing.T) { | |||
| 60 | } | 60 | } |
| 61 | bob, ok := cfg.Agent("bob") | 61 | bob, ok := cfg.Agent("bob") |
| 62 | agentFile := filepath.Join(folder, "bob", ".mm", "agent.yaml") | 62 | agentFile := filepath.Join(folder, "bob", ".mm", "agent.yaml") |
| 63 | - if !ok || bob.Icon != "🦊" || bob.Title != "Bob (developer)" || bob.Workspace != filepath.Join(folder, "bob") || | 63 | + if !ok || bob.Icon != "🦊" || bob.Title != "Bob the fox" || bob.Workspace != filepath.Join(folder, "bob") || |
| 64 | !slices.Equal(bob.Args, []string{"--acp", "--config", agentFile}) || filepath.Base(bob.Command) != "mm" { | 64 | !slices.Equal(bob.Args, []string{"--acp", "--config", agentFile}) || filepath.Base(bob.Command) != "mm" { |
| 65 | t.Fatalf("bob: %+v", bob) | 65 | t.Fatalf("bob: %+v", bob) |
| 66 | } | 66 | } |
modified
internal/app/sbxcreator.go +4 -1 | @@ -41,6 +41,9 @@ type SbxCheck struct { | ||
| 41 | 41 | HasKey bool `json:"hasKey"` |
| 42 | 42 | Name string `json:"name"` |
| 43 | 43 | AgentsFolder string `json:"agentsFolder"` |
| 44 | + // Taken is the names already used, by an agent, a folder of the agents' | |
| 45 | + // folder or a sandbox: the interface suggests a free one (issue #99). | |
| 46 | + Taken []string `json:"taken"` | |
| 44 | 47 | } |
| 45 | 48 | |
| 46 | 49 | // SbxCreateForm is the agent to create: its kind, its name (its folder's and |
| @@ -93,7 +96,7 @@ func (s *SbxCreatorService) Check(ctx context.Context, kindID string) (SbxCheck, | ||
| 93 | 96 | return SbxCheck{}, err |
| 94 | 97 | } |
| 95 | 98 | folder := s.Core.agentsFolder() |
| 96 | - check := SbxCheck{HasKey: hasKey, AgentsFolder: folder} | |
| 99 | + check := SbxCheck{HasKey: hasKey, AgentsFolder: folder, Taken: s.Core.takenNames(folder, sandboxes)} | |
| 97 | 100 | for index := 1; index < 100; index++ { |
| 98 | 101 | name := kind.ID |
| 99 | 102 | if index > 1 { |
| @@ -41,6 +41,9 @@ type SbxCheck struct { | |||
| 41 | HasKey bool `json:"hasKey"` | 41 | HasKey bool `json:"hasKey"` |
| 42 | Name string `json:"name"` | 42 | Name string `json:"name"` |
| 43 | AgentsFolder string `json:"agentsFolder"` | 43 | AgentsFolder string `json:"agentsFolder"` |
| 44 | + // Taken is the names already used, by an agent, a folder of the agents' | ||
| 45 | + // folder or a sandbox: the interface suggests a free one (issue #99). | ||
| 46 | + Taken []string `json:"taken"` | ||
| 44 | } | 47 | } |
| 45 | 48 | ||
| 46 | // SbxCreateForm is the agent to create: its kind, its name (its folder's and | 49 | // SbxCreateForm is the agent to create: its kind, its name (its folder's and |
| @@ -93,7 +96,7 @@ func (s *SbxCreatorService) Check(ctx context.Context, kindID string) (SbxCheck, | |||
| 93 | return SbxCheck{}, err | 96 | return SbxCheck{}, err |
| 94 | } | 97 | } |
| 95 | folder := s.Core.agentsFolder() | 98 | folder := s.Core.agentsFolder() |
| 96 | - check := SbxCheck{HasKey: hasKey, AgentsFolder: folder} | 99 | + check := SbxCheck{HasKey: hasKey, AgentsFolder: folder, Taken: s.Core.takenNames(folder, sandboxes)} |
| 97 | for index := 1; index < 100; index++ { | 100 | for index := 1; index < 100; index++ { |
| 98 | name := kind.ID | 101 | name := kind.ID |
| 99 | if index > 1 { | 102 | if index > 1 { |
modified
internal/app/sbxcreator_test.go +7 -1 | @@ -8,6 +8,7 @@ import ( | ||
| 8 | 8 | "fmt" |
| 9 | 9 | "os" |
| 10 | 10 | "path/filepath" |
| 11 | + "slices" | |
| 11 | 12 | "strings" |
| 12 | 13 | "testing" |
| 13 | 14 | |
| @@ -62,9 +63,14 @@ func TestCheckSuggestsAFreeNameAndTellsWhetherTheKeyIsStored(t *testing.T) { | ||
| 62 | 63 | "gemini": {Name: "gemini-2", AgentsFolder: folder}, |
| 63 | 64 | "codex": {Name: "codex-2", HasKey: true, AgentsFolder: folder}, |
| 64 | 65 | } { |
| 65 | - if got, err := service.Check(context.Background(), kind); err != nil || got != want { | |
| 66 | + got, err := service.Check(context.Background(), kind) | |
| 67 | + if err != nil || got.Name != want.Name || got.HasKey != want.HasKey || got.AgentsFolder != want.AgentsFolder { | |
| 66 | 68 | t.Errorf("%s: %+v %v, want %+v", kind, got, err, want) |
| 67 | 69 | } |
| 70 | + // Issue #99: the names taken by an agent, a folder or a sandbox. | |
| 71 | + if !slices.Equal(got.Taken, []string{"claude", "codex", "gemini"}) { | |
| 72 | + t.Errorf("%s: taken %v", kind, got.Taken) | |
| 73 | + } | |
| 68 | 74 | } |
| 69 | 75 | if _, err := service.Check(context.Background(), "nope"); err == nil { |
| 70 | 76 | t.Error("an unknown kind must be refused") |
| @@ -8,6 +8,7 @@ import ( | |||
| 8 | "fmt" | 8 | "fmt" |
| 9 | "os" | 9 | "os" |
| 10 | "path/filepath" | 10 | "path/filepath" |
| 11 | + "slices" | ||
| 11 | "strings" | 12 | "strings" |
| 12 | "testing" | 13 | "testing" |
| 13 | 14 | ||
| @@ -62,9 +63,14 @@ func TestCheckSuggestsAFreeNameAndTellsWhetherTheKeyIsStored(t *testing.T) { | |||
| 62 | "gemini": {Name: "gemini-2", AgentsFolder: folder}, | 63 | "gemini": {Name: "gemini-2", AgentsFolder: folder}, |
| 63 | "codex": {Name: "codex-2", HasKey: true, AgentsFolder: folder}, | 64 | "codex": {Name: "codex-2", HasKey: true, AgentsFolder: folder}, |
| 64 | } { | 65 | } { |
| 65 | - if got, err := service.Check(context.Background(), kind); err != nil || got != want { | 66 | + got, err := service.Check(context.Background(), kind) |
| 67 | + if err != nil || got.Name != want.Name || got.HasKey != want.HasKey || got.AgentsFolder != want.AgentsFolder { | ||
| 66 | t.Errorf("%s: %+v %v, want %+v", kind, got, err, want) | 68 | t.Errorf("%s: %+v %v, want %+v", kind, got, err, want) |
| 67 | } | 69 | } |
| 70 | + // Issue #99: the names taken by an agent, a folder or a sandbox. | ||
| 71 | + if !slices.Equal(got.Taken, []string{"claude", "codex", "gemini"}) { | ||
| 72 | + t.Errorf("%s: taken %v", kind, got.Taken) | ||
| 73 | + } | ||
| 68 | } | 74 | } |
| 69 | if _, err := service.Check(context.Background(), "nope"); err == nil { | 75 | if _, err := service.Check(context.Background(), "nope"); err == nil { |
| 70 | t.Error("an unknown kind must be refused") | 76 | t.Error("an unknown kind must be refused") |
modified
internal/config/config.go +28 -1 | @@ -78,6 +78,14 @@ type Limits struct { | ||
| 78 | 78 | MaxAgentHandoffs int |
| 79 | 79 | } |
| 80 | 80 | |
| 81 | +// LogoPrefix starts an agent icon that is a logo Sidekicks ships | |
| 82 | +// (issue #100): icon: "logo:claude". | |
| 83 | +const LogoPrefix = "logo:" | |
| 84 | + | |
| 85 | +// LogoNames are the logos Sidekicks ships, the names icon: "logo:<name>" | |
| 86 | +// accepts; frontend/src/lib/logos.ts draws them (a test checks both lists). | |
| 87 | +var LogoNames = []string{"claude", "gemini", "openai", "mistral"} | |
| 88 | + | |
| 81 | 89 | // AgentToolNames are the tools Sidekicks can offer the agents, the names |
| 82 | 90 | // agentTools.offer accepts (issues #90 and #91). |
| 83 | 91 | var AgentToolNames = []string{"memory_pressure", "about_sidekicks", "current_channel", "list_channels", "list_agents", "search_messages"} |
| @@ -345,7 +353,7 @@ func Parse(content []byte, path string) (*Config, error) { | ||
| 345 | 353 | } |
| 346 | 354 | cfg := raw.toConfig(filepath.Dir(path)) |
| 347 | 355 | cfg.Path = path |
| 348 | - cfg.Warnings = withLanguage(append(commandWarnings(cfg, &root, language), toolWarnings(cfg, &root, language)...), language) | |
| 356 | + cfg.Warnings = withLanguage(append(append(commandWarnings(cfg, &root, language), toolWarnings(cfg, &root, language)...), logoWarnings(cfg, &root, language)...), language) | |
| 349 | 357 | return cfg, nil |
| 350 | 358 | } |
| 351 | 359 | |
| @@ -547,6 +555,25 @@ func toolWarnings(cfg *Config, root *yaml.Node, language string) []Problem { | ||
| 547 | 555 | return warnings |
| 548 | 556 | } |
| 549 | 557 | |
| 558 | +// logoWarnings reports the icons "logo:<name>" whose logo Sidekicks does not | |
| 559 | +// ship: the agent then shows a letter. | |
| 560 | +func logoWarnings(cfg *Config, root *yaml.Node, language string) []Problem { | |
| 561 | + var warnings []Problem | |
| 562 | + for index, agent := range cfg.Agents { | |
| 563 | + name, ok := strings.CutPrefix(strings.TrimSpace(agent.Icon), LogoPrefix) | |
| 564 | + if !ok || slices.Contains(LogoNames, name) { | |
| 565 | + continue | |
| 566 | + } | |
| 567 | + path := []string{"agents", fmt.Sprint(index), "icon"} | |
| 568 | + line, column := position(root, path) | |
| 569 | + warnings = append(warnings, Problem{ | |
| 570 | + Line: line, Column: column, Path: displayPath(path), Warning: true, | |
| 571 | + Message: message(language, msgUnknownLogo, name, strings.Join(LogoNames, ", ")), | |
| 572 | + }) | |
| 573 | + } | |
| 574 | + return warnings | |
| 575 | +} | |
| 576 | + | |
| 550 | 577 | func commandExists(command string) bool { |
| 551 | 578 | if filepath.IsAbs(command) { |
| 552 | 579 | info, err := os.Stat(command) |
| @@ -78,6 +78,14 @@ type Limits struct { | |||
| 78 | MaxAgentHandoffs int | 78 | MaxAgentHandoffs int |
| 79 | } | 79 | } |
| 80 | 80 | ||
| 81 | +// LogoPrefix starts an agent icon that is a logo Sidekicks ships | ||
| 82 | +// (issue #100): icon: "logo:claude". | ||
| 83 | +const LogoPrefix = "logo:" | ||
| 84 | + | ||
| 85 | +// LogoNames are the logos Sidekicks ships, the names icon: "logo:<name>" | ||
| 86 | +// accepts; frontend/src/lib/logos.ts draws them (a test checks both lists). | ||
| 87 | +var LogoNames = []string{"claude", "gemini", "openai", "mistral"} | ||
| 88 | + | ||
| 81 | // AgentToolNames are the tools Sidekicks can offer the agents, the names | 89 | // AgentToolNames are the tools Sidekicks can offer the agents, the names |
| 82 | // agentTools.offer accepts (issues #90 and #91). | 90 | // agentTools.offer accepts (issues #90 and #91). |
| 83 | var AgentToolNames = []string{"memory_pressure", "about_sidekicks", "current_channel", "list_channels", "list_agents", "search_messages"} | 91 | var AgentToolNames = []string{"memory_pressure", "about_sidekicks", "current_channel", "list_channels", "list_agents", "search_messages"} |
| @@ -345,7 +353,7 @@ func Parse(content []byte, path string) (*Config, error) { | |||
| 345 | } | 353 | } |
| 346 | cfg := raw.toConfig(filepath.Dir(path)) | 354 | cfg := raw.toConfig(filepath.Dir(path)) |
| 347 | cfg.Path = path | 355 | cfg.Path = path |
| 348 | - cfg.Warnings = withLanguage(append(commandWarnings(cfg, &root, language), toolWarnings(cfg, &root, language)...), language) | 356 | + cfg.Warnings = withLanguage(append(append(commandWarnings(cfg, &root, language), toolWarnings(cfg, &root, language)...), logoWarnings(cfg, &root, language)...), language) |
| 349 | return cfg, nil | 357 | return cfg, nil |
| 350 | } | 358 | } |
| 351 | 359 | ||
| @@ -547,6 +555,25 @@ func toolWarnings(cfg *Config, root *yaml.Node, language string) []Problem { | |||
| 547 | return warnings | 555 | return warnings |
| 548 | } | 556 | } |
| 549 | 557 | ||
| 558 | +// logoWarnings reports the icons "logo:<name>" whose logo Sidekicks does not | ||
| 559 | +// ship: the agent then shows a letter. | ||
| 560 | +func logoWarnings(cfg *Config, root *yaml.Node, language string) []Problem { | ||
| 561 | + var warnings []Problem | ||
| 562 | + for index, agent := range cfg.Agents { | ||
| 563 | + name, ok := strings.CutPrefix(strings.TrimSpace(agent.Icon), LogoPrefix) | ||
| 564 | + if !ok || slices.Contains(LogoNames, name) { | ||
| 565 | + continue | ||
| 566 | + } | ||
| 567 | + path := []string{"agents", fmt.Sprint(index), "icon"} | ||
| 568 | + line, column := position(root, path) | ||
| 569 | + warnings = append(warnings, Problem{ | ||
| 570 | + Line: line, Column: column, Path: displayPath(path), Warning: true, | ||
| 571 | + Message: message(language, msgUnknownLogo, name, strings.Join(LogoNames, ", ")), | ||
| 572 | + }) | ||
| 573 | + } | ||
| 574 | + return warnings | ||
| 575 | +} | ||
| 576 | + | ||
| 550 | func commandExists(command string) bool { | 577 | func commandExists(command string) bool { |
| 551 | if filepath.IsAbs(command) { | 578 | if filepath.IsAbs(command) { |
| 552 | info, err := os.Stat(command) | 579 | info, err := os.Stat(command) |
modified
internal/config/config_test.go +29 -0 | @@ -8,6 +8,8 @@ import ( | ||
| 8 | 8 | "fmt" |
| 9 | 9 | "os" |
| 10 | 10 | "path/filepath" |
| 11 | + "regexp" | |
| 12 | + "slices" | |
| 11 | 13 | "strings" |
| 12 | 14 | "testing" |
| 13 | 15 | "time" |
| @@ -635,3 +637,30 @@ func TestTheAgentsFolderIsTheDocumentsFolderByDefault(t *testing.T) { | ||
| 635 | 637 | t.Error("an empty agentsFolder must be refused") |
| 636 | 638 | } |
| 637 | 639 | } |
| 640 | + | |
| 641 | +// Issue #100: icon: "logo:<name>" names a logo Sidekicks ships; another | |
| 642 | +// name is a warning (the agent shows a letter). | |
| 643 | +func TestAnUnknownLogoIsAWarning(t *testing.T) { | |
| 644 | + cfg, err := parse(t, "version: 1\nagents:\n - name: claude\n icon: logo:claude\n command: sh\n - name: codex\n icon: logo:nope\n command: sh\n") | |
| 645 | + if err != nil { | |
| 646 | + t.Fatal(err) | |
| 647 | + } | |
| 648 | + if len(cfg.Warnings) != 1 || cfg.Warnings[0].Path != "agents[1].icon" || cfg.Warnings[0].Line != 7 || !strings.Contains(cfg.Warnings[0].Message, `no logo "nope"`) { | |
| 649 | + t.Fatalf("want one warning on agents[1].icon, got %+v", cfg.Warnings) | |
| 650 | + } | |
| 651 | +} | |
| 652 | + | |
| 653 | +// The logos frontend/src/lib/logos.ts draws are the ones LogoNames accepts. | |
| 654 | +func TestTheLogosOfTheInterfaceAreTheAcceptedOnes(t *testing.T) { | |
| 655 | + content, err := os.ReadFile(filepath.Join("..", "..", "frontend", "src", "lib", "logos.ts")) | |
| 656 | + if err != nil { | |
| 657 | + t.Fatal(err) | |
| 658 | + } | |
| 659 | + var drawn []string | |
| 660 | + for _, match := range regexp.MustCompile(`(?m)^ ([a-z]+): \{$`).FindAllStringSubmatch(string(content), -1) { | |
| 661 | + drawn = append(drawn, match[1]) | |
| 662 | + } | |
| 663 | + if !slices.Equal(drawn, config.LogoNames) { | |
| 664 | + t.Fatalf("logos.ts draws %v, LogoNames is %v", drawn, config.LogoNames) | |
| 665 | + } | |
| 666 | +} | |
| @@ -8,6 +8,8 @@ import ( | |||
| 8 | "fmt" | 8 | "fmt" |
| 9 | "os" | 9 | "os" |
| 10 | "path/filepath" | 10 | "path/filepath" |
| 11 | + "regexp" | ||
| 12 | + "slices" | ||
| 11 | "strings" | 13 | "strings" |
| 12 | "testing" | 14 | "testing" |
| 13 | "time" | 15 | "time" |
| @@ -635,3 +637,30 @@ func TestTheAgentsFolderIsTheDocumentsFolderByDefault(t *testing.T) { | |||
| 635 | t.Error("an empty agentsFolder must be refused") | 637 | t.Error("an empty agentsFolder must be refused") |
| 636 | } | 638 | } |
| 637 | } | 639 | } |
| 640 | + | ||
| 641 | +// Issue #100: icon: "logo:<name>" names a logo Sidekicks ships; another | ||
| 642 | +// name is a warning (the agent shows a letter). | ||
| 643 | +func TestAnUnknownLogoIsAWarning(t *testing.T) { | ||
| 644 | + cfg, err := parse(t, "version: 1\nagents:\n - name: claude\n icon: logo:claude\n command: sh\n - name: codex\n icon: logo:nope\n command: sh\n") | ||
| 645 | + if err != nil { | ||
| 646 | + t.Fatal(err) | ||
| 647 | + } | ||
| 648 | + if len(cfg.Warnings) != 1 || cfg.Warnings[0].Path != "agents[1].icon" || cfg.Warnings[0].Line != 7 || !strings.Contains(cfg.Warnings[0].Message, `no logo "nope"`) { | ||
| 649 | + t.Fatalf("want one warning on agents[1].icon, got %+v", cfg.Warnings) | ||
| 650 | + } | ||
| 651 | +} | ||
| 652 | + | ||
| 653 | +// The logos frontend/src/lib/logos.ts draws are the ones LogoNames accepts. | ||
| 654 | +func TestTheLogosOfTheInterfaceAreTheAcceptedOnes(t *testing.T) { | ||
| 655 | + content, err := os.ReadFile(filepath.Join("..", "..", "frontend", "src", "lib", "logos.ts")) | ||
| 656 | + if err != nil { | ||
| 657 | + t.Fatal(err) | ||
| 658 | + } | ||
| 659 | + var drawn []string | ||
| 660 | + for _, match := range regexp.MustCompile(`(?m)^ ([a-z]+): \{$`).FindAllStringSubmatch(string(content), -1) { | ||
| 661 | + drawn = append(drawn, match[1]) | ||
| 662 | + } | ||
| 663 | + if !slices.Equal(drawn, config.LogoNames) { | ||
| 664 | + t.Fatalf("logos.ts draws %v, LogoNames is %v", drawn, config.LogoNames) | ||
| 665 | + } | ||
| 666 | +} | ||
modified
internal/config/problems.go +3 -0 | @@ -91,6 +91,7 @@ const ( | ||
| 91 | 91 | msgUnknownMember = "unknownMember" // agent |
| 92 | 92 | msgCommandNotFound = "commandNotFound" // command, agent |
| 93 | 93 | msgUnknownTool = "unknownTool" // name, known names |
| 94 | + msgUnknownLogo = "unknownLogo" // name, known names | |
| 94 | 95 | msgAbsolutePath = "absolutePath" // value |
| 95 | 96 | msgTooLong = "tooLong" // maximum |
| 96 | 97 | msgEmpty = "empty" // — |
| @@ -115,6 +116,7 @@ var messages = map[string]map[string]string{ | ||
| 115 | 116 | msgUnknownMember: "aucun agent ne s'appelle « %s »", |
| 116 | 117 | msgCommandNotFound: "la commande « %s » de l'agent « %s » est introuvable ; installez-la ou corrigez le chemin", |
| 117 | 118 | msgUnknownTool: "aucun outil ne s'appelle « %s » ; outils connus : %s", |
| 119 | + msgUnknownLogo: "Sidekicks n'a pas de logo « %s » (l'agent montre une lettre) ; logos : %s", | |
| 118 | 120 | msgAbsolutePath: "« %s » doit être un chemin absolu (commençant par /)", |
| 119 | 121 | msgTooLong: "texte trop long : %d caractères au maximum", |
| 120 | 122 | msgEmpty: "la valeur ne peut pas être vide", |
| @@ -137,6 +139,7 @@ var messages = map[string]map[string]string{ | ||
| 137 | 139 | msgUnknownMember: "no agent is called \"%s\"", |
| 138 | 140 | msgCommandNotFound: "the command \"%s\" of agent \"%s\" cannot be found; install it or fix the path", |
| 139 | 141 | msgUnknownTool: "no tool is called \"%s\"; the tools are: %s", |
| 142 | + msgUnknownLogo: "Sidekicks has no logo \"%s\" (the agent shows a letter); the logos are: %s", | |
| 140 | 143 | msgAbsolutePath: "\"%s\" must be an absolute path (starting with /)", |
| 141 | 144 | msgTooLong: "text too long: %d characters at most", |
| 142 | 145 | msgEmpty: "the value cannot be empty", |
| @@ -91,6 +91,7 @@ const ( | |||
| 91 | msgUnknownMember = "unknownMember" // agent | 91 | msgUnknownMember = "unknownMember" // agent |
| 92 | msgCommandNotFound = "commandNotFound" // command, agent | 92 | msgCommandNotFound = "commandNotFound" // command, agent |
| 93 | msgUnknownTool = "unknownTool" // name, known names | 93 | msgUnknownTool = "unknownTool" // name, known names |
| 94 | + msgUnknownLogo = "unknownLogo" // name, known names | ||
| 94 | msgAbsolutePath = "absolutePath" // value | 95 | msgAbsolutePath = "absolutePath" // value |
| 95 | msgTooLong = "tooLong" // maximum | 96 | msgTooLong = "tooLong" // maximum |
| 96 | msgEmpty = "empty" // — | 97 | msgEmpty = "empty" // — |
| @@ -115,6 +116,7 @@ var messages = map[string]map[string]string{ | |||
| 115 | msgUnknownMember: "aucun agent ne s'appelle « %s »", | 116 | msgUnknownMember: "aucun agent ne s'appelle « %s »", |
| 116 | msgCommandNotFound: "la commande « %s » de l'agent « %s » est introuvable ; installez-la ou corrigez le chemin", | 117 | msgCommandNotFound: "la commande « %s » de l'agent « %s » est introuvable ; installez-la ou corrigez le chemin", |
| 117 | msgUnknownTool: "aucun outil ne s'appelle « %s » ; outils connus : %s", | 118 | msgUnknownTool: "aucun outil ne s'appelle « %s » ; outils connus : %s", |
| 119 | + msgUnknownLogo: "Sidekicks n'a pas de logo « %s » (l'agent montre une lettre) ; logos : %s", | ||
| 118 | msgAbsolutePath: "« %s » doit être un chemin absolu (commençant par /)", | 120 | msgAbsolutePath: "« %s » doit être un chemin absolu (commençant par /)", |
| 119 | msgTooLong: "texte trop long : %d caractères au maximum", | 121 | msgTooLong: "texte trop long : %d caractères au maximum", |
| 120 | msgEmpty: "la valeur ne peut pas être vide", | 122 | msgEmpty: "la valeur ne peut pas être vide", |
| @@ -137,6 +139,7 @@ var messages = map[string]map[string]string{ | |||
| 137 | msgUnknownMember: "no agent is called \"%s\"", | 139 | msgUnknownMember: "no agent is called \"%s\"", |
| 138 | msgCommandNotFound: "the command \"%s\" of agent \"%s\" cannot be found; install it or fix the path", | 140 | msgCommandNotFound: "the command \"%s\" of agent \"%s\" cannot be found; install it or fix the path", |
| 139 | msgUnknownTool: "no tool is called \"%s\"; the tools are: %s", | 141 | msgUnknownTool: "no tool is called \"%s\"; the tools are: %s", |
| 142 | + msgUnknownLogo: "Sidekicks has no logo \"%s\" (the agent shows a letter); the logos are: %s", | ||
| 140 | msgAbsolutePath: "\"%s\" must be an absolute path (starting with /)", | 143 | msgAbsolutePath: "\"%s\" must be an absolute path (starting with /)", |
| 141 | msgTooLong: "text too long: %d characters at most", | 144 | msgTooLong: "text too long: %d characters at most", |
| 142 | msgEmpty: "the value cannot be empty", | 145 | msgEmpty: "the value cannot be empty", |
modified
internal/creator/creator_test.go +9 -4 | @@ -89,13 +89,17 @@ func begin(t *testing.T, options creator.Options, name string) *creator.Session | ||
| 89 | 89 | if view.Form == nil || len(view.Form.Fields) != 2 || view.Form.Fields[0].Name != "provider" || view.Form.Fields[1].Name != "name" { |
| 90 | 90 | t.Fatalf("first view: %+v", view) |
| 91 | 91 | } |
| 92 | - if len(view.Messages) == 0 || !strings.Contains(strings.Join(view.Messages, "\n"), "args=--acp-create --project yes --output .mm/agent.yaml") { | |
| 93 | - t.Fatalf("messages: %q", view.Messages) | |
| 94 | - } | |
| 92 | + // A message mm sends just before a form may come with the next view: | |
| 93 | + // the SDK hands notifications and requests over on their own goroutines. | |
| 94 | + said := view.Messages | |
| 95 | 95 | view, err = session.Answer(context.Background(), acp.FormAnswer{Action: acp.FormAccept, Content: map[string]any{"provider": "llmman", "name": name}}) |
| 96 | 96 | if err != nil { |
| 97 | 97 | t.Fatal(err) |
| 98 | 98 | } |
| 99 | + said = append(said, view.Messages...) | |
| 100 | + if !strings.Contains(strings.Join(said, "\n"), "args=--acp-create --project yes --output .mm/agent.yaml") { | |
| 101 | + t.Fatalf("messages: %q", said) | |
| 102 | + } | |
| 99 | 103 | if !view.Written || view.Form != nil { |
| 100 | 104 | t.Fatalf("after the form: %+v", view) |
| 101 | 105 | } |
| @@ -211,7 +215,8 @@ func TestADeclinedFormEndsTheTurnWithMMsMessage(t *testing.T) { | ||
| 211 | 215 | if err != nil { |
| 212 | 216 | t.Fatal(err) |
| 213 | 217 | } |
| 214 | - if view.Form != nil || view.Written || len(view.Messages) != 1 || !strings.HasPrefix(view.Messages[0], "Stopped") { | |
| 218 | + // The last message is mm's answer to the decline (its first one may come late, see begin). | |
| 219 | + if view.Form != nil || view.Written || len(view.Messages) == 0 || !strings.HasPrefix(view.Messages[len(view.Messages)-1], "Stopped") { | |
| 215 | 220 | t.Fatalf("view: %+v", view) |
| 216 | 221 | } |
| 217 | 222 | if _, err := session.Finish(context.Background(), "bob", creator.Local); !errors.Is(err, creator.ErrNotWritten) { |
| @@ -89,13 +89,17 @@ func begin(t *testing.T, options creator.Options, name string) *creator.Session | |||
| 89 | if view.Form == nil || len(view.Form.Fields) != 2 || view.Form.Fields[0].Name != "provider" || view.Form.Fields[1].Name != "name" { | 89 | if view.Form == nil || len(view.Form.Fields) != 2 || view.Form.Fields[0].Name != "provider" || view.Form.Fields[1].Name != "name" { |
| 90 | t.Fatalf("first view: %+v", view) | 90 | t.Fatalf("first view: %+v", view) |
| 91 | } | 91 | } |
| 92 | - if len(view.Messages) == 0 || !strings.Contains(strings.Join(view.Messages, "\n"), "args=--acp-create --project yes --output .mm/agent.yaml") { | 92 | + // A message mm sends just before a form may come with the next view: |
| 93 | - t.Fatalf("messages: %q", view.Messages) | 93 | + // the SDK hands notifications and requests over on their own goroutines. |
| 94 | - } | 94 | + said := view.Messages |
| 95 | view, err = session.Answer(context.Background(), acp.FormAnswer{Action: acp.FormAccept, Content: map[string]any{"provider": "llmman", "name": name}}) | 95 | view, err = session.Answer(context.Background(), acp.FormAnswer{Action: acp.FormAccept, Content: map[string]any{"provider": "llmman", "name": name}}) |
| 96 | if err != nil { | 96 | if err != nil { |
| 97 | t.Fatal(err) | 97 | t.Fatal(err) |
| 98 | } | 98 | } |
| 99 | + said = append(said, view.Messages...) | ||
| 100 | + if !strings.Contains(strings.Join(said, "\n"), "args=--acp-create --project yes --output .mm/agent.yaml") { | ||
| 101 | + t.Fatalf("messages: %q", said) | ||
| 102 | + } | ||
| 99 | if !view.Written || view.Form != nil { | 103 | if !view.Written || view.Form != nil { |
| 100 | t.Fatalf("after the form: %+v", view) | 104 | t.Fatalf("after the form: %+v", view) |
| 101 | } | 105 | } |
| @@ -211,7 +215,8 @@ func TestADeclinedFormEndsTheTurnWithMMsMessage(t *testing.T) { | |||
| 211 | if err != nil { | 215 | if err != nil { |
| 212 | t.Fatal(err) | 216 | t.Fatal(err) |
| 213 | } | 217 | } |
| 214 | - if view.Form != nil || view.Written || len(view.Messages) != 1 || !strings.HasPrefix(view.Messages[0], "Stopped") { | 218 | + // The last message is mm's answer to the decline (its first one may come late, see begin). |
| 219 | + if view.Form != nil || view.Written || len(view.Messages) == 0 || !strings.HasPrefix(view.Messages[len(view.Messages)-1], "Stopped") { | ||
| 215 | t.Fatalf("view: %+v", view) | 220 | t.Fatalf("view: %+v", view) |
| 216 | } | 221 | } |
| 217 | if _, err := session.Finish(context.Background(), "bob", creator.Local); !errors.Is(err, creator.ErrNotWritten) { | 222 | if _, err := session.Finish(context.Background(), "bob", creator.Local); !errors.Is(err, creator.ErrNotWritten) { |
modified
internal/events/events.go +20 -0 | @@ -21,6 +21,9 @@ const ( | ||
| 21 | 21 | AgentState = "agent:state" |
| 22 | 22 | // AgentLog: an agent wrote a line on its standard error. Payload: AgentLogPayload. |
| 23 | 23 | AgentLog = "agent:log" |
| 24 | + // AgentProgress: a starting agent moved to another step, or its sandbox | |
| 25 | + // or container printed a line (issue #98). Payload: AgentProgressPayload. | |
| 26 | + AgentProgress = "agent:progress" | |
| 24 | 27 | |
| 25 | 28 | // The channel events (milestones M2 and M3). Their payloads are defined in |
| 26 | 29 | // internal/channels, next to the types they carry. |
| @@ -100,6 +103,23 @@ type AgentLogPayload struct { | ||
| 100 | 103 | Line string `json:"line"` |
| 101 | 104 | } |
| 102 | 105 | |
| 106 | +// The steps of a start (issue #98), in order. | |
| 107 | +const ( | |
| 108 | + StepChecking = "checking" // its sandbox or container is looked at | |
| 109 | + StepPreparing = "preparing" // its sandbox or container is created or started | |
| 110 | + StepConnecting = "connecting" // its program starts and answers ACP's initialize | |
| 111 | +) | |
| 112 | + | |
| 113 | +// AgentProgressPayload is where the start of an agent is: its step, the last | |
| 114 | +// line printed (by sbx, docker or the agent), and when the start began | |
| 115 | +// (Unix milliseconds), for the time elapsed. | |
| 116 | +type AgentProgressPayload struct { | |
| 117 | + Agent string `json:"agent"` | |
| 118 | + Step string `json:"step"` | |
| 119 | + Line string `json:"line"` | |
| 120 | + Since int64 `json:"since"` | |
| 121 | +} | |
| 122 | + | |
| 103 | 123 | // Emitter sends an event to the interface. Implementations must be safe for |
| 104 | 124 | // concurrent use: agents report from their own goroutines. |
| 105 | 125 | type Emitter interface { |
| @@ -21,6 +21,9 @@ const ( | |||
| 21 | AgentState = "agent:state" | 21 | AgentState = "agent:state" |
| 22 | // AgentLog: an agent wrote a line on its standard error. Payload: AgentLogPayload. | 22 | // AgentLog: an agent wrote a line on its standard error. Payload: AgentLogPayload. |
| 23 | AgentLog = "agent:log" | 23 | AgentLog = "agent:log" |
| 24 | + // AgentProgress: a starting agent moved to another step, or its sandbox | ||
| 25 | + // or container printed a line (issue #98). Payload: AgentProgressPayload. | ||
| 26 | + AgentProgress = "agent:progress" | ||
| 24 | 27 | ||
| 25 | // The channel events (milestones M2 and M3). Their payloads are defined in | 28 | // The channel events (milestones M2 and M3). Their payloads are defined in |
| 26 | // internal/channels, next to the types they carry. | 29 | // internal/channels, next to the types they carry. |
| @@ -100,6 +103,23 @@ type AgentLogPayload struct { | |||
| 100 | Line string `json:"line"` | 103 | Line string `json:"line"` |
| 101 | } | 104 | } |
| 102 | 105 | ||
| 106 | +// The steps of a start (issue #98), in order. | ||
| 107 | +const ( | ||
| 108 | + StepChecking = "checking" // its sandbox or container is looked at | ||
| 109 | + StepPreparing = "preparing" // its sandbox or container is created or started | ||
| 110 | + StepConnecting = "connecting" // its program starts and answers ACP's initialize | ||
| 111 | +) | ||
| 112 | + | ||
| 113 | +// AgentProgressPayload is where the start of an agent is: its step, the last | ||
| 114 | +// line printed (by sbx, docker or the agent), and when the start began | ||
| 115 | +// (Unix milliseconds), for the time elapsed. | ||
| 116 | +type AgentProgressPayload struct { | ||
| 117 | + Agent string `json:"agent"` | ||
| 118 | + Step string `json:"step"` | ||
| 119 | + Line string `json:"line"` | ||
| 120 | + Since int64 `json:"since"` | ||
| 121 | +} | ||
| 122 | + | ||
| 103 | // Emitter sends an event to the interface. Implementations must be safe for | 123 | // Emitter sends an event to the interface. Implementations must be safe for |
| 104 | // concurrent use: agents report from their own goroutines. | 124 | // concurrent use: agents report from their own goroutines. |
| 105 | type Emitter interface { | 125 | type Emitter interface { |
modified
internal/sbxcreate/sbxcreate.go +7 -5 | @@ -36,7 +36,9 @@ type Binding struct { | ||
| 36 | 36 | type Kind struct { |
| 37 | 37 | ID string `json:"id"` |
| 38 | 38 | Title string `json:"title"` |
| 39 | - Icon string `json:"icon"` | |
| 39 | + // Icon is the agent's default icon: its brand's logo ("logo:<name>", | |
| 40 | + // issue #100). | |
| 41 | + Icon string `json:"icon"` | |
| 40 | 42 | // Agent is the sbx agent of the sandbox ("agent:"), Kit its kit. |
| 41 | 43 | Agent string `json:"agent"` |
| 42 | 44 | Kit string `json:"kit"` |
| @@ -54,7 +56,7 @@ type Kind struct { | ||
| 54 | 56 | // one more entry here. |
| 55 | 57 | var Catalogue = []Kind{ |
| 56 | 58 | { |
| 57 | - ID: "claude", Title: "Claude", Icon: "📙", | |
| 59 | + ID: "claude", Title: "Claude", Icon: "logo:claude", | |
| 58 | 60 | Agent: "claude", Kit: "docker.io/sbx/claude-acp:latest", Program: "claude-agent-acp", |
| 59 | 61 | Service: "anthropic", KeyURL: "https://console.anthropic.com/settings/keys", |
| 60 | 62 | Bindings: Binding{APIKey: []string{"api.anthropic.com", "console.anthropic.com"}}, |
| @@ -62,7 +64,7 @@ var Catalogue = []Kind{ | ||
| 62 | 64 | { |
| 63 | 65 | // Gemini through Google Antigravity (agy), whose kit replaces Docker's |
| 64 | 66 | // deprecated gemini-kit; `agy acp` serves ACP. |
| 65 | - ID: "gemini", Title: "Gemini", Icon: "📘", | |
| 67 | + ID: "gemini", Title: "Gemini", Icon: "logo:gemini", | |
| 66 | 68 | Agent: "antigravity", Kit: "docker.io/sbx/antigravity:latest", Program: "agy acp", |
| 67 | 69 | Service: "google", KeyURL: "https://aistudio.google.com/apikey", |
| 68 | 70 | Bindings: Binding{ |
| @@ -71,7 +73,7 @@ var Catalogue = []Kind{ | ||
| 71 | 73 | }, |
| 72 | 74 | }, |
| 73 | 75 | { |
| 74 | - ID: "codex", Title: "Codex", Icon: "📗", | |
| 76 | + ID: "codex", Title: "Codex", Icon: "logo:openai", | |
| 75 | 77 | Agent: "codex", Kit: "docker.io/sbx/codex-acp:latest", Program: "codex-acp", |
| 76 | 78 | Service: "openai", KeyURL: "https://platform.openai.com/api-keys", |
| 77 | 79 | Bindings: Binding{APIKey: []string{"api.openai.com", "openai.com"}, OAuth: []string{"auth.openai.com", "chatgpt.com"}}, |
| @@ -79,7 +81,7 @@ var Catalogue = []Kind{ | ||
| 79 | 81 | { |
| 80 | 82 | // Mistral Vibe (issue #86): the kit installs mistral-vibe, whose |
| 81 | 83 | // vibe-acp serves ACP; the key is injected for api.mistral.ai only. |
| 82 | - ID: "vibe", Title: "Vibe", Icon: "🟧", | |
| 84 | + ID: "vibe", Title: "Vibe", Icon: "logo:mistral", | |
| 83 | 85 | Agent: "vibe", Kit: "docker.io/sbx/vibe-kit:latest", Program: "vibe-acp", |
| 84 | 86 | Service: "mistral", KeyURL: "https://console.mistral.ai/api-keys", |
| 85 | 87 | Bindings: Binding{APIKey: []string{"api.mistral.ai"}}, |
| @@ -36,7 +36,9 @@ type Binding struct { | |||
| 36 | type Kind struct { | 36 | type Kind struct { |
| 37 | ID string `json:"id"` | 37 | ID string `json:"id"` |
| 38 | Title string `json:"title"` | 38 | Title string `json:"title"` |
| 39 | - Icon string `json:"icon"` | 39 | + // Icon is the agent's default icon: its brand's logo ("logo:<name>", |
| 40 | + // issue #100). | ||
| 41 | + Icon string `json:"icon"` | ||
| 40 | // Agent is the sbx agent of the sandbox ("agent:"), Kit its kit. | 42 | // Agent is the sbx agent of the sandbox ("agent:"), Kit its kit. |
| 41 | Agent string `json:"agent"` | 43 | Agent string `json:"agent"` |
| 42 | Kit string `json:"kit"` | 44 | Kit string `json:"kit"` |
| @@ -54,7 +56,7 @@ type Kind struct { | |||
| 54 | // one more entry here. | 56 | // one more entry here. |
| 55 | var Catalogue = []Kind{ | 57 | var Catalogue = []Kind{ |
| 56 | { | 58 | { |
| 57 | - ID: "claude", Title: "Claude", Icon: "📙", | 59 | + ID: "claude", Title: "Claude", Icon: "logo:claude", |
| 58 | Agent: "claude", Kit: "docker.io/sbx/claude-acp:latest", Program: "claude-agent-acp", | 60 | Agent: "claude", Kit: "docker.io/sbx/claude-acp:latest", Program: "claude-agent-acp", |
| 59 | Service: "anthropic", KeyURL: "https://console.anthropic.com/settings/keys", | 61 | Service: "anthropic", KeyURL: "https://console.anthropic.com/settings/keys", |
| 60 | Bindings: Binding{APIKey: []string{"api.anthropic.com", "console.anthropic.com"}}, | 62 | Bindings: Binding{APIKey: []string{"api.anthropic.com", "console.anthropic.com"}}, |
| @@ -62,7 +64,7 @@ var Catalogue = []Kind{ | |||
| 62 | { | 64 | { |
| 63 | // Gemini through Google Antigravity (agy), whose kit replaces Docker's | 65 | // Gemini through Google Antigravity (agy), whose kit replaces Docker's |
| 64 | // deprecated gemini-kit; `agy acp` serves ACP. | 66 | // deprecated gemini-kit; `agy acp` serves ACP. |
| 65 | - ID: "gemini", Title: "Gemini", Icon: "📘", | 67 | + ID: "gemini", Title: "Gemini", Icon: "logo:gemini", |
| 66 | Agent: "antigravity", Kit: "docker.io/sbx/antigravity:latest", Program: "agy acp", | 68 | Agent: "antigravity", Kit: "docker.io/sbx/antigravity:latest", Program: "agy acp", |
| 67 | Service: "google", KeyURL: "https://aistudio.google.com/apikey", | 69 | Service: "google", KeyURL: "https://aistudio.google.com/apikey", |
| 68 | Bindings: Binding{ | 70 | Bindings: Binding{ |
| @@ -71,7 +73,7 @@ var Catalogue = []Kind{ | |||
| 71 | }, | 73 | }, |
| 72 | }, | 74 | }, |
| 73 | { | 75 | { |
| 74 | - ID: "codex", Title: "Codex", Icon: "📗", | 76 | + ID: "codex", Title: "Codex", Icon: "logo:openai", |
| 75 | Agent: "codex", Kit: "docker.io/sbx/codex-acp:latest", Program: "codex-acp", | 77 | Agent: "codex", Kit: "docker.io/sbx/codex-acp:latest", Program: "codex-acp", |
| 76 | Service: "openai", KeyURL: "https://platform.openai.com/api-keys", | 78 | Service: "openai", KeyURL: "https://platform.openai.com/api-keys", |
| 77 | Bindings: Binding{APIKey: []string{"api.openai.com", "openai.com"}, OAuth: []string{"auth.openai.com", "chatgpt.com"}}, | 79 | Bindings: Binding{APIKey: []string{"api.openai.com", "openai.com"}, OAuth: []string{"auth.openai.com", "chatgpt.com"}}, |
| @@ -79,7 +81,7 @@ var Catalogue = []Kind{ | |||
| 79 | { | 81 | { |
| 80 | // Mistral Vibe (issue #86): the kit installs mistral-vibe, whose | 82 | // Mistral Vibe (issue #86): the kit installs mistral-vibe, whose |
| 81 | // vibe-acp serves ACP; the key is injected for api.mistral.ai only. | 83 | // vibe-acp serves ACP; the key is injected for api.mistral.ai only. |
| 82 | - ID: "vibe", Title: "Vibe", Icon: "🟧", | 84 | + ID: "vibe", Title: "Vibe", Icon: "logo:mistral", |
| 83 | Agent: "vibe", Kit: "docker.io/sbx/vibe-kit:latest", Program: "vibe-acp", | 85 | Agent: "vibe", Kit: "docker.io/sbx/vibe-kit:latest", Program: "vibe-acp", |
| 84 | Service: "mistral", KeyURL: "https://console.mistral.ai/api-keys", | 86 | Service: "mistral", KeyURL: "https://console.mistral.ai/api-keys", |
| 85 | Bindings: Binding{APIKey: []string{"api.mistral.ai"}}, | 87 | Bindings: Binding{APIKey: []string{"api.mistral.ai"}}, |
modified
main.go +1 -0 | @@ -45,6 +45,7 @@ func init() { | ||
| 45 | 45 | application.RegisterEvent[events.ConfigChangedPayload](events.ConfigChanged) |
| 46 | 46 | application.RegisterEvent[events.AgentStatePayload](events.AgentState) |
| 47 | 47 | application.RegisterEvent[events.AgentLogPayload](events.AgentLog) |
| 48 | + application.RegisterEvent[events.AgentProgressPayload](events.AgentProgress) | |
| 48 | 49 | application.RegisterEvent[channels.ListPayload](events.ChannelsChanged) |
| 49 | 50 | application.RegisterEvent[channels.MessagePayload](events.MessageUpdated) |
| 50 | 51 | application.RegisterEvent[channels.DeltaPayload](events.MessageDelta) |
| @@ -45,6 +45,7 @@ func init() { | |||
| 45 | application.RegisterEvent[events.ConfigChangedPayload](events.ConfigChanged) | 45 | application.RegisterEvent[events.ConfigChangedPayload](events.ConfigChanged) |
| 46 | application.RegisterEvent[events.AgentStatePayload](events.AgentState) | 46 | application.RegisterEvent[events.AgentStatePayload](events.AgentState) |
| 47 | application.RegisterEvent[events.AgentLogPayload](events.AgentLog) | 47 | application.RegisterEvent[events.AgentLogPayload](events.AgentLog) |
| 48 | + application.RegisterEvent[events.AgentProgressPayload](events.AgentProgress) | ||
| 48 | application.RegisterEvent[channels.ListPayload](events.ChannelsChanged) | 49 | application.RegisterEvent[channels.ListPayload](events.ChannelsChanged) |
| 49 | application.RegisterEvent[channels.MessagePayload](events.MessageUpdated) | 50 | application.RegisterEvent[channels.MessagePayload](events.MessageUpdated) |
| 50 | application.RegisterEvent[channels.DeltaPayload](events.MessageDelta) | 51 | application.RegisterEvent[channels.DeltaPayload](events.MessageDelta) |
modified
schema/config.schema.json +1 -1 | @@ -148,7 +148,7 @@ | ||
| 148 | 148 | "minLength": 1 |
| 149 | 149 | }, |
| 150 | 150 | "icon": { |
| 151 | - "description": "An emoji, or a letter shown in a coloured circle, next to the agent. Defaults to the first letter of the title in a circle.", | |
| 151 | + "description": "An emoji, a letter shown in a coloured circle, or a logo Sidekicks ships (logo:claude, logo:gemini, logo:openai, logo:mistral), next to the agent. Defaults to the first letter of the title in a circle.", | |
| 152 | 152 | "type": "string", |
| 153 | 153 | "maxLength": 16 |
| 154 | 154 | }, |
| @@ -148,7 +148,7 @@ | |||
| 148 | "minLength": 1 | 148 | "minLength": 1 |
| 149 | }, | 149 | }, |
| 150 | "icon": { | 150 | "icon": { |
| 151 | - "description": "An emoji, or a letter shown in a coloured circle, next to the agent. Defaults to the first letter of the title in a circle.", | 151 | + "description": "An emoji, a letter shown in a coloured circle, or a logo Sidekicks ships (logo:claude, logo:gemini, logo:openai, logo:mistral), next to the agent. Defaults to the first letter of the title in a circle.", |
| 152 | "type": "string", | 152 | "type": "string", |
| 153 | "maxLength": 16 | 153 | "maxLength": 16 |
| 154 | }, | 154 | }, |