Files
Gabriel Vidal b29a0c5e7e feat(composer): land a prompt and its tags from the URL (?q= / ?qt=)
Any ai-agent page URL can now arrive with a prompt already written for it:

  /?q=Deploy%20the%20lab&qt=project:homelab,skill:open-pr

`q` fills the spawn composer, `qt` is a CSV of tags to switch on — a full chip
id (project:homelab, service:gitea, skill:open-pr, a guideline id) or the bare
slug (homelab, open-pr), matched case-insensitively. Either param works alone;
a selector matching nothing is ignored. Nothing is sent: the draft sits there
for a read-over and a tap on send, so a stale bookmark can never start a run.

Read in GlobalSpawn (the one always-mounted composer host — the composer itself
is unmounted on half the pages a link can point at), which surfaces the composer
as well as filling it, then strips both params with a replaced history entry so
a refresh can't re-stomp what has since been typed.

The tag half goes in as defaultOn flags (withPreselect), since RichInput owns
its selection and exposes no setTags. Hence the two-step prefill consume in
SpawnComposer: one commit to flag the tags, the next to clear() the composer
onto them — that clear() also drops the cached spawn draft, whose remembered
tag ids RichInput would otherwise re-apply every time the async tag list grows.

SpawnPrefill's new `replace` flag keeps the Goals/Plan buttons' old manners:
they still stand down when something is already typed, a deep link doesn't.
2026-08-15 11:49:48 +02:00
..