@fieldwangai/agentflow 0.1.125 → 0.1.126

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8141,7 +8141,7 @@ function prdWorkflowReviewRenderFrontmatter(frontmatter) {
8141
8141
  }
8142
8142
  }
8143
8143
  flush();
8144
- return `<details class="frontmatter" open><summary>文档元数据</summary><table>${rows}</table></details>`;
8144
+ return `<details class="frontmatter"><summary>文档元数据</summary><table><colgroup><col class="frontmatter-key-column"><col></colgroup>${rows}</table></details>`;
8145
8145
  }
8146
8146
 
8147
8147
  function prdWorkflowReviewRenderTable(lines) {
@@ -8614,7 +8614,7 @@ function prdWorkflowReviewRenderChangeIntent(change) {
8614
8614
  function prdWorkflowReviewMarkdownLinesToHtml(lines) {
8615
8615
  const html = [];
8616
8616
  let paragraph = [];
8617
- let list = [];
8617
+ let list = null;
8618
8618
  let code = null;
8619
8619
  const flushParagraph = () => {
8620
8620
  if (!paragraph.length) return;
@@ -8622,9 +8622,11 @@ function prdWorkflowReviewMarkdownLinesToHtml(lines) {
8622
8622
  paragraph = [];
8623
8623
  };
8624
8624
  const flushList = () => {
8625
- if (!list.length) return;
8626
- html.push(`<ul>${list.map((item) => `<li>${item}</li>`).join("")}</ul>`);
8627
- list = [];
8625
+ if (!list?.items?.length) return;
8626
+ const tag = list.ordered ? "ol" : "ul";
8627
+ const start = list.ordered && list.start !== 1 ? ` start="${list.start}"` : "";
8628
+ html.push(`<${tag}${start}>${list.items.map((item) => `<li>${item}</li>`).join("")}</${tag}>`);
8629
+ list = null;
8628
8630
  };
8629
8631
  const flushBlocks = () => {
8630
8632
  flushParagraph();
@@ -8713,13 +8715,31 @@ function prdWorkflowReviewMarkdownLinesToHtml(lines) {
8713
8715
  html.push(`<blockquote>${prdWorkflowReviewInlineMarkdown(quote[1])}</blockquote>`);
8714
8716
  continue;
8715
8717
  }
8716
- const bullet = trimmed.match(/^[-*]\s+(?:\[( |x|X)\]\s+)?(.+)$/);
8717
- if (bullet) {
8718
+ const listItem = line.match(/^(\s*)([-*]|\d+[.)])\s+(?:\[( |x|X)\]\s+)?(.+)$/);
8719
+ if (listItem) {
8718
8720
  flushParagraph();
8719
- const checked = bullet[1] ? `<input type="checkbox" disabled${bullet[1].toLowerCase() === "x" ? " checked" : ""}> ` : "";
8720
- list.push(`${checked}${prdWorkflowReviewInlineMarkdown(bullet[2])}`);
8721
+ const ordered = /^\d/.test(listItem[2]);
8722
+ if (list && list.ordered !== ordered) flushList();
8723
+ if (!list) {
8724
+ list = {
8725
+ ordered,
8726
+ start: ordered ? Number.parseInt(listItem[2], 10) || 1 : 1,
8727
+ indent: listItem[1].length,
8728
+ items: [],
8729
+ };
8730
+ }
8731
+ const checked = listItem[3]
8732
+ ? `<input type="checkbox" disabled${listItem[3].toLowerCase() === "x" ? " checked" : ""}> `
8733
+ : "";
8734
+ list.items.push(`${checked}${prdWorkflowReviewInlineMarkdown(listItem[4])}`);
8735
+ continue;
8736
+ }
8737
+ if (list?.items?.length && /^\s{2,}\S/.test(line)) {
8738
+ const lastIndex = list.items.length - 1;
8739
+ list.items[lastIndex] += ` ${prdWorkflowReviewInlineMarkdown(trimmed)}`;
8721
8740
  continue;
8722
8741
  }
8742
+ if (list) flushList();
8723
8743
  paragraph.push(trimmed);
8724
8744
  }
8725
8745
  if (code) html.push(`<pre><code>${htmlEscapeAttribute(prdWorkflowReviewNormalizeText(code.lines.join("\n")))}</code></pre>`);
@@ -9015,18 +9035,20 @@ export function prdWorkflowReviewHtml(title, markdown, meta = {}) {
9015
9035
  .raw:hover, .theme-toggle:hover { border-color: var(--interactive); color: var(--link); }
9016
9036
  .theme-toggle { cursor: pointer; font-family: inherit; }
9017
9037
  .lifecycle { margin-top: 10px; display: inline-flex; max-width: 100%; border: 1px solid var(--border); border-radius: 999px; background: var(--button); color: var(--muted); padding: 6px 10px; font-size: 12px; font-weight: 800; line-height: 1.35; overflow-wrap: anywhere; }
9018
- article { min-width: 0; border: 1px solid var(--border); border-radius: 14px; background: var(--panel); box-shadow: 0 18px 50px var(--shadow); padding: clamp(20px, 4vw, 34px); }
9038
+ article { min-width: 0; border: 0; border-radius: 14px; background: var(--panel); box-shadow: 0 18px 50px var(--shadow); padding: clamp(20px, 4vw, 34px); }
9019
9039
  article > *:first-child { margin-top: 0; }
9020
9040
  article > *:last-child { margin-bottom: 0; }
9021
9041
  h2, h3, h4, h5, h6 { margin: 1.7em 0 .65em; line-height: 1.25; letter-spacing: 0; color: var(--heading); overflow-wrap: anywhere; }
9022
9042
  h2 { padding-bottom: .4rem; border-bottom: 1px solid var(--border-soft); font-size: 1.5rem; }
9023
9043
  h3 { font-size: 1.2rem; }
9024
- p, li, td, th, blockquote { font-size: 15px; line-height: 1.8; overflow-wrap: anywhere; word-break: break-word; }
9044
+ p, li, td, th, blockquote { font-size: 15px; line-height: 1.75; overflow-wrap: anywhere; word-break: break-word; }
9025
9045
  p { margin: .75rem 0; color: var(--body); }
9026
- ul { margin: .65rem 0 1rem; padding-left: 1.35rem; }
9027
- li { margin: .28rem 0; color: var(--body); }
9046
+ ul, ol { margin: .75rem 0 1.1rem; padding-left: 1.55rem; }
9047
+ ol { padding-left: 1.8rem; }
9048
+ li { margin: .48rem 0; padding-left: .12rem; color: var(--body); }
9049
+ li::marker { color: var(--interactive); font-weight: 750; }
9028
9050
  li input { margin-right: .38rem; transform: translateY(1px); }
9029
- code { display: inline; max-width: 100%; border: 1px solid var(--border-soft); border-radius: 6px; background: var(--code-bg); color: var(--code-inline); padding: .1rem .34rem; font-family: "SFMono-Regular", Consolas, monospace; font-size: .92em; white-space: normal; overflow-wrap: anywhere; word-break: break-word; }
9051
+ code { display: inline; max-width: 100%; border: 1px solid var(--border-soft); border-radius: 4px; background: color-mix(in srgb, var(--interactive) 8%, transparent); color: var(--code-inline); padding: .06rem .24rem; font-family: "SFMono-Regular", Consolas, monospace; font-size: .9em; white-space: normal; overflow-wrap: anywhere; word-break: break-word; }
9030
9052
  pre { max-width: 100%; overflow: auto; border: 1px solid var(--border); border-radius: 10px; background: var(--code-block); padding: 16px; line-height: 1.65; }
9031
9053
  pre code { border: 0; background: transparent; color: var(--code-block-text); padding: 0; white-space: pre; overflow-wrap: normal; word-break: normal; }
9032
9054
  .planned-code { max-width: 100%; margin: 1rem 0 1.2rem; overflow: hidden; border: 1px solid var(--planned-border); border-radius: 10px; background: var(--code-block); }
@@ -9108,7 +9130,8 @@ export function prdWorkflowReviewHtml(title, markdown, meta = {}) {
9108
9130
  .frontmatter { margin: 0 0 1.35rem; border: 1px solid var(--border-soft); border-radius: 10px; background: var(--panel-strong); padding: .75rem .9rem; }
9109
9131
  .frontmatter summary { cursor: pointer; color: var(--body); font-weight: 800; }
9110
9132
  .frontmatter table { min-width: 0; margin-top: .7rem; }
9111
- .frontmatter th { width: min(34%, 12rem); background: var(--panel-soft); color: var(--body); }
9133
+ .frontmatter-key-column { width: clamp(10rem, 22%, 16rem); }
9134
+ .frontmatter th { background: var(--panel-soft); color: var(--body); }
9112
9135
  .frontmatter-list { margin: 0; padding-left: 1.1rem; }
9113
9136
  .action-index { position: sticky; top: 10px; z-index: 4; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 1rem 0 1.25rem; border: 1px solid var(--border); border-radius: 12px; background: var(--panel-strong); box-shadow: 0 8px 22px var(--shadow); padding: 10px 12px; }
9114
9137
  .action-index__label { margin-right: 2px; color: var(--muted); font-size: 12px; font-weight: 800; }