技能 2026-10-10 06:14 UTC
answer-me-with-html
由提交人 liyuankui 提交,主要更新类型为:新增功能与能力扩展。提交说明:feat: remark mode marks blocks on the page and carries them in the Reply copy (#136)。带来了新的能力与可配置项,扩展了使用场景。
Commit提交信息原文
feat: remark mode marks blocks on the page and carries them in the Reply copy (#136)
* feat: remark mode — block highlights on the page, carried by the Reply copy
A Remark toolbar button turns on block picking: click a block, tag it
(suggestion / keep / question / concern), add an optional note. Marks
persist in localStorage like panel comments and the Reply button lists
them in its Markdown output, so one copy carries asks, comments and
remarks back to the agent. Anchors are panel id + tag + text fingerprint,
so 'am patch' edits around a block do not detach it.
Implements the idea discussed in #134.
* chore: drop the unrelated arc-*.html ignore rule
* fix(remark): make remark mode work and quote its notes in the reply
Finishes the review of #136.
- The runtime read ui.remark.* while render wrote the labels flat in data-ui, so it threw on load. The remark button now carries
{ button, hint, save, remove, section, kinds } and the runtime reads exactly those; the reply button also carries remarks and kinds.
- Set dataset after creating the kind buttons, and hide the popover with [hidden].
- replyText takes remarks and writes a Remarks section; each note is quoted line by line, so the existing "typed" line covers it and
the string join (window.__amRemarkText) is gone. SKILL.md section 5 names the section and the four kinds.
- The note chip goes inside the block (a table takes it as its caption, a list item puts it before its sub-list) and stays out of the
block text, so lists and timelines keep their children and the key does not change.
- Keys carry an occurrence index, so two blocks with the same text are two remarks and each is sent once.
- One BLOCK selector decides what is outlined and what a click picks; page and panel titles are not pickable because the reply reads them.
- Save stays off until a kind is picked. The toggle has aria-pressed, the popover is a dialog that takes focus, closes on Escape and
gives focus back.
- The quote joins the text of separate cells and timeline parts with spaces and ends in an ellipsis when it is cut.
- Kinds use the theme status colours (warn, ok, accent, err), so they read in light and dark mode; the bar, the chip and the popover
use logical properties and place themselves by the page direction. Hebrew labels are added, and the reply view draws a remark line.
* test(remark): drive remark mode in headless Chrome on an English and a Hebrew page
* docs: describe the Remark button and the Remarks section of the reply
---------
Co-authored-by: Serein <serein7z@163.com>