@floless/app 0.152.1 → 0.153.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/floless-server.cjs +1368 -900
- package/dist/internal-workflows/floless-rfi-gmail-send/.floless-owner.json +1 -1
- package/dist/internal-workflows/floless-rfi-gmail-send/floless-rfi-gmail-send.flo +4 -2
- package/dist/schemas/steel.model.v2.schema.json +1 -1
- package/dist/skills/floless-app-onboarding/SKILL.md +1 -1
- package/dist/skills/floless-app-onboarding/references/floless-surfaces.md +1 -1
- package/dist/skills/floless-app-steel-takeoff/SKILL.md +18 -2
- package/dist/web/agents.js +8 -1
- package/dist/web/app.css +51 -4
- package/dist/web/app.js +94 -11
- package/dist/web/aware.js +2 -2
- package/dist/web/chat.js +244 -25
- package/dist/web/commands-shell.js +47 -8
- package/dist/web/commands-steel.js +78 -3
- package/dist/web/index.html +8 -6
- package/dist/web/instructor.js +2 -1
- package/dist/web/leave-guard.js +51 -7
- package/dist/web/left-pane.js +248 -43
- package/dist/web/model-editor-steel-adapter.js +3 -0
- package/dist/web/model-viewport.js +14 -6
- package/dist/web/steel-3d-view.js +15 -7
- package/dist/web/steel-editor.html +367 -54
- package/dist/web/workspaces.js +95 -17
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"appId":"floless-rfi-gmail-send","owner":"floless.app","schemaVersion":1,"workflowVersion":"1.
|
|
1
|
+
{"appId":"floless-rfi-gmail-send","owner":"floless.app","schemaVersion":1,"workflowVersion":"1.1.0"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
app: floless-rfi-gmail-send
|
|
2
|
-
version: 1.
|
|
2
|
+
version: 1.1.0
|
|
3
3
|
publisher: floless
|
|
4
4
|
display-name: FloLess RFI Gmail delivery
|
|
5
5
|
changelog:
|
|
6
|
+
- version: 1.1.0
|
|
7
|
+
summary: Move to the Google Workspace 2.2.0 tool that ships with AWARE 0.157, so connected Gmail sending works again on current AWARE.
|
|
6
8
|
- version: 1.0.0
|
|
7
9
|
summary: Send one server-composed RFI through the connected Gmail account with duplicate-safe recovery.
|
|
8
10
|
description: |
|
|
@@ -11,7 +13,7 @@ description: |
|
|
|
11
13
|
this run; the workflow has no user-editable mail fields.
|
|
12
14
|
exposes-as-agent: false
|
|
13
15
|
requires:
|
|
14
|
-
- google-workspace@2.
|
|
16
|
+
- google-workspace@2.2.0
|
|
15
17
|
layout: linear
|
|
16
18
|
nodes:
|
|
17
19
|
- id: send
|
|
@@ -353,7 +353,7 @@
|
|
|
353
353
|
}
|
|
354
354
|
}
|
|
355
355
|
},
|
|
356
|
-
"basis": { "
|
|
356
|
+
"basis": { "enum": ["read-of-your-picture", "read-of-your-note"], "description": "#1906: the person confirmed the read's reading of a picture they had sent (read-of-your-picture), or of a note when no picture existed (read-of-your-note)." },
|
|
357
357
|
"overDrawing": {
|
|
358
358
|
"type": "object", "required": ["low", "high", "observations"], "additionalProperties": false,
|
|
359
359
|
"description": "#1903: on a member ALREADY in the model, the drawing readings of this end stated a height (low..high, in world mm) that differs from the person's answer; the answer was proposed in the staged review with that height beside it and the person accepted it. Server-written.",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: floless-app-onboarding
|
|
3
3
|
description: Onboards a person into FloLess and the AWARE runtime underneath it, in three modes. Guide mode (the main one) runs inside FloLess AI Chat as the built-in Guide, whose first turn carries a JSON block of facts FloLess collected (apps, running, recentFiles, accounts, floless) — it briefs the person on what they seem to work on, then onboards them from their own situation, offering every next move as a button (floless_suggest_next_move, floless_connection_propose) and changing nothing itself. Terminal mode is the re-runnable guided tour for an AI in an external terminal (AWARE first, then the FloLess surfaces). Instructor focused mode answers one queued guide request about a single control. Use it when the Guide conversation starts, and on asks like "what can FloLess do for me", "how do I", "onboard me", "get me started", "I'm new to FloLess or AWARE", "give me the guided tour", "walk me through floless.app", "what can AWARE do", "show me the agents", or "/floless-app-onboarding" - for the whole tour or one section.
|
|
4
4
|
metadata:
|
|
5
|
-
version: 0.3.
|
|
5
|
+
version: 0.3.2
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Onboarding a person into FloLess + AWARE
|
|
@@ -49,7 +49,7 @@ conversations, with dated history (**Conversation history**, **New conversation*
|
|
|
49
49
|
- **Scope:** **Conversation scope** shows the home folder and lets the person add other projects or
|
|
50
50
|
workflows the conversation may work on. Scope adds places; it does not limit what can be read.
|
|
51
51
|
- **Approval cards:** when the AI wants to do something that needs a yes, a card asks — **Approve
|
|
52
|
-
once**, **Approve for this request**, **Allow … for this chat**, or **Deny**. Each allowance can be
|
|
52
|
+
once**, **Approve for this request**, **Approve for this conversation** (stays on until Revoke), **Allow … for this chat**, or **Deny**. Each allowance can be
|
|
53
53
|
revoked from the same conversation.
|
|
54
54
|
- **Connected accounts and connectors:** **Connected accounts** shows which FloLess integrations this
|
|
55
55
|
conversation uses. **Use my connectors in this chat** turns the connectors the person added
|
|
@@ -7,7 +7,7 @@ description: >-
|
|
|
7
7
|
two-phase Drawing Filter process: first prepare and save the deterministic Filter, then read only the
|
|
8
8
|
selected evidence into model-global members, registered plan views, observations, and revision history.
|
|
9
9
|
metadata:
|
|
10
|
-
version: 0.67.
|
|
10
|
+
version: 0.67.2
|
|
11
11
|
---
|
|
12
12
|
|
|
13
13
|
# Steel Takeoff — read drawings into `steel.model/v2`
|
|
@@ -99,13 +99,20 @@ Do not read members before the user saves the Drawing Filter.
|
|
|
99
99
|
detail/section callouts may be needed too. Rows marked **not read** stay dimmed and cannot be
|
|
100
100
|
ticked; that is expected and the user has nothing to do about them. The read works from whatever
|
|
101
101
|
text FloLess did extract and, after Save, from the page picture where one is available (see below). Tell them that while the Drawing Filter is open they
|
|
102
|
-
can ask FloLess's
|
|
102
|
+
can ask about any layer or the selection (in **this chat** when you are running inside FloLess's AI Chat; otherwise in FloLess's **AI Chat** on the left), or tell it what to
|
|
103
103
|
change. When it proposes ticks, they appear as a card to review, apply with **Apply selection**,
|
|
104
104
|
and Undo; nothing changes before that, and it never presses **Save filter**. Ask the user to review the
|
|
105
105
|
bright selected drawing items and press **Save filter** in the top-right corner only when satisfied.
|
|
106
106
|
3. Only after Save, fetch the request and its saved Filter again, pin its ETag, and read members from
|
|
107
107
|
elements that the saved selection keeps.
|
|
108
108
|
|
|
109
|
+
**The saved Filter can change while you read.** The user may press **Save filter** again at any time, so what you
|
|
110
|
+
fetched earlier is only a snapshot. Fetch the saved Filter again, and pin its new ETag, at the start of every phase
|
|
111
|
+
and before you tell the user what the Filter does or does not include. FloLess also adds a plain
|
|
112
|
+
"[FloLess] The Drawing Filter was saved…" note, listing the layers, line weights and colours switched on or off, to
|
|
113
|
+
the next message your conversation receives; treat it as a signal that your copy is stale and re-fetch before going
|
|
114
|
+
on. Never answer from the filter you remember when you can read the saved one.
|
|
115
|
+
|
|
109
116
|
Filter preparation is geometry extraction, not interpretation. The server's fixed PyMuPDF extractor is
|
|
110
117
|
the sole authority for paths, layers, line weights, colours, text positions, source/page ids, and element
|
|
111
118
|
ids. Preserve coincident primitives as separate elements.
|
|
@@ -1325,6 +1332,15 @@ Work in this order:
|
|
|
1325
1332
|
card shows it as your reading of their picture; their Confirm settles it. Until then the publish
|
|
1326
1333
|
reports it in `heightAnswers.notApplied` (`picture-not-read`).
|
|
1327
1334
|
|
|
1335
|
+
**A note with no height and no picture.** The person may not know the height; they may only know
|
|
1336
|
+
where to look ("match top roof plane"). That is an answer too: the end shows `status: "evidence"`
|
|
1337
|
+
with `answer.note` and no `answer.evidence`, and no height is claimed. Treat the note as your
|
|
1338
|
+
instruction to work the height out: find it in the drawings it points to (another sheet, a roof
|
|
1339
|
+
plane, a neighbouring member), then ask that end again with `fromEvidence: { questionId, n }` (its
|
|
1340
|
+
note-only answer) and `proposed` set to what you found, so they Confirm it. If the note does not
|
|
1341
|
+
let you work the height out, say so in chat and ask again with no `proposed`; never invent a
|
|
1342
|
+
number. The same `picture-not-read` report covers it until then.
|
|
1343
|
+
|
|
1328
1344
|
9. **Every plan view you read members from MUST state its own `elevation_mm`** — unless the person answered
|
|
1329
1345
|
"no single level" for it on the setup card, which states none and places each end from its own height. Without one there is
|
|
1330
1346
|
nowhere to place an unresolved end, and those members leave the model. If the set does not state a
|
package/dist/web/agents.js
CHANGED
|
@@ -60,6 +60,13 @@
|
|
|
60
60
|
for (const child of children.flat()) if (child !== null && child !== undefined && child !== false) node.append(child);
|
|
61
61
|
return node;
|
|
62
62
|
};
|
|
63
|
+
// The New agent card shows Flo, hat on, ready to take a job (#2079's Flo); a plain + where flo-avatar.js is absent.
|
|
64
|
+
const newAgentThumb = () => {
|
|
65
|
+
const thumb = el('div', { class: 'ws-thumb', 'aria-hidden': 'true' });
|
|
66
|
+
if (typeof floAvatar === 'function') floAvatar(thumb, { size: 44, mood: 'idle', hat: true });
|
|
67
|
+
else thumb.textContent = '+';
|
|
68
|
+
return thumb;
|
|
69
|
+
};
|
|
63
70
|
const toast = (text, kind) => { try { showToast(text, kind); } catch { /* app.js not ready */ } };
|
|
64
71
|
const agoText = (iso) => {
|
|
65
72
|
if (!iso) return '';
|
|
@@ -764,7 +771,7 @@
|
|
|
764
771
|
if (!state.showArchived) {
|
|
765
772
|
wrap.append(el('div', { class: 'ws-create-grid' },
|
|
766
773
|
el('div', { class: 'ws-card ws-create ws-card-create ag-create', role: 'button', tabindex: '0', 'data-ag-new': '1', 'data-command-id': 'shell.agents-new' },
|
|
767
|
-
|
|
774
|
+
newAgentThumb(),
|
|
768
775
|
el('div', { class: 'ws-body' }, el('div', {},
|
|
769
776
|
el('div', { class: 'ws-name', text: 'New agent' }),
|
|
770
777
|
el('div', { class: 'ws-meta', text: 'Name it, say what to check and where. Runs show up in AI Chat.' }))))));
|
package/dist/web/app.css
CHANGED
|
@@ -600,24 +600,33 @@
|
|
|
600
600
|
.left-pane-section[hidden] { display: none; }
|
|
601
601
|
/* A decision takes priority over the model index while both sections are open. The
|
|
602
602
|
saved split is untouched, so closing the tray restores the person's layout. */
|
|
603
|
-
.left-pane-stack:has(.ai-chat-shell:not(.history-open) .ai-chat-approval-tray > .ai-chat-approval:not(.ai-chat-approval-scope)):has(> .left-pane-section[data-left-section="model"]:not([hidden])) > .left-pane-section[data-left-section="narrative"] {
|
|
603
|
+
.left-pane-stack:not(.left-pane-columns):has(.ai-chat-shell:not(.history-open) .ai-chat-approval-tray > .ai-chat-approval:not(.ai-chat-approval-scope)):has(> .left-pane-section[data-left-section="model"]:not([hidden])) > .left-pane-section[data-left-section="narrative"] {
|
|
604
604
|
flex: 0 0 calc(100% - 85px) !important;
|
|
605
605
|
}
|
|
606
|
-
.left-pane-stack:has(.ai-chat-shell:not(.history-open) .ai-chat-approval-tray > .ai-chat-approval:not(.ai-chat-approval-scope)):has(> .left-pane-section[data-left-section="model"]:not([hidden])) > .left-pane-section[data-left-section="model"] {
|
|
606
|
+
.left-pane-stack:not(.left-pane-columns):has(.ai-chat-shell:not(.history-open) .ai-chat-approval-tray > .ai-chat-approval:not(.ai-chat-approval-scope)):has(> .left-pane-section[data-left-section="model"]:not([hidden])) > .left-pane-section[data-left-section="model"] {
|
|
607
607
|
flex: 0 0 74px !important;
|
|
608
608
|
}
|
|
609
609
|
/* A low saved Chat ratio can clip the single-line Revoke grant at any viewport height. */
|
|
610
|
-
.left-pane-stack:has(.ai-chat-shell:not(.history-open) .ai-chat-approval-scope):not(:has(.ai-chat-shell:not(.history-open) .ai-chat-approval-tray > .ai-chat-approval:not(.ai-chat-approval-scope))) > .left-pane-section[data-left-section="narrative"] {
|
|
610
|
+
.left-pane-stack:not(.left-pane-columns):has(.ai-chat-shell:not(.history-open) .ai-chat-approval-scope):not(:has(.ai-chat-shell:not(.history-open) .ai-chat-approval-tray > .ai-chat-approval:not(.ai-chat-approval-scope))) > .left-pane-section[data-left-section="narrative"] {
|
|
611
611
|
min-height: 290px;
|
|
612
612
|
}
|
|
613
|
-
.left-pane-stack:has(.ai-chat-shell:not(.history-open) .ai-chat-approval-scope):not(:has(.ai-chat-shell:not(.history-open) .ai-chat-approval-tray > .ai-chat-approval:not(.ai-chat-approval-scope))) > .left-pane-section[data-left-section="model"] {
|
|
613
|
+
.left-pane-stack:not(.left-pane-columns):has(.ai-chat-shell:not(.history-open) .ai-chat-approval-scope):not(:has(.ai-chat-shell:not(.history-open) .ai-chat-approval-tray > .ai-chat-approval:not(.ai-chat-approval-scope))) > .left-pane-section[data-left-section="model"] {
|
|
614
614
|
flex-shrink: 1 !important;
|
|
615
615
|
}
|
|
616
|
+
/* Where a dragged header lands: the edge it will sit against, plus a faint wash over the half that
|
|
617
|
+
takes it, because a 2px line alone is easy to miss on the light theme. */
|
|
616
618
|
.left-pane-section.drag-over { box-shadow: inset 0 2px 0 var(--accent); }
|
|
619
|
+
.left-pane-section.drag-over-top { box-shadow: inset 0 2px 0 var(--accent); background: linear-gradient(to bottom, var(--accent-soft) 50%, var(--surface) 50%); }
|
|
620
|
+
.left-pane-section.drag-over-bottom { box-shadow: inset 0 -2px 0 var(--accent); background: linear-gradient(to top, var(--accent-soft) 50%, var(--surface) 50%); }
|
|
617
621
|
.left-section-heading {
|
|
618
622
|
height: 40px; flex: 0 0 40px; display: flex; align-items: center; gap: 8px;
|
|
619
623
|
padding: 0 9px; border-bottom: 1px solid var(--border); color: var(--text);
|
|
620
624
|
}
|
|
625
|
+
/* The whole header is the drag handle; its buttons keep their own pointer. */
|
|
626
|
+
.left-section-heading[draggable="true"] { cursor: grab; user-select: none; }
|
|
627
|
+
.left-section-heading[draggable="true"]:active { cursor: grabbing; }
|
|
628
|
+
/* Focusable only from code (tabindex=-1): the Instructor takes a person to the header it explains. */
|
|
629
|
+
.left-section-heading:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
|
|
621
630
|
.left-section-heading strong { font-size: 12px; }
|
|
622
631
|
.left-section-heading > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-dim); font-size: 10px; }
|
|
623
632
|
.left-section-grip, .left-section-close {
|
|
@@ -640,6 +649,40 @@
|
|
|
640
649
|
.left-pane-split:focus-visible { outline: none; }
|
|
641
650
|
body.left-pane-height-resizing, body.left-pane-height-resizing * { cursor: ns-resize !important; user-select: none; }
|
|
642
651
|
body.left-pane-height-resizing iframe { pointer-events: none; }
|
|
652
|
+
/* Side by side: the stack runs as a row, each column keeps at least 260px (web/app.js widens the
|
|
653
|
+
pane to fit both), and the divider turns upright. */
|
|
654
|
+
.left-pane-stack.left-pane-columns { flex-direction: row; }
|
|
655
|
+
.left-pane-stack.left-pane-columns > .left-pane-section { min-height: 0; min-width: 260px; }
|
|
656
|
+
.left-pane-stack.left-pane-columns > .left-pane-split { height: auto; width: 11px; flex: 0 0 11px; cursor: ew-resize; }
|
|
657
|
+
.left-pane-stack.left-pane-columns > .left-pane-split::after { left: 5px; right: auto; top: 0; bottom: 0; width: 1px; height: auto; }
|
|
658
|
+
.left-pane-stack.left-pane-columns > .left-pane-split:not([aria-disabled="true"]):hover::after,
|
|
659
|
+
.left-pane-stack.left-pane-columns > .left-pane-split:focus-visible::after,
|
|
660
|
+
.left-pane-stack.left-pane-columns > .left-pane-split.dragging::after { width: 2px; height: auto; }
|
|
661
|
+
body.left-pane-width-resizing, body.left-pane-width-resizing * { cursor: ew-resize !important; user-select: none; }
|
|
662
|
+
body.left-pane-width-resizing iframe { pointer-events: none; }
|
|
663
|
+
.left-layout-toggle {
|
|
664
|
+
appearance: none; width: 24px; height: 24px; flex: none; display: inline-flex; align-items: center; justify-content: center;
|
|
665
|
+
padding: 0; border: 1px solid transparent; border-radius: 4px; background: transparent; color: var(--text-dim); cursor: pointer;
|
|
666
|
+
}
|
|
667
|
+
.left-layout-toggle[hidden] { display: none; }
|
|
668
|
+
.left-layout-toggle svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; }
|
|
669
|
+
.left-layout-toggle:hover { color: var(--text); background: var(--surface-3); border-color: var(--border-strong); }
|
|
670
|
+
.left-layout-toggle[aria-pressed="true"] { color: var(--text); background: var(--accent-soft); }
|
|
671
|
+
.left-layout-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
|
|
672
|
+
/* While a panel header is dragged: frames stop taking the pointer (they would swallow the drag), and
|
|
673
|
+
the strip beside the pane offers to dock the panel as a second column. */
|
|
674
|
+
body.left-pane-section-dragging iframe { pointer-events: none; }
|
|
675
|
+
.left-dock-zone {
|
|
676
|
+
position: fixed; z-index: 70; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
|
|
677
|
+
padding: 16px; box-sizing: border-box; border: 2px dashed var(--accent); border-radius: 8px;
|
|
678
|
+
background: color-mix(in srgb, var(--accent-soft) 70%, transparent); color: var(--text); text-align: center; pointer-events: auto;
|
|
679
|
+
transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
|
|
680
|
+
}
|
|
681
|
+
.left-dock-zone[hidden] { display: none; }
|
|
682
|
+
.left-dock-zone strong { font-size: 13px; }
|
|
683
|
+
.left-dock-zone span { max-width: 240px; color: var(--text-dim); font-size: 11px; }
|
|
684
|
+
.left-dock-zone.drag-over { border-style: solid; background: var(--accent-soft); }
|
|
685
|
+
@media (prefers-reduced-motion: reduce) { .left-dock-zone { transition: none; } }
|
|
643
686
|
/* Wraps rather than squeezing: a model can contribute six tabs (list and panel), and a label cut to "Fav…" is no label. */
|
|
644
687
|
.left-model-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(78px, 1fr)); padding: 6px; gap: 3px; border-bottom: 1px solid var(--border); flex: none; }
|
|
645
688
|
.left-model-tabs button {
|
|
@@ -6368,6 +6411,10 @@ body.mode-workspaces #menu .menu-item[data-action="bake"] { display:none; }
|
|
|
6368
6411
|
.ws-source-placeholder[data-importing="true"] .ws-source-ico { display:none; }
|
|
6369
6412
|
.ws-source-placeholder[data-importing="true"] .ws-source-spin { display:block; }
|
|
6370
6413
|
@media (prefers-reduced-motion: reduce) { .ws-source-spin { animation:none; } }
|
|
6414
|
+
/* With flo-avatar.js the ring gives way to Flo working, hat on, as over a running workflow; reduced motion is
|
|
6415
|
+
Flo's own still frame. */
|
|
6416
|
+
.ws-source-spin.ws-source-flo { width:auto; height:auto; border:0; border-radius:0; animation:none; }
|
|
6417
|
+
.ws-source-placeholder[data-importing="true"] .ws-source-spin.ws-source-flo { display:flex; justify-content:center; }
|
|
6371
6418
|
.ws-source-actions { display:flex; justify-content:center; gap:8px; margin-top:16px; }
|
|
6372
6419
|
.ws-source-actions[hidden] { display:none; }
|
|
6373
6420
|
/* Scoped .primary, as .kb-view-host and .modal-actions do: the one filled button after an import
|
package/dist/web/app.js
CHANGED
|
@@ -812,6 +812,8 @@ function applyCollapse(focusSide = null) {
|
|
|
812
812
|
document.querySelector(`${host} .panel-toggle[data-side="${focusSide}"]`)?.focus();
|
|
813
813
|
});
|
|
814
814
|
}
|
|
815
|
+
// Folding or opening Inspect changes the room AI Chat and Model have to sit side by side.
|
|
816
|
+
announcePanelRoom();
|
|
815
817
|
// redraw DAG wires after layout changes
|
|
816
818
|
if (isDag()) {
|
|
817
819
|
const svg = document.getElementById('wires-svg');
|
|
@@ -821,6 +823,13 @@ function applyCollapse(focusSide = null) {
|
|
|
821
823
|
}
|
|
822
824
|
}
|
|
823
825
|
|
|
826
|
+
// The window is not the only thing that decides whether the left pane has room for two columns:
|
|
827
|
+
// Inspect folding, opening or changing width does too. setupResize re-fits the left width on this,
|
|
828
|
+
// and web/left-pane.js re-checks the layout.
|
|
829
|
+
function announcePanelRoom() {
|
|
830
|
+
window.dispatchEvent(new window.CustomEvent('floless:panel-room'));
|
|
831
|
+
}
|
|
832
|
+
|
|
824
833
|
function toggleCollapse(side) {
|
|
825
834
|
state.collapse[side] = !state.collapse[side];
|
|
826
835
|
applyCollapse(side);
|
|
@@ -841,12 +850,19 @@ function loadWidths() {
|
|
|
841
850
|
} catch {}
|
|
842
851
|
}
|
|
843
852
|
|
|
844
|
-
function saveWidths() {
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
853
|
+
function saveWidths(side) {
|
|
854
|
+
// ONE side at a time: the side a person just resized. Writing every width on every save let a
|
|
855
|
+
// side-by-side width the window was only holding down overwrite the person's own when they resized
|
|
856
|
+
// Inspect. Stacked and side-by-side left panels keep separate widths (web/left-pane.js), and every
|
|
857
|
+
// other key in the record is carried over untouched. No side (the old call shape) saves both.
|
|
858
|
+
let w = {};
|
|
859
|
+
try {
|
|
860
|
+
const stored = JSON.parse(localStorage.getItem(WIDTHS_KEY) || '{}');
|
|
861
|
+
if (stored && typeof stored === 'object' && !Array.isArray(stored)) w = stored;
|
|
862
|
+
} catch { /* unreadable storage starts from an empty record */ }
|
|
863
|
+
const write = (key, value) => { if (value) w[key] = parseInt(value, 10); else delete w[key]; };
|
|
864
|
+
if (side !== 'right') write($app.classList?.contains('left-columns') ? 'leftColumns' : 'left', $app.style.getPropertyValue('--left-width'));
|
|
865
|
+
if (side !== 'left') write('right', $app.style.getPropertyValue('--right-width'));
|
|
850
866
|
try {
|
|
851
867
|
localStorage.setItem(WIDTHS_KEY, JSON.stringify(w));
|
|
852
868
|
} catch (error) {
|
|
@@ -859,8 +875,24 @@ function setupResize() {
|
|
|
859
875
|
const handles = [...document.querySelectorAll('.resize-handle')];
|
|
860
876
|
let active = null;
|
|
861
877
|
|
|
878
|
+
// AI Chat and Model side by side (web/left-pane.js) are two columns of at least 260px plus their
|
|
879
|
+
// 11px divider, so that layout has its own width range. The canvas keeps at least 360px: the pane
|
|
880
|
+
// never grows over the model it sits beside.
|
|
881
|
+
const LEFT_COLUMN_MIN = 260, MIN_CANVAS = 360, MAX_LEFT_COLUMNS = 1200;
|
|
882
|
+
const MIN_LEFT_COLUMNS = LEFT_COLUMN_MIN * 2 + 11;
|
|
883
|
+
// The side-by-side width a person chose in THIS session (resized or reset). It wins over storage, so a
|
|
884
|
+
// profile that refuses the save cannot bring an older width back on the next fit; storage only carries
|
|
885
|
+
// the choice to the next session.
|
|
886
|
+
let sessionColumnsWidth = null;
|
|
887
|
+
const rememberColumnsWidth = (side) => { if (side === 'left' && leftColumns()) sessionColumnsWidth = readWidth('left'); };
|
|
888
|
+
const leftColumns = () => $app.classList.contains('left-columns');
|
|
889
|
+
const roomForLeft = (inspectFolded = state.collapse.right) => (window.innerWidth || 0) - (inspectFolded ? 36 : readWidth('right')) - MIN_CANVAS;
|
|
890
|
+
const maxLeftColumns = () => Math.max(MIN_LEFT_COLUMNS, Math.min(MAX_LEFT_COLUMNS, roomForLeft()));
|
|
891
|
+
|
|
862
892
|
const config = side => side === 'left'
|
|
863
|
-
?
|
|
893
|
+
? (leftColumns()
|
|
894
|
+
? { panel: document.querySelector('.chat'), cssVar: '--left-width', min: MIN_LEFT_COLUMNS, max: maxLeftColumns(), defaultWidth: 680 }
|
|
895
|
+
: { panel: document.querySelector('.chat'), cssVar: '--left-width', min: MIN_LEFT, max: MAX_LEFT, defaultWidth: 340 })
|
|
864
896
|
: { panel: document.querySelector('.inspect'), cssVar: '--right-width', min: MIN_RIGHT, max: MAX_RIGHT, defaultWidth: 420 };
|
|
865
897
|
|
|
866
898
|
function readWidth(side) {
|
|
@@ -939,7 +971,9 @@ function setupResize() {
|
|
|
939
971
|
syncValue(session.handle, session.startW);
|
|
940
972
|
redrawDagWires();
|
|
941
973
|
}
|
|
942
|
-
|
|
974
|
+
// Saved only when the gesture ended somewhere other than where it began.
|
|
975
|
+
if (commit && readWidth(session.side) !== session.startW) { rememberColumnsWidth(session.side); saveWidths(session.side); }
|
|
976
|
+
if (session.side === 'right') window.dispatchEvent(new window.CustomEvent('floless:panel-room'));
|
|
943
977
|
}
|
|
944
978
|
|
|
945
979
|
function ownsPointer(event) {
|
|
@@ -991,9 +1025,13 @@ function setupResize() {
|
|
|
991
1025
|
|
|
992
1026
|
function resetWidth(side, handle) {
|
|
993
1027
|
if (active) endDrag({ restore: true });
|
|
1028
|
+
// A reset forgets the saved width, in either layout. Side by side then shows its 680px default,
|
|
1029
|
+
// fitted to the window and not saved, so a narrow window cannot turn its clamp into the saved width.
|
|
994
1030
|
$app.style.removeProperty(config(side).cssVar);
|
|
1031
|
+
saveWidths(side);
|
|
1032
|
+
if (side === 'left' && leftColumns()) { sessionColumnsWidth = config(side).defaultWidth; fitLeftColumns(); }
|
|
995
1033
|
syncValue(handle);
|
|
996
|
-
|
|
1034
|
+
if (side === 'right') window.dispatchEvent(new window.CustomEvent('floless:panel-room'));
|
|
997
1035
|
redrawDagWires();
|
|
998
1036
|
}
|
|
999
1037
|
|
|
@@ -1052,14 +1090,59 @@ function setupResize() {
|
|
|
1052
1090
|
const physicalDirection = e.key === 'ArrowRight' ? 1 : -1;
|
|
1053
1091
|
const step = e.shiftKey ? 40 : 12;
|
|
1054
1092
|
const widthDirection = side === 'left' ? physicalDirection : -physicalDirection;
|
|
1055
|
-
|
|
1056
|
-
|
|
1093
|
+
const before = readWidth(side);
|
|
1094
|
+
// A press a limit absorbs moved nothing, so it saves nothing.
|
|
1095
|
+
if (applyWidth(side, before + widthDirection * step) !== before) { rememberColumnsWidth(side); saveWidths(side); }
|
|
1096
|
+
if (side === 'right') window.dispatchEvent(new window.CustomEvent('floless:panel-room'));
|
|
1057
1097
|
});
|
|
1058
1098
|
|
|
1059
1099
|
handle.addEventListener('dblclick', () => {
|
|
1060
1100
|
resetWidth(side, handle);
|
|
1061
1101
|
});
|
|
1062
1102
|
});
|
|
1103
|
+
|
|
1104
|
+
function storedWidths() {
|
|
1105
|
+
try {
|
|
1106
|
+
const stored = JSON.parse(window.localStorage.getItem(WIDTHS_KEY) || '{}');
|
|
1107
|
+
return stored && typeof stored === 'object' && !Array.isArray(stored) ? stored : {};
|
|
1108
|
+
} catch { return {}; }
|
|
1109
|
+
}
|
|
1110
|
+
// The saved side-by-side width, held inside what this window can give it now. Nothing is saved:
|
|
1111
|
+
// a wider window later gets the person's own width back.
|
|
1112
|
+
function savedColumnsWidth() {
|
|
1113
|
+
if (sessionColumnsWidth !== null) return sessionColumnsWidth;
|
|
1114
|
+
const saved = Number(storedWidths().leftColumns);
|
|
1115
|
+
return Number.isFinite(saved) ? saved : config('left').defaultWidth;
|
|
1116
|
+
}
|
|
1117
|
+
function fitLeftColumns(wanted = savedColumnsWidth()) {
|
|
1118
|
+
applyWidth('left', wanted);
|
|
1119
|
+
}
|
|
1120
|
+
window.addEventListener('resize', () => { if (leftColumns() && !active) fitLeftColumns(); });
|
|
1121
|
+
window.addEventListener('floless:panel-room', () => { if (leftColumns() && active?.side !== 'left') fitLeftColumns(); });
|
|
1122
|
+
// Inspect's width animates (--right-width is a registered, transitioned property), so a room check made
|
|
1123
|
+
// as it starts to open reads a width it has not reached yet. Its end is announced too.
|
|
1124
|
+
$app.addEventListener('transitionend', (event) => {
|
|
1125
|
+
if (event.target === $app && event.propertyName === '--right-width') window.dispatchEvent(new window.CustomEvent('floless:panel-room'));
|
|
1126
|
+
});
|
|
1127
|
+
|
|
1128
|
+
// web/left-pane.js decides the layout; this side owns the width that goes with it.
|
|
1129
|
+
window.flolessPanelLayout = Object.freeze({
|
|
1130
|
+
// { inspectFolded: true } asks whether folding Inspect would make the room.
|
|
1131
|
+
canFitLeftColumns: (options = {}) => roomForLeft(options.inspectFolded ?? state.collapse.right) >= MIN_LEFT_COLUMNS,
|
|
1132
|
+
setLeftColumns(on) {
|
|
1133
|
+
on = !!on;
|
|
1134
|
+
if (on === leftColumns()) return;
|
|
1135
|
+
if (active?.side === 'left') endDrag({ restore: true });
|
|
1136
|
+
$app.classList.toggle('left-columns', on);
|
|
1137
|
+
if (on) { fitLeftColumns(); return; }
|
|
1138
|
+
const saved = Number(storedWidths().left);
|
|
1139
|
+
if (Number.isFinite(saved)) { applyWidth('left', saved); return; }
|
|
1140
|
+
$app.style.removeProperty('--left-width');
|
|
1141
|
+
const handle = handles.find(item => item.dataset.resize === 'left');
|
|
1142
|
+
if (handle) syncValue(handle);
|
|
1143
|
+
redrawDagWires();
|
|
1144
|
+
},
|
|
1145
|
+
});
|
|
1063
1146
|
}
|
|
1064
1147
|
|
|
1065
1148
|
/* ============= RUN ============= */
|
package/dist/web/aware.js
CHANGED
|
@@ -11222,7 +11222,7 @@
|
|
|
11222
11222
|
const provider = canChat ? preferredChatProvider() : null;
|
|
11223
11223
|
$chatMeta.hidden = !provider;
|
|
11224
11224
|
$chatMeta.textContent = provider
|
|
11225
|
-
? `Starts with ${runtimeLabel(provider)} · ${requestHelpReq.type === 'guide' ? 'Read only' : '
|
|
11225
|
+
? `Starts with ${runtimeLabel(provider)} · ${requestHelpReq.type === 'guide' ? 'Read only' : 'Auto'}`
|
|
11226
11226
|
: '';
|
|
11227
11227
|
$open.classList.toggle('primary', !canChat);
|
|
11228
11228
|
}
|
|
@@ -12729,7 +12729,7 @@
|
|
|
12729
12729
|
? `<button class="req-chat-action primary" data-request-chat="start" data-id="${escapeAttr(r.id)}" data-command-id="shell.requests-start-chat#${escapeAttr(r.id)}" data-command-instance-label="${escapeAttr(commandInstance)}" aria-label="Start ${escapeAttr(chatLabel)} in AI Chat" data-tip="Start this request in AI Chat and continue there"${starting ? ' disabled aria-busy="true"' : ''}>${escapeHtml(starting || 'Start in AI Chat')}</button>`
|
|
12730
12730
|
: '';
|
|
12731
12731
|
const chatMeta = discardQuestion ? '' : chatProvider && inChatScope
|
|
12732
|
-
? `<span class="req-chat-meta">AI Chat · ${escapeHtml(runtimeLabel(chatProvider))} · ${r.type === 'guide' || (r.type === 'tweak-contract' && r.mode === 'query') ? 'Read only' : '
|
|
12732
|
+
? `<span class="req-chat-meta">AI Chat · ${escapeHtml(runtimeLabel(chatProvider))} · ${r.type === 'guide' || (r.type === 'tweak-contract' && r.mode === 'query') ? 'Read only' : 'Auto'}</span>`
|
|
12733
12733
|
: chatProvider && hasChatOwner
|
|
12734
12734
|
? `<span class="req-chat-elsewhere" data-tip="Open ${escapeAttr(owner)} to discuss or start this request in AI Chat">Open ${escapeHtml(owner)} for AI Chat</span>`
|
|
12735
12735
|
: '';
|