@kanyun-ai-infra/band-plugin-react 0.1.1 → 0.2.0

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.
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /* band:inject-css */ /* @kanyun-ai-infra/band-plugin-react 的样式(scripts/tsup-inject-css.ts) */
2
2
  if (typeof document !== "undefined" && document.head) {
3
- const css = "/* src/ui.css */\n.band-plugin-react-error {\n font-size: var(--fs-ui);\n padding: 7px 10px;\n border-radius: 8px;\n background: var(--bad-soft);\n color: var(--bad);\n font-family: var(--mono);\n}\n.band-plugin-react-info {\n font-size: var(--fs-ui);\n padding: 7px 10px;\n border-radius: 8px;\n background: var(--panel);\n color: var(--muted);\n}\n.band-plugin-react-retry {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 10px;\n}\n.band-plugin-react-failed {\n display: grid;\n gap: 6px;\n justify-items: start;\n margin: auto;\n padding: 8px 10px;\n border-radius: var(--r);\n background: var(--bad-soft);\n color: var(--bad);\n font-size: var(--fs-ui);\n}\n.band-plugin-react-failed p {\n margin: 0;\n}\n.band-plugin-react-failed-title {\n font-weight: 600;\n}\n.band-plugin-react-failed-reason {\n overflow-wrap: anywhere;\n}\n.band-plugin-react-pane-head {\n padding: 6px 14px 6px 16px;\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n min-height: 36px;\n}\n.band-plugin-react-pane-title {\n margin: 0;\n font-size: var(--fs-dense);\n color: var(--muted);\n font-weight: 500;\n letter-spacing: 0.02em;\n}\n.band-plugin-react-wsicon {\n flex: none;\n display: block;\n}\n.band-plugin-react-wstile {\n --band-wstile: 16px;\n width: var(--band-wstile);\n height: var(--band-wstile);\n display: inline-grid;\n place-items: center;\n flex: none;\n border-radius: calc(var(--band-wstile) * 0.26);\n background: var(--panel);\n box-shadow: var(--shadow-card);\n}\n.band-plugin-react-wstile > :where(.band-plugin-react-wsicon) {\n width: 82%;\n height: 82%;\n}\n.band-plugin-react-wstile:where(.is-large) {\n border-radius: var(--r-xl);\n}\n.band-plugin-react-wstile:where(.is-large) > :where(.band-plugin-react-wsicon) {\n width: 76%;\n height: 76%;\n}\n.band-plugin-react-instrument {\n width: 72%;\n height: 72%;\n background: currentColor;\n -webkit-mask: var(--band-instrument) center / contain no-repeat;\n mask: var(--band-instrument) center / contain no-repeat;\n}\n.band-plugin-react-model-hint {\n margin: 0;\n}\n.band-plugin-react-target-repo {\n display: flex;\n flex-direction: column;\n gap: 2px;\n margin: 0;\n font-size: var(--fs-meta);\n line-height: 1.5;\n color: var(--muted);\n}\n.band-plugin-react-target-repo code {\n font-family: var(--mono);\n color: var(--ink);\n}\n.band-plugin-react-target-repo a {\n color: var(--accent-text);\n}\n.band-plugin-react-target-repo-request {\n align-self: flex-start;\n}\n.band-plugin-react-target-repo-err {\n color: var(--bad);\n}\n.band-plugin-react-first-delivery {\n display: flex;\n flex-direction: column;\n gap: 8px;\n flex-basis: 100%;\n padding: 12px;\n border: 1px solid var(--rule);\n border-radius: var(--r-lg);\n background: var(--panel);\n margin: 0;\n min-width: 0;\n}\n.band-plugin-react-first-delivery-slot {\n display: flex;\n flex-direction: column;\n gap: 4px;\n font-size: var(--fs-meta);\n}\n.band-plugin-react-first-delivery-pick,\n.band-plugin-react-first-delivery-file {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 8px;\n}\n.band-plugin-react-first-delivery-list {\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n.band-plugin-react-first-delivery-name {\n min-width: 0;\n overflow-wrap: anywhere;\n}\n.band-plugin-react-first-delivery-size {\n color: var(--muted);\n}\n.band-plugin-react-first-delivery-missing {\n margin: 0;\n font-size: var(--fs-meta);\n color: var(--muted);\n}\n.band-plugin-react-first-delivery .btn {\n align-self: flex-start;\n}\n.band-plugin-react-no-key {\n margin: 0;\n font-size: var(--fs-ui);\n color: var(--bad);\n}\n\n/* src/controls.css */\n.band-plugin-react-combo-field,\n.band-plugin-react-tags {\n position: relative;\n display: flex;\n flex-wrap: wrap;\n gap: 5px;\n align-items: center;\n padding: 5px 8px;\n border-radius: var(--r);\n background: var(--panel);\n box-shadow: inset 0 0 0 1px var(--control-edge);\n}\n.band-plugin-react-combo-field > :where(.field),\n.band-plugin-react-tags > :where(.field) {\n flex: 1 1 90px;\n min-width: 90px;\n width: auto;\n}\n.band-plugin-react-combo-picked {\n list-style: none;\n margin: 0 0 7px;\n padding: 0;\n display: flex;\n flex-wrap: wrap;\n gap: 5px;\n}\n.band-plugin-react-combo-chip,\n.band-plugin-react-filter-chip {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n height: 22px;\n padding: 0 4px 0 8px;\n border-radius: 999px;\n background: var(--fill-2);\n color: var(--ink);\n font-size: var(--fs-meta);\n white-space: nowrap;\n}\n.band-plugin-react-filter-chip {\n background: var(--accent-soft);\n color: var(--accent-text);\n}\n.band-plugin-react-combo-chip > button,\n.band-plugin-react-filter-chip > button {\n border: 0;\n background: none;\n color: inherit;\n font: inherit;\n line-height: 1;\n padding: 0 3px;\n border-radius: 999px;\n opacity: 0.85;\n}\n.band-plugin-react-combo-chip > button:where(:focus-visible),\n.band-plugin-react-filter-chip > button:where(:focus-visible) {\n outline: none;\n box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--accent);\n opacity: 1;\n}\n.band-plugin-react-combo-pop {\n position: absolute;\n left: 0;\n right: 0;\n top: calc(100% + 6px);\n z-index: var(--layer-pop);\n display: grid;\n gap: 1px;\n max-height: 236px;\n overflow: auto;\n overscroll-behavior: contain;\n padding: 5px;\n border-radius: var(--r-lg);\n background: var(--panel);\n box-shadow: var(--shadow-pop);\n}\n.band-plugin-react-combo-group {\n padding: 6px 8px 3px;\n font-size: var(--fs-badge);\n color: var(--muted);\n}\n.band-plugin-react-combo-opt {\n display: flex;\n align-items: center;\n gap: 8px;\n width: 100%;\n padding: 6px 8px;\n border: 0;\n border-radius: var(--r-sm);\n background: none;\n color: var(--ink);\n font: inherit;\n font-size: var(--fs-row);\n text-align: left;\n}\n.band-plugin-react-combo-opt:where(.is-active) {\n background: var(--fill-2);\n}\n.band-plugin-react-combo-opt:where(:focus-visible) {\n outline: none;\n box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--accent);\n}\n.band-plugin-react-combo-label {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.band-plugin-react-combo-label > mark {\n background: var(--accent-soft);\n color: var(--ink);\n border-radius: 2px;\n}\n.band-plugin-react-combo-meta {\n margin-left: auto;\n flex: none;\n font-family: var(--mono);\n font-size: var(--fs-badge);\n color: var(--muted);\n}\n.band-plugin-react-combo-plus {\n display: inline-grid;\n place-items: center;\n width: 20px;\n height: 20px;\n flex: none;\n border-radius: 50%;\n background: var(--fill-3);\n color: var(--muted);\n font-size: var(--fs-badge);\n}\n.band-plugin-react-combo-empty {\n padding: 8px;\n text-align: center;\n font-size: var(--fs-meta);\n color: var(--muted);\n}\n.band-plugin-react-tag {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n height: 22px;\n padding: 0 4px 0 8px;\n border-radius: 999px;\n background: var(--fill-2);\n color: var(--ink);\n font-size: var(--fs-meta);\n white-space: nowrap;\n}\n.band-plugin-react-tag:where([data-dup]) {\n background: var(--bad-soft);\n color: var(--bad);\n}\n.band-plugin-react-tag > button {\n border: 0;\n background: none;\n color: inherit;\n font: inherit;\n line-height: 1;\n padding: 0 3px;\n border-radius: 999px;\n opacity: 0.85;\n}\n.band-plugin-react-tag > button:where(:focus-visible) {\n outline: none;\n box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--accent);\n opacity: 1;\n}\n.band-plugin-react-tag-hint {\n margin: 5px 0 0;\n min-height: 16px;\n font-size: var(--fs-badge);\n color: var(--muted);\n}\n.band-plugin-react-tag-hint:where([data-err]) {\n color: var(--bad);\n}\n.band-plugin-react-filter {\n display: grid;\n gap: 2px;\n min-width: 0;\n}\n.band-plugin-react-filter-chips {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n align-items: center;\n margin-bottom: 8px;\n}\n.band-plugin-react-filter-clear {\n margin-left: auto;\n border: 0;\n background: none;\n padding: 0 2px;\n color: var(--muted);\n font: inherit;\n font-size: var(--fs-meta);\n text-decoration: underline;\n}\n.band-plugin-react-filter-clear:where(:focus-visible) {\n outline: none;\n box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--accent);\n border-radius: 4px;\n}\n.band-plugin-react-filter-group {\n display: flex;\n align-items: center;\n gap: 6px;\n width: 100%;\n padding: 7px 8px 3px;\n border: 0;\n border-radius: var(--r-sm);\n background: none;\n color: var(--muted);\n font: inherit;\n font-size: var(--fs-badge);\n text-align: left;\n}\n.band-plugin-react-filter-group:where(:focus-visible) {\n outline: none;\n box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--accent);\n}\n.band-plugin-react-filter-group::before {\n content: \"\\25b8\";\n width: 11px;\n flex: none;\n font-size: var(--fs-meta);\n line-height: 1;\n}\n.band-plugin-react-filter-group[aria-expanded=true]::before {\n content: \"\\25be\";\n}\n.band-plugin-react-filter-group-count {\n margin-left: auto;\n font-family: var(--mono);\n}\n.band-plugin-react-filter-opt {\n padding: 4px 8px;\n border-radius: var(--r-sm);\n}\n.band-plugin-react-filter-opt:where(:hover) {\n background: var(--fill);\n}\n.band-plugin-react-filter-count {\n margin-left: auto;\n font-family: var(--mono);\n font-size: var(--fs-badge);\n color: var(--muted);\n}\n.band-plugin-react-filter-empty {\n padding: 8px;\n font-size: var(--fs-meta);\n color: var(--muted);\n}\n\n/* src/prompt/prompt.css */\n.band-plugin-react-prompt {\n position: relative;\n display: grid;\n grid-template-columns: minmax(0, 1fr);\n gap: 6px;\n min-width: 0;\n}\n.band-plugin-react-prompt-box {\n position: relative;\n min-width: 0;\n}\n.band-plugin-react-prompt-box.composer {\n grid-template-columns: minmax(0, 1fr);\n}\n.band-plugin-react-prompt-box:where([data-variant=comment] *, [data-variant=reply] *) {\n border-radius: var(--r-lg);\n}\n.band-plugin-react-prompt-box.composer textarea:where([data-variant=comment] *, [data-variant=reply] *) {\n font-size: var(--fs-body);\n padding: 10px 12px 2px;\n}\n.band-plugin-react-prompt-note {\n padding: 6px 12px 12px;\n font-size: var(--fs-ui);\n color: var(--muted);\n}\n.band-plugin-react-prompt-notice {\n display: flex;\n align-items: flex-start;\n gap: 6px;\n font-size: var(--fs-dense);\n padding: 6px 6px 6px 10px;\n border-radius: var(--r);\n background: var(--fill);\n color: var(--muted);\n}\n.band-plugin-react-prompt-notice:where([role=alert]) {\n background: var(--bad-soft);\n color: var(--bad);\n}\n.band-plugin-react-prompt-notice > span {\n flex: 1;\n min-width: 0;\n}\n.band-plugin-react-prompt-notice-lines {\n display: flex;\n flex-direction: column;\n gap: 2px;\n overflow-wrap: anywhere;\n}\n.band-plugin-react-prompt-tray {\n list-style: none;\n margin: 0;\n padding: 12px 12px 0;\n display: flex;\n gap: 8px;\n overflow-x: auto;\n scrollbar-width: thin;\n}\n.band-plugin-react-prompt-card {\n position: relative;\n flex: none;\n display: flex;\n align-items: center;\n border-radius: var(--r-lg);\n background: var(--sunk);\n max-width: 220px;\n}\n.band-plugin-react-prompt-card:where([data-state=failed]) {\n background: var(--bad-soft);\n color: var(--bad);\n}\n.band-plugin-react-prompt-open {\n display: flex;\n align-items: center;\n gap: 8px;\n min-width: 0;\n padding: 6px 26px 6px 6px;\n border: 0;\n background: none;\n color: inherit;\n text-align: left;\n font: inherit;\n border-radius: inherit;\n}\n.band-plugin-react-prompt-open:where(:disabled) {\n cursor: default;\n}\n.band-plugin-react-prompt-open:where(:focus-visible) {\n outline: none;\n box-shadow: 0 0 0 2px var(--accent);\n}\n.band-plugin-react-prompt-open:where([data-kind=image] *) {\n padding: 0;\n}\n.band-plugin-react-prompt-thumb {\n width: auto;\n min-width: 40px;\n max-width: 140px;\n height: 56px;\n object-fit: cover;\n border-radius: var(--r-lg);\n display: block;\n}\n.band-plugin-react-prompt-icon {\n flex: none;\n width: 36px;\n height: 40px;\n border-radius: var(--r-sm);\n background: var(--panel);\n display: grid;\n place-items: center;\n font-family: var(--mono);\n font-size: 10.5px;\n color: var(--muted);\n box-shadow: 0 0 0 var(--hairline) var(--rule);\n}\n.band-plugin-react-prompt-meta {\n display: grid;\n min-width: 0;\n text-align: left;\n}\n.band-plugin-react-prompt-name {\n font-size: var(--fs-ui);\n color: var(--ink);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.band-plugin-react-prompt-file {\n text-autospace: no-autospace;\n}\n.band-plugin-react-prompt-d {\n font-size: var(--fs-meta);\n color: var(--muted);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.band-plugin-react-prompt-quote {\n display: -webkit-box;\n white-space: normal;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n}\n.band-plugin-react-prompt-d:where([data-state=failed] *) {\n color: var(--bad);\n}\n.band-plugin-react-prompt-progress {\n position: absolute;\n inset: 0;\n display: grid;\n place-items: center;\n border-radius: inherit;\n background: color-mix(in srgb, var(--panel) 55%, transparent);\n color: var(--accent-text);\n}\n.band-plugin-react-prompt-progress:where([data-kind=file] *) {\n inset: auto 30px auto auto;\n background: none;\n}\n.band-plugin-react-prompt-retry {\n border: 0;\n background: none;\n color: var(--bad);\n font: inherit;\n font-size: var(--fs-meta);\n padding: 2px 6px;\n margin: 0 22px 0 6px;\n border-radius: var(--r-sm);\n}\n.band-plugin-react-prompt-retry:where(:hover) {\n background: var(--fill-2);\n}\n.band-plugin-react-prompt-x:where(.band-plugin-react-prompt-card > *) {\n position: absolute;\n top: 3px;\n right: 3px;\n}\n.band-plugin-react-prompt-x {\n width: 20px;\n height: 20px;\n display: inline-grid;\n place-items: center;\n border: 0;\n border-radius: 50%;\n background: none;\n color: var(--muted);\n font-size: var(--fs-body);\n line-height: 1;\n flex: none;\n transition: background var(--sixteenth) var(--ease), color var(--sixteenth) var(--ease);\n}\n.band-plugin-react-prompt-x:where(:hover, :focus-visible) {\n background: var(--fill-3);\n color: var(--ink);\n outline: none;\n}\n.band-plugin-react-prompt-x:where([data-kind=image] > *) {\n background: color-mix(in srgb, var(--panel) 85%, transparent);\n color: var(--ink);\n}\n.band-plugin-react-prompt-chips {\n list-style: none;\n margin: 0;\n padding: 4px 14px 0;\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n}\n.band-plugin-react-prompt-chip.chip {\n background: var(--fill-2);\n color: var(--ink);\n padding: 1px 2px 1px 8px;\n gap: 3px;\n}\n.band-plugin-react-prompt-chip:where([data-kind=cap]) {\n background: var(--accent-soft);\n color: var(--accent-text);\n}\n.band-plugin-react-prompt-chip:where([data-kind=conn]) {\n padding-right: 8px;\n}\n.band-plugin-react-prompt-sigil {\n font-family: var(--mono);\n color: var(--muted);\n}\n.band-plugin-react-prompt-sigil:where([data-kind=cap] *) {\n color: inherit;\n}\n.band-plugin-react-prompt-cands.mention {\n position: absolute;\n z-index: 25;\n left: 10px;\n right: 10px;\n bottom: calc(100% + 6px);\n max-height: 280px;\n overflow-y: auto;\n overscroll-behavior: contain;\n}\n.band-plugin-react-prompt-cands.mention:where([data-variant=comment] *, [data-variant=reply] *) {\n position: static;\n margin: 6px 8px;\n box-shadow: 0 0 0 var(--hairline) var(--rule);\n}\n.band-plugin-react-prompt-cands-h {\n font-size: var(--fs-caption);\n color: var(--muted);\n padding: 4px 8px 2px;\n}\n.band-plugin-react-prompt-empty {\n font-size: var(--fs-ui);\n color: var(--muted);\n padding: 6px 8px 8px;\n}\n.band-plugin-react-prompt-option:where([aria-selected=true]) {\n background: var(--sunk);\n}\n.band-plugin-react-prompt-bar {\n position: relative;\n min-width: 0;\n}\n.band-plugin-react-prompt-bar.composer-bar {\n flex-wrap: nowrap;\n}\n.band-plugin-react-prompt-anchor {\n position: relative;\n display: inline-flex;\n}\n.band-plugin-react-prompt-capbtn.btn {\n font-family: var(--mono);\n font-size: var(--fs-dense);\n}\n.band-plugin-react-prompt-hint {\n font-size: var(--fs-meta);\n color: var(--muted);\n padding: 0 8px;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n@media (max-width: 860px) {\n .band-plugin-react-prompt-hint:not([data-notice]) {\n display: none;\n }\n}\n.band-plugin-react-prompt-send:where([data-waiting]) {\n background: var(--fill-3);\n color: var(--ink);\n}\n.band-plugin-react-prompt-ring {\n display: block;\n}\n.band-plugin-react-prompt-menu {\n position: absolute;\n z-index: 26;\n left: 0;\n bottom: calc(100% + 6px);\n min-width: 248px;\n max-width: min(320px, calc(100vw - 32px));\n max-height: 360px;\n overflow-y: auto;\n overscroll-behavior: contain;\n padding: 4px;\n border-radius: 10px;\n background: var(--panel);\n box-shadow: var(--shadow-pop);\n display: grid;\n outline: none;\n}\n.band-plugin-react-prompt-item {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 7px 8px;\n border: 0;\n border-radius: 7px;\n background: none;\n color: var(--ink);\n font: inherit;\n font-size: var(--fs-ui);\n text-align: left;\n text-decoration: none;\n}\n.band-plugin-react-prompt-item:where(:hover, :focus-visible) {\n background: var(--sunk);\n outline: none;\n}\n.band-plugin-react-prompt-item:where(:disabled) {\n color: var(--muted);\n background: none;\n opacity: 0.42;\n}\n.band-plugin-react-prompt-meta:where(.band-plugin-react-prompt-item > *) {\n flex: 1;\n}\n.band-plugin-react-prompt-check {\n width: 14px;\n flex: none;\n color: var(--accent-text);\n}\n.band-plugin-react-prompt-sep {\n border: 0;\n height: var(--hairline);\n background: var(--rule);\n margin: 4px 6px;\n}\n.band-plugin-react-prompt-group {\n font-size: var(--fs-caption);\n color: var(--muted);\n padding: 4px 8px 2px;\n}\n.band-plugin-react-prompt-switch {\n flex: none;\n width: 28px;\n height: 16px;\n border-radius: 999px;\n background: var(--fill-3);\n position: relative;\n transition: background var(--sixteenth) var(--ease);\n}\n.band-plugin-react-prompt-switch::after {\n content: \"\";\n position: absolute;\n top: 2px;\n left: 2px;\n width: 12px;\n height: 12px;\n border-radius: 50%;\n background: var(--panel);\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);\n transition: transform var(--sixteenth) var(--ease);\n}\n.band-plugin-react-prompt-switch:where([data-on]) {\n background: var(--primary);\n}\n.band-plugin-react-prompt-switch:where([data-on])::after {\n transform: translateX(12px);\n}\n.band-plugin-react-prompt-source {\n margin: 6px 10px 0;\n padding: 8px;\n border-radius: var(--r-lg);\n background: var(--sunk);\n display: grid;\n gap: 6px;\n}\n.band-plugin-react-prompt-source-h {\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: var(--fs-ui);\n}\n:where(.band-plugin-react-prompt-source-h, .band-plugin-react-prompt-preview-h) > .grow {\n flex: 1;\n}\n.band-plugin-react-prompt-drop {\n position: absolute;\n inset: 0;\n z-index: 24;\n display: grid;\n place-items: center;\n padding: 12px;\n text-align: center;\n border-radius: inherit;\n background: color-mix(in srgb, var(--accent-soft) 92%, transparent);\n color: var(--accent-text);\n font-size: var(--fs-ui);\n box-shadow: inset 0 0 0 1.5px var(--accent);\n pointer-events: none;\n}\n.band-plugin-react-prompt-preview {\n border: 0;\n padding: 10px;\n border-radius: var(--r-xl);\n background: var(--panel);\n color: var(--ink);\n box-shadow: var(--shadow-pop);\n max-width: min(960px, calc(100vw - 32px));\n max-height: calc(100vh - 64px);\n}\n.band-plugin-react-prompt-preview::backdrop {\n background: rgba(10, 12, 16, 0.5);\n}\n.band-plugin-react-prompt-preview-h {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 0 0 8px 4px;\n}\n.band-plugin-react-prompt-big {\n display: block;\n max-width: 100%;\n max-height: calc(100vh - 140px);\n margin: 0 auto;\n border-radius: var(--r);\n}\n.band-plugin-react-prompt-pre {\n margin: 0;\n padding: 10px 12px;\n border-radius: var(--r);\n background: var(--sunk);\n font-family: var(--mono);\n font-size: var(--fs-meta);\n white-space: pre-wrap;\n overflow: auto;\n overscroll-behavior: contain;\n max-height: calc(100vh - 160px);\n min-width: min(560px, calc(100vw - 64px));\n}\n@media (hover: hover) {\n .band-plugin-react-prompt-x:where(.band-plugin-react-prompt-card > *) {\n opacity: 0;\n }\n .band-plugin-react-prompt-x:where(.band-plugin-react-prompt-card:hover > *, .band-plugin-react-prompt-card:focus-within > *) {\n opacity: 1;\n }\n}\n@media (prefers-reduced-motion: reduce) {\n .band-plugin-react-prompt-x,\n .band-plugin-react-prompt-switch,\n .band-plugin-react-prompt-switch::after {\n transition: none;\n }\n}\n.band-plugin-react-prompt-box.composer textarea[aria-invalid=true] {\n box-shadow: inset 0 -2px 0 var(--bad);\n}\n.band-plugin-react-prompt-box.composer textarea[aria-invalid=true]::placeholder {\n color: var(--bad);\n}\n.band-plugin-react-prompt-import {\n display: grid;\n gap: 8px;\n padding: 12px;\n}\n.band-plugin-react-prompt-import p {\n margin: 0;\n color: var(--muted);\n font-size: var(--fs-ui);\n}\n.band-plugin-react-prompt-import-actions {\n display: flex;\n gap: 8px;\n justify-content: flex-end;\n}\n.band-plugin-react-prompt-card[data-compressed] {\n max-width: 320px;\n}\n.band-plugin-react-prompt-card[data-compressed] .band-plugin-react-prompt-open {\n padding: 6px 26px 6px 6px;\n}\n\n/* src/message/message.css */\n.band-plugin-react-msg {\n position: relative;\n display: grid;\n gap: 6px;\n min-width: 0;\n border-radius: var(--r);\n outline: none;\n}\n.band-plugin-react-msg:where(.fit) {\n justify-self: start;\n width: fit-content;\n max-width: 100%;\n}\n.band-plugin-react-msg:where(:focus-visible) {\n box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--accent);\n}\n.band-plugin-react-msg-bar {\n justify-self: end;\n z-index: 2;\n display: flex;\n gap: 2px;\n padding: 3px;\n background: var(--panel);\n border-radius: var(--r);\n box-shadow: var(--shadow-pop);\n opacity: 0;\n visibility: hidden;\n transition: opacity var(--sixteenth) var(--ease) var(--eighth), visibility 0s linear calc(var(--eighth) + var(--sixteenth));\n}\n:where(.band-plugin-react-msg:focus-within, .band-plugin-react-msg.open) > .band-plugin-react-msg-bar {\n opacity: 1;\n visibility: visible;\n transition: opacity var(--sixteenth) var(--ease);\n}\n@media (hover: hover) {\n :where(.band-plugin-react-msg:hover) > .band-plugin-react-msg-bar {\n opacity: 1;\n visibility: visible;\n transition: opacity var(--sixteenth) var(--ease);\n }\n}\n@media (hover: none) {\n .band-plugin-react-msg-bar {\n display: none;\n }\n}\n.band-plugin-react-msg-ib {\n width: 28px;\n height: 28px;\n display: inline-grid;\n place-items: center;\n border: 0;\n border-radius: 6px;\n background: none;\n color: var(--muted);\n padding: 0;\n transition: background var(--sixteenth) var(--ease);\n}\n.band-plugin-react-msg-ib:where(:hover, .on) {\n background: var(--fill-2);\n color: var(--ink);\n}\n.band-plugin-react-msg-ib:where(:focus-visible) {\n outline: none;\n box-shadow: 0 0 0 2px var(--accent);\n color: var(--ink);\n}\n.band-plugin-react-msg-ib:where(.done) {\n color: var(--ok);\n}\n:where(.band-plugin-react-msg-ib, .band-plugin-react-msg-mi, .band-plugin-react-msg-chip) svg {\n width: 16px;\n height: 16px;\n fill: none;\n stroke: currentColor;\n stroke-width: 1.5;\n stroke-linecap: round;\n stroke-linejoin: round;\n flex: none;\n}\n.band-plugin-react-msg-menu {\n position: fixed;\n z-index: 1000;\n width: 248px;\n max-width: calc(100vw - 32px);\n display: grid;\n gap: 2px;\n padding: 8px;\n background: var(--panel);\n border-radius: var(--r-lg);\n box-shadow: var(--shadow-pop);\n animation: band-plugin-react-msg-in var(--sixteenth) var(--ease);\n}\n@keyframes band-plugin-react-msg-in {\n from {\n opacity: 0;\n transform: translateY(-2px);\n }\n}\n.band-plugin-react-msg-emo {\n margin: 0;\n border: 0;\n min-width: 0;\n display: grid;\n grid-template-columns: repeat(6, 1fr);\n gap: 2px;\n padding: 2px 0 4px;\n}\n.band-plugin-react-msg-emo > button {\n height: 34px;\n display: grid;\n place-items: center;\n border: 0;\n border-radius: var(--r);\n background: none;\n font-size: 20px;\n line-height: 1;\n padding: 0;\n transition: background var(--sixteenth) var(--ease), transform var(--sixteenth) var(--ease);\n}\n.band-plugin-react-msg-emo > button:where(:hover) {\n background: var(--fill-2);\n transform: scale(1.08);\n}\n.band-plugin-react-msg-emo > button:where(.mine) {\n background: var(--accent-soft);\n box-shadow: inset 0 0 0 1px var(--accent);\n}\n.band-plugin-react-msg-emo > button:where(:focus-visible) {\n outline: none;\n box-shadow: 0 0 0 2px var(--accent);\n}\n.band-plugin-react-msg-sep {\n height: var(--hairline);\n margin: 2px 0 4px;\n background: var(--rule);\n}\n.band-plugin-react-msg-mi {\n display: flex;\n align-items: center;\n gap: 10px;\n width: 100%;\n padding: 6px 8px;\n border: 0;\n border-radius: var(--r-sm);\n background: none;\n color: var(--ink);\n font: inherit;\n font-size: var(--fs-body);\n text-align: left;\n}\n.band-plugin-react-msg-mi svg {\n stroke: var(--muted);\n}\n.band-plugin-react-msg-mi:where(:hover, :focus-visible) {\n outline: none;\n background: var(--fill-2);\n}\n.band-plugin-react-msg-rx {\n position: relative;\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n align-items: center;\n}\n.band-plugin-react-msg-chip {\n position: relative;\n display: inline-flex;\n align-items: center;\n gap: 5px;\n height: 26px;\n padding: 0 9px;\n border: 0;\n border-radius: 999px;\n background: var(--fill);\n color: var(--muted);\n font: inherit;\n font-size: var(--fs-ui);\n font-variant-numeric: tabular-nums;\n transition: background var(--sixteenth) var(--ease), opacity var(--sixteenth) var(--ease);\n}\nbutton.band-plugin-react-msg-chip:where(:hover) {\n background: var(--fill-2);\n}\n.band-plugin-react-msg-chip:where(.mine) {\n background: var(--accent-soft);\n color: var(--accent-text);\n box-shadow: inset 0 0 0 1px var(--accent);\n}\n.band-plugin-react-msg-chip:where(:focus-visible) {\n outline: none;\n box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--accent);\n}\n.band-plugin-react-msg-chip:where(.pending) {\n opacity: 0.6;\n}\n.band-plugin-react-msg-chip:where(.add) {\n padding: 0 7px;\n color: var(--muted);\n opacity: 0;\n}\n:where(.band-plugin-react-msg:hover, .band-plugin-react-msg:focus-within, .band-plugin-react-msg.open) .band-plugin-react-msg-chip:where(.add) {\n opacity: 1;\n}\n@media (hover: none) {\n .band-plugin-react-msg-chip:where(.add) {\n opacity: 1;\n }\n}\n.band-plugin-react-msg-e {\n font-size: var(--fs-lead);\n line-height: 1;\n}\n.band-plugin-react-msg-tip {\n position: absolute;\n left: 0;\n bottom: calc(100% + 6px);\n z-index: 4;\n white-space: nowrap;\n padding: 4px 8px;\n border-radius: var(--r-sm);\n background: var(--ink);\n color: var(--panel);\n font-size: var(--fs-meta);\n pointer-events: none;\n opacity: 0;\n visibility: hidden;\n transition: opacity var(--sixteenth) var(--ease);\n}\n:where(.band-plugin-react-msg-chip:hover, .band-plugin-react-msg-chip:focus-visible) > .band-plugin-react-msg-tip {\n opacity: 1;\n visibility: visible;\n}\n.band-plugin-react-msg-err {\n display: flex;\n gap: 6px;\n align-items: center;\n font-size: var(--fs-meta);\n color: var(--bad);\n}\n.band-plugin-react-msg-err > button {\n border: 0;\n padding: 0;\n background: none;\n color: var(--ink);\n font: inherit;\n text-decoration: underline;\n}\n.band-plugin-react-msg-sheetwrap {\n position: fixed;\n inset: 0;\n z-index: 1000;\n display: flex;\n flex-direction: column;\n justify-content: flex-end;\n gap: 12px;\n}\n.band-plugin-react-msg-scrim {\n position: absolute;\n inset: 0;\n border: 0;\n padding: 0;\n background: color-mix(in srgb, black 36%, transparent);\n animation: band-plugin-react-msg-fade var(--eighth) var(--ease);\n}\n.band-plugin-react-msg-lifted {\n position: relative;\n margin: 0 16px;\n max-height: 36vh;\n overflow: hidden;\n padding: 12px;\n display: grid;\n gap: 6px;\n background: var(--panel);\n border-radius: var(--r-lg);\n box-shadow: var(--shadow-pop);\n pointer-events: none;\n}\n.band-plugin-react-msg-sheet {\n position: relative;\n display: grid;\n gap: 2px;\n padding: 8px 12px calc(20px + env(safe-area-inset-bottom));\n background: var(--panel);\n border-radius: var(--r-xl) var(--r-xl) 0 0;\n box-shadow: var(--shadow-pop);\n animation: band-plugin-react-msg-rise var(--eighth) var(--ease);\n}\n.band-plugin-react-msg-grab {\n width: 36px;\n height: 4px;\n margin: 0 auto 10px;\n border-radius: 2px;\n background: var(--fill-3);\n}\n:where(.band-plugin-react-msg-sheet) .band-plugin-react-msg-emo {\n gap: 8px;\n padding-bottom: 10px;\n}\n:where(.band-plugin-react-msg-sheet) .band-plugin-react-msg-emo > button {\n height: 44px;\n font-size: 24px;\n background: var(--fill);\n}\n:where(.band-plugin-react-msg-sheet) .band-plugin-react-msg-emo > button:where(.mine) {\n background: var(--accent-soft);\n}\n:where(.band-plugin-react-msg-sheet) .band-plugin-react-msg-mi {\n padding: 12px 8px;\n font-size: var(--fs-lead);\n}\n@keyframes band-plugin-react-msg-fade {\n from {\n opacity: 0;\n }\n}\n@keyframes band-plugin-react-msg-rise {\n from {\n transform: translateY(24px);\n opacity: 0;\n }\n}\n@media (prefers-reduced-motion: reduce) {\n :where(.band-plugin-react-msg-menu, .band-plugin-react-msg-sheet, .band-plugin-react-msg-scrim, .band-plugin-react-msg-bar, .band-plugin-react-msg-chip) {\n animation: none;\n transition: none;\n }\n}\n.band-plugin-react-atts {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n margin: 0;\n padding: 0;\n list-style: none;\n min-width: 0;\n}\n.band-plugin-react-atts-thumb {\n display: block;\n padding: 0;\n border: 0;\n border-radius: var(--r-sm);\n background: var(--sunk);\n box-shadow: 0 0 0 1px var(--rule);\n overflow: hidden;\n cursor: zoom-in;\n}\n.band-plugin-react-atts-thumb:where(:hover) {\n box-shadow: 0 0 0 1px var(--rule-strong);\n}\n.band-plugin-react-atts-thumb:where(:hover) .band-plugin-react-atts-img {\n filter: brightness(0.94);\n}\n.band-plugin-react-atts-thumb:where(:focus-visible) {\n outline: none;\n box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--accent);\n}\n.band-plugin-react-atts-pending {\n display: block;\n width: 96px;\n height: 72px;\n border-radius: var(--r-sm);\n background: var(--sunk);\n box-shadow: 0 0 0 1px var(--rule);\n}\n.band-plugin-react-atts-pending[data-compact] {\n width: 40px;\n height: 30px;\n}\n.band-plugin-react-atts-img {\n display: block;\n max-width: 160px;\n max-height: 120px;\n min-width: 48px;\n min-height: 48px;\n object-fit: contain;\n}\n.band-plugin-react-atts-img:where([data-loading]) {\n width: 96px;\n height: 72px;\n background: var(--sunk);\n}\n.band-plugin-react-atts:where([data-compact]) {\n align-items: center;\n gap: 4px;\n}\n.band-plugin-react-atts:where([data-compact]) .band-plugin-react-atts-img {\n width: auto;\n height: 32px;\n min-width: 32px;\n max-width: 96px;\n min-height: 0;\n object-fit: cover;\n object-position: left top;\n border-radius: var(--r-sm);\n box-shadow: 0 0 0 1px var(--rule);\n}\n.band-plugin-react-atts-more {\n font-size: var(--fs-dense);\n color: var(--muted);\n}\n.band-plugin-react-atts-file {\n display: inline-grid;\n grid-template-columns: auto minmax(0, 1fr) auto auto;\n align-items: center;\n gap: 8px;\n max-width: 320px;\n padding: 6px 10px 6px 6px;\n border: 0;\n border-radius: var(--r-sm);\n background: var(--sunk);\n box-shadow: 0 0 0 1px var(--rule);\n color: var(--ink);\n font: inherit;\n font-size: var(--fs-dense);\n text-align: left;\n cursor: pointer;\n}\n.band-plugin-react-atts-file:where(:hover):not([data-deleted]) {\n background: var(--panel);\n}\n.band-plugin-react-atts-file[data-deleted] {\n color: var(--muted);\n cursor: default;\n}\n.band-plugin-react-atts-file:where(:focus-visible) {\n outline: none;\n box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--accent);\n}\n.band-plugin-react-atts-ext {\n display: grid;\n place-items: center;\n width: 32px;\n height: 32px;\n border-radius: var(--r-sm);\n background: var(--panel);\n color: var(--muted);\n font-size: 10px;\n font-weight: 600;\n letter-spacing: 0.02em;\n}\n.band-plugin-react-atts-name {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n text-autospace: no-autospace;\n}\n.band-plugin-react-atts-size,\n.band-plugin-react-atts-act,\n.band-plugin-react-atts-count {\n color: var(--muted);\n white-space: nowrap;\n}\n.band-plugin-react-atts-act {\n color: var(--accent-text);\n}\n.band-plugin-react-atts-wait {\n display: block;\n margin: 24px;\n color: var(--muted);\n}\n.band-plugin-react-atts-wait:where(div) {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n/* src/memory/memory.css */\n.band-plugin-react-memo {\n display: flex;\n align-items: flex-start;\n gap: 6px;\n width: fit-content;\n max-width: 100%;\n box-sizing: border-box;\n margin-top: 2px;\n border: 0;\n border-radius: 7px;\n padding: 5px 8px;\n background: var(--fill);\n color: var(--muted);\n font: inherit;\n font-size: var(--fs-dense);\n line-height: 1.5;\n text-align: left;\n cursor: pointer;\n transition: background var(--sixteenth) var(--ease), color var(--sixteenth) var(--ease);\n}\n.band-plugin-react-memo:where(:hover) {\n background: var(--fill-2);\n color: var(--ink);\n}\n.band-plugin-react-memo:where(:focus-visible) {\n outline: none;\n box-shadow: 0 0 0 2px var(--accent);\n}\n.band-plugin-react-memo > svg {\n flex: none;\n width: 14px;\n height: 14px;\n margin-top: 2px;\n fill: none;\n stroke: var(--muted);\n stroke-width: 1.4;\n stroke-linecap: round;\n stroke-linejoin: round;\n}\n.band-plugin-react-memo > span {\n min-width: 0;\n overflow-wrap: anywhere;\n}\n.band-plugin-react-memo-rejected {\n display: block;\n color: var(--warn);\n}\n\n/* src/toast/toast.css */\n.band-plugin-react-toast-stack {\n position: fixed;\n right: 20px;\n bottom: calc(60px + env(safe-area-inset-bottom, 0px));\n z-index: var(--layer-pop);\n width: min(340px, calc(100vw - 40px));\n display: grid;\n gap: 8px;\n}\n.band-plugin-react-toast {\n display: grid;\n grid-template-columns: 16px minmax(0, 1fr) auto;\n gap: 10px;\n align-items: center;\n padding: 10px 12px;\n border-radius: var(--r-lg);\n background: var(--panel);\n box-shadow: var(--shadow-pop);\n font-size: var(--fs-row);\n color: var(--ink);\n animation: band-plugin-react-toast-in var(--eighth) var(--ease);\n}\n@keyframes band-plugin-react-toast-in {\n from {\n opacity: 0;\n transform: translateY(6px);\n }\n to {\n opacity: 1;\n transform: none;\n }\n}\n.band-plugin-react-toast-again {\n animation: none;\n}\n.band-plugin-react-toast-icon {\n width: 16px;\n height: 16px;\n display: grid;\n place-items: center;\n border-radius: 50%;\n font-size: 10px;\n color: var(--panel);\n}\n.band-plugin-react-toast-icon:where(.ok) {\n background: var(--ok);\n}\n.band-plugin-react-toast-icon:where(.bad) {\n background: var(--bad);\n}\n.band-plugin-react-toast-icon:where(.busy) {\n border: 1.6px solid var(--accent);\n border-top-color: transparent;\n color: transparent;\n background: none;\n animation: band-plugin-react-toast-spin 900ms linear infinite;\n}\n@keyframes band-plugin-react-toast-spin {\n to {\n transform: rotate(360deg);\n }\n}\n.band-plugin-react-toast-text {\n min-width: 0;\n overflow-wrap: anywhere;\n}\n.band-plugin-react-toast-detail {\n display: block;\n color: var(--muted);\n font-size: var(--fs-meta);\n overflow-wrap: anywhere;\n}\n.band-plugin-react-toast-act {\n font-size: var(--fs-meta);\n color: var(--ink);\n background: none;\n border: 0;\n font-family: inherit;\n text-decoration: underline;\n padding: 2px 4px;\n border-radius: 4px;\n}\n.band-plugin-react-toast-act:focus-visible {\n outline: none;\n box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--accent);\n}\n@media (prefers-reduced-motion: reduce) {\n .band-plugin-react-toast,\n .band-plugin-react-toast-icon:where(.busy) {\n animation: none;\n }\n}\n\n/* src/status/status.css */\n.band-plugin-react-status {\n display: grid;\n gap: 2px;\n min-width: 0;\n padding: 0 2px 0 4px;\n font-size: var(--fs-dense);\n color: var(--muted);\n}\n.band-plugin-react-status-head {\n display: flex;\n align-items: center;\n gap: 6px;\n min-width: 0;\n color: var(--accent-text);\n}\n.band-plugin-react-status-who {\n font-weight: 600;\n}\n.band-plugin-react-status-context {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.band-plugin-react-status .band-plugin-react-status-glyph.glyph {\n --c: var(--accent);\n margin-left: 2px;\n}\n.band-plugin-react-status-spacer {\n flex: 1;\n}\n.band-plugin-react-status-elapsed {\n flex: none;\n color: var(--muted);\n font-variant-numeric: tabular-nums;\n}\n.band-plugin-react-status-note {\n padding-left: 22px;\n color: var(--ink);\n overflow-wrap: anywhere;\n}\n.band-plugin-react-status-action {\n padding-left: 22px;\n font-family: var(--mono);\n color: var(--muted);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.band-plugin-react-status-stall {\n padding-left: 22px;\n color: var(--warn);\n}\n.band-plugin-react-status-steps {\n display: grid;\n gap: 2px;\n margin: 0;\n padding: 0 0 0 22px;\n list-style: none;\n font-family: var(--mono);\n font-size: var(--fs-meta);\n color: var(--muted);\n}\n.band-plugin-react-status-steps > :where([data-state=done]) {\n color: var(--muted);\n}\n.band-plugin-react-status-steps > :where([data-state=now]) {\n color: var(--ink);\n}\n.band-plugin-react-status-stop {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 6px;\n padding-left: 26px;\n font-size: var(--fs-dense);\n}\n.band-plugin-react-status-stop-note {\n color: var(--muted);\n}\n.band-plugin-react-stopped {\n margin: 0;\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 6px;\n min-width: 0;\n padding: 0 2px 0 4px;\n font-size: var(--fs-row);\n color: var(--muted);\n}\n.band-plugin-react-stopped-text b {\n font-weight: 600;\n color: var(--ink);\n}\n.band-plugin-react-stopped-took {\n font-size: var(--fs-meta);\n font-variant-numeric: tabular-nums;\n}\n\n/* src/version-reference.css */\n.band-plugin-react-version-ref {\n display: inline-block;\n min-width: 0;\n max-width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n vertical-align: bottom;\n padding: 0;\n border: 0;\n background: none;\n color: inherit;\n font: inherit;\n text-align: left;\n}\n.band-plugin-react-version-ref:where(button) {\n cursor: pointer;\n text-decoration: underline;\n text-underline-offset: 2px;\n}\n.band-plugin-react-version-ref:where(:focus-visible) {\n outline: none;\n border-radius: var(--r-sm);\n box-shadow: 0 0 0 2px var(--accent);\n}\n";
3
+ const css = "/* src/ui.css */\n.band-plugin-react-error {\n font-size: var(--fs-ui);\n padding: 7px 10px;\n border-radius: 8px;\n background: var(--bad-soft);\n color: var(--bad);\n font-family: var(--mono);\n}\n.band-plugin-react-info {\n font-size: var(--fs-ui);\n padding: 7px 10px;\n border-radius: 8px;\n background: var(--panel);\n color: var(--muted);\n}\n.band-plugin-react-retry {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 10px;\n}\n.band-plugin-react-failed {\n display: grid;\n gap: 6px;\n justify-items: start;\n margin: auto;\n padding: 8px 10px;\n border-radius: var(--r);\n background: var(--bad-soft);\n color: var(--bad);\n font-size: var(--fs-ui);\n}\n.band-plugin-react-failed p {\n margin: 0;\n}\n.band-plugin-react-failed-title {\n font-weight: 600;\n}\n.band-plugin-react-failed-reason {\n overflow-wrap: anywhere;\n}\n.band-plugin-react-pane-head {\n padding: 6px 14px 6px 16px;\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n min-height: 36px;\n}\n.band-plugin-react-pane-title {\n margin: 0;\n font-size: var(--fs-dense);\n color: var(--muted);\n font-weight: 500;\n letter-spacing: 0.02em;\n}\n.band-plugin-react-wsicon {\n flex: none;\n display: block;\n}\n.band-plugin-react-wstile {\n --band-wstile: 16px;\n width: var(--band-wstile);\n height: var(--band-wstile);\n display: inline-grid;\n place-items: center;\n flex: none;\n border-radius: calc(var(--band-wstile) * 0.26);\n background: var(--panel);\n box-shadow: var(--shadow-card);\n}\n.band-plugin-react-wstile > :where(.band-plugin-react-wsicon) {\n width: 82%;\n height: 82%;\n}\n.band-plugin-react-wstile:where(.is-large) {\n border-radius: var(--r-xl);\n}\n.band-plugin-react-wstile:where(.is-large) > :where(.band-plugin-react-wsicon) {\n width: 76%;\n height: 76%;\n}\n.band-plugin-react-instrument {\n width: 72%;\n height: 72%;\n background: currentColor;\n -webkit-mask: var(--band-instrument) center / contain no-repeat;\n mask: var(--band-instrument) center / contain no-repeat;\n}\n.band-plugin-react-model-hint {\n margin: 0;\n}\n.band-plugin-react-target-repo {\n display: flex;\n flex-direction: column;\n gap: 2px;\n margin: 0;\n font-size: var(--fs-meta);\n line-height: 1.5;\n color: var(--muted);\n}\n.band-plugin-react-target-repo code {\n font-family: var(--mono);\n color: var(--ink);\n}\n.band-plugin-react-target-repo a {\n color: var(--accent-text);\n}\n.band-plugin-react-target-repo-request {\n align-self: flex-start;\n}\n.band-plugin-react-target-repo-err {\n color: var(--bad);\n}\n.band-plugin-react-first-delivery {\n display: flex;\n flex-direction: column;\n gap: 8px;\n flex-basis: 100%;\n padding: 12px;\n border: 1px solid var(--rule);\n border-radius: var(--r-lg);\n background: var(--panel);\n margin: 0;\n min-width: 0;\n}\n.band-plugin-react-first-delivery-slot {\n display: flex;\n flex-direction: column;\n gap: 4px;\n font-size: var(--fs-meta);\n}\n.band-plugin-react-first-delivery-pick,\n.band-plugin-react-first-delivery-file {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 8px;\n}\n.band-plugin-react-first-delivery-list {\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n.band-plugin-react-first-delivery-name {\n min-width: 0;\n overflow-wrap: anywhere;\n}\n.band-plugin-react-first-delivery-size {\n color: var(--muted);\n}\n.band-plugin-react-first-delivery-missing {\n margin: 0;\n font-size: var(--fs-meta);\n color: var(--muted);\n}\n.band-plugin-react-first-delivery .btn {\n align-self: flex-start;\n}\n.band-plugin-react-no-key {\n margin: 0;\n font-size: var(--fs-ui);\n color: var(--bad);\n}\n\n/* src/controls.css */\n.band-plugin-react-combo-field,\n.band-plugin-react-tags {\n position: relative;\n display: flex;\n flex-wrap: wrap;\n gap: 5px;\n align-items: center;\n padding: 5px 8px;\n border-radius: var(--r);\n background: var(--panel);\n box-shadow: inset 0 0 0 1px var(--control-edge);\n}\n.band-plugin-react-combo-field > :where(.field),\n.band-plugin-react-tags > :where(.field) {\n flex: 1 1 90px;\n min-width: 90px;\n width: auto;\n}\n.band-plugin-react-combo-picked {\n list-style: none;\n margin: 0 0 7px;\n padding: 0;\n display: flex;\n flex-wrap: wrap;\n gap: 5px;\n}\n.band-plugin-react-combo-chip,\n.band-plugin-react-filter-chip {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n height: 22px;\n padding: 0 4px 0 8px;\n border-radius: 999px;\n background: var(--fill-2);\n color: var(--ink);\n font-size: var(--fs-meta);\n white-space: nowrap;\n}\n.band-plugin-react-filter-chip {\n background: var(--accent-soft);\n color: var(--accent-text);\n}\n.band-plugin-react-combo-chip > button,\n.band-plugin-react-filter-chip > button {\n border: 0;\n background: none;\n color: inherit;\n font: inherit;\n line-height: 1;\n padding: 0 3px;\n border-radius: 999px;\n opacity: 0.85;\n}\n.band-plugin-react-combo-chip > button:where(:focus-visible),\n.band-plugin-react-filter-chip > button:where(:focus-visible) {\n outline: none;\n box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--accent);\n opacity: 1;\n}\n.band-plugin-react-combo-pop {\n position: absolute;\n left: 0;\n right: 0;\n top: calc(100% + 6px);\n z-index: var(--layer-pop);\n display: grid;\n gap: 1px;\n max-height: 236px;\n overflow: auto;\n overscroll-behavior: contain;\n padding: 5px;\n border-radius: var(--r-lg);\n background: var(--panel);\n box-shadow: var(--shadow-pop);\n}\n.band-plugin-react-combo-group {\n padding: 6px 8px 3px;\n font-size: var(--fs-badge);\n color: var(--muted);\n}\n.band-plugin-react-combo-opt {\n display: flex;\n align-items: center;\n gap: 8px;\n width: 100%;\n padding: 6px 8px;\n border: 0;\n border-radius: var(--r-sm);\n background: none;\n color: var(--ink);\n font: inherit;\n font-size: var(--fs-row);\n text-align: left;\n}\n.band-plugin-react-combo-opt:where(.is-active) {\n background: var(--fill-2);\n}\n.band-plugin-react-combo-opt:where(:focus-visible) {\n outline: none;\n box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--accent);\n}\n.band-plugin-react-combo-label {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.band-plugin-react-combo-label > mark {\n background: var(--accent-soft);\n color: var(--ink);\n border-radius: 2px;\n}\n.band-plugin-react-combo-meta {\n margin-left: auto;\n flex: none;\n font-family: var(--mono);\n font-size: var(--fs-badge);\n color: var(--muted);\n}\n.band-plugin-react-combo-plus {\n display: inline-grid;\n place-items: center;\n width: 20px;\n height: 20px;\n flex: none;\n border-radius: 50%;\n background: var(--fill-3);\n color: var(--muted);\n font-size: var(--fs-badge);\n}\n.band-plugin-react-combo-empty {\n padding: 8px;\n text-align: center;\n font-size: var(--fs-meta);\n color: var(--muted);\n}\n.band-plugin-react-tag {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n height: 22px;\n padding: 0 4px 0 8px;\n border-radius: 999px;\n background: var(--fill-2);\n color: var(--ink);\n font-size: var(--fs-meta);\n white-space: nowrap;\n}\n.band-plugin-react-tag:where([data-dup]) {\n background: var(--bad-soft);\n color: var(--bad);\n}\n.band-plugin-react-tag > button {\n border: 0;\n background: none;\n color: inherit;\n font: inherit;\n line-height: 1;\n padding: 0 3px;\n border-radius: 999px;\n opacity: 0.85;\n}\n.band-plugin-react-tag > button:where(:focus-visible) {\n outline: none;\n box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--accent);\n opacity: 1;\n}\n.band-plugin-react-tag-hint {\n margin: 5px 0 0;\n min-height: 16px;\n font-size: var(--fs-badge);\n color: var(--muted);\n}\n.band-plugin-react-tag-hint:where([data-err]) {\n color: var(--bad);\n}\n.band-plugin-react-filter {\n display: grid;\n gap: 2px;\n min-width: 0;\n}\n.band-plugin-react-filter-chips {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n align-items: center;\n margin-bottom: 8px;\n}\n.band-plugin-react-filter-clear {\n margin-left: auto;\n border: 0;\n background: none;\n padding: 0 2px;\n color: var(--muted);\n font: inherit;\n font-size: var(--fs-meta);\n text-decoration: underline;\n}\n.band-plugin-react-filter-clear:where(:focus-visible) {\n outline: none;\n box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--accent);\n border-radius: 4px;\n}\n.band-plugin-react-filter-group {\n display: flex;\n align-items: center;\n gap: 6px;\n width: 100%;\n padding: 7px 8px 3px;\n border: 0;\n border-radius: var(--r-sm);\n background: none;\n color: var(--muted);\n font: inherit;\n font-size: var(--fs-badge);\n text-align: left;\n}\n.band-plugin-react-filter-group:where(:focus-visible) {\n outline: none;\n box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--accent);\n}\n.band-plugin-react-filter-group::before {\n content: \"\\25b8\";\n width: 11px;\n flex: none;\n font-size: var(--fs-meta);\n line-height: 1;\n}\n.band-plugin-react-filter-group[aria-expanded=true]::before {\n content: \"\\25be\";\n}\n.band-plugin-react-filter-group-count {\n margin-left: auto;\n font-family: var(--mono);\n}\n.band-plugin-react-filter-opt {\n padding: 4px 8px;\n border-radius: var(--r-sm);\n}\n.band-plugin-react-filter-opt:where(:hover) {\n background: var(--fill);\n}\n.band-plugin-react-filter-count {\n margin-left: auto;\n font-family: var(--mono);\n font-size: var(--fs-badge);\n color: var(--muted);\n}\n.band-plugin-react-filter-empty {\n padding: 8px;\n font-size: var(--fs-meta);\n color: var(--muted);\n}\n\n/* src/prompt/prompt.css */\n.band-plugin-react-prompt {\n position: relative;\n display: grid;\n grid-template-columns: minmax(0, 1fr);\n gap: 6px;\n min-width: 0;\n}\n.band-plugin-react-prompt-box {\n position: relative;\n min-width: 0;\n}\n.band-plugin-react-prompt-box.composer {\n grid-template-columns: minmax(0, 1fr);\n}\n.band-plugin-react-prompt-box:where([data-variant=comment] *, [data-variant=reply] *) {\n border-radius: var(--r-lg);\n}\n.band-plugin-react-prompt-box.composer textarea:where([data-variant=comment] *, [data-variant=reply] *) {\n font-size: var(--fs-body);\n padding: 10px 12px 2px;\n}\n.band-plugin-react-prompt-note {\n padding: 6px 12px 12px;\n font-size: var(--fs-ui);\n color: var(--muted);\n}\n.band-plugin-react-prompt-notice {\n display: flex;\n align-items: flex-start;\n gap: 6px;\n font-size: var(--fs-dense);\n padding: 6px 6px 6px 10px;\n border-radius: var(--r);\n background: var(--fill);\n color: var(--muted);\n}\n.band-plugin-react-prompt-notice:where([role=alert]) {\n background: var(--bad-soft);\n color: var(--bad);\n}\n.band-plugin-react-prompt-notice > span {\n flex: 1;\n min-width: 0;\n}\n.band-plugin-react-prompt-notice-lines {\n display: flex;\n flex-direction: column;\n gap: 2px;\n overflow-wrap: anywhere;\n}\n.band-plugin-react-prompt-tray {\n list-style: none;\n margin: 0;\n padding: 12px 12px 0;\n display: flex;\n gap: 8px;\n overflow-x: auto;\n scrollbar-width: thin;\n}\n.band-plugin-react-prompt-card {\n position: relative;\n flex: none;\n display: flex;\n align-items: center;\n border-radius: var(--r-lg);\n background: var(--sunk);\n max-width: 220px;\n}\n.band-plugin-react-prompt-card:where([data-state=failed]) {\n background: var(--bad-soft);\n color: var(--bad);\n}\n.band-plugin-react-prompt-open {\n display: flex;\n align-items: center;\n gap: 8px;\n min-width: 0;\n padding: 6px 26px 6px 6px;\n border: 0;\n background: none;\n color: inherit;\n text-align: left;\n font: inherit;\n border-radius: inherit;\n}\n.band-plugin-react-prompt-open:where(:disabled) {\n cursor: default;\n}\n.band-plugin-react-prompt-open:where(:focus-visible) {\n outline: none;\n box-shadow: 0 0 0 2px var(--accent);\n}\n.band-plugin-react-prompt-open:where([data-kind=image] *) {\n padding: 0;\n}\n.band-plugin-react-prompt-thumb {\n width: auto;\n min-width: 40px;\n max-width: 140px;\n height: 56px;\n object-fit: cover;\n border-radius: var(--r-lg);\n display: block;\n}\n.band-plugin-react-prompt-icon {\n flex: none;\n width: 36px;\n height: 40px;\n border-radius: var(--r-sm);\n background: var(--panel);\n display: grid;\n place-items: center;\n font-family: var(--mono);\n font-size: 10.5px;\n color: var(--muted);\n box-shadow: 0 0 0 var(--hairline) var(--rule);\n}\n.band-plugin-react-prompt-meta {\n display: grid;\n min-width: 0;\n text-align: left;\n}\n.band-plugin-react-prompt-name {\n font-size: var(--fs-ui);\n color: var(--ink);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.band-plugin-react-prompt-file {\n text-autospace: no-autospace;\n}\n.band-plugin-react-prompt-d {\n font-size: var(--fs-meta);\n color: var(--muted);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.band-plugin-react-prompt-quote {\n display: -webkit-box;\n white-space: normal;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n}\n.band-plugin-react-prompt-d:where([data-state=failed] *) {\n color: var(--bad);\n}\n.band-plugin-react-prompt-progress {\n position: absolute;\n inset: 0;\n display: grid;\n place-items: center;\n border-radius: inherit;\n background: color-mix(in srgb, var(--panel) 55%, transparent);\n color: var(--accent-text);\n}\n.band-plugin-react-prompt-progress:where([data-kind=file] *) {\n inset: auto 30px auto auto;\n background: none;\n}\n.band-plugin-react-prompt-retry {\n border: 0;\n background: none;\n color: var(--bad);\n font: inherit;\n font-size: var(--fs-meta);\n padding: 2px 6px;\n margin: 0 22px 0 6px;\n border-radius: var(--r-sm);\n}\n.band-plugin-react-prompt-retry:where(:hover) {\n background: var(--fill-2);\n}\n.band-plugin-react-prompt-x:where(.band-plugin-react-prompt-card > *) {\n position: absolute;\n top: 3px;\n right: 3px;\n}\n.band-plugin-react-prompt-x {\n width: 20px;\n height: 20px;\n display: inline-grid;\n place-items: center;\n border: 0;\n border-radius: 50%;\n background: none;\n color: var(--muted);\n font-size: var(--fs-body);\n line-height: 1;\n flex: none;\n transition: background var(--sixteenth) var(--ease), color var(--sixteenth) var(--ease);\n}\n.band-plugin-react-prompt-x:where(:hover, :focus-visible) {\n background: var(--fill-3);\n color: var(--ink);\n outline: none;\n}\n.band-plugin-react-prompt-x:where([data-kind=image] > *) {\n background: color-mix(in srgb, var(--panel) 85%, transparent);\n color: var(--ink);\n}\n.band-plugin-react-prompt-chips {\n list-style: none;\n margin: 0;\n padding: 4px 14px 0;\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n}\n.band-plugin-react-prompt-chip.chip {\n background: var(--fill-2);\n color: var(--ink);\n padding: 1px 2px 1px 8px;\n gap: 3px;\n}\n.band-plugin-react-prompt-chip:where([data-kind=cap]) {\n background: var(--accent-soft);\n color: var(--accent-text);\n}\n.band-plugin-react-prompt-chip:where([data-kind=conn]) {\n padding-right: 8px;\n}\n.band-plugin-react-prompt-sigil {\n font-family: var(--mono);\n color: var(--muted);\n}\n.band-plugin-react-prompt-sigil:where([data-kind=cap] *) {\n color: inherit;\n}\n.band-plugin-react-prompt-cands.mention {\n position: absolute;\n z-index: 25;\n left: 10px;\n right: 10px;\n bottom: calc(100% + 6px);\n max-height: 280px;\n overflow-y: auto;\n overscroll-behavior: contain;\n}\n.band-plugin-react-prompt-cands.mention:where([data-variant=comment] *, [data-variant=reply] *) {\n position: static;\n margin: 6px 8px;\n box-shadow: 0 0 0 var(--hairline) var(--rule);\n}\n.band-plugin-react-prompt-cands-h {\n font-size: var(--fs-caption);\n color: var(--muted);\n padding: 4px 8px 2px;\n}\n.band-plugin-react-prompt-empty {\n font-size: var(--fs-ui);\n color: var(--muted);\n padding: 6px 8px 8px;\n}\n.band-plugin-react-prompt-option:where([aria-selected=true]) {\n background: var(--sunk);\n}\n.band-plugin-react-prompt-bar {\n position: relative;\n min-width: 0;\n}\n.band-plugin-react-prompt-bar.composer-bar {\n flex-wrap: nowrap;\n}\n.band-plugin-react-prompt-anchor {\n position: relative;\n display: inline-flex;\n}\n.band-plugin-react-prompt-capbtn.btn {\n font-family: var(--mono);\n font-size: var(--fs-dense);\n}\n.band-plugin-react-prompt-hint {\n font-size: var(--fs-meta);\n color: var(--muted);\n padding: 0 8px;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n@media (max-width: 860px) {\n .band-plugin-react-prompt-hint:not([data-notice]) {\n display: none;\n }\n}\n.band-plugin-react-prompt-send:where([data-waiting]) {\n background: var(--fill-3);\n color: var(--ink);\n}\n.band-plugin-react-prompt-ring {\n display: block;\n}\n.band-plugin-react-prompt-menu {\n position: absolute;\n z-index: 26;\n left: 0;\n bottom: calc(100% + 6px);\n min-width: 248px;\n max-width: min(320px, calc(100vw - 32px));\n max-height: 360px;\n overflow-y: auto;\n overscroll-behavior: contain;\n padding: 4px;\n border-radius: 10px;\n background: var(--panel);\n box-shadow: var(--shadow-pop);\n display: grid;\n outline: none;\n}\n.band-plugin-react-prompt-item {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 7px 8px;\n border: 0;\n border-radius: 7px;\n background: none;\n color: var(--ink);\n font: inherit;\n font-size: var(--fs-ui);\n text-align: left;\n text-decoration: none;\n}\n.band-plugin-react-prompt-item:where(:hover, :focus-visible) {\n background: var(--sunk);\n outline: none;\n}\n.band-plugin-react-prompt-item:where(:disabled) {\n color: var(--muted);\n background: none;\n opacity: 0.42;\n}\n.band-plugin-react-prompt-meta:where(.band-plugin-react-prompt-item > *) {\n flex: 1;\n}\n.band-plugin-react-prompt-check {\n width: 14px;\n flex: none;\n color: var(--accent-text);\n}\n.band-plugin-react-prompt-sep {\n border: 0;\n height: var(--hairline);\n background: var(--rule);\n margin: 4px 6px;\n}\n.band-plugin-react-prompt-group {\n font-size: var(--fs-caption);\n color: var(--muted);\n padding: 4px 8px 2px;\n}\n.band-plugin-react-prompt-switch {\n flex: none;\n width: 28px;\n height: 16px;\n border-radius: 999px;\n background: var(--fill-3);\n position: relative;\n transition: background var(--sixteenth) var(--ease);\n}\n.band-plugin-react-prompt-switch::after {\n content: \"\";\n position: absolute;\n top: 2px;\n left: 2px;\n width: 12px;\n height: 12px;\n border-radius: 50%;\n background: var(--panel);\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);\n transition: transform var(--sixteenth) var(--ease);\n}\n.band-plugin-react-prompt-switch:where([data-on]) {\n background: var(--primary);\n}\n.band-plugin-react-prompt-switch:where([data-on])::after {\n transform: translateX(12px);\n}\n.band-plugin-react-prompt-source {\n margin: 6px 10px 0;\n padding: 8px;\n border-radius: var(--r-lg);\n background: var(--sunk);\n display: grid;\n gap: 6px;\n}\n.band-plugin-react-prompt-source-h {\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: var(--fs-ui);\n}\n:where(.band-plugin-react-prompt-source-h, .band-plugin-react-prompt-preview-h) > .grow {\n flex: 1;\n}\n.band-plugin-react-prompt-drop {\n position: absolute;\n inset: 0;\n z-index: 24;\n display: grid;\n place-items: center;\n padding: 12px;\n text-align: center;\n border-radius: inherit;\n background: color-mix(in srgb, var(--accent-soft) 92%, transparent);\n color: var(--accent-text);\n font-size: var(--fs-ui);\n box-shadow: inset 0 0 0 1.5px var(--accent);\n pointer-events: none;\n}\n.band-plugin-react-prompt-preview {\n border: 0;\n padding: 10px;\n border-radius: var(--r-xl);\n background: var(--panel);\n color: var(--ink);\n box-shadow: var(--shadow-pop);\n max-width: min(960px, calc(100vw - 32px));\n max-height: calc(100vh - 64px);\n}\n.band-plugin-react-prompt-preview::backdrop {\n background: rgba(10, 12, 16, 0.5);\n}\n.band-plugin-react-prompt-preview-h {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 0 0 8px 4px;\n}\n.band-plugin-react-prompt-big {\n display: block;\n max-width: 100%;\n max-height: calc(100vh - 140px);\n margin: 0 auto;\n border-radius: var(--r);\n}\n.band-plugin-react-prompt-pre {\n margin: 0;\n padding: 10px 12px;\n border-radius: var(--r);\n background: var(--sunk);\n font-family: var(--mono);\n font-size: var(--fs-meta);\n white-space: pre-wrap;\n overflow: auto;\n overscroll-behavior: contain;\n max-height: calc(100vh - 160px);\n min-width: min(560px, calc(100vw - 64px));\n}\n@media (hover: hover) {\n .band-plugin-react-prompt-x:where(.band-plugin-react-prompt-card > *) {\n opacity: 0;\n }\n .band-plugin-react-prompt-x:where(.band-plugin-react-prompt-card:hover > *, .band-plugin-react-prompt-card:focus-within > *) {\n opacity: 1;\n }\n}\n@media (prefers-reduced-motion: reduce) {\n .band-plugin-react-prompt-x,\n .band-plugin-react-prompt-switch,\n .band-plugin-react-prompt-switch::after {\n transition: none;\n }\n}\n.band-plugin-react-prompt-box.composer textarea[aria-invalid=true] {\n box-shadow: inset 0 -2px 0 var(--bad);\n}\n.band-plugin-react-prompt-box.composer textarea[aria-invalid=true]::placeholder {\n color: var(--bad);\n}\n.band-plugin-react-prompt-import {\n display: grid;\n gap: 8px;\n padding: 12px;\n}\n.band-plugin-react-prompt-import p {\n margin: 0;\n color: var(--muted);\n font-size: var(--fs-ui);\n}\n.band-plugin-react-prompt-import-actions {\n display: flex;\n gap: 8px;\n justify-content: flex-end;\n}\n.band-plugin-react-prompt-card[data-compressed] {\n max-width: 320px;\n}\n.band-plugin-react-prompt-card[data-compressed] .band-plugin-react-prompt-open {\n padding: 6px 26px 6px 6px;\n}\n\n/* src/message/message.css */\n.band-plugin-react-msg {\n position: relative;\n display: grid;\n gap: 6px;\n min-width: 0;\n border-radius: var(--r);\n outline: none;\n}\n.band-plugin-react-msg:where(.fit) {\n justify-self: start;\n width: fit-content;\n max-width: 100%;\n}\n.band-plugin-react-msg:where(:focus-visible) {\n box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--accent);\n}\n.band-plugin-react-msg-bar {\n justify-self: end;\n z-index: 2;\n display: flex;\n gap: 2px;\n padding: 3px;\n background: var(--panel);\n border-radius: var(--r);\n box-shadow: var(--shadow-pop);\n opacity: 0;\n visibility: hidden;\n transition: opacity var(--sixteenth) var(--ease) var(--eighth), visibility 0s linear calc(var(--eighth) + var(--sixteenth));\n}\n:where(.band-plugin-react-msg:focus-within, .band-plugin-react-msg.open) > .band-plugin-react-msg-bar {\n opacity: 1;\n visibility: visible;\n transition: opacity var(--sixteenth) var(--ease);\n}\n@media (hover: hover) {\n :where(.band-plugin-react-msg:hover) > .band-plugin-react-msg-bar {\n opacity: 1;\n visibility: visible;\n transition: opacity var(--sixteenth) var(--ease);\n }\n}\n@media (hover: none) {\n .band-plugin-react-msg-bar {\n display: none;\n }\n}\n.band-plugin-react-msg-ib {\n width: 28px;\n height: 28px;\n display: inline-grid;\n place-items: center;\n border: 0;\n border-radius: 6px;\n background: none;\n color: var(--muted);\n padding: 0;\n transition: background var(--sixteenth) var(--ease);\n}\n.band-plugin-react-msg-ib:where(:hover, .on) {\n background: var(--fill-2);\n color: var(--ink);\n}\n.band-plugin-react-msg-ib:where(:focus-visible) {\n outline: none;\n box-shadow: 0 0 0 2px var(--accent);\n color: var(--ink);\n}\n.band-plugin-react-msg-ib:where(.done) {\n color: var(--ok);\n}\n:where(.band-plugin-react-msg-ib, .band-plugin-react-msg-mi, .band-plugin-react-msg-chip) svg {\n width: 16px;\n height: 16px;\n fill: none;\n stroke: currentColor;\n stroke-width: 1.5;\n stroke-linecap: round;\n stroke-linejoin: round;\n flex: none;\n}\n.band-plugin-react-msg-menu {\n position: fixed;\n z-index: 1000;\n width: 248px;\n max-width: calc(100vw - 32px);\n display: grid;\n gap: 2px;\n padding: 8px;\n background: var(--panel);\n border-radius: var(--r-lg);\n box-shadow: var(--shadow-pop);\n animation: band-plugin-react-msg-in var(--sixteenth) var(--ease);\n}\n@keyframes band-plugin-react-msg-in {\n from {\n opacity: 0;\n transform: translateY(-2px);\n }\n}\n.band-plugin-react-msg-emo {\n margin: 0;\n border: 0;\n min-width: 0;\n display: grid;\n grid-template-columns: repeat(6, 1fr);\n gap: 2px;\n padding: 2px 0 4px;\n}\n.band-plugin-react-msg-emo > button {\n height: 34px;\n display: grid;\n place-items: center;\n border: 0;\n border-radius: var(--r);\n background: none;\n font-size: 20px;\n line-height: 1;\n padding: 0;\n transition: background var(--sixteenth) var(--ease), transform var(--sixteenth) var(--ease);\n}\n.band-plugin-react-msg-emo > button:where(:hover) {\n background: var(--fill-2);\n transform: scale(1.08);\n}\n.band-plugin-react-msg-emo > button:where(.mine) {\n background: var(--accent-soft);\n box-shadow: inset 0 0 0 1px var(--accent);\n}\n.band-plugin-react-msg-emo > button:where(:focus-visible) {\n outline: none;\n box-shadow: 0 0 0 2px var(--accent);\n}\n.band-plugin-react-msg-sep {\n height: var(--hairline);\n margin: 2px 0 4px;\n background: var(--rule);\n}\n.band-plugin-react-msg-mi {\n display: flex;\n align-items: center;\n gap: 10px;\n width: 100%;\n padding: 6px 8px;\n border: 0;\n border-radius: var(--r-sm);\n background: none;\n color: var(--ink);\n font: inherit;\n font-size: var(--fs-body);\n text-align: left;\n}\n.band-plugin-react-msg-mi svg {\n stroke: var(--muted);\n}\n.band-plugin-react-msg-mi:where(:hover, :focus-visible) {\n outline: none;\n background: var(--fill-2);\n}\n.band-plugin-react-msg-rx {\n position: relative;\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n align-items: center;\n}\n.band-plugin-react-msg-chip {\n position: relative;\n display: inline-flex;\n align-items: center;\n gap: 5px;\n height: 26px;\n padding: 0 9px;\n border: 0;\n border-radius: 999px;\n background: var(--fill);\n color: var(--muted);\n font: inherit;\n font-size: var(--fs-ui);\n font-variant-numeric: tabular-nums;\n transition: background var(--sixteenth) var(--ease), opacity var(--sixteenth) var(--ease);\n}\nbutton.band-plugin-react-msg-chip:where(:hover) {\n background: var(--fill-2);\n}\n.band-plugin-react-msg-chip:where(.mine) {\n background: var(--accent-soft);\n color: var(--accent-text);\n box-shadow: inset 0 0 0 1px var(--accent);\n}\n.band-plugin-react-msg-chip:where(:focus-visible) {\n outline: none;\n box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--accent);\n}\n.band-plugin-react-msg-chip:where(.pending) {\n opacity: 0.6;\n}\n.band-plugin-react-msg-chip:where(.add) {\n padding: 0 7px;\n color: var(--muted);\n opacity: 0;\n}\n:where(.band-plugin-react-msg:hover, .band-plugin-react-msg:focus-within, .band-plugin-react-msg.open) .band-plugin-react-msg-chip:where(.add) {\n opacity: 1;\n}\n@media (hover: none) {\n .band-plugin-react-msg-chip:where(.add) {\n opacity: 1;\n }\n}\n.band-plugin-react-msg-e {\n font-size: var(--fs-lead);\n line-height: 1;\n}\n.band-plugin-react-msg-tip {\n position: absolute;\n left: 0;\n bottom: calc(100% + 6px);\n z-index: 4;\n white-space: nowrap;\n padding: 4px 8px;\n border-radius: var(--r-sm);\n background: var(--ink);\n color: var(--panel);\n font-size: var(--fs-meta);\n pointer-events: none;\n opacity: 0;\n visibility: hidden;\n transition: opacity var(--sixteenth) var(--ease);\n}\n:where(.band-plugin-react-msg-chip:hover, .band-plugin-react-msg-chip:focus-visible) > .band-plugin-react-msg-tip {\n opacity: 1;\n visibility: visible;\n}\n.band-plugin-react-msg-err {\n display: flex;\n gap: 6px;\n align-items: center;\n font-size: var(--fs-meta);\n color: var(--bad);\n}\n.band-plugin-react-msg-err > button {\n border: 0;\n padding: 0;\n background: none;\n color: var(--ink);\n font: inherit;\n text-decoration: underline;\n}\n.band-plugin-react-msg-sheetwrap {\n position: fixed;\n inset: 0;\n z-index: 1000;\n display: flex;\n flex-direction: column;\n justify-content: flex-end;\n gap: 12px;\n}\n.band-plugin-react-msg-scrim {\n position: absolute;\n inset: 0;\n border: 0;\n padding: 0;\n background: color-mix(in srgb, black 36%, transparent);\n animation: band-plugin-react-msg-fade var(--eighth) var(--ease);\n}\n.band-plugin-react-msg-lifted {\n position: relative;\n margin: 0 16px;\n max-height: 36vh;\n overflow: hidden;\n padding: 12px;\n display: grid;\n gap: 6px;\n background: var(--panel);\n border-radius: var(--r-lg);\n box-shadow: var(--shadow-pop);\n pointer-events: none;\n}\n.band-plugin-react-msg-sheet {\n position: relative;\n display: grid;\n gap: 2px;\n padding: 8px 12px calc(20px + env(safe-area-inset-bottom));\n background: var(--panel);\n border-radius: var(--r-xl) var(--r-xl) 0 0;\n box-shadow: var(--shadow-pop);\n animation: band-plugin-react-msg-rise var(--eighth) var(--ease);\n}\n.band-plugin-react-msg-grab {\n width: 36px;\n height: 4px;\n margin: 0 auto 10px;\n border-radius: 2px;\n background: var(--fill-3);\n}\n:where(.band-plugin-react-msg-sheet) .band-plugin-react-msg-emo {\n gap: 8px;\n padding-bottom: 10px;\n}\n:where(.band-plugin-react-msg-sheet) .band-plugin-react-msg-emo > button {\n height: 44px;\n font-size: 24px;\n background: var(--fill);\n}\n:where(.band-plugin-react-msg-sheet) .band-plugin-react-msg-emo > button:where(.mine) {\n background: var(--accent-soft);\n}\n:where(.band-plugin-react-msg-sheet) .band-plugin-react-msg-mi {\n padding: 12px 8px;\n font-size: var(--fs-lead);\n}\n@keyframes band-plugin-react-msg-fade {\n from {\n opacity: 0;\n }\n}\n@keyframes band-plugin-react-msg-rise {\n from {\n transform: translateY(24px);\n opacity: 0;\n }\n}\n@media (prefers-reduced-motion: reduce) {\n :where(.band-plugin-react-msg-menu, .band-plugin-react-msg-sheet, .band-plugin-react-msg-scrim, .band-plugin-react-msg-bar, .band-plugin-react-msg-chip) {\n animation: none;\n transition: none;\n }\n}\n.band-plugin-react-atts {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n margin: 0;\n padding: 0;\n list-style: none;\n min-width: 0;\n}\n.band-plugin-react-atts-thumb {\n display: block;\n padding: 0;\n border: 0;\n border-radius: var(--r-sm);\n background: var(--sunk);\n box-shadow: 0 0 0 1px var(--rule);\n overflow: hidden;\n cursor: zoom-in;\n}\n.band-plugin-react-atts-thumb:where(:hover) {\n box-shadow: 0 0 0 1px var(--rule-strong);\n}\n.band-plugin-react-atts-thumb:where(:hover) .band-plugin-react-atts-img {\n filter: brightness(0.94);\n}\n.band-plugin-react-atts-thumb:where(:focus-visible) {\n outline: none;\n box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--accent);\n}\n.band-plugin-react-atts-pending {\n display: block;\n width: 96px;\n height: 72px;\n border-radius: var(--r-sm);\n background: var(--sunk);\n box-shadow: 0 0 0 1px var(--rule);\n}\n.band-plugin-react-atts-pending[data-compact] {\n width: 40px;\n height: 30px;\n}\n.band-plugin-react-atts-img {\n display: block;\n max-width: 160px;\n max-height: 120px;\n min-width: 48px;\n min-height: 48px;\n object-fit: contain;\n}\n.band-plugin-react-atts-img:where([data-loading]) {\n width: 96px;\n height: 72px;\n background: var(--sunk);\n}\n.band-plugin-react-atts:where([data-compact]) {\n align-items: center;\n gap: 4px;\n}\n.band-plugin-react-atts:where([data-compact]) .band-plugin-react-atts-img {\n width: auto;\n height: 32px;\n min-width: 32px;\n max-width: 96px;\n min-height: 0;\n object-fit: cover;\n object-position: left top;\n border-radius: var(--r-sm);\n box-shadow: 0 0 0 1px var(--rule);\n}\n.band-plugin-react-atts-more {\n font-size: var(--fs-dense);\n color: var(--muted);\n}\n.band-plugin-react-atts-file {\n display: inline-grid;\n grid-template-columns: auto minmax(0, 1fr) auto auto;\n align-items: center;\n gap: 8px;\n max-width: 320px;\n padding: 6px 10px 6px 6px;\n border: 0;\n border-radius: var(--r-sm);\n background: var(--sunk);\n box-shadow: 0 0 0 1px var(--rule);\n color: var(--ink);\n font: inherit;\n font-size: var(--fs-dense);\n text-align: left;\n cursor: pointer;\n}\n.band-plugin-react-atts-file:where(:hover):not([data-deleted]) {\n background: var(--panel);\n}\n.band-plugin-react-atts-file[data-deleted] {\n color: var(--muted);\n cursor: default;\n}\n.band-plugin-react-atts-file:where(:focus-visible) {\n outline: none;\n box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--accent);\n}\n.band-plugin-react-atts-ext {\n display: grid;\n place-items: center;\n width: 32px;\n height: 32px;\n border-radius: var(--r-sm);\n background: var(--panel);\n color: var(--muted);\n font-size: 10px;\n font-weight: 600;\n letter-spacing: 0.02em;\n}\n.band-plugin-react-atts-name {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n text-autospace: no-autospace;\n}\n.band-plugin-react-atts-size,\n.band-plugin-react-atts-act,\n.band-plugin-react-atts-count {\n color: var(--muted);\n white-space: nowrap;\n}\n.band-plugin-react-atts-act {\n color: var(--accent-text);\n}\n.band-plugin-react-atts-wait {\n display: block;\n margin: 24px;\n color: var(--muted);\n}\n.band-plugin-react-atts-wait:where(div) {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n/* src/memory/memory.css */\n.band-plugin-react-memo {\n display: flex;\n align-items: flex-start;\n gap: 6px;\n width: fit-content;\n max-width: 100%;\n box-sizing: border-box;\n margin-top: 2px;\n border: 0;\n border-radius: 7px;\n padding: 5px 8px;\n background: var(--fill);\n color: var(--muted);\n font: inherit;\n font-size: var(--fs-dense);\n line-height: 1.5;\n text-align: left;\n cursor: pointer;\n transition: background var(--sixteenth) var(--ease), color var(--sixteenth) var(--ease);\n}\n.band-plugin-react-memo:where(:hover) {\n background: var(--fill-2);\n color: var(--ink);\n}\n.band-plugin-react-memo:where(:focus-visible) {\n outline: none;\n box-shadow: 0 0 0 2px var(--accent);\n}\n.band-plugin-react-memo > svg {\n flex: none;\n width: 14px;\n height: 14px;\n margin-top: 2px;\n fill: none;\n stroke: var(--muted);\n stroke-width: 1.4;\n stroke-linecap: round;\n stroke-linejoin: round;\n}\n.band-plugin-react-memo > span {\n min-width: 0;\n overflow-wrap: anywhere;\n}\n.band-plugin-react-memo-rejected {\n display: block;\n color: var(--warn);\n}\n\n/* src/toast/toast.css */\n.band-plugin-react-toast-stack {\n position: fixed;\n right: 20px;\n bottom: calc(60px + env(safe-area-inset-bottom, 0px));\n z-index: var(--layer-pop);\n width: min(340px, calc(100vw - 40px));\n display: grid;\n gap: 8px;\n}\n.band-plugin-react-toast {\n display: grid;\n grid-template-columns: 16px minmax(0, 1fr) auto;\n gap: 10px;\n align-items: center;\n padding: 10px 12px;\n border-radius: var(--r-lg);\n background: var(--panel);\n box-shadow: var(--shadow-pop);\n font-size: var(--fs-row);\n color: var(--ink);\n animation: band-plugin-react-toast-in var(--eighth) var(--ease);\n}\n@keyframes band-plugin-react-toast-in {\n from {\n opacity: 0;\n transform: translateY(6px);\n }\n to {\n opacity: 1;\n transform: none;\n }\n}\n.band-plugin-react-toast-again {\n animation: none;\n}\n.band-plugin-react-toast-icon {\n width: 16px;\n height: 16px;\n display: grid;\n place-items: center;\n border-radius: 50%;\n font-size: 10px;\n color: var(--panel);\n}\n.band-plugin-react-toast-icon:where(.ok) {\n background: var(--ok);\n}\n.band-plugin-react-toast-icon:where(.bad) {\n background: var(--bad);\n}\n.band-plugin-react-toast-icon:where(.busy) {\n border: 1.6px solid var(--accent);\n border-top-color: transparent;\n color: transparent;\n background: none;\n animation: band-plugin-react-toast-spin 900ms linear infinite;\n}\n@keyframes band-plugin-react-toast-spin {\n to {\n transform: rotate(360deg);\n }\n}\n.band-plugin-react-toast-text {\n min-width: 0;\n overflow-wrap: anywhere;\n}\n.band-plugin-react-toast-detail {\n display: block;\n color: var(--muted);\n font-size: var(--fs-meta);\n overflow-wrap: anywhere;\n}\n.band-plugin-react-toast-act {\n font-size: var(--fs-meta);\n color: var(--ink);\n background: none;\n border: 0;\n font-family: inherit;\n text-decoration: underline;\n padding: 2px 4px;\n border-radius: 4px;\n}\n.band-plugin-react-toast-act:focus-visible {\n outline: none;\n box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--accent);\n}\n@media (prefers-reduced-motion: reduce) {\n .band-plugin-react-toast,\n .band-plugin-react-toast-icon:where(.busy) {\n animation: none;\n }\n}\n\n/* src/person-picker.css */\n.band-plugin-react-pp-picker {\n display: grid;\n gap: 8px;\n min-width: 0;\n}\n.band-plugin-react-pp-people {\n list-style: none;\n margin: 0;\n padding: 0;\n display: grid;\n gap: 2px;\n}\n.band-plugin-react-pp-person {\n display: flex;\n align-items: center;\n gap: 10px;\n min-height: 44px;\n padding: 4px 6px;\n border-radius: var(--r-sm);\n}\n.band-plugin-react-pp-person:where(:hover) {\n background: var(--fill);\n}\n.band-plugin-react-pp-empty {\n padding: 10px 6px;\n color: var(--muted);\n font-size: var(--fs-row);\n}\n.band-plugin-react-pp-confirm {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n font-size: var(--fs-dense);\n color: var(--ink);\n white-space: nowrap;\n}\n.band-plugin-react-pp-count {\n font-size: var(--fs-meta);\n color: var(--muted);\n}\n.band-plugin-react-pp {\n position: relative;\n min-width: 0;\n}\n.band-plugin-react-pp-field {\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 3px 8px;\n border-radius: var(--r);\n background: var(--panel);\n box-shadow: inset 0 0 0 1px var(--control-edge);\n}\n.band-plugin-react-pp-field > :where(.field) {\n flex: 1 1 auto;\n min-width: 0;\n}\n.band-plugin-react-pp-icon {\n width: 14px;\n height: 14px;\n flex: none;\n fill: none;\n stroke: var(--muted);\n stroke-width: 1.5;\n stroke-linecap: round;\n}\n.band-plugin-react-pp-notice {\n display: block;\n margin-top: 6px;\n font-size: var(--fs-meta);\n color: var(--muted);\n}\n.band-plugin-react-pp-pop {\n position: absolute;\n left: 0;\n right: 0;\n top: calc(100% + 6px);\n z-index: var(--layer-pop);\n display: grid;\n gap: 4px;\n padding: 5px;\n border-radius: var(--r-lg);\n background: var(--panel);\n box-shadow: var(--shadow-pop);\n}\n.band-plugin-react-pp-list {\n display: grid;\n gap: 1px;\n max-height: 320px;\n overflow: auto;\n overscroll-behavior: contain;\n}\n.band-plugin-react-pp-fallback {\n padding: 7px 8px;\n border-radius: var(--r-sm);\n background: var(--sunk);\n color: var(--muted);\n font-size: var(--fs-meta);\n}\n.band-plugin-react-pp-trail {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 2px 4px;\n padding: 4px 6px 2px;\n font-size: var(--fs-meta);\n color: var(--muted);\n}\n.band-plugin-react-pp-trail > span {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n}\n.band-plugin-react-pp-trail button {\n border: 0;\n background: none;\n padding: 1px 3px;\n border-radius: 5px;\n font: inherit;\n color: var(--muted);\n}\n.band-plugin-react-pp-trail button:where(:hover) {\n background: var(--fill);\n color: var(--ink);\n}\n.band-plugin-react-pp-trail button:where([aria-current]) {\n color: var(--ink);\n font-weight: 500;\n}\n.band-plugin-react-pp-row {\n display: flex;\n align-items: center;\n gap: 9px;\n min-height: 36px;\n padding: 5px 8px;\n border-radius: var(--r-sm);\n color: var(--ink);\n font-size: var(--fs-row);\n cursor: pointer;\n}\n.band-plugin-react-pp-row:where(.is-active) {\n background: var(--fill-2);\n}\n.band-plugin-react-pp-row:where(.is-off) {\n cursor: default;\n}\n.band-plugin-react-pp-row:where(.is-off) > :where(:not(.band-plugin-react-pp-main)) {\n opacity: 0.42;\n}\n.band-plugin-react-pp-main {\n display: grid;\n min-width: 0;\n flex: 1 1 auto;\n}\n.band-plugin-react-pp-name {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.band-plugin-react-pp-name > :where(mark),\n.band-plugin-react-pp-id > :where(mark) {\n background: var(--accent-soft);\n color: inherit;\n border-radius: 2px;\n}\n.band-plugin-react-pp-id {\n font-family: var(--mono);\n font-size: var(--fs-meta);\n color: var(--muted);\n}\n.band-plugin-react-pp-sub {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: var(--fs-meta);\n color: var(--muted);\n}\n.band-plugin-react-pp-meta {\n flex: none;\n font-size: var(--fs-meta);\n color: var(--muted);\n}\n.band-plugin-react-pp-chev {\n flex: none;\n width: 14px;\n text-align: center;\n color: var(--muted);\n}\n.band-plugin-react-pp-dept,\n.band-plugin-react-pp-all {\n flex: none;\n display: inline-grid;\n place-items: center;\n width: 20px;\n height: 20px;\n border-radius: 6px;\n background: var(--fill-2);\n color: var(--muted);\n font-size: var(--fs-meta);\n}\n.band-plugin-react-pp-dept > svg {\n width: 13px;\n height: 13px;\n fill: none;\n stroke: currentColor;\n stroke-width: 1.4;\n}\n.band-plugin-react-pp-state {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n justify-content: center;\n gap: 8px;\n padding: 18px 8px;\n color: var(--muted);\n font-size: var(--fs-row);\n text-align: center;\n}\n.band-plugin-react-pp-tuning > svg {\n width: 40px;\n height: 28px;\n}\n.band-plugin-react-pp-foot {\n padding: 4px 8px 2px;\n}\n@media (pointer: coarse), (max-width: 599px) {\n .band-plugin-react-pp-person {\n flex-wrap: wrap;\n }\n .band-plugin-react-pp-list {\n max-height: min(56vh, 420px);\n }\n}\n.band-plugin-react-pp-row:where(.is-off) .band-plugin-react-pp-name {\n color: var(--muted);\n}\n.band-plugin-react-pp-chosen {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n flex: none;\n max-width: 70%;\n height: 24px;\n padding: 0 4px 0 4px;\n border-radius: 999px;\n background: var(--fill-2);\n font-size: var(--fs-dense);\n white-space: nowrap;\n}\n.band-plugin-react-pp-chosen > button {\n border: 0;\n background: none;\n color: var(--muted);\n font: inherit;\n line-height: 1;\n padding: 0 4px;\n border-radius: 999px;\n}\n.band-plugin-react-pp-chosen > button:where(:focus-visible) {\n outline: none;\n box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--accent);\n}\n\n/* src/status/status.css */\n.band-plugin-react-status {\n display: grid;\n gap: 2px;\n min-width: 0;\n padding: 0 2px 0 4px;\n font-size: var(--fs-dense);\n color: var(--muted);\n}\n.band-plugin-react-status-head {\n display: flex;\n align-items: center;\n gap: 6px;\n min-width: 0;\n color: var(--accent-text);\n}\n.band-plugin-react-status-who {\n font-weight: 600;\n}\n.band-plugin-react-status-context {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.band-plugin-react-status .band-plugin-react-status-glyph.glyph {\n --c: var(--accent);\n margin-left: 2px;\n}\n.band-plugin-react-status-spacer {\n flex: 1;\n}\n.band-plugin-react-status-elapsed {\n flex: none;\n color: var(--muted);\n font-variant-numeric: tabular-nums;\n}\n.band-plugin-react-status-note {\n padding-left: 22px;\n color: var(--ink);\n overflow-wrap: anywhere;\n}\n.band-plugin-react-status-action {\n padding-left: 22px;\n font-family: var(--mono);\n color: var(--muted);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.band-plugin-react-status-stall {\n padding-left: 22px;\n color: var(--warn);\n}\n.band-plugin-react-status-steps {\n display: grid;\n gap: 2px;\n margin: 0;\n padding: 0 0 0 22px;\n list-style: none;\n font-family: var(--mono);\n font-size: var(--fs-meta);\n color: var(--muted);\n}\n.band-plugin-react-status-steps > :where([data-state=done]) {\n color: var(--muted);\n}\n.band-plugin-react-status-steps > :where([data-state=now]) {\n color: var(--ink);\n}\n.band-plugin-react-status-stop {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 6px;\n padding-left: 26px;\n font-size: var(--fs-dense);\n}\n.band-plugin-react-status-stop-note {\n color: var(--muted);\n}\n.band-plugin-react-stopped {\n margin: 0;\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 6px;\n min-width: 0;\n padding: 0 2px 0 4px;\n font-size: var(--fs-row);\n color: var(--muted);\n}\n.band-plugin-react-stopped-text b {\n font-weight: 600;\n color: var(--ink);\n}\n.band-plugin-react-stopped-took {\n font-size: var(--fs-meta);\n font-variant-numeric: tabular-nums;\n}\n\n/* src/version-reference.css */\n.band-plugin-react-version-ref {\n display: inline-block;\n min-width: 0;\n max-width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n vertical-align: bottom;\n padding: 0;\n border: 0;\n background: none;\n color: inherit;\n font: inherit;\n text-align: left;\n}\n.band-plugin-react-version-ref:where(button) {\n cursor: pointer;\n text-decoration: underline;\n text-underline-offset: 2px;\n}\n.band-plugin-react-version-ref:where(:focus-visible) {\n outline: none;\n border-radius: var(--r-sm);\n box-shadow: 0 0 0 2px var(--accent);\n}\n\n/* src/settings/settings.css */\n.band-sf {\n display: grid;\n grid-template-columns: 216px minmax(0, 1fr);\n min-height: 0;\n height: 100%;\n}\n.band-sf-nav {\n min-height: 0;\n overflow: auto;\n overscroll-behavior: contain;\n padding: 24px 12px 24px 20px;\n display: grid;\n gap: 16px;\n align-content: start;\n}\n.band-sf-head {\n display: grid;\n gap: 2px;\n min-width: 0;\n padding: 0 8px;\n}\n.band-sf-title {\n font-size: var(--fs-title);\n font-weight: 600;\n line-height: 1.3;\n}\n.band-sf-obj {\n font-size: var(--fs-ui);\n color: var(--muted);\n}\n.band-sf-grp {\n display: grid;\n gap: 1px;\n}\n.band-sf-grp > span {\n padding: 2px 8px;\n color: var(--muted);\n font-size: var(--fs-dense);\n}\n.band-sf-grp a {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n padding: 6px 8px;\n border-radius: var(--r);\n color: var(--ink);\n text-decoration: none;\n font-size: var(--fs-row);\n}\n.band-sf-grp a:hover {\n background: var(--fill);\n}\n.band-sf-grp a[aria-current=page] {\n background: var(--fill-2);\n font-weight: 500;\n}\n.band-sf-grp a:focus-visible {\n outline: none;\n box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--accent);\n}\n.band-sf-grp a .band-sf-chev {\n display: none;\n color: var(--muted);\n}\n.band-sf-scroll {\n min-height: 0;\n overflow: auto;\n overscroll-behavior: contain;\n}\n.band-sf-main {\n box-sizing: border-box;\n width: 100%;\n max-width: 824px;\n padding: 32px 32px 64px;\n display: grid;\n gap: 20px;\n align-content: start;\n}\n.band-sf-crumb {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 4px;\n min-width: 0;\n color: var(--muted);\n font-size: var(--fs-dense);\n}\n.band-sf-crumb-in {\n display: inline-flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 4px;\n min-width: 0;\n}\n.band-sf-crumb-ws {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n min-width: 0;\n white-space: nowrap;\n}\n.band-sf-crumb-ws > span {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.band-sf-crumb a,\n.band-sf-crumb button {\n min-width: 0;\n border: 0;\n padding: 0;\n background: none;\n color: var(--muted);\n font: inherit;\n text-decoration: none;\n border-radius: 4px;\n overflow-wrap: anywhere;\n cursor: pointer;\n}\n.band-sf-crumb button {\n text-align: start;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.band-sf-crumb a:hover,\n.band-sf-crumb button:hover {\n color: var(--ink);\n}\n.band-sf-crumb a:focus-visible,\n.band-sf-crumb button:focus-visible {\n outline: none;\n box-shadow: 0 0 0 2px var(--accent);\n}\n.band-sf-back {\n display: inline-flex;\n align-self: start;\n justify-self: start;\n gap: 4px;\n color: var(--muted);\n text-decoration: none;\n font-size: var(--fs-ui);\n border-radius: 4px;\n}\n.band-sf-back-m {\n display: none;\n}\n.band-sf-back:hover {\n color: var(--ink);\n}\n.band-sf-back:focus-visible {\n outline: none;\n box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--accent);\n}\n.band-sf-h {\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n gap: 16px;\n}\n.band-sf-h > div {\n display: grid;\n gap: 4px;\n min-width: 0;\n}\n.band-sf-h h1 {\n margin: 0;\n font-size: var(--fs-h2);\n font-weight: 600;\n line-height: 1.3;\n}\n.band-sf-h p {\n margin: 0;\n color: var(--muted);\n font-size: var(--fs-ui);\n max-width: 560px;\n}\n.band-sf-h-a {\n flex: none;\n}\n.band-sf-sec {\n display: grid;\n gap: 10px;\n}\n.band-sf-sec h2 {\n margin: 0;\n font-size: var(--fs-lead);\n font-weight: 600;\n}\n.band-sf-sec > p {\n margin: 0;\n color: var(--muted);\n font-size: var(--fs-ui);\n}\n.band-sf-rows {\n display: grid;\n gap: 2px;\n margin: 0;\n padding: 0;\n list-style: none;\n}\n.band-sf-row {\n position: relative;\n display: grid;\n grid-template-columns: minmax(0, 1fr) auto;\n gap: 2px 12px;\n align-items: center;\n padding: 10px 12px;\n margin: 0 -12px;\n border-radius: var(--r-lg);\n}\n.band-sf-row:hover {\n background: var(--fill);\n}\n.band-sf-row.is-new,\n.band-sf-row.is-new:hover {\n background: var(--ok-soft);\n}\n.band-sf-row-t {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 4px 8px;\n min-width: 0;\n}\n.band-sf-row-t b {\n font-weight: 600;\n overflow-wrap: anywhere;\n}\n.band-sf-row-link {\n color: inherit;\n text-decoration: none;\n border-radius: 4px;\n}\n.band-sf-row-link::after {\n content: \"\";\n position: absolute;\n inset: 0;\n border-radius: var(--r-lg);\n}\n.band-sf-row-a {\n position: relative;\n z-index: 1;\n}\n.band-sf-row-link:focus-visible {\n outline: none;\n box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--accent);\n}\n.band-sf-row-m {\n grid-column: 1;\n display: flex;\n flex-wrap: wrap;\n gap: 2px 14px;\n color: var(--muted);\n font-size: var(--fs-dense);\n min-width: 0;\n}\n.band-sf-row-m > span {\n min-width: 0;\n overflow-wrap: anywhere;\n}\n.band-sf-row-a {\n grid-column: 2;\n grid-row: 1 / span 2;\n display: flex;\n align-items: center;\n gap: 8px;\n}\n.band-sf-row-a .btn {\n position: relative;\n z-index: 1;\n}\n.band-sf-chev {\n color: var(--muted);\n}\n.band-sf-mono {\n font-family: var(--mono);\n font-size: 0.92em;\n}\n.band-sf-facts {\n display: grid;\n gap: 6px 16px;\n margin: 0;\n font-size: var(--fs-ui);\n}\n.band-sf-fact {\n display: grid;\n grid-template-columns: 112px minmax(0, 1fr);\n gap: 16px;\n}\n.band-sf-facts dt {\n color: var(--muted);\n}\n.band-sf-facts dd {\n margin: 0;\n min-width: 0;\n overflow-wrap: anywhere;\n}\n.band-sf-dz {\n display: grid;\n gap: 10px;\n padding-top: 8px;\n}\n.band-sf-dz h2 {\n margin: 0;\n font-size: var(--fs-lead);\n font-weight: 600;\n}\n.band-sf-dz-r {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 16px;\n}\n.band-sf-dz-r > div {\n display: grid;\n gap: 2px;\n min-width: 0;\n}\n.band-sf-dz-r span {\n color: var(--muted);\n font-size: var(--fs-dense);\n}\n.band-sf-dz-r .btn {\n flex: none;\n}\n.band-sf-empty,\n.band-sf .band-sf-empty.rest {\n display: grid;\n justify-items: start;\n text-align: start;\n gap: 10px;\n padding: 24px 0;\n max-width: 480px;\n}\n.band-sf-empty p {\n margin: 0;\n color: var(--muted);\n}\n.band-sf-error {\n min-width: 0;\n}\n.band-sf-load {\n padding: 40px 0;\n display: grid;\n justify-items: start;\n}\n.band-sf-ok {\n margin: 0;\n color: var(--ok);\n font-size: var(--fs-ui);\n}\n.band-sf-muted {\n margin: 0;\n color: var(--muted);\n font-size: var(--fs-ui);\n}\n.band-sf-banner {\n margin: 0;\n padding: 10px 12px;\n border-radius: var(--r-lg);\n background: var(--fill);\n font-size: var(--fs-ui);\n}\n.band-sf-banner.is-warn {\n display: flex;\n align-items: center;\n gap: 8px;\n background: var(--warn-soft);\n}\n.band-sf-form {\n display: grid;\n gap: 16px;\n max-width: 560px;\n min-width: 0;\n}\n.band-sf-form code {\n overflow-wrap: anywhere;\n}\n.band-sf-fld {\n display: grid;\n gap: 6px;\n min-width: 0;\n}\n.band-sf-fld > label {\n font-size: var(--fs-ui);\n font-weight: 500;\n}\n.band-sf-fld .field {\n box-sizing: border-box;\n width: 100%;\n min-width: 0;\n}\n.band-sf-fld textarea.field {\n resize: vertical;\n line-height: 1.5;\n}\n.band-sf-req {\n margin-left: 6px;\n color: var(--muted);\n font-weight: 400;\n}\n.band-sf-optional {\n margin-left: 6px;\n color: var(--muted);\n font-weight: 400;\n}\n.band-sf-one {\n display: grid;\n gap: 10px;\n min-width: 0;\n}\n.band-sf-one fieldset {\n margin: 0;\n padding: 0;\n border: 0;\n min-width: 0;\n display: grid;\n gap: 10px;\n}\n.band-sf-choices {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 8px 12px;\n}\n.band-sf-blks-l {\n font-size: var(--fs-ui);\n font-weight: 600;\n}\n.band-sf-blks {\n display: grid;\n gap: 8px;\n}\n.band-sf-blks-3 {\n grid-template-columns: repeat(3, minmax(0, 1fr));\n}\n.band-sf-blks-2 {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n}\n.band-sf-blk {\n display: grid;\n gap: 4px;\n align-content: start;\n padding: 12px 14px;\n border-radius: var(--r-lg);\n background: var(--fill);\n cursor: pointer;\n min-width: 0;\n}\n.band-sf-blk > b {\n font-weight: 600;\n font-size: var(--fs-ui);\n overflow-wrap: anywhere;\n}\n.band-sf-blk > small {\n color: var(--muted);\n font-size: var(--fs-dense);\n overflow-wrap: anywhere;\n}\n.band-sf-blk.is-on {\n background: var(--accent-soft);\n box-shadow: inset 0 0 0 2px var(--accent);\n}\n.band-sf-blk.is-on > b {\n color: var(--accent-text);\n}\n.band-sf-blk:has(:focus-visible) {\n box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--accent);\n}\n.band-sf-blk:has(:disabled) {\n cursor: default;\n}\n@media (max-width: 600px) {\n .band-sf-blks-3,\n .band-sf-blks-2 {\n grid-template-columns: minmax(0, 1fr);\n }\n}\n.band-sf-hint {\n color: var(--muted);\n font-size: var(--fs-dense);\n}\n.band-sf-hint a,\n.band-sf-fld .field-note a,\n.band-sf-muted a {\n color: var(--accent-text);\n text-decoration: underline;\n text-underline-offset: 2px;\n}\n.band-sf-err {\n margin: 0;\n color: var(--bad);\n font-size: var(--fs-ui);\n}\n.band-sf-fail {\n grid-column: 1 / -1;\n display: flex;\n align-items: flex-start;\n gap: 8px;\n overflow-wrap: anywhere;\n}\n.band-sf-given {\n margin: 0;\n padding: 10px 12px;\n border-radius: var(--r-lg);\n background: var(--fill);\n font-size: var(--fs-ui);\n}\ndl.band-sf-given {\n display: grid;\n grid-template-columns: 56px minmax(0, 1fr);\n gap: 2px 12px;\n}\ndl.band-sf-given dt {\n color: var(--muted);\n}\ndl.band-sf-given dd {\n margin: 0;\n min-width: 0;\n}\ndl.band-sf-given p {\n grid-column: 1 / -1;\n margin: 0;\n color: var(--muted);\n font-size: var(--fs-dense);\n}\n.band-sf-stepback {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n align-self: start;\n justify-self: start;\n padding: 0;\n border: 0;\n background: none;\n color: var(--muted);\n font: inherit;\n font-size: var(--fs-ui);\n cursor: pointer;\n border-radius: 4px;\n}\n.band-sf-stepback:hover {\n color: var(--ink);\n}\n.band-sf-stepback:focus-visible {\n outline: none;\n box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--accent);\n}\n.band-sf-acts {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 8px 12px;\n}\n.band-sf-acts-end {\n justify-content: flex-end;\n}\n.band-sf-state {\n display: flex;\n align-items: center;\n gap: 8px;\n color: var(--muted);\n font-size: var(--fs-ui);\n}\n.band-settings-no-access {\n display: grid;\n gap: 10px;\n justify-items: start;\n max-width: 560px;\n padding-top: 8px;\n}\n.band-settings-no-access h2 {\n margin: 0;\n font-size: var(--fs-title);\n}\n.band-settings-no-access p {\n margin: 0;\n color: var(--muted);\n}\n.band-sf-dialog {\n box-sizing: border-box;\n width: min(460px, calc(100vw - 32px));\n max-height: calc(100dvh - 32px);\n overflow: auto;\n overscroll-behavior: contain;\n border: 0;\n border-radius: var(--r-xl);\n box-shadow: var(--shadow-pop);\n background: var(--panel);\n color: var(--ink);\n padding: 22px 24px;\n}\n.band-sf-dialog[open] {\n display: grid;\n gap: 14px;\n}\n.band-sf-dialog::backdrop {\n background: var(--scrim);\n}\n.band-sf-dialog h2 {\n margin: 0;\n font-size: var(--fs-title);\n overflow-wrap: anywhere;\n}\n.band-sf-dialog ul {\n margin: 0;\n padding-left: 18px;\n display: grid;\n gap: 4px;\n}\n.band-sf-row-x {\n grid-column: 1 / -1;\n margin-top: 8px;\n min-width: 0;\n}\n.band-sf-row.has-lead {\n grid-template-columns: auto minmax(0, 1fr) auto;\n}\n.band-sf-row-l {\n grid-column: 1;\n grid-row: 1 / span 2;\n display: flex;\n align-items: center;\n}\n.band-sf-row.has-lead .band-sf-row-t,\n.band-sf-row.has-lead .band-sf-row-m {\n grid-column: 2;\n}\n.band-sf-row.has-lead .band-sf-row-a {\n grid-column: 3;\n}\n@media (max-width: 600px) {\n .band-sf {\n grid-template-columns: minmax(0, 1fr);\n }\n .band-sf[data-view=page] .band-sf-nav {\n display: none;\n }\n .band-sf[data-view=index] .band-sf-scroll {\n display: none;\n }\n .band-sf-nav {\n padding: 16px;\n }\n .band-sf-grp a {\n padding: 10px 8px;\n font-size: var(--fs-body);\n }\n .band-sf-grp a .band-sf-chev {\n display: inline;\n }\n .band-sf-grp a[aria-current=page] {\n background: none;\n font-weight: 400;\n }\n .band-sf-main {\n padding: 12px 16px 48px;\n gap: 16px;\n }\n .band-sf-back-m {\n display: inline-flex;\n }\n .band-sf-h {\n display: grid;\n gap: 10px;\n }\n .band-sf-h-a .btn {\n justify-self: start;\n }\n .band-sf-row-a {\n grid-column: 1 / -1;\n grid-row: auto;\n justify-content: flex-start;\n margin-top: 4px;\n }\n .band-sf-row-a .band-sf-chev {\n margin-left: auto;\n }\n .band-sf-row-a:has(.band-sf-chev:only-child) {\n grid-column: 2;\n grid-row: 1 / span 2;\n justify-content: flex-end;\n margin-top: 0;\n }\n .band-sf-row > .band-sf-acts {\n grid-column: 1 / -1;\n justify-content: flex-start;\n margin-top: 4px;\n }\n .band-sf-fact {\n grid-template-columns: 88px minmax(0, 1fr);\n gap: 12px;\n }\n .band-sf-dz-r {\n display: grid;\n gap: 8px;\n }\n .band-sf-dz-r .btn {\n justify-self: start;\n }\n .band-sf-dialog {\n padding: 18px 16px;\n }\n .band-sf-row.has-lead .band-sf-row-a {\n grid-column: 2 / -1;\n }\n}\n";
4
4
  let el = document.head.querySelector("style[data-band-style=\"@kanyun-ai-infra/band-plugin-react\"]");
5
5
  if (!el) {
6
6
  el = document.createElement("style");
@@ -14,20 +14,57 @@ import {
14
14
  AgentAvatar,
15
15
  Avatar,
16
16
  BandMark,
17
+ Combobox,
17
18
  ErrorNote,
19
+ FilterMenu,
18
20
  Glyph,
19
21
  INSTRUMENTS,
20
22
  InfoNote,
21
23
  LogoLockup,
22
24
  PaneHeader,
25
+ PersonPicker,
26
+ PersonSearch,
27
+ SettingsActions,
28
+ SettingsBack,
29
+ SettingsChoices,
30
+ SettingsDanger,
31
+ SettingsDangerRow,
32
+ SettingsDialog,
33
+ SettingsEmpty,
34
+ SettingsFacts,
35
+ SettingsField,
36
+ SettingsForm,
37
+ SettingsHead,
38
+ SettingsLayout,
39
+ SettingsLoading,
40
+ SettingsNoAccess,
41
+ SettingsNotice,
42
+ SettingsPicks,
43
+ SettingsReadError,
44
+ SettingsRow,
45
+ SettingsRows,
46
+ SettingsSaveState,
47
+ SettingsSaved,
48
+ SettingsSection,
49
+ SettingsSingle,
50
+ TagInput,
51
+ ToastHost,
23
52
  WorkshopEmblem,
24
53
  WorkshopIcon,
25
54
  agentInstrument,
26
55
  avatarInitial,
27
56
  avatarTone,
57
+ dismissAllToasts,
58
+ dismissToast,
59
+ facetedCount,
60
+ filterRows,
28
61
  instrumentOf,
29
- memberOrder
30
- } from "./chunk-ULDBT77D.js";
62
+ memberOrder,
63
+ peopleDirectory,
64
+ settingsLinkHandler,
65
+ splitTags,
66
+ toast
67
+ } from "./chunk-ER2ITOG5.js";
31
68
  import {
32
69
  scrollIntoPanel
33
70
  } from "./chunk-VKASR4EL.js";
@@ -306,7 +343,7 @@ function Slot({
306
343
  onChange
307
344
  }) {
308
345
  const input = useRef(null);
309
- const seq3 = useRef(0);
346
+ const seq2 = useRef(0);
310
347
  const [expanded, setExpanded] = useState(false);
311
348
  const remove = (picked) => onChange(files.filter((f) => f !== picked));
312
349
  const row = (f) => /* @__PURE__ */ jsxs("span", { className: "band-plugin-react-first-delivery-file", children: [
@@ -344,7 +381,7 @@ function Slot({
344
381
  const same2 = next.some((f) => pathOf(f.file) === pathOf(file));
345
382
  next = [
346
383
  ...next.filter((f) => pathOf(f.file) !== pathOf(file)),
347
- { id: ++seq3.current, file, ...same2 ? { replaced: true } : {} }
384
+ { id: ++seq2.current, file, ...same2 ? { replaced: true } : {} }
348
385
  ];
349
386
  }
350
387
  onChange(next);
@@ -471,8 +508,8 @@ ${JSON.stringify(value)}`;
471
508
  );
472
509
  return useSyncExternalStore(subscribe, read3, read3);
473
510
  }
474
- function entriesFor(entries2, field, value) {
475
- return entries2.filter((e) => e.meta[field] === void 0 || e.meta[field] === value);
511
+ function entriesFor(entries, field, value) {
512
+ return entries.filter((e) => e.meta[field] === void 0 || e.meta[field] === value);
476
513
  }
477
514
  function Mount({
478
515
  mount,
@@ -510,16 +547,16 @@ function useGeneration(scope, keys) {
510
547
  function useLoaded(load, scope, keys, subscribe, keepPrevious) {
511
548
  const { gen: current, scopeGen: currentScope } = useGeneration(scope, keys);
512
549
  const [state, setState] = useState2({ gen: 0, scope: 0, error: null });
513
- const seq3 = useRef2(0);
550
+ const seq2 = useRef2(0);
514
551
  const reload2 = useCallback(() => {
515
- const n = ++seq3.current;
552
+ const n = ++seq2.current;
516
553
  load().then(
517
554
  (v) => {
518
- if (n !== seq3.current) return;
555
+ if (n !== seq2.current) return;
519
556
  setState({ gen: current, scope: currentScope, data: v, error: null });
520
557
  },
521
558
  (e) => {
522
- if (n !== seq3.current) return;
559
+ if (n !== seq2.current) return;
523
560
  setState(
524
561
  (s) => s.gen === current ? { ...s, error: errorText(e) } : {
525
562
  gen: current,
@@ -819,531 +856,12 @@ function useComposition(onEnd) {
819
856
  };
820
857
  }
821
858
 
822
- // src/controls.tsx
823
- import { withImeGuard as withImeGuard2 } from "@kanyun-ai-infra/band-plugin-sdk";
824
- import { useEffect as useEffect3, useId, useMemo, useRef as useRef4, useState as useState5 } from "react";
825
- import { Fragment as Fragment3, jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
826
- function sectionsOf(items) {
827
- const byTitle = /* @__PURE__ */ new Map();
828
- for (const item of items) {
829
- const title = item.group ?? null;
830
- const bucket = byTitle.get(title);
831
- if (bucket) bucket.push(item);
832
- else byTitle.set(title, [item]);
833
- }
834
- return [...byTitle].map(([title, list]) => ({ title, items: list }));
835
- }
836
- function highlight(text, query) {
837
- const q = query.trim();
838
- if (q === "") return text;
839
- const escaped = q.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
840
- const parts = text.split(new RegExp(`(${escaped})`, "gi"));
841
- return parts.map(
842
- (part, i) => (
843
- // 奇数下标就是命中的那几段;split 带捕获组时长度与命中的段数相关,按内容再判一次更稳
844
- i % 2 === 1 && part.toLowerCase() === q.toLowerCase() ? (
845
- // biome-ignore lint/suspicious/noArrayIndexKey: 拆分结果没有稳定的键,重排只发生在查询变化时
846
- /* @__PURE__ */ jsx4("mark", { children: part }, i)
847
- ) : (
848
- // biome-ignore lint/suspicious/noArrayIndexKey: 同上
849
- /* @__PURE__ */ jsx4("span", { children: part }, i)
850
- )
851
- )
852
- );
853
- }
854
- function Combobox({
855
- label,
856
- items,
857
- value,
858
- onChange,
859
- multiple = false,
860
- placeholder,
861
- emptyText,
862
- onCreate,
863
- createLabel,
864
- disabled = false
865
- }) {
866
- const id = useId();
867
- const listId = `${id}-list`;
868
- const [query, setQuery] = useState5("");
869
- const [open, setOpen] = useState5(false);
870
- const [active, setActive] = useState5(0);
871
- const input = useRef4(null);
872
- const list = useRef4(null);
873
- const q = query.trim();
874
- const matched = useMemo(() => {
875
- const base = q === "" ? items : items.filter(
876
- (it) => [it.label, it.meta ?? "", it.keywords ?? ""].some(
877
- (t) => t.toLowerCase().includes(q.toLowerCase())
878
- )
879
- );
880
- return base.filter((it) => !value.includes(it.value));
881
- }, [items, value, q]);
882
- const sections = useMemo(() => sectionsOf(matched), [matched]);
883
- const flat2 = useMemo(() => sections.flatMap((s) => s.items), [sections]);
884
- const exact = q !== "" && items.some((it) => it.label === q);
885
- const canCreate = onCreate !== void 0 && q !== "" && !exact;
886
- const total = flat2.length + (canCreate ? 1 : 0);
887
- const activeIndex = total === 0 ? -1 : Math.min(active, total - 1);
888
- function pick2(item) {
889
- if (multiple) {
890
- if (!value.includes(item.value)) onChange([...value, item.value]);
891
- } else {
892
- onChange([item.value]);
893
- }
894
- setQuery("");
895
- if (!multiple) setOpen(false);
896
- setActive(0);
897
- input.current?.focus();
898
- }
899
- function create() {
900
- if (!onCreate || q === "") return;
901
- onCreate(q);
902
- setQuery("");
903
- if (!multiple) setOpen(false);
904
- setActive(0);
905
- input.current?.focus();
906
- }
907
- function remove(v) {
908
- onChange(value.filter((x) => x !== v));
909
- input.current?.focus();
910
- }
911
- function move(step) {
912
- if (total === 0) return;
913
- setOpen(true);
914
- const next = (activeIndex + step + total) % total;
915
- setActive(next);
916
- const el = list.current?.querySelector(`[data-index="${next}"]`);
917
- if (el) scrollIntoPanel(el, { block: "nearest" });
918
- }
919
- const onComboKey = withImeGuard2((e) => {
920
- if (e.key === "Escape") {
921
- if (open) {
922
- setOpen(false);
923
- e.stopPropagation();
924
- }
925
- return;
926
- }
927
- if (e.key === "ArrowDown" || e.key === "ArrowUp") {
928
- e.preventDefault();
929
- move(e.key === "ArrowDown" ? 1 : -1);
930
- return;
931
- }
932
- if (e.key === "Enter") {
933
- if (!open) return;
934
- e.preventDefault();
935
- if (activeIndex < 0) return;
936
- const item = flat2[activeIndex];
937
- if (item) pick2(item);
938
- else create();
939
- return;
940
- }
941
- if (e.key === " " && multiple && open && query === "" && activeIndex >= 0) {
942
- const item = flat2[activeIndex];
943
- if (!item) return;
944
- e.preventDefault();
945
- pick2(item);
946
- return;
947
- }
948
- if (e.key === "Backspace" && query === "" && value.length > 0) {
949
- const last = value[value.length - 1];
950
- if (last !== void 0) {
951
- e.preventDefault();
952
- remove(last);
953
- }
954
- }
955
- });
956
- const selected = value.map((v) => ({
957
- value: v,
958
- label: items.find((it) => it.value === v)?.label ?? v
959
- }));
960
- return /* @__PURE__ */ jsxs3("div", { className: "band-plugin-react-combo", children: [
961
- selected.length > 0 && /* @__PURE__ */ jsx4("ul", { className: "band-plugin-react-combo-picked", "aria-label": `\u5DF2\u9009${label}`, children: selected.map((it) => /* @__PURE__ */ jsxs3("li", { className: "band-plugin-react-combo-chip", children: [
962
- it.label,
963
- /* @__PURE__ */ jsx4(
964
- "button",
965
- {
966
- type: "button",
967
- "aria-label": `\u79FB\u9664 ${it.label}`,
968
- disabled,
969
- onClick: () => remove(it.value),
970
- children: "\xD7"
971
- }
972
- )
973
- ] }, it.value)) }),
974
- /* @__PURE__ */ jsxs3("div", { className: "band-plugin-react-combo-field field-host", children: [
975
- /* @__PURE__ */ jsx4(
976
- "input",
977
- {
978
- ref: input,
979
- className: "field bare",
980
- type: "text",
981
- role: "combobox",
982
- "aria-label": label,
983
- "aria-expanded": open,
984
- "aria-controls": open ? listId : void 0,
985
- "aria-autocomplete": "list",
986
- "aria-activedescendant": open && activeIndex >= 0 ? `${listId}-${activeIndex}` : void 0,
987
- autoComplete: "off",
988
- disabled,
989
- placeholder: placeholder ?? label,
990
- value: query,
991
- onChange: (e) => {
992
- setQuery(e.target.value);
993
- setOpen(true);
994
- setActive(0);
995
- },
996
- onFocus: () => setOpen(true),
997
- onClick: () => setOpen(true),
998
- onBlur: () => setOpen(false),
999
- onKeyDown: onComboKey
1000
- }
1001
- ),
1002
- open && // biome-ignore lint/a11y/useFocusableInteractive: 焦点留在输入框(combobox + aria-activedescendant),列表自己不取焦点
1003
- /* @__PURE__ */ jsxs3(
1004
- "div",
1005
- {
1006
- ref: list,
1007
- className: "band-plugin-react-combo-pop",
1008
- id: listId,
1009
- role: "listbox",
1010
- "aria-label": label,
1011
- onMouseDown: (e) => {
1012
- e.preventDefault();
1013
- const row = e.target.closest("[data-index]");
1014
- if (!row) return;
1015
- const i = Number(row.dataset.index);
1016
- const item = flat2[i];
1017
- if (item) pick2(item);
1018
- else if (i === flat2.length) create();
1019
- },
1020
- children: [
1021
- sections.map((section) => /* @__PURE__ */ jsxs3("div", { className: "band-plugin-react-combo-section", children: [
1022
- section.title !== null && /* @__PURE__ */ jsx4("div", { className: "band-plugin-react-combo-group", role: "presentation", children: section.title }),
1023
- section.items.map((it) => {
1024
- const i = flat2.indexOf(it);
1025
- return (
1026
- // biome-ignore lint/a11y/useFocusableInteractive: 见上,选项经 aria-activedescendant 标出,不自己取焦点
1027
- /* @__PURE__ */ jsxs3(
1028
- "div",
1029
- {
1030
- id: `${listId}-${i}`,
1031
- role: "option",
1032
- "aria-selected": value.includes(it.value),
1033
- "data-index": i,
1034
- className: `band-plugin-react-combo-opt${i === activeIndex ? " is-active" : ""}`,
1035
- onMouseEnter: () => setActive(i),
1036
- children: [
1037
- /* @__PURE__ */ jsx4("span", { className: "band-plugin-react-combo-label", children: highlight(it.label, q) }),
1038
- it.meta !== void 0 && /* @__PURE__ */ jsx4("span", { className: "band-plugin-react-combo-meta", children: it.meta })
1039
- ]
1040
- },
1041
- it.value
1042
- )
1043
- );
1044
- })
1045
- ] }, section.title ?? "\0")),
1046
- flat2.length === 0 && q !== "" && /* @__PURE__ */ jsx4("div", { className: "band-plugin-react-combo-empty", children: emptyText ?? `\u6CA1\u6709\u5339\u914D\u7684${label}` }),
1047
- canCreate && // biome-ignore lint/a11y/useFocusableInteractive: 同候选行
1048
- /* @__PURE__ */ jsxs3(
1049
- "div",
1050
- {
1051
- id: `${listId}-${flat2.length}`,
1052
- role: "option",
1053
- "aria-selected": false,
1054
- "data-index": flat2.length,
1055
- className: `band-plugin-react-combo-opt${flat2.length === activeIndex ? " is-active" : ""}`,
1056
- onMouseEnter: () => setActive(flat2.length),
1057
- children: [
1058
- /* @__PURE__ */ jsx4("span", { className: "band-plugin-react-combo-plus", "aria-hidden": "true", children: "+" }),
1059
- /* @__PURE__ */ jsx4("span", { className: "band-plugin-react-combo-label", children: createLabel ? createLabel(q) : `\u65B0\u5EFA\u300C${q}\u300D` })
1060
- ]
1061
- }
1062
- )
1063
- ]
1064
- }
1065
- )
1066
- ] })
1067
- ] });
1068
- }
1069
- var TAG_SPLIT = /[,,\n\t]/;
1070
- function splitTags(text) {
1071
- return text.split(TAG_SPLIT).map((s) => s.trim()).filter((s) => s !== "");
1072
- }
1073
- function TagInput({
1074
- label,
1075
- value,
1076
- onChange,
1077
- placeholder,
1078
- hint,
1079
- disabled = false,
1080
- id
1081
- }) {
1082
- const auto = useId();
1083
- const inputId = id ?? auto;
1084
- const hintId = `${inputId}-hint`;
1085
- const [draft, setDraft] = useState5("");
1086
- const [dup, setDup] = useState5(null);
1087
- const [dupChip, setDupChip] = useState5(null);
1088
- const timer = useRef4(null);
1089
- useEffect3(
1090
- () => () => {
1091
- if (timer.current !== null) clearTimeout(timer.current);
1092
- },
1093
- []
1094
- );
1095
- function flash(name) {
1096
- setDup(name);
1097
- setDupChip(name);
1098
- if (timer.current !== null) clearTimeout(timer.current);
1099
- timer.current = setTimeout(() => {
1100
- setDup(null);
1101
- setDupChip(null);
1102
- timer.current = null;
1103
- }, 1800);
1104
- }
1105
- function clearDup() {
1106
- if (timer.current !== null) {
1107
- clearTimeout(timer.current);
1108
- timer.current = null;
1109
- }
1110
- setDup(null);
1111
- setDupChip(null);
1112
- }
1113
- function add(raw) {
1114
- const parts = splitTags(raw);
1115
- if (parts.length === 0) return;
1116
- const seen = new Set(value);
1117
- const added = [];
1118
- let repeated = null;
1119
- for (const part of parts) {
1120
- if (seen.has(part)) {
1121
- repeated = repeated ?? part;
1122
- continue;
1123
- }
1124
- seen.add(part);
1125
- added.push(part);
1126
- }
1127
- if (repeated !== null) flash(repeated);
1128
- else clearDup();
1129
- if (added.length > 0) onChange([...value, ...added]);
1130
- }
1131
- function removeAt(i) {
1132
- const gone = value[i];
1133
- onChange(value.filter((_, k) => k !== i));
1134
- if (gone !== void 0 && gone === dupChip) clearDup();
1135
- }
1136
- const onTagsKey = withImeGuard2((e) => {
1137
- if (e.key === "Enter") {
1138
- e.preventDefault();
1139
- if (draft.trim() === "") return;
1140
- add(draft);
1141
- setDraft("");
1142
- return;
1143
- }
1144
- if (e.key === "," || e.key === "\uFF0C") {
1145
- if (draft.trim() === "") return;
1146
- e.preventDefault();
1147
- add(draft);
1148
- setDraft("");
1149
- return;
1150
- }
1151
- if (e.key === "Backspace" && draft === "" && value.length > 0) {
1152
- e.preventDefault();
1153
- const last = value[value.length - 1];
1154
- if (last !== void 0) {
1155
- onChange(value.slice(0, -1));
1156
- if (dupChip === last) clearDup();
1157
- }
1158
- }
1159
- });
1160
- return /* @__PURE__ */ jsxs3(Fragment3, { children: [
1161
- /* @__PURE__ */ jsxs3("div", { className: "band-plugin-react-tags field-host", children: [
1162
- value.map((tag, i) => /* @__PURE__ */ jsxs3(
1163
- "span",
1164
- {
1165
- className: "band-plugin-react-tag",
1166
- ...dupChip === tag ? { "data-dup": "" } : {},
1167
- children: [
1168
- tag,
1169
- /* @__PURE__ */ jsx4(
1170
- "button",
1171
- {
1172
- type: "button",
1173
- "aria-label": `\u79FB\u9664 ${tag}`,
1174
- disabled,
1175
- onClick: () => removeAt(i),
1176
- children: "\xD7"
1177
- }
1178
- )
1179
- ]
1180
- },
1181
- tag
1182
- )),
1183
- /* @__PURE__ */ jsx4(
1184
- "input",
1185
- {
1186
- id: inputId,
1187
- className: "field bare",
1188
- type: "text",
1189
- "aria-label": label,
1190
- "aria-describedby": hintId,
1191
- autoComplete: "off",
1192
- disabled,
1193
- placeholder: value.length === 0 ? placeholder ?? "\u7C98\u8D34\u6216\u8F93\u5165\uFF0C\u56DE\u8F66\u786E\u8BA4" : "",
1194
- value: draft,
1195
- onChange: (e) => setDraft(e.target.value),
1196
- onKeyDown: onTagsKey,
1197
- onPaste: (e) => {
1198
- const text = e.clipboardData.getData("text");
1199
- if (!TAG_SPLIT.test(text)) return;
1200
- e.preventDefault();
1201
- const el = e.currentTarget;
1202
- const at = el.selectionStart ?? draft.length;
1203
- const end = el.selectionEnd ?? at;
1204
- add(draft.slice(0, at) + text + draft.slice(end));
1205
- setDraft("");
1206
- }
1207
- }
1208
- )
1209
- ] }),
1210
- /* @__PURE__ */ jsx4(
1211
- "p",
1212
- {
1213
- className: "band-plugin-react-tag-hint",
1214
- id: hintId,
1215
- ...dup !== null ? { "data-err": "" } : {},
1216
- children: dup !== null ? `\u300C${dup}\u300D\u91CD\u590D\u4E86\uFF0C\u5DF2\u8DF3\u8FC7` : hint
1217
- }
1218
- )
1219
- ] });
1220
- }
1221
- function facetedCount(rows, groups, selection, groupKey, value) {
1222
- let n = 0;
1223
- for (const row of rows) {
1224
- if (row[groupKey] !== value) continue;
1225
- let ok = true;
1226
- for (const g of groups) {
1227
- if (g.key === groupKey) continue;
1228
- const picked = selection[g.key] ?? [];
1229
- if (picked.length === 0) continue;
1230
- const v = row[g.key];
1231
- if (v === void 0 || !picked.includes(v)) {
1232
- ok = false;
1233
- break;
1234
- }
1235
- }
1236
- if (ok) n++;
1237
- }
1238
- return n;
1239
- }
1240
- function filterRows(rows, groups, selection) {
1241
- return rows.filter(
1242
- (row) => groups.every((g) => {
1243
- const picked = selection[g.key] ?? [];
1244
- if (picked.length === 0) return true;
1245
- const v = row[g.key];
1246
- return v !== void 0 && picked.includes(v);
1247
- })
1248
- );
1249
- }
1250
- function FilterMenu({
1251
- groups,
1252
- rows,
1253
- value,
1254
- onChange,
1255
- emptyText
1256
- }) {
1257
- const id = useId();
1258
- const [collapsed, setCollapsed] = useState5(() => /* @__PURE__ */ new Set());
1259
- function toggle(groupKey, option) {
1260
- const picked = value[groupKey] ?? [];
1261
- const next = picked.includes(option) ? picked.filter((x) => x !== option) : [...picked, option];
1262
- const merged = { ...value, [groupKey]: next };
1263
- if (next.length === 0) delete merged[groupKey];
1264
- onChange(merged);
1265
- }
1266
- function clear() {
1267
- onChange({});
1268
- }
1269
- function toggleGroup(key) {
1270
- setCollapsed((prev) => {
1271
- const next = new Set(prev);
1272
- if (next.has(key)) next.delete(key);
1273
- else next.add(key);
1274
- return next;
1275
- });
1276
- }
1277
- const chips = Object.entries(value).flatMap(([key, values]) => {
1278
- const group = groups.find((g) => g.key === key);
1279
- return values.map((v) => ({
1280
- key,
1281
- value: v,
1282
- label: group?.options.find((o) => o.value === v)?.label ?? v
1283
- }));
1284
- });
1285
- return /* @__PURE__ */ jsxs3("div", { className: "band-plugin-react-filter", children: [
1286
- /* @__PURE__ */ jsxs3("div", { className: "band-plugin-react-filter-chips", children: [
1287
- chips.map((chip) => /* @__PURE__ */ jsxs3("span", { className: "band-plugin-react-filter-chip", children: [
1288
- chip.label,
1289
- /* @__PURE__ */ jsx4(
1290
- "button",
1291
- {
1292
- type: "button",
1293
- "aria-label": `\u79FB\u9664 ${chip.label} \u7B5B\u9009`,
1294
- onClick: () => toggle(chip.key, chip.value),
1295
- children: "\xD7"
1296
- }
1297
- )
1298
- ] }, `${chip.key}\0${chip.value}`)),
1299
- chips.length > 0 && /* @__PURE__ */ jsx4("button", { type: "button", className: "band-plugin-react-filter-clear", onClick: clear, children: "\u6E05\u7A7A" })
1300
- ] }),
1301
- groups.map((g) => {
1302
- const picked = value[g.key] ?? [];
1303
- const isCollapsed = collapsed.has(g.key);
1304
- const panel = `${id}-${g.key}`;
1305
- return /* @__PURE__ */ jsxs3("div", { className: "band-plugin-react-filter-group-box", children: [
1306
- /* @__PURE__ */ jsxs3(
1307
- "button",
1308
- {
1309
- type: "button",
1310
- className: "band-plugin-react-filter-group",
1311
- "aria-expanded": !isCollapsed,
1312
- "aria-controls": panel,
1313
- onClick: () => toggleGroup(g.key),
1314
- children: [
1315
- g.label,
1316
- /* @__PURE__ */ jsx4("span", { className: "band-plugin-react-filter-group-count", children: picked.length })
1317
- ]
1318
- }
1319
- ),
1320
- /* @__PURE__ */ jsxs3("div", { id: panel, hidden: isCollapsed, children: [
1321
- g.options.length === 0 && /* @__PURE__ */ jsx4("p", { className: "band-plugin-react-filter-empty", children: emptyText ?? "\u6CA1\u6709\u53EF\u7B5B\u7684" }),
1322
- g.options.map((o) => /* @__PURE__ */ jsxs3("label", { className: "band-plugin-react-filter-opt choice", children: [
1323
- /* @__PURE__ */ jsx4(
1324
- "input",
1325
- {
1326
- type: "checkbox",
1327
- className: "checkbox",
1328
- checked: picked.includes(o.value),
1329
- onChange: () => toggle(g.key, o.value)
1330
- }
1331
- ),
1332
- o.label,
1333
- /* @__PURE__ */ jsx4("span", { className: "band-plugin-react-filter-count", children: facetedCount(rows, groups, value, g.key, o.value) })
1334
- ] }, o.value))
1335
- ] })
1336
- ] }, g.key);
1337
- })
1338
- ] });
1339
- }
1340
-
1341
859
  // src/retry.tsx
1342
- import { useState as useState6 } from "react";
1343
- import { Fragment as Fragment4, jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
860
+ import { useState as useState5 } from "react";
861
+ import { Fragment as Fragment3, jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
1344
862
  function Retry({ ctx, stage }) {
1345
- const [busy, setBusy] = useState6(false);
1346
- const [error, setError] = useState6(null);
863
+ const [busy, setBusy] = useState5(false);
864
+ const [error, setError] = useState5(null);
1347
865
  const can = ctx.member.can("submit-change");
1348
866
  const retry = async () => {
1349
867
  setBusy(true);
@@ -1356,8 +874,8 @@ function Retry({ ctx, stage }) {
1356
874
  setBusy(false);
1357
875
  }
1358
876
  };
1359
- return /* @__PURE__ */ jsxs4(Fragment4, { children: [
1360
- /* @__PURE__ */ jsx5(
877
+ return /* @__PURE__ */ jsxs3(Fragment3, { children: [
878
+ /* @__PURE__ */ jsx4(
1361
879
  "button",
1362
880
  {
1363
881
  type: "button",
@@ -1368,13 +886,13 @@ function Retry({ ctx, stage }) {
1368
886
  children: busy ? "\u91CD\u8BD5\u4E2D\u2026" : "\u91CD\u8BD5"
1369
887
  }
1370
888
  ),
1371
- error && /* @__PURE__ */ jsx5(ErrorNote, { children: error })
889
+ error && /* @__PURE__ */ jsx4(ErrorNote, { children: error })
1372
890
  ] });
1373
891
  }
1374
892
 
1375
893
  // src/stop.tsx
1376
- import { useEffect as useEffect4, useRef as useRef5, useState as useState7 } from "react";
1377
- import { Fragment as Fragment5, jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
894
+ import { useEffect as useEffect3, useRef as useRef4, useState as useState6 } from "react";
895
+ import { Fragment as Fragment4, jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
1378
896
  var STOP_COST = "\u505C\u4E0B\u540E\u8FD9\u4E00\u56DE\u5408\u7684\u7ED3\u679C\u4E0D\u4FDD\u7559\uFF1B\u8981\u662F\u505C\u4E0B\u524D\u5DF2\u7ECF\u505A\u5B8C\uFF0C\u4F1A\u7167\u5E38\u4EA4\u4ED8\u3002";
1379
897
  function queuedMessages(queue) {
1380
898
  return queue.reduce((n, q) => n + q.threadIds.length, 0);
@@ -1389,11 +907,11 @@ function StopTurn({
1389
907
  queued = 0,
1390
908
  elsewhere = false
1391
909
  }) {
1392
- const [asking, setAsking] = useState7(false);
1393
- const [busy, setBusy] = useState7(false);
1394
- const [error, setError] = useState7(null);
1395
- const confirmRef = useRef5(null);
1396
- useEffect4(() => {
910
+ const [asking, setAsking] = useState6(false);
911
+ const [busy, setBusy] = useState6(false);
912
+ const [error, setError] = useState6(null);
913
+ const confirmRef = useRef4(null);
914
+ useEffect3(() => {
1397
915
  if (asking && confirmRef.current) scrollIntoPanel(confirmRef.current);
1398
916
  }, [asking]);
1399
917
  if (!can) return null;
@@ -1410,9 +928,9 @@ function StopTurn({
1410
928
  }
1411
929
  };
1412
930
  if (asking)
1413
- return /* @__PURE__ */ jsxs5(Fragment5, { children: [
1414
- /* @__PURE__ */ jsx6("span", { className: noteClassName, children: queued > 0 ? `${STOP_COST}${stopQueuedNote(queued)}` : STOP_COST }),
1415
- /* @__PURE__ */ jsx6(
931
+ return /* @__PURE__ */ jsxs4(Fragment4, { children: [
932
+ /* @__PURE__ */ jsx5("span", { className: noteClassName, children: queued > 0 ? `${STOP_COST}${stopQueuedNote(queued)}` : STOP_COST }),
933
+ /* @__PURE__ */ jsx5(
1416
934
  "button",
1417
935
  {
1418
936
  ref: confirmRef,
@@ -1423,7 +941,7 @@ function StopTurn({
1423
941
  children: busy ? "\u505C\u4E0B\u4E2D\u2026" : "\u786E\u5B9A\u505C\u4E0B"
1424
942
  }
1425
943
  ),
1426
- /* @__PURE__ */ jsx6(
944
+ /* @__PURE__ */ jsx5(
1427
945
  "button",
1428
946
  {
1429
947
  type: "button",
@@ -1433,10 +951,10 @@ function StopTurn({
1433
951
  children: "\u7EE7\u7EED\u8DD1"
1434
952
  }
1435
953
  ),
1436
- error && /* @__PURE__ */ jsx6(ErrorNote, { children: error })
954
+ error && /* @__PURE__ */ jsx5(ErrorNote, { children: error })
1437
955
  ] });
1438
956
  if (elsewhere) return null;
1439
- return /* @__PURE__ */ jsx6(
957
+ return /* @__PURE__ */ jsx5(
1440
958
  "button",
1441
959
  {
1442
960
  type: "button",
@@ -1459,7 +977,7 @@ function canRestoreProject(deleted, now = /* @__PURE__ */ new Date()) {
1459
977
  }
1460
978
 
1461
979
  // src/model-hint.tsx
1462
- import { useEffect as useEffect5, useState as useState8 } from "react";
980
+ import { useEffect as useEffect4, useState as useState7 } from "react";
1463
981
 
1464
982
  // src/no-key.tsx
1465
983
  import { MODEL_PROJECT_CONSENT_PENDING } from "@kanyun-ai-infra/band-contracts/api";
@@ -1470,7 +988,7 @@ import {
1470
988
  MODEL_SELECTION_REQUIRED,
1471
989
  MODEL_SERVICE_NOT_FOUND
1472
990
  } from "@kanyun-ai-infra/band-contracts/api";
1473
- import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
991
+ import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
1474
992
  var MODEL_REQUIRED_REASON = "model-required";
1475
993
  var MODELS_FOR_PAGE = "@kanyun-ai-infra/band-settings/models-for";
1476
994
  var PERSONAL_MODELS_PAGE = "@kanyun-ai-infra/band-settings/models";
@@ -1506,10 +1024,10 @@ function takeDraft(workshop) {
1506
1024
  }
1507
1025
  }
1508
1026
  function NoKeyNotice({ id, onGo }) {
1509
- return /* @__PURE__ */ jsxs6("p", { id, className: "band-plugin-react-no-key", role: "alert", children: [
1027
+ return /* @__PURE__ */ jsxs5("p", { id, className: "band-plugin-react-no-key", role: "alert", children: [
1510
1028
  NO_KEY_TEXT,
1511
1029
  " ",
1512
- /* @__PURE__ */ jsx7("button", { type: "button", className: "btn sm", onClick: onGo, children: NO_KEY_BUTTON })
1030
+ /* @__PURE__ */ jsx6("button", { type: "button", className: "btn sm", onClick: onGo, children: NO_KEY_BUTTON })
1513
1031
  ] });
1514
1032
  }
1515
1033
  var MODEL_NEEDS_SETTINGS = "\u53BB\u9879\u76EE\u8BBE\u7F6E\u9009\u7528";
@@ -1567,7 +1085,7 @@ function projectModelNeedsText(n) {
1567
1085
  }
1568
1086
 
1569
1087
  // src/model-hint.tsx
1570
- import { Fragment as Fragment6, jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
1088
+ import { Fragment as Fragment5, jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
1571
1089
  function modelHintText(policy, def) {
1572
1090
  if (policy === void 0 || policy === "off") return null;
1573
1091
  if (def) {
@@ -1615,8 +1133,8 @@ function ModelHint({
1615
1133
  className
1616
1134
  }) {
1617
1135
  const api = ctx.app.data.write?.modelCredentials;
1618
- const [def, setDef] = useState8(void 0);
1619
- useEffect5(() => {
1136
+ const [def, setDef] = useState7(void 0);
1137
+ useEffect4(() => {
1620
1138
  if (policy === void 0 || policy === "off" || !api) return;
1621
1139
  let live = true;
1622
1140
  api.list().then((r) => live && setDef(defaultOf(r))).catch(() => live && setDef(void 0));
@@ -1627,15 +1145,15 @@ function ModelHint({
1627
1145
  if (!api || def === void 0) return null;
1628
1146
  const hint = modelHintText(policy, def);
1629
1147
  if (!hint) return null;
1630
- return /* @__PURE__ */ jsxs7(
1148
+ return /* @__PURE__ */ jsxs6(
1631
1149
  "p",
1632
1150
  {
1633
1151
  className: className ? `band-plugin-react-model-hint ${className}` : "band-plugin-react-model-hint",
1634
1152
  children: [
1635
1153
  hint.text,
1636
- hint.action && /* @__PURE__ */ jsxs7(Fragment6, { children: [
1154
+ hint.action && /* @__PURE__ */ jsxs6(Fragment5, { children: [
1637
1155
  " ",
1638
- /* @__PURE__ */ jsx8(
1156
+ /* @__PURE__ */ jsx7(
1639
1157
  "button",
1640
1158
  {
1641
1159
  type: "button",
@@ -1651,16 +1169,16 @@ function ModelHint({
1651
1169
  }
1652
1170
 
1653
1171
  // src/target-repo.tsx
1654
- import { jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
1172
+ import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
1655
1173
  var TARGET_REPO_DOCS = "/docs/start/target-repo";
1656
1174
  function TargetRepoNote({
1657
1175
  id,
1658
1176
  error,
1659
1177
  requestAccessUrl
1660
1178
  }) {
1661
- return /* @__PURE__ */ jsxs8("div", { className: "band-plugin-react-target-repo", children: [
1662
- error ? /* @__PURE__ */ jsx9("span", { id: targetRepoErrorId(id), className: "band-plugin-react-target-repo-err", children: error }) : null,
1663
- error && requestAccessUrl ? /* @__PURE__ */ jsxs8(
1179
+ return /* @__PURE__ */ jsxs7("div", { className: "band-plugin-react-target-repo", children: [
1180
+ error ? /* @__PURE__ */ jsx8("span", { id: targetRepoErrorId(id), className: "band-plugin-react-target-repo-err", children: error }) : null,
1181
+ error && requestAccessUrl ? /* @__PURE__ */ jsxs7(
1664
1182
  "a",
1665
1183
  {
1666
1184
  className: "band-plugin-react-target-repo-request",
@@ -1674,10 +1192,10 @@ function TargetRepoNote({
1674
1192
  ]
1675
1193
  }
1676
1194
  ) : null,
1677
- /* @__PURE__ */ jsxs8("span", { id, children: [
1195
+ /* @__PURE__ */ jsxs7("span", { id, children: [
1678
1196
  "\u76EE\u524D\u53EA\u80FD\u63D0\u4EA4\u5230 Band \u5EFA\u597D\u7684\u76EE\u6807\u4ED3\u5E93\uFF1B\u8FD8\u6CA1\u6709\u7684\u8BDD\uFF0C\u8BF7\u627E",
1679
1197
  " ",
1680
- /* @__PURE__ */ jsx9("a", { href: TARGET_REPO_DOCS, target: "_blank", rel: "noreferrer", children: "Band \u7BA1\u7406\u5458" }),
1198
+ /* @__PURE__ */ jsx8("a", { href: TARGET_REPO_DOCS, target: "_blank", rel: "noreferrer", children: "Band \u7BA1\u7406\u5458" }),
1681
1199
  "\u5EFA\u4E00\u4E2A\u3002"
1682
1200
  ] })
1683
1201
  ] });
@@ -1920,17 +1438,17 @@ import {
1920
1438
  } from "@kanyun-ai-infra/band-plugin-sdk";
1921
1439
  import {
1922
1440
  useCallback as useCallback2,
1923
- useEffect as useEffect7,
1924
- useId as useId3,
1441
+ useEffect as useEffect6,
1442
+ useId as useId2,
1925
1443
  useLayoutEffect as useLayoutEffect2,
1926
- useMemo as useMemo2,
1927
- useRef as useRef7,
1928
- useState as useState10
1444
+ useMemo,
1445
+ useRef as useRef6,
1446
+ useState as useState9
1929
1447
  } from "react";
1930
1448
 
1931
1449
  // src/prompt/ExternalImport.tsx
1932
- import { useEffect as useEffect6, useId as useId2, useRef as useRef6, useState as useState9 } from "react";
1933
- import { Fragment as Fragment7, jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
1450
+ import { useEffect as useEffect5, useId, useRef as useRef5, useState as useState8 } from "react";
1451
+ import { Fragment as Fragment6, jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
1934
1452
  function personalImportSource(ctx, attachments, connector, options = {}) {
1935
1453
  const read3 = attachments.importExternal;
1936
1454
  const connections = ctx.app.data.write?.personalConnections;
@@ -1964,13 +1482,13 @@ function ExternalImportPanel({
1964
1482
  onClose,
1965
1483
  onBusy
1966
1484
  }) {
1967
- const id = useId2();
1968
- const [connected, setConnected] = useState9(null);
1969
- const [ref, setRef] = useState9("");
1970
- const [error, setError] = useState9("");
1971
- const [busy, setBusy] = useState9(false);
1972
- const live = useRef6(true);
1973
- useEffect6(() => {
1485
+ const id = useId();
1486
+ const [connected, setConnected] = useState8(null);
1487
+ const [ref, setRef] = useState8("");
1488
+ const [error, setError] = useState8("");
1489
+ const [busy, setBusy] = useState8(false);
1490
+ const live = useRef5(true);
1491
+ useEffect5(() => {
1974
1492
  live.current = true;
1975
1493
  source.connected().then(
1976
1494
  (value) => {
@@ -2005,18 +1523,18 @@ function ExternalImportPanel({
2005
1523
  }
2006
1524
  }
2007
1525
  };
2008
- return /* @__PURE__ */ jsxs9("section", { className: "band-plugin-react-prompt-import", "aria-label": importFrom(source.label), children: [
2009
- /* @__PURE__ */ jsx10("strong", { children: importFrom(source.label) }),
2010
- /* @__PURE__ */ jsx10("p", { children: "\u7528\u4F60\u7684\u6743\u9650\u8BFB\uFF0C\u9879\u76EE\u6210\u5458\u90FD\u4F1A\u770B\u5230\u8FD9\u4EFD\u5FEB\u7167" }),
2011
- connected === null && !error && /* @__PURE__ */ jsx10("output", { children: "\u6B63\u5728\u8BFB\u53D6\u8FDE\u63A5\u2026" }),
2012
- connected === false && /* @__PURE__ */ jsxs9("p", { children: [
1526
+ return /* @__PURE__ */ jsxs8("section", { className: "band-plugin-react-prompt-import", "aria-label": importFrom(source.label), children: [
1527
+ /* @__PURE__ */ jsx9("strong", { children: importFrom(source.label) }),
1528
+ /* @__PURE__ */ jsx9("p", { children: "\u7528\u4F60\u7684\u6743\u9650\u8BFB\uFF0C\u9879\u76EE\u6210\u5458\u90FD\u4F1A\u770B\u5230\u8FD9\u4EFD\u5FEB\u7167" }),
1529
+ connected === null && !error && /* @__PURE__ */ jsx9("output", { children: "\u6B63\u5728\u8BFB\u53D6\u8FDE\u63A5\u2026" }),
1530
+ connected === false && /* @__PURE__ */ jsxs8("p", { children: [
2013
1531
  "\u8BF7\u5148\u5728\u300C\u6211\u7684\u8FDE\u63A5\u300D\u8FDE\u4E0A ",
2014
1532
  source.label,
2015
1533
  "\u3002"
2016
1534
  ] }),
2017
- connected && /* @__PURE__ */ jsxs9(Fragment7, { children: [
2018
- /* @__PURE__ */ jsx10("label", { htmlFor: id, children: "\u6587\u6863\u94FE\u63A5" }),
2019
- /* @__PURE__ */ jsx10(
1535
+ connected && /* @__PURE__ */ jsxs8(Fragment6, { children: [
1536
+ /* @__PURE__ */ jsx9("label", { htmlFor: id, children: "\u6587\u6863\u94FE\u63A5" }),
1537
+ /* @__PURE__ */ jsx9(
2020
1538
  "input",
2021
1539
  {
2022
1540
  id,
@@ -2029,11 +1547,11 @@ function ExternalImportPanel({
2029
1547
  }
2030
1548
  )
2031
1549
  ] }),
2032
- error && /* @__PURE__ */ jsx10(ErrorNote, { children: error }),
2033
- /* @__PURE__ */ jsxs9("div", { className: "band-plugin-react-prompt-import-actions", children: [
2034
- /* @__PURE__ */ jsx10("button", { type: "button", className: "btn", disabled: busy, onClick: source.manage, children: "\u6211\u7684\u8FDE\u63A5" }),
2035
- /* @__PURE__ */ jsx10("button", { type: "button", className: "btn", disabled: busy, onClick: onClose, children: "\u53D6\u6D88" }),
2036
- connected && /* @__PURE__ */ jsx10(
1550
+ error && /* @__PURE__ */ jsx9(ErrorNote, { children: error }),
1551
+ /* @__PURE__ */ jsxs8("div", { className: "band-plugin-react-prompt-import-actions", children: [
1552
+ /* @__PURE__ */ jsx9("button", { type: "button", className: "btn", disabled: busy, onClick: source.manage, children: "\u6211\u7684\u8FDE\u63A5" }),
1553
+ /* @__PURE__ */ jsx9("button", { type: "button", className: "btn", disabled: busy, onClick: onClose, children: "\u53D6\u6D88" }),
1554
+ connected && /* @__PURE__ */ jsx9(
2037
1555
  "button",
2038
1556
  {
2039
1557
  type: "button",
@@ -2048,7 +1566,7 @@ function ExternalImportPanel({
2048
1566
  }
2049
1567
 
2050
1568
  // src/prompt/PromptInput.tsx
2051
- import { Fragment as Fragment8, jsx as jsx11, jsxs as jsxs10 } from "react/jsx-runtime";
1569
+ import { Fragment as Fragment7, jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
2052
1570
  function singleLimitShown(l) {
2053
1571
  return Math.min(l.maxFileBytes, l.maxTotalBytes);
2054
1572
  }
@@ -2085,22 +1603,22 @@ function PromptInput(props) {
2085
1603
  autoFocus
2086
1604
  } = props;
2087
1605
  const imports = importProp === void 0 ? [] : Array.isArray(importProp) ? importProp : [importProp];
2088
- const uid = useId3();
2089
- const textRef = useRef7(null);
2090
- const fileRef = useRef7(null);
2091
- const rootRef = useRef7(null);
2092
- const latest = useRef7(draft);
1606
+ const uid = useId2();
1607
+ const textRef = useRef6(null);
1608
+ const fileRef = useRef6(null);
1609
+ const rootRef = useRef6(null);
1610
+ const latest = useRef6(draft);
2093
1611
  latest.current = draft;
2094
- const onDraftRef = useRef7(props.onDraft);
1612
+ const onDraftRef = useRef6(props.onDraft);
2095
1613
  onDraftRef.current = props.onDraft;
2096
1614
  const apply = useCallback2((fn) => {
2097
1615
  const next = fn(latest.current);
2098
1616
  latest.current = next;
2099
1617
  onDraftRef.current(next);
2100
1618
  }, []);
2101
- const files = useRef7(/* @__PURE__ */ new Map());
2102
- const uploads = useRef7(/* @__PURE__ */ new Map());
2103
- useEffect7(
1619
+ const files = useRef6(/* @__PURE__ */ new Map());
1620
+ const uploads = useRef6(/* @__PURE__ */ new Map());
1621
+ useEffect6(
2104
1622
  () => () => {
2105
1623
  for (const c of uploads.current.values()) c.abort();
2106
1624
  if (latest.current.items.some((i) => i.kind === "file" && i.state !== "done"))
@@ -2113,24 +1631,24 @@ function PromptInput(props) {
2113
1631
  },
2114
1632
  [apply]
2115
1633
  );
2116
- const [cand, setCand] = useState10(null);
2117
- const [candIdx, setCandIdx] = useState10(0);
2118
- const [refs, setRefs] = useState10(null);
2119
- const [panel, setPanel] = useState10(null);
2120
- const [importing, setImporting] = useState10(false);
2121
- const [dragging, setDragging] = useState10(false);
2122
- const [notice, setNotice] = useState10(null);
2123
- const sameAs = useRef7(null);
1634
+ const [cand, setCand] = useState9(null);
1635
+ const [candIdx, setCandIdx] = useState9(0);
1636
+ const [refs, setRefs] = useState9(null);
1637
+ const [panel, setPanel] = useState9(null);
1638
+ const [importing, setImporting] = useState9(false);
1639
+ const [dragging, setDragging] = useState9(false);
1640
+ const [notice, setNotice] = useState9(null);
1641
+ const sameAs = useRef6(null);
2124
1642
  const noticeSame = useCallback2((key, name) => {
2125
1643
  const text = `\u5DF2\u6709\u540C\u4E00\u4EFD\uFF1A${name}\uFF0C\u53D1\u9001\u65F6\u7528\u539F\u6765\u90A3\u4EFD\uFF0C\u4E0D\u518D\u4E0A\u4F20`;
2126
1644
  sameAs.current = { key, text };
2127
1645
  setNotice(text);
2128
1646
  }, []);
2129
- const [error, setError] = useState10(null);
2130
- const [waiting, setWaiting] = useState10(false);
2131
- const [posting, setPosting] = useState10(false);
2132
- const [preview, setPreview] = useState10(null);
2133
- const [flagged, setFlagged] = useState10(false);
1647
+ const [error, setError] = useState9(null);
1648
+ const [waiting, setWaiting] = useState9(false);
1649
+ const [posting, setPosting] = useState9(false);
1650
+ const [preview, setPreview] = useState9(null);
1651
+ const [flagged, setFlagged] = useState9(false);
2134
1652
  const triggers = [
2135
1653
  ...mentions ? ["@"] : [],
2136
1654
  ...references ? ["#"] : [],
@@ -2268,7 +1786,7 @@ function PromptInput(props) {
2268
1786
  [apply, addFiles, attach]
2269
1787
  );
2270
1788
  const refQuery = cand?.trigger === "#" ? cand.query : null;
2271
- useEffect7(() => {
1789
+ useEffect6(() => {
2272
1790
  if (refQuery === null || !references) return;
2273
1791
  let live = true;
2274
1792
  references.search(refQuery).then(
@@ -2279,8 +1797,8 @@ function PromptInput(props) {
2279
1797
  live = false;
2280
1798
  };
2281
1799
  }, [refQuery, references]);
2282
- const order = useMemo2(() => memberOrder(mentions?.members ?? []), [mentions]);
2283
- const candidates = useMemo2(() => {
1800
+ const order = useMemo(() => memberOrder(mentions?.members ?? []), [mentions]);
1801
+ const candidates = useMemo(() => {
2284
1802
  if (!cand) return [];
2285
1803
  if (cand.trigger === "@" && mentions) {
2286
1804
  return mentionCandidates(mentions.members, cand.query).map((m) => ({
@@ -2384,25 +1902,25 @@ function PromptInput(props) {
2384
1902
  }
2385
1903
  void doSubmit();
2386
1904
  };
2387
- const pending = uploading(draft).length;
1905
+ const pending2 = uploading(draft).length;
2388
1906
  const failures = failed(draft).length;
2389
- useEffect7(() => {
1907
+ useEffect6(() => {
2390
1908
  if (!waiting) return;
2391
1909
  if (failures > 0) {
2392
1910
  setWaiting(false);
2393
1911
  setNotice(failedNotice(failed(latest.current), files.current));
2394
- } else if (pending === 0) {
1912
+ } else if (pending2 === 0) {
2395
1913
  if (!hasContent(latest.current)) setWaiting(false);
2396
1914
  else if (!props.busy && !importing) void doSubmit();
2397
1915
  }
2398
- }, [waiting, pending, failures, doSubmit, props.busy, importing]);
1916
+ }, [waiting, pending2, failures, doSubmit, props.busy, importing]);
2399
1917
  useLayoutEffect2(() => {
2400
1918
  const el = textRef.current;
2401
1919
  if (!el || CSS?.supports?.("field-sizing", "content")) return;
2402
1920
  el.style.height = "auto";
2403
1921
  el.style.height = `${Math.min(el.scrollHeight, 240)}px`;
2404
1922
  });
2405
- useEffect7(() => {
1923
+ useEffect6(() => {
2406
1924
  if (!panel && !cand) return;
2407
1925
  const onDown = (e) => {
2408
1926
  if (rootRef.current && !rootRef.current.contains(e.target)) {
@@ -2414,7 +1932,7 @@ function PromptInput(props) {
2414
1932
  return () => document.removeEventListener("mousedown", onDown);
2415
1933
  }, [panel, cand, importing]);
2416
1934
  if (disabledReason) {
2417
- return /* @__PURE__ */ jsx11("div", { className: "band-plugin-react-prompt-note", children: disabledReason });
1935
+ return /* @__PURE__ */ jsx10("div", { className: "band-plugin-react-prompt-note", children: disabledReason });
2418
1936
  }
2419
1937
  const onKeyDown = withImeGuard((e) => {
2420
1938
  if (candOpen) {
@@ -2524,10 +2042,10 @@ function PromptInput(props) {
2524
2042
  const activeSource = panel && typeof panel === "object" && "source" in panel ? sources.find((s) => s.id === panel.source) : void 0;
2525
2043
  const activeImport = panel && typeof panel === "object" && "importFrom" in panel ? imports[panel.importFrom] : void 0;
2526
2044
  const previewItem = preview ? draft.items.find((i) => i.key === preview) : void 0;
2527
- const sendState = waiting ? `\u7B49 ${pending} \u4E2A\u9644\u4EF6\u4F20\u5B8C\u5C31\u53D1\u9001\uFF0C\u518D\u70B9\u4E00\u6B21\u53D6\u6D88` : posting ? "\u53D1\u9001\u4E2D" : submitLabel;
2045
+ const sendState = waiting ? `\u7B49 ${pending2} \u4E2A\u9644\u4EF6\u4F20\u5B8C\u5C31\u53D1\u9001\uFF0C\u518D\u70B9\u4E00\u6B21\u53D6\u6D88` : posting ? "\u53D1\u9001\u4E2D" : submitLabel;
2528
2046
  const keyHint = `Enter ${submitText ?? "\u53D1\u9001"}\uFF0CShift+Enter \u6362\u884C`;
2529
2047
  const failedLines = uploadFailureLines(draft.items);
2530
- return /* @__PURE__ */ jsxs10(
2048
+ return /* @__PURE__ */ jsxs9(
2531
2049
  "div",
2532
2050
  {
2533
2051
  ref: rootRef,
@@ -2537,18 +2055,18 @@ function PromptInput(props) {
2537
2055
  ...dropProps,
2538
2056
  children: [
2539
2057
  (error || notice || failedLines.length > 0) && // 同一时刻只有这一处提示(同队列的「没撤成」,#393):发送失败、没加上的文件、没传上去的文件
2540
- /* @__PURE__ */ jsxs10(
2058
+ /* @__PURE__ */ jsxs9(
2541
2059
  "div",
2542
2060
  {
2543
2061
  className: "band-plugin-react-prompt-notice",
2544
2062
  role: error || failedLines.length > 0 ? "alert" : "status",
2545
2063
  children: [
2546
- /* @__PURE__ */ jsxs10("span", { className: "band-plugin-react-prompt-notice-lines", children: [
2547
- (error ?? notice) && /* @__PURE__ */ jsx11("span", { children: error ?? notice }),
2548
- failedLines.map((l) => /* @__PURE__ */ jsx11("span", { children: l }, l))
2064
+ /* @__PURE__ */ jsxs9("span", { className: "band-plugin-react-prompt-notice-lines", children: [
2065
+ (error ?? notice) && /* @__PURE__ */ jsx10("span", { children: error ?? notice }),
2066
+ failedLines.map((l) => /* @__PURE__ */ jsx10("span", { children: l }, l))
2549
2067
  ] }),
2550
2068
  (error || notice) && // 没传上去的那几行不在这里关:重试或移掉那个文件,它自己就没了
2551
- /* @__PURE__ */ jsx11(
2069
+ /* @__PURE__ */ jsx10(
2552
2070
  "button",
2553
2071
  {
2554
2072
  type: "button",
@@ -2564,8 +2082,8 @@ function PromptInput(props) {
2564
2082
  ]
2565
2083
  }
2566
2084
  ),
2567
- /* @__PURE__ */ jsxs10("div", { className: "composer band-plugin-react-prompt-box", "data-band-guide-keep": "", children: [
2568
- tray.length > 0 && /* @__PURE__ */ jsx11("ul", { className: "band-plugin-react-prompt-tray", "aria-label": "\u9644\u4EF6", children: tray.map((it) => /* @__PURE__ */ jsx11(
2085
+ /* @__PURE__ */ jsxs9("div", { className: "composer band-plugin-react-prompt-box", "data-band-guide-keep": "", children: [
2086
+ tray.length > 0 && /* @__PURE__ */ jsx10("ul", { className: "band-plugin-react-prompt-tray", "aria-label": "\u9644\u4EF6", children: tray.map((it) => /* @__PURE__ */ jsx10(
2569
2087
  TrayItem,
2570
2088
  {
2571
2089
  item: it,
@@ -2577,7 +2095,7 @@ function PromptInput(props) {
2577
2095
  },
2578
2096
  it.key
2579
2097
  )) }),
2580
- /* @__PURE__ */ jsx11(
2098
+ /* @__PURE__ */ jsx10(
2581
2099
  "textarea",
2582
2100
  {
2583
2101
  ref: textRef,
@@ -2608,10 +2126,10 @@ function PromptInput(props) {
2608
2126
  ),
2609
2127
  candOpen && cand && // biome-ignore lint/a11y/useSemanticElements: 焦点留在输入框(combobox + aria-activedescendant),候选列表不取焦点,不能用 select
2610
2128
  // biome-ignore lint/a11y/useFocusableInteractive: 同上,键盘经输入框的上下键操作
2611
- /* @__PURE__ */ jsxs10("div", { className: "mention band-plugin-react-prompt-cands", id: listId, role: "listbox", children: [
2612
- /* @__PURE__ */ jsx11("div", { className: "band-plugin-react-prompt-cands-h", children: cand.trigger === "@" ? "\u63D0\u5230\u6210\u5458" : cand.trigger === "#" ? "\u5F15\u7528" : "\u80FD\u529B" }),
2613
- candidates.length === 0 && /* @__PURE__ */ jsx11("div", { className: "band-plugin-react-prompt-empty", children: refs?.q === cand.query ? "\u6CA1\u6709\u5339\u914D\u7684\u5BF9\u8C61" : "\u67E5\u627E\u4E2D\u2026" }),
2614
- candidates.map((c, i) => /* @__PURE__ */ jsx11(
2129
+ /* @__PURE__ */ jsxs9("div", { className: "mention band-plugin-react-prompt-cands", id: listId, role: "listbox", children: [
2130
+ /* @__PURE__ */ jsx10("div", { className: "band-plugin-react-prompt-cands-h", children: cand.trigger === "@" ? "\u63D0\u5230\u6210\u5458" : cand.trigger === "#" ? "\u5F15\u7528" : "\u80FD\u529B" }),
2131
+ candidates.length === 0 && /* @__PURE__ */ jsx10("div", { className: "band-plugin-react-prompt-empty", children: refs?.q === cand.query ? "\u6CA1\u6709\u5339\u914D\u7684\u5BF9\u8C61" : "\u67E5\u627E\u4E2D\u2026" }),
2132
+ candidates.map((c, i) => /* @__PURE__ */ jsx10(
2615
2133
  "button",
2616
2134
  {
2617
2135
  id: `${listId}-${i}`,
@@ -2624,34 +2142,34 @@ function PromptInput(props) {
2624
2142
  pick2(c);
2625
2143
  },
2626
2144
  onMouseEnter: () => setCandIdx(i),
2627
- children: /* @__PURE__ */ jsx11(CandidateRow, { c, order })
2145
+ children: /* @__PURE__ */ jsx10(CandidateRow, { c, order })
2628
2146
  },
2629
2147
  c.key
2630
2148
  ))
2631
2149
  ] }),
2632
- (chips.length > 0 || selectedCaps.length > 0 || selectedConns.length > 0) && /* @__PURE__ */ jsxs10("ul", { className: "band-plugin-react-prompt-chips", "aria-label": "\u5F15\u7528\u3001\u80FD\u529B\u4E0E\u8FDE\u63A5\u5668", children: [
2633
- chips.map((c) => /* @__PURE__ */ jsxs10(
2150
+ (chips.length > 0 || selectedCaps.length > 0 || selectedConns.length > 0) && /* @__PURE__ */ jsxs9("ul", { className: "band-plugin-react-prompt-chips", "aria-label": "\u5F15\u7528\u3001\u80FD\u529B\u4E0E\u8FDE\u63A5\u5668", children: [
2151
+ chips.map((c) => /* @__PURE__ */ jsxs9(
2634
2152
  "li",
2635
2153
  {
2636
2154
  className: "chip plain band-plugin-react-prompt-chip",
2637
2155
  title: c.source ? `\u6765\u81EA ${c.source}` : void 0,
2638
2156
  children: [
2639
- /* @__PURE__ */ jsx11("span", { className: "band-plugin-react-prompt-sigil", children: "#" }),
2157
+ /* @__PURE__ */ jsx10("span", { className: "band-plugin-react-prompt-sigil", children: "#" }),
2640
2158
  c.kind === "ref" ? c.label : "",
2641
- /* @__PURE__ */ jsx11(ChipX, { label: c.kind === "ref" ? c.label : "", onClick: () => removeItem(c.key) })
2159
+ /* @__PURE__ */ jsx10(ChipX, { label: c.kind === "ref" ? c.label : "", onClick: () => removeItem(c.key) })
2642
2160
  ]
2643
2161
  },
2644
2162
  c.key
2645
2163
  )),
2646
- selectedCaps.map((c) => /* @__PURE__ */ jsxs10(
2164
+ selectedCaps.map((c) => /* @__PURE__ */ jsxs9(
2647
2165
  "li",
2648
2166
  {
2649
2167
  className: "chip plain band-plugin-react-prompt-chip",
2650
2168
  "data-kind": "cap",
2651
2169
  children: [
2652
- /* @__PURE__ */ jsx11("span", { className: "band-plugin-react-prompt-sigil", children: "/" }),
2170
+ /* @__PURE__ */ jsx10("span", { className: "band-plugin-react-prompt-sigil", children: "/" }),
2653
2171
  c.name,
2654
- /* @__PURE__ */ jsx11(
2172
+ /* @__PURE__ */ jsx10(
2655
2173
  ChipX,
2656
2174
  {
2657
2175
  label: c.name,
@@ -2662,14 +2180,14 @@ function PromptInput(props) {
2662
2180
  },
2663
2181
  `cap:${c.id}`
2664
2182
  )),
2665
- selectedConns.map((c) => /* @__PURE__ */ jsxs10(
2183
+ selectedConns.map((c) => /* @__PURE__ */ jsxs9(
2666
2184
  "li",
2667
2185
  {
2668
2186
  className: "chip plain band-plugin-react-prompt-chip",
2669
2187
  "data-kind": "conn",
2670
2188
  children: [
2671
2189
  c.name,
2672
- !c.builtIn && /* @__PURE__ */ jsx11(
2190
+ !c.builtIn && /* @__PURE__ */ jsx10(
2673
2191
  ChipX,
2674
2192
  {
2675
2193
  label: c.name,
@@ -2681,7 +2199,7 @@ function PromptInput(props) {
2681
2199
  `conn:${c.id}`
2682
2200
  ))
2683
2201
  ] }),
2684
- activeSource && /* @__PURE__ */ jsx11(
2202
+ activeSource && /* @__PURE__ */ jsx10(
2685
2203
  SourcePanel,
2686
2204
  {
2687
2205
  source: activeSource,
@@ -2693,7 +2211,7 @@ function PromptInput(props) {
2693
2211
  },
2694
2212
  activeSource.id
2695
2213
  ),
2696
- activeImport && /* @__PURE__ */ jsx11(
2214
+ activeImport && /* @__PURE__ */ jsx10(
2697
2215
  ExternalImportPanel,
2698
2216
  {
2699
2217
  source: activeImport,
@@ -2739,9 +2257,9 @@ function PromptInput(props) {
2739
2257
  activeImport.label
2740
2258
  ),
2741
2259
  fields,
2742
- /* @__PURE__ */ jsxs10("div", { className: "composer-bar band-plugin-react-prompt-bar", children: [
2743
- showPlus && /* @__PURE__ */ jsxs10("div", { className: "band-plugin-react-prompt-anchor", children: [
2744
- /* @__PURE__ */ jsx11(
2260
+ /* @__PURE__ */ jsxs9("div", { className: "composer-bar band-plugin-react-prompt-bar", children: [
2261
+ showPlus && /* @__PURE__ */ jsxs9("div", { className: "band-plugin-react-prompt-anchor", children: [
2262
+ /* @__PURE__ */ jsx10(
2745
2263
  "button",
2746
2264
  {
2747
2265
  type: "button",
@@ -2755,8 +2273,8 @@ function PromptInput(props) {
2755
2273
  children: "+"
2756
2274
  }
2757
2275
  ),
2758
- panel === "plus" && /* @__PURE__ */ jsxs10(Menu, { label: "\u6DFB\u52A0", onClose: () => setPanel(null), children: [
2759
- attach && /* @__PURE__ */ jsxs10(
2276
+ panel === "plus" && /* @__PURE__ */ jsxs9(Menu, { label: "\u6DFB\u52A0", onClose: () => setPanel(null), children: [
2277
+ attach && /* @__PURE__ */ jsxs9(
2760
2278
  MenuItem,
2761
2279
  {
2762
2280
  onSelect: () => {
@@ -2764,8 +2282,8 @@ function PromptInput(props) {
2764
2282
  fileRef.current?.click();
2765
2283
  },
2766
2284
  children: [
2767
- /* @__PURE__ */ jsx11("span", { children: "\u4E0A\u4F20\u6587\u4EF6" }),
2768
- /* @__PURE__ */ jsxs10("span", { className: "band-plugin-react-prompt-d", children: [
2285
+ /* @__PURE__ */ jsx10("span", { children: "\u4E0A\u4F20\u6587\u4EF6" }),
2286
+ /* @__PURE__ */ jsxs9("span", { className: "band-plugin-react-prompt-d", children: [
2769
2287
  "\u5355\u4E2A ",
2770
2288
  formatBytes(singleLimitShown(attach.limits)),
2771
2289
  "\u3001\u5408\u8BA1",
@@ -2776,12 +2294,12 @@ function PromptInput(props) {
2776
2294
  ]
2777
2295
  }
2778
2296
  ),
2779
- imports.map((source, index) => /* @__PURE__ */ jsx11(MenuItem, { onSelect: () => setPanel({ importFrom: index }), children: /* @__PURE__ */ jsx11("span", { children: importFrom(source.label) }) }, source.label)),
2780
- sources.map((s) => /* @__PURE__ */ jsx11(MenuItem, { onSelect: () => setPanel({ source: s.id }), children: /* @__PURE__ */ jsx11("span", { children: s.label }) }, s.id)),
2781
- connectors && connectors.list.length > 0 && /* @__PURE__ */ jsxs10(Fragment8, { children: [
2782
- /* @__PURE__ */ jsx11("hr", { className: "band-plugin-react-prompt-sep" }),
2783
- /* @__PURE__ */ jsx11("div", { className: "band-plugin-react-prompt-group", children: "\u8FDE\u63A5\u5668" }),
2784
- connectors.list.map((c) => /* @__PURE__ */ jsx11(
2297
+ imports.map((source, index) => /* @__PURE__ */ jsx10(MenuItem, { onSelect: () => setPanel({ importFrom: index }), children: /* @__PURE__ */ jsx10("span", { children: importFrom(source.label) }) }, source.label)),
2298
+ sources.map((s) => /* @__PURE__ */ jsx10(MenuItem, { onSelect: () => setPanel({ source: s.id }), children: /* @__PURE__ */ jsx10("span", { children: s.label }) }, s.id)),
2299
+ connectors && connectors.list.length > 0 && /* @__PURE__ */ jsxs9(Fragment7, { children: [
2300
+ /* @__PURE__ */ jsx10("hr", { className: "band-plugin-react-prompt-sep" }),
2301
+ /* @__PURE__ */ jsx10("div", { className: "band-plugin-react-prompt-group", children: "\u8FDE\u63A5\u5668" }),
2302
+ connectors.list.map((c) => /* @__PURE__ */ jsx10(
2785
2303
  ConnectorRow,
2786
2304
  {
2787
2305
  c,
@@ -2793,7 +2311,7 @@ function PromptInput(props) {
2793
2311
  },
2794
2312
  c.id
2795
2313
  )),
2796
- connectors.manageHref && /* @__PURE__ */ jsx11(
2314
+ connectors.manageHref && /* @__PURE__ */ jsx10(
2797
2315
  "a",
2798
2316
  {
2799
2317
  className: "band-plugin-react-prompt-item",
@@ -2805,8 +2323,8 @@ function PromptInput(props) {
2805
2323
  ] })
2806
2324
  ] })
2807
2325
  ] }),
2808
- capabilities && capabilities.list.length > 0 && /* @__PURE__ */ jsxs10("div", { className: "band-plugin-react-prompt-anchor", children: [
2809
- /* @__PURE__ */ jsxs10(
2326
+ capabilities && capabilities.list.length > 0 && /* @__PURE__ */ jsxs9("div", { className: "band-plugin-react-prompt-anchor", children: [
2327
+ /* @__PURE__ */ jsxs9(
2810
2328
  "button",
2811
2329
  {
2812
2330
  type: "button",
@@ -2822,9 +2340,9 @@ function PromptInput(props) {
2822
2340
  ]
2823
2341
  }
2824
2342
  ),
2825
- panel === "caps" && /* @__PURE__ */ jsx11(Menu, { label: "\u80FD\u529B", onClose: () => setPanel(null), children: capabilities.list.map((c) => {
2343
+ panel === "caps" && /* @__PURE__ */ jsx10(Menu, { label: "\u80FD\u529B", onClose: () => setPanel(null), children: capabilities.list.map((c) => {
2826
2344
  const on = draft.capabilities.includes(c.id);
2827
- return /* @__PURE__ */ jsxs10(
2345
+ return /* @__PURE__ */ jsxs9(
2828
2346
  MenuItem,
2829
2347
  {
2830
2348
  checked: on,
@@ -2833,11 +2351,11 @@ function PromptInput(props) {
2833
2351
  capabilities: on ? d.capabilities.filter((x) => x !== c.id) : [...d.capabilities, c.id]
2834
2352
  })),
2835
2353
  children: [
2836
- /* @__PURE__ */ jsxs10("span", { children: [
2354
+ /* @__PURE__ */ jsxs9("span", { children: [
2837
2355
  "/",
2838
2356
  c.name
2839
2357
  ] }),
2840
- c.description && /* @__PURE__ */ jsx11("span", { className: "band-plugin-react-prompt-d", children: c.description })
2358
+ c.description && /* @__PURE__ */ jsx10("span", { className: "band-plugin-react-prompt-d", children: c.description })
2841
2359
  ]
2842
2360
  },
2843
2361
  c.id
@@ -2845,8 +2363,8 @@ function PromptInput(props) {
2845
2363
  }) })
2846
2364
  ] }),
2847
2365
  footerStart,
2848
- /* @__PURE__ */ jsx11("span", { className: "grow" }),
2849
- /* @__PURE__ */ jsx11(
2366
+ /* @__PURE__ */ jsx10("span", { className: "grow" }),
2367
+ /* @__PURE__ */ jsx10(
2850
2368
  "span",
2851
2369
  {
2852
2370
  className: "band-plugin-react-prompt-hint",
@@ -2855,7 +2373,7 @@ function PromptInput(props) {
2855
2373
  }
2856
2374
  ),
2857
2375
  footerEnd,
2858
- submitText ? /* @__PURE__ */ jsx11(
2376
+ submitText ? /* @__PURE__ */ jsx10(
2859
2377
  "button",
2860
2378
  {
2861
2379
  type: "button",
@@ -2867,7 +2385,7 @@ function PromptInput(props) {
2867
2385
  onClick: submit,
2868
2386
  children: waiting ? "\u7B49\u9644\u4EF6\u2026 \u53D6\u6D88" : submitText
2869
2387
  }
2870
- ) : /* @__PURE__ */ jsx11(
2388
+ ) : /* @__PURE__ */ jsx10(
2871
2389
  "button",
2872
2390
  {
2873
2391
  type: "button",
@@ -2877,11 +2395,11 @@ function PromptInput(props) {
2877
2395
  disabled: !canSend,
2878
2396
  "data-waiting": waiting || void 0,
2879
2397
  onClick: submit,
2880
- children: waiting ? /* @__PURE__ */ jsx11(Ring, { value: progressOf(draft) }) : "\u2191"
2398
+ children: waiting ? /* @__PURE__ */ jsx10(Ring, { value: progressOf(draft) }) : "\u2191"
2881
2399
  }
2882
2400
  )
2883
2401
  ] }),
2884
- attach && /* @__PURE__ */ jsx11(
2402
+ attach && /* @__PURE__ */ jsx10(
2885
2403
  "input",
2886
2404
  {
2887
2405
  ref: fileRef,
@@ -2897,7 +2415,7 @@ function PromptInput(props) {
2897
2415
  }
2898
2416
  }
2899
2417
  ),
2900
- dragging && attach && /* @__PURE__ */ jsxs10("div", { className: "band-plugin-react-prompt-drop", "aria-hidden": true, children: [
2418
+ dragging && attach && /* @__PURE__ */ jsxs9("div", { className: "band-plugin-react-prompt-drop", "aria-hidden": true, children: [
2901
2419
  "\u677E\u5F00\u6DFB\u52A0 \xB7 \u5355\u4E2A ",
2902
2420
  formatBytes(singleLimitShown(attach.limits)),
2903
2421
  "\u3001\u5408\u8BA1",
@@ -2908,8 +2426,8 @@ function PromptInput(props) {
2908
2426
  " \u4E2A"
2909
2427
  ] })
2910
2428
  ] }),
2911
- /* @__PURE__ */ jsx11("span", { className: "sr-only", "aria-live": "polite", children: pending > 0 ? `${pending} \u4E2A\u9644\u4EF6\u4E0A\u4F20\u4E2D` : "" }),
2912
- previewItem && /* @__PURE__ */ jsx11(
2429
+ /* @__PURE__ */ jsx10("span", { className: "sr-only", "aria-live": "polite", children: pending2 > 0 ? `${pending2} \u4E2A\u9644\u4EF6\u4E0A\u4F20\u4E2D` : "" }),
2430
+ previewItem && /* @__PURE__ */ jsx10(
2913
2431
  Preview,
2914
2432
  {
2915
2433
  item: previewItem,
@@ -2942,27 +2460,27 @@ function CandidateRow({ c, order }) {
2942
2460
  const m = c.member;
2943
2461
  const bot = m.actor.kind === "agent";
2944
2462
  const role = m.roles.map((r) => m.roleLabels?.[r] ?? r).join("\u3001");
2945
- return /* @__PURE__ */ jsxs10(Fragment8, { children: [
2946
- /* @__PURE__ */ jsx11(Avatar, { id: m.actor.id, name: m.displayName, agent: bot, order, decorative: true }),
2947
- /* @__PURE__ */ jsx11("span", { children: m.displayName }),
2948
- /* @__PURE__ */ jsx11("span", { className: "d", children: bot ? "Agent" : role })
2463
+ return /* @__PURE__ */ jsxs9(Fragment7, { children: [
2464
+ /* @__PURE__ */ jsx10(Avatar, { id: m.actor.id, name: m.displayName, agent: bot, order, decorative: true }),
2465
+ /* @__PURE__ */ jsx10("span", { children: m.displayName }),
2466
+ /* @__PURE__ */ jsx10("span", { className: "d", children: bot ? "Agent" : role })
2949
2467
  ] });
2950
2468
  }
2951
2469
  if (c.kind === "ref") {
2952
- return /* @__PURE__ */ jsxs10(Fragment8, { children: [
2953
- /* @__PURE__ */ jsx11("span", { className: "band-plugin-react-prompt-sigil", children: "#" }),
2954
- /* @__PURE__ */ jsx11("span", { children: c.ref.label }),
2955
- /* @__PURE__ */ jsx11("span", { className: "d", children: c.ref.detail ?? "" })
2470
+ return /* @__PURE__ */ jsxs9(Fragment7, { children: [
2471
+ /* @__PURE__ */ jsx10("span", { className: "band-plugin-react-prompt-sigil", children: "#" }),
2472
+ /* @__PURE__ */ jsx10("span", { children: c.ref.label }),
2473
+ /* @__PURE__ */ jsx10("span", { className: "d", children: c.ref.detail ?? "" })
2956
2474
  ] });
2957
2475
  }
2958
- return /* @__PURE__ */ jsxs10(Fragment8, { children: [
2959
- /* @__PURE__ */ jsx11("span", { className: "band-plugin-react-prompt-sigil", children: "/" }),
2960
- /* @__PURE__ */ jsx11("span", { children: c.cap.name }),
2961
- /* @__PURE__ */ jsx11("span", { className: "d", children: c.cap.description ?? "" })
2476
+ return /* @__PURE__ */ jsxs9(Fragment7, { children: [
2477
+ /* @__PURE__ */ jsx10("span", { className: "band-plugin-react-prompt-sigil", children: "/" }),
2478
+ /* @__PURE__ */ jsx10("span", { children: c.cap.name }),
2479
+ /* @__PURE__ */ jsx10("span", { className: "d", children: c.cap.description ?? "" })
2962
2480
  ] });
2963
2481
  }
2964
2482
  function ChipX({ label, onClick }) {
2965
- return /* @__PURE__ */ jsx11(
2483
+ return /* @__PURE__ */ jsx10(
2966
2484
  "button",
2967
2485
  {
2968
2486
  type: "button",
@@ -2976,7 +2494,7 @@ function ChipX({ label, onClick }) {
2976
2494
  function Ring({ value }) {
2977
2495
  const r = 7;
2978
2496
  const c = 2 * Math.PI * r;
2979
- return /* @__PURE__ */ jsxs10(
2497
+ return /* @__PURE__ */ jsxs9(
2980
2498
  "svg",
2981
2499
  {
2982
2500
  className: "band-plugin-react-prompt-ring",
@@ -2985,8 +2503,8 @@ function Ring({ value }) {
2985
2503
  height: "18",
2986
2504
  "aria-hidden": "true",
2987
2505
  children: [
2988
- /* @__PURE__ */ jsx11("circle", { cx: "9", cy: "9", r, fill: "none", strokeWidth: "2", opacity: "0.3", stroke: "currentColor" }),
2989
- /* @__PURE__ */ jsx11(
2506
+ /* @__PURE__ */ jsx10("circle", { cx: "9", cy: "9", r, fill: "none", strokeWidth: "2", opacity: "0.3", stroke: "currentColor" }),
2507
+ /* @__PURE__ */ jsx10(
2990
2508
  "circle",
2991
2509
  {
2992
2510
  cx: "9",
@@ -3006,8 +2524,8 @@ function Ring({ value }) {
3006
2524
  );
3007
2525
  }
3008
2526
  function useObjectUrl(file) {
3009
- const [url, setUrl] = useState10();
3010
- useEffect7(() => {
2527
+ const [url, setUrl] = useState9();
2528
+ useEffect6(() => {
3011
2529
  if (!file?.type.startsWith("image/") || typeof URL.createObjectURL !== "function") {
3012
2530
  setUrl(void 0);
3013
2531
  return;
@@ -3028,32 +2546,32 @@ function TrayItem({
3028
2546
  }) {
3029
2547
  const local = useObjectUrl(file);
3030
2548
  if (item.kind === "ref") {
3031
- return /* @__PURE__ */ jsxs10(
2549
+ return /* @__PURE__ */ jsxs9(
3032
2550
  "li",
3033
2551
  {
3034
2552
  className: "band-plugin-react-prompt-card",
3035
2553
  "data-kind": "quote",
3036
2554
  title: item.source ? `\u6765\u81EA ${item.source}` : void 0,
3037
2555
  children: [
3038
- /* @__PURE__ */ jsxs10("span", { className: "band-plugin-react-prompt-open", children: [
3039
- /* @__PURE__ */ jsx11("span", { className: "band-plugin-react-prompt-icon", "aria-hidden": true, children: "\u275D" }),
3040
- /* @__PURE__ */ jsx11("span", { className: "band-plugin-react-prompt-meta", children: item.detail ? /* @__PURE__ */ jsx11(
2556
+ /* @__PURE__ */ jsxs9("span", { className: "band-plugin-react-prompt-open", children: [
2557
+ /* @__PURE__ */ jsx10("span", { className: "band-plugin-react-prompt-icon", "aria-hidden": true, children: "\u275D" }),
2558
+ /* @__PURE__ */ jsx10("span", { className: "band-plugin-react-prompt-meta", children: item.detail ? /* @__PURE__ */ jsx10(
3041
2559
  "span",
3042
2560
  {
3043
2561
  className: "band-plugin-react-prompt-d band-plugin-react-prompt-quote",
3044
2562
  title: item.label,
3045
2563
  children: item.detail
3046
2564
  }
3047
- ) : /* @__PURE__ */ jsx11("span", { className: "band-plugin-react-prompt-name", children: item.label }) })
2565
+ ) : /* @__PURE__ */ jsx10("span", { className: "band-plugin-react-prompt-name", children: item.label }) })
3048
2566
  ] }),
3049
- /* @__PURE__ */ jsx11(ChipX, { label: item.label, onClick: onRemove })
2567
+ /* @__PURE__ */ jsx10(ChipX, { label: item.label, onClick: onRemove })
3050
2568
  ]
3051
2569
  }
3052
2570
  );
3053
2571
  }
3054
2572
  if (item.kind === "text") {
3055
- return /* @__PURE__ */ jsxs10("li", { className: "band-plugin-react-prompt-card", "data-kind": "text", children: [
3056
- /* @__PURE__ */ jsxs10(
2573
+ return /* @__PURE__ */ jsxs9("li", { className: "band-plugin-react-prompt-card", "data-kind": "text", children: [
2574
+ /* @__PURE__ */ jsxs9(
3057
2575
  "button",
3058
2576
  {
3059
2577
  type: "button",
@@ -3061,10 +2579,10 @@ function TrayItem({
3061
2579
  onClick: onOpen,
3062
2580
  title: "\u67E5\u770B",
3063
2581
  children: [
3064
- /* @__PURE__ */ jsx11("span", { className: "band-plugin-react-prompt-icon", "aria-hidden": true, children: "\xB6" }),
3065
- /* @__PURE__ */ jsxs10("span", { className: "band-plugin-react-prompt-meta", children: [
3066
- /* @__PURE__ */ jsx11("span", { className: "band-plugin-react-prompt-name", children: item.label }),
3067
- /* @__PURE__ */ jsxs10("span", { className: "band-plugin-react-prompt-d", children: [
2582
+ /* @__PURE__ */ jsx10("span", { className: "band-plugin-react-prompt-icon", "aria-hidden": true, children: "\xB6" }),
2583
+ /* @__PURE__ */ jsxs9("span", { className: "band-plugin-react-prompt-meta", children: [
2584
+ /* @__PURE__ */ jsx10("span", { className: "band-plugin-react-prompt-name", children: item.label }),
2585
+ /* @__PURE__ */ jsxs9("span", { className: "band-plugin-react-prompt-d", children: [
3068
2586
  item.text.length,
3069
2587
  " \u5B57",
3070
2588
  item.source ? ` \xB7 \u6765\u81EA ${item.source}` : ""
@@ -3073,12 +2591,12 @@ function TrayItem({
3073
2591
  ]
3074
2592
  }
3075
2593
  ),
3076
- /* @__PURE__ */ jsx11(ChipX, { label: item.label, onClick: onRemove })
2594
+ /* @__PURE__ */ jsx10(ChipX, { label: item.label, onClick: onRemove })
3077
2595
  ] });
3078
2596
  }
3079
2597
  const thumb = attachmentKind(item.name, item.mime) === "image" ? local ?? previewUrl : void 0;
3080
2598
  const status = item.state === "uploading" ? `\u4E0A\u4F20\u4E2D ${Math.round((item.progress ?? 0) * 100)}%` : item.state === "failed" ? `\u6CA1\u4F20\u4E0A\u53BB${item.error ? `\uFF1A${item.error}` : ""}` : item.originalSize !== void 0 ? `\u5DF2\u538B\u7F29 ${formatBytes(item.originalSize)} \u2192 ${formatBytes(item.size)}` : formatBytes(item.size);
3081
- return /* @__PURE__ */ jsxs10(
2599
+ return /* @__PURE__ */ jsxs9(
3082
2600
  "li",
3083
2601
  {
3084
2602
  className: "band-plugin-react-prompt-card",
@@ -3086,7 +2604,7 @@ function TrayItem({
3086
2604
  "data-state": item.state,
3087
2605
  "data-compressed": item.originalSize !== void 0 || void 0,
3088
2606
  children: [
3089
- /* @__PURE__ */ jsxs10(
2607
+ /* @__PURE__ */ jsxs9(
3090
2608
  "button",
3091
2609
  {
3092
2610
  type: "button",
@@ -3096,19 +2614,19 @@ function TrayItem({
3096
2614
  title: thumb ? "\u67E5\u770B\u5927\u56FE" : item.name,
3097
2615
  "aria-label": `${item.name}\uFF0C${status}`,
3098
2616
  children: [
3099
- thumb ? /* @__PURE__ */ jsx11("img", { className: "band-plugin-react-prompt-thumb", src: thumb, alt: item.name }) : /* @__PURE__ */ jsx11("span", { className: "band-plugin-react-prompt-icon", "aria-hidden": true, children: fileExt(item.name) }),
3100
- (!thumb || item.originalSize !== void 0) && /* @__PURE__ */ jsxs10("span", { className: "band-plugin-react-prompt-meta", children: [
3101
- /* @__PURE__ */ jsx11("span", { className: "band-plugin-react-prompt-name band-plugin-react-prompt-file", children: item.name }),
3102
- /* @__PURE__ */ jsxs10("span", { className: "band-plugin-react-prompt-d", children: [
2617
+ thumb ? /* @__PURE__ */ jsx10("img", { className: "band-plugin-react-prompt-thumb", src: thumb, alt: item.name }) : /* @__PURE__ */ jsx10("span", { className: "band-plugin-react-prompt-icon", "aria-hidden": true, children: fileExt(item.name) }),
2618
+ (!thumb || item.originalSize !== void 0) && /* @__PURE__ */ jsxs9("span", { className: "band-plugin-react-prompt-meta", children: [
2619
+ /* @__PURE__ */ jsx10("span", { className: "band-plugin-react-prompt-name band-plugin-react-prompt-file", children: item.name }),
2620
+ /* @__PURE__ */ jsxs9("span", { className: "band-plugin-react-prompt-d", children: [
3103
2621
  status,
3104
2622
  item.source ? ` \xB7 \u6765\u81EA ${item.source}` : ""
3105
2623
  ] })
3106
2624
  ] }),
3107
- item.state === "uploading" && /* @__PURE__ */ jsx11("span", { className: "band-plugin-react-prompt-progress", "aria-hidden": "true", children: /* @__PURE__ */ jsx11(Ring, { value: item.progress ?? 0 }) })
2625
+ item.state === "uploading" && /* @__PURE__ */ jsx10("span", { className: "band-plugin-react-prompt-progress", "aria-hidden": "true", children: /* @__PURE__ */ jsx10(Ring, { value: item.progress ?? 0 }) })
3108
2626
  ]
3109
2627
  }
3110
2628
  ),
3111
- item.state === "failed" && onRetry && /* @__PURE__ */ jsx11(
2629
+ item.state === "failed" && onRetry && /* @__PURE__ */ jsx10(
3112
2630
  "button",
3113
2631
  {
3114
2632
  type: "button",
@@ -3118,7 +2636,7 @@ function TrayItem({
3118
2636
  children: "\u91CD\u8BD5"
3119
2637
  }
3120
2638
  ),
3121
- /* @__PURE__ */ jsx11(ChipX, { label: item.name, onClick: onRemove })
2639
+ /* @__PURE__ */ jsx10(ChipX, { label: item.name, onClick: onRemove })
3122
2640
  ]
3123
2641
  }
3124
2642
  );
@@ -3128,8 +2646,8 @@ function Menu({
3128
2646
  onClose,
3129
2647
  children: children2
3130
2648
  }) {
3131
- const ref = useRef7(null);
3132
- useEffect7(() => {
2649
+ const ref = useRef6(null);
2650
+ useEffect6(() => {
3133
2651
  ref.current?.querySelector("[role^=menuitem]")?.focus();
3134
2652
  }, []);
3135
2653
  const onMenuKey = withImeGuard((e) => {
@@ -3149,7 +2667,7 @@ function Menu({
3149
2667
  onClose();
3150
2668
  }
3151
2669
  });
3152
- return /* @__PURE__ */ jsx11(
2670
+ return /* @__PURE__ */ jsx10(
3153
2671
  "div",
3154
2672
  {
3155
2673
  ref,
@@ -3167,7 +2685,7 @@ function MenuItem({
3167
2685
  onSelect,
3168
2686
  checked
3169
2687
  }) {
3170
- return /* @__PURE__ */ jsxs10(
2688
+ return /* @__PURE__ */ jsxs9(
3171
2689
  "button",
3172
2690
  {
3173
2691
  type: "button",
@@ -3176,8 +2694,8 @@ function MenuItem({
3176
2694
  "aria-checked": checked,
3177
2695
  onClick: onSelect,
3178
2696
  children: [
3179
- checked !== void 0 && /* @__PURE__ */ jsx11("span", { className: "band-plugin-react-prompt-check", "aria-hidden": true, children: checked ? "\u2713" : "" }),
3180
- /* @__PURE__ */ jsx11("span", { className: "band-plugin-react-prompt-meta", children: children2 })
2697
+ checked !== void 0 && /* @__PURE__ */ jsx10("span", { className: "band-plugin-react-prompt-check", "aria-hidden": true, children: checked ? "\u2713" : "" }),
2698
+ /* @__PURE__ */ jsx10("span", { className: "band-plugin-react-prompt-meta", children: children2 })
3181
2699
  ]
3182
2700
  }
3183
2701
  );
@@ -3187,12 +2705,12 @@ function ConnectorRow({
3187
2705
  on,
3188
2706
  onToggle
3189
2707
  }) {
3190
- const meta = /* @__PURE__ */ jsxs10("span", { className: "band-plugin-react-prompt-meta", children: [
3191
- /* @__PURE__ */ jsx11("span", { children: c.name }),
3192
- /* @__PURE__ */ jsx11("span", { className: "band-plugin-react-prompt-d", children: c.builtIn ? "Agent \u81EA\u5E26" : !c.authorized ? "\u8981\u5148\u6388\u6743" : c.description ?? "" })
2708
+ const meta = /* @__PURE__ */ jsxs9("span", { className: "band-plugin-react-prompt-meta", children: [
2709
+ /* @__PURE__ */ jsx10("span", { children: c.name }),
2710
+ /* @__PURE__ */ jsx10("span", { className: "band-plugin-react-prompt-d", children: c.builtIn ? "Agent \u81EA\u5E26" : !c.authorized ? "\u8981\u5148\u6388\u6743" : c.description ?? "" })
3193
2711
  ] });
3194
2712
  if (!c.builtIn && !c.authorized && c.authorizeUrl) {
3195
- return /* @__PURE__ */ jsxs10(
2713
+ return /* @__PURE__ */ jsxs9(
3196
2714
  "a",
3197
2715
  {
3198
2716
  className: "band-plugin-react-prompt-item",
@@ -3202,12 +2720,12 @@ function ConnectorRow({
3202
2720
  rel: "noreferrer",
3203
2721
  children: [
3204
2722
  meta,
3205
- /* @__PURE__ */ jsx11("span", { className: "band-plugin-react-prompt-d", children: "\u53BB\u6388\u6743" })
2723
+ /* @__PURE__ */ jsx10("span", { className: "band-plugin-react-prompt-d", children: "\u53BB\u6388\u6743" })
3206
2724
  ]
3207
2725
  }
3208
2726
  );
3209
2727
  }
3210
- return /* @__PURE__ */ jsxs10(
2728
+ return /* @__PURE__ */ jsxs9(
3211
2729
  "button",
3212
2730
  {
3213
2731
  type: "button",
@@ -3218,7 +2736,7 @@ function ConnectorRow({
3218
2736
  onClick: () => onToggle(!on),
3219
2737
  children: [
3220
2738
  meta,
3221
- /* @__PURE__ */ jsx11("span", { className: "band-plugin-react-prompt-switch", "data-on": on || void 0, "aria-hidden": true })
2739
+ /* @__PURE__ */ jsx10("span", { className: "band-plugin-react-prompt-switch", "data-on": on || void 0, "aria-hidden": true })
3222
2740
  ]
3223
2741
  }
3224
2742
  );
@@ -3228,16 +2746,16 @@ function SourcePanel({
3228
2746
  onAdd,
3229
2747
  onClose
3230
2748
  }) {
3231
- const ref = useRef7(null);
3232
- const [err, setErr] = useState10(null);
3233
- const addRef = useRef7(onAdd);
2749
+ const ref = useRef6(null);
2750
+ const [err, setErr] = useState9(null);
2751
+ const addRef = useRef6(onAdd);
3234
2752
  addRef.current = onAdd;
3235
- const closeRef = useRef7(onClose);
2753
+ const closeRef = useRef6(onClose);
3236
2754
  closeRef.current = onClose;
3237
- const mountRef = useRef7(source.mount);
2755
+ const mountRef = useRef6(source.mount);
3238
2756
  mountRef.current = source.mount;
3239
2757
  const { id, source: owner } = source;
3240
- useEffect7(() => {
2758
+ useEffect6(() => {
3241
2759
  const el = ref.current;
3242
2760
  if (!el || !id) return;
3243
2761
  try {
@@ -3250,12 +2768,12 @@ function SourcePanel({
3250
2768
  return void 0;
3251
2769
  }
3252
2770
  }, [id, owner]);
3253
- return /* @__PURE__ */ jsxs10("section", { className: "band-plugin-react-prompt-source", "aria-label": source.label, children: [
3254
- /* @__PURE__ */ jsxs10("div", { className: "band-plugin-react-prompt-source-h", children: [
3255
- /* @__PURE__ */ jsx11("span", { children: source.label }),
3256
- /* @__PURE__ */ jsx11("span", { className: "band-plugin-react-prompt-d", children: source.source }),
3257
- /* @__PURE__ */ jsx11("span", { className: "grow" }),
3258
- /* @__PURE__ */ jsx11(
2771
+ return /* @__PURE__ */ jsxs9("section", { className: "band-plugin-react-prompt-source", "aria-label": source.label, children: [
2772
+ /* @__PURE__ */ jsxs9("div", { className: "band-plugin-react-prompt-source-h", children: [
2773
+ /* @__PURE__ */ jsx10("span", { children: source.label }),
2774
+ /* @__PURE__ */ jsx10("span", { className: "band-plugin-react-prompt-d", children: source.source }),
2775
+ /* @__PURE__ */ jsx10("span", { className: "grow" }),
2776
+ /* @__PURE__ */ jsx10(
3259
2777
  "button",
3260
2778
  {
3261
2779
  type: "button",
@@ -3266,8 +2784,8 @@ function SourcePanel({
3266
2784
  }
3267
2785
  )
3268
2786
  ] }),
3269
- err && /* @__PURE__ */ jsx11("div", { className: "band-plugin-react-error", children: err }),
3270
- /* @__PURE__ */ jsx11("div", { ref })
2787
+ err && /* @__PURE__ */ jsx10("div", { className: "band-plugin-react-error", children: err }),
2788
+ /* @__PURE__ */ jsx10("div", { ref })
3271
2789
  ] });
3272
2790
  }
3273
2791
  function Preview({
@@ -3278,15 +2796,15 @@ function Preview({
3278
2796
  onInline
3279
2797
  }) {
3280
2798
  const local = useObjectUrl(file);
3281
- const ref = useRef7(null);
3282
- useEffect7(() => {
2799
+ const ref = useRef6(null);
2800
+ useEffect6(() => {
3283
2801
  const d = ref.current;
3284
2802
  if (!d || d.open) return;
3285
2803
  if (typeof d.showModal === "function") d.showModal();
3286
2804
  else d.setAttribute("open", "");
3287
2805
  }, []);
3288
2806
  const name = item.kind === "file" ? item.name : item.label;
3289
- return /* @__PURE__ */ jsxs10(
2807
+ return /* @__PURE__ */ jsxs9(
3290
2808
  "dialog",
3291
2809
  {
3292
2810
  ref,
@@ -3306,11 +2824,11 @@ function Preview({
3306
2824
  }
3307
2825
  }),
3308
2826
  children: [
3309
- /* @__PURE__ */ jsxs10("div", { className: "band-plugin-react-prompt-preview-h", children: [
3310
- /* @__PURE__ */ jsx11("span", { className: "band-plugin-react-prompt-name band-plugin-react-prompt-file", children: name }),
3311
- /* @__PURE__ */ jsx11("span", { className: "grow" }),
3312
- onInline && /* @__PURE__ */ jsx11("button", { type: "button", className: "btn sm", onClick: onInline, children: "\u653E\u56DE\u6B63\u6587" }),
3313
- /* @__PURE__ */ jsx11(
2827
+ /* @__PURE__ */ jsxs9("div", { className: "band-plugin-react-prompt-preview-h", children: [
2828
+ /* @__PURE__ */ jsx10("span", { className: "band-plugin-react-prompt-name band-plugin-react-prompt-file", children: name }),
2829
+ /* @__PURE__ */ jsx10("span", { className: "grow" }),
2830
+ onInline && /* @__PURE__ */ jsx10("button", { type: "button", className: "btn sm", onClick: onInline, children: "\u653E\u56DE\u6B63\u6587" }),
2831
+ /* @__PURE__ */ jsx10(
3314
2832
  "button",
3315
2833
  {
3316
2834
  type: "button",
@@ -3321,14 +2839,14 @@ function Preview({
3321
2839
  }
3322
2840
  )
3323
2841
  ] }),
3324
- item.kind === "text" ? /* @__PURE__ */ jsx11("pre", { className: "band-plugin-react-prompt-pre", children: item.text }) : /* @__PURE__ */ jsx11("img", { className: "band-plugin-react-prompt-big", src: local ?? previewUrl, alt: name })
2842
+ item.kind === "text" ? /* @__PURE__ */ jsx10("pre", { className: "band-plugin-react-prompt-pre", children: item.text }) : /* @__PURE__ */ jsx10("img", { className: "band-plugin-react-prompt-big", src: local ?? previewUrl, alt: name })
3325
2843
  ]
3326
2844
  }
3327
2845
  );
3328
2846
  }
3329
2847
 
3330
2848
  // src/prompt/useDraft.ts
3331
- import { useCallback as useCallback3, useEffect as useEffect8, useRef as useRef8, useState as useState11 } from "react";
2849
+ import { useCallback as useCallback3, useEffect as useEffect7, useRef as useRef7, useState as useState10 } from "react";
3332
2850
  var PREFIX = "band-draft:";
3333
2851
  function read(key) {
3334
2852
  try {
@@ -3360,9 +2878,9 @@ function registerDraftFlusher(fn) {
3360
2878
  };
3361
2879
  }
3362
2880
  function useUnsavedGuard(hasUnsaved) {
3363
- const latest = useRef8(hasUnsaved);
2881
+ const latest = useRef7(hasUnsaved);
3364
2882
  latest.current = hasUnsaved;
3365
- useEffect8(() => registerDraftFlusher(() => !latest.current), []);
2883
+ useEffect7(() => registerDraftFlusher(() => !latest.current), []);
3366
2884
  }
3367
2885
  function flushAllDrafts() {
3368
2886
  let ok = true;
@@ -3376,22 +2894,22 @@ function flushAllDrafts() {
3376
2894
  return ok;
3377
2895
  }
3378
2896
  function useDraft(key) {
3379
- const [draft, setDraft] = useState11(() => (key ? read(key) : null) ?? emptyDraft());
3380
- const pending = useRef8(null);
3381
- const timer = useRef8(void 0);
3382
- const lost = useRef8(false);
2897
+ const [draft, setDraft] = useState10(() => (key ? read(key) : null) ?? emptyDraft());
2898
+ const pending2 = useRef7(null);
2899
+ const timer = useRef7(void 0);
2900
+ const lost = useRef7(false);
3383
2901
  const flush = useCallback3(() => {
3384
2902
  clearTimeout(timer.current);
3385
- const p = pending.current;
3386
- pending.current = null;
2903
+ const p = pending2.current;
2904
+ pending2.current = null;
3387
2905
  if (p) {
3388
2906
  const written = write(p.key, p.d);
3389
2907
  lost.current = hasContent(p.d) && (!written || p.d.items.length !== persistable(p.d).items.length);
3390
2908
  }
3391
2909
  return !lost.current;
3392
2910
  }, []);
3393
- const keyRef = useRef8(key);
3394
- useEffect8(() => {
2911
+ const keyRef = useRef7(key);
2912
+ useEffect7(() => {
3395
2913
  if (keyRef.current === key) return;
3396
2914
  flush();
3397
2915
  keyRef.current = key;
@@ -3401,15 +2919,15 @@ function useDraft(key) {
3401
2919
  (d) => {
3402
2920
  setDraft(d);
3403
2921
  if (!key) return;
3404
- pending.current = { key, d };
2922
+ pending2.current = { key, d };
3405
2923
  clearTimeout(timer.current);
3406
2924
  if (!hasContent(d)) flush();
3407
2925
  else timer.current = setTimeout(flush, 300);
3408
2926
  },
3409
2927
  [key, flush]
3410
2928
  );
3411
- useEffect8(() => registerDraftFlusher(flush), [flush]);
3412
- useEffect8(
2929
+ useEffect7(() => registerDraftFlusher(flush), [flush]);
2930
+ useEffect7(
3413
2931
  () => () => {
3414
2932
  flush();
3415
2933
  },
@@ -3435,14 +2953,14 @@ var same = (a, b) => a.kind === b.kind && a.id === b.id;
3435
2953
  function reactedBy(r, me) {
3436
2954
  return Boolean(r?.actors.some((a) => same(a, me)));
3437
2955
  }
3438
- function mergeReactions(live, pending, me) {
2956
+ function mergeReactions(live, pending2, me) {
3439
2957
  const out = (live ?? []).map((r) => ({
3440
2958
  emoji: r.emoji,
3441
2959
  actors: [...r.actors],
3442
2960
  mine: reactedBy(r, me),
3443
2961
  pending: false
3444
2962
  }));
3445
- for (const [emoji, p] of pending) {
2963
+ for (const [emoji, p] of pending2) {
3446
2964
  const hit = out.find((r) => r.emoji === emoji);
3447
2965
  if (p.on) {
3448
2966
  if (!hit) out.push({ emoji, actors: [me], mine: true, pending: true });
@@ -3459,8 +2977,8 @@ function mergeReactions(live, pending, me) {
3459
2977
  }
3460
2978
  return out.filter((r) => r.actors.length > 0);
3461
2979
  }
3462
- function settledPending(live, pending, me) {
3463
- return [...pending].filter(([emoji, p]) => {
2980
+ function settledPending(live, pending2, me) {
2981
+ return [...pending2].filter(([emoji, p]) => {
3464
2982
  if (p.state !== "sent") return false;
3465
2983
  return reactedBy(
3466
2984
  live?.find((r) => r.emoji === emoji),
@@ -3516,17 +3034,17 @@ function threadPath(ctx, threadId) {
3516
3034
  // src/message/Message.tsx
3517
3035
  import {
3518
3036
  useCallback as useCallback4,
3519
- useEffect as useEffect10,
3037
+ useEffect as useEffect9,
3520
3038
  useLayoutEffect as useLayoutEffect3,
3521
- useRef as useRef10,
3522
- useState as useState13
3039
+ useRef as useRef9,
3040
+ useState as useState12
3523
3041
  } from "react";
3524
3042
  import { createPortal } from "react-dom";
3525
3043
 
3526
3044
  // src/message/Attachments.tsx
3527
3045
  import { isActiveMime } from "@kanyun-ai-infra/band-contracts";
3528
- import { useEffect as useEffect9, useRef as useRef9, useState as useState12, useSyncExternalStore as useSyncExternalStore2 } from "react";
3529
- import { Fragment as Fragment9, jsx as jsx12, jsxs as jsxs11 } from "react/jsx-runtime";
3046
+ import { useEffect as useEffect8, useRef as useRef8, useState as useState11, useSyncExternalStore as useSyncExternalStore2 } from "react";
3047
+ import { Fragment as Fragment8, jsx as jsx11, jsxs as jsxs10 } from "react/jsx-runtime";
3530
3048
  var stores = /* @__PURE__ */ new WeakMap();
3531
3049
  function storeOf(ctx) {
3532
3050
  const hit = stores.get(ctx.attachments);
@@ -3586,23 +3104,23 @@ function opensInTab(a) {
3586
3104
  }
3587
3105
  function MessageAttachments({ ctx, ids: given, compact = false }) {
3588
3106
  const list = useProjectAttachments(ctx);
3589
- const [open, setOpen] = useState12(null);
3590
- const [broken, setBroken] = useState12(/* @__PURE__ */ new Set());
3591
- const cards = useRef9(/* @__PURE__ */ new Map());
3107
+ const [open, setOpen] = useState11(null);
3108
+ const [broken, setBroken] = useState11(/* @__PURE__ */ new Set());
3109
+ const cards = useRef8(/* @__PURE__ */ new Map());
3592
3110
  const ids = [...new Set(given)];
3593
3111
  const byId = new Map((list ?? []).map((a) => [a.id, a]));
3594
3112
  const images = ids.filter((id) => thumbable(byId.get(id)) && !broken.has(id));
3595
3113
  const files = ids.filter((id) => !images.includes(id));
3596
3114
  const markBroken = (id) => setBroken((b) => new Set(b).add(id));
3597
3115
  const gone = open !== null && !images.includes(open) ? open : null;
3598
- useEffect9(() => {
3116
+ useEffect8(() => {
3599
3117
  if (gone === null) return;
3600
3118
  setOpen(null);
3601
3119
  cards.current.get(gone)?.focus();
3602
3120
  }, [gone]);
3603
3121
  if (ids.length === 0) return null;
3604
3122
  if (list === void 0) {
3605
- return /* @__PURE__ */ jsx12("ul", { className: "band-plugin-react-atts", "aria-label": `${ids.length} \u4E2A\u9644\u4EF6`, "aria-busy": "true", children: ids.slice(0, compact ? 3 : ids.length).map((id) => /* @__PURE__ */ jsx12("li", { children: /* @__PURE__ */ jsx12(
3123
+ return /* @__PURE__ */ jsx11("ul", { className: "band-plugin-react-atts", "aria-label": `${ids.length} \u4E2A\u9644\u4EF6`, "aria-busy": "true", children: ids.slice(0, compact ? 3 : ids.length).map((id) => /* @__PURE__ */ jsx11("li", { children: /* @__PURE__ */ jsx11(
3606
3124
  "span",
3607
3125
  {
3608
3126
  className: "band-plugin-react-atts-pending",
@@ -3613,23 +3131,23 @@ function MessageAttachments({ ctx, ids: given, compact = false }) {
3613
3131
  if (compact) {
3614
3132
  const shown = images.slice(0, 3);
3615
3133
  const rest = ids.length - shown.length;
3616
- return /* @__PURE__ */ jsxs11("ul", { className: "band-plugin-react-atts", "data-compact": "", "aria-label": `${ids.length} \u4E2A\u9644\u4EF6`, children: [
3617
- shown.map((id) => /* @__PURE__ */ jsx12("li", { children: /* @__PURE__ */ jsx12(Thumb, { ctx, id, name: byId.get(id)?.name ?? "", onBroken: markBroken }) }, id)),
3618
- rest > 0 && /* @__PURE__ */ jsx12("li", { className: "band-plugin-react-atts-more", children: shown.length > 0 ? `+${rest}` : `${rest} \u4E2A\u9644\u4EF6` })
3134
+ return /* @__PURE__ */ jsxs10("ul", { className: "band-plugin-react-atts", "data-compact": "", "aria-label": `${ids.length} \u4E2A\u9644\u4EF6`, children: [
3135
+ shown.map((id) => /* @__PURE__ */ jsx11("li", { children: /* @__PURE__ */ jsx11(Thumb, { ctx, id, name: byId.get(id)?.name ?? "", onBroken: markBroken }) }, id)),
3136
+ rest > 0 && /* @__PURE__ */ jsx11("li", { className: "band-plugin-react-atts-more", children: shown.length > 0 ? `+${rest}` : `${rest} \u4E2A\u9644\u4EF6` })
3619
3137
  ] });
3620
3138
  }
3621
- return /* @__PURE__ */ jsxs11(Fragment9, { children: [
3622
- images.length > 0 && /* @__PURE__ */ jsx12("ul", { className: "band-plugin-react-atts", "aria-label": "\u56FE\u7247", children: images.map((id) => /* @__PURE__ */ jsx12("li", { children: /* @__PURE__ */ jsx12(
3139
+ return /* @__PURE__ */ jsxs10(Fragment8, { children: [
3140
+ images.length > 0 && /* @__PURE__ */ jsx11("ul", { className: "band-plugin-react-atts", "aria-label": "\u56FE\u7247", children: images.map((id) => /* @__PURE__ */ jsx11("li", { children: /* @__PURE__ */ jsx11(
3623
3141
  "button",
3624
3142
  {
3625
3143
  type: "button",
3626
3144
  className: "band-plugin-react-atts-thumb",
3627
3145
  "aria-label": `\u67E5\u770B\u56FE\u7247 ${byId.get(id)?.name ?? ""}`,
3628
3146
  onClick: () => setOpen(id),
3629
- children: /* @__PURE__ */ jsx12(Thumb, { ctx, id, name: byId.get(id)?.name ?? "", onBroken: markBroken })
3147
+ children: /* @__PURE__ */ jsx11(Thumb, { ctx, id, name: byId.get(id)?.name ?? "", onBroken: markBroken })
3630
3148
  }
3631
3149
  ) }, id)) }),
3632
- files.length > 0 && /* @__PURE__ */ jsx12("ul", { className: "band-plugin-react-atts", "data-files": "", "aria-label": "\u6587\u4EF6", children: files.map((id) => /* @__PURE__ */ jsx12("li", { children: byId.get(id)?.deletedAt !== void 0 ? /* @__PURE__ */ jsx12(DeletedCard, { name: byId.get(id)?.name ?? "" }) : /* @__PURE__ */ jsx12(
3150
+ files.length > 0 && /* @__PURE__ */ jsx11("ul", { className: "band-plugin-react-atts", "data-files": "", "aria-label": "\u6587\u4EF6", children: files.map((id) => /* @__PURE__ */ jsx11("li", { children: byId.get(id)?.deletedAt !== void 0 ? /* @__PURE__ */ jsx11(DeletedCard, { name: byId.get(id)?.name ?? "" }) : /* @__PURE__ */ jsx11(
3633
3151
  FileCard,
3634
3152
  {
3635
3153
  ctx,
@@ -3641,7 +3159,7 @@ function MessageAttachments({ ctx, ids: given, compact = false }) {
3641
3159
  }
3642
3160
  }
3643
3161
  ) }, id)) }),
3644
- open !== null && gone === null && /* @__PURE__ */ jsx12(
3162
+ open !== null && gone === null && /* @__PURE__ */ jsx11(
3645
3163
  Lightbox,
3646
3164
  {
3647
3165
  ctx,
@@ -3656,10 +3174,10 @@ function MessageAttachments({ ctx, ids: given, compact = false }) {
3656
3174
  }
3657
3175
  function useAttachmentUrl(ctx, id, thumb, onError) {
3658
3176
  const key = `${id}\0${thumb ? "thumb" : ""}`;
3659
- const [got, setGot] = useState12(null);
3660
- const failed2 = useRef9(onError);
3177
+ const [got, setGot] = useState11(null);
3178
+ const failed2 = useRef8(onError);
3661
3179
  failed2.current = onError;
3662
- useEffect9(() => {
3180
+ useEffect8(() => {
3663
3181
  let live = true;
3664
3182
  ctx.attachments.url(id, { thumb }).then(
3665
3183
  (url) => live && setGot({ key, url }),
@@ -3682,7 +3200,7 @@ function Thumb({
3682
3200
  onBroken
3683
3201
  }) {
3684
3202
  const src = useAttachmentUrl(ctx, id, true, () => onBroken(id));
3685
- return src ? /* @__PURE__ */ jsx12(
3203
+ return src ? /* @__PURE__ */ jsx11(
3686
3204
  "img",
3687
3205
  {
3688
3206
  className: "band-plugin-react-atts-img",
@@ -3691,7 +3209,7 @@ function Thumb({
3691
3209
  loading: "lazy",
3692
3210
  onError: () => onBroken(id)
3693
3211
  }
3694
- ) : /* @__PURE__ */ jsx12("span", { className: "band-plugin-react-atts-img", "data-loading": "", "aria-hidden": true });
3212
+ ) : /* @__PURE__ */ jsx11("span", { className: "band-plugin-react-atts-img", "data-loading": "", "aria-hidden": true });
3695
3213
  }
3696
3214
  function saveAs(url, name) {
3697
3215
  const link = document.createElement("a");
@@ -3718,7 +3236,7 @@ function FileCard({
3718
3236
  },
3719
3237
  (e) => ctx.report(e)
3720
3238
  );
3721
- return /* @__PURE__ */ jsxs11(
3239
+ return /* @__PURE__ */ jsxs10(
3722
3240
  "button",
3723
3241
  {
3724
3242
  ref: cardRef,
@@ -3727,18 +3245,18 @@ function FileCard({
3727
3245
  title: inTab ? `\u5728\u65B0\u6807\u7B7E\u9875\u6253\u5F00 ${name}` : `\u4E0B\u8F7D ${name}`,
3728
3246
  onClick: go,
3729
3247
  children: [
3730
- /* @__PURE__ */ jsx12("span", { className: "band-plugin-react-atts-ext", "aria-hidden": true, children: fileExt(name) }),
3731
- /* @__PURE__ */ jsx12("span", { className: "band-plugin-react-atts-name", children: name }),
3732
- a && /* @__PURE__ */ jsx12("span", { className: "band-plugin-react-atts-size", children: formatBytes(a.size) }),
3733
- /* @__PURE__ */ jsx12("span", { className: "band-plugin-react-atts-act", children: inTab ? "\u6253\u5F00" : "\u4E0B\u8F7D" })
3248
+ /* @__PURE__ */ jsx11("span", { className: "band-plugin-react-atts-ext", "aria-hidden": true, children: fileExt(name) }),
3249
+ /* @__PURE__ */ jsx11("span", { className: "band-plugin-react-atts-name", children: name }),
3250
+ a && /* @__PURE__ */ jsx11("span", { className: "band-plugin-react-atts-size", children: formatBytes(a.size) }),
3251
+ /* @__PURE__ */ jsx11("span", { className: "band-plugin-react-atts-act", children: inTab ? "\u6253\u5F00" : "\u4E0B\u8F7D" })
3734
3252
  ]
3735
3253
  }
3736
3254
  );
3737
3255
  }
3738
3256
  function DeletedCard({ name }) {
3739
- return /* @__PURE__ */ jsxs11("span", { className: "band-plugin-react-atts-file", "data-deleted": "", children: [
3740
- /* @__PURE__ */ jsx12("span", { className: "band-plugin-react-atts-ext", "aria-hidden": true, children: fileExt(name) }),
3741
- /* @__PURE__ */ jsxs11("span", { className: "band-plugin-react-atts-name", children: [
3257
+ return /* @__PURE__ */ jsxs10("span", { className: "band-plugin-react-atts-file", "data-deleted": "", children: [
3258
+ /* @__PURE__ */ jsx11("span", { className: "band-plugin-react-atts-ext", "aria-hidden": true, children: fileExt(name) }),
3259
+ /* @__PURE__ */ jsxs10("span", { className: "band-plugin-react-atts-name", children: [
3742
3260
  "\u5DF2\u5220\u9664\u7684\u7D20\u6750 \xB7 ",
3743
3261
  name
3744
3262
  ] })
@@ -3752,14 +3270,14 @@ function Lightbox({
3752
3270
  onIndex,
3753
3271
  onClose
3754
3272
  }) {
3755
- const ref = useRef9(null);
3273
+ const ref = useRef8(null);
3756
3274
  const id = ids[index] ?? "";
3757
3275
  const src = useAttachmentUrl(ctx, id, false);
3758
- const [unpainted, setUnpainted] = useState12(null);
3276
+ const [unpainted, setUnpainted] = useState11(null);
3759
3277
  if (unpainted !== null && unpainted !== id) setUnpainted(null);
3760
3278
  const many = ids.length > 1;
3761
3279
  const step = (d) => onIndex((index + d + ids.length) % ids.length);
3762
- useEffect9(() => {
3280
+ useEffect8(() => {
3763
3281
  const el = ref.current;
3764
3282
  const opener = document.activeElement instanceof HTMLElement ? document.activeElement : null;
3765
3283
  if (el && !el.open) {
@@ -3771,7 +3289,7 @@ function Lightbox({
3771
3289
  };
3772
3290
  }, []);
3773
3291
  const name = names[index] ?? "";
3774
- return /* @__PURE__ */ jsxs11(
3292
+ return /* @__PURE__ */ jsxs10(
3775
3293
  "dialog",
3776
3294
  {
3777
3295
  ref,
@@ -3792,19 +3310,19 @@ function Lightbox({
3792
3310
  else if (many && e.key === "ArrowLeft") step(-1);
3793
3311
  }),
3794
3312
  children: [
3795
- /* @__PURE__ */ jsxs11("div", { className: "band-plugin-react-prompt-preview-h", children: [
3796
- /* @__PURE__ */ jsx12("span", { className: "band-plugin-react-prompt-name band-plugin-react-prompt-file", children: name }),
3797
- many && /* @__PURE__ */ jsxs11("span", { className: "band-plugin-react-atts-count", children: [
3313
+ /* @__PURE__ */ jsxs10("div", { className: "band-plugin-react-prompt-preview-h", children: [
3314
+ /* @__PURE__ */ jsx11("span", { className: "band-plugin-react-prompt-name band-plugin-react-prompt-file", children: name }),
3315
+ many && /* @__PURE__ */ jsxs10("span", { className: "band-plugin-react-atts-count", children: [
3798
3316
  index + 1,
3799
3317
  " / ",
3800
3318
  ids.length
3801
3319
  ] }),
3802
- /* @__PURE__ */ jsx12("span", { className: "grow" }),
3803
- many && /* @__PURE__ */ jsxs11(Fragment9, { children: [
3804
- /* @__PURE__ */ jsx12("button", { type: "button", className: "btn sm", "aria-label": "\u4E0A\u4E00\u5F20", onClick: () => step(-1), children: "\u2039" }),
3805
- /* @__PURE__ */ jsx12("button", { type: "button", className: "btn sm", "aria-label": "\u4E0B\u4E00\u5F20", onClick: () => step(1), children: "\u203A" })
3320
+ /* @__PURE__ */ jsx11("span", { className: "grow" }),
3321
+ many && /* @__PURE__ */ jsxs10(Fragment8, { children: [
3322
+ /* @__PURE__ */ jsx11("button", { type: "button", className: "btn sm", "aria-label": "\u4E0A\u4E00\u5F20", onClick: () => step(-1), children: "\u2039" }),
3323
+ /* @__PURE__ */ jsx11("button", { type: "button", className: "btn sm", "aria-label": "\u4E0B\u4E00\u5F20", onClick: () => step(1), children: "\u203A" })
3806
3324
  ] }),
3807
- /* @__PURE__ */ jsx12(
3325
+ /* @__PURE__ */ jsx11(
3808
3326
  "button",
3809
3327
  {
3810
3328
  type: "button",
@@ -3817,14 +3335,14 @@ function Lightbox({
3817
3335
  ] }),
3818
3336
  src === null ? (
3819
3337
  // 地址都没取到:没有可下载的东西,只说稍后再试(切走再切回来、关了再开会重取)
3820
- /* @__PURE__ */ jsx12("output", { className: "band-plugin-react-atts-wait", children: "\u8FD9\u5F20\u56FE\u6253\u4E0D\u5F00\uFF0C\u7A0D\u540E\u518D\u8BD5" })
3338
+ /* @__PURE__ */ jsx11("output", { className: "band-plugin-react-atts-wait", children: "\u8FD9\u5F20\u56FE\u6253\u4E0D\u5F00\uFF0C\u7A0D\u540E\u518D\u8BD5" })
3821
3339
  ) : unpainted === id && src ? (
3822
3340
  // 地址有、浏览器画不出:原图可能还是好的,给下载
3823
- /* @__PURE__ */ jsxs11("div", { className: "band-plugin-react-atts-wait", children: [
3824
- /* @__PURE__ */ jsx12("output", { children: "\u8FD9\u5F20\u56FE\u5728\u8FD9\u91CC\u6253\u4E0D\u5F00\uFF0C\u53EF\u4EE5\u4E0B\u8F7D\u4E0B\u6765\u770B" }),
3825
- /* @__PURE__ */ jsx12("button", { type: "button", className: "btn sm", onClick: () => saveAs(src, name), children: "\u4E0B\u8F7D" })
3341
+ /* @__PURE__ */ jsxs10("div", { className: "band-plugin-react-atts-wait", children: [
3342
+ /* @__PURE__ */ jsx11("output", { children: "\u8FD9\u5F20\u56FE\u5728\u8FD9\u91CC\u6253\u4E0D\u5F00\uFF0C\u53EF\u4EE5\u4E0B\u8F7D\u4E0B\u6765\u770B" }),
3343
+ /* @__PURE__ */ jsx11("button", { type: "button", className: "btn sm", onClick: () => saveAs(src, name), children: "\u4E0B\u8F7D" })
3826
3344
  ] })
3827
- ) : src === void 0 ? /* @__PURE__ */ jsx12("p", { className: "band-plugin-react-atts-wait", children: "\u6B63\u5728\u6253\u5F00\u2026" }) : /* @__PURE__ */ jsx12(
3345
+ ) : src === void 0 ? /* @__PURE__ */ jsx11("p", { className: "band-plugin-react-atts-wait", children: "\u6B63\u5728\u6253\u5F00\u2026" }) : /* @__PURE__ */ jsx11(
3828
3346
  "img",
3829
3347
  {
3830
3348
  className: "band-plugin-react-prompt-big",
@@ -3839,7 +3357,7 @@ function Lightbox({
3839
3357
  }
3840
3358
 
3841
3359
  // src/message/Message.tsx
3842
- import { Fragment as Fragment10, jsx as jsx13, jsxs as jsxs12 } from "react/jsx-runtime";
3360
+ import { Fragment as Fragment9, jsx as jsx12, jsxs as jsxs11 } from "react/jsx-runtime";
3843
3361
  var P = "band-plugin-react-msg";
3844
3362
  var LONG_PRESS_MS = 500;
3845
3363
  var SWALLOW_MS = 800;
@@ -3869,18 +3387,18 @@ async function copyText(text) {
3869
3387
  }
3870
3388
  }
3871
3389
  function useReactionPatches(ctx, base) {
3872
- const [patches, setPatches] = useState13({ base, map: /* @__PURE__ */ new Map() });
3873
- useEffect10(() => {
3874
- let alive = true;
3875
- const seq3 = /* @__PURE__ */ new Map();
3390
+ const [patches, setPatches] = useState12({ base, map: /* @__PURE__ */ new Map() });
3391
+ useEffect9(() => {
3392
+ let alive2 = true;
3393
+ const seq2 = /* @__PURE__ */ new Map();
3876
3394
  const off = ctx.events.subscribe("reaction.changed", (e) => {
3877
3395
  const threadId = e.payload.threadId;
3878
3396
  if (typeof threadId !== "string") return;
3879
- const n = (seq3.get(threadId) ?? 0) + 1;
3880
- seq3.set(threadId, n);
3397
+ const n = (seq2.get(threadId) ?? 0) + 1;
3398
+ seq2.set(threadId, n);
3881
3399
  ctx.threads.comments(threadId).then(
3882
3400
  (comments) => {
3883
- if (!alive || seq3.get(threadId) !== n) return;
3401
+ if (!alive2 || seq2.get(threadId) !== n) return;
3884
3402
  setPatches((p) => {
3885
3403
  const map2 = new Map(p.base === base ? p.map : []);
3886
3404
  for (const c of comments) map2.set(c.id, c.reactions);
@@ -3892,7 +3410,7 @@ function useReactionPatches(ctx, base) {
3892
3410
  );
3893
3411
  });
3894
3412
  return () => {
3895
- alive = false;
3413
+ alive2 = false;
3896
3414
  off();
3897
3415
  };
3898
3416
  }, [ctx, base]);
@@ -3903,8 +3421,8 @@ var messagesOf = (root) => [...root.querySelectorAll("[data-band-message]")].fil
3903
3421
  (el) => el.closest("[data-band-messages]") === root
3904
3422
  );
3905
3423
  function useMessageList() {
3906
- const ref = useRef10(null);
3907
- const active = useRef10(null);
3424
+ const ref = useRef9(null);
3425
+ const active = useRef9(null);
3908
3426
  useLayoutEffect3(() => {
3909
3427
  const root = ref.current;
3910
3428
  if (!root) return;
@@ -3951,18 +3469,18 @@ function Message({
3951
3469
  const system = c.kind === "system";
3952
3470
  const react = ctx.threads.react;
3953
3471
  const canReact = !system && Boolean(react) && ctx.member.can("comment");
3954
- const [pending, setPending] = useState13(/* @__PURE__ */ new Map());
3955
- const [failed2, setFailed] = useState13();
3956
- const [menu, setMenu] = useState13(null);
3957
- const [sheet, setSheet] = useState13(false);
3958
- const [copied, setCopied] = useState13(false);
3959
- const [notice, setNotice] = useState13("");
3960
- const root = useRef10(null);
3961
- const reactBtn = useRef10(null);
3962
- const moreBtn = useRef10(null);
3963
- const addBtn = useRef10(null);
3964
- useEffect10(() => {
3965
- const done = settledPending(reactions, pending, me);
3472
+ const [pending2, setPending] = useState12(/* @__PURE__ */ new Map());
3473
+ const [failed2, setFailed] = useState12();
3474
+ const [menu, setMenu] = useState12(null);
3475
+ const [sheet, setSheet] = useState12(false);
3476
+ const [copied, setCopied] = useState12(false);
3477
+ const [notice, setNotice] = useState12("");
3478
+ const root = useRef9(null);
3479
+ const reactBtn = useRef9(null);
3480
+ const moreBtn = useRef9(null);
3481
+ const addBtn = useRef9(null);
3482
+ useEffect9(() => {
3483
+ const done = settledPending(reactions, pending2, me);
3966
3484
  if (done.length === 0) return;
3967
3485
  setPending((p) => {
3968
3486
  const next = new Map(p);
@@ -3970,12 +3488,12 @@ function Message({
3970
3488
  return next;
3971
3489
  });
3972
3490
  });
3973
- useEffect10(() => {
3491
+ useEffect9(() => {
3974
3492
  if (!copied) return;
3975
3493
  const t = setTimeout(() => setCopied(false), COPIED_MS);
3976
3494
  return () => clearTimeout(t);
3977
3495
  }, [copied]);
3978
- const shown = mergeReactions(reactions, pending, me);
3496
+ const shown = mergeReactions(reactions, pending2, me);
3979
3497
  const toggle = (emoji, on) => {
3980
3498
  if (!react || !canReact) return;
3981
3499
  const target = on ?? !shown.find((r) => r.emoji === emoji)?.mine;
@@ -4044,13 +3562,13 @@ function Message({
4044
3562
  icon: ICON.copy,
4045
3563
  run: () => void copy(plainText(c.body), "")
4046
3564
  };
4047
- const press = useRef10(null);
4048
- const swallowUntil = useRef10(0);
3565
+ const press = useRef9(null);
3566
+ const swallowUntil = useRef9(0);
4049
3567
  const cancelPress = () => {
4050
3568
  if (press.current) clearTimeout(press.current.timer);
4051
3569
  press.current = null;
4052
3570
  };
4053
- useEffect10(
3571
+ useEffect9(
4054
3572
  () => () => {
4055
3573
  if (press.current) clearTimeout(press.current.timer);
4056
3574
  },
@@ -4081,7 +3599,7 @@ function Message({
4081
3599
  checked: Boolean(shown.find((r) => r.emoji === emoji)?.mine)
4082
3600
  })) : [];
4083
3601
  const returnTo = menu === "react" ? reactBtn : menu === "add" ? addBtn : moreBtn;
4084
- return /* @__PURE__ */ jsxs12(
3602
+ return /* @__PURE__ */ jsxs11(
4085
3603
  "article",
4086
3604
  {
4087
3605
  ref: root,
@@ -4104,8 +3622,8 @@ function Message({
4104
3622
  e.stopPropagation();
4105
3623
  },
4106
3624
  children: [
4107
- /* @__PURE__ */ jsxs12(Toolbar, { children: [
4108
- canReact && /* @__PURE__ */ jsx13(
3625
+ /* @__PURE__ */ jsxs11(Toolbar, { children: [
3626
+ canReact && /* @__PURE__ */ jsx12(
4109
3627
  "button",
4110
3628
  {
4111
3629
  ref: reactBtn,
@@ -4122,7 +3640,7 @@ function Message({
4122
3640
  children: ICON.react
4123
3641
  }
4124
3642
  ),
4125
- /* @__PURE__ */ jsx13(
3643
+ /* @__PURE__ */ jsx12(
4126
3644
  "button",
4127
3645
  {
4128
3646
  type: "button",
@@ -4136,7 +3654,7 @@ function Message({
4136
3654
  children: copied ? ICON.check : ICON.copy
4137
3655
  }
4138
3656
  ),
4139
- items.length > 0 && /* @__PURE__ */ jsx13(
3657
+ items.length > 0 && /* @__PURE__ */ jsx12(
4140
3658
  "button",
4141
3659
  {
4142
3660
  ref: moreBtn,
@@ -4155,9 +3673,9 @@ function Message({
4155
3673
  )
4156
3674
  ] }),
4157
3675
  children2,
4158
- c.attachments && c.attachments.length > 0 && /* @__PURE__ */ jsx13(MessageAttachments, { ctx, ids: c.attachments }),
4159
- shown.length > 0 && /* @__PURE__ */ jsxs12("div", { className: `${P}-rx`, children: [
4160
- shown.map((r) => /* @__PURE__ */ jsx13(
3676
+ c.attachments && c.attachments.length > 0 && /* @__PURE__ */ jsx12(MessageAttachments, { ctx, ids: c.attachments }),
3677
+ shown.length > 0 && /* @__PURE__ */ jsxs11("div", { className: `${P}-rx`, children: [
3678
+ shown.map((r) => /* @__PURE__ */ jsx12(
4161
3679
  Chip,
4162
3680
  {
4163
3681
  r,
@@ -4167,7 +3685,7 @@ function Message({
4167
3685
  },
4168
3686
  r.emoji
4169
3687
  )),
4170
- canReact && /* @__PURE__ */ jsx13(
3688
+ canReact && /* @__PURE__ */ jsx12(
4171
3689
  "button",
4172
3690
  {
4173
3691
  ref: addBtn,
@@ -4183,7 +3701,7 @@ function Message({
4183
3701
  children: ICON.react
4184
3702
  }
4185
3703
  ),
4186
- menu === "add" && /* @__PURE__ */ jsx13(
3704
+ menu === "add" && /* @__PURE__ */ jsx12(
4187
3705
  Menu2,
4188
3706
  {
4189
3707
  place: "rx",
@@ -4196,12 +3714,12 @@ function Message({
4196
3714
  }
4197
3715
  )
4198
3716
  ] }),
4199
- failed2 && /* @__PURE__ */ jsxs12("div", { className: `${P}-err`, role: "alert", children: [
3717
+ failed2 && /* @__PURE__ */ jsxs11("div", { className: `${P}-err`, role: "alert", children: [
4200
3718
  "\u56DE\u5E94\u6CA1\u53D1\u51FA\u53BB\uFF1A",
4201
3719
  failed2.text,
4202
- /* @__PURE__ */ jsx13("button", { type: "button", onClick: () => toggle(failed2.emoji, failed2.on), children: "\u91CD\u8BD5" })
3720
+ /* @__PURE__ */ jsx12("button", { type: "button", onClick: () => toggle(failed2.emoji, failed2.on), children: "\u91CD\u8BD5" })
4203
3721
  ] }),
4204
- (menu === "react" || menu === "more") && /* @__PURE__ */ jsx13(
3722
+ (menu === "react" || menu === "more") && /* @__PURE__ */ jsx12(
4205
3723
  Menu2,
4206
3724
  {
4207
3725
  place: "bar",
@@ -4214,7 +3732,7 @@ function Message({
4214
3732
  }
4215
3733
  ),
4216
3734
  sheet && createPortal(
4217
- /* @__PURE__ */ jsx13(
3735
+ /* @__PURE__ */ jsx12(
4218
3736
  Sheet,
4219
3737
  {
4220
3738
  preview: children2,
@@ -4229,7 +3747,7 @@ function Message({
4229
3747
  ),
4230
3748
  document.body
4231
3749
  ),
4232
- notice && /* @__PURE__ */ jsx13("output", { className: "sr-only", children: notice })
3750
+ notice && /* @__PURE__ */ jsx12("output", { className: "sr-only", children: notice })
4233
3751
  ]
4234
3752
  }
4235
3753
  );
@@ -4244,7 +3762,7 @@ function Toolbar({ children: children2 }) {
4244
3762
  e.stopPropagation();
4245
3763
  to?.focus();
4246
3764
  });
4247
- return /* @__PURE__ */ jsx13("div", { className: `${P}-bar`, role: "toolbar", "aria-label": "\u6D88\u606F\u64CD\u4F5C", onKeyDown: onToolbarKey, children: children2 });
3765
+ return /* @__PURE__ */ jsx12("div", { className: `${P}-bar`, role: "toolbar", "aria-label": "\u6D88\u606F\u64CD\u4F5C", onKeyDown: onToolbarKey, children: children2 });
4248
3766
  }
4249
3767
  function Chip({
4250
3768
  r,
@@ -4253,14 +3771,14 @@ function Chip({
4253
3771
  onToggle
4254
3772
  }) {
4255
3773
  const cls = `${P}-chip${r.mine ? " mine" : ""}${r.pending ? " pending" : ""}`;
4256
- const inner = /* @__PURE__ */ jsxs12(Fragment10, { children: [
4257
- /* @__PURE__ */ jsx13("span", { className: `${P}-e`, "aria-hidden": "true", children: r.emoji }),
4258
- /* @__PURE__ */ jsx13("span", { "aria-hidden": "true", children: r.actors.length }),
4259
- /* @__PURE__ */ jsx13("span", { className: `${P}-tip`, "aria-hidden": "true", children: who })
3774
+ const inner = /* @__PURE__ */ jsxs11(Fragment9, { children: [
3775
+ /* @__PURE__ */ jsx12("span", { className: `${P}-e`, "aria-hidden": "true", children: r.emoji }),
3776
+ /* @__PURE__ */ jsx12("span", { "aria-hidden": "true", children: r.actors.length }),
3777
+ /* @__PURE__ */ jsx12("span", { className: `${P}-tip`, "aria-hidden": "true", children: who })
4260
3778
  ] });
4261
3779
  if (!onToggle)
4262
- return /* @__PURE__ */ jsx13("span", { className: cls, role: "img", "aria-label": label, children: inner });
4263
- return /* @__PURE__ */ jsx13(
3780
+ return /* @__PURE__ */ jsx12("span", { className: cls, role: "img", "aria-label": label, children: inner });
3781
+ return /* @__PURE__ */ jsx12(
4264
3782
  "button",
4265
3783
  {
4266
3784
  type: "button",
@@ -4300,7 +3818,7 @@ function EmojiRow({
4300
3818
  emojis,
4301
3819
  onEmoji
4302
3820
  }) {
4303
- return /* @__PURE__ */ jsx13("fieldset", { className: `${P}-emo`, "aria-label": "\u56DE\u5E94", children: emojis.map(({ emoji, checked }) => /* @__PURE__ */ jsx13(
3821
+ return /* @__PURE__ */ jsx12("fieldset", { className: `${P}-emo`, "aria-label": "\u56DE\u5E94", children: emojis.map(({ emoji, checked }) => /* @__PURE__ */ jsx12(
4304
3822
  "button",
4305
3823
  {
4306
3824
  type: "button",
@@ -4318,7 +3836,7 @@ function EmojiRow({
4318
3836
  )) });
4319
3837
  }
4320
3838
  function ItemList({ items, onPick }) {
4321
- return /* @__PURE__ */ jsx13(Fragment10, { children: items.map((it) => /* @__PURE__ */ jsxs12(
3839
+ return /* @__PURE__ */ jsx12(Fragment9, { children: items.map((it) => /* @__PURE__ */ jsxs11(
4322
3840
  "button",
4323
3841
  {
4324
3842
  type: "button",
@@ -4345,8 +3863,8 @@ function Menu2({
4345
3863
  onClose,
4346
3864
  returnFocus
4347
3865
  }) {
4348
- const ref = useRef10(null);
4349
- const [pos, setPos] = useState13(null);
3866
+ const ref = useRef9(null);
3867
+ const [pos, setPos] = useState12(null);
4350
3868
  const close = useCallback4(() => {
4351
3869
  onClose();
4352
3870
  returnFocus.current?.focus();
@@ -4369,10 +3887,10 @@ function Menu2({
4369
3887
  const top = below + m.height > vh - edge && above >= edge ? above : below;
4370
3888
  setPos({ top, left });
4371
3889
  }, [place, returnFocus]);
4372
- useEffect10(() => {
3890
+ useEffect9(() => {
4373
3891
  if (pos) ref.current?.querySelector('[role^="menuitem"]')?.focus();
4374
3892
  }, [pos]);
4375
- useEffect10(() => {
3893
+ useEffect9(() => {
4376
3894
  const onDown = (e) => {
4377
3895
  const t = e.target;
4378
3896
  if (ref.current?.contains(t) || returnFocus.current?.contains(t)) return;
@@ -4392,7 +3910,7 @@ function Menu2({
4392
3910
  };
4393
3911
  }, [onClose, returnFocus]);
4394
3912
  return createPortal(
4395
- /* @__PURE__ */ jsxs12(
3913
+ /* @__PURE__ */ jsxs11(
4396
3914
  "div",
4397
3915
  {
4398
3916
  ref,
@@ -4402,7 +3920,7 @@ function Menu2({
4402
3920
  "aria-label": label,
4403
3921
  onKeyDown: onMenuKeys,
4404
3922
  children: [
4405
- emojis.length > 0 && /* @__PURE__ */ jsx13(
3923
+ emojis.length > 0 && /* @__PURE__ */ jsx12(
4406
3924
  EmojiRow,
4407
3925
  {
4408
3926
  emojis,
@@ -4412,8 +3930,8 @@ function Menu2({
4412
3930
  }
4413
3931
  }
4414
3932
  ),
4415
- emojis.length > 0 && items.length > 0 && /* @__PURE__ */ jsx13("div", { className: `${P}-sep` }),
4416
- /* @__PURE__ */ jsx13(
3933
+ emojis.length > 0 && items.length > 0 && /* @__PURE__ */ jsx12("div", { className: `${P}-sep` }),
3934
+ /* @__PURE__ */ jsx12(
4417
3935
  ItemList,
4418
3936
  {
4419
3937
  items,
@@ -4436,15 +3954,15 @@ function Sheet({
4436
3954
  onEmoji,
4437
3955
  onClose
4438
3956
  }) {
4439
- const ref = useRef10(null);
3957
+ const ref = useRef9(null);
4440
3958
  const onSheetKeys = withImeGuard(useMenuKeys(onClose));
4441
3959
  useLayoutEffect3(() => {
4442
3960
  ref.current?.querySelector('[role^="menuitem"]')?.focus();
4443
3961
  }, []);
4444
- return /* @__PURE__ */ jsxs12("div", { className: `${P}-sheetwrap`, children: [
4445
- /* @__PURE__ */ jsx13("button", { type: "button", className: `${P}-scrim`, "aria-label": "\u5173\u95ED", onClick: onClose }),
4446
- /* @__PURE__ */ jsx13("div", { className: `${P}-lifted`, "aria-hidden": "true", ref: (el) => el?.setAttribute("inert", ""), children: preview }),
4447
- /* @__PURE__ */ jsxs12(
3962
+ return /* @__PURE__ */ jsxs11("div", { className: `${P}-sheetwrap`, children: [
3963
+ /* @__PURE__ */ jsx12("button", { type: "button", className: `${P}-scrim`, "aria-label": "\u5173\u95ED", onClick: onClose }),
3964
+ /* @__PURE__ */ jsx12("div", { className: `${P}-lifted`, "aria-hidden": "true", ref: (el) => el?.setAttribute("inert", ""), children: preview }),
3965
+ /* @__PURE__ */ jsxs11(
4448
3966
  "div",
4449
3967
  {
4450
3968
  ref,
@@ -4453,8 +3971,8 @@ function Sheet({
4453
3971
  "aria-label": "\u6D88\u606F\u64CD\u4F5C",
4454
3972
  onKeyDown: onSheetKeys,
4455
3973
  children: [
4456
- /* @__PURE__ */ jsx13("div", { className: `${P}-grab` }),
4457
- emojis.length > 0 && /* @__PURE__ */ jsx13(
3974
+ /* @__PURE__ */ jsx12("div", { className: `${P}-grab` }),
3975
+ emojis.length > 0 && /* @__PURE__ */ jsx12(
4458
3976
  EmojiRow,
4459
3977
  {
4460
3978
  emojis,
@@ -4464,7 +3982,7 @@ function Sheet({
4464
3982
  }
4465
3983
  }
4466
3984
  ),
4467
- /* @__PURE__ */ jsx13(
3985
+ /* @__PURE__ */ jsx12(
4468
3986
  ItemList,
4469
3987
  {
4470
3988
  items,
@@ -4479,36 +3997,36 @@ function Sheet({
4479
3997
  )
4480
3998
  ] });
4481
3999
  }
4482
- var svg = (body) => /* @__PURE__ */ jsx13("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", children: body });
4000
+ var svg = (body) => /* @__PURE__ */ jsx12("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", children: body });
4483
4001
  var ICON = {
4484
4002
  react: svg(
4485
- /* @__PURE__ */ jsxs12(Fragment10, { children: [
4486
- /* @__PURE__ */ jsx13("circle", { cx: "7.5", cy: "8.5", r: "5.5" }),
4487
- /* @__PURE__ */ jsx13("path", { d: "M5.5 9.8c.5.8 1.2 1.2 2 1.2s1.5-.4 2-1.2M5.6 7h0M9.4 7h0M13 1.5v3M11.5 3h3" })
4003
+ /* @__PURE__ */ jsxs11(Fragment9, { children: [
4004
+ /* @__PURE__ */ jsx12("circle", { cx: "7.5", cy: "8.5", r: "5.5" }),
4005
+ /* @__PURE__ */ jsx12("path", { d: "M5.5 9.8c.5.8 1.2 1.2 2 1.2s1.5-.4 2-1.2M5.6 7h0M9.4 7h0M13 1.5v3M11.5 3h3" })
4488
4006
  ] })
4489
4007
  ),
4490
4008
  copy: svg(
4491
- /* @__PURE__ */ jsxs12(Fragment10, { children: [
4492
- /* @__PURE__ */ jsx13("rect", { x: "5", y: "5", width: "8.5", height: "8.5", rx: "1.5" }),
4493
- /* @__PURE__ */ jsx13("path", { d: "M11 5V3.5A1.5 1.5 0 0 0 9.5 2h-6A1.5 1.5 0 0 0 2 3.5v6A1.5 1.5 0 0 0 3.5 11H5" })
4009
+ /* @__PURE__ */ jsxs11(Fragment9, { children: [
4010
+ /* @__PURE__ */ jsx12("rect", { x: "5", y: "5", width: "8.5", height: "8.5", rx: "1.5" }),
4011
+ /* @__PURE__ */ jsx12("path", { d: "M11 5V3.5A1.5 1.5 0 0 0 9.5 2h-6A1.5 1.5 0 0 0 2 3.5v6A1.5 1.5 0 0 0 3.5 11H5" })
4494
4012
  ] })
4495
4013
  ),
4496
- check: svg(/* @__PURE__ */ jsx13("path", { d: "M3 8.5l3 3 7-7" })),
4497
- more: svg(/* @__PURE__ */ jsx13("path", { d: "M3.5 8h0M8 8h0M12.5 8h0", strokeWidth: "2.2" })),
4498
- md: svg(/* @__PURE__ */ jsx13("path", { d: "M2 12V4l3 3.5L8 4v8M11.5 4v8M9.5 10l2 2 2-2" })),
4014
+ check: svg(/* @__PURE__ */ jsx12("path", { d: "M3 8.5l3 3 7-7" })),
4015
+ more: svg(/* @__PURE__ */ jsx12("path", { d: "M3.5 8h0M8 8h0M12.5 8h0", strokeWidth: "2.2" })),
4016
+ md: svg(/* @__PURE__ */ jsx12("path", { d: "M2 12V4l3 3.5L8 4v8M11.5 4v8M9.5 10l2 2 2-2" })),
4499
4017
  quote: svg(
4500
- /* @__PURE__ */ jsxs12(Fragment10, { children: [
4501
- /* @__PURE__ */ jsx13("path", { d: "M3 4.5h10M3 8h6M3 11.5h8" }),
4502
- /* @__PURE__ */ jsx13("path", { d: "M13 8.5v4" })
4018
+ /* @__PURE__ */ jsxs11(Fragment9, { children: [
4019
+ /* @__PURE__ */ jsx12("path", { d: "M3 4.5h10M3 8h6M3 11.5h8" }),
4020
+ /* @__PURE__ */ jsx12("path", { d: "M13 8.5v4" })
4503
4021
  ] })
4504
4022
  ),
4505
4023
  link: svg(
4506
- /* @__PURE__ */ jsx13("path", { d: "M6.5 9.5l3-3M7 4.5l1-1a2.8 2.8 0 0 1 4 4l-1 1M9 11.5l-1 1a2.8 2.8 0 0 1-4-4l1-1" })
4024
+ /* @__PURE__ */ jsx12("path", { d: "M6.5 9.5l3-3M7 4.5l1-1a2.8 2.8 0 0 1 4 4l-1 1M9 11.5l-1 1a2.8 2.8 0 0 1-4-4l1-1" })
4507
4025
  ),
4508
4026
  eye: svg(
4509
- /* @__PURE__ */ jsxs12(Fragment10, { children: [
4510
- /* @__PURE__ */ jsx13("path", { d: "M2 8s2.2-4.5 6-4.5S14 8 14 8s-2.2 4.5-6 4.5S2 8 2 8z" }),
4511
- /* @__PURE__ */ jsx13("circle", { cx: "8", cy: "8", r: "1.8" })
4027
+ /* @__PURE__ */ jsxs11(Fragment9, { children: [
4028
+ /* @__PURE__ */ jsx12("path", { d: "M2 8s2.2-4.5 6-4.5S14 8 14 8s-2.2 4.5-6 4.5S2 8 2 8z" }),
4029
+ /* @__PURE__ */ jsx12("circle", { cx: "8", cy: "8", r: "1.8" })
4512
4030
  ] })
4513
4031
  )
4514
4032
  };
@@ -4546,7 +4064,7 @@ function parseMemoryItem(item) {
4546
4064
 
4547
4065
  // src/memory/MemoryNote.tsx
4548
4066
  import { defineScopeState } from "@kanyun-ai-infra/band-plugin-sdk";
4549
- import { jsx as jsx14, jsxs as jsxs13 } from "react/jsx-runtime";
4067
+ import { jsx as jsx13, jsxs as jsxs12 } from "react/jsx-runtime";
4550
4068
  var P2 = "band-plugin-react-memo";
4551
4069
  var SETTINGS_PAGE = "@kanyun-ai-infra/band-settings/settings";
4552
4070
  var lookups = defineScopeState((ctx) => {
@@ -4603,7 +4121,7 @@ function MemoryNote({ ctx, turnId }) {
4603
4121
  }
4604
4122
  };
4605
4123
  const text = n.memo ? `\u8BB0\u4E0B\u4E86\uFF1A${n.memo}${n.more > 0 ? ` \u7B49 ${n.more + 1} \u6761` : ""}` : n.files.length > 0 ? `\u6539\u4E86\u8BB0\u5FC6\uFF1A${n.files.join("\u3001")}` : n.rejected.length > 0 ? "\u8FD9\u6B21\u7684\u8BB0\u5FC6\u6539\u52A8\u6CA1\u6709\u91C7\u7528" : "\u8BB0\u5FC6\u5B58\u4E86\u4E00\u7248\uFF0C\u5185\u5BB9\u6CA1\u53D8";
4606
- return /* @__PURE__ */ jsxs13(
4124
+ return /* @__PURE__ */ jsxs12(
4607
4125
  "button",
4608
4126
  {
4609
4127
  type: "button",
@@ -4611,13 +4129,13 @@ function MemoryNote({ ctx, turnId }) {
4611
4129
  onClick: open,
4612
4130
  title: "\u9879\u76EE\u8BB0\u5FC6\uFF1AAgent \u5DE5\u4F5C\u65F6\u81EA\u5DF1\u8BFB\u5199\uFF0C\u4F60\u4E5F\u53EF\u4EE5\u6539\u3002\u70B9\u5F00\u770B\u8FD9\u6B21\u7684\u6539\u52A8",
4613
4131
  children: [
4614
- /* @__PURE__ */ jsxs13("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", children: [
4615
- /* @__PURE__ */ jsx14("path", { d: "M4 2.5h6l2.5 2.5v8.5H4z" }),
4616
- /* @__PURE__ */ jsx14("path", { d: "M6 7h4.5M6 9.5h4.5" })
4132
+ /* @__PURE__ */ jsxs12("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", children: [
4133
+ /* @__PURE__ */ jsx13("path", { d: "M4 2.5h6l2.5 2.5v8.5H4z" }),
4134
+ /* @__PURE__ */ jsx13("path", { d: "M6 7h4.5M6 9.5h4.5" })
4617
4135
  ] }),
4618
- /* @__PURE__ */ jsxs13("span", { children: [
4136
+ /* @__PURE__ */ jsxs12("span", { children: [
4619
4137
  text,
4620
- n.rejected.length > 0 && /* @__PURE__ */ jsxs13("span", { className: `${P2}-rejected`, children: [
4138
+ n.rejected.length > 0 && /* @__PURE__ */ jsxs12("span", { className: `${P2}-rejected`, children: [
4621
4139
  n.rejected.join("\u3001"),
4622
4140
  " \u7684\u4FEE\u6539\u6CA1\u6709\u91C7\u7528\uFF08\u548C\u522B\u7684\u6539\u52A8\u649E\u4E86\u6216\u8D85\u4E86\u4E0A\u9650\uFF09\uFF0C\u70B9\u5F00\u67E5\u770B"
4623
4141
  ] })
@@ -4627,278 +4145,6 @@ function MemoryNote({ ctx, turnId }) {
4627
4145
  );
4628
4146
  }
4629
4147
 
4630
- // src/toast/store.ts
4631
- var MAX_TOASTS = 3;
4632
- var OK_MS = 4e3;
4633
- var LEAVE_MS = 2e3;
4634
- var TOAST_CLOSE_LABEL = "\u5173\u95ED";
4635
- var EMPTY = [];
4636
- var entries = [];
4637
- var listeners = /* @__PURE__ */ new Set();
4638
- var snapshot = EMPTY;
4639
- var seq2 = 0;
4640
- function subscribeToasts(listener) {
4641
- listeners.add(listener);
4642
- return () => {
4643
- listeners.delete(listener);
4644
- };
4645
- }
4646
- function toastsSnapshot() {
4647
- return snapshot;
4648
- }
4649
- function emptyToasts() {
4650
- return EMPTY;
4651
- }
4652
- function publish() {
4653
- snapshot = entries.length === 0 ? EMPTY : entries.map((e) => ({
4654
- id: e.id,
4655
- kind: e.kind,
4656
- text: e.text,
4657
- detail: e.detail,
4658
- action: e.action
4659
- }));
4660
- for (const listener of listeners) listener();
4661
- }
4662
- function clearTimer(entry) {
4663
- if (entry.timer !== void 0) {
4664
- clearTimeout(entry.timer);
4665
- entry.timer = void 0;
4666
- }
4667
- }
4668
- function arm(id, ms) {
4669
- const entry = entries.find((e) => e.id === id);
4670
- if (!entry) return;
4671
- clearTimer(entry);
4672
- if (entry.pausedBy.size > 0) return;
4673
- entry.timer = setTimeout(() => dismissToast(id), ms);
4674
- }
4675
- function toast(opts) {
4676
- const kind = opts.kind ?? "ok";
4677
- const id = opts.id ?? `toast-${++seq2}`;
4678
- const existing = entries.find((e) => e.id === id);
4679
- if (existing) {
4680
- clearTimer(existing);
4681
- existing.kind = kind;
4682
- existing.text = opts.text;
4683
- existing.detail = opts.detail;
4684
- existing.action = opts.action;
4685
- } else {
4686
- if (entries.length >= MAX_TOASTS) {
4687
- const i = entries.findIndex((e) => e.kind !== "busy");
4688
- const [dropped] = entries.splice(i === -1 ? 0 : i, 1);
4689
- if (dropped) clearTimer(dropped);
4690
- }
4691
- entries.push({
4692
- id,
4693
- kind,
4694
- text: opts.text,
4695
- detail: opts.detail,
4696
- action: opts.action,
4697
- pausedBy: /* @__PURE__ */ new Set()
4698
- });
4699
- }
4700
- if (kind === "ok") arm(id, OK_MS);
4701
- publish();
4702
- return id;
4703
- }
4704
- function pauseToast(id, by = "pointer") {
4705
- const entry = entries.find((e) => e.id === id);
4706
- if (!entry) return;
4707
- entry.pausedBy.add(by);
4708
- clearTimer(entry);
4709
- }
4710
- function resumeToast(id, by = "pointer") {
4711
- const entry = entries.find((e) => e.id === id);
4712
- if (!entry) return;
4713
- entry.pausedBy.delete(by);
4714
- if (entry.kind === "ok" && entry.pausedBy.size === 0) arm(id, LEAVE_MS);
4715
- }
4716
- function syncToastPause(id, paused) {
4717
- const entry = entries.find((e) => e.id === id);
4718
- if (!entry) return;
4719
- const wasPaused = entry.pausedBy.size > 0;
4720
- entry.pausedBy.clear();
4721
- if (paused.pointer) entry.pausedBy.add("pointer");
4722
- if (paused.focus) entry.pausedBy.add("focus");
4723
- if (entry.pausedBy.size > 0) clearTimer(entry);
4724
- else if (wasPaused && entry.kind === "ok") arm(id, LEAVE_MS);
4725
- }
4726
- function dismissToast(id) {
4727
- const i = entries.findIndex((e) => e.id === id);
4728
- if (i < 0) return;
4729
- const [entry] = entries.splice(i, 1);
4730
- if (entry) clearTimer(entry);
4731
- publish();
4732
- }
4733
- function dismissAllToasts() {
4734
- for (const entry of entries) clearTimer(entry);
4735
- entries = [];
4736
- publish();
4737
- }
4738
-
4739
- // src/toast/ToastHost.tsx
4740
- import { withImeGuard as withImeGuard3 } from "@kanyun-ai-infra/band-plugin-sdk";
4741
- import { useEffect as useEffect11, useRef as useRef11, useSyncExternalStore as useSyncExternalStore3 } from "react";
4742
- import { createPortal as createPortal2 } from "react-dom";
4743
- import { jsx as jsx15, jsxs as jsxs14 } from "react/jsx-runtime";
4744
- var MODAL_SELECTOR = "dialog:modal, dialog[open][data-band-layer]";
4745
- var MODAL_FALLBACK = "dialog[open][data-band-layer]";
4746
- var modalOrder = /* @__PURE__ */ new Map();
4747
- var modalSeq = 0;
4748
- function openModals() {
4749
- try {
4750
- return [...document.querySelectorAll(MODAL_SELECTOR)];
4751
- } catch {
4752
- return [...document.querySelectorAll(MODAL_FALLBACK)];
4753
- }
4754
- }
4755
- function modalTarget() {
4756
- if (typeof document === "undefined") return null;
4757
- const modals = openModals();
4758
- const live = new Set(modals);
4759
- for (const el of [...modalOrder.keys()]) if (!live.has(el)) modalOrder.delete(el);
4760
- for (const el of modals) if (!modalOrder.has(el)) modalOrder.set(el, ++modalSeq);
4761
- let top = null;
4762
- let seq3 = -1;
4763
- for (const el of modals) {
4764
- const n = modalOrder.get(el) ?? 0;
4765
- if (n > seq3) {
4766
- seq3 = n;
4767
- top = el;
4768
- }
4769
- }
4770
- return top ?? null;
4771
- }
4772
- var modalListeners = /* @__PURE__ */ new Set();
4773
- var modalObserver = null;
4774
- var modalSnapshot = null;
4775
- function topChanged() {
4776
- const next = modalTarget();
4777
- if (next === modalSnapshot) return;
4778
- modalSnapshot = next;
4779
- for (const fn of [...modalListeners]) fn();
4780
- }
4781
- if (typeof document !== "undefined") {
4782
- document.addEventListener(
4783
- "toggle",
4784
- (e) => {
4785
- const el = e.target;
4786
- if (!el || typeof el.tagName !== "string" || el.tagName !== "DIALOG") return;
4787
- if (el.open) {
4788
- if (!modalOrder.has(el)) modalOrder.set(el, ++modalSeq);
4789
- } else {
4790
- modalOrder.delete(el);
4791
- }
4792
- if (modalListeners.size > 0) topChanged();
4793
- },
4794
- true
4795
- );
4796
- }
4797
- function subscribeModals(listener) {
4798
- modalListeners.add(listener);
4799
- if (!modalObserver && typeof MutationObserver !== "undefined") {
4800
- modalSnapshot = modalTarget();
4801
- modalObserver = new MutationObserver(topChanged);
4802
- modalObserver.observe(document.documentElement, {
4803
- childList: true,
4804
- subtree: true,
4805
- attributes: true,
4806
- attributeFilter: ["open"]
4807
- });
4808
- }
4809
- return () => {
4810
- modalListeners.delete(listener);
4811
- if (modalListeners.size === 0) {
4812
- modalObserver?.disconnect();
4813
- modalObserver = null;
4814
- }
4815
- };
4816
- }
4817
- function modalSnapshotNow() {
4818
- return modalObserver ? modalSnapshot : modalTarget();
4819
- }
4820
- var entered = /* @__PURE__ */ new Set();
4821
- function ToastRow({ item }) {
4822
- const label = item.action?.label ?? (item.kind === "bad" ? TOAST_CLOSE_LABEL : void 0);
4823
- const row = useRef11(null);
4824
- const first = useRef11(!entered.has(item.id));
4825
- useEffect11(() => {
4826
- entered.add(item.id);
4827
- const el = row.current;
4828
- if (!el) return;
4829
- syncToastPause(item.id, {
4830
- pointer: el.matches(":hover"),
4831
- focus: el.contains(document.activeElement)
4832
- });
4833
- }, [item.id]);
4834
- const run = () => {
4835
- dismissToast(item.id);
4836
- item.action?.onClick();
4837
- };
4838
- return /* @__PURE__ */ jsxs14(
4839
- "div",
4840
- {
4841
- ref: row,
4842
- className: first.current ? "band-plugin-react-toast" : "band-plugin-react-toast band-plugin-react-toast-again",
4843
- role: item.kind === "bad" ? "alert" : void 0,
4844
- onPointerEnter: () => pauseToast(item.id, "pointer"),
4845
- onPointerLeave: () => resumeToast(item.id, "pointer"),
4846
- onFocus: () => pauseToast(item.id, "focus"),
4847
- onBlur: () => resumeToast(item.id, "focus"),
4848
- onKeyDown: withImeGuard3((e) => {
4849
- if (e.key !== "Escape") return;
4850
- e.preventDefault();
4851
- e.stopPropagation();
4852
- dismissToast(item.id);
4853
- }),
4854
- children: [
4855
- /* @__PURE__ */ jsx15("span", { className: `band-plugin-react-toast-icon ${item.kind}`, "aria-hidden": "true", children: item.kind === "ok" ? "\u2713" : item.kind === "bad" ? "!" : "" }),
4856
- /* @__PURE__ */ jsxs14("span", { className: "band-plugin-react-toast-text", children: [
4857
- item.text,
4858
- item.detail ? /* @__PURE__ */ jsx15("small", { className: "band-plugin-react-toast-detail", children: item.detail }) : null
4859
- ] }),
4860
- label ? /* @__PURE__ */ jsx15("button", { type: "button", className: "band-plugin-react-toast-act", onClick: run, children: label }) : /* @__PURE__ */ jsx15("span", {})
4861
- ]
4862
- }
4863
- );
4864
- }
4865
- function ToastHost() {
4866
- const items = useSyncExternalStore3(subscribeToasts, toastsSnapshot, emptyToasts);
4867
- const watching = items.length > 0;
4868
- const target = useSyncExternalStore3(
4869
- watching ? subscribeModals : noSubscribe,
4870
- watching ? modalSnapshotNow : noTarget,
4871
- noTarget
4872
- );
4873
- useEffect11(() => {
4874
- if (items.length === 0) {
4875
- entered.clear();
4876
- return;
4877
- }
4878
- const live = new Set(items.map((item) => item.id));
4879
- for (const id of entered) if (!live.has(id)) entered.delete(id);
4880
- }, [items]);
4881
- const stack = /* @__PURE__ */ jsx15(
4882
- "div",
4883
- {
4884
- className: "band-plugin-react-toast-stack",
4885
- "aria-label": "\u901A\u77E5",
4886
- "aria-live": "polite",
4887
- "aria-relevant": "additions text",
4888
- "aria-atomic": "false",
4889
- children: items.map((item) => /* @__PURE__ */ jsx15(ToastRow, { item }, item.id))
4890
- }
4891
- );
4892
- return target ? createPortal2(stack, target) : stack;
4893
- }
4894
- function noSubscribe() {
4895
- return () => {
4896
- };
4897
- }
4898
- function noTarget() {
4899
- return null;
4900
- }
4901
-
4902
4148
  // src/status/model.ts
4903
4149
  function durationText(ms) {
4904
4150
  const total = Number.isFinite(ms) && ms > 0 ? Math.max(1, Math.round(ms / 1e3)) : 0;
@@ -4956,10 +4202,10 @@ function receiptFooter(comment, stageName = (s) => s) {
4956
4202
  }
4957
4203
 
4958
4204
  // src/status/StatusMessage.tsx
4959
- import { useSyncExternalStore as useSyncExternalStore5 } from "react";
4205
+ import { useSyncExternalStore as useSyncExternalStore4 } from "react";
4960
4206
 
4961
4207
  // src/status/on-page.ts
4962
- import { useCallback as useCallback5, useSyncExternalStore as useSyncExternalStore4 } from "react";
4208
+ import { useCallback as useCallback5, useSyncExternalStore as useSyncExternalStore3 } from "react";
4963
4209
  var TURN_STATUS_ATTR = "data-band-turn-status";
4964
4210
  var read2 = (id) => typeof document !== "undefined" && [...document.querySelectorAll(`[${TURN_STATUS_ATTR}]`)].some(
4965
4211
  (el) => el.getAttribute(TURN_STATUS_ATTR) === id && !el.closest("[hidden], [inert]") && // 没有 checkVisibility 的环境(旧浏览器、jsdom)当看得见
@@ -4992,7 +4238,7 @@ function useTurnStatusOnPage(changeRequestId) {
4992
4238
  },
4993
4239
  [changeRequestId]
4994
4240
  );
4995
- return useSyncExternalStore4(
4241
+ return useSyncExternalStore3(
4996
4242
  subscribe,
4997
4243
  () => read2(changeRequestId),
4998
4244
  () => false
@@ -5000,7 +4246,7 @@ function useTurnStatusOnPage(changeRequestId) {
5000
4246
  }
5001
4247
 
5002
4248
  // src/status/StatusMessage.tsx
5003
- import { Fragment as Fragment11, jsx as jsx16, jsxs as jsxs15 } from "react/jsx-runtime";
4249
+ import { Fragment as Fragment10, jsx as jsx14, jsxs as jsxs13 } from "react/jsx-runtime";
5004
4250
  var P3 = "band-plugin-react-status";
5005
4251
  var clock = (() => {
5006
4252
  let now = Date.now();
@@ -5032,11 +4278,11 @@ var idle = () => () => {
5032
4278
  function useElapsed(startedAt) {
5033
4279
  const start = startedAt ? Date.parse(startedAt) : Number.NaN;
5034
4280
  const running = Number.isFinite(start);
5035
- const now = useSyncExternalStore5(running ? clock.subscribe : idle, clock.get, clock.get);
4281
+ const now = useSyncExternalStore4(running ? clock.subscribe : idle, clock.get, clock.get);
5036
4282
  return running ? Math.max(0, now - start) : null;
5037
4283
  }
5038
4284
  function useNow(active = true) {
5039
- return useSyncExternalStore5(active ? clock.subscribe : idle, clock.get, clock.get);
4285
+ return useSyncExternalStore4(active ? clock.subscribe : idle, clock.get, clock.get);
5040
4286
  }
5041
4287
  function StatusMessage({
5042
4288
  turn,
@@ -5049,29 +4295,29 @@ function StatusMessage({
5049
4295
  const stallNote = stallNoteOf(turn, useNow(turn.stall !== void 0));
5050
4296
  const note = turn.stopping ? `${memberName(members, turn.stopping.by)} \u70B9\u4E86\u505C\u6B62\uFF0C\u6B63\u5728\u505C\u4E0B\u2026` : turn.activity?.note ?? (turn.activity ? void 0 : turn.summary);
5051
4297
  const action = turn.activity?.action;
5052
- const status = /* @__PURE__ */ jsxs15(
4298
+ const status = /* @__PURE__ */ jsxs13(
5053
4299
  "output",
5054
4300
  {
5055
4301
  className: P3,
5056
4302
  "aria-label": `${who}\u6B63\u5728\u5904\u7406`,
5057
4303
  ...stop ? { [TURN_STATUS_ATTR]: turn.changeRequestId } : {},
5058
4304
  children: [
5059
- /* @__PURE__ */ jsxs15("span", { className: `${P3}-head`, children: [
5060
- /* @__PURE__ */ jsx16(AgentAvatar, { id: turn.agent, members, decorative: true }),
5061
- /* @__PURE__ */ jsx16("span", { className: `${P3}-who`, children: who }),
5062
- context && /* @__PURE__ */ jsx16("span", { className: `${P3}-context`, children: context }),
5063
- /* @__PURE__ */ jsx16("span", { className: `glyph working ${P3}-glyph`, "aria-hidden": "true" }),
5064
- /* @__PURE__ */ jsx16("span", { className: `${P3}-spacer` }),
4305
+ /* @__PURE__ */ jsxs13("span", { className: `${P3}-head`, children: [
4306
+ /* @__PURE__ */ jsx14(AgentAvatar, { id: turn.agent, members, decorative: true }),
4307
+ /* @__PURE__ */ jsx14("span", { className: `${P3}-who`, children: who }),
4308
+ context && /* @__PURE__ */ jsx14("span", { className: `${P3}-context`, children: context }),
4309
+ /* @__PURE__ */ jsx14("span", { className: `glyph working ${P3}-glyph`, "aria-hidden": "true" }),
4310
+ /* @__PURE__ */ jsx14("span", { className: `${P3}-spacer` }),
5065
4311
  elapsed !== null && // 每秒都变:不进读屏的实时播报
5066
- /* @__PURE__ */ jsxs15("span", { className: `${P3}-elapsed`, "aria-hidden": "true", children: [
4312
+ /* @__PURE__ */ jsxs13("span", { className: `${P3}-elapsed`, "aria-hidden": "true", children: [
5067
4313
  "\u5DF2\u7528 ",
5068
4314
  durationText(elapsed)
5069
4315
  ] })
5070
4316
  ] }),
5071
- note && /* @__PURE__ */ jsx16("span", { className: `${P3}-note`, children: note }),
5072
- action && /* @__PURE__ */ jsx16("span", { className: `${P3}-action`, children: action }),
5073
- stallNote && !turn.stopping && /* @__PURE__ */ jsx16("span", { className: `${P3}-stall`, children: stallNote }),
5074
- turn.steps.length > 0 && /* @__PURE__ */ jsx16("ol", { className: `${P3}-steps`, children: turn.steps.map((step, i) => /* @__PURE__ */ jsx16(
4317
+ note && /* @__PURE__ */ jsx14("span", { className: `${P3}-note`, children: note }),
4318
+ action && /* @__PURE__ */ jsx14("span", { className: `${P3}-action`, children: action }),
4319
+ stallNote && !turn.stopping && /* @__PURE__ */ jsx14("span", { className: `${P3}-stall`, children: stallNote }),
4320
+ turn.steps.length > 0 && /* @__PURE__ */ jsx14("ol", { className: `${P3}-steps`, children: turn.steps.map((step, i) => /* @__PURE__ */ jsx14(
5075
4321
  "li",
5076
4322
  {
5077
4323
  ...i === turn.step ? { "aria-current": "step" } : {},
@@ -5084,9 +4330,9 @@ function StatusMessage({
5084
4330
  }
5085
4331
  );
5086
4332
  if (!stop || turn.stopping || !stop.can) return status;
5087
- return /* @__PURE__ */ jsxs15(Fragment11, { children: [
4333
+ return /* @__PURE__ */ jsxs13(Fragment10, { children: [
5088
4334
  status,
5089
- /* @__PURE__ */ jsx16("div", { className: `${P3}-stop`, children: /* @__PURE__ */ jsx16(
4335
+ /* @__PURE__ */ jsx14("div", { className: `${P3}-stop`, children: /* @__PURE__ */ jsx14(
5090
4336
  StopTurn,
5091
4337
  {
5092
4338
  stop: stop.run,
@@ -5099,7 +4345,7 @@ function StatusMessage({
5099
4345
  }
5100
4346
 
5101
4347
  // src/status/TurnStopped.tsx
5102
- import { jsx as jsx17, jsxs as jsxs16 } from "react/jsx-runtime";
4348
+ import { jsx as jsx15, jsxs as jsxs14 } from "react/jsx-runtime";
5103
4349
  function turnStoppedOf(c) {
5104
4350
  return c.kind === "system" && c.system?.type === "turn.stopped" ? c.system : null;
5105
4351
  }
@@ -5111,14 +4357,14 @@ function TurnStopped({
5111
4357
  members
5112
4358
  }) {
5113
4359
  const who = memberName(members, event.by);
5114
- return /* @__PURE__ */ jsxs16("p", { className: "band-plugin-react-stopped", children: [
5115
- /* @__PURE__ */ jsx17(Avatar, { id: event.by, name: who, size: "xs", order: memberOrder(members), decorative: true }),
5116
- /* @__PURE__ */ jsxs16("span", { className: "band-plugin-react-stopped-text", children: [
5117
- /* @__PURE__ */ jsx17("b", { children: who }),
4360
+ return /* @__PURE__ */ jsxs14("p", { className: "band-plugin-react-stopped", children: [
4361
+ /* @__PURE__ */ jsx15(Avatar, { id: event.by, name: who, size: "xs", order: memberOrder(members), decorative: true }),
4362
+ /* @__PURE__ */ jsxs14("span", { className: "band-plugin-react-stopped-text", children: [
4363
+ /* @__PURE__ */ jsx15("b", { children: who }),
5118
4364
  " ",
5119
4365
  stoppedTurnText(event.number)
5120
4366
  ] }),
5121
- event.durationMs !== void 0 && /* @__PURE__ */ jsxs16("span", { className: "band-plugin-react-stopped-took", children: [
4367
+ event.durationMs !== void 0 && /* @__PURE__ */ jsxs14("span", { className: "band-plugin-react-stopped-took", children: [
5122
4368
  "\xB7 \u7528\u4E86 ",
5123
4369
  durationText(event.durationMs)
5124
4370
  ] })
@@ -5126,7 +4372,7 @@ function TurnStopped({
5126
4372
  }
5127
4373
 
5128
4374
  // src/version-reference.tsx
5129
- import { jsx as jsx18 } from "react/jsx-runtime";
4375
+ import { jsx as jsx16 } from "react/jsx-runtime";
5130
4376
  async function loadVersionReferences(ctx) {
5131
4377
  const artifacts = await ctx.artifacts.list();
5132
4378
  const lists = await Promise.all(
@@ -5186,7 +4432,7 @@ function VersionReference({
5186
4432
  label,
5187
4433
  open
5188
4434
  }) {
5189
- return open ? /* @__PURE__ */ jsx18(
4435
+ return open ? /* @__PURE__ */ jsx16(
5190
4436
  "button",
5191
4437
  {
5192
4438
  type: "button",
@@ -5196,15 +4442,15 @@ function VersionReference({
5196
4442
  onClick: open,
5197
4443
  children: label
5198
4444
  }
5199
- ) : /* @__PURE__ */ jsx18("span", { className: "band-plugin-react-version-ref", title: label, children: label });
4445
+ ) : /* @__PURE__ */ jsx16("span", { className: "band-plugin-react-version-ref", title: label, children: label });
5200
4446
  }
5201
4447
 
5202
4448
  // src/markdown.tsx
5203
4449
  import { fromMarkdown as fromMarkdown2 } from "mdast-util-from-markdown";
5204
4450
  import { gfmFromMarkdown as gfmFromMarkdown2 } from "mdast-util-gfm";
5205
4451
  import { gfm as gfm2 } from "micromark-extension-gfm";
5206
- import { Fragment as Fragment12, useMemo as useMemo3 } from "react";
5207
- import { Fragment as Fragment13, jsx as jsx19, jsxs as jsxs17 } from "react/jsx-runtime";
4452
+ import { Fragment as Fragment11, useMemo as useMemo2 } from "react";
4453
+ import { Fragment as Fragment12, jsx as jsx17, jsxs as jsxs15 } from "react/jsx-runtime";
5208
4454
  function safeMarkdownHref(url) {
5209
4455
  try {
5210
4456
  const u = new URL(url);
@@ -5220,7 +4466,7 @@ function children(nodes, breaks) {
5220
4466
  return nodes.map((n, i) => (
5221
4467
  // 节点没有稳定 id;README 是只读的整段,顺序就是身份
5222
4468
  // biome-ignore lint/suspicious/noArrayIndexKey: 静态文档的节点按位置排
5223
- /* @__PURE__ */ jsx19(Fragment12, { children: render(n, breaks) }, i)
4469
+ /* @__PURE__ */ jsx17(Fragment11, { children: render(n, breaks) }, i)
5224
4470
  ));
5225
4471
  }
5226
4472
  function render(n, breaks) {
@@ -5230,52 +4476,52 @@ function render(n, breaks) {
5230
4476
  case "heading": {
5231
4477
  const level = Math.min(n.depth + 2, 6);
5232
4478
  const Tag = `h${level}`;
5233
- return /* @__PURE__ */ jsx19(Tag, { children: children(n.children, breaks) });
4479
+ return /* @__PURE__ */ jsx17(Tag, { children: children(n.children, breaks) });
5234
4480
  }
5235
4481
  case "paragraph":
5236
- return /* @__PURE__ */ jsx19("p", { children: children(n.children, breaks) });
4482
+ return /* @__PURE__ */ jsx17("p", { children: children(n.children, breaks) });
5237
4483
  case "text":
5238
4484
  return breaks ? n.value.split("\n").map((line, i) => (
5239
4485
  // biome-ignore lint/suspicious/noArrayIndexKey: 静态文本按行的位置排
5240
- /* @__PURE__ */ jsxs17(Fragment12, { children: [
5241
- i > 0 && /* @__PURE__ */ jsx19("br", {}),
4486
+ /* @__PURE__ */ jsxs15(Fragment11, { children: [
4487
+ i > 0 && /* @__PURE__ */ jsx17("br", {}),
5242
4488
  line
5243
4489
  ] }, i)
5244
4490
  )) : n.value;
5245
4491
  case "emphasis":
5246
- return /* @__PURE__ */ jsx19("em", { children: children(n.children, breaks) });
4492
+ return /* @__PURE__ */ jsx17("em", { children: children(n.children, breaks) });
5247
4493
  case "strong":
5248
- return /* @__PURE__ */ jsx19("strong", { children: children(n.children, breaks) });
4494
+ return /* @__PURE__ */ jsx17("strong", { children: children(n.children, breaks) });
5249
4495
  case "delete":
5250
- return /* @__PURE__ */ jsx19("del", { children: children(n.children, breaks) });
4496
+ return /* @__PURE__ */ jsx17("del", { children: children(n.children, breaks) });
5251
4497
  case "inlineCode":
5252
- return /* @__PURE__ */ jsx19("code", { children: n.value });
4498
+ return /* @__PURE__ */ jsx17("code", { children: n.value });
5253
4499
  case "code":
5254
- return /* @__PURE__ */ jsx19("pre", { children: /* @__PURE__ */ jsx19("code", { children: n.value }) });
4500
+ return /* @__PURE__ */ jsx17("pre", { children: /* @__PURE__ */ jsx17("code", { children: n.value }) });
5255
4501
  case "break":
5256
- return /* @__PURE__ */ jsx19("br", {});
4502
+ return /* @__PURE__ */ jsx17("br", {});
5257
4503
  case "thematicBreak":
5258
- return /* @__PURE__ */ jsx19("hr", {});
4504
+ return /* @__PURE__ */ jsx17("hr", {});
5259
4505
  case "blockquote":
5260
- return /* @__PURE__ */ jsx19("blockquote", { children: children(n.children, breaks) });
4506
+ return /* @__PURE__ */ jsx17("blockquote", { children: children(n.children, breaks) });
5261
4507
  case "list": {
5262
4508
  const items = children(n.children, breaks);
5263
- return n.ordered ? /* @__PURE__ */ jsx19("ol", { start: n.start ?? void 0, children: items }) : /* @__PURE__ */ jsx19("ul", { children: items });
4509
+ return n.ordered ? /* @__PURE__ */ jsx17("ol", { start: n.start ?? void 0, children: items }) : /* @__PURE__ */ jsx17("ul", { children: items });
5264
4510
  }
5265
4511
  case "listItem":
5266
- return /* @__PURE__ */ jsx19("li", { children: children(n.children, breaks) });
4512
+ return /* @__PURE__ */ jsx17("li", { children: children(n.children, breaks) });
5267
4513
  case "link": {
5268
4514
  const href = safeMarkdownHref(n.url);
5269
- return href ? /* @__PURE__ */ jsx19("a", { href, target: "_blank", rel: "noreferrer", children: children(n.children, breaks) }) : children(n.children, breaks);
4515
+ return href ? /* @__PURE__ */ jsx17("a", { href, target: "_blank", rel: "noreferrer", children: children(n.children, breaks) }) : children(n.children, breaks);
5270
4516
  }
5271
4517
  case "image":
5272
4518
  return n.alt ?? "";
5273
4519
  case "table":
5274
- return /* @__PURE__ */ jsx19("div", { className: "band-plugin-react-markdown-table", children: /* @__PURE__ */ jsx19("table", { children: /* @__PURE__ */ jsx19("tbody", { children: children(n.children, breaks) }) }) });
4520
+ return /* @__PURE__ */ jsx17("div", { className: "band-plugin-react-markdown-table", children: /* @__PURE__ */ jsx17("table", { children: /* @__PURE__ */ jsx17("tbody", { children: children(n.children, breaks) }) }) });
5275
4521
  case "tableRow":
5276
- return /* @__PURE__ */ jsx19("tr", { children: children(n.children, breaks) });
4522
+ return /* @__PURE__ */ jsx17("tr", { children: children(n.children, breaks) });
5277
4523
  case "tableCell":
5278
- return /* @__PURE__ */ jsx19("td", { children: children(n.children, breaks) });
4524
+ return /* @__PURE__ */ jsx17("td", { children: children(n.children, breaks) });
5279
4525
  case "html":
5280
4526
  return null;
5281
4527
  default:
@@ -5283,8 +4529,234 @@ function render(n, breaks) {
5283
4529
  }
5284
4530
  }
5285
4531
  function Markdown({ text, breaks = false }) {
5286
- const tree = useMemo3(() => parseMarkdown(text), [text]);
5287
- return /* @__PURE__ */ jsx19(Fragment13, { children: render(tree, breaks) });
4532
+ const tree = useMemo2(() => parseMarkdown(text), [text]);
4533
+ return /* @__PURE__ */ jsx17(Fragment12, { children: render(tree, breaks) });
4534
+ }
4535
+
4536
+ // src/settings/frame.tsx
4537
+ import {
4538
+ useCallback as useCallback6,
4539
+ useEffect as useEffect10,
4540
+ useRef as useRef10,
4541
+ useState as useState13,
4542
+ useSyncExternalStore as useSyncExternalStore5
4543
+ } from "react";
4544
+ import { Fragment as Fragment13, jsx as jsx18, jsxs as jsxs16 } from "react/jsx-runtime";
4545
+ function settingsNavigate(ctx, target) {
4546
+ leaveThen(
4547
+ () => ctx.app.navigate({ page: target.page, ...target.params ? { params: target.params } : {} })
4548
+ );
4549
+ }
4550
+ function settingsLink(ctx, page, params) {
4551
+ return settingsLinkHandler((t) => settingsNavigate(ctx, t), {
4552
+ page,
4553
+ ...params ? { params } : {}
4554
+ });
4555
+ }
4556
+ var NARROW = "(max-width: 600px)";
4557
+ function useNarrow() {
4558
+ return useSyncExternalStore5(
4559
+ (fn) => {
4560
+ const m = window.matchMedia?.(NARROW);
4561
+ m?.addEventListener("change", fn);
4562
+ return () => m?.removeEventListener("change", fn);
4563
+ },
4564
+ () => window.matchMedia?.(NARROW).matches ?? false,
4565
+ () => false
4566
+ );
4567
+ }
4568
+ var dirtyProbe = null;
4569
+ var pendingLeave = null;
4570
+ var leaveWatchers = /* @__PURE__ */ new Set();
4571
+ var notifyLeave = () => {
4572
+ for (const fn of [...leaveWatchers]) fn();
4573
+ };
4574
+ function formChanged() {
4575
+ return dirtyProbe?.() ?? false;
4576
+ }
4577
+ function controlValue(el) {
4578
+ if (el instanceof HTMLInputElement)
4579
+ return el.type === "checkbox" || el.type === "radio" ? String(el.checked) : el.value;
4580
+ if (el instanceof HTMLTextAreaElement || el instanceof HTMLSelectElement) return el.value;
4581
+ return "";
4582
+ }
4583
+ var inForm = (el) => el.closest("form") !== null;
4584
+ function useLeaveGuard(root) {
4585
+ useEffect10(() => {
4586
+ const el = root.current;
4587
+ if (!el) return;
4588
+ pendingLeave = null;
4589
+ const baseline = /* @__PURE__ */ new Map();
4590
+ const add = (node) => {
4591
+ if (node.matches("input, textarea, select") && inForm(node) && !baseline.has(node))
4592
+ baseline.set(node, controlValue(node));
4593
+ };
4594
+ const snap = (node) => {
4595
+ if (node instanceof Element) add(node);
4596
+ for (const child of node.querySelectorAll("input, textarea, select")) add(child);
4597
+ };
4598
+ snap(el);
4599
+ const observer = typeof MutationObserver === "function" ? new MutationObserver((records) => {
4600
+ for (const r of records)
4601
+ for (const n of r.addedNodes) if (n instanceof Element) snap(n);
4602
+ }) : null;
4603
+ observer?.observe(el, { childList: true, subtree: true });
4604
+ const probe = () => {
4605
+ for (const [node, was] of baseline) {
4606
+ if (!node.isConnected) continue;
4607
+ if (controlValue(node) !== was) return true;
4608
+ }
4609
+ return false;
4610
+ };
4611
+ dirtyProbe = probe;
4612
+ return () => {
4613
+ observer?.disconnect();
4614
+ if (dirtyProbe === probe) dirtyProbe = null;
4615
+ };
4616
+ }, [root]);
4617
+ }
4618
+ function leaveThen(go) {
4619
+ if (!formChanged()) {
4620
+ go();
4621
+ return;
4622
+ }
4623
+ pendingLeave = go;
4624
+ notifyLeave();
4625
+ }
4626
+ function usePendingLeave() {
4627
+ return useSyncExternalStore5(
4628
+ (fn) => {
4629
+ leaveWatchers.add(fn);
4630
+ return () => {
4631
+ leaveWatchers.delete(fn);
4632
+ };
4633
+ },
4634
+ () => pendingLeave !== null,
4635
+ () => false
4636
+ );
4637
+ }
4638
+ function SettingsLeaveDialog() {
4639
+ const open = usePendingLeave();
4640
+ if (!open) return null;
4641
+ const stay = () => {
4642
+ pendingLeave = null;
4643
+ notifyLeave();
4644
+ };
4645
+ const leave = () => {
4646
+ const go = pendingLeave;
4647
+ pendingLeave = null;
4648
+ notifyLeave();
4649
+ go?.();
4650
+ };
4651
+ return /* @__PURE__ */ jsx18(
4652
+ SettingsDialog,
4653
+ {
4654
+ title: "\u653E\u5F03\u6CA1\u4FDD\u5B58\u7684\u5185\u5BB9\uFF1F",
4655
+ onClose: stay,
4656
+ actions: /* @__PURE__ */ jsxs16(Fragment13, { children: [
4657
+ /* @__PURE__ */ jsx18("button", { type: "button", className: "btn", onClick: stay, children: "\u7EE7\u7EED\u586B\u5199" }),
4658
+ /* @__PURE__ */ jsx18("button", { type: "button", className: "btn primary", onClick: leave, children: "\u653E\u5F03\u5E76\u79BB\u5F00" })
4659
+ ] }),
4660
+ children: /* @__PURE__ */ jsx18("p", { children: "\u8FD9\u4E00\u9875\u586B\u7684\u5185\u5BB9\u8FD8\u6CA1\u4FDD\u5B58\uFF0C\u79BB\u5F00\u540E\u4E0D\u4F1A\u7559\u5728\u8FD9\u91CC\uFF0C\u4E5F\u4E0D\u4F1A\u5B58\u5728\u6D4F\u89C8\u5668\u91CC\u3002" })
4661
+ }
4662
+ );
4663
+ }
4664
+ function SettingsFrame({
4665
+ ctx,
4666
+ navLabel,
4667
+ title,
4668
+ obj,
4669
+ crumb,
4670
+ groups,
4671
+ current,
4672
+ view = "page",
4673
+ back,
4674
+ backMobile,
4675
+ children: children2
4676
+ }) {
4677
+ const mainRef = useRef10(null);
4678
+ useLeaveGuard(mainRef);
4679
+ return /* @__PURE__ */ jsxs16(Fragment13, { children: [
4680
+ /* @__PURE__ */ jsx18(
4681
+ SettingsLayout,
4682
+ {
4683
+ navLabel,
4684
+ title,
4685
+ obj,
4686
+ crumb,
4687
+ groups,
4688
+ current,
4689
+ view,
4690
+ back,
4691
+ backMobile,
4692
+ onNavigate: (t) => settingsNavigate(ctx, t),
4693
+ mainRef,
4694
+ children: children2
4695
+ }
4696
+ ),
4697
+ /* @__PURE__ */ jsx18(SettingsLeaveDialog, {})
4698
+ ] });
4699
+ }
4700
+ var pending = {};
4701
+ var PENDING_TTL_MS = 1e4;
4702
+ var alive = (at) => Date.now() - at < PENDING_TTL_MS;
4703
+ function markFresh(slug, id) {
4704
+ markFreshMany(slug, [id]);
4705
+ }
4706
+ function markFreshMany(slug, ids) {
4707
+ pending = { ...pending, fresh: { slug, ids, at: Date.now() } };
4708
+ }
4709
+ function enterSection(slug) {
4710
+ const f = pending.fresh;
4711
+ if (f && f.slug !== slug) pending = { ...pending, fresh: void 0 };
4712
+ const n = pending.notice;
4713
+ if (n && n.slug !== slug) pending = { ...pending, notice: void 0 };
4714
+ }
4715
+ function peekFresh(slug) {
4716
+ return peekFreshAll(slug)[0] ?? null;
4717
+ }
4718
+ function peekFreshAll(slug) {
4719
+ const f = pending.fresh;
4720
+ return f && f.slug === slug && alive(f.at) ? f.ids : [];
4721
+ }
4722
+ function clearFresh() {
4723
+ pending = { ...pending, fresh: void 0 };
4724
+ }
4725
+ function markNotice(slug, text) {
4726
+ pending = { ...pending, notice: { slug, text, at: Date.now() } };
4727
+ }
4728
+ function takeNotice(slug) {
4729
+ const n = pending.notice;
4730
+ pending = { ...pending, notice: void 0 };
4731
+ return n && n.slug === slug && alive(n.at) ? n.text : null;
4732
+ }
4733
+ function useFreshRow(slug) {
4734
+ return useFreshRows(slug)[0] ?? null;
4735
+ }
4736
+ function useFreshRows(slug) {
4737
+ const [ids] = useState13(() => peekFreshAll(slug));
4738
+ useEffect10(() => {
4739
+ if (ids.length > 0) clearFresh();
4740
+ }, [ids]);
4741
+ return ids;
4742
+ }
4743
+ function useSavedNote() {
4744
+ const [note, setNote] = useState13("");
4745
+ const flash = useCallback6((text) => setNote(text), []);
4746
+ useEffect10(() => {
4747
+ if (!note) return;
4748
+ const timer = setTimeout(() => setNote(""), 2e3);
4749
+ return () => clearTimeout(timer);
4750
+ }, [note]);
4751
+ return [note, flash];
4752
+ }
4753
+ function useCrossPageNotice(slug) {
4754
+ const [note, flash] = useSavedNote();
4755
+ useEffect10(() => {
4756
+ const text = takeNotice(slug);
4757
+ if (text) flash(text);
4758
+ }, [slug, flash]);
4759
+ return [note, flash];
5288
4760
  }
5289
4761
  export {
5290
4762
  AgentAvatar,
@@ -5332,6 +4804,8 @@ export {
5332
4804
  PROJECT_MODEL_NEEDS_ME,
5333
4805
  PROJECT_MODEL_SPEND,
5334
4806
  PaneHeader,
4807
+ PersonPicker,
4808
+ PersonSearch,
5335
4809
  PromptInput,
5336
4810
  QUOTE_DRAW,
5337
4811
  REACTION_EMOJI,
@@ -5343,6 +4817,30 @@ export {
5343
4817
  STATUS_CHIP,
5344
4818
  STOPPED_UNDONE,
5345
4819
  STOP_COST,
4820
+ SettingsActions,
4821
+ SettingsBack,
4822
+ SettingsChoices,
4823
+ SettingsDanger,
4824
+ SettingsDangerRow,
4825
+ SettingsDialog,
4826
+ SettingsEmpty,
4827
+ SettingsFacts,
4828
+ SettingsField,
4829
+ SettingsForm,
4830
+ SettingsFrame,
4831
+ SettingsHead,
4832
+ SettingsLayout,
4833
+ SettingsLoading,
4834
+ SettingsNoAccess,
4835
+ SettingsNotice,
4836
+ SettingsPicks,
4837
+ SettingsReadError,
4838
+ SettingsRow,
4839
+ SettingsRows,
4840
+ SettingsSaveState,
4841
+ SettingsSaved,
4842
+ SettingsSection,
4843
+ SettingsSingle,
5346
4844
  StatusMessage,
5347
4845
  StopTurn,
5348
4846
  TARGET_REPO_DOCS,
@@ -5367,6 +4865,7 @@ export {
5367
4865
  avatarTone,
5368
4866
  canRestoreProject,
5369
4867
  checkFiles,
4868
+ clearFresh,
5370
4869
  composerSpendLine,
5371
4870
  createState,
5372
4871
  credentialOptionLabel,
@@ -5377,6 +4876,7 @@ export {
5377
4876
  draftFileBytes,
5378
4877
  durationText,
5379
4878
  emptyDraft,
4879
+ enterSection,
5380
4880
  entriesFor,
5381
4881
  errorRepo,
5382
4882
  errorRequestAccessUrl,
@@ -5413,8 +4913,12 @@ export {
5413
4913
  isProvisionFailure,
5414
4914
  isThreadTail,
5415
4915
  itemKey,
4916
+ leaveThen,
5416
4917
  loadVersionReferences,
5417
4918
  localDay,
4919
+ markFresh,
4920
+ markFreshMany,
4921
+ markNotice,
5418
4922
  markdownOf,
5419
4923
  memberName,
5420
4924
  memberOrder,
@@ -5427,6 +4931,9 @@ export {
5427
4931
  modelHintText,
5428
4932
  parseDraft,
5429
4933
  parseMemoryItem,
4934
+ peekFresh,
4935
+ peekFreshAll,
4936
+ peopleDirectory,
5430
4937
  persistable,
5431
4938
  personalImportSource,
5432
4939
  personalImportSources,
@@ -5456,6 +4963,9 @@ export {
5456
4963
  roleLabel,
5457
4964
  saveDraft,
5458
4965
  scrollIntoPanel,
4966
+ settingsLink,
4967
+ settingsLinkHandler,
4968
+ settingsNavigate,
5459
4969
  settledPending,
5460
4970
  shortTime,
5461
4971
  shortWhen,
@@ -5465,6 +4975,7 @@ export {
5465
4975
  stopQueuedNote,
5466
4976
  stoppedTurnText,
5467
4977
  takeDraft,
4978
+ takeNotice,
5468
4979
  targetRepoErrorId,
5469
4980
  threadConfirmation,
5470
4981
  threadPath,
@@ -5479,16 +4990,22 @@ export {
5479
4990
  useAppData,
5480
4991
  useArtifactRole,
5481
4992
  useComposition,
4993
+ useCrossPageNotice,
5482
4994
  useCtxData,
5483
4995
  useDraft,
5484
4996
  useElapsed,
4997
+ useFreshRow,
4998
+ useFreshRows,
5485
4999
  useHandToAgent,
5000
+ useLeaveGuard,
5486
5001
  useMembers,
5487
5002
  useMessageList,
5003
+ useNarrow,
5488
5004
  useNow,
5489
5005
  useProjectAttachments,
5490
5006
  useReactionPatches,
5491
5007
  useRoute,
5008
+ useSavedNote,
5492
5009
  useSelectedArtifact,
5493
5010
  useSelectedEntity,
5494
5011
  useSettledText,