bots-garden/sidekickspublic Fork
⑂ 1ef0bf4
Commits
⬇ Clone ▾
git clone https://git.rickub.com/bots-garden/sidekicks.git
git clone ssh://git@rickub.com/bots-garden/sidekicks.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

Download ZIP

#91 Agent à redémarrer quand ses outils changent ; outils à rappeler à chaque fois ; brouillon gardé par conversation

- agentTools modifié : un agent en marche dont les outils proposés diffèrent
  est marqué « à redémarrer » (il gardait les outils de son démarrage).
- Les descriptions des outils dont le résultat change demandent au modèle de
  les rappeler à chaque fois au lieu de réutiliser une réponse précédente.
- Le texte en cours de saisie est gardé par channel ou conversation et rendu
  au retour (tant que Sidekicks tourne).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
k33g committed 2026-11-11T01:12:07+01:00 Browse files
1ef0bf4 parent: 2ec3a89
modified docs/en/how-to/manage-channels.md +1 -0
@@ -74,6 +74,7 @@ An agent does not call itself, an agent that answers your message anyway is not
7474
7575 ## Variants
7676
77+- **Leave a message half written**: switch to another channel or conversation; when you come back, the text you were writing is still there, until you send it. Drafts are kept while Sidekicks runs, not after quitting.
7778 - **Fold the lists of the left panel**: click the heading **AGENTS** or **CHANNELS** to fold the list under it, again to unfold it. Folded, the heading still shows how many agents or channels there are and, in blue, the answers you have not read yet. Sidekicks remembers it at the next launch. ⌘N unfolds the channels to create one; **Add an agent** stays in the command palette (⌘K) and on ⇧⌘N.
7879 - **Channels from the configuration file**: channels declared under `channels:` are created at startup if they do not exist yet, with their agents; afterwards they are ordinary channels. Removing them from the file deletes nothing ([configuration reference](../reference/configuration.md)).
7980 - **Start again from an empty history, for every channel at once**: use the **Danger zone** ([Reset Sidekicks](reset-sidekicks.md)), or quit Sidekicks and delete the folder `sidekicks/data/<…>` of your configuration (its location is in the [reference](../reference/agents-and-events.md#history)). The channels declared in the file come back at the next launch, empty.
@@ -74,6 +74,7 @@ An agent does not call itself, an agent that answers your message anyway is not
74 74
75 ## Variants75 ## Variants
76 76
77+- **Leave a message half written**: switch to another channel or conversation; when you come back, the text you were writing is still there, until you send it. Drafts are kept while Sidekicks runs, not after quitting.
77 - **Fold the lists of the left panel**: click the heading **AGENTS** or **CHANNELS** to fold the list under it, again to unfold it. Folded, the heading still shows how many agents or channels there are and, in blue, the answers you have not read yet. Sidekicks remembers it at the next launch. ⌘N unfolds the channels to create one; **Add an agent** stays in the command palette (⌘K) and on ⇧⌘N.78 - **Fold the lists of the left panel**: click the heading **AGENTS** or **CHANNELS** to fold the list under it, again to unfold it. Folded, the heading still shows how many agents or channels there are and, in blue, the answers you have not read yet. Sidekicks remembers it at the next launch. ⌘N unfolds the channels to create one; **Add an agent** stays in the command palette (⌘K) and on ⇧⌘N.
78 - **Channels from the configuration file**: channels declared under `channels:` are created at startup if they do not exist yet, with their agents; afterwards they are ordinary channels. Removing them from the file deletes nothing ([configuration reference](../reference/configuration.md)).79 - **Channels from the configuration file**: channels declared under `channels:` are created at startup if they do not exist yet, with their agents; afterwards they are ordinary channels. Removing them from the file deletes nothing ([configuration reference](../reference/configuration.md)).
79 - **Start again from an empty history, for every channel at once**: use the **Danger zone** ([Reset Sidekicks](reset-sidekicks.md)), or quit Sidekicks and delete the folder `sidekicks/data/<…>` of your configuration (its location is in the [reference](../reference/agents-and-events.md#history)). The channels declared in the file come back at the next launch, empty.80 - **Start again from an empty history, for every channel at once**: use the **Danger zone** ([Reset Sidekicks](reset-sidekicks.md)), or quit Sidekicks and delete the folder `sidekicks/data/<…>` of your configuration (its location is in the [reference](../reference/agents-and-events.md#history)). The channels declared in the file come back at the next launch, empty.
modified docs/en/how-to/use-sidekicks-tools-from-an-agent.md +2 -2
@@ -26,7 +26,7 @@ This guide shows how to let a mini-me agent (`mm`) call the tools Sidekicks offe
2626
2727 The call shows in its answer like any tool call (`client: memory_pressure`), and in its log (`[acp] client tools (meta): …` at start).
2828
29-A small model calls a tool more readily when its instructions name it: add to its `system:` a line such as "Call client_current_channel to know where you are and who is there."
29+A model may answer a question it was already asked from its earlier answer instead of calling the tool again; the descriptions of the tools whose result changes (memory, channels, agents, search) tell it to call again each time, and a small model follows that better when its instructions say it too. A small model also calls a tool more readily when its instructions name it: add to its `system:` a line such as "Call client_current_channel to know where you are and who is there."
3030
3131 ## Variants
3232
@@ -41,7 +41,7 @@ A small model calls a tool more readily when its instructions name it: add to it
4141 - list_agents
4242 ```
4343
44- then save and restart the agents (the tools are read when an agent starts). The editor suggests the names after `- `. An unknown name is shown as a warning.
44+ then save. The tools are read when an agent starts: a running agent whose tools change shows "restart to apply changes"; restart it. The editor suggests the names after `- `. An unknown name is shown as a warning.
4545 - **Keep an agent to its own channels**: `list_channels` and `search_messages` read every channel and direct conversation, not only the agent's. Leave them out of `offer` if that is not wanted.
4646
4747 - **`discovery: request`**: Sidekicks reads the agent's file (the one after `--config`) to know it, announces the tools only, and gives the list each time the agent opens a session. The file is read on this computer: an agent in a sandbox or a container must have it at the same path, which the assistant's sbx and Docker variants already require.
@@ -26,7 +26,7 @@ This guide shows how to let a mini-me agent (`mm`) call the tools Sidekicks offe
26 26
27 The call shows in its answer like any tool call (`client: memory_pressure`), and in its log (`[acp] client tools (meta): …` at start).27 The call shows in its answer like any tool call (`client: memory_pressure`), and in its log (`[acp] client tools (meta): …` at start).
28 28
29-A small model calls a tool more readily when its instructions name it: add to its `system:` a line such as "Call client_current_channel to know where you are and who is there."29+A model may answer a question it was already asked from its earlier answer instead of calling the tool again; the descriptions of the tools whose result changes (memory, channels, agents, search) tell it to call again each time, and a small model follows that better when its instructions say it too. A small model also calls a tool more readily when its instructions name it: add to its `system:` a line such as "Call client_current_channel to know where you are and who is there."
30 30
31 ## Variants31 ## Variants
32 32
@@ -41,7 +41,7 @@ A small model calls a tool more readily when its instructions name it: add to it
41 - list_agents41 - list_agents
42 ```42 ```
43 43
44- then save and restart the agents (the tools are read when an agent starts). The editor suggests the names after `- `. An unknown name is shown as a warning.44+ then save. The tools are read when an agent starts: a running agent whose tools change shows "restart to apply changes"; restart it. The editor suggests the names after `- `. An unknown name is shown as a warning.
45 - **Keep an agent to its own channels**: `list_channels` and `search_messages` read every channel and direct conversation, not only the agent's. Leave them out of `offer` if that is not wanted.45 - **Keep an agent to its own channels**: `list_channels` and `search_messages` read every channel and direct conversation, not only the agent's. Leave them out of `offer` if that is not wanted.
46 46
47 - **`discovery: request`**: Sidekicks reads the agent's file (the one after `--config`) to know it, announces the tools only, and gives the list each time the agent opens a session. The file is read on this computer: an agent in a sandbox or a container must have it at the same path, which the assistant's sbx and Docker variants already require.47 - **`discovery: request`**: Sidekicks reads the agent's file (the one after `--config`) to know it, announces the tools only, and gives the list each time the agent opens a session. The file is read on this computer: an agent in a sandbox or a container must have it at the same path, which the assistant's sbx and Docker variants already require.
modified docs/en/reference/configuration.md +1 -1
@@ -61,7 +61,7 @@ Unknown keys are **errors**, at every level: a misspelt `comand:` must be report
6161
6262 ### `agentTools`
6363
64-The tools Sidekicks offers the agents that can discover them: today, mini-me agents whose file has `acp.clientTools` ([Let an agent use Sidekicks' tools](../how-to/use-sidekicks-tools-from-an-agent.md)). Few ACP agents discover a client's tools; the others ignore them. Read when an agent starts: restart a running agent to apply a change.
64+The tools Sidekicks offers the agents that can discover them: today, mini-me agents whose file has `acp.clientTools` ([Let an agent use Sidekicks' tools](../how-to/use-sidekicks-tools-from-an-agent.md)). Few ACP agents discover a client's tools; the others ignore them. Read when an agent starts: after a change, a running agent whose tools differ shows "restart to apply changes" next to its name; restart it to apply.
6565
6666 | Key | Type | Default | Meaning |
6767 | --- | --- | --- | --- |
@@ -61,7 +61,7 @@ Unknown keys are **errors**, at every level: a misspelt `comand:` must be report
61 61
62 ### `agentTools`62 ### `agentTools`
63 63
64-The tools Sidekicks offers the agents that can discover them: today, mini-me agents whose file has `acp.clientTools` ([Let an agent use Sidekicks' tools](../how-to/use-sidekicks-tools-from-an-agent.md)). Few ACP agents discover a client's tools; the others ignore them. Read when an agent starts: restart a running agent to apply a change.64+The tools Sidekicks offers the agents that can discover them: today, mini-me agents whose file has `acp.clientTools` ([Let an agent use Sidekicks' tools](../how-to/use-sidekicks-tools-from-an-agent.md)). Few ACP agents discover a client's tools; the others ignore them. Read when an agent starts: after a change, a running agent whose tools differ shows "restart to apply changes" next to its name; restart it to apply.
65 65
66 | Key | Type | Default | Meaning |66 | Key | Type | Default | Meaning |
67 | --- | --- | --- | --- |67 | --- | --- | --- | --- |
modified docs/fr/how-to/gerer-les-channels.md +1 -0
@@ -74,6 +74,7 @@ Un agent ne s'appelle pas lui-même, un agent qui répond de toute façon à vot
7474
7575 ## Variantes
7676
77+- **Laisser un message à moitié écrit** : passez à un autre channel ou à une autre conversation ; quand vous revenez, le texte en cours est toujours là, jusqu'à ce que vous l'envoyiez. Les brouillons sont gardés tant que Sidekicks tourne, pas après l'avoir quitté.
7778 - **Replier les listes du panneau de gauche** : cliquez sur le titre **AGENTS** ou **CHANNELS** pour replier la liste, à nouveau pour la déplier. Repliée, le titre indique toujours combien il y a d'agents ou de channels et, en bleu, les réponses pas encore lues. Sidekicks s'en souvient au lancement suivant. ⌘N déplie les channels pour en créer un ; **Ajouter un agent** reste dans la palette de commandes (⌘K) et sur ⇧⌘N.
7879 - **Channels du fichier de configuration** : les channels déclarés sous `channels:` sont créés au démarrage s'ils n'existent pas encore, avec leurs agents ; ensuite ce sont des channels ordinaires. Les retirer du fichier ne supprime rien ([référence de la configuration](../reference/configuration.md)).
7980 - **Repartir d'un historique vide, pour tous les channels d'un coup** : utilisez la **Danger zone** ([Repartir de zéro](repartir-de-zero.md)), ou quittez Sidekicks et supprimez le dossier `sidekicks/data/<…>` de votre configuration (son emplacement est dans la [référence](../reference/agents-et-evenements.md#historique)). Les channels déclarés dans le fichier reviennent, vides, au lancement suivant.
@@ -74,6 +74,7 @@ Un agent ne s'appelle pas lui-même, un agent qui répond de toute façon à vot
74 74
75 ## Variantes75 ## Variantes
76 76
77+- **Laisser un message à moitié écrit** : passez à un autre channel ou à une autre conversation ; quand vous revenez, le texte en cours est toujours là, jusqu'à ce que vous l'envoyiez. Les brouillons sont gardés tant que Sidekicks tourne, pas après l'avoir quitté.
77 - **Replier les listes du panneau de gauche** : cliquez sur le titre **AGENTS** ou **CHANNELS** pour replier la liste, à nouveau pour la déplier. Repliée, le titre indique toujours combien il y a d'agents ou de channels et, en bleu, les réponses pas encore lues. Sidekicks s'en souvient au lancement suivant. ⌘N déplie les channels pour en créer un ; **Ajouter un agent** reste dans la palette de commandes (⌘K) et sur ⇧⌘N.78 - **Replier les listes du panneau de gauche** : cliquez sur le titre **AGENTS** ou **CHANNELS** pour replier la liste, à nouveau pour la déplier. Repliée, le titre indique toujours combien il y a d'agents ou de channels et, en bleu, les réponses pas encore lues. Sidekicks s'en souvient au lancement suivant. ⌘N déplie les channels pour en créer un ; **Ajouter un agent** reste dans la palette de commandes (⌘K) et sur ⇧⌘N.
78 - **Channels du fichier de configuration** : les channels déclarés sous `channels:` sont créés au démarrage s'ils n'existent pas encore, avec leurs agents ; ensuite ce sont des channels ordinaires. Les retirer du fichier ne supprime rien ([référence de la configuration](../reference/configuration.md)).79 - **Channels du fichier de configuration** : les channels déclarés sous `channels:` sont créés au démarrage s'ils n'existent pas encore, avec leurs agents ; ensuite ce sont des channels ordinaires. Les retirer du fichier ne supprime rien ([référence de la configuration](../reference/configuration.md)).
79 - **Repartir d'un historique vide, pour tous les channels d'un coup** : utilisez la **Danger zone** ([Repartir de zéro](repartir-de-zero.md)), ou quittez Sidekicks et supprimez le dossier `sidekicks/data/<…>` de votre configuration (son emplacement est dans la [référence](../reference/agents-et-evenements.md#historique)). Les channels déclarés dans le fichier reviennent, vides, au lancement suivant.80 - **Repartir d'un historique vide, pour tous les channels d'un coup** : utilisez la **Danger zone** ([Repartir de zéro](repartir-de-zero.md)), ou quittez Sidekicks et supprimez le dossier `sidekicks/data/<…>` de votre configuration (son emplacement est dans la [référence](../reference/agents-et-evenements.md#historique)). Les channels déclarés dans le fichier reviennent, vides, au lancement suivant.
modified docs/fr/how-to/utiliser-les-outils-de-sidekicks-depuis-un-agent.md +2 -2
@@ -26,7 +26,7 @@ Ce guide montre comment laisser un agent mini-me (`mm`) appeler les outils que S
2626
2727 L'appel s'affiche dans sa réponse comme tout appel d'outil (`client: memory_pressure`), et dans son journal (`[acp] client tools (meta): …` au démarrage).
2828
29-Un petit modèle appelle plus volontiers un outil que ses instructions nomment : ajoutez à son `system:` une ligne comme « Call client_current_channel to know where you are and who is there. »
29+Un modèle peut répondre à une question déjà posée avec sa réponse précédente au lieu de rappeler l'outil ; les descriptions des outils dont le résultat change (mémoire, channels, agents, recherche) lui demandent de le rappeler à chaque fois, et un petit modèle le fait mieux quand ses instructions le disent aussi. Un petit modèle appelle aussi plus volontiers un outil que ses instructions nomment : ajoutez à son `system:` une ligne comme « Call client_current_channel to know where you are and who is there. »
3030
3131 ## Variantes
3232
@@ -41,7 +41,7 @@ Un petit modèle appelle plus volontiers un outil que ses instructions nomment :
4141 - list_agents
4242 ```
4343
44- puis enregistrez et redémarrez les agents (les outils sont lus au démarrage d'un agent). L'éditeur propose les noms après `- `. Un nom inconnu s'affiche en avertissement.
44+ puis enregistrez. Les outils sont lus au démarrage d'un agent : un agent en marche dont les outils changent affiche « à redémarrer » ; redémarrez-le. L'éditeur propose les noms après `- `. Un nom inconnu s'affiche en avertissement.
4545 - **Cantonner un agent à ses propres channels** : `list_channels` et `search_messages` lisent tous les channels et conversations directes, pas seulement ceux de l'agent. Retirez-les d'`offer` si ce n'est pas souhaité.
4646
4747 - **`discovery: request`** : Sidekicks lit le fichier de l'agent (celui qui suit `--config`) pour le savoir, annonce seulement les outils, et donne la liste à chaque ouverture de session. Le fichier est lu sur cet ordinateur : un agent dans une sandbox ou un conteneur doit l'avoir au même chemin, ce que demandent déjà les variantes sbx et Docker de l'assistant.
@@ -26,7 +26,7 @@ Ce guide montre comment laisser un agent mini-me (`mm`) appeler les outils que S
26 26
27 L'appel s'affiche dans sa réponse comme tout appel d'outil (`client: memory_pressure`), et dans son journal (`[acp] client tools (meta): …` au démarrage).27 L'appel s'affiche dans sa réponse comme tout appel d'outil (`client: memory_pressure`), et dans son journal (`[acp] client tools (meta): …` au démarrage).
28 28
29-Un petit modèle appelle plus volontiers un outil que ses instructions nomment : ajoutez à son `system:` une ligne comme « Call client_current_channel to know where you are and who is there. »29+Un modèle peut répondre à une question déjà posée avec sa réponse précédente au lieu de rappeler l'outil ; les descriptions des outils dont le résultat change (mémoire, channels, agents, recherche) lui demandent de le rappeler à chaque fois, et un petit modèle le fait mieux quand ses instructions le disent aussi. Un petit modèle appelle aussi plus volontiers un outil que ses instructions nomment : ajoutez à son `system:` une ligne comme « Call client_current_channel to know where you are and who is there. »
30 30
31 ## Variantes31 ## Variantes
32 32
@@ -41,7 +41,7 @@ Un petit modèle appelle plus volontiers un outil que ses instructions nomment :
41 - list_agents41 - list_agents
42 ```42 ```
43 43
44- puis enregistrez et redémarrez les agents (les outils sont lus au démarrage d'un agent). L'éditeur propose les noms après `- `. Un nom inconnu s'affiche en avertissement.44+ puis enregistrez. Les outils sont lus au démarrage d'un agent : un agent en marche dont les outils changent affiche « à redémarrer » ; redémarrez-le. L'éditeur propose les noms après `- `. Un nom inconnu s'affiche en avertissement.
45 - **Cantonner un agent à ses propres channels** : `list_channels` et `search_messages` lisent tous les channels et conversations directes, pas seulement ceux de l'agent. Retirez-les d'`offer` si ce n'est pas souhaité.45 - **Cantonner un agent à ses propres channels** : `list_channels` et `search_messages` lisent tous les channels et conversations directes, pas seulement ceux de l'agent. Retirez-les d'`offer` si ce n'est pas souhaité.
46 46
47 - **`discovery: request`** : Sidekicks lit le fichier de l'agent (celui qui suit `--config`) pour le savoir, annonce seulement les outils, et donne la liste à chaque ouverture de session. Le fichier est lu sur cet ordinateur : un agent dans une sandbox ou un conteneur doit l'avoir au même chemin, ce que demandent déjà les variantes sbx et Docker de l'assistant.47 - **`discovery: request`** : Sidekicks lit le fichier de l'agent (celui qui suit `--config`) pour le savoir, annonce seulement les outils, et donne la liste à chaque ouverture de session. Le fichier est lu sur cet ordinateur : un agent dans une sandbox ou un conteneur doit l'avoir au même chemin, ce que demandent déjà les variantes sbx et Docker de l'assistant.
modified docs/fr/reference/configuration.md +1 -1
@@ -61,7 +61,7 @@ Les clés inconnues sont des **erreurs**, à tous les niveaux : une faute de fra
6161
6262 ### `agentTools`
6363
64-Les outils que Sidekicks propose aux agents capables de les découvrir : aujourd'hui, les agents mini-me dont le fichier contient `acp.clientTools` ([Laisser un agent utiliser les outils de Sidekicks](../how-to/utiliser-les-outils-de-sidekicks-depuis-un-agent.md)). Peu d'agents ACP découvrent les outils d'un client ; les autres les ignorent. Lu au démarrage d'un agent : redémarrez un agent en marche pour appliquer un changement.
64+Les outils que Sidekicks propose aux agents capables de les découvrir : aujourd'hui, les agents mini-me dont le fichier contient `acp.clientTools` ([Laisser un agent utiliser les outils de Sidekicks](../how-to/utiliser-les-outils-de-sidekicks-depuis-un-agent.md)). Peu d'agents ACP découvrent les outils d'un client ; les autres les ignorent. Lu au démarrage d'un agent : après un changement, un agent en marche dont les outils diffèrent affiche « à redémarrer » à côté de son nom ; redémarrez-le pour appliquer.
6565
6666 | Clé | Type | Défaut | Signification |
6767 | --- | --- | --- | --- |
@@ -61,7 +61,7 @@ Les clés inconnues sont des **erreurs**, à tous les niveaux : une faute de fra
61 61
62 ### `agentTools`62 ### `agentTools`
63 63
64-Les outils que Sidekicks propose aux agents capables de les découvrir : aujourd'hui, les agents mini-me dont le fichier contient `acp.clientTools` ([Laisser un agent utiliser les outils de Sidekicks](../how-to/utiliser-les-outils-de-sidekicks-depuis-un-agent.md)). Peu d'agents ACP découvrent les outils d'un client ; les autres les ignorent. Lu au démarrage d'un agent : redémarrez un agent en marche pour appliquer un changement.64+Les outils que Sidekicks propose aux agents capables de les découvrir : aujourd'hui, les agents mini-me dont le fichier contient `acp.clientTools` ([Laisser un agent utiliser les outils de Sidekicks](../how-to/utiliser-les-outils-de-sidekicks-depuis-un-agent.md)). Peu d'agents ACP découvrent les outils d'un client ; les autres les ignorent. Lu au démarrage d'un agent : après un changement, un agent en marche dont les outils diffèrent affiche « à redémarrer » à côté de son nom ; redémarrez-le pour appliquer.
65 65
66 | Clé | Type | Défaut | Signification |66 | Clé | Type | Défaut | Signification |
67 | --- | --- | --- | --- |67 | --- | --- | --- | --- |
modified frontend/src/lib/chat/Composer.svelte +9 -1
@@ -1,5 +1,6 @@
11 <!-- Copyright (c) 2026 Philippe Charrière — Sidekicks Source-Available License 1.0, see LICENSE -->
22 <script lang="ts">
3+ import { untrack } from 'svelte'
34 import { t } from '../i18n/index.svelte'
45 import { completeTrigger, createHistory, findTrigger, insertAt, type Trigger } from '../composer'
56 import type { Suggestion, Suggestions } from '../suggestions'
@@ -16,6 +17,8 @@
1617 onStop,
1718 onAttach,
1819 dropTarget,
20+ draft = '',
21+ onDraft = () => {},
1922 }: {
2023 placeholder: string
2124 busy?: boolean
@@ -32,9 +35,14 @@
3235 onAttach?: () => void
3336 /** The id of the composer as a drop target for files (Wails files:dropped). */
3437 dropTarget?: string
38+ /** The text being written when the composer was left, given back. */
39+ draft?: string
40+ /** Called with the text as it changes, to keep it as the draft. */
41+ onDraft?: (text: string) => void
3542 } = $props()
3643
37- let text = $state('')
44+ let text = $state(untrack(() => draft))
45+ $effect(() => onDraft(text))
3846 let textarea: HTMLTextAreaElement
3947 const history = createHistory()
4048
@@ -1,5 +1,6 @@
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+ import { untrack } from 'svelte'
3 import { t } from '../i18n/index.svelte'4 import { t } from '../i18n/index.svelte'
4 import { completeTrigger, createHistory, findTrigger, insertAt, type Trigger } from '../composer'5 import { completeTrigger, createHistory, findTrigger, insertAt, type Trigger } from '../composer'
5 import type { Suggestion, Suggestions } from '../suggestions'6 import type { Suggestion, Suggestions } from '../suggestions'
@@ -16,6 +17,8 @@
16 onStop,17 onStop,
17 onAttach,18 onAttach,
18 dropTarget,19 dropTarget,
20+ draft = '',
21+ onDraft = () => {},
19 }: {22 }: {
20 placeholder: string23 placeholder: string
21 busy?: boolean24 busy?: boolean
@@ -32,9 +35,14 @@
32 onAttach?: () => void35 onAttach?: () => void
33 /** The id of the composer as a drop target for files (Wails files:dropped). */36 /** The id of the composer as a drop target for files (Wails files:dropped). */
34 dropTarget?: string37 dropTarget?: string
38+ /** The text being written when the composer was left, given back. */
39+ draft?: string
40+ /** Called with the text as it changes, to keep it as the draft. */
41+ onDraft?: (text: string) => void
35 } = $props()42 } = $props()
36 43
37- let text = $state('')44+ let text = $state(untrack(() => draft))
45+ $effect(() => onDraft(text))
38 let textarea: HTMLTextAreaElement46 let textarea: HTMLTextAreaElement
39 const history = createHistory()47 const history = createHistory()
40 48
modified frontend/src/lib/composer.test.ts +14 -1
@@ -1,7 +1,7 @@
11 // Copyright (c) 2026 Philippe Charrière — Sidekicks Source-Available License 1.0, see LICENSE
22
33 import { describe, expect, it } from 'vitest'
4-import { completeTrigger, createHistory, findTrigger, isNearBottom } from './composer'
4+import { completeTrigger, createDrafts, createHistory, findTrigger, isNearBottom } from './composer'
55
66 describe('findTrigger', () => {
77 it('finds a trigger at the start or after a space', () => {
@@ -49,3 +49,16 @@ describe('isNearBottom', () => {
4949 expect(isNearBottom(500, 100, 1000)).toBe(false)
5050 })
5151 })
52+
53+describe('drafts', () => {
54+ it('gives back the text of each conversation, and forgets an empty one', () => {
55+ const drafts = createDrafts()
56+ drafts.keep('c1', 'Hello @ali')
57+ drafts.keep('c2', 'other')
58+ expect(drafts.of('c1')).toBe('Hello @ali')
59+ expect(drafts.of('c3')).toBe('')
60+ drafts.keep('c1', ' ')
61+ expect(drafts.of('c1')).toBe('')
62+ expect(drafts.of('c2')).toBe('other')
63+ })
64+})
@@ -1,7 +1,7 @@
1 // Copyright (c) 2026 Philippe Charrière — Sidekicks Source-Available License 1.0, see LICENSE1 // 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 { completeTrigger, createHistory, findTrigger, isNearBottom } from './composer'4+import { completeTrigger, createDrafts, createHistory, findTrigger, isNearBottom } from './composer'
5 5
6 describe('findTrigger', () => {6 describe('findTrigger', () => {
7 it('finds a trigger at the start or after a space', () => {7 it('finds a trigger at the start or after a space', () => {
@@ -49,3 +49,16 @@ describe('isNearBottom', () => {
49 expect(isNearBottom(500, 100, 1000)).toBe(false)49 expect(isNearBottom(500, 100, 1000)).toBe(false)
50 })50 })
51 })51 })
52+
53+describe('drafts', () => {
54+ it('gives back the text of each conversation, and forgets an empty one', () => {
55+ const drafts = createDrafts()
56+ drafts.keep('c1', 'Hello @ali')
57+ drafts.keep('c2', 'other')
58+ expect(drafts.of('c1')).toBe('Hello @ali')
59+ expect(drafts.of('c3')).toBe('')
60+ drafts.keep('c1', ' ')
61+ expect(drafts.of('c1')).toBe('')
62+ expect(drafts.of('c2')).toBe('other')
63+ })
64+})
modified frontend/src/lib/composer.ts +22 -0
@@ -89,3 +89,25 @@ export function createHistory() {
8989 export function isNearBottom(scrollTop: number, clientHeight: number, scrollHeight: number, margin = 48): boolean {
9090 return scrollHeight - (scrollTop + clientHeight) <= margin
9191 }
92+
93+/**
94+ * The messages being written, by conversation: switching to another channel
95+ * and back gives the text back. Kept while Sidekicks runs.
96+ *
97+ * @example
98+ * drafts.keep('c1', 'Hello @ali')
99+ * drafts.of('c1') // 'Hello @ali'
100+ */
101+export function createDrafts() {
102+ const texts = new Map<string, string>()
103+ return {
104+ of: (id: string): string => texts.get(id) ?? '',
105+ keep(id: string, text: string) {
106+ if (text.trim() === '') texts.delete(id)
107+ else texts.set(id, text)
108+ },
109+ }
110+}
111+
112+/** The drafts of every conversation of the window. */
113+export const drafts = createDrafts()
@@ -89,3 +89,25 @@ export function createHistory() {
89 export function isNearBottom(scrollTop: number, clientHeight: number, scrollHeight: number, margin = 48): boolean {89 export function isNearBottom(scrollTop: number, clientHeight: number, scrollHeight: number, margin = 48): boolean {
90 return scrollHeight - (scrollTop + clientHeight) <= margin90 return scrollHeight - (scrollTop + clientHeight) <= margin
91 }91 }
92+
93+/**
94+ * The messages being written, by conversation: switching to another channel
95+ * and back gives the text back. Kept while Sidekicks runs.
96+ *
97+ * @example
98+ * drafts.keep('c1', 'Hello @ali')
99+ * drafts.of('c1') // 'Hello @ali'
100+ */
101+export function createDrafts() {
102+ const texts = new Map<string, string>()
103+ return {
104+ of: (id: string): string => texts.get(id) ?? '',
105+ keep(id: string, text: string) {
106+ if (text.trim() === '') texts.delete(id)
107+ else texts.set(id, text)
108+ },
109+ }
110+}
111+
112+/** The drafts of every conversation of the window. */
113+export const drafts = createDrafts()
modified frontend/src/lib/panels/ConversationPanel.svelte +3 -1
@@ -14,7 +14,7 @@
1414 import { textIcon } from '../avatar'
1515 import ActionError from '../chat/ActionError.svelte'
1616 import Logo from '../layout/Logo.svelte'
17- import { isNearBottom, type Trigger } from '../composer'
17+ import { drafts, isNearBottom, type Trigger } from '../composer'
1818 import { notStreaming, usagePercent } from '../conversation'
1919 import { act, addMember, agentTitle, appState, cancel, channelOf, clearHistory, loadOlder, openAssistant, prepareCommands, removeMember, send } from '../state.svelte'
2020 import { ConfigService, WorkspaceService } from '../../../bindings/git.rickub.com/bots-garden/sidekicks/internal/app'
@@ -308,6 +308,8 @@
308308 dropTarget={composerTarget}
309309 onSend={(text) => send(channel.id, text)}
310310 onStop={() => cancel(channel.id)}
311+ draft={drafts.of(channel.id)}
312+ onDraft={(text) => drafts.keep(channel.id, text)}
311313 />
312314 {/key}
313315 </div>
@@ -14,7 +14,7 @@
14 import { textIcon } from '../avatar'14 import { textIcon } from '../avatar'
15 import ActionError from '../chat/ActionError.svelte'15 import ActionError from '../chat/ActionError.svelte'
16 import Logo from '../layout/Logo.svelte'16 import Logo from '../layout/Logo.svelte'
17- import { isNearBottom, type Trigger } from '../composer'17+ import { drafts, isNearBottom, type Trigger } from '../composer'
18 import { notStreaming, usagePercent } from '../conversation'18 import { notStreaming, usagePercent } from '../conversation'
19 import { act, addMember, agentTitle, appState, cancel, channelOf, clearHistory, loadOlder, openAssistant, prepareCommands, removeMember, send } from '../state.svelte'19 import { act, addMember, agentTitle, appState, cancel, channelOf, clearHistory, loadOlder, openAssistant, prepareCommands, removeMember, send } from '../state.svelte'
20 import { ConfigService, WorkspaceService } from '../../../bindings/git.rickub.com/bots-garden/sidekicks/internal/app'20 import { ConfigService, WorkspaceService } from '../../../bindings/git.rickub.com/bots-garden/sidekicks/internal/app'
@@ -308,6 +308,8 @@
308 dropTarget={composerTarget}308 dropTarget={composerTarget}
309 onSend={(text) => send(channel.id, text)}309 onSend={(text) => send(channel.id, text)}
310 onStop={() => cancel(channel.id)}310 onStop={() => cancel(channel.id)}
311+ draft={drafts.of(channel.id)}
312+ onDraft={(text) => drafts.keep(channel.id, text)}
311 />313 />
312 {/key}314 {/key}
313 </div>315 </div>
modified internal/agents/manager.go +27 -5
@@ -20,6 +20,7 @@ import (
2020 "os"
2121 "os/exec"
2222 "reflect"
23+ "slices"
2324 "strings"
2425 "sync"
2526 "time"
@@ -144,6 +145,8 @@ type agent struct {
144145 // starting is closed when the current start attempt ends.
145146 starting chan struct{}
146147 outdated bool
148+ // tools are the names of the tools offered when the agent started.
149+ tools []string
147150 // stopRequested: Stop was called while the agent was starting.
148151 stopRequested bool
149152 logs []string
@@ -305,9 +308,10 @@ func (m *Manager) ensureStarted(ctx context.Context, name string) (*agent, error
305308 _ = conn.Close(ctx)
306309 }
307310 var conn Conn
311+ spec := m.specFor(definition)
308312 startErr := m.prepare(ctx, a, definition)
309313 if startErr == nil {
310- conn, startErr = m.options.Starter(ctx, m.specFor(definition), func(line string) { m.log(a, line) })
314+ conn, startErr = m.options.Starter(ctx, spec, func(line string) { m.log(a, line) })
311315 }
312316
313317 m.mu.Lock()
@@ -324,7 +328,7 @@ func (m *Manager) ensureStarted(ctx context.Context, name string) (*agent, error
324328 go func() { _ = conn.Close(context.Background()) }()
325329 return nil, fmt.Errorf("agent %s was stopped while starting", a.definition.Name)
326330 }
327- a.conn, a.users, a.outdated = conn, 0, false
331+ a.conn, a.users, a.outdated, a.tools = conn, 0, false, toolNames(spec.Tools)
328332 a.lastUsed = m.options.Now()
329333 m.setState(a, StateReady, "")
330334 m.watchers.Add(1)
@@ -531,9 +535,17 @@ func (m *Manager) Run(ctx context.Context) {
531535 }
532536
533537 // Reconfigure applies a new configuration: new agents appear stopped, removed
534-// agents are stopped and forgotten, and running agents whose definition
535-// changed keep running but are marked Outdated until restarted.
538+// agents are stopped and forgotten, and running agents whose definition, or
539+// the tools offered to them (agentTools, issue #91), changed keep running
540+// but are marked Outdated until restarted.
536541 func (m *Manager) Reconfigure(ctx context.Context, definitions []config.Agent, maxRunning int, idleTimeout time.Duration) {
542+ // Options.Tools reads the new configuration: outside the lock.
543+ tools := map[string][]string{}
544+ if m.options.Tools != nil {
545+ for _, definition := range definitions {
546+ tools[definition.Name] = toolNames(m.options.Tools(definition))
547+ }
548+ }
537549 m.mu.Lock()
538550 if maxRunning > 0 {
539551 m.options.MaxRunning = maxRunning
@@ -550,7 +562,8 @@ func (m *Manager) Reconfigure(ctx context.Context, definitions []config.Agent, m
550562 m.emitState(m.agents[definition.Name])
551563 continue
552564 }
553- if !reflect.DeepEqual(a.definition, definition) {
565+ toolsChanged := m.options.Tools != nil && a.conn != nil && !slices.Equal(a.tools, tools[definition.Name])
566+ if !reflect.DeepEqual(a.definition, definition) || toolsChanged {
554567 a.outdated = a.conn != nil
555568 a.definition = definition
556569 m.emitState(a)
@@ -573,6 +586,15 @@ func (m *Manager) Reconfigure(ctx context.Context, definitions []config.Agent, m
573586 }
574587 }
575588
589+// toolNames are the names of tools, in order.
590+func toolNames(tools []acp.Tool) []string {
591+ names := []string{}
592+ for _, tool := range tools {
593+ names = append(names, tool.Name)
594+ }
595+ return names
596+}
597+
576598 // specFor is how to start the agent of definition, with the tools offered
577599 // to it, the way its file asks for them (ToolDiscovery).
578600 func (m *Manager) specFor(definition config.Agent) acp.Spec {
@@ -20,6 +20,7 @@ import (
20 "os"20 "os"
21 "os/exec"21 "os/exec"
22 "reflect"22 "reflect"
23+ "slices"
23 "strings"24 "strings"
24 "sync"25 "sync"
25 "time"26 "time"
@@ -144,6 +145,8 @@ type agent struct {
144 // starting is closed when the current start attempt ends.145 // starting is closed when the current start attempt ends.
145 starting chan struct{}146 starting chan struct{}
146 outdated bool147 outdated bool
148+ // tools are the names of the tools offered when the agent started.
149+ tools []string
147 // stopRequested: Stop was called while the agent was starting.150 // stopRequested: Stop was called while the agent was starting.
148 stopRequested bool151 stopRequested bool
149 logs []string152 logs []string
@@ -305,9 +308,10 @@ func (m *Manager) ensureStarted(ctx context.Context, name string) (*agent, error
305 _ = conn.Close(ctx)308 _ = conn.Close(ctx)
306 }309 }
307 var conn Conn310 var conn Conn
311+ spec := m.specFor(definition)
308 startErr := m.prepare(ctx, a, definition)312 startErr := m.prepare(ctx, a, definition)
309 if startErr == nil {313 if startErr == nil {
310- conn, startErr = m.options.Starter(ctx, m.specFor(definition), func(line string) { m.log(a, line) })314+ conn, startErr = m.options.Starter(ctx, spec, func(line string) { m.log(a, line) })
311 }315 }
312 316
313 m.mu.Lock()317 m.mu.Lock()
@@ -324,7 +328,7 @@ func (m *Manager) ensureStarted(ctx context.Context, name string) (*agent, error
324 go func() { _ = conn.Close(context.Background()) }()328 go func() { _ = conn.Close(context.Background()) }()
325 return nil, fmt.Errorf("agent %s was stopped while starting", a.definition.Name)329 return nil, fmt.Errorf("agent %s was stopped while starting", a.definition.Name)
326 }330 }
327- a.conn, a.users, a.outdated = conn, 0, false331+ a.conn, a.users, a.outdated, a.tools = conn, 0, false, toolNames(spec.Tools)
328 a.lastUsed = m.options.Now()332 a.lastUsed = m.options.Now()
329 m.setState(a, StateReady, "")333 m.setState(a, StateReady, "")
330 m.watchers.Add(1)334 m.watchers.Add(1)
@@ -531,9 +535,17 @@ func (m *Manager) Run(ctx context.Context) {
531 }535 }
532 536
533 // Reconfigure applies a new configuration: new agents appear stopped, removed537 // Reconfigure applies a new configuration: new agents appear stopped, removed
534-// agents are stopped and forgotten, and running agents whose definition538+// agents are stopped and forgotten, and running agents whose definition, or
535-// changed keep running but are marked Outdated until restarted.539+// the tools offered to them (agentTools, issue #91), changed keep running
540+// but are marked Outdated until restarted.
536 func (m *Manager) Reconfigure(ctx context.Context, definitions []config.Agent, maxRunning int, idleTimeout time.Duration) {541 func (m *Manager) Reconfigure(ctx context.Context, definitions []config.Agent, maxRunning int, idleTimeout time.Duration) {
542+ // Options.Tools reads the new configuration: outside the lock.
543+ tools := map[string][]string{}
544+ if m.options.Tools != nil {
545+ for _, definition := range definitions {
546+ tools[definition.Name] = toolNames(m.options.Tools(definition))
547+ }
548+ }
537 m.mu.Lock()549 m.mu.Lock()
538 if maxRunning > 0 {550 if maxRunning > 0 {
539 m.options.MaxRunning = maxRunning551 m.options.MaxRunning = maxRunning
@@ -550,7 +562,8 @@ func (m *Manager) Reconfigure(ctx context.Context, definitions []config.Agent, m
550 m.emitState(m.agents[definition.Name])562 m.emitState(m.agents[definition.Name])
551 continue563 continue
552 }564 }
553- if !reflect.DeepEqual(a.definition, definition) {565+ toolsChanged := m.options.Tools != nil && a.conn != nil && !slices.Equal(a.tools, tools[definition.Name])
566+ if !reflect.DeepEqual(a.definition, definition) || toolsChanged {
554 a.outdated = a.conn != nil567 a.outdated = a.conn != nil
555 a.definition = definition568 a.definition = definition
556 m.emitState(a)569 m.emitState(a)
@@ -573,6 +586,15 @@ func (m *Manager) Reconfigure(ctx context.Context, definitions []config.Agent, m
573 }586 }
574 }587 }
575 588
589+// toolNames are the names of tools, in order.
590+func toolNames(tools []acp.Tool) []string {
591+ names := []string{}
592+ for _, tool := range tools {
593+ names = append(names, tool.Name)
594+ }
595+ return names
596+}
597+
576 // specFor is how to start the agent of definition, with the tools offered598 // specFor is how to start the agent of definition, with the tools offered
577 // to it, the way its file asks for them (ToolDiscovery).599 // to it, the way its file asks for them (ToolDiscovery).
578 func (m *Manager) specFor(definition config.Agent) acp.Spec {600 func (m *Manager) specFor(definition config.Agent) acp.Spec {
modified internal/agents/manager_test.go +24 -0
@@ -461,6 +461,30 @@ func TestReconfigure(t *testing.T) {
461461 }
462462 }
463463
464+func TestChangingTheToolsOfferedMakesARunningAgentOutdated(t *testing.T) {
465+ offered := []acp.Tool{{Name: "memory_pressure", Method: "_m"}}
466+ f := &fixture{starter: newFakeStarter(), recorder: &events.Recorder{}, clock: &clock{now: time.Now()}}
467+ f.manager = agents.NewManager(definitions("alice", "bob"), agents.Options{
468+ MaxRunning: maxRunning, Emitter: f.recorder, Starter: f.starter.start, Now: f.clock.Now,
469+ Tools: func(config.Agent) []acp.Tool { return offered },
470+ })
471+ _ = f.manager.Start(ctx, "alice")
472+ f.manager.Reconfigure(ctx, definitions("alice", "bob"), maxRunning, 0)
473+ if f.manager.Statuses()[0].Outdated {
474+ t.Fatal("the same tools: nothing to restart")
475+ }
476+ offered = append(offered, acp.Tool{Name: "search_messages", Method: "_s"})
477+ f.manager.Reconfigure(ctx, definitions("alice", "bob"), maxRunning, 0)
478+ statuses := f.manager.Statuses()
479+ if !statuses[0].Outdated || statuses[1].Outdated {
480+ t.Fatalf("alice runs with the old tools, bob is stopped: %+v", statuses)
481+ }
482+ _ = f.manager.Restart(ctx, "alice")
483+ if f.manager.Statuses()[0].Outdated {
484+ t.Fatal("a restart offers the new tools")
485+ }
486+}
487+
464488 func ExampleManager_Acquire() {
465489 manager := agents.NewManager(definitions("alice"), agents.Options{
466490 Starter: func(context.Context, acp.Spec, func(string)) (agents.Conn, error) { return newFakeConn("alice"), nil },
@@ -461,6 +461,30 @@ func TestReconfigure(t *testing.T) {
461 }461 }
462 }462 }
463 463
464+func TestChangingTheToolsOfferedMakesARunningAgentOutdated(t *testing.T) {
465+ offered := []acp.Tool{{Name: "memory_pressure", Method: "_m"}}
466+ f := &fixture{starter: newFakeStarter(), recorder: &events.Recorder{}, clock: &clock{now: time.Now()}}
467+ f.manager = agents.NewManager(definitions("alice", "bob"), agents.Options{
468+ MaxRunning: maxRunning, Emitter: f.recorder, Starter: f.starter.start, Now: f.clock.Now,
469+ Tools: func(config.Agent) []acp.Tool { return offered },
470+ })
471+ _ = f.manager.Start(ctx, "alice")
472+ f.manager.Reconfigure(ctx, definitions("alice", "bob"), maxRunning, 0)
473+ if f.manager.Statuses()[0].Outdated {
474+ t.Fatal("the same tools: nothing to restart")
475+ }
476+ offered = append(offered, acp.Tool{Name: "search_messages", Method: "_s"})
477+ f.manager.Reconfigure(ctx, definitions("alice", "bob"), maxRunning, 0)
478+ statuses := f.manager.Statuses()
479+ if !statuses[0].Outdated || statuses[1].Outdated {
480+ t.Fatalf("alice runs with the old tools, bob is stopped: %+v", statuses)
481+ }
482+ _ = f.manager.Restart(ctx, "alice")
483+ if f.manager.Statuses()[0].Outdated {
484+ t.Fatal("a restart offers the new tools")
485+ }
486+}
487+
464 func ExampleManager_Acquire() {488 func ExampleManager_Acquire() {
465 manager := agents.NewManager(definitions("alice"), agents.Options{489 manager := agents.NewManager(definitions("alice"), agents.Options{
466 Starter: func(context.Context, acp.Spec, func(string)) (agents.Conn, error) { return newFakeConn("alice"), nil },490 Starter: func(context.Context, acp.Spec, func(string)) (agents.Conn, error) { return newFakeConn("alice"), nil },
modified internal/app/clienttools.go +1 -1
@@ -64,7 +64,7 @@ func (c *Core) systemTools(agent string) []acp.Tool {
6464 return []acp.Tool{
6565 {
6666 Name: "memory_pressure",
67- Description: "Tell how much the memory of the user's computer is under pressure (normal, warning or critical) and how much is used. Call it before a heavy task, or when the user asks about memory or slowness.",
67+ Description: "Tell how much the memory of the user's computer is under pressure (normal, warning or critical) and how much is used. Call it before a heavy task, or when the user asks about memory or slowness. The memory changes from moment to moment: call it again each time, never reuse an earlier result.",
6868 Method: MemoryMethod,
6969 Call: func(context.Context, string, map[string]any) (string, error) {
7070 status, err := memory.Read()
@@ -64,7 +64,7 @@ func (c *Core) systemTools(agent string) []acp.Tool {
64 return []acp.Tool{64 return []acp.Tool{
65 {65 {
66 Name: "memory_pressure",66 Name: "memory_pressure",
67- Description: "Tell how much the memory of the user's computer is under pressure (normal, warning or critical) and how much is used. Call it before a heavy task, or when the user asks about memory or slowness.",67+ Description: "Tell how much the memory of the user's computer is under pressure (normal, warning or critical) and how much is used. Call it before a heavy task, or when the user asks about memory or slowness. The memory changes from moment to moment: call it again each time, never reuse an earlier result.",
68 Method: MemoryMethod,68 Method: MemoryMethod,
69 Call: func(context.Context, string, map[string]any) (string, error) {69 Call: func(context.Context, string, map[string]any) (string, error) {
70 status, err := memory.Read()70 status, err := memory.Read()
modified internal/app/historytools.go +3 -3
@@ -35,7 +35,7 @@ func (c *Core) historyTools(agent string) []acp.Tool {
3535 return []acp.Tool{
3636 {
3737 Name: "list_channels",
38- Description: "List the Sidekicks channels and direct conversations: name, description, members, number of messages and date of the last one. Call it to know where a topic was discussed before searching.",
38+ Description: "List the Sidekicks channels and direct conversations: name, description, members, number of messages and date of the last one. Call it to know where a topic was discussed before searching. Channels and messages change: call it again each time, never reuse an earlier result.",
3939 Method: ChannelsMethod,
4040 Call: func(context.Context, string, map[string]any) (string, error) {
4141 manager, err := c.channelManager()
@@ -51,7 +51,7 @@ func (c *Core) historyTools(agent string) []acp.Tool {
5151 },
5252 {
5353 Name: "list_agents",
54- Description: "List the agents of Sidekicks: the name to mention them with (@name), what they do, where they run and whether they are running. Call it to know who can help.",
54+ Description: "List the agents of Sidekicks: the name to mention them with (@name), what they do, where they run and whether they are running. Call it to know who can help. Their state changes: call it again each time, never reuse an earlier result.",
5555 Method: AgentsMethod,
5656 Call: func(context.Context, string, map[string]any) (string, error) {
5757 return AgentsText(c.manager.Statuses(), agent), nil
@@ -59,7 +59,7 @@ func (c *Core) historyTools(agent string) []acp.Tool {
5959 },
6060 {
6161 Name: "search_messages",
62- Description: "Search the whole history of a Sidekicks channel, or of a direct conversation, for messages containing a text (case and accents ignored), the most recent first. Without channel, the channel of this conversation.",
62+ Description: "Search the whole history of a Sidekicks channel, or of a direct conversation, for messages containing a text (case and accents ignored), the most recent first. Without channel, the channel of this conversation. New messages arrive: search again each time, never reuse an earlier result.",
6363 Method: SearchMethod,
6464 InputSchema: map[string]any{
6565 "type": "object",
@@ -35,7 +35,7 @@ func (c *Core) historyTools(agent string) []acp.Tool {
35 return []acp.Tool{35 return []acp.Tool{
36 {36 {
37 Name: "list_channels",37 Name: "list_channels",
38- Description: "List the Sidekicks channels and direct conversations: name, description, members, number of messages and date of the last one. Call it to know where a topic was discussed before searching.",38+ Description: "List the Sidekicks channels and direct conversations: name, description, members, number of messages and date of the last one. Call it to know where a topic was discussed before searching. Channels and messages change: call it again each time, never reuse an earlier result.",
39 Method: ChannelsMethod,39 Method: ChannelsMethod,
40 Call: func(context.Context, string, map[string]any) (string, error) {40 Call: func(context.Context, string, map[string]any) (string, error) {
41 manager, err := c.channelManager()41 manager, err := c.channelManager()
@@ -51,7 +51,7 @@ func (c *Core) historyTools(agent string) []acp.Tool {
51 },51 },
52 {52 {
53 Name: "list_agents",53 Name: "list_agents",
54- Description: "List the agents of Sidekicks: the name to mention them with (@name), what they do, where they run and whether they are running. Call it to know who can help.",54+ Description: "List the agents of Sidekicks: the name to mention them with (@name), what they do, where they run and whether they are running. Call it to know who can help. Their state changes: call it again each time, never reuse an earlier result.",
55 Method: AgentsMethod,55 Method: AgentsMethod,
56 Call: func(context.Context, string, map[string]any) (string, error) {56 Call: func(context.Context, string, map[string]any) (string, error) {
57 return AgentsText(c.manager.Statuses(), agent), nil57 return AgentsText(c.manager.Statuses(), agent), nil
@@ -59,7 +59,7 @@ func (c *Core) historyTools(agent string) []acp.Tool {
59 },59 },
60 {60 {
61 Name: "search_messages",61 Name: "search_messages",
62- Description: "Search the whole history of a Sidekicks channel, or of a direct conversation, for messages containing a text (case and accents ignored), the most recent first. Without channel, the channel of this conversation.",62+ Description: "Search the whole history of a Sidekicks channel, or of a direct conversation, for messages containing a text (case and accents ignored), the most recent first. Without channel, the channel of this conversation. New messages arrive: search again each time, never reuse an earlier result.",
63 Method: SearchMethod,63 Method: SearchMethod,
64 InputSchema: map[string]any{64 InputSchema: map[string]any{
65 "type": "object",65 "type": "object",