@floless/app 0.163.0 → 0.164.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/web/app.css CHANGED
@@ -8324,6 +8324,8 @@ body.mode-agents #menu .menu-item[data-action="bake"] { display:none; }
8324
8324
  .ws-rfis .pr-filter[aria-pressed="true"] { color:var(--text); border-color:var(--accent); background:color-mix(in srgb, var(--accent) 12%, transparent); }
8325
8325
  .ws-rfis .pr-list { max-width:880px; }
8326
8326
  .ws-rfis .pr-row { display:flex; flex-direction:column; align-items:stretch; gap:4px; }
8327
+ /* #2874: the RFI a chat message mentioned, outlined for a moment when it is opened from the chat. */
8328
+ .ws-rfis .pr-row.is-mentioned { outline:2px solid var(--accent); outline-offset:-2px; }
8327
8329
  .ws-rfis .pr-row .pg-row-meta, .ws-rfis .pr-row .pm-note { white-space:normal; overflow:visible; }
8328
8330
  .ws-rfis .pr-question { margin:2px 0 0; color:var(--text); white-space:pre-wrap; overflow-wrap:anywhere; font-size:13px; line-height:1.45; }
8329
8331
  .ws-rfis .pr-answer { margin:4px 0 0; padding:6px 10px; border-left:2px solid var(--border-strong); background:var(--surface-2);
package/dist/web/chat.css CHANGED
@@ -1546,6 +1546,16 @@
1546
1546
  .ai-chat-mention-status { padding: 6px 8px; color: var(--text-muted); font: 11px/1.4 var(--ui); }
1547
1547
  .ai-chat-attachment.ai-chat-mention .ai-chat-subjects-label { color: var(--text); }
1548
1548
  .ai-chat-message-subjects { align-self: flex-end; max-width: min(100%, 360px); color: var(--text-dim); font: 11px/1.4 var(--ui); text-align: right; overflow-wrap: anywhere; }
1549
+ /* #2874: the @ list's group headings (not options), a long page title on a chip, and a sent message's Mentioned items
1550
+ as inline links that open what they name. An item FloLess could not find stays plain, muted text. */
1551
+ .ai-chat-mention-group { padding: 6px 8px 2px; color: var(--text-dim); font: 600 10px/1.3 var(--ui); letter-spacing: .04em; text-transform: uppercase; }
1552
+ .ai-chat-mention-group:not(:first-child) { border-top: 1px solid var(--border); margin-top: 2px; }
1553
+ .ai-chat-attachment.ai-chat-mention .ai-chat-subjects-label { max-width: 26ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
1554
+ .ai-chat-mention-open { display: inline; padding: 0; border: 0; background: none; color: var(--accent); font: inherit; text-decoration: underline;
1555
+ text-underline-offset: 2px; cursor: pointer; }
1556
+ .ai-chat-mention-open:hover { color: var(--text); }
1557
+ .ai-chat-mention-open:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-radius: 2px; }
1558
+ .ai-chat-mention-unresolved { color: var(--text-dim); }
1549
1559
 
1550
1560
  /* The Tekla model library carried over from a Graft receipt. It sits in the composer's rigid row,
1551
1561
  above the input, and wraps rather than ellipsising: it states exactly what the binding permits,
package/dist/web/chat.js CHANGED
@@ -586,9 +586,10 @@
586
586
  // #1776/#1859: a drawing read running in this conversation is where a message goes, on any screen.
587
587
  : paintFilterComposer().replyToRead
588
588
  ? READ_REPLY_HINT
589
- // #2438: in a project, @ names a member or sheet.
589
+ // #2438: in a project, @ names a member or sheet; #2874: an RFI or a Knowledge page too (only those in a General one).
590
590
  : state.scope.owner.kind === 'project'
591
- ? 'Enter to send · Shift+Enter for a new line · @ to mention a member or sheet'
591
+ ? (state.mentionGeneral?.[state.scope.owner.projectId] ? 'Enter to send · Shift+Enter for a new line · @ to mention an RFI or Knowledge page'
592
+ : 'Enter to send · Shift+Enter for a new line · @ to mention a member, sheet, RFI or page')
592
593
  : 'Enter to send · Shift+Enter for a new line';
593
594
  if (turnIsVisiblyActive() && !state.followupUnknownId && !hasUnknownFollowup()
594
595
  && state.imageLimitChatId !== state.chat?.chatId) {
@@ -3735,13 +3736,9 @@
3735
3736
  line.textContent = about;
3736
3737
  item.append(line);
3737
3738
  }
3738
- const mentioned = role === 'user' && event.payload?.mentions ? mentionsLine(event.payload.mentions) : '';
3739
- if (mentioned) {
3740
- const line = document.createElement('span'); line.className = 'ai-chat-message-subjects ai-chat-message-mentions';
3741
- line.textContent = mentioned.text;
3742
- line.setAttribute('aria-label', mentioned.spoken);
3743
- item.append(line);
3744
- }
3739
+ // #2874: each item the message mentioned opens what it names.
3740
+ const mentioned = role === 'user' && Array.isArray(event.payload?.mentions) ? mentionsLineElement(event, event.payload.mentions) : null;
3741
+ if (mentioned) item.append(mentioned);
3745
3742
  if (role === 'user' && (event.payload?.followup || event.payload?.deliveryState)) {
3746
3743
  const delivery = followupDelivery(event);
3747
3744
  const deliveryReceipt = [...state.events].reverse().find((candidate) => candidate.type === 'followup-status'
@@ -11041,7 +11038,43 @@
11041
11038
  /** Each conversation keeps its own picks: switching away and back finds them where they were. */
11042
11039
  function setMentions(items) { if (state.chat?.chatId) state.mentions = { ...state.mentions, [state.chat.chatId]: items }; }
11043
11040
  function mentionKey(pick) {
11044
- return pick.kind === 'member' ? JSON.stringify(['member', pick.id, pick.mark]) : JSON.stringify(['sheet', pick.sheet, pick.pageId, pick.sourceHash]);
11041
+ if (pick.kind === 'member') return JSON.stringify(['member', pick.id, pick.mark]);
11042
+ if (pick.kind === 'rfi') return JSON.stringify(['rfi', pick.rfiId]);
11043
+ if (pick.kind === 'kb-page') return JSON.stringify(['kb-page', pick.slug, pick.generationId]);
11044
+ return JSON.stringify(['sheet', pick.sheet, pick.pageId, pick.sourceHash]);
11045
+ }
11046
+ /** #2874: the @ list's groups, in the order they show. */
11047
+ const MENTION_GROUPS = [
11048
+ { kind: 'member', heading: 'Members' }, { kind: 'sheet', heading: 'Sheets' },
11049
+ { kind: 'rfi', heading: 'RFIs' }, { kind: 'kb-page', heading: 'Knowledge pages' },
11050
+ ];
11051
+ /**
11052
+ * The notes of groups that could not offer rows for a reason worth saying (it could not be read, there is no model
11053
+ * yet). A kind that does not apply here — members in a General project, a project with no RFIs or no Knowledge — is
11054
+ * left out, never listed as "nothing". Two groups saying the same thing say it once.
11055
+ */
11056
+ function mentionGroupNotes(groups) {
11057
+ if (!groups) return [];
11058
+ const quiet = new Set(['ok', 'not-steel', 'no-rfis', 'no-knowledge']);
11059
+ const notes = [];
11060
+ for (const { kind } of MENTION_GROUPS) {
11061
+ const group = groups[kind];
11062
+ // A Knowledge list FloLess could only partly read says so, so a page missing from it is not taken as absent.
11063
+ if (group?.status === 'ok' && group.incomplete === true) {
11064
+ notes.push({ kind, note: 'FloLess could not look through every Knowledge page just now, so some may be missing. Type @ again in a moment, or find the page on the Knowledge step.' });
11065
+ continue;
11066
+ }
11067
+ if (!group || quiet.has(group.status) || !group.note) continue;
11068
+ if (!notes.some((n) => n.note === group.note)) notes.push({ kind, note: String(group.note) });
11069
+ }
11070
+ return notes;
11071
+ }
11072
+ /** #2874: an RFI's status in words, and what replaced it, if anything did. */
11073
+ const RFI_STATUS_WORDS = { open: 'Open', sent: 'Sent', answered: 'Answered', resolved: 'Resolved', closed: 'Closed' };
11074
+ function rfiStatusWords(ref) {
11075
+ const status = RFI_STATUS_WORDS[ref.status] || String(ref.status || '');
11076
+ if (ref.supersededBy) return `${status}, replaced by ${ref.supersededBy}`;
11077
+ return ref.closedAs === 'superseded' ? 'Closed as superseded' : status;
11045
11078
  }
11046
11079
 
11047
11080
  /**
@@ -11049,18 +11082,32 @@
11049
11082
  * `all` lists every view (the tooltip); the row shows two and counts the rest, so it never wraps into a paragraph.
11050
11083
  */
11051
11084
  function refDetail(ref, all = false) {
11085
+ if (ref.kind === 'rfi') return `${rfiStatusWords(ref)} · ${ref.question || 'No question recorded'}`;
11086
+ if (ref.kind === 'kb-page') return `Knowledge page · ${ref.slug}`;
11052
11087
  if (ref.kind === 'sheet') return [`Sheet${ref.pageNumber ? `, page ${ref.pageNumber}` : ''}`, `source ${String(ref.sourceHash).slice(0, 8)}`].join(' · ');
11053
11088
  const named = (ref.views || []).map((view) => (view.title ? `${view.sheet} ${view.title}` : view.sheet));
11054
11089
  const shown = all ? named : named.slice(0, 2);
11055
11090
  const views = shown.join(', ') + (named.length > shown.length ? ` +${named.length - shown.length} more` : '');
11056
11091
  return [ref.mark ? null : 'No mark', ref.profile, views ? `on ${views}` : null, `id ${ref.id}`].filter(Boolean).join(' · ');
11057
11092
  }
11093
+ /**
11094
+ * A row of the @ list as a pick (identity only), its label and its tooltip. #2874: a Knowledge page's chip says
11095
+ * "Page ·" before its title, so a page titled "B12 notes" never reads as member B12.
11096
+ */
11058
11097
  function mentionOf(ref) {
11098
+ if (ref.kind === 'rfi') {
11099
+ const pick = { kind: 'rfi', rfiId: ref.rfiId };
11100
+ return { key: mentionKey(pick), pick, label: ref.rfiId, chip: ref.rfiId, tip: `${ref.rfiId} · ${refDetail(ref)}` };
11101
+ }
11102
+ if (ref.kind === 'kb-page') {
11103
+ const pick = { kind: 'kb-page', slug: ref.slug, generationId: ref.generationId };
11104
+ return { key: mentionKey(pick), pick, label: ref.title, chip: `Page · ${ref.title}`, tip: `Knowledge page ${ref.title} · ${ref.slug}` };
11105
+ }
11059
11106
  const pick = ref.kind === 'member'
11060
11107
  ? { kind: 'member', id: ref.id, mark: ref.mark ?? null }
11061
11108
  : { kind: 'sheet', sheet: ref.sheet, pageId: ref.pageId, sourceHash: ref.sourceHash };
11062
11109
  const label = ref.kind === 'member' ? (ref.mark || ref.id) : ref.sheet;
11063
- return { key: mentionKey(pick), pick, label, tip: `${ref.kind === 'member' ? 'Member' : 'Sheet'} ${label} · ${refDetail(ref, true)}` };
11110
+ return { key: mentionKey(pick), pick, label, chip: label, tip: `${ref.kind === 'member' ? 'Member' : 'Sheet'} ${label} · ${refDetail(ref, true)}` };
11064
11111
  }
11065
11112
 
11066
11113
  /** Why a mention did not resolve, in a few words, by what it is. */
@@ -11069,6 +11116,12 @@
11069
11116
  if (mention.reason === 'unreadable') return 'could not be checked';
11070
11117
  if (mention.reason === 'no-model') return 'no model yet';
11071
11118
  if (mention.reason === 'not-steel') return 'not checked, not a steel project';
11119
+ // #2874
11120
+ if (mention.reason === 'rfi-not-found') return 'not one of this project’s RFIs';
11121
+ if (mention.reason === 'rfis-unreadable' || mention.reason === 'knowledge-unreadable') return 'could not be checked';
11122
+ if (mention.reason === 'no-rfis') return 'this project has no RFIs';
11123
+ if (mention.reason === 'page-not-found') return 'not in that version of Knowledge';
11124
+ if (mention.reason === 'not-retained') return 'that version could not be kept';
11072
11125
  return 'not found';
11073
11126
  }
11074
11127
 
@@ -11087,12 +11140,182 @@
11087
11140
  return { text, spoken };
11088
11141
  }
11089
11142
 
11143
+ /**
11144
+ * #2874: the Mentioned line under a sent message, its resolved items buttons that open what they name. Each button
11145
+ * keeps its item's place in the stored list: that index, the message's event and its conversation are all the server
11146
+ * is told, and it opens only what that stored message named. Unresolved items stay text, with their reason.
11147
+ */
11148
+ function mentionsLineElement(event, mentions) {
11149
+ const said = mentionsLine(mentions);
11150
+ if (!said) return null;
11151
+ const line = document.createElement('span'); line.className = 'ai-chat-message-subjects ai-chat-message-mentions';
11152
+ const owner = state.scope?.owner;
11153
+ // A message still on its way has no stored mentions yet: its items open once the server has kept it.
11154
+ const openable = owner?.kind === 'project' && !event.optimistic && typeof event.eventId === 'string' && !event.eventId.startsWith('local:') && !!state.chat?.chatId;
11155
+ // Every item is listed (a message holds at most 20), so each one stays something the person can open.
11156
+ line.append('Mentioned: ');
11157
+ mentions.forEach((m, index) => {
11158
+ if (index) line.append(', ');
11159
+ const name = m.label || m.mark || m.id || m.sheet || m.rfiId || m.slug;
11160
+ if (m.resolved === false || !openable) {
11161
+ const text = Object.assign(document.createElement('span'), { textContent: `${name}${m.resolved === false ? ` (${mentionNotFound(m)})` : ''}` });
11162
+ if (m.resolved === false) text.className = 'ai-chat-mention-unresolved';
11163
+ line.append(text);
11164
+ return;
11165
+ }
11166
+ const kindWords = { member: 'member', sheet: 'sheet', rfi: '', 'kb-page': 'Knowledge page' }[m.kind] ?? '';
11167
+ const what = kindWords ? `${kindWords} ${name}` : name;
11168
+ const open = button(name, `shell.chat-mention-open#${m.kind}`, 'ai-chat-mention-open');
11169
+ open.dataset.commandInstanceLabel = what;
11170
+ open.dataset.tip = m.kind === 'member' ? `Show ${what} in the model` : m.kind === 'rfi' ? `Open ${name} on the RFIs step`
11171
+ : m.kind === 'sheet' ? `Open the picture of ${what}` : `Open ${what} at the version mentioned`;
11172
+ open.setAttribute('aria-label', open.dataset.tip);
11173
+ const chatId = state.chat.chatId, eventId = event.eventId;
11174
+ open.addEventListener('click', () => { void openMentioned({ chatId, eventId, index, mention: m, anchor: open }); });
11175
+ line.append(open);
11176
+ });
11177
+ return line;
11178
+ }
11179
+
11180
+ /** #2874: open one item of a sent message's Mentioned line. Never an error page: every outcome is a sentence. */
11181
+ async function openMentioned({ chatId, eventId, index, mention, anchor }) {
11182
+ const owner = state.scope?.owner;
11183
+ if (owner?.kind !== 'project' || state.chat?.chatId !== chatId) { announce('Open this conversation again to open what it mentioned.'); return; }
11184
+ const name = mention.label || mention.rfiId || mention.mark || mention.id;
11185
+ if (mention.kind === 'member' || mention.kind === 'rfi') {
11186
+ const unreachable = `FloLess could not open ${mention.kind === 'rfi' ? name : `member ${name}`} from here. Open the project from Workspaces, then try again.`;
11187
+ // A failure the place it opens did not show itself (it threw, or nothing answered) is put on screen here too:
11188
+ // the chat's status line is read out, not seen. The editor and the RFIs pane show their own failures.
11189
+ const seen = (text) => { if (typeof window.showToast === 'function') window.showToast(text, 'warn'); };
11190
+ let said, show = false;
11191
+ try {
11192
+ if (typeof window.flolessWorkspaces?.openConnection !== 'function') { announce(unreachable); seen(unreachable); return; }
11193
+ const projectUuid = state.chat?.owner?.projectUuid;
11194
+ const outcome = await window.flolessWorkspaces.openConnection({ projectId: owner.projectId, ...(projectUuid ? { projectUuid } : {}),
11195
+ ...(mention.kind === 'rfi' ? { rfiId: mention.rfiId } : { memberId: mention.id }) });
11196
+ if (outcome?.superseded) return;
11197
+ show = !outcome || (outcome.ok !== true && !outcome.said);
11198
+ said = !outcome ? unreachable : outcome.ok !== true ? (outcome.said || `${mention.kind === 'rfi' ? name : `Member ${name}`} was not shown.`)
11199
+ : outcome.said || (mention.kind === 'rfi' ? `Showing ${name} on the RFIs step.` : `Showing member ${name} in the model.`);
11200
+ } catch (error) {
11201
+ if (error?.plain !== true) console.error('[chat] a mentioned item could not be opened', error);
11202
+ said = error?.plain === true && error.message ? error.message : unreachable;
11203
+ show = true;
11204
+ }
11205
+ if (said) { announce(said); if (show) seen(said); }
11206
+ return;
11207
+ }
11208
+ await openMentionedSource({ chatId, eventId, index, mention, anchor, name, owner });
11209
+ }
11210
+
11211
+ /**
11212
+ * #2874: a mentioned sheet's picture, or a mentioned Knowledge page at the version mentioned, in the source viewer.
11213
+ * A page whose text changed under that version is said to have changed, never shown as the page mentioned.
11214
+ */
11215
+ async function openMentionedSource({ chatId, eventId, index, mention, anchor, name, owner }) {
11216
+ const sheet = mention.kind === 'sheet';
11217
+ const title = sheet ? `Sheet ${name}` : name;
11218
+ const dialog = document.createElement('dialog'); dialog.className = 'ai-chat-source-viewer';
11219
+ dialog.setAttribute('aria-label', title);
11220
+ const head = document.createElement('div'); head.className = 'ai-chat-source-viewer-head';
11221
+ const close = button('Close', 'shell.chat-cite-close', 'ai-chat-source-viewer-close');
11222
+ let picture = null, finished = false, viewport = null;
11223
+ const controller = new AbortController();
11224
+ const finish = () => {
11225
+ if (finished) return;
11226
+ finished = true;
11227
+ controller.abort();
11228
+ if (dialog.open) dialog.close();
11229
+ hide();
11230
+ if (picture) URL.revokeObjectURL(picture);
11231
+ if (anchor?.isConnected) anchor.focus({ preventScroll: true });
11232
+ };
11233
+ close.addEventListener('click', finish);
11234
+ dialog.addEventListener('close', finish);
11235
+ head.append(Object.assign(document.createElement('strong'), { textContent: title }), close);
11236
+ const note = Object.assign(document.createElement('span'), { className: 'ai-chat-source-viewer-note',
11237
+ textContent: sheet ? 'Mentioned in your message. FloLess shows the sheet picture it holds now.' : 'Mentioned in your message, at the version you mentioned.' });
11238
+ const body = document.createElement('div'); body.className = 'ai-chat-source-viewer-body';
11239
+ const status = Object.assign(document.createElement('p'), { className: 'ai-chat-source-viewer-status', textContent: 'Opening…' });
11240
+ status.setAttribute('role', 'status');
11241
+ body.append(status);
11242
+ dialog.append(head, note, body);
11243
+ const hide = showChatViewer(dialog, finish);
11244
+ close.focus({ preventScroll: true });
11245
+ if (sheet) {
11246
+ dialog.classList.add('ai-chat-evidence-viewer');
11247
+ viewport = drawingViewport({ pageBounds: [0, 0, 1, 1] });
11248
+ dialog.insertBefore(viewport.bar, body);
11249
+ body.append(viewport.frame);
11250
+ }
11251
+ const url = `/api/chat/conversations/${encodeURIComponent(chatId)}/mentions/${encodeURIComponent(eventId)}/${index}/${sheet ? 'image' : 'page'}`
11252
+ + `?ownerKind=project&ownerId=${encodeURIComponent(owner.projectId)}`;
11253
+ try {
11254
+ const response = await fetch(url, { credentials: 'same-origin', cache: 'no-store', signal: controller.signal });
11255
+ if (finished) return;
11256
+ if (!response.ok) {
11257
+ viewport?.frame.remove(); viewport?.bar.remove();
11258
+ const gone = response.status === 410 || response.status === 404;
11259
+ // A 410 also answers a conversation that moved; only this code says the message and its project still match.
11260
+ const changed = response.status === 410 && (await response.json().catch(() => null))?.code === 'mention-source-changed';
11261
+ if (finished) return;
11262
+ status.textContent = changed ?'This Knowledge page has changed since you mentioned it, so FloLess does not show it as the page you mentioned. You can open the page as it is now.'
11263
+ : response.status === 410 ? 'This conversation has moved, so FloLess could not open what it mentioned here. Open the conversation again, then try again.'
11264
+ : response.status === 404 && sheet ? 'FloLess no longer holds this sheet picture, or this project is no longer the one the message mentioned. Mention the sheet again to see the picture FloLess holds now.'
11265
+ : response.status === 404 ? 'FloLess no longer holds the version of this page you mentioned, or this project is no longer the one the message mentioned. Mention the page again to see it as it is now.'
11266
+ : response.status === 401 || response.status === 403 ? 'This page is no longer signed in to FloLess, so it could not open this. Reload the page, then try again.'
11267
+ : 'FloLess could not open this right now. Try again in a moment.';
11268
+ if (!gone) console.warn('[chat] a mentioned source was refused', response.status);
11269
+ // The way on is the page as it is now, labelled as such, never shown as the version that was mentioned. Only a
11270
+ // changed page says the message and its project still match; a 404 may be a project made again, whose same-named
11271
+ // page is another.
11272
+ if (changed && !sheet && mention.slug) {
11273
+ const now = button('Open the current page in Knowledge', 'shell.chat-mention-open-current-knowledge', 'ai-chat-source-viewer-knowledge');
11274
+ now.addEventListener('click', () => {
11275
+ finish();
11276
+ if (window.flolessWorkspaces?.openKnowledgePage) window.flolessWorkspaces.openKnowledgePage(owner.projectId, mention.slug);
11277
+ else announce('Knowledge is not available on this page.');
11278
+ });
11279
+ dialog.append(now);
11280
+ }
11281
+ return;
11282
+ }
11283
+ if (sheet) {
11284
+ const bytes = await response.blob();
11285
+ if (finished) return;
11286
+ picture = URL.createObjectURL(bytes);
11287
+ const image = Object.assign(document.createElement('img'), { src: picture, alt: title });
11288
+ if (!await viewport.setImage(image, () => !finished, true)) return;
11289
+ status.textContent = 'The sheet picture FloLess holds now.';
11290
+ return;
11291
+ }
11292
+ const { page } = await response.json();
11293
+ if (finished) return;
11294
+ status.textContent = 'The Knowledge page at the version you mentioned.';
11295
+ const article = document.createElement('div'); article.className = 'ai-chat-message-body ai-chat-source-viewer-page';
11296
+ article.innerHTML = markdownHtml(page.body);
11297
+ const knowledge = button('Open in Knowledge', 'shell.chat-cite-open-knowledge', 'ai-chat-source-viewer-knowledge');
11298
+ knowledge.addEventListener('click', () => {
11299
+ finish();
11300
+ if (window.flolessWorkspaces?.openKnowledgePage) window.flolessWorkspaces.openKnowledgePage(page.projectId, page.slug, page.generationId);
11301
+ else announce('Knowledge is not available on this page.');
11302
+ });
11303
+ body.append(article);
11304
+ dialog.append(knowledge);
11305
+ } catch (error) {
11306
+ if (finished) return;
11307
+ console.error('[chat] a mentioned source could not be opened', error);
11308
+ viewport?.frame.remove(); viewport?.bar.remove();
11309
+ status.textContent = 'FloLess could not open this right now. Try again in a moment.';
11310
+ }
11311
+ }
11312
+
11090
11313
  function paintMentionChips() {
11091
11314
  const items = currentMentions();
11092
11315
  for (const item of items) {
11093
11316
  const chip = document.createElement('span'); chip.className = 'ai-chat-attachment ai-chat-mention';
11094
11317
  chip.dataset.mentionKey = item.key;
11095
- const label = button(`@${item.label}`, 'shell.chat-mention', 'ai-chat-subjects-label');
11318
+ const label = button(`@${item.chip || item.label}`, 'shell.chat-mention', 'ai-chat-subjects-label');
11096
11319
  label.dataset.commandInstanceLabel = item.label;
11097
11320
  label.dataset.tip = `${item.tip}. Goes with your next message.`;
11098
11321
  label.setAttribute('aria-label', `${item.tip}, mentioned in your next message`);
@@ -11162,7 +11385,8 @@
11162
11385
  const projectId = state.scope?.owner?.projectId;
11163
11386
  menu.timer = setTimeout(async () => {
11164
11387
  let body = null;
11165
- try { body = await request(`/api/projects/${encodeURIComponent(projectId)}/refs?q=${encodeURIComponent(menu.query)}`); }
11388
+ // #2874: all four kinds, answered in groups; a kind that does not apply to the project says so in its group.
11389
+ try { body = await request(`/api/projects/${encodeURIComponent(projectId)}/refs?q=${encodeURIComponent(menu.query)}&kinds=member,sheet,rfi,kb-page`); }
11166
11390
  catch { body = null; }
11167
11391
  // A newer keystroke, a closed list or another conversation: this answer is for a question nobody is asking now.
11168
11392
  if (state.mentionMenu !== menu || menu.seq !== seq) return;
@@ -11172,15 +11396,27 @@
11172
11396
  else {
11173
11397
  // The row that was active stays active if it is still listed.
11174
11398
  const was = menu.status === 'options' && menu.refs[menu.active] ? mentionOf(menu.refs[menu.active]).key : null;
11175
- menu.refs = Array.isArray(body.refs) ? body.refs : [];
11399
+ menu.refs = Array.isArray(body.refs) ? body.refs.filter((ref) => MENTION_GROUPS.some((g) => g.kind === ref.kind)) : [];
11176
11400
  menu.heldBack = Number(body.heldBack) || 0;
11177
- menu.status = menu.refs.length ? 'options' : 'empty';
11401
+ menu.groups = body.groups && typeof body.groups === 'object' ? body.groups : null;
11402
+ // #2874: which kinds apply here, for the message box's hint (a General project has no members or sheets).
11403
+ if (menu.groups) {
11404
+ const general = menu.groups.member?.status === 'not-steel';
11405
+ const known = state.mentionGeneral?.[projectId];
11406
+ state.mentionGeneral = { ...state.mentionGeneral, [projectId]: general };
11407
+ // The hint is drawn before the list answers: draw it again now it is known, but only while it is that idle
11408
+ // mention hint, never over a notice (a problem, a reconnect, a reply in progress).
11409
+ if (known !== general && /· @ to mention /.test(ui.hint?.textContent || '')) clearReport();
11410
+ }
11411
+ const notes = mentionGroupNotes(menu.groups);
11412
+ if (!menu.refs.length && notes.length) { menu.status = 'note'; menu.note = notes.map((n) => n.note).join(' '); }
11413
+ else menu.status = menu.refs.length ? 'options' : 'empty';
11178
11414
  const kept = was ? menu.refs.findIndex((ref) => mentionOf(ref).key === was) : -1;
11179
11415
  menu.active = menu.refs.length ? Math.max(0, kept) : -1;
11180
11416
  }
11181
11417
  renderMentionMenu();
11182
11418
  announce(menu.status === 'options' ? `${menu.refs.length + menu.heldBack} ${menu.refs.length + menu.heldBack === 1 ? 'match' : 'matches'}`
11183
- : menu.status === 'empty' ? 'No matches' : menu.status === 'error' ? 'FloLess could not list members and sheets' : menu.note);
11419
+ : menu.status === 'empty' ? 'No matches' : menu.status === 'error' ? 'FloLess could not list what you can mention' : menu.note);
11184
11420
  }, 150);
11185
11421
  }
11186
11422
 
@@ -11189,19 +11425,19 @@
11189
11425
  if (!menu) return;
11190
11426
  ui.skills.replaceChildren();
11191
11427
  ui.skills.classList.add('is-mentions');
11192
- ui.skills.setAttribute('aria-label', 'Members and sheets you can mention');
11428
+ ui.skills.setAttribute('aria-label', 'What you can mention');
11193
11429
  const status = (text) => {
11194
11430
  const row = document.createElement('div'); row.className = 'ai-chat-mention-status'; row.setAttribute('role', 'option');
11195
11431
  row.setAttribute('aria-disabled', 'true'); row.textContent = text; ui.skills.append(row);
11196
11432
  };
11197
11433
  let activeId = '';
11198
- if (menu.status === 'loading') status('Looking for members and sheets…');
11434
+ if (menu.status === 'loading') status('Looking for what you can mention…');
11199
11435
  else if (menu.status === 'note') status(menu.note);
11200
11436
  else if (menu.status === 'empty') {
11201
11437
  status(menu.query ? `Nothing in this project is named “${menu.query}”. Type it in your message instead.`
11202
- : 'This project has no members or sheets to mention yet.');
11438
+ : 'Nothing to mention in this project yet. Its members, sheets, RFIs and Knowledge pages appear here.');
11203
11439
  } else if (menu.status === 'error') {
11204
- status('FloLess could not list this project’s members and sheets just now.');
11440
+ status('FloLess could not list what you can mention in this project just now.');
11205
11441
  const retry = button('Try again', 'shell.chat-mention-retry', 'ai-chat-choice');
11206
11442
  retry.id = 'chat-mention-retry'; retry.setAttribute('role', 'option'); retry.setAttribute('aria-selected', 'true');
11207
11443
  retry.addEventListener('pointerdown', (event) => event.preventDefault());
@@ -11209,22 +11445,38 @@
11209
11445
  ui.skills.append(retry);
11210
11446
  activeId = retry.id;
11211
11447
  } else {
11212
- menu.refs.forEach((ref, index) => {
11213
- const item = mentionOf(ref);
11214
- const row = button('', `shell.chat-mention-pick#${item.key}`, 'ai-chat-choice ai-chat-mention-option');
11215
- row.id = `chat-mention-option-${index}`; row.tabIndex = -1;
11216
- row.setAttribute('role', 'option'); row.setAttribute('aria-selected', String(index === menu.active));
11217
- row.dataset.commandInstanceLabel = item.label;
11218
- row.dataset.tip = item.tip;
11219
- const name = document.createElement('span'); name.className = 'ai-chat-mention-name'; name.textContent = item.label;
11220
- const meta = document.createElement('small'); meta.className = 'ai-chat-skill-origin'; meta.textContent = refDetail(ref);
11221
- row.append(name, meta);
11222
- row.addEventListener('pointerdown', (event) => event.preventDefault()); // the message box keeps focus
11223
- row.addEventListener('click', () => pickMention(ref));
11224
- ui.skills.append(row);
11225
- if (index === menu.active) activeId = row.id;
11226
- });
11227
- if (menu.heldBack) status(`${menu.heldBack} more match. Type more of the name to narrow the list.`);
11448
+ // #2874: one heading per kind that has rows or a note, in a fixed order. Headings are not options, so ↑/↓ move
11449
+ // over the rows only and cross from one group to the next; a group that could not be read says so in its place.
11450
+ const notes = mentionGroupNotes(menu.groups);
11451
+ const grouped = !!menu.groups;
11452
+ for (const { kind, heading } of MENTION_GROUPS) {
11453
+ const rows = menu.refs.map((ref, index) => ({ ref, index })).filter(({ ref }) => ref.kind === kind);
11454
+ const note = notes.find((n) => n.kind === kind);
11455
+ if (!rows.length && !note) continue;
11456
+ if (grouped) {
11457
+ const head = Object.assign(document.createElement('div'), { className: 'ai-chat-mention-group', textContent: heading });
11458
+ head.setAttribute('role', 'presentation');
11459
+ ui.skills.append(head);
11460
+ }
11461
+ for (const { ref, index } of rows) {
11462
+ const item = mentionOf(ref);
11463
+ const row = button('', `shell.chat-mention-pick#${item.key}`, 'ai-chat-choice ai-chat-mention-option');
11464
+ row.id = `chat-mention-option-${index}`; row.tabIndex = -1;
11465
+ row.setAttribute('role', 'option'); row.setAttribute('aria-selected', String(index === menu.active));
11466
+ row.setAttribute('aria-setsize', String(menu.refs.length)); row.setAttribute('aria-posinset', String(index + 1));
11467
+ row.dataset.commandInstanceLabel = item.label;
11468
+ row.dataset.tip = item.tip;
11469
+ const name = document.createElement('span'); name.className = 'ai-chat-mention-name'; name.textContent = item.label;
11470
+ const meta = document.createElement('small'); meta.className = 'ai-chat-skill-origin'; meta.textContent = refDetail(ref);
11471
+ row.append(name, meta);
11472
+ row.addEventListener('pointerdown', (event) => event.preventDefault()); // the message box keeps focus
11473
+ row.addEventListener('click', () => pickMention(ref));
11474
+ ui.skills.append(row);
11475
+ if (index === menu.active) activeId = row.id;
11476
+ }
11477
+ if (note) status(note.note);
11478
+ }
11479
+ if (menu.heldBack) status(`${menu.heldBack} more ${menu.heldBack === 1 ? 'match' : 'matches'}. Type more of the name to narrow the list.`);
11228
11480
  }
11229
11481
  ui.skills.hidden = false;
11230
11482
  ui.input.setAttribute('aria-controls', ui.skills.id);
@@ -16289,6 +16541,8 @@
16289
16541
  // (the upload modal, Requests) says what happened and what to do next instead of a generic toast (#1779).
16290
16542
  describeError: errorMessage,
16291
16543
  currentProvider: () => state.chat?.provider ?? null,
16544
+ // #2926: the conversation on screen, so the Drawing Filter's Flo knows a question shown here is its read's.
16545
+ currentChatId: () => state.chat?.chatId ?? null,
16292
16546
  // The project this panel's conversations belong to; an object card offers Show in chat only for it (#1653).
16293
16547
  scopeProjectId: () => (state.scope?.owner?.kind === 'project' ? state.scope.owner.projectId : null),
16294
16548
  // The Knowledge step's "Ask AI to index" (#2399 slice 0b): the person's own draft in the message box; never sent.
@@ -241,6 +241,41 @@
241
241
  guidance: 'on-demand',
242
242
  });
243
243
 
244
+ // #2926: Flo on the stage while a drawing read runs. It shows only what FloLess saw the AI do: the sheet pictures
245
+ // it asked for, and its own progress sentence.
246
+ def('filter.flo-toggle', {
247
+ label: 'Show Flo',
248
+ actsOn: 'Shows or hides Flo, who marks the part of the drawing the AI is reading',
249
+ group: 'On the Drawing Filter canvas',
250
+ persistence: 'local',
251
+ interaction: 'instant',
252
+ risk: [],
253
+ guidance: 'on-demand',
254
+ why: 'While a drawing read runs, Flo stands beside the part of the sheet the AI asked FloLess to show it, and says what the AI is doing. When the AI has asked you something, Flo moves to the corner and says it is waiting for your answer. It is on until you turn it off, and stays off on this computer. It changes nothing in the filter.',
255
+ });
256
+
257
+ def('filter.flo-show-sheet', {
258
+ label: 'Show the sheet Flo is reading',
259
+ actsOn: 'Opens the sheet the AI is reading now',
260
+ group: 'On the Drawing Filter canvas',
261
+ persistence: 'local',
262
+ interaction: 'instant',
263
+ risk: [],
264
+ guidance: 'on-demand',
265
+ why: 'Shown in Flo’s bubble while the AI reads a sheet you are not looking at. The view never changes by itself: this is the way to follow it. Your filter is untouched.',
266
+ });
267
+
268
+ def('filter.flo-answer', {
269
+ label: 'Answer in AI Chat',
270
+ actsOn: 'Opens the AI’s question in AI Chat',
271
+ group: 'On the Drawing Filter canvas',
272
+ persistence: 'none',
273
+ interaction: 'instant',
274
+ risk: [],
275
+ guidance: 'on-demand',
276
+ why: 'Shown in Flo’s bubble while the drawing read waits for your answer in AI Chat. It opens that conversation, where the question is; it answers nothing for you.',
277
+ });
278
+
244
279
  def('filter.place-clear', {
245
280
  label: 'Clear the marked place',
246
281
  actsOn: 'Removes the outline of a place AI Chat opened on this drawing',
@@ -2894,19 +2894,25 @@
2894
2894
  why: 'A question sent with objects selected is linked to them, so selecting one later shows the question and opens it in chat.',
2895
2895
  });
2896
2896
  // #2438: @-mentions — the list of members and sheets, its rows, and the chips that go with the next message.
2897
+ // #2874: RFIs and Knowledge pages too, and each item of a sent message's Mentioned line opens what it names.
2897
2898
  def('shell.chat-mention-pick', {
2898
- label: 'Mention a member or sheet', actsOn: 'Adds {instance} to your next message as a mention; FloLess tells the AI exactly which member or sheet it is',
2899
- anyInstance: 'a member or sheet in the @ list', group: 'In AI Chat', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand',
2900
- why: 'Two members can share a mark. A mention names the one you picked, so the AI does not have to guess.',
2899
+ label: 'Mention something in this project', actsOn: 'Adds {instance} to your next message as a mention; FloLess tells the AI exactly which member, sheet, RFI or Knowledge page it is',
2900
+ anyInstance: 'a member, sheet, RFI or Knowledge page in the @ list', group: 'In AI Chat', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand',
2901
+ why: 'Two members can share a mark, and a page title can read like a mark. A mention names the one you picked, so the AI does not have to guess.',
2901
2902
  });
2902
2903
  def('shell.chat-mention-retry', {
2903
- label: 'List members and sheets again', actsOn: 'Asks FloLess again for the project\'s members and sheets after it could not list them',
2904
+ label: 'List what you can mention again', actsOn: 'Asks FloLess again for the project\'s members, sheets, RFIs and Knowledge pages after it could not list them',
2904
2905
  group: 'In AI Chat', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand',
2905
2906
  });
2906
2907
  def('shell.chat-mention', {
2907
- label: 'Mention in the next message', actsOn: 'Says which member or sheet {instance} is, and that it goes with your next message',
2908
+ label: 'Mention in the next message', actsOn: 'Says which member, sheet, RFI or Knowledge page {instance} is, and that it goes with your next message',
2908
2909
  anyInstance: 'a mention above the message box', group: 'In AI Chat', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand',
2909
2910
  });
2911
+ def('shell.chat-mention-open', {
2912
+ label: 'Open what a message mentioned', actsOn: 'Opens {instance}: a member in the model, an RFI on the RFIs step, a sheet\'s picture, or a Knowledge page at the version mentioned',
2913
+ anyInstance: 'an item of a sent message\'s Mentioned line', group: 'In AI Chat', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand',
2914
+ why: 'It shows what the message named, as FloLess recorded it. A Knowledge page that changed since is said, never shown as the one mentioned.',
2915
+ });
2910
2916
  def('shell.chat-mention-remove', {
2911
2917
  label: 'Leave a mention out', actsOn: 'Sends your next message without {instance}',
2912
2918
  anyInstance: 'a mention above the message box', group: 'In AI Chat', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand',
@@ -3693,11 +3699,16 @@
3693
3699
  why: 'A person chose this source. No AI read is recorded for this choice, and nothing checked the claim. A sheet whose picture changed since is shown from its source drawing and says so.',
3694
3700
  });
3695
3701
  def('shell.chat-cite-close', {
3696
- label: 'Close the cited source', actsOn: 'Closes the sheet, Knowledge page, member or file an answer cited and returns to the conversation',
3702
+ label: 'Close the source you are viewing', actsOn: 'Closes the sheet, Knowledge page, member or file an answer cited, you chose or a message mentioned, and returns to the conversation',
3697
3703
  group: 'In AI Chat', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand',
3698
3704
  });
3699
3705
  def('shell.chat-cite-open-knowledge', {
3700
- label: 'Open a cited page in Knowledge', actsOn: 'Opens the project’s Knowledge on the page the answer cited, at the version it cited',
3706
+ label: 'Open the page in Knowledge', actsOn: 'Opens the project’s Knowledge on the page an answer cited, you chose or a message mentioned, at that version',
3707
+ group: 'In AI Chat', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand',
3708
+ });
3709
+ // #2874: a mentioned page FloLess no longer holds at that version opens as it is now, and says so.
3710
+ def('shell.chat-mention-open-current-knowledge', {
3711
+ label: 'Open the current page in Knowledge', actsOn: 'Opens the project’s Knowledge on the page a message mentioned, as it is now, because FloLess no longer holds the version that was mentioned',
3701
3712
  group: 'In AI Chat', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand',
3702
3713
  });
3703
3714
  // #2471: a cited member, shown in the project's model; a cited file, opened in the app it belongs to.
@@ -2113,6 +2113,12 @@
2113
2113
  def('steel.profile-colours', { label: 'Profile colours', actsOn: 'Opens the key of section colours for the whole model, and lets you change any of them', group: 'In the 3D toolbar', persistence: 'working', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'It only changes how members are DRAWN — no geometry, no sections, nothing that reaches the lock.' });
2114
2114
  def('steel.structure-stats', { label: 'Structure numbers', actsOn: 'Expands the members and weight for the active plan sheet, or for the whole model while the 3D view is active', group: 'In the steel editor header', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'The header states the total; opening it shows what the total is made of, and changes nothing.' });
2115
2115
  def('steel.quality-stats', { label: 'Quality numbers', actsOn: 'Expands what is unresolved on this sheet — RFI, duplicates, member ends and read confidence', group: 'In the steel editor header', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'The header states how many issues there are; opening it says which kinds, and changes nothing.' });
2116
+ /* #2521 row 6: what in a Quick model rests on an AI decision. The switch only hides the canvas and 3D marks; the strip
2117
+ and the Inspect note stay, because they carry "unmarked members may still rest on AI decisions". */
2118
+ def('steel.show-ai-decisions', { label: 'Show AI decisions', actsOn: 'Shows or hides the marks on member ends and connections that rest on an AI decision, in 2D and 3D', group: 'In the ⋯ menu — Display', persistence: 'local', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'An open square marks a member end whose height the AI chose; a ring marks a connection the AI assumed. The row is only there when a member end or connection is marked. The AI decisions strip and the Properties note stay either way.' });
2119
+ def('steel.ai-decisions-note', { label: 'AI decisions details', actsOn: 'Opens the list of AI decisions that bear on the whole model, and what the marks and the label each describe', group: 'On the steel canvas', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'A mark is what FloLess can trace. Members without one may still rest on AI decisions it cannot trace, such as the Drawing Filter or the model origin.' });
2120
+ def('steel.ai-decision-view-note', { label: 'AI-chosen view setup', actsOn: 'Says that the AI decided the scale or level of {instance}', anyInstance: 'a drawing view', group: 'On the steel canvas', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'Every member drawn on that view rests on the choice, so it is a note on the view rather than a mark on each member. Not reviewed.' });
2121
+ def('steel.inspector-ai-decisions', { label: 'Rests on AI decisions', actsOn: 'Lists each AI decision the selected member rests on: what the AI chose, and why', group: 'In the Properties panel', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'None of these decisions is reviewed, and the member may still rest on others FloLess cannot trace.' });
2116
2122
  def('steel.quick-model-chip', { label: 'Quick model label', actsOn: 'Says that the model, as last saved, was built by the AI deciding where it would have asked you', group: 'In the steel editor header', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'A Quick model is fine for a tender or an estimate but is not precise. The label describes the model as last saved; "Possibly Quick" means FloLess could not read which AI decisions it rests on.' });
2117
2123
  def('steel.confidence-report', { label: 'Open confidence report', actsOn: 'Opens the recorded drawing-confidence review', group: 'In the steel editor header', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'Shows current field-level read evidence without changing the model.' });
2118
2124
 
@@ -2336,6 +2342,9 @@
2336
2342
  def('steel.rfi-status-filter', { label: 'Status', actsOn: 'Filters the RFI list to {instance}', group: 'In a steel project’s RFIs step', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'Open means anything still waiting on somebody — raised, sent or answered. Closed ones stay listed so a settled question can be looked up later.' });
2337
2343
  def('steel.rfi-copy', { label: 'Copy whole RFI', actsOn: 'Copies {instance} as text, ready to paste into an email', group: 'In a steel project’s RFIs step', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'This copies the same complete question FloLess sends through Gmail. If the clipboard cannot be reached, the text is shown instead so you can copy it by hand.' });
2338
2344
  def('steel.rfi-quick-refile', { label: 'Try filing again', actsOn: 'Files the questions {instance} keeps that the AI could not file yet', anyInstance: 'a Quick model version', group: 'In a steel project’s RFIs step', persistence: 'external', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'A Quick model keeps the questions the AI could not settle with the version it published. When the RFI file could not take them, this files them, marked as the AI’s. Anything already filed is not filed twice, and nothing is sent to anyone.' });
2345
+ def('steel.rfi-read-raise', { label: 'Raise an RFI', actsOn: 'Files the question “{instance}” from the drawing read as an open RFI. Nothing is sent', anyInstance: 'a question from the drawing read', group: 'In a steel project’s RFIs step', persistence: 'working', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'A drawing read can publish its model with questions nobody filed. They wait under From the read, not filed until somebody raises them. This files one as an open RFI. It sends nothing, and a question already filed is not filed twice.' });
2346
+ def('steel.rfi-read-raise-all', { label: 'Raise one RFI for all', actsOn: 'Files every question of {instance} from the drawing read as one grouped RFI (more than one when there are over 64). Nothing is sent', anyInstance: 'a kind of read question', group: 'In a steel project’s RFIs step', persistence: 'working', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'Many questions of one kind, such as the heights a read assumed, are one conversation with the engineer. This files them as one grouped RFI, or as several when there are more than 64. It sends nothing.' });
2347
+ def('steel.rfi-read-toggle', { label: 'Show questions', actsOn: 'Shows or hides the questions of {instance} from the drawing read', group: 'In a steel project’s RFIs step', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'A kind with many questions opens on request, so it does not bury the RFIs below it.' });
2339
2348
  def('steel.rfi-group-toggle', { label: 'Show occurrences', actsOn: 'Expands or collapses the ordered occurrences in {instance}', group: 'In a steel project’s RFIs step', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'A grouped question remains one RFI. Expanding it reveals each occurrence’s own status, drawing destination and scoped actions without creating duplicate rows.' });
2340
2349
  def('steel.rfi-group-elsewhere', { label: 'Show elsewhere in this RFI', actsOn: 'Reveals occurrences from {instance} that are not on the current sheet', group: 'In a steel project’s RFIs step', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'The sheet filter keeps a grouped RFI indivisible. Matching occurrences stay first; this disclosure reveals the rest without pretending they belong to the current sheet.' });
2341
2350
  def('steel.rfi-technical', { label: 'Technical details', actsOn: 'Shows the stored technical identity for {instance}', group: 'In a steel project’s RFIs step', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'The internal gap key is useful for diagnosis but is not a user-facing action selector, so it stays behind this disclosure.' });
@@ -202,6 +202,8 @@ export function createSteelAdapter({ viewport, editorBridge = {} }) {
202
202
  // The members the 3D view has built (connection parts excluded); null before the view exists. The AI Chat's view command
203
203
  // selects only these (#2876).
204
204
  drawnMemberIds: () => invoke('drawnMemberIds', [], null),
205
+ // #2521 row 6: the member ends and connections that rest on an AI decision; null clears them.
206
+ setAiMarks: (spec) => invoke('setAiMarks', [spec]),
205
207
  isIsolated: () => !!invoke('isIsolated', [], false),
206
208
  selectionHiddenIds: () => invoke('selectionHiddenIds', [], []),
207
209
  connHiddenIds: () => invoke('connHiddenIds', [], []),