0
Fork 0
mirror of https://github.com/zeronsh/comet.git synced 2026-11-16 18:57:19 +00:00
comet/apps/zgx/plugins-dev/md-hello
Wing e1894e5522 Plugins: compose can replace a draft's words or write another chat's; draft_of reads any chat's
What #1446 asked for that #1445's draft API didn't cover:
- `zeron.compose(text, { replace = true, session? })` ("compose"): the
  words put in place of the draft's (its chips stay, so a rewrite keeps
  what it carries), and in another chat's draft (`session`). Words alone
  are added after what's there, as ever. Nothing is sent.
- `zeron.draft_of(session)` ("draft"): a promise of any chat's draft as it
  is, as `zeron.draft()` says it (text, chat, chips by kind and name,
  never a path), read once in the host where the app keeps it.

The composer's handling of a plugin's words is one path now (words alone
come as a string). Consent: "compose" says it may replace what you wrote;
"draft" says it sees your words in any chat. Docs, SDK (and its copies).

Tests: src/plugins `compose_takes_words_alone_or_with_replace_and_a_chat`,
`a_chats_draft_is_read_where_it_is_kept_without_paths`;
ui/tests/plugin_compose_replace.test.luau. Full UI suite (1422) and
plugins:: (248) pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
History 2026-11-14 19:58:13 -07:00
..
init.luau zgx: Zeron's interface on zgx (app, design system, plugins, beta channel) (#1137) 2026-11-03 03:21:42 -07:00
zeron-plugin.json zgx: Zeron's interface on zgx (app, design system, plugins, beta channel) (#1137) 2026-11-03 03:21:42 -07:00
zeron.luau Plugins: compose can replace a draft's words or write another chat's; draft_of reads any chat's 2026-11-14 19:58:13 -07:00